函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\test_bpf.c Create Date:2022-07-27 07:25:11
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:populate_skb

函数原型:static struct sk_buff *populate_skb(char *buf, int size)

返回类型:struct sk_buff

参数:

类型参数名称
char *buf
intsize
6472  如果size大于等于MAX_DATA则返回:NULL
6475  skb等于分配网络缓存
6476  如果非skb则返回:NULL
6479  __skb_put_data(skb, buf, size)
6482  skb_reset_mac_header(skb)
6483  protocol等于htons(Internet Protocol packet )
6484  pkt_type等于Few constants used to init test 'skb'
6485  mark等于SKB_MARK
6486  hash等于SKB_HASH
6487  Following fields are _not_ copied in __copy_skb_header() * Note that queue_mapping is here mostly to fill a hole.等于SKB_QUEUE_MAP
6488  vlan_tci等于SKB_VLAN_TCI
6489  vlan_present等于SKB_VLAN_PRESENT
6490  vlan_proto等于htons(Internet Protocol packet )
6491  dev_net_set( & dev, & Init's network namespace )
6492  dev等于dev
6493  ifindex等于SKB_DEV_IFINDEX
6494  type等于SKB_DEV_TYPE
6495  skb_set_network_header(skb, 两数取小(size, Total octets in header. ))
6497  返回:skb
调用者
名称描述
generate_test_data