vlan_get_protocol(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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:


that’s the whole page, bestie 🌈 β€” source ./include/linux, dated October 2026, answering to vlan_get_protocol(9). mwah πŸ’–πŸŽ€

πŸ“¦ where this page comes from