skbuff详解.docx

上传人:b****1 文档编号:23005382 上传时间:2023-04-30 格式:DOCX 页数:13 大小:42.59KB
下载 相关 举报
skbuff详解.docx_第1页
第1页 / 共13页
skbuff详解.docx_第2页
第2页 / 共13页
skbuff详解.docx_第3页
第3页 / 共13页
skbuff详解.docx_第4页
第4页 / 共13页
skbuff详解.docx_第5页
第5页 / 共13页
点击查看更多>>
下载资源
资源描述

skbuff详解.docx

《skbuff详解.docx》由会员分享,可在线阅读,更多相关《skbuff详解.docx(13页珍藏版)》请在冰豆网上搜索。

skbuff详解.docx

skbuff详解

sk_buff数据结构图

一。

skbuff的结构图如下

二.Basicfunctionsforsk_buff

  

skb_headroom(),skb_tailroom()

Prototype/Description

intskb_headroom(conststructsk_buff*skb);

bytesatbufferhead

intskb_tailroom(conststructsk_buff*skb);

bytesatbuffer

Image

skb_reserve()

Prototype

voidskb_reserve(structsk_buff*skb,unsignedintlen);

Description

adjustheadroom

Image

skb_push()

Prototype

unsignedchar*skb_push(structsk_buff*skb,unsignedintlen);

Description

adddatatothestartofabuffer

Image

skb_pull()

Prototype

unsignedchar*skb_pull(structsk_buff*skb,unsignedintlen);

Description

removedatafromthestartofabuffer

Image

skb_put()

Prototype

unsignedchar*skb_put(structsk_buff*skb,unsignedintlen);

Description

adddatatoabuffer

Image

skb_trim()

Prototype

voidskb_trim(structsk_buff*skb,unsignedintlen);

Description

removeendfromabuffer

Image

三.Listofsk_buff

  Prototype/Description

__u32skb_queue_len(conststructsk_buff_head*list_);

getqueuelength

structsk_buff*skb_peek(structsk_buff_head*list);

getpointertotheheadelement

structsk_buff*skb_peek_tail(structsk_buff_head*list);

getpointertothetailelement

Image

 

skb_queue_head()

  Prototype

     voidskb_queue_head(structsk_buff_head*list,structsk_buff*newsk);   

  Description

  queueabufferatthelisthead

 Image

skb_queue_tail()

   Prototype

        voidskb_queue_tail(structsk_buff_head*list,structsk_buff*newsk);

  Description

queueabufferatthelistta

  Image

skb_dequeue()

Prototype

structsk_buff*skb_dequeue(structsk_buff_head*list);

Description

removefromtheheadofthequeue

Image

skb_dequeue_tail()

Prototype

structsk_buff*skb_dequeue_tail(structsk_buff_head*list);

Description

removefromthetailofthequeue

Image

skb_insert()

Prototype

voidskb_insert(structsk_buff*old,structsk_buff*newsk);

Description

insertabuffer

Image

skb_append()

Prototype

voidskb_append(structsk_buff*old,structsk_buff*newsk);

Description

appendabuffer

Image

skb_unlink()

Prototype

  voidskb_unlink(structsk_buff*skb); Description

 removeabufferfromalist

Image

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > PPT模板 > 简洁抽象

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1