Version:  2.0.40 2.2.26 2.4.37 3.13 3.14 3.15 3.16 3.17 3.18 3.19 4.0 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 4.10

Linux/include/linux/socket.h

  1 #ifndef _LINUX_SOCKET_H
  2 #define _LINUX_SOCKET_H
  3 
  4 
  5 #include <asm/socket.h>                 /* arch-dependent defines       */
  6 #include <linux/sockios.h>              /* the SIOCxxx I/O controls     */
  7 #include <linux/uio.h>                  /* iovec support                */
  8 #include <linux/types.h>                /* pid_t                        */
  9 #include <linux/compiler.h>             /* __user                       */
 10 #include <uapi/linux/socket.h>
 11 
 12 struct pid;
 13 struct cred;
 14 
 15 #define __sockaddr_check_size(size)     \
 16         BUILD_BUG_ON(((size) > sizeof(struct __kernel_sockaddr_storage)))
 17 
 18 #ifdef CONFIG_PROC_FS
 19 struct seq_file;
 20 extern void socket_seq_show(struct seq_file *seq);
 21 #endif
 22 
 23 typedef __kernel_sa_family_t    sa_family_t;
 24 
 25 /*
 26  *      1003.1g requires sa_family_t and that sa_data is char.
 27  */
 28  
 29 struct sockaddr {
 30         sa_family_t     sa_family;      /* address family, AF_xxx       */
 31         char            sa_data[14];    /* 14 bytes of protocol address */
 32 };
 33 
 34 struct linger {
 35         int             l_onoff;        /* Linger active                */
 36         int             l_linger;       /* How long to linger for       */
 37 };
 38 
 39 #define sockaddr_storage __kernel_sockaddr_storage
 40 
 41 /*
 42  *      As we do 4.4BSD message passing we use a 4.4BSD message passing
 43  *      system, not 4.3. Thus msg_accrights(len) are now missing. They
 44  *      belong in an obscure libc emulation or the bin.
 45  */
 46  
 47 struct msghdr {
 48         void            *msg_name;      /* ptr to socket address s