home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume14 / sharedmem / part01 / stream / inet.h next >
Encoding:
C/C++ Source or Header  |  1988-05-17  |  417 b   |  18 lines

  1. #define TRUE        1
  2. #define FALSE        0
  3.  
  4. #define PORT_TYPE_NAME        1
  5. #define PORT_TYPE_NUMBER    2
  6.  
  7. #define PORT_NAME(name)        PORT_TYPE_NAME,name,(u_short)0
  8. #define PORT_NUMBER(number)    PORT_TYPE_NUMBER,0,(u_short)number
  9.  
  10. /* sockettypes are SOCKET_STREAM and SOCKET_DGRAM */
  11.  
  12. #define DATAGRAM_FLAGS    0        /* for recv and sendto */
  13.  
  14. #define SERVER        1
  15. #define CLIENT        2
  16. #define server        (role == SERVER)
  17. #define client        (role == CLIENT)
  18.