batadv_compare_eth(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… batadv_compare_eth(9) β€” like, the kernel API manual page, bestie

Okay so this is the batadv_compare_eth page from the Kernel API Manual, and honestly? It's short, it's sweet, it does one thing and it does it flawlessly. Main character energy fr.


🌸 NAME

batadv_compare_eth β€” compare two Ethernet addresses that are not u16-aligned πŸŽ€

Like, the whole point is that these addresses are not sitting pretty on a u16 boundary, and this function doesn't care. It compares them anyway. Iconic.


✨ SYNOPSIS

bool batadv_compare_eth (const void *data1 , const void *data2 );

Yup, that's it. Two const void * pointers, one bool coming back at you. No cap. πŸ¦‹


🫢 ARGUMENTS

  • data1 β€” pointer to a six-byte array holding the Ethernet address πŸ’–
  • data2 β€” pointer to the other six-byte array holding the Ethernet address πŸ’«

Two six-byte arrays walk into a function… and only one bool walks out. Periodt.


πŸ’€ NOTE

Bestie, listen: you can't use ether_addr_equal here, because that one requires aligned memory. So we don't. We use this instead. It's giving "we have ether_addr_equal at home" but in the good way, I promise. 🌈

Fr fr though β€” aligned memory is the whole reason this function exists. Don't come for it.

πŸ”₯ RETURN

true if they're the same Ethernet address πŸ‘‘πŸ’…

That's the vibe check: same addr β†’ true. That's the whole answer.


🧚 SEE ALSO

Kernel file ./net/batman-adv/main.h β€” and then the whole friend group: BATADV_TP_MAX_NUM(9), enum batadv_mesh_state(9), enum batadv_uev_action(9), enum batadv_uev_type(9), batadv_print_vid(9), batadv_has_timed_out(9), batadv_atomic_dec_not_zero(9), batadv_smallest_signed_int(9), batadv_seq_before(9), batadv_seq_after(9), batadv_add_counter(9), batadv_inc_counter(9), and BATADV_SKB_CB(9). 🌟 Go read them, they're all slay in their own way.


So yeah β€” that's the page, written from ./net/batman-adv, dated October 2026, version batadv_compare_eth(9). Byeee, go compare some unaligned Ethernet addresses, mwah πŸ’œπŸŒΈ

πŸ“¦ where this page comes from