函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:vlan_get_protocol - get protocol EtherType.*@skb: skbuff to query*@type: first vlan protocol*@depth: buffer to store length of eth and vlan tags in bytes* Returns the EtherType of the packet, regardless of whether it is

函数原型:static inline __be16 __vlan_get_protocol(struct sk_buff *skb, __be16 type, int *depth)

返回类型:__be16

参数:

类型参数名称
struct sk_buff *skb
__be16type
int *depth
583  vlan_depth等于mac_len
589  如果h_type_vlan - check for valid vlan ether type.*@ethertype: ether type to check* Returns true if the ether type is a vlan ether type.
590  如果vlan_depth
594  否则
597  循环
604  vh等于datavlan_depth
607 h_type_vlan - check for valid vlan ether type.*@ethertype: ether type to check* Returns true if the ether type is a vlan ether type.循环
610  如果depthdepth等于vlan_depth
613  返回:type
调用者
名称描述
vlan_get_protocol 得到协议的以太网类型