1 /* $Id: ipx.c,v 1.6 2003-10-03 07:58:14 btb Exp $ */
3 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
4 SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
5 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
6 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
7 IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
8 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
9 FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
10 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
11 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
12 COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
17 * Routines for IPX communications, copied from d1x
20 * Revision 2.10 1995/03/29 17:27:55 john
21 * Added code to not duplicate broadcasts.
23 * Revision 2.9 1995/03/29 15:32:07 john
26 * Revision 2.8 1995/03/29 15:07:31 john
27 * Added network support.
29 * Revision 2.7 1995/03/29 11:22:27 john
30 * Added broadcasting over a net.
32 * Revision 2.6 1995/03/28 20:05:03 john
33 * Took away alternate server stuff.
35 * Revision 2.5 1995/03/23 19:14:29 john
36 * Added better MAX_USERS message.
38 * Revision 2.4 1995/03/23 19:00:02 john
39 * Added user list capabitly.
41 * Revision 2.3 1995/03/23 12:27:05 john
42 * Move IPX into bios lib.
44 * Revision 2.2 1995/03/22 19:08:15 john
45 * Added code to fix sending packets over router... now
46 * we just need to make broadcasts go over router!!
48 * Revision 2.1 1995/03/21 08:40:16 john
49 * Ifdef'd out the NETWORK code.
51 * Revision 2.0 1995/02/27 11:30:45 john
52 * New version 2.0, which has no anonymous unions, builds with
53 * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
55 * Revision 1.31 1995/02/16 17:35:03 john
56 * Added code to allow dynamic socket changing.
58 * Revision 1.30 1995/02/01 21:03:45 john
61 * Revision 1.29 1995/01/22 14:31:05 john
64 * Revision 1.28 1995/01/22 14:29:26 john
65 * Added code to bypass broadcast messages.
67 * Revision 1.27 1995/01/03 13:46:16 john
68 * Added code that should make ipx work over different servers,
69 * but ifdef'd it out with SHAREWARE in ipx.c. I haven't tested
70 * this, and I hope it doesn't introduce net bugs.
72 * Revision 1.26 1994/12/14 11:54:37 rob
73 * Reduce # of ipx packets.
75 * Revision 1.25 1994/12/11 00:43:28 john
76 * Locked down DOS ipx buffers... probably not necessary, tho.
78 * Revision 1.24 1994/12/08 15:49:58 rob
79 * Bumped up the # of ipx packets.
81 * Revision 1.23 1994/12/04 15:23:54 rob
82 * Reduced packet # constants.
84 * Revision 1.22 1994/11/27 23:12:39 matt
85 * Made changes for new mprintf calling convention
87 * Revision 1.21 1994/11/19 15:15:19 mike
88 * remove unused code and data
90 * Revision 1.20 1994/11/10 11:06:07 rob
91 * Raised number of ipx packets to 64 and buffers to 128 (for 8-way games)
92 * Removed (commented out) all the spx support stuff.
94 * Revision 1.19 1994/11/07 17:50:12 rob
95 * Bumped up max_packets and ipx_num_packets to double their previous
98 * Revision 1.18 1994/11/07 15:39:01 rob
99 * Removed temporary hacked ipx_send_object function.
100 * Replaced with a more general thing.
102 * Revision 1.17 1994/11/05 16:08:40 rob
103 * Made a change necessary for object syncing on rejoin.
105 * Revision 1.16 1994/11/01 15:57:12 rob
106 * Added support for SPX sockets for critical messages.
108 * Revision 1.15 1994/10/31 19:21:01 rob
109 * Added a routine for sending objects via ipx. Its a hack and shoukld
110 * be replaced by something more general time permitting.
112 * Revision 1.14 1994/10/20 14:57:42 john
115 * Revision 1.13 1994/10/20 11:22:45 john
116 * Tweaked the number of waiting packets. Added code to print
117 * total packets missed, and to limit the packet send rate to
118 * 10 packets per second unless firing.
120 * Revision 1.12 1994/10/03 20:50:11 john
121 * Started adding sound pause functions.
123 * Revision 1.11 1994/09/15 08:54:24 mike
124 * comment out a mprintf.
126 * Revision 1.10 1994/09/12 19:38:20 john
127 * Made some stuff that prints to the DOS screen go to the
128 * mono instead, since it really is debugging info.
130 * Revision 1.9 1994/09/07 13:32:03 john
131 * Made ipx_close explicitly close the socket we were using,
132 * because it seems that VLM's don't automatically close them
133 * like the older NETX stuff did (Going from Novell 3.11 driver
136 * Revision 1.8 1994/09/06 19:29:20 john
137 * Added trial version of rejoin function.
139 * Revision 1.7 1994/08/09 19:31:50 john
140 * Networking changes.
142 * Revision 1.6 1994/08/05 16:11:41 john
143 * Psuedo working version of networking.
145 * Revision 1.5 1994/08/04 19:17:21 john
146 * Inbetween version of network stuff.
148 * Revision 1.4 1994/07/29 16:08:57 john
149 * *** empty log message ***
151 * Revision 1.3 1994/07/25 12:33:31 john
152 * Network "pinging" in.
154 * Revision 1.2 1994/07/20 15:58:28 john
155 * First installment of ipx stuff.
157 * Revision 1.1 1994/07/19 15:42:00 john
168 #define _BORLAND_DOS_REGS 1
189 typedef unsigned char BYTE;
190 typedef unsigned short WORD;
191 typedef unsigned long DWORD;
193 typedef struct local_address {
195 } __pack__ local_address;
197 typedef struct net_address {
199 local_address node_id;
201 } __pack__ net_address;
203 typedef struct ipx_header {
206 BYTE transport_control;
208 net_address destination;
210 } __pack__ ipx_header;
212 typedef struct ecb_header {
216 BYTE completion_code;
218 BYTE ipx_reserved[14];
220 local_address immediate_address;
222 WORD fragment_pointer[2];
224 } __pack__ ecb_header;
226 typedef struct packet_data {
228 byte data[IPX_MAX_DATA_SIZE];
229 } __pack__ packet_data;
231 typedef struct ipx_packet {
235 } __pack__ ipx_packet;
237 static int ipx_packetnum = 0;
239 #define MAX_PACKETS 64
241 static packet_data packet_buffers[MAX_PACKETS];
242 static short packet_free_list[MAX_PACKETS];
243 static int num_packets = 0;
244 static int largest_packet_index = 0;
245 static short packet_size[MAX_PACKETS];
248 static ubyte ipx_installed=0;
249 WORD ipx_vector_segment;
250 WORD ipx_vector_offset;
251 ubyte ipx_socket_life = 0; // 0=closed at prog termination, 0xff=closed when requested.
252 //DWORD ipx_network = 0;
253 //local_address ipx_my_node;
254 #define ipx_my_node (ipx_MyAddress+4)
255 WORD ipx_num_packets=32; // 32 Ipx packets
256 ipx_packet * packets;
258 ushort ipx_packets_selector;
260 ecb_header * last_ecb=NULL;
263 static void got_new_packet( ecb_header * ecb );
264 static void ipx_listen_for_packet(ecb_header * ecb );
266 static void free_packet( int id )
268 packet_buffers[id].packetnum = -1;
269 packet_free_list[ --num_packets ] = id;
270 if (largest_packet_index==id)
271 while ((--largest_packet_index>0) && (packet_buffers[largest_packet_index].packetnum == -1 ));
274 static int ipx_dos_get_packet_data( ubyte * data )
276 int i, n, best, best_id, size;
278 for (i=1; i<ipx_num_packets; i++ ) {
279 if ( !packets[i].ecb.in_use ) {
280 got_new_packet( &packets[i].ecb );
281 packets[i].ecb.in_use = 0;
282 ipx_listen_for_packet(&packets[i].ecb);
290 for (i=0; i<=largest_packet_index; i++ ) {
291 if ( packet_buffers[i].packetnum > -1 ) {
293 if ( best == -1 || (packet_buffers[i].packetnum<best) ) {
294 best = packet_buffers[i].packetnum;
300 //mprintf( (0, "Best id = %d, pn = %d, last_ecb = %x, len=%x, ne = %d\n", best_id, best, last_ecb, lastlen, neterrors ));
301 //mprintf( (1, "<%d> ", neterrors ));
303 if ( best_id < 0 ) return 0;
305 size = packet_size[best_id];
306 memcpy( data, packet_buffers[best_id].data, size );
307 free_packet(best_id);
313 unsigned int swap_short( unsigned int short )
314 #pragma aux swap_short parm [eax] = "xchg al,ah";
316 static inline unsigned int swap_short( unsigned int sshort ) {
318 asm("xchg %%ah,%%al" : "=a" (__retval) : "a" (sshort));
323 static void got_new_packet( ecb_header * ecb )
327 unsigned short datasize;
331 p = (ipx_packet *)ecb;
333 if ( p->ecb.in_use ) { neterrors++; return; }
334 if ( p->ecb.completion_code ) { neterrors++; return; }
336 // Error( "Recieve error %d for completion code", p->ecb.completion_code );
338 if ( memcmp( &p->ipx.source.node_id, ipx_my_node, 6 ) ) {
339 datasize=swap_short(p->ipx.length);
341 datasize -= sizeof(ipx_header);
342 // Find slot to put packet in...
343 if ( datasize > 0 && datasize <= sizeof(packet_data) ) {
344 if ( num_packets >= MAX_PACKETS ) {
345 //printf( 1, "IPX: Packet buffer overrun!!!\n" );
349 id = packet_free_list[ num_packets++ ];
350 if (id > largest_packet_index ) largest_packet_index = id;
351 packet_size[id] = datasize-sizeof(int);
352 packet_buffers[id].packetnum = p->pd.packetnum;
353 if ( packet_buffers[id].packetnum < 0 ) { neterrors++; return; }
354 memcpy( packet_buffers[id].data, p->pd.data, packet_size[id] );
361 //ipx_listen_for_packet(&p->ecb);
364 /*ubyte * ipx_get_my_local_address()
366 return ipx_my_node.address;
369 ubyte * ipx_get_my_server_address()
371 return (ubyte *)&ipx_network;
374 static void ipx_listen_for_packet(ecb_header * ecb )
376 dpmi_real_regs rregs;
378 memset(&rregs,0,sizeof(dpmi_real_regs));
379 rregs.ebx = 4; // Listen For Packet function
380 rregs.esi = DPMI_real_offset(ecb);
381 rregs.es = DPMI_real_segment(ecb);
382 dpmi_real_int386x( 0x7A, &rregs );
385 /*static void ipx_cancel_listen_for_packet(ecb_header * ecb )
387 dpmi_real_regs rregs;
388 memset(&rregs,0,sizeof(dpmi_real_regs));
389 rregs.ebx = 6; // IPX Cancel event
390 rregs.esi = DPMI_real_offset(ecb);
391 rregs.es = DPMI_real_segment(ecb);
392 dpmi_real_int386x( 0x7A, &rregs );
396 static void ipx_send_packet(ecb_header * ecb )
398 dpmi_real_regs rregs;
399 memset(&rregs,0,sizeof(dpmi_real_regs));
400 rregs.ebx = 3; // Send Packet function
401 rregs.esi = DPMI_real_offset(ecb);
402 rregs.es = DPMI_real_segment(ecb);
403 dpmi_real_int386x( 0x7A, &rregs );
409 ubyte local_target[6];
410 } __pack__ net_xlat_info;
412 static void ipx_dos_get_local_target( ubyte * server, ubyte * node, ubyte * local_target )
414 net_xlat_info * info;
415 dpmi_real_regs rregs;
417 // Get dos memory for call...
418 info = (net_xlat_info *)dpmi_get_temp_low_buffer( sizeof(net_xlat_info) );
419 assert( info != NULL );
420 memcpy( info->network, server, 4 );
421 memcpy( info->node, node, 6 );
423 memset(&rregs,0,sizeof(dpmi_real_regs));
425 rregs.ebx = 2; // Get Local Target
426 rregs.es = DPMI_real_segment(info);
427 rregs.esi = DPMI_real_offset(info->network);
428 rregs.edi = DPMI_real_offset(info->local_target);
430 dpmi_real_int386x( 0x7A, &rregs );
432 // Save the local target...
433 memcpy( local_target, info->local_target, 6 );
436 static void ipx_close()
438 dpmi_real_regs rregs;
439 if ( ipx_installed ) {
440 // When using VLM's instead of NETX, the sockets don't
441 // seem to automatically get closed, so we must explicitly
442 // close them at program termination.
444 memset(&rregs,0,sizeof(dpmi_real_regs));
445 rregs.edx = ipx_socket;
446 rregs.ebx = 1; // Close socket
447 dpmi_real_int386x( 0x7A, &rregs );
451 static int ipx_init(int socket_number)
454 dpmi_real_regs rregs;
455 ubyte *ipx_real_buffer;
458 // atexit(ipx_close);
462 // init packet buffers.
463 for (i=0; i<MAX_PACKETS; i++ ) {
464 packet_buffers[i].packetnum = -1;
465 packet_free_list[i] = i;
468 largest_packet_index = 0;
470 // Get the IPX vector
471 memset(&rregs,0,sizeof(dpmi_real_regs));
472 rregs.eax=0x00007a00;
473 dpmi_real_int386x( 0x2f, &rregs );
475 if ( (rregs.eax & 0xFF) != 0xFF ) {
476 return IPX_NOT_INSTALLED;
478 ipx_vector_offset = rregs.edi & 0xFFFF;
479 ipx_vector_segment = rregs.es;
480 //printf( "IPX entry point at %.4x:%.4x\n", ipx_vector_segment, ipx_vector_offset );
482 // Open a socket for IPX
484 memset(&rregs,0,sizeof(dpmi_real_regs));
485 swab( (char *)&socket_number,(char *)&ipx_socket, 2 );
486 rregs.edx = ipx_socket;
487 rregs.eax = ipx_socket_life;
488 rregs.ebx = 0; // Open socket
489 dpmi_real_int386x( 0x7A, &rregs );
491 ipx_socket = rregs.edx & 0xFFFF;
493 if ( rregs.eax & 0xFF ) {
494 //mprintf( (1, "IPX error opening channel %d\n", socket_number-IPX_DEFAULT_SOCKET ));
495 return IPX_SOCKET_TABLE_FULL;
500 // Find our internetwork address
501 ipx_real_buffer = dpmi_get_temp_low_buffer( 1024 ); // 1k block
502 if ( ipx_real_buffer == NULL ) {
503 //printf( "Error allocation realmode memory\n" );
504 return IPX_NO_LOW_DOS_MEM;
507 memset(&rregs,0,sizeof(dpmi_real_regs));
508 rregs.ebx = 9; // Get internetwork address
509 rregs.esi = DPMI_real_offset(ipx_real_buffer);
510 rregs.es = DPMI_real_segment(ipx_real_buffer);
511 dpmi_real_int386x( 0x7A, &rregs );
513 if ( rregs.eax & 0xFF ) {
514 //printf( "Error getting internetwork address!\n" );
515 return IPX_SOCKET_TABLE_FULL;
518 /* memcpy( &ipx_network, ipx_real_buffer, 4 );
519 memcpy( ipx_my_node, &ipx_real_buffer[4], 6 );*/
520 memcpy(ipx_MyAddress,ipx_real_buffer,10);
522 if ( show_address ) {
523 printf( "My IPX addresss is " );
524 printf( "%02X%02X%02X%02X/", ipx_real_buffer[0],ipx_real_buffer[1],ipx_real_buffer[2],ipx_real_buffer[3] );
525 printf( "%02X%02X%02X%02X%02X%02X\n", ipx_real_buffer[4],ipx_real_buffer[5],ipx_real_buffer[6],ipx_real_buffer[7],ipx_real_buffer[8],ipx_real_buffer[9] );
529 packets = dpmi_real_malloc( sizeof(ipx_packet)*ipx_num_packets, &ipx_packets_selector );
530 if ( packets == NULL ) {
531 //printf( "Couldn't allocate real memory for %d packets\n", ipx_num_packets );
532 return IPX_NO_LOW_DOS_MEM;
534 #if 0 /* adb: not needed, fails with cwsdpmi */
535 if (!dpmi_lock_region( packets, sizeof(ipx_packet)*ipx_num_packets )) {
536 //printf( "Couldn't lock real memory for %d packets\n", ipx_num_packets );
537 return IPX_NO_LOW_DOS_MEM;
540 memset( packets, 0, sizeof(ipx_packet)*ipx_num_packets );
542 for (i=1; i<ipx_num_packets; i++ ) {
543 packets[i].ecb.in_use = 0x1d;
544 //packets[i].ecb.in_use = 0;
545 packets[i].ecb.socket_id = ipx_socket;
546 packets[i].ecb.fragment_count = 1;
547 packets[i].ecb.fragment_pointer[0] = DPMI_real_offset(&packets[i].ipx);
548 packets[i].ecb.fragment_pointer[1] = DPMI_real_segment(&packets[i].ipx);
549 packets[i].ecb.fragment_size = sizeof(ipx_packet)-sizeof(ecb_header); //-sizeof(ecb_header);
551 ipx_listen_for_packet(&packets[i].ecb);
554 packets[0].ecb.socket_id = ipx_socket;
555 packets[0].ecb.fragment_count = 1;
556 packets[0].ecb.fragment_pointer[0] = DPMI_real_offset(&packets[0].ipx);
557 packets[0].ecb.fragment_pointer[1] = DPMI_real_segment(&packets[0].ipx);
558 packets[0].ipx.packet_type = 4; // IPX packet
559 packets[0].ipx.destination.socket_id = ipx_socket;
560 // memcpy( packets[0].ipx.destination.network_id, &ipx_network, 4 );
561 memset( packets[0].ipx.destination.network_id, 0, 4 );
566 static void ipx_dos_send_packet_data( ubyte * data, int datasize, ubyte *network, ubyte *address, ubyte *immediate_address )
568 assert(ipx_installed);
570 if ( datasize >= IPX_MAX_DATA_SIZE ) {
571 printf( "Data too big\n" );
572 //added/replaced on 11/8/98 by Victor Rachels to stop crappage
575 //end this section replacement - VR
578 // Make sure no one is already sending something
579 while( packets[0].ecb.in_use )
583 if (packets[0].ecb.completion_code) {
584 // printf( "Send error %d for completion code\n", packets[0].ecb.completion_code );
585 //added/replaced on 11/8/98 by Victor Rachels to stop crappage
588 //end this section replacement - VR
592 // Fill in destination address
593 if ( memcmp( network, &ipx_network, 4 ) )
594 memcpy( packets[0].ipx.destination.network_id, network, 4 );
596 memset( packets[0].ipx.destination.network_id, 0, 4 );
597 memcpy( packets[0].ipx.destination.node_id.address, address, 6 );
598 memcpy( packets[0].ecb.immediate_address.address, immediate_address, 6 );
599 packets[0].pd.packetnum = ipx_packetnum++;
601 // Fill in data to send
602 packets[0].ecb.fragment_size = sizeof(ipx_header) + sizeof(int) + datasize;
604 assert( datasize > 1 );
605 assert( packets[0].ecb.fragment_size <= 576 );
607 memcpy( packets[0].pd.data, data, datasize );
610 ipx_send_packet( &packets[0].ecb );
614 /*static int ipx_change_default_socket( ushort socket_number )
618 dpmi_real_regs rregs;
620 if ( !ipx_installed ) return -3;
623 memset(&rregs,0,sizeof(dpmi_real_regs));
624 swab( (char *)&socket_number,(char *)&new_ipx_socket, 2 );
625 rregs.edx = new_ipx_socket;
626 rregs.eax = ipx_socket_life;
627 rregs.ebx = 0; // Open socket
628 dpmi_real_int386x( 0x7A, &rregs );
630 new_ipx_socket = rregs.edx & 0xFFFF;
632 if ( rregs.eax & 0xFF ) {
633 //printf( (1, "IPX error opening channel %d\n", socket_number-IPX_DEFAULT_SOCKET ));
637 for (i=1; i<ipx_num_packets; i++ ) {
638 ipx_cancel_listen_for_packet(&packets[i].ecb);
641 // Close existing socket...
642 memset(&rregs,0,sizeof(dpmi_real_regs));
643 rregs.edx = ipx_socket;
644 rregs.ebx = 1; // Close socket
645 dpmi_real_int386x( 0x7A, &rregs );
647 ipx_socket = new_ipx_socket;
649 // Repost all listen requests on the new socket...
650 for (i=1; i<ipx_num_packets; i++ ) {
651 packets[i].ecb.in_use = 0;
652 packets[i].ecb.socket_id = ipx_socket;
653 ipx_listen_for_packet(&packets[i].ecb);
656 packets[0].ecb.socket_id = ipx_socket;
657 packets[0].ipx.destination.socket_id = ipx_socket;
660 // init packet buffers.
661 for (i=0; i<MAX_PACKETS; i++ ) {
662 packet_buffers[i].packetnum = -1;
663 packet_free_list[i] = i;
666 largest_packet_index = 0;
672 struct ipx_driver ipx_dos = {
681 ipx_dos_get_local_target,
682 ipx_dos_get_packet_data,
683 ipx_dos_send_packet_data
686 void arch_ipx_set_driver(int ipx_driver)
689 if (ipx_driver != IPX_DRIVER_IPX)
690 Warning("Unknown network driver! Defaulting to real IPX");
694 //---typedef struct rip_entry {
700 //---typedef struct rip_packet {
701 //--- ushort operation; //1=request, 2=response
702 //--- rip_entry rip[50];
706 //---void ipx_find_all_servers()
709 //--- rip_packet * rp;
710 //--- assert(ipx_installed);
712 //--- ipx_change_default_socket( 0x0453 );
713 //--- // ipx_change_default_socket( 0x5304 );
715 //--- // Make sure no one is already sending something
716 //--- while( packets[0].ecb.in_use )
720 //--- if (packets[0].ecb.completion_code) {
721 //--- printf( "AAAA:Send error %d for completion code\n", packets[0].ecb.completion_code );
725 //--- rp = (rip_packet *)&packets[0].pd;
727 //--- // Fill in destination address
729 //--- char mzero1[] = {0,0,0,1};
730 //--- char mzero[] = {0,0,0,0,0,1};
731 //--- char immediate[6];
732 //--- //memcpy( packets[0].ipx.destination.network_id, &ipx_network, 4 );
733 //--- //memcpy( packets[0].ipx.destination.node_id.address, ipx_my_node.address, 6 );
735 //--- memcpy( packets[0].ipx.destination.network_id, mzero1, 4 );
736 //--- memcpy( packets[0].ipx.destination.node_id.address, mzero, 6 );
738 //--- memcpy( packets[0].ipx.destination.socket_id, &ipx_socket, 2 );
739 //--- memcpy( packets[0].ipx.source.network_id, &ipx_network, 4 );
740 //--- memcpy( packets[0].ipx.source.node_id.address, ipx_my_node.address, 6 );
741 //--- memcpy( packets[0].ipx.source.socket_id, &ipx_socket, 2 );
742 //--- //memcpy( packets[0].ecb.immediate_address.address, ipx_my_node.address, 6 );
743 //--- //mzero1[3] = 1;
744 //--- //memcpy( packets[0].ipx.destination.network_id, mzero1, 4 );
745 //--- //mzero[5] = 1;
746 //--- //memcpy( packets[0].ipx.destination.node_id.address, mzero, 6 );
747 //--- //ipx_get_local_target( mzero1, mzero, immediate );
748 //--- //memcpy( packets[0].ecb.immediate_address.address, mzero, 6 );
749 //--- //memcpy( packets[0].ecb.immediate_address.address, immediate, 6 );
750 //--- //mzero[5] = 0;
753 //--- packets[0].ipx.packet_type = 1; // RIP packet
755 //--- // Fill in data to send
756 //--- packets[0].ecb.fragment_size = sizeof(ipx_header) + sizeof(rip_packet);
757 //--- assert( packets[0].ecb.fragment_size <= 576 );
759 //--- rp->operation = 0; // Request
760 //--- for (i=0;i<50; i++) {
761 //--- rp->rip[i].network = 0xFFFFFFFF;
762 //--- rp->rip[i].nhops = 0;
763 //--- rp->rip[i].nticks = 0;
767 //--- ipx_send_packet( &packets[0].ecb );
769 //--- for (i=0;i<50; i++) {
770 //--- if ( rp->rip[i].network != 0xFFFFFFFF )
771 //--- printf( "Network = %8x, Hops=%d, Ticks=%d\n", rp->rip[i].network, rp->rip[i].nhops, rp->rip[i].nticks );