vlan_get_protocol(9)
okay bestie, welcome to vlan_get_protocol(9) from the Kernel API Manual β sheβs tiny, sheβs iconic, and sheβs about to tell you which EtherType a packet is carrying π
β¨
π NAME π
vlan_get_protocol β get protocol EtherType. Like, thatβs the whole assignment, and she ate. π
β¨ SYNOPSIS β¨
__be16 vlan_get_protocol (const struct sk_buff *skb );
No cap, thatβs the exact signature β keep it character-for-character, bestie. π«Ά
πΈ ARGUMENTS πΈ
skbβ the skbuff to query π. Thatβs the packet-ish thing youβre asking, βbestie, whatβs your protocol?β
π¦ RETURN π¦
You get back the EtherType of the packet β regardless of whether it is vlan encapsulated (normal or hardware accelerated) or not. So yes, even with the vlan glow-up, she still tells you the real EtherType. π
π₯ SEE ALSO π₯
Kernel file ./include/linux/if_vlan.h β and literally the whole vlan friend group, no skips:
struct vlan_ethhdr(9)struct vlan_pcpu_stats(9)struct vlan_priority_tci_mapping(9)struct vlan_dev_priv(9)eth_type_vlan(9)__vlan_insert_inner_tag(9)__vlan_insert_tag(9)vlan_insert_inner_tag(9)vlan_insert_tag(9)vlan_insert_tag_set_proto(9)__vlan_hwaccel_clear_tag(9)__vlan_hwaccel_copy_tag(9)__vlan_hwaccel_put_tag(9)__vlan_get_tag(9)__vlan_hwaccel_get_tag(9)vlan_get_tag(9)vlan_get_protocol_offset_inline(9)vlan_remove_tag(9)skb_vlan_tagged(9)skb_vlan_tagged_multi(9)vlan_features_check(9)compare_vlan_header(9)
thatβs the whole page, bestie π β source ./include/linux, dated October 2026, answering to vlan_get_protocol(9). mwah ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms