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 struct sockaddr {
   5         unsigned short sa_family;       /* address family, AF_xxx */
   6         char sa_data[14];               /* 14 bytes of protocol address */
   7 };
   8 
   9 /*
  10  * socket types
  11  */
  12 #define SOCK_STREAM     1               /* stream (connection) socket */
  13 #define SOCK_DGRAM      2               /* datagram (connectionless) socket */
  14 #define SOCK_RAW        3               /* raw socket */
  15 #define SOCK_RDM        4               /* reliably-delivered message */
  16 #define SOCK_SEQPACKET  5               /* sequential packet socket */
  17 #define SOCK_PACKET    10               /* linux specific way of getting
  18                                            packets at the dev level.  For
  19                                            writing rarp and other similiar
  20                                            things on the user level. */
  21 
  22 /*
  23  * supported address families
  24  */
  25 #define AF_UNSPEC       0
  26 #define AF_UNIX         1
  27 #define AF_INET         2
  28 
  29 /*
  30  * protocol families, same as address families
  31  */
  32 #define PF_UNIX         AF_UNIX
  33 #define PF_INET         AF_INET
  34 
  35 /* flags we can use with send/ and recv. */
  36 #define MSG_OOB         1
  37 #define MSG_PEEK        2
  38 
  39 /* ioctl's */
  40 #define FIOSETOWN       0x8901   /* the 89 is for uniqueness.
  41                                     This should be somewhere else. */
  42 #define SIOCSPGRP       0x8902
  43 #define FIOGETOWN       0x8903   /* this too. */
  44 #define SIOCGPGRP       0x8904
  45 #define SIOCATMARK      0x8905
  46 
  47 
  48 /* for setsockoptions */
  49 #define SO_DEBUG        1
  50 #define SO_REUSEADDR    2
  51 #define SO_TYPE         3
  52 #define SO_ERROR        4
  53 #define SO_DONTROUTE    5
  54 #define SO_BROADCAST    6
  55 #define SO_SNDBUF       7
  56 #define SO_RCVBUF       8
  57 #define SO_KEEPALIVE    9
  58 #define SO_OOBINLINE   10
  59 #define SO_NO_CHECK    11
  60 #define SO_PRIORITY    12
  61 #define SO_LINGER      13
  62 
  63 /* the different priorities */
  64 #define SOPRI_INTERACTIVE       0
  65 #define SOPRI_NORMAL            1
  66 #define SOPRI_BACKGROUND        2
  67 
  68 /* setsockoptions level */
  69 #define SOL_SOCKET      1
  70 
  71 #endif /* _LINUX_SOCKET_H */

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