免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3799 | 回复: 0
打印 上一主题 下一主题

sk_buff数据结构图 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-02-04 09:51 |只看该作者 |倒序浏览
sk_buff数据结构图
一。skbuff的结构图如下


二.Basic functions for sk_buff
   
skb_headroom(), skb_tailroom()
Prototype / Description
int skb_headroom(const struct sk_buff *skb);
bytes at buffer head
int skb_tailroom(const struct sk_buff *skb);
bytes at buffer
Image


skb_reserve()
Prototype
void skb_reserve(struct sk_buff *skb, unsigned int len);
Description
adjust headroom
Image


skb_push()
Prototype
unsigned char *skb_push(struct sk_buff *skb, unsigned int len);
Description
add data to the start of a buffer
Image


skb_pull()
Prototype
unsigned char *skb_pull(struct sk_buff *skb, unsigned int len);
Description
remove data from the start of a buffer
Image


skb_put()
Prototype
unsigned char *skb_put(struct sk_buff *skb, unsigned int len);
Description
add data to a buffer
Image


skb_trim()
Prototype
void skb_trim(struct sk_buff *skb, unsigned int len);
Description
remove end from a buffer
Image


三.List of sk_buff
   Prototype / Description
__u32 skb_queue_len(const struct sk_buff_head *list_);
get queue length
struct sk_buff *skb_peek(struct sk_buff_head *list);
get pointer to the head element
struct sk_buff *skb_peek_tail(struct sk_buff_head *list);
get pointer to the tail element
Image



skb_queue_head()
   Prototype
     void skb_queue_head(struct sk_buff_head *list, struct sk_buff *newsk);   
  Description
   queue a buffer at the list head
  Image


skb_queue_tail()
    Prototype
        void skb_queue_tail(struct sk_buff_head *list, struct sk_buff *newsk);
   Description
queue a buffer at the list ta
   Image


skb_dequeue()
Prototype
struct sk_buff *skb_dequeue(struct sk_buff_head *list);
Description
remove from the head of the queue
Image


skb_dequeue_tail()
Prototype
struct sk_buff *skb_dequeue_tail(struct sk_buff_head *list);
Description
remove from the tail of the queue
Image


skb_insert()
Prototype
void skb_insert(struct sk_buff *old, struct sk_buff *newsk);
Description
insert a buffer
Image


skb_append()
Prototype
void skb_append(struct sk_buff *old, struct sk_buff *newsk);
Description
append a buffer
Image


skb_unlink()
Prototype
  void skb_unlink(struct sk_buff *skb); Description
  remove a buffer from a list
Image




本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/94418/showart_2177469.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP