Skip to content

Commit a657176

Browse files
committed
Update kernel_net
1 parent 0ae0e76 commit a657176

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

kernel_net.org

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,13 @@ static inline int ip_local_deliver_finish(struct sk_buff *skb)
9191
#+BEGIN_SRC c
9292
struct list_head tasks;
9393
#+END_SRC
94+
9. 发送处理
95+
#+BEGIN_SRC c
96+
int ip_queue_xmit(struct sk_buff *skb, int ipfragok)
97+
查找路由,找到然后增加3层头信息,最终经典的NF_HOOK
98+
return NF_HOOK(PF_INET, NF_IP_LOCAL_OUT, skb, NULL, rt->u.dst.dev,
99+
dst_output);
100+
int ip_route_output_flow(struct rtable **rp, struct flowi *flp, struct sock *sk, int flags)
101+
处理rawsocket情况
102+
static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len)
103+
#+END_SRC

0 commit comments

Comments
 (0)