STRUCT SOCK(9) | Linux Networking | STRUCT SOCK(9) |
NAME¶
struct_sock - network layer representation of sockets
SYNOPSIS¶
struct sock {
struct sock_common __sk_common; #define sk_node __sk_common.skc_node #define sk_nulls_node __sk_common.skc_nulls_node #define sk_refcnt __sk_common.skc_refcnt #define sk_tx_queue_mapping __sk_common.skc_tx_queue_mapping #define sk_dontcopy_begin __sk_common.skc_dontcopy_begin #define sk_dontcopy_end __sk_common.skc_dontcopy_end #define sk_hash __sk_common.skc_hash #define sk_portpair __sk_common.skc_portpair #define sk_num __sk_common.skc_num #define sk_dport __sk_common.skc_dport #define sk_addrpair __sk_common.skc_addrpair #define sk_daddr __sk_common.skc_daddr #define sk_rcv_saddr __sk_common.skc_rcv_saddr #define sk_family __sk_common.skc_family #define sk_state __sk_common.skc_state #define sk_reuse __sk_common.skc_reuse #define sk_reuseport __sk_common.skc_reuseport #define sk_bound_dev_if __sk_common.skc_bound_dev_if #define sk_bind_node __sk_common.skc_bind_node #define sk_prot __sk_common.skc_prot #define sk_net __sk_common.skc_net #define sk_v6_daddr __sk_common.skc_v6_daddr #define sk_v6_rcv_saddr __sk_common.skc_v6_rcv_saddr
socket_lock_t sk_lock;
struct sk_buff_head sk_receive_queue;
struct sk_backlog; #define sk_rmem_alloc sk_backlog.rmem_alloc
int sk_forward_alloc; #ifdef CONFIG_RPS
__u32 sk_rxhash; #endif #ifdef CONFIG_NET_RX_BUSY_POLL
unsigned int sk_napi_id;
unsigned int sk_ll_usec; #endif
atomic_t sk_drops;
int sk_rcvbuf;
struct sk_filter __rcu * sk_filter;
struct socket_wq __rcu * sk_wq; #ifdef CONFIG_NET_DMA_RH_KABI #ifdef CONFIG_XFRM
struct xfrm_policy * sk_policy[2]; #endif
unsigned long sk_flags;
struct dst_entry * sk_rx_dst;
struct dst_entry __rcu * sk_dst_cache;
RH_KABI_DEPRECATE(spinlock_t# sk_dst_lock)atomic_t sk_wmem_alloc;
atomic_t sk_omem_alloc;
int sk_sndbuf;
struct sk_buff_head sk_write_queue;
unsigned int sk_shutdown:2; #ifdef __GENKSYMS__ #else #endif #define SK_PROTOCOL_MAX U8_MAX
int sk_wmem_queued;
gfp_t sk_allocation;
u32 sk_pacing_rate;
netdev_features_t sk_route_caps;
netdev_features_t sk_route_nocaps;
int sk_gso_type;
unsigned int sk_gso_max_size;
u16 sk_gso_max_segs;
int sk_rcvlowat;
unsigned long sk_lingertime;
struct sk_buff_head sk_error_queue;
struct proto * sk_prot_creator;
rwlock_t sk_callback_lock;
int sk_err;
int sk_err_soft;
unsigned short sk_ack_backlog;
unsigned short sk_max_ack_backlog;
__u32 sk_priority; #if IS_ENABLED(CONFIG_NETPRIO_CGROUP)
__u32 sk_cgrp_prioidx; #endif
struct pid * sk_peer_pid;
const struct cred * sk_peer_cred;
long sk_rcvtimeo;
long sk_sndtimeo;
void * sk_protinfo;
struct timer_list sk_timer;
ktime_t sk_stamp;
struct socket * sk_socket;
void * sk_user_data;
struct page_frag sk_frag;
struct sk_buff * sk_send_head;
__s32 sk_peek_off;
int sk_write_pending; #ifdef CONFIG_SECURITY
void * sk_security; #endif
__u32 sk_mark;
u32 sk_classid;
struct cg_proto * sk_cgrp;
void (* sk_state_change) (struct sock *sk);
void (* sk_data_ready) (struct sock *sk, int bytes);
void (* sk_write_space) (struct sock *sk);
void (* sk_error_report) (struct sock *sk);
int (* sk_backlog_rcv) (struct sock *sk,struct sk_buff *skb);
void (* sk_destruct) (struct sock *sk); #else };
MEMBERS¶
__sk_common
sk_lock
sk_receive_queue
sk_backlog
sk_forward_alloc
sk_rxhash
sk_napi_id
sk_ll_usec
sk_drops
sk_rcvbuf
sk_filter
sk_wq
sk_policy[2]
sk_flags
sk_rx_dst
sk_dst_cache
sk_wmem_alloc
sk_omem_alloc
sk_sndbuf
sk_write_queue
sk_shutdown
sk_wmem_queued
sk_allocation
sk_pacing_rate
sk_route_caps
sk_route_nocaps
sk_gso_type
sk_gso_max_size
sk_gso_max_segs
sk_rcvlowat
sk_lingertime
sk_error_queue
sk_prot_creator
sk_callback_lock
sk_err
sk_err_soft
sk_ack_backlog
sk_max_ack_backlog
sk_priority
sk_cgrp_prioidx
sk_peer_pid
sk_peer_cred
sk_rcvtimeo
sk_sndtimeo
sk_protinfo
sk_timer
sk_stamp
sk_socket
sk_user_data
sk_frag
sk_send_head
sk_peek_off
sk_write_pending
sk_security
sk_mark
sk_classid
sk_cgrp
sk_state_change
sk_data_ready
sk_write_space
sk_error_report
sk_backlog_rcv
sk_destruct
COPYRIGHT¶
June 2024 | Kernel Hackers Manual 3.10 |