parse_vlan_tag(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ parse_vlan_tag(9) πŸ¦‹

okay so bestie, welcome to the Kernel API Manual page for parse_vlan_tag β€” it's literally the function that parses a vlan tag from a vlan header, and we're gonna get into it together πŸ’…βœ¨.


🌸 NAME 🌸

parse_vlan_tag β€” it's giving "parse vlan tag from vlan header" energy, fr fr. That's the whole name-and-purpose situation πŸŽ€.

✨ SYNOPSIS ✨

int parse_vlan_tag (struct sk_buff *skb , struct vlan_head *key_vh ,
       bool untag_vlan );

That's the signature, character for character β€” don't come for me about the spaces, they're part of the look 😭.

πŸŽ€ ARGUMENTS πŸŽ€

  • skb β€” the skb containing the frame to parse. Yes bestie, that's the input frame vibe.
  • key_vh β€” pointer to parsed vlan tag. It's where the parsed tag goes.
  • untag_vlan β€” should the vlan header be removed from the frame? This bool is literally answering that question.

πŸ’– RETURN πŸ’–

  • ERROR on memory error β€” memory said no 😭.
  • 0 if it encounters a non-vlan or incomplete packet β€” so not every packet is gonna slay.
  • 1 after successfully parsing vlan tag β€” success era, periodt.

πŸ”₯ SEE ALSO πŸ”₯

The SEE ALSO vibes point you at the kernel file ./net/openvswitch/flow.c, plus get_ipv6_ext_hdrs(9), key_extract_l3l4(9), and key_extract(9) β€” go read those when you're done here, iykyk πŸ‘‘.


mwah πŸ’‹ source/version-and-date sign-off: this page comes from ./net/openvswitch, dated October 2026, and it's the parse_vlan_tag(9) page β€” periodt, that's the footer folded in with love 🫢🌈

πŸ“¦ where this page comes from