home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 May / PCFMay2001.iso / Xenon / C++ / FreeCommandLineTools.exe / Include / wsipx.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-31  |  2.0 KB  |  65 lines

  1. /*
  2.  *   wsipx.h
  3.  *
  4.  *   Microsoft Windows
  5.  *   Copyright (C) Microsoft Corporation, 1992-1999.
  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*/
  35. #define _WSIPX_
  36.  
  37. #if _MSC_VER > 1000
  38. #pragma once
  39. #endif
  40.  
  41. /*
  42.  *   This is the structure of the SOCKADDR structure for IPX and SPX.
  43.  *
  44.  */
  45.  
  46. typedef struct sockaddr_ipx {
  47.     short sa_family;
  48.     char  sa_netnum[4];
  49.     char  sa_nodenum[6];
  50.     unsigned short sa_socket;
  51. } SOCKADDR_IPX, *PSOCKADDR_IPX,FAR *LPSOCKADDR_IPX;
  52.  
  53. /*
  54.  *   Protocol families used in the "protocol" parameter of the socket() API.
  55.  *
  56.  */
  57.  
  58. #define NSPROTO_IPX      1000
  59. #define NSPROTO_SPX      1256
  60. #define NSPROTO_SPXII    1257
  61.  
  62. #pragma option pop /*P_O_Pop*/
  63. #endif
  64.  
  65.