sock.h (9e9fd65d1fa51d919d54d731be0e66492b5b6c5a) | sock.h (46d3ceabd8d98ed0ad10f20c595ca784e34786c5) |
---|---|
1/* 2 * INET An implementation of the TCP/IP protocol suite for the LINUX 3 * operating system. INET is implemented using the BSD Socket 4 * interface as the means of communication with the user level. 5 * 6 * Definitions for the AF_INET socket handler. 7 * 8 * Version: @(#)sock.h 1.0.4 05/13/93 --- 184 unchanged lines hidden (view full) --- 193/** 194 * struct sock - network layer representation of sockets 195 * @__sk_common: shared layout with inet_timewait_sock 196 * @sk_shutdown: mask of %SEND_SHUTDOWN and/or %RCV_SHUTDOWN 197 * @sk_userlocks: %SO_SNDBUF and %SO_RCVBUF settings 198 * @sk_lock: synchronizer 199 * @sk_rcvbuf: size of receive buffer in bytes 200 * @sk_wq: sock wait queue and async head | 1/* 2 * INET An implementation of the TCP/IP protocol suite for the LINUX 3 * operating system. INET is implemented using the BSD Socket 4 * interface as the means of communication with the user level. 5 * 6 * Definitions for the AF_INET socket handler. 7 * 8 * Version: @(#)sock.h 1.0.4 05/13/93 --- 184 unchanged lines hidden (view full) --- 193/** 194 * struct sock - network layer representation of sockets 195 * @__sk_common: shared layout with inet_timewait_sock 196 * @sk_shutdown: mask of %SEND_SHUTDOWN and/or %RCV_SHUTDOWN 197 * @sk_userlocks: %SO_SNDBUF and %SO_RCVBUF settings 198 * @sk_lock: synchronizer 199 * @sk_rcvbuf: size of receive buffer in bytes 200 * @sk_wq: sock wait queue and async head |
201 * @sk_rx_dst: receive input route used by early tcp demux |
|
201 * @sk_dst_cache: destination cache 202 * @sk_dst_lock: destination cache lock 203 * @sk_policy: flow policy 204 * @sk_receive_queue: incoming packets 205 * @sk_wmem_alloc: transmit queue bytes committed 206 * @sk_write_queue: Packet sending queue 207 * @sk_async_wait_queue: DMA copied packets 208 * @sk_omem_alloc: "o" is "option" or "other" --- 103 unchanged lines hidden (view full) --- 312#ifdef CONFIG_NET_DMA 313 struct sk_buff_head sk_async_wait_queue; 314#endif 315 316#ifdef CONFIG_XFRM 317 struct xfrm_policy *sk_policy[2]; 318#endif 319 unsigned long sk_flags; | 202 * @sk_dst_cache: destination cache 203 * @sk_dst_lock: destination cache lock 204 * @sk_policy: flow policy 205 * @sk_receive_queue: incoming packets 206 * @sk_wmem_alloc: transmit queue bytes committed 207 * @sk_write_queue: Packet sending queue 208 * @sk_async_wait_queue: DMA copied packets 209 * @sk_omem_alloc: "o" is "option" or "other" --- 103 unchanged lines hidden (view full) --- 313#ifdef CONFIG_NET_DMA 314 struct sk_buff_head sk_async_wait_queue; 315#endif 316 317#ifdef CONFIG_XFRM 318 struct xfrm_policy *sk_policy[2]; 319#endif 320 unsigned long sk_flags; |
321 struct dst_entry *sk_rx_dst; |
|
320 struct dst_entry *sk_dst_cache; 321 spinlock_t sk_dst_lock; 322 atomic_t sk_wmem_alloc; 323 atomic_t sk_omem_alloc; 324 int sk_sndbuf; 325 struct sk_buff_head sk_write_queue; 326 kmemcheck_bitfield_begin(flags); 327 unsigned int sk_shutdown : 2, --- 523 unchanged lines hidden (view full) --- 851 int (*sendpage)(struct sock *sk, struct page *page, 852 int offset, size_t size, int flags); 853 int (*bind)(struct sock *sk, 854 struct sockaddr *uaddr, int addr_len); 855 856 int (*backlog_rcv) (struct sock *sk, 857 struct sk_buff *skb); 858 | 322 struct dst_entry *sk_dst_cache; 323 spinlock_t sk_dst_lock; 324 atomic_t sk_wmem_alloc; 325 atomic_t sk_omem_alloc; 326 int sk_sndbuf; 327 struct sk_buff_head sk_write_queue; 328 kmemcheck_bitfield_begin(flags); 329 unsigned int sk_shutdown : 2, --- 523 unchanged lines hidden (view full) --- 853 int (*sendpage)(struct sock *sk, struct page *page, 854 int offset, size_t size, int flags); 855 int (*bind)(struct sock *sk, 856 struct sockaddr *uaddr, int addr_len); 857 858 int (*backlog_rcv) (struct sock *sk, 859 struct sk_buff *skb); 860 |
861 void (*release_cb)(struct sock *sk); 862 |
|
859 /* Keeping track of sk's, looking them up, and port selection methods. */ 860 void (*hash)(struct sock *sk); 861 void (*unhash)(struct sock *sk); 862 void (*rehash)(struct sock *sk); 863 int (*get_port)(struct sock *sk, unsigned short snum); 864 void (*clear_sk)(struct sock *sk, int size); 865 866 /* Keeping track of sockets in use */ --- 554 unchanged lines hidden (view full) --- 1421extern struct sk_buff *sock_wmalloc(struct sock *sk, 1422 unsigned long size, int force, 1423 gfp_t priority); 1424extern struct sk_buff *sock_rmalloc(struct sock *sk, 1425 unsigned long size, int force, 1426 gfp_t priority); 1427extern void sock_wfree(struct sk_buff *skb); 1428extern void sock_rfree(struct sk_buff *skb); | 863 /* Keeping track of sk's, looking them up, and port selection methods. */ 864 void (*hash)(struct sock *sk); 865 void (*unhash)(struct sock *sk); 866 void (*rehash)(struct sock *sk); 867 int (*get_port)(struct sock *sk, unsigned short snum); 868 void (*clear_sk)(struct sock *sk, int size); 869 870 /* Keeping track of sockets in use */ --- 554 unchanged lines hidden (view full) --- 1425extern struct sk_buff *sock_wmalloc(struct sock *sk, 1426 unsigned long size, int force, 1427 gfp_t priority); 1428extern struct sk_buff *sock_rmalloc(struct sock *sk, 1429 unsigned long size, int force, 1430 gfp_t priority); 1431extern void sock_wfree(struct sk_buff *skb); 1432extern void sock_rfree(struct sk_buff *skb); |
1433extern void sock_edemux(struct sk_buff *skb); |
|
1429 1430extern int sock_setsockopt(struct socket *sock, int level, 1431 int op, char __user *optval, 1432 unsigned int optlen); 1433 1434extern int sock_getsockopt(struct socket *sock, int level, 1435 int op, char __user *optval, 1436 int __user *optlen); --- 710 unchanged lines hidden (view full) --- 2147static inline void sk_change_net(struct sock *sk, struct net *net) 2148{ 2149 put_net(sock_net(sk)); 2150 sock_net_set(sk, hold_net(net)); 2151} 2152 2153static inline struct sock *skb_steal_sock(struct sk_buff *skb) 2154{ | 1434 1435extern int sock_setsockopt(struct socket *sock, int level, 1436 int op, char __user *optval, 1437 unsigned int optlen); 1438 1439extern int sock_getsockopt(struct socket *sock, int level, 1440 int op, char __user *optval, 1441 int __user *optlen); --- 710 unchanged lines hidden (view full) --- 2152static inline void sk_change_net(struct sock *sk, struct net *net) 2153{ 2154 put_net(sock_net(sk)); 2155 sock_net_set(sk, hold_net(net)); 2156} 2157 2158static inline struct sock *skb_steal_sock(struct sk_buff *skb) 2159{ |
2155 if (unlikely(skb->sk)) { | 2160 if (skb->sk) { |
2156 struct sock *sk = skb->sk; 2157 2158 skb->destructor = NULL; 2159 skb->sk = NULL; 2160 return sk; 2161 } 2162 return NULL; 2163} --- 26 unchanged lines hidden --- | 2161 struct sock *sk = skb->sk; 2162 2163 skb->destructor = NULL; 2164 skb->sk = NULL; 2165 return sk; 2166 } 2167 return NULL; 2168} --- 26 unchanged lines hidden --- |