2 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
3 SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
4 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
5 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
6 IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
7 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
8 FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
9 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
10 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
11 COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
15 * $Source: /cvs/cvsroot/d2x/arch/dos/ipx.c,v $
18 * $Date: 2001-10-19 10:46:06 $
20 * Routines for IPX communications.
22 * $Log: not supported by cvs2svn $
23 * Revision 1.2 2000/02/07 10:26:05 donut
24 * new ipx code structure reduces some redundancy and gives all arches multi netcode ability
26 * Revision 1.1.1.1 1999/06/14 21:58:22 donut
27 * Import of d1x 1.37 source.
29 * Revision 2.10 1995/03/29 17:27:55 john
30 * Added code to not duplicate broadcasts.
32 * Revision 2.9 1995/03/29 15:32:07 john
35 * Revision 2.8 1995/03/29 15:07:31 john
36 * Added network support.
38 * Revision 2.7 1995/03/29 11:22:27 john
39 * Added broadcasting over a net.
41 * Revision 2.6 1995/03/28 20:05:03 john
42 * Took away alternate server stuff.
44 * Revision 2.5 1995/03/23 19:14:29 john
45 * Added better MAX_USERS message.
47 * Revision 2.4 1995/03/23 19:00:02 john
48 * Added user list capabitly.
50 * Revision 2.3 1995/03/23 12:27:05 john
51 * Move IPX into bios lib.
53 * Revision 2.2 1995/03/22 19:08:15 john
54 * Added code to fix sending packets over router... now
55 * we just need to make broadcasts go over router!!
57 * Revision 2.1 1995/03/21 08:40:16 john
58 * Ifdef'd out the NETWORK code.
60 * Revision 2.0 1995/02/27 11:30:45 john
61 * New version 2.0, which has no anonymous unions, builds with
62 * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
64 * Revision 1.31 1995/02/16 17:35:03 john
65 * Added code to allow dynamic socket changing.
67 * Revision 1.30 1995/02/01 21:03:45 john
70 * Revision 1.29 1995/01/22 14:31:05 john
73 * Revision 1.28 1995/01/22 14:29:26 john
74 * Added code to bypass broadcast messages.
76 * Revision 1.27 1995/01/03 13:46:16 john
77 * Added code that should make ipx work over different servers,
78 * but ifdef'd it out with SHAREWARE in ipx.c. I haven't tested
79 * this, and I hope it doesn't introduce net bugs.
81 * Revision 1.26 1994/12/14 11:54:37 rob
82 * Reduce # of ipx packets.
84 * Revision 1.25 1994/12/11 00:43:28 john
85 * Locked down DOS ipx buffers... probably not necessary, tho.
87 * Revision 1.24 1994/12/08 15:49:58 rob
88 * Bumped up the # of ipx packets.
90 * Revision 1.23 1994/12/04 15:23:54 rob
91 * Reduced packet # constants.
93 * Revision 1.22 1994/11/27 23:12:39 matt
94 * Made changes for new mprintf calling convention
96 * Revision 1.21 1994/11/19 15:15:19 mike
97 * remove unused code and data
99 * Revision 1.20 1994/11/10 11:06:07 rob
100 * Raised number of ipx packets to 64 and buffers to 128 (for 8-way games)
101 * Removed (commented out) all the spx support stuff.
103 * Revision 1.19 1994/11/07 17:50:12 rob
104 * Bumped up max_packets and ipx_num_packets to double their previous
107 * Revision 1.18 1994/11/07 15:39:01 rob
108 * Removed temporary hacked ipx_send_object function.
109 * Replaced with a more general thing.
111 * Revision 1.17 1994/11/05 16:08:40 rob
112 * Made a change necessary for object syncing on rejoin.
114 * Revision 1.16 1994/11/01 15:57:12 rob
115 * Added support for SPX sockets for critical messages.
117 * Revision 1.15 1994/10/31 19:21:01 rob
118 * Added a routine for sending objects via ipx. Its a hack and shoukld
119 * be replaced by something more general time permitting.
121 * Revision 1.14 1994/10/20 14:57:42 john
124 * Revision 1.13 1994/10/20 11:22:45 john
125 * Tweaked the number of waiting packets. Added code to print
126 * total packets missed, and to limit the packet send rate to
127 * 10 packets per second unless firing.
129 * Revision 1.12 1994/10/03 20:50:11 john
130 * Started adding sound pause functions.
132 * Revision 1.11 1994/09/15 08:54:24 mike
133 * comment out a mprintf.
135 * Revision 1.10 1994/09/12 19:38:20 john
136 * Made some stuff that prints to the DOS screen go to the
137 * mono instead, since it really is debugging info.
139 * Revision 1.9 1994/09/07 13:32:03 john
140 * Made ipx_close explicitly close the socket we were using,
141 * because it seems that VLM's don't automatically close them
142 * like the older NETX stuff did (Going from Novell 3.11 driver
145 * Revision 1.8 1994/09/06 19:29:20 john
146 * Added trial version of rejoin function.
148 * Revision 1.7 1994/08/09 19:31:50 john
149 * Networking changes.
151 * Revision 1.6 1994/08/05 16:11:41 john
152 * Psuedo working version of networking.
154 * Revision 1.5 1994/08/04 19:17:21 john
155 * Inbetween version of network stuff.
157 * Revision 1.4 1994/07/29 16:08:57 john
158 * *** empty log message ***
160 * Revision 1.3 1994/07/25 12:33:31 john
161 * Network "pinging" in.
163 * Revision 1.2 1994/07/20 15:58:28 john
164 * First installment of ipx stuff.
166 * Revision 1.1 1994/07/19 15:42:00 john
177 #define _BORLAND_DOS_REGS 1
198 typedef unsigned char BYTE;
199 typedef unsigned short WORD;
200 typedef unsigned long DWORD;
202 typedef struct local_address {
204 } __pack__ local_address;
206 typedef struct net_address {
208 local_address node_id;
210 } __pack__ net_address;
212 typedef struct ipx_header {
215 BYTE transport_control;
217 net_address destination;
219 } __pack__ ipx_header;
221 typedef struct ecb_header {
225 BYTE completion_code;
227 BYTE ipx_reserved[14];
229 local_address immediate_address;
231 WORD fragment_pointer[2];
233 } __pack__ ecb_header;
235 typedef struct packet_data {
237 byte data[IPX_MAX_DATA_SIZE];
238 } __pack__ packet_data;
240 typedef struct ipx_packet {
244 } __pack__ ipx_packet;
246 static int ipx_packetnum = 0;
248 #define MAX_PACKETS 64
250 static packet_data packet_buffers[MAX_PACKETS];
251 static short packet_free_list[MAX_PACKETS];
252 static int num_packets = 0;
253 static int largest_packet_index = 0;
254 static short packet_size[MAX_PACKETS];
257 static ubyte ipx_installed=0;
258 WORD ipx_vector_segment;
259 WORD ipx_vector_offset;
260 ubyte ipx_socket_life = 0; // 0=closed at prog termination, 0xff=closed when requested.
261 //DWORD ipx_network = 0;
262 //local_address ipx_my_node;
263 #define ipx_my_node (ipx_MyAddress+4)
264 WORD ipx_num_packets=32; // 32 Ipx packets
265 ipx_packet * packets;
267 ushort ipx_packets_selector;
269 ecb_header * last_ecb=NULL;
272 static void got_new_packet( ecb_header * ecb );
273 static void ipx_listen_for_packet(ecb_header * ecb );
275 static void free_packet( int id )
277 packet_buffers[id].packetnum = -1;
278 packet_free_list[ --num_packets ] = id;
279 if (largest_packet_index==id)
280 while ((--largest_packet_index>0) && (packet_buffers[largest_packet_index].packetnum == -1 ));
283 static int ipx_dos_get_packet_data( ubyte * data )
285 int i, n, best, best_id, size;
287 for (i=1; i<ipx_num_packets; i++ ) {
288 if ( !packets[i].ecb.in_use ) {
289 got_new_packet( &packets[i].ecb );
290 packets[i].ecb.in_use = 0;
291 ipx_listen_for_packet(&packets[i].ecb);
299 for (i=0; i<=largest_packet_index; i++ ) {
300 if ( packet_buffers[i].packetnum > -1 ) {
302 if ( best == -1 || (packet_buffers[i].packetnum<best) ) {
303 best = packet_buffers[i].packetnum;
309 //mprintf( (0, "Best id = %d, pn = %d, last_ecb = %x, len=%x, ne = %d\n", best_id, best, last_ecb, lastlen, neterrors ));
310 //mprintf( (1, "<%d> ", neterrors ));
312 if ( best_id < 0 ) return 0;
314 size = packet_size[best_id];
315 memcpy( data, packet_buffers[best_id].data, size );
316 free_packet(best_id);
322 unsigned int swap_short( unsigned int short )
323 #pragma aux swap_short parm [eax] = "xchg al,ah";
325 static inline unsigned int swap_short( unsigned int sshort ) {
327 asm("xchg %%ah,%%al" : "=a" (__retval) : "a" (sshort));
332 static void got_new_packet( ecb_header * ecb )
336 unsigned short datasize;
340 p = (ipx_packet *)ecb;
342 if ( p->ecb.in_use ) { neterrors++; return; }
343 if ( p->ecb.completion_code ) { neterrors++; return; }
345 // Error( "Recieve error %d for completion code", p->ecb.completion_code );
347 if ( memcmp( &p->ipx.source.node_id, ipx_my_node, 6 ) ) {
348 datasize=swap_short(p->ipx.length);
350 datasize -= sizeof(ipx_header);
351 // Find slot to put packet in...
352 if ( datasize > 0 && datasize <= sizeof(packet_data) ) {
353 if ( num_packets >= MAX_PACKETS ) {
354 //printf( 1, "IPX: Packet buffer overrun!!!\n" );
358 id = packet_free_list[ num_packets++ ];
359 if (id > largest_packet_index ) largest_packet_index = id;
360 packet_size[id] = datasize-sizeof(int);
361 packet_buffers[id].packetnum = p->pd.packetnum;
362 if ( packet_buffers[id].packetnum < 0 ) { neterrors++; return; }
363 memcpy( packet_buffers[id].data, p->pd.data, packet_size[id] );
370 //ipx_listen_for_packet(&p->ecb);
373 /*ubyte * ipx_get_my_local_address()
375 return ipx_my_node.address;
378 ubyte * ipx_get_my_server_address()
380 return (ubyte *)&ipx_network;
383 static void ipx_listen_for_packet(ecb_header * ecb )
385 dpmi_real_regs rregs;
387 memset(&rregs,0,sizeof(dpmi_real_regs));
388 rregs.ebx = 4; // Listen For Packet function
389 rregs.esi = DPMI_real_offset(ecb);
390 rregs.es = DPMI_real_segment(ecb);
391 dpmi_real_int386x( 0x7A, &rregs );
394 /*static void ipx_cancel_listen_for_packet(ecb_header * ecb )
396 dpmi_real_regs rregs;
397 memset(&rregs,0,sizeof(dpmi_real_regs));
398 rregs.ebx = 6; // IPX Cancel event
399 rregs.esi = DPMI_real_offset(ecb);
400 rregs.es = DPMI_real_segment(ecb);
401 dpmi_real_int386x( 0x7A, &rregs );
405 static void ipx_send_packet(ecb_header * ecb )
407 dpmi_real_regs rregs;
408 memset(&rregs,0,sizeof(dpmi_real_regs));
409 rregs.ebx = 3; // Send Packet function
410 rregs.esi = DPMI_real_offset(ecb);
411 rregs.es = DPMI_real_segment(ecb);
412 dpmi_real_int386x( 0x7A, &rregs );
418 ubyte local_target[6];
419 } __pack__ net_xlat_info;
421 static void ipx_dos_get_local_target( ubyte * server, ubyte * node, ubyte * local_target )
423 net_xlat_info * info;
424 dpmi_real_regs rregs;
426 // Get dos memory for call...
427 info = (net_xlat_info *)dpmi_get_temp_low_buffer( sizeof(net_xlat_info) );
428 assert( info != NULL );
429 memcpy( info->network, server, 4 );
430 memcpy( info->node, node, 6 );
432 memset(&rregs,0,sizeof(dpmi_real_regs));
434 rregs.ebx = 2; // Get Local Target
435 rregs.es = DPMI_real_segment(info);
436 rregs.esi = DPMI_real_offset(info->network);
437 rregs.edi = DPMI_real_offset(info->local_target);
439 dpmi_real_int386x( 0x7A, &rregs );
441 // Save the local target...
442 memcpy( local_target, info->local_target, 6 );
445 static void ipx_dos_close()
447 dpmi_real_regs rregs;
448 if ( ipx_installed ) {
449 // When using VLM's instead of NETX, the sockets don't
450 // seem to automatically get closed, so we must explicitly
451 // close them at program termination.
453 memset(&rregs,0,sizeof(dpmi_real_regs));
454 rregs.edx = ipx_socket;
455 rregs.ebx = 1; // Close socket
456 dpmi_real_int386x( 0x7A, &rregs );
461 //---------------------------------------------------------------
462 // Initializes all IPX internals.
463 // If socket_number==0, then opens next available socket.
464 // Returns: 0 if successful.
465 // -1 if socket already open.
466 // -2 if socket table full.
467 // -3 if IPX not installed.
468 // -4 if couldn't allocate low dos memory
469 // -5 if error with getting internetwork address
471 static int ipx_dos_init( int socket_number )
474 dpmi_real_regs rregs;
475 ubyte *ipx_real_buffer;
478 // atexit(ipx_close);
482 // init packet buffers.
483 for (i=0; i<MAX_PACKETS; i++ ) {
484 packet_buffers[i].packetnum = -1;
485 packet_free_list[i] = i;
488 largest_packet_index = 0;
490 // Get the IPX vector
491 memset(&rregs,0,sizeof(dpmi_real_regs));
492 rregs.eax=0x00007a00;
493 dpmi_real_int386x( 0x2f, &rregs );
495 if ( (rregs.eax & 0xFF) != 0xFF ) {
498 ipx_vector_offset = rregs.edi & 0xFFFF;
499 ipx_vector_segment = rregs.es;
500 //printf( "IPX entry point at %.4x:%.4x\n", ipx_vector_segment, ipx_vector_offset );
502 // Open a socket for IPX
504 memset(&rregs,0,sizeof(dpmi_real_regs));
505 swab( (char *)&socket_number,(char *)&ipx_socket, 2 );
506 rregs.edx = ipx_socket;
507 rregs.eax = ipx_socket_life;
508 rregs.ebx = 0; // Open socket
509 dpmi_real_int386x( 0x7A, &rregs );
511 ipx_socket = rregs.edx & 0xFFFF;
513 if ( rregs.eax & 0xFF ) {
514 //mprintf( (1, "IPX error opening channel %d\n", socket_number-IPX_DEFAULT_SOCKET ));
520 // Find our internetwork address
521 ipx_real_buffer = dpmi_get_temp_low_buffer( 1024 ); // 1k block
522 if ( ipx_real_buffer == NULL ) {
523 //printf( "Error allocation realmode memory\n" );
527 memset(&rregs,0,sizeof(dpmi_real_regs));
528 rregs.ebx = 9; // Get internetwork address
529 rregs.esi = DPMI_real_offset(ipx_real_buffer);
530 rregs.es = DPMI_real_segment(ipx_real_buffer);
531 dpmi_real_int386x( 0x7A, &rregs );
533 if ( rregs.eax & 0xFF ) {
534 //printf( "Error getting internetwork address!\n" );
538 /* memcpy( &ipx_network, ipx_real_buffer, 4 );
539 memcpy( ipx_my_node, &ipx_real_buffer[4], 6 );*/
540 memcpy(ipx_MyAddress,ipx_real_buffer,10);
542 if ( show_address ) {
543 printf( "My IPX addresss is " );
544 printf( "%02X%02X%02X%02X/", ipx_real_buffer[0],ipx_real_buffer[1],ipx_real_buffer[2],ipx_real_buffer[3] );
545 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] );
549 packets = dpmi_real_malloc( sizeof(ipx_packet)*ipx_num_packets, &ipx_packets_selector );
550 if ( packets == NULL ) {
551 //printf( "Couldn't allocate real memory for %d packets\n", ipx_num_packets );
554 #if 0 /* adb: not needed, fails with cwsdpmi */
555 if (!dpmi_lock_region( packets, sizeof(ipx_packet)*ipx_num_packets )) {
556 //printf( "Couldn't lock real memory for %d packets\n", ipx_num_packets );
560 memset( packets, 0, sizeof(ipx_packet)*ipx_num_packets );
562 for (i=1; i<ipx_num_packets; i++ ) {
563 packets[i].ecb.in_use = 0x1d;
564 //packets[i].ecb.in_use = 0;
565 packets[i].ecb.socket_id = ipx_socket;
566 packets[i].ecb.fragment_count = 1;
567 packets[i].ecb.fragment_pointer[0] = DPMI_real_offset(&packets[i].ipx);
568 packets[i].ecb.fragment_pointer[1] = DPMI_real_segment(&packets[i].ipx);
569 packets[i].ecb.fragment_size = sizeof(ipx_packet)-sizeof(ecb_header); //-sizeof(ecb_header);
571 ipx_listen_for_packet(&packets[i].ecb);
574 packets[0].ecb.socket_id = ipx_socket;
575 packets[0].ecb.fragment_count = 1;
576 packets[0].ecb.fragment_pointer[0] = DPMI_real_offset(&packets[0].ipx);
577 packets[0].ecb.fragment_pointer[1] = DPMI_real_segment(&packets[0].ipx);
578 packets[0].ipx.packet_type = 4; // IPX packet
579 packets[0].ipx.destination.socket_id = ipx_socket;
580 // memcpy( packets[0].ipx.destination.network_id, &ipx_network, 4 );
581 memset( packets[0].ipx.destination.network_id, 0, 4 );
586 static void ipx_dos_send_packet_data( ubyte * data, int datasize, ubyte *network, ubyte *address, ubyte *immediate_address )
588 assert(ipx_installed);
590 if ( datasize >= IPX_MAX_DATA_SIZE ) {
591 printf( "Data too big\n" );
592 //added/replaced on 11/8/98 by Victor Rachels to stop crappage
595 //end this section replacement - VR
598 // Make sure no one is already sending something
599 while( packets[0].ecb.in_use )
603 if (packets[0].ecb.completion_code) {
604 // printf( "Send error %d for completion code\n", packets[0].ecb.completion_code );
605 //added/replaced on 11/8/98 by Victor Rachels to stop crappage
608 //end this section replacement - VR
612 // Fill in destination address
613 if ( memcmp( network, &ipx_network, 4 ) )
614 memcpy( packets[0].ipx.destination.network_id, network, 4 );
616 memset( packets[0].ipx.destination.network_id, 0, 4 );
617 memcpy( packets[0].ipx.destination.node_id.address, address, 6 );
618 memcpy( packets[0].ecb.immediate_address.address, immediate_address, 6 );
619 packets[0].pd.packetnum = ipx_packetnum++;
621 // Fill in data to send
622 packets[0].ecb.fragment_size = sizeof(ipx_header) + sizeof(int) + datasize;
624 assert( datasize > 1 );
625 assert( packets[0].ecb.fragment_size <= 576 );
627 memcpy( packets[0].pd.data, data, datasize );
630 ipx_send_packet( &packets[0].ecb );
634 /*static int ipx_change_default_socket( ushort socket_number )
638 dpmi_real_regs rregs;
640 if ( !ipx_installed ) return -3;
643 memset(&rregs,0,sizeof(dpmi_real_regs));
644 swab( (char *)&socket_number,(char *)&new_ipx_socket, 2 );
645 rregs.edx = new_ipx_socket;
646 rregs.eax = ipx_socket_life;
647 rregs.ebx = 0; // Open socket
648 dpmi_real_int386x( 0x7A, &rregs );
650 new_ipx_socket = rregs.edx & 0xFFFF;
652 if ( rregs.eax & 0xFF ) {
653 //printf( (1, "IPX error opening channel %d\n", socket_number-IPX_DEFAULT_SOCKET ));
657 for (i=1; i<ipx_num_packets; i++ ) {
658 ipx_cancel_listen_for_packet(&packets[i].ecb);
661 // Close existing socket...
662 memset(&rregs,0,sizeof(dpmi_real_regs));
663 rregs.edx = ipx_socket;
664 rregs.ebx = 1; // Close socket
665 dpmi_real_int386x( 0x7A, &rregs );
667 ipx_socket = new_ipx_socket;
669 // Repost all listen requests on the new socket...
670 for (i=1; i<ipx_num_packets; i++ ) {
671 packets[i].ecb.in_use = 0;
672 packets[i].ecb.socket_id = ipx_socket;
673 ipx_listen_for_packet(&packets[i].ecb);
676 packets[0].ecb.socket_id = ipx_socket;
677 packets[0].ipx.destination.socket_id = ipx_socket;
680 // init packet buffers.
681 for (i=0; i<MAX_PACKETS; i++ ) {
682 packet_buffers[i].packetnum = -1;
683 packet_free_list[i] = i;
686 largest_packet_index = 0;
692 struct ipx_driver ipx_dos = {
701 ipx_dos_get_local_target,
702 ipx_dos_get_packet_data,
703 ipx_dos_send_packet_data
706 struct ipx_driver * arch_ipx_set_driver(char *arg)
712 //---typedef struct rip_entry {
718 //---typedef struct rip_packet {
719 //--- ushort operation; //1=request, 2=response
720 //--- rip_entry rip[50];
724 //---void ipx_find_all_servers()
727 //--- rip_packet * rp;
728 //--- assert(ipx_installed);
730 //--- ipx_change_default_socket( 0x0453 );
731 //--- // ipx_change_default_socket( 0x5304 );
733 //--- // Make sure no one is already sending something
734 //--- while( packets[0].ecb.in_use )
738 //--- if (packets[0].ecb.completion_code) {
739 //--- printf( "AAAA:Send error %d for completion code\n", packets[0].ecb.completion_code );
743 //--- rp = (rip_packet *)&packets[0].pd;
745 //--- // Fill in destination address
747 //--- char mzero1[] = {0,0,0,1};
748 //--- char mzero[] = {0,0,0,0,0,1};
749 //--- char immediate[6];
750 //--- //memcpy( packets[0].ipx.destination.network_id, &ipx_network, 4 );
751 //--- //memcpy( packets[0].ipx.destination.node_id.address, ipx_my_node.address, 6 );
753 //--- memcpy( packets[0].ipx.destination.network_id, mzero1, 4 );
754 //--- memcpy( packets[0].ipx.destination.node_id.address, mzero, 6 );
756 //--- memcpy( packets[0].ipx.destination.socket_id, &ipx_socket, 2 );
757 //--- memcpy( packets[0].ipx.source.network_id, &ipx_network, 4 );
758 //--- memcpy( packets[0].ipx.source.node_id.address, ipx_my_node.address, 6 );
759 //--- memcpy( packets[0].ipx.source.socket_id, &ipx_socket, 2 );
760 //--- //memcpy( packets[0].ecb.immediate_address.address, ipx_my_node.address, 6 );
761 //--- //mzero1[3] = 1;
762 //--- //memcpy( packets[0].ipx.destination.network_id, mzero1, 4 );
763 //--- //mzero[5] = 1;
764 //--- //memcpy( packets[0].ipx.destination.node_id.address, mzero, 6 );
765 //--- //ipx_get_local_target( mzero1, mzero, immediate );
766 //--- //memcpy( packets[0].ecb.immediate_address.address, mzero, 6 );
767 //--- //memcpy( packets[0].ecb.immediate_address.address, immediate, 6 );
768 //--- //mzero[5] = 0;
771 //--- packets[0].ipx.packet_type = 1; // RIP packet
773 //--- // Fill in data to send
774 //--- packets[0].ecb.fragment_size = sizeof(ipx_header) + sizeof(rip_packet);
775 //--- assert( packets[0].ecb.fragment_size <= 576 );
777 //--- rp->operation = 0; // Request
778 //--- for (i=0;i<50; i++) {
779 //--- rp->rip[i].network = 0xFFFFFFFF;
780 //--- rp->rip[i].nhops = 0;
781 //--- rp->rip[i].nticks = 0;
785 //--- ipx_send_packet( &packets[0].ecb );
787 //--- for (i=0;i<50; i++) {
788 //--- if ( rp->rip[i].network != 0xFFFFFFFF )
789 //--- printf( "Network = %8x, Hops=%d, Ticks=%d\n", rp->rip[i].network, rp->rip[i].nhops, rp->rip[i].nticks );