home *** CD-ROM | disk | FTP | other *** search
/ Software Recommendations - 1998 Season 1 / DNBCD4.iso / share / DOS / ipxcopy / SRC.ZIP / SRC / IPX.H < prev    next >
Encoding:
C/C++ Source or Header  |  1996-05-01  |  2.3 KB  |  74 lines

  1. /*
  2.  
  3.    IPX.H
  4.  
  5. */
  6.  
  7. struct _ipx_adr_struct
  8. {
  9.     unsigned char netadd[4];
  10.     unsigned char nodeadd[6];
  11.     unsigned short socket;
  12. };
  13. typedef struct _ipx_adr_struct ipx_adr_struct;
  14.  
  15. struct _ipx_header_struct
  16. {
  17.     unsigned short checksum;
  18.     unsigned short length;
  19.     unsigned char tc;
  20.     unsigned char type;
  21.     ipx_adr_struct dest;
  22.     ipx_adr_struct source;
  23. };
  24. typedef struct _ipx_header_struct ipx_header_struct;
  25.  
  26. /* event control block */
  27. struct _ipx_ecb_struct
  28. {
  29.     void far *linkaddress;
  30.     void (far *esraddress)();
  31.     unsigned char inuse;
  32.     unsigned char cc;
  33.     unsigned short socket;
  34.     unsigned char workspace[16];
  35.     unsigned char immedaddr[6];
  36.     unsigned short fragcount;
  37.     void far *fragaddr1;
  38.     unsigned short fragsize1;
  39.     void far *fragaddr2;
  40.     unsigned short fragsize2;
  41.     ipx_header_struct head;
  42. };
  43. typedef struct _ipx_ecb_struct ipx_ecb_struct;
  44.  
  45. unsigned short reverse_word(unsigned short);
  46.  
  47. #pragma aux reverse_word =                \
  48.    "xchg AH,AL"                           \
  49.    parm caller [AX] nomemory              \
  50.    value [AX]                             \
  51.    modify exact [AX] nomemory;
  52.  
  53.  
  54. int ipx_init(void);
  55. ipx_adr_struct far *ipx_get_local_net_number(void);
  56. int ipx_open_socket(unsigned short socket);
  57. int ipx_open_new_socket(unsigned short far *socket);
  58. void ipx_close_socket(unsigned short socket);
  59. int ipx_send_ecb(ipx_ecb_struct far *ecb);
  60. int ipx_listen_ecb(ipx_ecb_struct far *ecb);
  61. int ipx_cancel_ecb(ipx_ecb_struct far *ecb);
  62. void ipx_dispatch(void);
  63. int ipx_is_ecb_in_use(ipx_ecb_struct far *ecb);
  64. ipx_ecb_struct far *ipx_get_send_ecb(ipx_header_struct far *head, void far *data, unsigned short size);
  65. ipx_ecb_struct far *ipx_get_receive_ecb(unsigned short socket, void far *data, unsigned short size);
  66. ipx_header_struct far *ipx_get_header(ipx_adr_struct far *dest,
  67.    unsigned short dest_socket, unsigned short source_socket);
  68. ipx_ecb_struct far *ipx_fill_send_ecb(ipx_ecb_struct far *ecb,
  69.    ipx_header_struct far *head, void far *data, unsigned short size);
  70. ipx_ecb_struct far *ipx_fill_receive_ecb(ipx_ecb_struct far *ecb,
  71.    unsigned short socket, void far *data, unsigned short size);
  72. char *ipx_get_ecb_inuse_string(ipx_ecb_struct far *ecb);
  73. char *ipx_get_ecb_cc_string(ipx_ecb_struct far *ecb);
  74.