aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sock.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/sock.h')
-rw-r--r--include/net/sock.h139
1 files changed, 71 insertions, 68 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index be81cabd0da3..a9ef3a6a13f3 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -7,7 +7,7 @@
7 * 7 *
8 * Version: @(#)sock.h 1.0.4 05/13/93 8 * Version: @(#)sock.h 1.0.4 05/13/93
9 * 9 *
10 * Authors: Ross Biro, <bir7@leland.Stanford.Edu> 10 * Authors: Ross Biro
11 * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> 11 * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
12 * Corey Minyard <wf-rch!minyard@relay.EU.net> 12 * Corey Minyard <wf-rch!minyard@relay.EU.net>
13 * Florian La Roche <flla@stud.uni-sb.de> 13 * Florian La Roche <flla@stud.uni-sb.de>
@@ -90,17 +90,17 @@ do { spin_lock_init(&((__sk)->sk_lock.slock)); \
90struct sock; 90struct sock;
91 91
92/** 92/**
93 * struct sock_common - minimal network layer representation of sockets 93 * struct sock_common - minimal network layer representation of sockets
94 * @skc_family - network address family 94 * @skc_family: network address family
95 * @skc_state - Connection state 95 * @skc_state: Connection state
96 * @skc_reuse - %SO_REUSEADDR setting 96 * @skc_reuse: %SO_REUSEADDR setting
97 * @skc_bound_dev_if - bound device index if != 0 97 * @skc_bound_dev_if: bound device index if != 0
98 * @skc_node - main hash linkage for various protocol lookup tables 98 * @skc_node: main hash linkage for various protocol lookup tables
99 * @skc_bind_node - bind hash linkage for various protocol lookup tables 99 * @skc_bind_node: bind hash linkage for various protocol lookup tables
100 * @skc_refcnt - reference count 100 * @skc_refcnt: reference count
101 * 101 *
102 * This is the minimal network layer representation of sockets, the header 102 * This is the minimal network layer representation of sockets, the header
103 * for struct sock and struct tcp_tw_bucket. 103 * for struct sock and struct tcp_tw_bucket.
104 */ 104 */
105struct sock_common { 105struct sock_common {
106 unsigned short skc_family; 106 unsigned short skc_family;
@@ -114,60 +114,62 @@ struct sock_common {
114 114
115/** 115/**
116 * struct sock - network layer representation of sockets 116 * struct sock - network layer representation of sockets
117 * @__sk_common - shared layout with tcp_tw_bucket 117 * @__sk_common: shared layout with tcp_tw_bucket
118 * @sk_shutdown - mask of %SEND_SHUTDOWN and/or %RCV_SHUTDOWN 118 * @sk_shutdown: mask of %SEND_SHUTDOWN and/or %RCV_SHUTDOWN
119 * @sk_userlocks - %SO_SNDBUF and %SO_RCVBUF settings 119 * @sk_userlocks: %SO_SNDBUF and %SO_RCVBUF settings
120 * @sk_lock - synchronizer 120 * @sk_lock: synchronizer
121 * @sk_rcvbuf - size of receive buffer in bytes 121 * @sk_rcvbuf: size of receive buffer in bytes
122 * @sk_sleep - sock wait queue 122 * @sk_sleep: sock wait queue
123 * @sk_dst_cache - destination cache 123 * @sk_dst_cache: destination cache
124 * @sk_dst_lock - destination cache lock 124 * @sk_dst_lock: destination cache lock
125 * @sk_policy - flow policy 125 * @sk_policy: flow policy
126 * @sk_rmem_alloc - receive queue bytes committed 126 * @sk_rmem_alloc: receive queue bytes committed
127 * @sk_receive_queue - incoming packets 127 * @sk_receive_queue: incoming packets
128 * @sk_wmem_alloc - transmit queue bytes committed 128 * @sk_wmem_alloc: transmit queue bytes committed
129 * @sk_write_queue - Packet sending queue 129 * @sk_write_queue: Packet sending queue
130 * @sk_omem_alloc - "o" is "option" or "other" 130 * @sk_omem_alloc: "o" is "option" or "other"
131 * @sk_wmem_queued - persistent queue size 131 * @sk_wmem_queued: persistent queue size
132 * @sk_forward_alloc - space allocated forward 132 * @sk_forward_alloc: space allocated forward
133 * @sk_allocation - allocation mode 133 * @sk_allocation: allocation mode
134 * @sk_sndbuf - size of send buffer in bytes 134 * @sk_sndbuf: size of send buffer in bytes
135 * @sk_flags - %SO_LINGER (l_onoff), %SO_BROADCAST, %SO_KEEPALIVE, %SO_OOBINLINE settings 135 * @sk_flags: %SO_LINGER (l_onoff), %SO_BROADCAST, %SO_KEEPALIVE, %SO_OOBINLINE settings
136 * @sk_no_check - %SO_NO_CHECK setting, wether or not checkup packets 136 * @sk_no_check: %SO_NO_CHECK setting, wether or not checkup packets
137 * @sk_route_caps - route capabilities (e.g. %NETIF_F_TSO) 137 * @sk_route_caps: route capabilities (e.g. %NETIF_F_TSO)
138 * @sk_lingertime - %SO_LINGER l_linger setting 138 * @sk_lingertime: %SO_LINGER l_linger setting
139 * @sk_hashent - hash entry in several tables (e.g. tcp_ehash) 139 * @sk_hashent: hash entry in several tables (e.g. tcp_ehash)
140 * @sk_backlog - always used with the per-socket spinlock held 140 * @sk_backlog: always used with the per-socket spinlock held
141 * @sk_callback_lock - used with the callbacks in the end of this struct 141 * @sk_callback_lock: used with the callbacks in the end of this struct
142 * @sk_error_queue - rarely used 142 * @sk_error_queue: rarely used
143 * @sk_prot - protocol handlers inside a network family 143 * @sk_prot: protocol handlers inside a network family
144 * @sk_err - last error 144 * @sk_prot_creator: sk_prot of original sock creator (see ipv6_setsockopt, IPV6_ADDRFORM for instance)
145 * @sk_err_soft - errors that don't cause failure but are the cause of a persistent failure not just 'timed out' 145 * @sk_err: last error
146 * @sk_ack_backlog - current listen backlog 146 * @sk_err_soft: errors that don't cause failure but are the cause of a persistent failure not just 'timed out'
147 * @sk_max_ack_backlog - listen backlog set in listen() 147 * @sk_ack_backlog: current listen backlog
148 * @sk_priority - %SO_PRIORITY setting 148 * @sk_max_ack_backlog: listen backlog set in listen()
149 * @sk_type - socket type (%SOCK_STREAM, etc) 149 * @sk_priority: %SO_PRIORITY setting
150 * @sk_protocol - which protocol this socket belongs in this network family 150 * @sk_type: socket type (%SOCK_STREAM, etc)
151 * @sk_peercred - %SO_PEERCRED setting 151 * @sk_protocol: which protocol this socket belongs in this network family
152 * @sk_rcvlowat - %SO_RCVLOWAT setting 152 * @sk_peercred: %SO_PEERCRED setting
153 * @sk_rcvtimeo - %SO_RCVTIMEO setting 153 * @sk_rcvlowat: %SO_RCVLOWAT setting
154 * @sk_sndtimeo - %SO_SNDTIMEO setting 154 * @sk_rcvtimeo: %SO_RCVTIMEO setting
155 * @sk_filter - socket filtering instructions 155 * @sk_sndtimeo: %SO_SNDTIMEO setting
156 * @sk_protinfo - private area, net family specific, when not using slab 156 * @sk_filter: socket filtering instructions
157 * @sk_timer - sock cleanup timer 157 * @sk_protinfo: private area, net family specific, when not using slab
158 * @sk_stamp - time stamp of last packet received 158 * @sk_timer: sock cleanup timer
159 * @sk_socket - Identd and reporting IO signals 159 * @sk_stamp: time stamp of last packet received
160 * @sk_user_data - RPC layer private data 160 * @sk_socket: Identd and reporting IO signals
161 * @sk_sndmsg_page - cached page for sendmsg 161 * @sk_user_data: RPC layer private data
162 * @sk_sndmsg_off - cached offset for sendmsg 162 * @sk_sndmsg_page: cached page for sendmsg
163 * @sk_send_head - front of stuff to transmit 163 * @sk_sndmsg_off: cached offset for sendmsg
164 * @sk_write_pending - a write to stream socket waits to start 164 * @sk_send_head: front of stuff to transmit
165 * @sk_state_change - callback to indicate change in the state of the sock 165 * @sk_security: used by security modules
166 * @sk_data_ready - callback to indicate there is data to be processed 166 * @sk_write_pending: a write to stream socket waits to start
167 * @sk_write_space - callback to indicate there is bf sending space available 167 * @sk_state_change: callback to indicate change in the state of the sock
168 * @sk_error_report - callback to indicate errors (e.g. %MSG_ERRQUEUE) 168 * @sk_data_ready: callback to indicate there is data to be processed
169 * @sk_backlog_rcv - callback to process the backlog 169 * @sk_write_space: callback to indicate there is bf sending space available
170 * @sk_destruct - called at sock freeing time, i.e. when all refcnt == 0 170 * @sk_error_report: callback to indicate errors (e.g. %MSG_ERRQUEUE)
171 * @sk_backlog_rcv: callback to process the backlog
172 * @sk_destruct: called at sock freeing time, i.e. when all refcnt == 0
171 */ 173 */
172struct sock { 174struct sock {
173 /* 175 /*
@@ -217,6 +219,7 @@ struct sock {
217 } sk_backlog; 219 } sk_backlog;
218 struct sk_buff_head sk_error_queue; 220 struct sk_buff_head sk_error_queue;
219 struct proto *sk_prot; 221 struct proto *sk_prot;
222 struct proto *sk_prot_creator;
220 rwlock_t sk_callback_lock; 223 rwlock_t sk_callback_lock;
221 int sk_err, 224 int sk_err,
222 sk_err_soft; 225 sk_err_soft;
@@ -1223,8 +1226,8 @@ sock_recv_timestamp(struct msghdr *msg, struct sock *sk, struct sk_buff *skb)
1223 1226
1224/** 1227/**
1225 * sk_eat_skb - Release a skb if it is no longer needed 1228 * sk_eat_skb - Release a skb if it is no longer needed
1226 * @sk - socket to eat this skb from 1229 * @sk: socket to eat this skb from
1227 * @skb - socket buffer to eat 1230 * @skb: socket buffer to eat
1228 * 1231 *
1229 * This routine must be called with interrupts disabled or with the socket 1232 * This routine must be called with interrupts disabled or with the socket
1230 * locked so that the sk_buff queue operation is ok. 1233 * locked so that the sk_buff queue operation is ok.