STRUCT VLAN_ETHHDR(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct vlan_ethhdr(9) ✨

okay bestie, so we're in the Kernel API Manual today and the star of the show is struct vlan_ethhdr β€” literally the VLAN ethernet header, which is just an ethhdr + a vlan_hdr sharing one iconic little home together πŸ’–


🌸 NAME 🌸

struct vlan_ethhdr β€” the vlan ethernet header (ethhdr + vlan_hdr), no cap 🫢


πŸŽ€ SYNOPSIS πŸŽ€

struct vlan_ethhdr {
    struct {
      unsigned char   h_dest[ETH_ALEN];
      unsigned char   h_source[ETH_ALEN];
    };
    __be16 h_vlan_proto;
    __be16 h_vlan_TCI;
    __be16 h_vlan_encapsulated_proto;
 };

like… look at her. she's structured. she's nested. she's main character energy ✨


πŸ¦‹ Members πŸ¦‹

  • {unnamed_struct} β€” anonymous πŸ™ˆ (yes that's the whole description, she's mysterious like that, iykyk)
  • h_dest β€” destination ethernet address 🎯
  • h_source β€” source ethernet address πŸ’«
  • h_vlan_proto β€” ethernet protocol πŸ”₯
  • h_vlan_TCI β€” priority and VLAN ID πŸ‘‘
  • h_vlan_encapsulated_proto β€” packet type ID or len πŸ“

πŸ’œ SEE ALSO πŸ’œ

Kernel file ./include/linux/if_vlan.h β€” and the whole squad, fr fr:

like, that's a whole group chat of vlan functions and this struct is the one holding the aux cord πŸ’…


and that's the tea! β˜• this delight lives in ./include/linux, dated October 2026, and it's the struct vlan_ethhdr(9) page β€” go forth and tag some packets, bestie πŸ§šπŸ’–

πŸ“¦ where this page comes from