* Sets skb dst, assuming a reference was not taken on dst. * If dst entry is cached, we do not take reference and dst_release * will be avoided by refdst_drop. If dst entry is not cached, we take * reference, so
skb_dst_set需要在调用前增加引用计数(dst_clone);而skb_dst_set_noref不需要,其通过标志SKB_DST_NOREF用来标识此缓存没有引用计数,并且在skb_dst_drop函数释放路由缓存时,不进行释放操作 View Code 出口路由缓存 对于本地发出的数据包(本地创建分配的skb),其缓存的为出口路由。例如,作为TCP服务端,在回复客户端...
· void skb_clone_fraglist(struct sk_buff *skb) · void skb_drop_fraglist(struct sk_buff *skb) · void copy_skb_header(struct sk_buff *new, const struct sk_buff *old) · pskb_expand_head(struct sk_buff *skb, int nhead, int ntail, gfp_t gfp_mask) · int skb_copy_bits(const...
[SK_BUFF]: Introduce skb_transport_header(skb) Browse files Browse the repository at this point in the history For the places where we need a pointer to the transport header, it is still legal to touch skb->h.raw directly if just adding to, subtracting from or setting it to another...
NF_DROP 丢弃该数据包 NF_ACCEPT 保留该数据包 NF_STOLEN 忘掉该数据包 NF_QUEUE 将该数据包插入到用户空间 NF_REPEAT 再次调用该hook函数 NF_DROP这个返回值的含义是该数据包将被完全的丢弃,所有为它分配的资源都应当被释放。NF_ACCEPT这个返回值告诉Netfilter:到目前为止,该数据包还是被接受的并且该数据包应当...
(OK) 第五章 传输层(tcp)到网络层(ip)--基于Linux3.10 - dst_neigh_output() - neigh_resolve_output() 真正的离开了IP层 看tcp层向ip层发送数据的函数。 tcp的发送函数和接收函数一样位于net/ipv4/文件夹,文件名是tcp_output.c文件,传输层和网络层联系的函数是tcp_transmit_skb... = inet_csk_bind...
rt_dst_alloc+0x50/0xd0 ? ip_route_input_slow+0x19a/0x9a0 ? __udp_enqueue_schedule_skb+0x198/0x1b0 ? __udp4_lib_rcv+0x856/0xa30 ? __udp4_lib_rcv+0x856/0xa30 ? cpumask_next_and+0x19/0x20 ? find_busiest_group+0x12d/0xcd0 netdev_frame_hook+0xce/0x150 [openvswitch...
dstbuf = opt->dst1; #endif @@ -443,7 +443,7 @@ looped_back: break; } - opt->lastopt = opt->srcrt = skb->h.raw - skb->nh.raw; + opt->lastopt = opt->srcrt = skb_network_header_len(skb); skb->h.raw += (hdr->hdrlen + 1) << 3; ...
Ø 单播:调用br_fdb_find_rcu查找fdb表项, (1)若命中,调用br_forward()将数据包转发, (2)若表项为空,调用函数br_flood() br_flood(br, skb, pkt_type, local_rcv, false); 注意,如果发现目标地址是本地地址(判断方法目标表项dst->flags为BR_FDB_LOCAL),则直接调用br_pass_frame_up()发往本地,...
(%dx)):u8 ip_dst=+0x10(+0xe8(%dx)):u32 b16_dest=+0x16(+0xe8(%dx)):u16 comm=$comm body=+0x1c(+0xe8(%dx)):string' >> /sys/kernel/debug/tracing/kprobe_events echo 'proto==17&&ip_dst==0xdd01000a&&b16_dest==1063' > /sys/kernel/debug/tracing/instances/surftrace/events/...