batadv_compare_eth(9)
π 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
- 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