函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\if_vlan.h Create Date:2022-07-27 07:04:31
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:__vlan_insert_inner_tag - inner VLAN tag inserting*@skb: skbuff to tag*@vlan_proto: VLAN encapsulation protocol*@vlan_tci: VLAN TCI to insert*@mac_len: MAC header length including outer vlan headers* Inserts the VLAN tag into @skb as part of the payload

函数原型:static inline int __vlan_insert_inner_tag(struct sk_buff *skb, __be16 vlan_proto, u16 vlan_tci, unsigned int mac_len)

返回类型:int

参数:

类型参数名称
struct sk_buff *skb
__be16vlan_proto
u16vlan_tci
unsigned intmac_len
339  如果skb_cow_head - skb_cow but only making the head writable*@skb: buffer to cow*@headroom: needed headroom* This function is identical to skb_cow except that we replace the* skb_cloned check by skb_header_cloned小于0则返回:负ENOMEM
342  在缓存区顶部设置数据
345  如果此条件成立可能性大(为编译器优化)(mac_len > Octets in ethernet type field )则memmove(data, data + The additional bytes required by VLAN* (in addition to the Ethernet header), mac_len - Octets in ethernet type field )
347  mac_header减等于The additional bytes required by VLAN* (in addition to the Ethernet header)
349  veth等于datamac_lenTotal octets in header.
352  如果此条件成立可能性大(为编译器优化)(mac_len >= Octets in ethernet type field )则
356  h_vlan_proto等于vlan_proto
357  否则
361  h_vlan_encapsulated_proto等于protocol
365  h_vlan_TCI等于htons(vlan_tci)
367  返回:0
调用者
名称描述
__vlan_insert_tag__vlan_insert_tag - regular VLAN tag inserting*@skb: skbuff to tag*@vlan_proto: VLAN encapsulation protocol*@vlan_tci: VLAN TCI to insert* Inserts the VLAN tag into @skb as part of the payload* Returns error if skb_cow_head fails.
vlan_insert_inner_tagvlan_insert_inner_tag - inner VLAN tag inserting*@skb: skbuff to tag*@vlan_proto: VLAN encapsulation protocol*@vlan_tci: VLAN TCI to insert*@mac_len: MAC header length including outer vlan headers* Inserts the VLAN tag into @skb as part of the payload at