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

  1. /*******************************************************************************
  2.  *
  3.  *   wsvns.h
  4.  *
  5.  *   Windows Sockets include file for VINES IP.  This file contains all
  6.  *   standardized VINES IP information.  Include this header file after
  7.  *   winsock.h.
  8.  *
  9.  *   To open an VINES IP socket, call socket() with an address family of
  10.  *   AF_BAN, a socket type of SOCK_DGRAM, SOCK_STREAM, or SOCK_SEQPACKET, 
  11.  *   and protocol of 0.
  12.  *
  13.  ******************************************************************************/
  14.  
  15. #ifndef _WSVNS_
  16. #define _WSVNS_
  17.  
  18. /*
  19.  * Socket address, VINES IP style.  Address fields and port field are defined
  20.  * as a sequence of bytes.  This is done because they are byte ordered
  21.  * BIG ENDIAN, ala most significant byte first.
  22.  */
  23. typedef struct sockaddr_vns {
  24.     u_short sin_family;            // = AF_BAN
  25.     u_char  net_address[4];        // network address
  26.     u_char  subnet_addr[2];        // subnet address
  27.     u_char  port[2];            // msb=port[0], lsb=port[1]
  28.     u_char  hops;            // # hops for broadcasts
  29.     u_char  filler[5];            // filler, zeros
  30. } SOCKADDR_VNS, *PSOCKADDR_VNS, FAR *LPSOCKADDR_VNS;
  31.  
  32. #define VNSPROTO_IPC        1
  33. #define VNSPROTO_RELIABLE_IPC    2
  34. #define VNSPROTO_SPP        3
  35.  
  36.  
  37. #endif _WSVNS_
  38.  
  39.  
  40.