home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 2000 May / PCP163A.iso / Runimage / Cbuilder4 / Include / WSIPX.H < prev    next >
Encoding:
C/C++ Source or Header  |  1999-01-26  |  2.0 KB  |  61 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. #pragma option push -b -a8 -pc -A- /*P_O_Push_S*/
  35. #define _WSIPX_
  36.  
  37. /*
  38.  *   This is the structure of the SOCKADDR structure for IPX and SPX.
  39.  *
  40.  */
  41.  
  42. typedef struct sockaddr_ipx {
  43.     short sa_family;
  44.     char  sa_netnum[4];
  45.     char  sa_nodenum[6];
  46.     unsigned short sa_socket;
  47. } SOCKADDR_IPX, *PSOCKADDR_IPX,FAR *LPSOCKADDR_IPX;
  48.  
  49. /*
  50.  *   Protocol families used in the "protocol" parameter of the socket() API.
  51.  *
  52.  */
  53.  
  54. #define NSPROTO_IPX      1000
  55. #define NSPROTO_SPX      1256
  56. #define NSPROTO_SPXII    1257
  57.  
  58. #pragma option pop /*P_O_Pop*/
  59. #endif
  60.  
  61.