]> icculus.org git repositories - btb/d2x.git/blob - unused/bios/ipx.h
More header unification...
[btb/d2x.git] / unused / bios / ipx.h
1 /*
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-1999 PARALLAX SOFTWARE CORPORATION.  ALL RIGHTS RESERVED.
12 */
13
14 #ifndef _IPX_H
15 #define _IPX_H
16                                                                                                         
17 //---------------------------------------------------------------
18 // Initializes all IPX internals. 
19 // If socket_number==0, then opens next available socket.
20 // Returns:     0  if successful.
21 //                              -1 if socket already open.
22 //                              -2      if socket table full.
23 //                              -3 if IPX not installed.
24 //                              -4 if couldn't allocate low dos memory
25 //                              -5 if error with getting internetwork address
26 extern int ipx_init( int socket_number, int show_address );
27
28 extern int ipx_change_default_socket( ushort socket_number );
29
30 // Returns a pointer to 6-byte address
31 extern ubyte * ipx_get_my_local_address();
32 // Returns a pointer to 4-byte server
33 extern ubyte * ipx_get_my_server_address();
34
35 // Determines the local address equivalent of an internetwork address.
36 void ipx_get_local_target( ubyte * server, ubyte * node, ubyte * local_target );
37
38 // If any packets waiting to be read in, this fills data in with the packet data and returns
39 // the number of bytes read.  Else returns 0 if no packets waiting.
40 extern int ipx_get_packet_data( ubyte * data );
41
42 // Sends a broadcast packet to everyone on this socket.
43 extern void ipx_send_broadcast_packet_data( ubyte * data, int datasize );
44
45 // Sends a packet to a certain address
46 extern void ipx_send_packet_data( ubyte * data, int datasize, ubyte *network, ubyte *address, ubyte *immediate_address );
47 extern void ipx_send_internetwork_packet_data( ubyte * data, int datasize, ubyte * server, ubyte *address );
48
49 #define IPX_MAX_DATA_SIZE (542)         //(546-4)
50
51 extern void ipx_read_user_file(char * filename);
52 extern void ipx_read_network_file(char * filename);
53
54 #endif
55