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

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