compare_vlan_header(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… compare_vlan_header(9) β€” the Kernel API Manual, bestie edition πŸŽ€

okay so real talk, this is a page from the Kernel API Manual, and the star of the show today is compare_vlan_header(9) β€” yes, that's the whole name, she's got main character energy and a full-time job comparing VLAN headers. let's get into it ✨


🌸 NAME 🌸

compare_vlan_header β€” literally just compares two vlan headers. that's it. that's the gig. no cap 🫢


✨ SYNOPSIS ✨

unsigned long compare_vlan_header (const struct vlan_hdr *h1 , const
       struct vlan_hdr *h2 );

look at her go, returning an unsigned long and everything πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • h1 β€” pointer to a vlan header. that's one of the two things we're comparing, bestie πŸ’–
  • h2 β€” pointer to a vlan header. and this is the other one πŸŽ€

🌈 DESCRIPTION 🌈

okay so the whole vibe of this function is: compare two vlan headers. two headers walk in, one function checks if they match. iconic behaviour tbh πŸ‘‘

but listen β€” please note that the alignment of h1 & h2 are only guaranteed to be 16 bits. that's the caveat, don't forget it, iykyk πŸ™ˆ


⭐ RETURN ⭐

  • 0 if they're equal πŸ₯³
  • arbitrary non-zero value if they're not equal πŸ’€

that's right β€” arbitrary. don't go reading anything into the exact number, she's not telling you anything more than "nope" 😭


🧚 SEE ALSO 🧚

buckle up bestie, this list is long and we are not skipping a single one, every single reference stays:

like i said. the whole squad 🌸


fr fr though β€” every one of those is worth a look if you're deep in VLAN land. go click around, you got this 🫢

and that's the page!! mwah πŸ’‹ this little beauty lives in ./include/linux, dated October 2026, and yeah β€” she's compare_vlan_header(9) all the way down. slay πŸŽ€βœ¨πŸ”₯

πŸ“¦ where this page comes from