Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

linux/socket.h File Reference

#include <asm/socket.h>
#include <linux/sockios.h>
#include <linux/uio.h>
#include <linux/types.h>

Include dependency graph for linux/socket.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define __CMSG_NXTHDR(ctl, len, cmsg)   __cmsg_nxthdr((ctl),(len),(cmsg))
#define CMSG_NXTHDR(mhdr, cmsg)   cmsg_nxthdr((mhdr), (cmsg))
#define CMSG_ALIGN(len)   ( ((len)+sizeof(long)-1) & ~(sizeof(long)-1) )
#define CMSG_DATA(cmsg)   ((void *)((char *)(cmsg) + CMSG_ALIGN(sizeof(struct cmsghdr))))
#define CMSG_SPACE(len)   (CMSG_ALIGN(sizeof(struct cmsghdr)) + CMSG_ALIGN(len))
#define CMSG_LEN(len)   (CMSG_ALIGN(sizeof(struct cmsghdr)) + (len))
#define __CMSG_FIRSTHDR(ctl, len)
#define CMSG_FIRSTHDR(msg)   __CMSG_FIRSTHDR((msg)->msg_control, (msg)->msg_controllen)
#define __KINLINE   static
#define SCM_RIGHTS   0x01
#define SCM_CREDENTIALS   0x02
#define SCM_CONNECT   0x03
#define AF_UNSPEC   0
#define AF_UNIX   1
#define AF_LOCAL   1
#define AF_INET   2
#define AF_AX25   3
#define AF_IPX   4
#define AF_APPLETALK   5
#define AF_NETROM   6
#define AF_BRIDGE   7
#define AF_ATMPVC   8
#define AF_X25   9
#define AF_INET6   10
#define AF_ROSE   11
#define AF_DECnet   12
#define AF_NETBEUI   13
#define AF_SECURITY   14
#define AF_KEY   15
#define AF_NETLINK   16
#define AF_ROUTE   AF_NETLINK
#define AF_PACKET   17
#define AF_ASH   18
#define AF_ECONET   19
#define AF_ATMSVC   20
#define AF_SNA   22
#define AF_IRDA   23
#define AF_MAX   32
#define PF_UNSPEC   AF_UNSPEC
#define PF_UNIX   AF_UNIX
#define PF_LOCAL   AF_LOCAL
#define PF_INET   AF_INET
#define PF_AX25   AF_AX25
#define PF_IPX   AF_IPX
#define PF_APPLETALK   AF_APPLETALK
#define PF_NETROM   AF_NETROM
#define PF_BRIDGE   AF_BRIDGE
#define PF_ATMPVC   AF_ATMPVC
#define PF_X25   AF_X25
#define PF_INET6   AF_INET6
#define PF_ROSE   AF_ROSE
#define PF_DECnet   AF_DECnet
#define PF_NETBEUI   AF_NETBEUI
#define PF_SECURITY   AF_SECURITY
#define PF_KEY   AF_KEY
#define PF_NETLINK   AF_NETLINK
#define PF_ROUTE   AF_ROUTE
#define PF_PACKET   AF_PACKET
#define PF_ASH   AF_ASH
#define PF_ECONET   AF_ECONET
#define PF_ATMSVC   AF_ATMSVC
#define PF_SNA   AF_SNA
#define PF_IRDA   AF_IRDA
#define PF_MAX   AF_MAX
#define SOMAXCONN   128
#define MSG_OOB   1
#define MSG_PEEK   2
#define MSG_DONTROUTE   4
#define MSG_TRYHARD   4
#define MSG_CTRUNC   8
#define MSG_PROXY   0x10
#define MSG_TRUNC   0x20
#define MSG_DONTWAIT   0x40
#define MSG_EOR   0x80
#define MSG_WAITALL   0x100
#define MSG_FIN   0x200
#define MSG_SYN   0x400
#define MSG_URG   0x800
#define MSG_RST   0x1000
#define MSG_ERRQUEUE   0x2000
#define MSG_NOSIGNAL   0x4000
#define MSG_CTLIGNORE   0x80000000
#define MSG_EOF   MSG_FIN
#define MSG_CTLFLAGS   (MSG_OOB|MSG_URG|MSG_FIN|MSG_SYN|MSG_RST)
#define SOL_IP   0
#define SOL_TCP   6
#define SOL_UDP   17
#define SOL_IPV6   41
#define SOL_ICMPV6   58
#define SOL_RAW   255
#define SOL_IPX   256
#define SOL_AX25   257
#define SOL_ATALK   258
#define SOL_NETROM   259
#define SOL_ROSE   260
#define SOL_DECNET   261
#define SOL_X25   262
#define SOL_PACKET   263
#define SOL_ATM   264
#define SOL_AAL   265
#define SOL_IRDA   266
#define IPX_TYPE   1
#define TCP_NODELAY   1
#define TCP_MAXSEG   2
#define TCP_CORK   3
#define SOCK_STREAM   1
#define SOCK_DGRAM   2
#define SOCK_RAW   3
#define SOCK_RDM   4
#define SOCK_SEQPACKET   5
#define SOCK_PACKET   10

Typedefs

typedef unsigned short sa_family_t

Functions

__KINLINE struct cmsghdr__cmsg_nxthdr (void *__ctl, __kernel_size_t __size, struct cmsghdr *__cmsg)
__KINLINE struct cmsghdrcmsg_nxthdr (struct msghdr *__msg, struct cmsghdr *__cmsg)


Define Documentation

#define __CMSG_FIRSTHDR ctl,
len   ) 
 

Value:

((len) >= sizeof(struct cmsghdr) ? \
                                  (struct cmsghdr *)(ctl) : \
                                  (struct cmsghdr *)NULL)

Definition at line 69 of file linux/socket.h.

#define __CMSG_NXTHDR ctl,
len,
cmsg   )     __cmsg_nxthdr((ctl),(len),(cmsg))
 

Definition at line 60 of file linux/socket.h.

#define __KINLINE   static
 

Definition at line 85 of file linux/socket.h.

#define AF_APPLETALK   5
 

Definition at line 139 of file linux/socket.h.

#define AF_ASH   18
 

Definition at line 153 of file linux/socket.h.

#define AF_ATMPVC   8
 

Definition at line 142 of file linux/socket.h.

#define AF_ATMSVC   20
 

Definition at line 155 of file linux/socket.h.

#define AF_AX25   3
 

Definition at line 137 of file linux/socket.h.

#define AF_BRIDGE   7
 

Definition at line 141 of file linux/socket.h.

#define AF_DECnet   12
 

Definition at line 146 of file linux/socket.h.

#define AF_ECONET   19
 

Definition at line 154 of file linux/socket.h.

Referenced by ec_dev_ioctl(), econet_bind(), econet_getname(), and tx_result().

#define AF_INET   2
 

Definition at line 136 of file linux/socket.h.

Referenced by __initfunc(), arp_ioctl(), create_listening_masq(), devinet_ioctl(), econet_sendmsg(), fib_convert_rtentry(), hostess_neigh_setup_dev(), if_init(), inet_getname(), inet_gifconf(), ip_recv_error(), nfsctl_getfd(), nfsctl_getfh(), nsm_create(), process_ARP(), process_route(), rarp_ioctl(), rarp_req_get(), rarp_req_set(), raw_recvmsg(), raw_sendmsg(), read_info(), remove_route(), rpc_register(), sealevel_neigh_setup_dev(), set_sockaddr(), shaper_neigh_setup_dev(), socksys_open(), sunos_nfs_get_server_fd(), sunos_nfs_mount(), svc_makesock(), svc_udp_recvfrom(), tcp_v4_connect(), tcp_v4_sendmsg(), tcp_v6_connect(), udp_connect(), udp_recvmsg(), udp_sendmsg(), udpv6_connect(), udpv6_sendmsg(), v4_addr2sockaddr(), and xprt_bindresvport().

#define AF_INET6   10
 

Definition at line 144 of file linux/socket.h.

Referenced by inet6_getname(), ipv6_recv_error(), rawv6_recvmsg(), rawv6_sendmsg(), routing_ioctl(), tcp_v6_connect(), tcp_v6_sendmsg(), udpv6_connect(), udpv6_recvmsg(), udpv6_sendmsg(), and v6_addr2sockaddr().

#define AF_IPX   4
 

Definition at line 138 of file linux/socket.h.

#define AF_IRDA   23
 

Definition at line 157 of file linux/socket.h.

Referenced by irda_getname().

#define AF_KEY   15
 

Definition at line 149 of file linux/socket.h.

#define AF_LOCAL   1
 

Definition at line 135 of file linux/socket.h.

#define AF_MAX   32
 

Definition at line 158 of file linux/socket.h.

#define AF_NETBEUI   13
 

Definition at line 147 of file linux/socket.h.

#define AF_NETLINK   16
 

Definition at line 150 of file linux/socket.h.

Referenced by netlink_bind(), netlink_connect(), netlink_getname(), netlink_open(), netlink_recvmsg(), and netlink_sendmsg().

#define AF_NETROM   6
 

Definition at line 140 of file linux/socket.h.

#define AF_PACKET   17
 

Definition at line 152 of file linux/socket.h.

Referenced by packet_bind(), packet_getname(), packet_getname_spkt(), and packet_rcv().

#define AF_ROSE   11
 

Definition at line 145 of file linux/socket.h.

#define AF_ROUTE   AF_NETLINK
 

Definition at line 151 of file linux/socket.h.

#define AF_SECURITY   14
 

Definition at line 148 of file linux/socket.h.

#define AF_SNA   22
 

Definition at line 156 of file linux/socket.h.

#define AF_UNIX   1
 

Definition at line 134 of file linux/socket.h.

Referenced by socksys_open(), unix_autobind(), unix_bind(), unix_getname(), and unix_mkname().

#define AF_UNSPEC   0
 

Definition at line 133 of file linux/socket.h.

Referenced by dev_ifsioc(), ip_recv_error(), ipv6_recv_error(), netlink_connect(), udp_connect(), and unix_dgram_connect().

#define AF_X25   9
 

Definition at line 143 of file linux/socket.h.

#define CMSG_ALIGN len   )     ( ((len)+sizeof(long)-1) & ~(sizeof(long)-1) )
 

Definition at line 63 of file linux/socket.h.

Referenced by __cmsg_nxthdr(), cmsg32_recvmsg_fixup(), cmsghdr_from_user32_to_kern(), fl_create(), ip_cmsg_send(), and scm_fp_copy().

#define CMSG_DATA cmsg   )     ((void *)((char *)(cmsg) + CMSG_ALIGN(sizeof(struct cmsghdr))))
 

Definition at line 65 of file linux/socket.h.

Referenced by __scm_send(), cmsg32_recvmsg_fixup(), cmsghdr_from_user32_to_kern(), datagram_send_ctl(), ip_cmsg_send(), put_cmsg(), scm_detach_fds(), and scm_fp_copy().

#define CMSG_FIRSTHDR msg   )     __CMSG_FIRSTHDR((msg)->msg_control, (msg)->msg_controllen)
 

Definition at line 72 of file linux/socket.h.

Referenced by __scm_send(), datagram_send_ctl(), and ip_cmsg_send().

#define CMSG_LEN len   )     (CMSG_ALIGN(sizeof(struct cmsghdr)) + (len))
 

Definition at line 67 of file linux/socket.h.

Referenced by __scm_send(), datagram_send_ctl(), ip_cmsg_send(), put_cmsg(), and scm_detach_fds().

#define CMSG_NXTHDR mhdr,
cmsg   )     cmsg_nxthdr((mhdr), (cmsg))
 

Definition at line 61 of file linux/socket.h.

Referenced by __scm_send(), datagram_send_ctl(), and ip_cmsg_send().

#define CMSG_SPACE len   )     (CMSG_ALIGN(sizeof(struct cmsghdr)) + CMSG_ALIGN(len))
 

Definition at line 66 of file linux/socket.h.

Referenced by put_cmsg(), and scm_detach_fds().

#define IPX_TYPE   1
 

Definition at line 240 of file linux/socket.h.

#define MSG_CTLFLAGS   (MSG_OOB|MSG_URG|MSG_FIN|MSG_SYN|MSG_RST)
 

Definition at line 216 of file linux/socket.h.

Referenced by __scm_send().

#define MSG_CTLIGNORE   0x80000000
 

Definition at line 213 of file linux/socket.h.

#define MSG_CTRUNC   8
 

Definition at line 200 of file linux/socket.h.

Referenced by ip_cmsg_recv_retopts(), linux_to_solaris_msgflags(), put_cmsg(), put_cmsg32(), scm_detach_fds(), scm_detach_fds32(), scm_recv(), solaris_to_linux_msgflags(), and sys32_recvmsg().

#define MSG_DONTROUTE   4
 

Definition at line 198 of file linux/socket.h.

Referenced by linux_to_solaris_msgflags(), raw_sendmsg(), rawv6_sendmsg(), solaris_to_linux_msgflags(), tcp_v4_sendmsg(), tcp_v6_sendmsg(), udp_sendmsg(), and udpv6_sendmsg().

#define MSG_DONTWAIT   0x40
 

Definition at line 203 of file linux/socket.h.

Referenced by do_ncp_rpc_call(), econet_recvmsg(), econet_sendmsg(), ethertap_start_xmit(), icmp_reply(), icmp_send(), icmpv6_echo_reply(), icmpv6_send(), inet_recvmsg(), ip6_build_xmit(), ip6_frag_xmit(), ip_build_xmit(), ip_build_xmit_slow(), ip_send_reply(), ipmr_cache_delete(), ipmr_cache_resolve(), irda_recvmsg_dgram(), irda_recvmsg_stream(), irda_sendmsg(), irda_sendmsg_dgram(), linux_to_solaris_msgflags(), netlink_ack(), netlink_read(), netlink_recvmsg(), netlink_sendmsg(), packet_recvmsg(), packet_sendmsg(), packet_sendmsg_spkt(), raw_sendmsg(), rawv6_sendmsg(), smb_data_callback(), sock_read(), sock_readv_writev(), sock_write(), solaris_recvmsg(), solaris_sendmsg(), solaris_to_linux_msgflags(), svc_recvfrom(), svc_sendto(), sys32_recvmsg(), sys32_sendmsg(), sys_recvfrom(), sys_recvmsg(), sys_sendmsg(), sys_sendto(), tcp_do_sendmsg(), tcp_v4_sendmsg(), tcp_v6_sendmsg(), udp_recvmsg(), udp_sendmsg(), udpv6_recvmsg(), udpv6_sendmsg(), unix_dgram_recvmsg(), unix_dgram_sendmsg(), unix_stream_recvmsg(), unix_stream_sendmsg(), wait_for_tcp_connect(), xprt_recvmsg(), and xprt_sendmsg().

#define MSG_EOF   MSG_FIN
 

Definition at line 215 of file linux/socket.h.

#define MSG_EOR   0x80
 

Definition at line 204 of file linux/socket.h.

Referenced by linux_to_solaris_msgflags(), and solaris_to_linux_msgflags().

#define MSG_ERRQUEUE   0x2000
 

Definition at line 210 of file linux/socket.h.

Referenced by ip_recv_error(), ipv6_recv_error(), netlink_sendmsg(), raw_recvmsg(), rawv6_recvmsg(), udp_recvmsg(), and udpv6_recvmsg().

#define MSG_FIN   0x200
 

Definition at line 206 of file linux/socket.h.

#define MSG_NOSIGNAL   0x4000
 

Definition at line 211 of file linux/socket.h.

Referenced by inet_sendmsg(), netlink_sendmsg(), tcp_do_sendmsg(), tcp_v4_sendmsg(), tcp_v6_sendmsg(), udp_sendmsg(), unix_dgram_sendmsg(), unix_stream_sendmsg(), wait_for_tcp_connect(), xprt_recvmsg(), and xprt_sendmsg().

#define MSG_OOB   1
 

Definition at line 196 of file linux/socket.h.

Referenced by irda_recvmsg_stream(), linux_to_solaris_msgflags(), netlink_recvmsg(), netlink_sendmsg(), raw_recvmsg(), raw_sendmsg(), rawv6_recvmsg(), rawv6_sendmsg(), solaris_to_linux_msgflags(), tcp_do_sendmsg(), tcp_recv_urg(), tcp_recvmsg(), tcp_v4_sendmsg(), tcp_v6_sendmsg(), udp_sendmsg(), unix_dgram_recvmsg(), unix_dgram_sendmsg(), unix_stream_recvmsg(), and unix_stream_sendmsg().

#define MSG_PEEK   2
 

Definition at line 197 of file linux/socket.h.

Referenced by do_ncp_rpc_call(), irda_recvmsg_stream(), linux_to_solaris_msgflags(), netlink_recvmsg(), skb_recv_datagram(), smb_data_callback(), solaris_to_linux_msgflags(), tcp_recv_urg(), tcp_recvmsg(), unix_dgram_recvmsg(), and unix_stream_recvmsg().

#define MSG_PROXY   0x10
 

Definition at line 201 of file linux/socket.h.

Referenced by udp_recvmsg(), and udp_sendmsg().

#define MSG_RST   0x1000
 

Definition at line 209 of file linux/socket.h.

#define MSG_SYN   0x400
 

Definition at line 207 of file linux/socket.h.

Referenced by unix_accept(), unix_gc(), and unix_stream_connect().

#define MSG_TRUNC   0x20
 

Definition at line 202 of file linux/socket.h.

Referenced by econet_recvmsg(), ip_recv_error(), ipv6_recv_error(), irda_recvmsg_dgram(), linux_to_solaris_msgflags(), netlink_recvmsg(), packet_recvmsg(), raw_recvmsg(), rawv6_recvmsg(), solaris_to_linux_msgflags(), tcp_recv_urg(), udp_recvmsg(), udpv6_recvmsg(), and unix_dgram_recvmsg().

#define MSG_TRYHARD   4
 

Definition at line 199 of file linux/socket.h.

#define MSG_URG   0x800
 

Definition at line 208 of file linux/socket.h.

#define MSG_WAITALL   0x100
 

Definition at line 205 of file linux/socket.h.

Referenced by irda_recvmsg_stream(), linux_to_solaris_msgflags(), solaris_to_linux_msgflags(), tcp_recvmsg(), and unix_stream_recvmsg().

#define PF_APPLETALK   AF_APPLETALK
 

Definition at line 167 of file linux/socket.h.

#define PF_ASH   AF_ASH
 

Definition at line 181 of file linux/socket.h.

#define PF_ATMPVC   AF_ATMPVC
 

Definition at line 170 of file linux/socket.h.

#define PF_ATMSVC   AF_ATMSVC
 

Definition at line 183 of file linux/socket.h.

#define PF_AX25   AF_AX25
 

Definition at line 165 of file linux/socket.h.

#define PF_BRIDGE   AF_BRIDGE
 

Definition at line 169 of file linux/socket.h.

#define PF_DECnet   AF_DECnet
 

Definition at line 174 of file linux/socket.h.

#define PF_ECONET   AF_ECONET
 

Definition at line 182 of file linux/socket.h.

Referenced by econet_create().

#define PF_INET   AF_INET
 

Definition at line 164 of file linux/socket.h.

Referenced by __initfunc(), inet_create(), ip_build_and_send_pkt(), ip_build_xmit(), ip_build_xmit_slow(), ip_forward(), ip_queue_xmit(), ip_rcv(), ip_setsockopt(), ipmr_queue_xmit(), ipv6_setsockopt(), socket_check(), svc_create_socket(), tcp_create_openreq_child(), and xprt_create_socket().

#define PF_INET6   AF_INET6
 

Definition at line 172 of file linux/socket.h.

Referenced by __initfunc(), __tcp_v6_lookup(), inet6_create(), tcp_time_wait(), tcp_v6_lookup_listener(), and udp_v6_lookup().

#define PF_IPX   AF_IPX
 

Definition at line 166 of file linux/socket.h.

#define PF_IRDA   AF_IRDA
 

Definition at line 185 of file linux/socket.h.

Referenced by irda_create().

#define PF_KEY   AF_KEY
 

Definition at line 177 of file linux/socket.h.

#define PF_LOCAL   AF_LOCAL
 

Definition at line 163 of file linux/socket.h.

#define PF_MAX   AF_MAX
 

Definition at line 187 of file linux/socket.h.

#define PF_NETBEUI   AF_NETBEUI
 

Definition at line 175 of file linux/socket.h.

#define PF_NETLINK   AF_NETLINK
 

Definition at line 178 of file linux/socket.h.

Referenced by netlink_create(), and netlink_open().

#define PF_NETROM   AF_NETROM
 

Definition at line 168 of file linux/socket.h.

#define PF_PACKET   AF_PACKET
 

Definition at line 180 of file linux/socket.h.

Referenced by inet_create(), and packet_create().

#define PF_ROSE   AF_ROSE
 

Definition at line 173 of file linux/socket.h.

#define PF_ROUTE   AF_ROUTE
 

Definition at line 179 of file linux/socket.h.

#define PF_SECURITY   AF_SECURITY
 

Definition at line 176 of file linux/socket.h.

Referenced by ip_forward().

#define PF_SNA   AF_SNA
 

Definition at line 184 of file linux/socket.h.

#define PF_UNIX   AF_UNIX
 

Definition at line 162 of file linux/socket.h.

Referenced by socket_check(), unix_create(), unix_create1(), and unix_get_socket().

#define PF_UNSPEC   AF_UNSPEC
 

Definition at line 161 of file linux/socket.h.

Referenced by __initfunc().

#define PF_X25   AF_X25
 

Definition at line 171 of file linux/socket.h.

#define SCM_CONNECT   0x03
 

Definition at line 123 of file linux/socket.h.

#define SCM_CREDENTIALS   0x02
 

Definition at line 122 of file linux/socket.h.

Referenced by __scm_send(), scm_recv(), and sys32_recvmsg().

#define SCM_RIGHTS   0x01
 

Definition at line 121 of file linux/socket.h.

Referenced by __scm_send(), scm_detach_fds(), and scm_detach_fds32().

#define SOCK_DGRAM   2
 

Definition at line 270 of file linux/socket.h.

#define SOCK_PACKET   10
 

Definition at line 274 of file linux/socket.h.

#define SOCK_RAW   3
 

Definition at line 271 of file linux/socket.h.

#define SOCK_RDM   4
 

Definition at line 272 of file linux/socket.h.

#define SOCK_SEQPACKET   5
 

Definition at line 273 of file linux/socket.h.

#define SOCK_STREAM   1
 

Definition at line 269 of file linux/socket.h.

#define SOL_AAL   265
 

Definition at line 236 of file linux/socket.h.

#define SOL_ATALK   258
 

Definition at line 229 of file linux/socket.h.

#define SOL_ATM   264
 

Definition at line 235 of file linux/socket.h.

#define SOL_AX25   257
 

Definition at line 228 of file linux/socket.h.