Chinaunix首页 | 论坛 | 博客
  • 博客访问: 198137
  • 博文数量: 28
  • 博客积分: 1179
  • 博客等级: 上尉
  • 技术积分: 405
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-21 22:51
文章分类

全部博文(28)

文章存档

2012年(4)

2011年(8)

2010年(2)

2009年(6)

2008年(8)

分类: LINUX

2008-09-03 21:36:33

一。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
sk_buff{}, skb_headroom(), skb_tailroom()
skb_reserve()
Prototype
void skb_reserve(struct sk_buff *skb, unsigned int len);
Description
adjust headroom
Image
skb_reserve()
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_push()
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_pull()
skb_put()
Prototype
unsigned char *skb_put(struct sk_buff *skb, unsigned int len);
Description
add data to a buffer
Image
skb_put()
skb_trim()
Prototype
void skb_trim(struct sk_buff *skb, unsigned int len);
Description
remove end from a buffer
Image
skb_trim()
三.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_list_head{}, skb_peek(), skb_peek_tail(), skb_queue_len()
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_head()
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_queue_tail()
skb_dequeue()
Prototype
struct sk_buff *skb_dequeue(struct sk_buff_head *list);
Description
remove from the head of the queue
Image
skb_dequeue()
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_dequeue_tail()
skb_insert()
Prototype
void skb_insert(struct sk_buff *old, struct sk_buff *newsk);
Description
insert a buffer
Image

skb_insert()

skb_append()
Prototype
void skb_append(struct sk_buff *old, struct sk_buff *newsk);
Description
append a buffer
Image
skb_append()
Prototype
  void skb_unlink(struct sk_buff *skb); Description
  remove a buffer from a list
Image

skb_unlink()


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

上一篇:vim:基本命令

下一篇:Fedora下使用飞信

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