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 
  34 /* Protocol families, same as address families. */
  35 #define PF_UNIX         AF_UNIX
  36 #define PF_INET         AF_INET
  37 
  38 /* Flags we can use with send/ and recv. */
  39 #define MSG_OOB         1
  40 #define MSG_PEEK        2
  41 
  42 /* Setsockoptions(2) level. */
  43 #define SOL_SOCKET      1
  44 
  45 /* For setsockoptions(2) */
  46 #define SO_DEBUG        1
  47 #define SO_REUSEADDR    2
  48 #define SO_TYPE         3
  49 #define SO_ERROR        4
  50 #define SO_DONTROUTE    5
  51 #define SO_BROADCAST    6
  52 #define SO_SNDBUF       7
  53 #define SO_RCVBUF       8
  54 #define SO_KEEPALIVE    9
  55 #define SO_OOBINLINE    10
  56 #define SO_NO_CHECK     11
  57 #define SO_PRIORITY     12
  58 #define SO_LINGER       13
  59 
  60 /* The various priorities. */
  61 #define SOPRI_INTERACTIVE       0
  62 #define SOPRI_NORMAL            1
  63 #define SOPRI_BACKGROUND        2
  64 
  65 #endif /* _LINUX_SOCKET_H */

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