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 <asm/socket.h>                 /* arch-dependent defines       */
   5 #include <linux/sockios.h>              /* the SIOCxxx I/O controls     */
   6 
   7 
   8 struct sockaddr {
   9   unsigned short        sa_family;      /* address family, AF_xxx       */
  10   char                  sa_data[14];    /* 14 bytes of protocol address */
  11 };
  12 
  13 struct linger {
  14   int                   l_onoff;        /* Linger active                */
  15   int                   l_linger;       /* How long to linger for       */
  16 };
  17 
  18 /* Socket types. */
  19 #define SOCK_STREAM     1               /* stream (connection) socket   */
  20 #define SOCK_DGRAM      2               /* datagram (conn.less) socket  */
  21 #define SOCK_RAW        3               /* raw socket                   */
  22 #define SOCK_RDM        4               /* reliably-delivered message   */
  23 #define SOCK_SEQPACKET  5               /* sequential packet socket     */
  24 #define SOCK_PACKET     10              /* linux specific way of        */
  25                                         /* getting packets at the dev   */
  26                                         /* level.  For writing rarp and */
  27                                         /* other similar things on the  */
  28                                         /* user level.                  */
  29 
  30 /* Supported address families. */
  31 #define AF_UNSPEC       0
  32 #define AF_UNIX         1       /* Unix domain sockets          */
  33 #define AF_INET         2       /* Internet IP Protocol         */
  34 #define AF_AX25         3       /* Amateur Radio AX.25          */
  35 #define AF_IPX          4       /* Novell IPX                   */
  36 #define AF_APPLETALK    5       /* Appletalk DDP                */
  37 #define AF_NETROM       6       /* Amateur radio NetROM         */
  38 #define AF_BRIDGE       7       /* Multiprotocol bridge         */
  39 #define AF_AAL5         8       /* Reserved for Werner's ATM    */
  40 #define AF_X25          9       /* Reserved for X.25 project    */
  41 #define AF_MAX          12      /* For now.. */
  42 
  43 /* Protocol families, same as address families. */
  44 #define PF_UNSPEC       AF_UNSPEC
  45 #define PF_UNIX         AF_UNIX
  46 #define PF_INET         AF_INET
  47 #define PF_AX25         AF_AX25
  48 #define PF_IPX          AF_IPX
  49 #define PF_APPLETALK    AF_APPLETALK
  50 #define PF_NETROM       AF_NETROM
  51 #define PF_BRIDGE       AF_BRIDGE
  52 #define PF_AAL5         AF_AAL5
  53 #define PF_X25          AF_X25
  54 
  55 #define PF_MAX          AF_MAX
  56 
  57 /* Flags we can use with send/ and recv. */
  58 #define MSG_OOB         1
  59 #define MSG_PEEK        2
  60 #define MSG_DONTROUTE   4
  61 
  62 /* Setsockoptions(2) level. Thanks to BSD these must match IPPROTO_xxx */
  63 #define SOL_IP          0
  64 #define SOL_IPX         256
  65 #define SOL_AX25        257
  66 #define SOL_ATALK       258
  67 #define SOL_NETROM      259
  68 #define SOL_TCP         6
  69 #define SOL_UDP         17
  70 
  71 /* IP options */
  72 #define IP_TOS          1
  73 #define IPTOS_LOWDELAY          0x10
  74 #define IPTOS_THROUGHPUT        0x08
  75 #define IPTOS_RELIABILITY       0x04
  76 #define IP_TTL          2
  77 #ifdef V1_3_WILL_DO_THIS_FUNKY_STUFF
  78 #define IP_HRDINCL      3
  79 #define IP_OPTIONS      4
  80 #endif
  81 
  82 #define IP_MULTICAST_IF                 32
  83 #define IP_MULTICAST_TTL                33
  84 #define IP_MULTICAST_LOOP               34
  85 #define IP_ADD_MEMBERSHIP               35
  86 #define IP_DROP_MEMBERSHIP              36
  87 
  88 
  89 /* These need to appear somewhere around here */
  90 #define IP_DEFAULT_MULTICAST_TTL        1
  91 #define IP_DEFAULT_MULTICAST_LOOP       1
  92 #define IP_MAX_MEMBERSHIPS              20
  93  
  94 /* IPX options */
  95 #define IPX_TYPE        1
  96 
  97 /* TCP options - this way around because someone left a set in the c library includes */
  98 #define TCP_NODELAY     1
  99 #define TCP_MAXSEG      2
 100 
 101 /* The various priorities. */
 102 #define SOPRI_INTERACTIVE       0
 103 #define SOPRI_NORMAL            1
 104 #define SOPRI_BACKGROUND        2
 105 
 106 #endif /* _LINUX_SOCKET_H */

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