home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / wsipx.h < prev    next >
C/C++ Source or Header  |  1998-04-25  |  2KB  |  59 lines

  1. /*
  2.  *   wsipx.h
  3.  *
  4.  *   Microsoft Windows
  5.  *   Copyright (C) Microsoft Corporation, 1992-1997.
  6.  *
  7.  *   Windows Sockets include file for IPX/SPX.  This file contains all
  8.  *   standardized IPX/SPX information.  Include this header file after
  9.  *   winsock.h.
  10.  *
  11.  *   To open an IPX socket, call socket() with an address family of
  12.  *   AF_IPX, a socket type of SOCK_DGRAM, and protocol NSPROTO_IPX.
  13.  *   Note that the protocol value must be specified, it cannot be 0.
  14.  *   All IPX packets are sent with the packet type field of the IPX
  15.  *   header set to 0.
  16.  *
  17.  *   To open an SPX or SPXII socket, call socket() with an address
  18.  *   family of AF_IPX, socket type of SOCK_SEQPACKET or SOCK_STREAM,
  19.  *   and protocol of NSPROTO_SPX or NSPROTO_SPXII.  If SOCK_SEQPACKET
  20.  *   is specified, then the end of message bit is respected, and
  21.  *   recv() calls are not completed until a packet is received with
  22.  *   the end of message bit set.  If SOCK_STREAM is specified, then
  23.  *   the end of message bit is not respected, and recv() completes
  24.  *   as soon as any data is received, regardless of the setting of the
  25.  *   end of message bit.  Send coalescing is never performed, and sends
  26.  *   smaller than a single packet are always sent with the end of
  27.  *   message bit set.  Sends larger than a single packet are packetized
  28.  *   with the end of message bit set on only the last packet of the
  29.  *   send.
  30.  *
  31.  */
  32.  
  33. #ifndef _WSIPX_
  34. #define _WSIPX_
  35.  
  36. /*
  37.  *   This is the structure of the SOCKADDR structure for IPX and SPX.
  38.  *
  39.  */
  40.  
  41. typedef struct sockaddr_ipx {
  42.     short sa_family;
  43.     char  sa_netnum[4];
  44.     char  sa_nodenum[6];
  45.     unsigned short sa_socket;
  46. } SOCKADDR_IPX, *PSOCKADDR_IPX,FAR *LPSOCKADDR_IPX;
  47.  
  48. /*
  49.  *   Protocol families used in the "protocol" parameter of the socket() API.
  50.  *
  51.  */
  52.  
  53. #define NSPROTO_IPX      1000
  54. #define NSPROTO_SPX      1256
  55. #define NSPROTO_SPXII    1257
  56.  
  57. #endif
  58.  
  59.