- 浏览: 269775 次
- 性别:
- 来自: 深圳
文章分类
最新评论
-
highsky:
再次看到记录上海书城那段文字,自己都想笑笑。本想删点现在觉得幼 ...
模式分类笔记 -- 高斯函数 -
doudoulong2002ok:
加油!努力1我最近非常忙!连睡觉的时候都是挤出来的!不过我好在 ...
回家了一趟 -
doudoulong2002ok:
我的灯有时候亮,有时候不亮!咯咯
你的灯亮着吗?-读书笔记 -
doudoulong2002ok:
豆豆龙飘过!
模式分类笔记 -- 最小二乘法 -
doudoulong2002ok:
是么?我想想
模式分类笔记 -- 线性规划(1)
包含BSD套接口的协议相关信息。例如对于一个INET(Internet Address Domain)套接口此数据结构 包含TCP/IP和UDP/IP信息。
struct sock
{
/* This must be first. */
struct sock *sklist_next;
struct sock *sklist_prev;
struct options *opt;
atomic_t wmem_alloc;
atomic_t rmem_alloc;
unsigned long allocation; /* Allocation mode */
__u32 write_seq;
__u32 sent_seq;
__u32 acked_seq;
__u32 copied_seq;
__u32 rcv_ack_seq;
unsigned short rcv_ack_cnt; /* count of same ack */
__u32 window_seq;
__u32 fin_seq;
__u32 urg_seq;
__u32 urg_data;
__u32 syn_seq;
int users; /* user count */
/*
* Not all are volatile, but some are, so we
* might as well say they all are.
*/
volatile char dead,
urginline,
intr,
blog,
done,
reuse,
keepopen,
linger,
delay_acks,
destroy,
ack_timed,
no_check,
zapped,
broadcast,
nonagle,
bsdism;
unsigned long lingertime;
int proc;
struct sock *next;
struct sock **pprev;
struct sock *bind_next;
struct sock **bind_pprev;
struct sock *pair;
int hashent;
struct sock *prev;
struct sk_buff *volatile send_head;
struct sk_buff *volatile send_next;
struct sk_buff *volatile send_tail;
struct sk_buff_head back_log;
struct sk_buff *partial;
struct timer_list partial_timer;
long retransmits;
struct sk_buff_head write_queue,
receive_queue;
struct proto *prot;
struct wait_queue **sleep;
__u32 daddr; __u32 saddr; /* Sending source */
__u32 rcv_saddr; /* Bound address */
unsigned short max_unacked;
unsigned short window;
__u32 lastwin_seq; /* sequence number when we last
updated the window we offer */
__u32 high_seq; /* sequence number when we did
current fast retransmit */
volatile unsigned long ato; /* ack timeout */
volatile unsigned long lrcvtime; /* jiffies at last data rcv */
volatile unsigned long idletime; /* jiffies at last rcv */
unsigned int bytes_rcv;
/*
* mss is min(mtu, max_window)
*/
unsigned short mtu; /* mss negotiated in the syn's */
volatile unsigned short mss; /* current eff. mss - can change */
volatile unsigned short user_mss; /* mss requested by user in ioctl */
volatile unsigned short max_window;
unsigned long window_clamp;
unsigned int ssthresh;
unsigned short num;
volatile unsigned short cong_window;
volatile unsigned short cong_count;
volatile unsigned short packets_out;
volatile unsigned short shutdown;
volatile unsigned long rtt;
volatile unsigned long mdev;
volatile unsigned long rto;
volatile unsigned short backoff;
int err, err_soft; /* Soft holds errors that don't
cause failure but are the cause
of a persistent failure not
just 'timed out' */
unsigned char protocol;
volatile unsigned char state;
unsigned char ack_backlog;
unsigned char max_ack_backlog;
unsigned char priority;
unsigned char debug;
int rcvbuf;
int sndbuf;
unsigned short type;
unsigned char localroute; /* Route locally only */
/*
* This is where all the private (optional) areas that don't
* overlap will eventually live.
*/
union
{
struct unix_opt af_unix;
#if defined(CONFIG_ATALK) || defined(CONFIG_ATALK_MODULE)
struct atalk_sock af_at;
#endif
#if defined(CONFIG_IPX) || defined(CONFIG_IPX_MODULE)
struct ipx_opt af_ipx;
#endif
#ifdef CONFIG_INET
struct inet_packet_opt af_packet;
#ifdef CONFIG_NUTCP
struct tcp_opt af_tcp;
#endif
#endif
} protinfo; /*
* IP 'private area'
*/
int ip_ttl; /* TTL setting */
int ip_tos; /* TOS */
struct tcphdr dummy_th;
struct timer_list keepalive_timer; /* TCP keepalive hack */
struct timer_list retransmit_timer; /* TCP retransmit timer */
struct timer_list delack_timer; /* TCP delayed ack timer */
int ip_xmit_timeout; /* Why the timeout is running */
struct rtable *ip_route_cache; /* Cached output route */
unsigned char ip_hdrincl; /* Include headers ? */
#ifdef CONFIG_IP_MULTICAST
int ip_mc_ttl; /* Multicasting TTL */
int ip_mc_loop; /* Loopback */
char ip_mc_name[MAX_ADDR_LEN]; /* Multicast device name */
struct ip_mc_socklist *ip_mc_list; /* Group array */
#endif
/*
* This part is used for the timeout functions (timer.c).
*/
int timeout; /* What are we waiting for? */
struct timer_list timer; /* This is the TIME_WAIT/receive
* timer when we are doing IP
*/
struct timeval stamp;
/*
* Identd
*/
struct socket *socket;
/*
* Callbacks
*/
void (*state_change)(struct sock *sk);
void (*data_ready)(struct sock *sk,int bytes);
void (*write_space)(struct sock *sk);
void (*error_report)(struct sock *sk);
};
struct sock
{
/* This must be first. */
struct sock *sklist_next;
struct sock *sklist_prev;
struct options *opt;
atomic_t wmem_alloc;
atomic_t rmem_alloc;
unsigned long allocation; /* Allocation mode */
__u32 write_seq;
__u32 sent_seq;
__u32 acked_seq;
__u32 copied_seq;
__u32 rcv_ack_seq;
unsigned short rcv_ack_cnt; /* count of same ack */
__u32 window_seq;
__u32 fin_seq;
__u32 urg_seq;
__u32 urg_data;
__u32 syn_seq;
int users; /* user count */
/*
* Not all are volatile, but some are, so we
* might as well say they all are.
*/
volatile char dead,
urginline,
intr,
blog,
done,
reuse,
keepopen,
linger,
delay_acks,
destroy,
ack_timed,
no_check,
zapped,
broadcast,
nonagle,
bsdism;
unsigned long lingertime;
int proc;
struct sock *next;
struct sock **pprev;
struct sock *bind_next;
struct sock **bind_pprev;
struct sock *pair;
int hashent;
struct sock *prev;
struct sk_buff *volatile send_head;
struct sk_buff *volatile send_next;
struct sk_buff *volatile send_tail;
struct sk_buff_head back_log;
struct sk_buff *partial;
struct timer_list partial_timer;
long retransmits;
struct sk_buff_head write_queue,
receive_queue;
struct proto *prot;
struct wait_queue **sleep;
__u32 daddr; __u32 saddr; /* Sending source */
__u32 rcv_saddr; /* Bound address */
unsigned short max_unacked;
unsigned short window;
__u32 lastwin_seq; /* sequence number when we last
updated the window we offer */
__u32 high_seq; /* sequence number when we did
current fast retransmit */
volatile unsigned long ato; /* ack timeout */
volatile unsigned long lrcvtime; /* jiffies at last data rcv */
volatile unsigned long idletime; /* jiffies at last rcv */
unsigned int bytes_rcv;
/*
* mss is min(mtu, max_window)
*/
unsigned short mtu; /* mss negotiated in the syn's */
volatile unsigned short mss; /* current eff. mss - can change */
volatile unsigned short user_mss; /* mss requested by user in ioctl */
volatile unsigned short max_window;
unsigned long window_clamp;
unsigned int ssthresh;
unsigned short num;
volatile unsigned short cong_window;
volatile unsigned short cong_count;
volatile unsigned short packets_out;
volatile unsigned short shutdown;
volatile unsigned long rtt;
volatile unsigned long mdev;
volatile unsigned long rto;
volatile unsigned short backoff;
int err, err_soft; /* Soft holds errors that don't
cause failure but are the cause
of a persistent failure not
just 'timed out' */
unsigned char protocol;
volatile unsigned char state;
unsigned char ack_backlog;
unsigned char max_ack_backlog;
unsigned char priority;
unsigned char debug;
int rcvbuf;
int sndbuf;
unsigned short type;
unsigned char localroute; /* Route locally only */
/*
* This is where all the private (optional) areas that don't
* overlap will eventually live.
*/
union
{
struct unix_opt af_unix;
#if defined(CONFIG_ATALK) || defined(CONFIG_ATALK_MODULE)
struct atalk_sock af_at;
#endif
#if defined(CONFIG_IPX) || defined(CONFIG_IPX_MODULE)
struct ipx_opt af_ipx;
#endif
#ifdef CONFIG_INET
struct inet_packet_opt af_packet;
#ifdef CONFIG_NUTCP
struct tcp_opt af_tcp;
#endif
#endif
} protinfo; /*
* IP 'private area'
*/
int ip_ttl; /* TTL setting */
int ip_tos; /* TOS */
struct tcphdr dummy_th;
struct timer_list keepalive_timer; /* TCP keepalive hack */
struct timer_list retransmit_timer; /* TCP retransmit timer */
struct timer_list delack_timer; /* TCP delayed ack timer */
int ip_xmit_timeout; /* Why the timeout is running */
struct rtable *ip_route_cache; /* Cached output route */
unsigned char ip_hdrincl; /* Include headers ? */
#ifdef CONFIG_IP_MULTICAST
int ip_mc_ttl; /* Multicasting TTL */
int ip_mc_loop; /* Loopback */
char ip_mc_name[MAX_ADDR_LEN]; /* Multicast device name */
struct ip_mc_socklist *ip_mc_list; /* Group array */
#endif
/*
* This part is used for the timeout functions (timer.c).
*/
int timeout; /* What are we waiting for? */
struct timer_list timer; /* This is the TIME_WAIT/receive
* timer when we are doing IP
*/
struct timeval stamp;
/*
* Identd
*/
struct socket *socket;
/*
* Callbacks
*/
void (*state_change)(struct sock *sk);
void (*data_ready)(struct sock *sk,int bytes);
void (*write_space)(struct sock *sk);
void (*error_report)(struct sock *sk);
};
发表评论
-
Linux环境进程间通信
2009-06-08 19:53 1163这些确实是最基本最实用的东西,但我想 操作系统实现中最复杂的是 ... -
Linux核心数据结构--vm_area_struct
2006-11-10 19:12 4036表示某进程的一个虚拟内存区域。 struct vm_area ... -
Linux核心数据结构--tq_struct
2006-11-10 19:10 2350每个任务队列结构(tq_struct)包含着已经排队的任务信息 ... -
Linux核心数据结构--timer_list
2006-11-10 19:09 2420用来为进程实现实时时钟。 struct timer_list ... -
Linux核心数据结构--socket
2006-11-10 19:05 1333包含BSD套接口的信息。它不独立存在,一般位于一个VFS in ... -
Linux核心数据结构--sk_buff
2006-11-10 18:57 1709用来描叙在协议层之间交换的网络数据。 struct sk_b ... -
Linux核心数据结构--semaphore
2006-11-10 18:49 1326保护临界区数据结构和代码信号灯。 struct semaph ... -
Linux核心数据结构--rtable
2006-11-10 18:48 2833用来描叙向某个IP主机发送包的路由信息。此结构在IP路由cac ... -
Linux核心数据结构--request
2006-11-10 18:47 1686被用来向系统的块设备发送请求。它总是向buffer cache ... -
Linux核心数据结构--pci_dev
2006-11-10 18:46 2265表示系统中的每个PCI设备,包括PCI-PCI和PCI-PCI ... -
Linux核心数据结构--pci_bus
2006-11-10 18:43 1895表示系统中的一个PCI总线。 struct pci_bus ... -
Linux核心数据结构--mm_struct
2006-11-10 18:40 3920用来描叙某任务或进程的虚拟内存。 struct mm_str ... -
Linux核心数据结构--mem_map_t
2006-11-10 18:38 1921用来保存每个物理页面的信息。 typedef struct ... -
Linux核心数据结构--linux_binfmt
2006-11-10 18:36 1685用来表示可被Linux理解的二进制文件格式。 struct ... -
Linux核心数据结构--irqaction
2006-11-10 18:35 1170用来描叙系统的中断处理过程。 struct irqactio ... -
Linux核心数据结构--ipc_perm
2006-11-10 18:33 1389此结构描叙对一个系统V IPC对象的存取权限。 struct ... -
Linux核心数据结构--inode
2006-11-10 18:32 2616此VFS inode结构描叙磁盘上一个文件或目录的信息。 s ... -
Linux核心数据结构--gendisk
2006-11-10 18:31 4238包含关于某个硬盘的信息。用于磁盘初始化与分区检查时。 str ... -
Linux核心数据结构--fs_struct
2006-11-10 18:27 1511这个还不知道是啥 struct fs_struct { ... -
Linux核心数据结构--files_struct
2006-11-10 18:26 1366描叙被某进程打开的所有文件。 struct files_st ...
相关推荐
详细分析了linux内核中sock和socket数据结构的含义
这个包是Tcp/Ip详解卷一里面的提到sock-0.3.2程序,需要注意的是在linux root用户名称下解压sock-0.3.2包,然后执行说明里面的命令,即可完成安装,然后就可以配合Tcp/Ip详解卷一书里讲的进行操作
TCP-UDP-SOCK-TOOL[TCP-UDP Socket调试工具集合].7z TCP-UDP-SOCK-TOOL[TCP-UDP Socket调试工具集合].7z
TCPIP详解-linux版sock 源码 学TCP/IP协议必备
TCPIP详解-linux版sock 源码 学TCP/IP协议必备 学习好帮手!
M-Sock 是一款功能强大且容易操作的抓包工具,但是个别杀毒软件会报毒,请大家自行去网站查杀
linux_sock_raw原始套接字编程
linux内核中sock和socket数据结构可用.pdf
计算机软件-编程源码-超强超完善的pb-SOCK网络源码.zip
Linux下SOCK_RAW原理和应用 Linux下SOCK_RAW原理和应用
Linux下SOCK_RAW原理和应用,自己尝试编的,还请各位高手多多指点。
(1)提取镜像:docker load -i dockerlab-app-linux-amd64.tar (2)运行:(host_addr设置成你机器的IP地址) docker run -d -p 8090:8090 -p 9090:9090 \ --name dockerlab-app \ --restart always \ -v /var...
1 - 简介 1.1 - 本文涉及的内容 ... 6.1 - SOCK_PACKET、SOCK_RAW与Libpcap 6.2 - 给狼披上羊皮 7 - 结束语 A - 轻量级防火墙 A.1 - 概述 A.2 - 源代码 : lwfw.c A.3 - 头文件 : lwfw.h B - 第6节中的源代码
linux_sock_raw原始套接字编程
SOCK-HTTP代理协议解析
LINUX Socket Programming
from flask_sock import Sock app = Flask ( __name__ ) sock = Sock ( app ) @ sock . route ( '/echo' ) def echo ( sock ): while True : data = sock . receive () sock . send ( data )
pb-SOCK例程,有关于Socket通讯的例子
Linux下SOCK_RAW原理和应用示例,比较有趣!建议大家看看玩
网络编程从大的方面说就是对信息的发送到接收,中间传输为物理线路的作用。网络编程最主要的工作就是在发送端把信息通过规定好的协议进行组装包,在接收端按照规定好的协议把包进行解析,从而提取出对应的信息,达到...