Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

问一个函数ipv6_skip_exthdr

47 views
Skip to first unread message

James

unread,
Apr 10, 2011, 6:02:52 AM4/10/11
to
在内核中函数ipv6_skip_exthdr的作用就是要跳过IPV6的扩展首部。其中用到的函数skb_header_pointer(const struct sk_buff *skb, int offset,int len, void *buffer)的作用好像是把指针向后挪offset个字节。
我想问一下,skb_header_pointer中在if (hlen - offset >= len)不成立时,调用的函数skb_copy_bits是做什么用的?
求牛人指点啊~~~~~

--

[m [36m※ 来源:·水木社区 http://newsmth.net·[FROM: 114.249.213.*] [m

乐观对待每一天

unread,
Apr 10, 2011, 8:06:55 AM4/10/11
to
skb_copy_bits是用来拷贝skb中的内容到新的skb的,
只有skb中线性区的内容不够的时候,skb_header_pointer才会拷贝。

【 在 good138 (James) 的大作中提到: 】
: 在内核中函数ipv6_skip_exthdr的作用就是要跳过IPV6的扩展首部。其中用到的函数skb_header_pointer(const struct sk_buff *skb, int offset,int len, void *buffer)的作用好像是把指针向后挪offset个字节。


: 我想问一下,skb_header_pointer中在if (hlen - offset >= len)不成立时,调用的函数skb_copy_bits是做什么用的?
: 求牛人指点啊~~~~~

: ...................

--

[m [1;36m※ 来源:·水木社区 newsmth.net·[FROM: 125.71.200.*] [m

James

unread,
Apr 11, 2011, 12:51:04 AM4/11/11
to

【 在 agoflybird (乐观对待每一天) 的大作中提到: 】
: skb_copy_bits是用来拷贝skb中的内容到新的skb的,
: 只有skb中线性区的内容不够的时候,skb_header_pointer才会拷贝。
多谢
--

[m [34m※ 来源:·水木社区 http://newsmth.net·[FROM: 124.254.28.*] [m

0 new messages