博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
sock_common
阅读量:4152 次
发布时间:2019-05-25

本文共 3200 字,大约阅读时间需要 10 分钟。

/** *	struct sock_common - minimal network layer representation of sockets *	@skc_daddr: Foreign IPv4 addr *	@skc_rcv_saddr: Bound local IPv4 addr *	@skc_hash: hash value used with various protocol lookup tables *	@skc_u16hashes: two u16 hash values used by UDP lookup tables *	@skc_dport: placeholder for inet_dport/tw_dport *	@skc_num: placeholder for inet_num/tw_num *	@skc_family: network address family *	@skc_state: Connection state *	@skc_reuse: %SO_REUSEADDR setting *	@skc_reuseport: %SO_REUSEPORT setting *	@skc_bound_dev_if: bound device index if != 0 *	@skc_bind_node: bind hash linkage for various protocol lookup tables *	@skc_portaddr_node: second hash linkage for UDP/UDP-Lite protocol *	@skc_prot: protocol handlers inside a network family *	@skc_net: reference to the network namespace of this socket *	@skc_node: main hash linkage for various protocol lookup tables *	@skc_nulls_node: main hash linkage for TCP/UDP/UDP-Lite protocol *	@skc_tx_queue_mapping: tx queue number for this connection *	@skc_flags: place holder for sk_flags *		%SO_LINGER (l_onoff), %SO_BROADCAST, %SO_KEEPALIVE, *		%SO_OOBINLINE settings, %SO_TIMESTAMPING settings *	@skc_incoming_cpu: record/match cpu processing incoming packets *	@skc_refcnt: reference count * *	This is the minimal network layer representation of sockets, the header *	for struct sock and struct inet_timewait_sock. */struct sock_common {	/* skc_daddr and skc_rcv_saddr must be grouped on a 8 bytes aligned	 * address on 64bit arches : cf INET_MATCH()	 */	union {		__addrpair	skc_addrpair;		struct {			__be32	skc_daddr;			__be32	skc_rcv_saddr;		};	};	union  {		unsigned int	skc_hash;		__u16		skc_u16hashes[2];	};	/* skc_dport && skc_num must be grouped as well */	union {		__portpair	skc_portpair;		struct {			__be16	skc_dport;			__u16	skc_num;		};	};	unsigned short		skc_family;	volatile unsigned char	skc_state;	unsigned char		skc_reuse:4;	unsigned char		skc_reuseport:1;	unsigned char		skc_ipv6only:1;	unsigned char		skc_net_refcnt:1;	int			skc_bound_dev_if;	union {		struct hlist_node	skc_bind_node;		struct hlist_node	skc_portaddr_node;	};	struct proto		*skc_prot;	possible_net_t		skc_net;#if IS_ENABLED(CONFIG_IPV6)	struct in6_addr		skc_v6_daddr;	struct in6_addr		skc_v6_rcv_saddr;#endif	atomic64_t		skc_cookie;	/* following fields are padding to force	 * offset(struct sock, sk_refcnt) == 128 on 64bit arches	 * assuming IPV6 is enabled. We use this padding differently	 * for different kind of 'sockets'	 */	union {		unsigned long	skc_flags;		struct sock	*skc_listener; /* request_sock */		struct inet_timewait_death_row *skc_tw_dr; /* inet_timewait_sock */	};	/*	 * fields between dontcopy_begin/dontcopy_end	 * are not copied in sock_copy()	 */	/* private: */	int			skc_dontcopy_begin[0];	/* public: */	union {		struct hlist_node	skc_node;		struct hlist_nulls_node skc_nulls_node;	};	int			skc_tx_queue_mapping;	union {		int		skc_incoming_cpu;		u32		skc_rcv_wnd;		u32		skc_tw_rcv_nxt; /* struct tcp_timewait_sock  */	};	atomic_t		skc_refcnt;	/* private: */	int                     skc_dontcopy_end[0];	union {		u32		skc_rxhash;		u32		skc_window_clamp;		u32		skc_tw_snd_nxt; /* struct tcp_timewait_sock */	};	/* public: */};

转载地址:http://wzhti.baihongyu.com/

你可能感兴趣的文章
XHProf-php轻量级的性能分析工具
查看>>
OpenCV gpu模块样例注释:video_reader.cpp
查看>>
就在昨天,全球 42 亿 IPv4 地址宣告耗尽!
查看>>
Mysql复制表以及复制数据库
查看>>
Linux分区方案
查看>>
如何使用 systemd 中的定时器
查看>>
linux进程监控和自动重启的简单实现
查看>>
OpenFeign学习(三):OpenFeign配置生成代理对象
查看>>
OpenFeign学习(四):OpenFeign的方法同步请求执行
查看>>
OpenFeign学习(六):OpenFign进行表单提交参数或传输文件
查看>>
Ribbon 学习(二):Spring Cloud Ribbon 加载配置原理
查看>>
Ribbon 学习(三):RestTemplate 请求负载流程解析
查看>>
深入理解HashMap
查看>>
XML生成(一):DOM生成XML
查看>>
XML生成(三):JDOM生成
查看>>
Ubuntu Could not open lock file /var/lib/dpkg/lock - open (13:Permission denied)
查看>>
collect2: ld returned 1 exit status
查看>>
C#入门
查看>>
C#中ColorDialog需点两次确定才会退出的问题
查看>>
数据库
查看>>