root/include/linux/socket.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 #ifndef _LINUX_SOCKET_H
   2 #define _LINUX_SOCKET_H
   3 
   4 #include <linux/sockios.h>              /* the SIOCxxx I/O controls     */
   5 
   6 
   7 struct sockaddr {
   8   unsigned short        sa_family;      /* address family, AF_xxx       */
   9   char                  sa_data[14];    /* 14 bytes of protocol address */
  10 };
  11 
  12 struct linger {
  13   int                   l_onoff;        /* Linger active                */
  14   int                   l_linger;       /* How long to linger for       */
  15 };
  16 
  17 /* Socket types. */
  18 #define SOCK_STREAM     1               /* stream (connection) socket   */
  19 #define SOCK_DGRAM      2               /* datagram (conn.less) socket  */
  20 #define SOCK_RAW        3               /* raw socket                   */
  21 #define SOCK_RDM        4               /* reliably-delivered message   */
  22 #define SOCK_SEQPACKET  5               /* sequential packet socket     */
  23 #define SOCK_PACKET     10              /* linux specific way of        */
  24                                         /* getting packets at the dev   */
  25                                         /* level.  For writing rarp and */
  26                                         /* other similiar things on the */
  27                                         /* user level.                  */
  28 
  29 /* Supported address families. */
  30 #define AF_UNSPEC       0
  31 #define AF_UNIX         1
  32 #define AF_INET         2
  33 #define AF_AX25         3
  34 #define AF_IPX          4
  35 
  36 /* Protocol families, same as address families. */
  37 #define PF_UNIX         AF_UNIX
  38 #define PF_INET         AF_INET
  39 #define PF_AX25         AF_AX25
  40 #define PF_IPX          AF_IPX
  41 
  42 /* Flags we can use with send/ and recv. */
  43 #define MSG_OOB         1
  44 #define MSG_PEEK        2
  45 #define MSG_DONTROUTE   4
  46 
  47 /* Setsockoptions(2) level. Thanks to BSD these must match IPPROTO_xxx */
  48 #define SOL_SOCKET      1
  49 #define SOL_IP          0
  50 #define SOL_IPX         256
  51 #define SOL_AX25        257
  52 #define SOL_TCP         6
  53 #define SOL_UDP         17
  54 
  55 /* For setsockoptions(2) */
  56 #define SO_DEBUG        1
  57 #define SO_REUSEADDR    2
  58 #define SO_TYPE         3
  59 #define SO_ERROR        4
  60 #define SO_DONTROUTE    5
  61 #define SO_BROADCAST    6
  62 #define SO_SNDBUF       7
  63 #define SO_RCVBUF       8
  64 #define SO_KEEPALIVE    9
  65 #define SO_OOBINLINE    10
  66 #define SO_NO_CHECK     11
  67 #define SO_PRIORITY     12
  68 #define SO_LINGER       13
  69 
  70 /* IP options */
  71 #define IP_TOS          1
  72 #define IPTOS_LOWDELAY          0x10
  73 #define IPTOS_THROUGHPUT        0x08
  74 #define IPTOS_RELIABILITY       0x04
  75 #define IP_TTL          2
  76 
  77 /* IPX options */
  78 #define IPX_TYPE        1
  79 
  80 /* AX.25 options */
  81 #define AX25_WINDOW     1
  82 
  83 /* TCP options - this way around because someone left a set in the c library includes */
  84 #define TCP_NODELAY     1
  85 #define TCP_MAXSEG      2
  86 
  87 /* The various priorities. */
  88 #define SOPRI_INTERACTIVE       0
  89 #define SOPRI_NORMAL            1
  90 #define SOPRI_BACKGROUND        2
  91 
  92 #endif /* _LINUX_SOCKET_H */

/* [previous][next][first][last][top][bottom][index][help] */