compare_vlan_header(9)
π 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 β
0if 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:
Kernel file ./include/linux/if_vlan.hstruct 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_get_protocol(9)vlan_remove_tag(9)skb_vlan_tagged(9)skb_vlan_tagged_multi(9)vlan_features_check(9)
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
- 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