compare_ether_header(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… compare_ether_header(9)

okay so bestie, welcome to the Kernel API Manual page for compare_ether_header(9) β€” we're comparing Ethernet headers and it's giving "tiny function, big networking energy." ✨

🌸 NAME

compare_ether_header β€” compare two Ethernet headers 🫢

✨ SYNOPSIS

unsigned long compare_ether_header (const void *a , const void *b );

πŸŽ€ ARGUMENTS

  • a β€” pointer to an Ethernet header πŸ’–
  • b β€” pointer to an Ethernet header πŸ’–

πŸ”₯ DESCRIPTION

This one compares two Ethernet headers and returns 0 if equal. Periodt. πŸ’…

It assumes that the network header (i.e., the IP header) is 4-byte aligned OR that the platform can handle unaligned access. That's the case for all packets coming into netif_receive_skb or similar entry points. no cap, that's literally the contract. ✨

heads up bestie: this alignment / unaligned-access assumption is part of the whole vibe check for this function. πŸ’€

πŸ‘‘ SEE ALSO

Kernel file ./include/linux/etherdevice.h β€” and the whole friend group:


cute little sign-off: this page's source sits in ./include/linux, dated October 2026 β€” that's the source/version-and-date situation, bestie, and compare_ether_header(9) is officially done. mwah πŸ’‹πŸ’–βœ¨

πŸ“¦ where this page comes from