Chinaunix首页 | 论坛 | 博客
  • 博客访问: 157027
  • 博文数量: 23
  • 博客积分: 51
  • 博客等级: 民兵
  • 技术积分: 20
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-04 11:48
个人简介

be the change you want to see in the world

文章分类

全部博文(23)

文章存档

2014年(1)

2013年(20)

2011年(2)

分类:

2011-08-09 15:18:57

 

Bridgecode

linux/net/bridge

Bridge function

netif_receive_skb

br_handle_frame_hook

br_handle_frame()(net/bridge/br_input.c)

Ip/icmp/bridge

Receive/transmit

Rx/tx 相关档案

以下是网路封包从driver一直到socket的流程

netif_rx() (net/core/dev.c)

net_rx_action() (net/core/dev.c)

process_backlog() (net/core/dev.c)

netif_receive_skb() (net/core/dev.c) =呼叫handle_bridge()

deliver_skb() (net/core/dev.c)

ip_rcv() (net/ipv4/ip_input.c)

netfilter prerouting hook

ip_rcv_finish() (net/ipv4/ip_input.c)

call routing code

ip_route_input (net/ipv4/route.c)

ip_local_deliver() (net/ipv4/ip_input.c)

netfilter localin hook

ip_local_deliver [net/ipv4/ip_input.c]
ip_defrag [net/ipv4/ip_fragment.c]
ip_local_deliver_finish() (net/ipv4/ip_input.c)

call ipv4 protocal

如果封包是udp

udp_rcv() (net/ipv4/udp.c)

lookup socket, if any

udp_queue_rcv_skb()

sock_queue_rcv_skb() (include/net/sock.h)

enqueue into socket receiver queue

sock_def_readable() (net/core/sock.c)

wake_sup_interruptible() on socket waitqueue

return from recv() via socketcall

如果封包是tcp

tcp_v4_rcv (net/ipv4/tcp_ipv4.c)

__tcp_v4_lookup

tcp_v4_do_rcv

tcp_rcv_established (net/ipv4/tcp_input.c)

__skb_queue_tail (include/linux/skbuff.)

sock_def_readable (net/core/sock.c)

wake_up_interruptible (include/linux/sched.h)
tcp_v4_hnd_req (net/ipv4/tcp_ipv4.c)
tcp_v4_search_req
tcp_check_req
tcp_v4_syn_recv_sock
__tcp_v4_lookup_established
tcp_rcv_state_process (net/ipv4/tcp_input.c)
tcp_v4_conn_request (net/ipv4/tcp_ipv4.c)
tcp_v4_send_synack
tcp_v4_synq_add
tcp_rcv_synsent_state_process (net/ipv4/tcp_input.c)
tcp_set_state (include/net/tcp.h)
tcp_send_ack (net/ipv4/tcp_output.c]

其他相关

linux/net/ ipv4/ip_output.c

icmp: linux/net/ ipv4/icmp.c

linux/net/bridge/br_device.c


阅读(1445) | 评论(0) | 转发(0) |
0

上一篇:没有了

下一篇:交换机端口untaged、taged、trunk、access 的区别

给主人留下些什么吧!~~