随笔分类 - linux tcp/ip
摘要:TCP 服务端 接收到ack tcp_v4_rcv() -> tcp_v4_do_rcv() -> tcp_v4_hnd_req() + tcp_child_process()tcp_v4_hnd_req() -> tcp_check_req() -> tcp_v4_syn_recv_sock()t
阅读全文
摘要:tcp_v4_send_synack()用于发送SYNACK段,在tcp_v4_conn_request()中被调用。 首先调用tcp_make_synack()构造SYNACK段,主要是构造TCP报头和初始化skb中的一些字段 /* * 该结构主要描述双方的地址、所支持的TCP选项等 tcp_re
阅读全文
摘要:rcv 分析: /* The socket must have it's spinlock held when we get * here, unless it is a TCP_LISTEN socket. * * We have a potential double-lock case here
阅读全文
摘要:proto socket 关联结构: { .type = SOCK_STREAM, .protocol = IPPROTO_TCP, .prot = &tcp_prot, .ops = &inet_stream_ops, .flags = INET_PROTOSW_PERMANENT | INET_
阅读全文
摘要:/*ipv4_specific是TCP传输层到网络层数据发送以及TCP建立过程的真正OPS, 在tcp_prot->init中被赋值给inet_connection_sock->icsk_af_ops 这里面有每种协议传输层的接收函数,后面的inetsw_array那几行是套接口层的相关函数 在函数
阅读全文
摘要:简介 sys_connect->inet_stream_connect->inet_stream_connect->tcp_v4_connect->tcp_connect对于tcp,inet_stream_connect()调用tcp_v4_connect发送三次握手的第一次syn请求, 并根据so
阅读全文
摘要:static int __must_check tcp_queue_rcv(struct sock *sk, struct sk_buff *skb, int hdrlen, bool *fragstolen) { int eaten; /* 取队尾 */ struct sk_buff *tail
阅读全文
摘要:直接看代码 //后面整理相关信息 /* * This function implements the receiving procedure of RFC 793 for * all states except ESTABLISHED and TIME_WAIT. * It's called fro
阅读全文
摘要:void tcp_rcv_established(struct sock *sk, struct sk_buff *skb, const struct tcphdr *th, unsigned int len) 主要是处理已经连理连接的输入的tcp数据包。tcp_rcv_established实际上
阅读全文
摘要:后面详细分析 先上传 之前总结查看源码后的总结 Nagle算法的基本定义是任意时刻,最多只能有一个未被确认的小段。所谓“小段”,指的是小于MSS尺寸的数据块,所谓“未被确认”,是指一个数据块发送出去后,没有收到对方发送的ACK确认该数据已收到。也就是没有收到ack 的时候不会再次发送数据出去。该算法
阅读全文
摘要:各种网络协议的数据结构
阅读全文
摘要:qdisc __dev_xmit_skb net_tx_action
阅读全文
摘要:dev_queue_xmit 链路层
阅读全文
摘要:ip_append_data 接口的使用 ip报文的输出
阅读全文
摘要:ip_push_pending_frames
阅读全文
摘要:ip_forward
阅读全文
摘要:ip_mc_output ip_output
阅读全文
摘要:简要分析ip层收发过程
阅读全文
摘要:简要分析了ip_local_deliver()以及ip_forward()
阅读全文
摘要:简要介绍ip输入报文的分片重组
阅读全文