batadv_bit_get_packet(9)
πΈ batadv_bit_get_packet β NAME πΈ
okay so bestie, batadv_bit_get_packet β it receives and processes one packet within the sequence number window π
like it's literally the little bouncer at the door of the seq-number window, checking vibes one packet at a time β¨
this one lives in the Kernel API Manual btw, so you know it's giving official-requirements energy π
π SYNOPSIS π
bool batadv_bit_get_packet (void *priv , unsigned long *seq_bits , s32
seq_num_diff , int set_mark );
k so that's the whole signature β four args, returns a bool, slay π
π¦ ARGUMENTS π¦
privβ the bat priv, aka the thing holding all the mesh interface information π«Ά like every single mesh-interface detail lives in there, no capseq_bitsβ a pointer to the sequence number bitmap of received packets π§ it's a bitmap, it's got bits, it's the whole point of the function honestlyseq_num_diffβ the difference between the current/received sequence number and the last sequence number π literally just "received minus last", that's the diffset_markβ whether this packet should be marked inseq_bitsβ yes or no, mark it or don't, that's the whole question
π RETURN π
trueβ the window was moved π₯ and bestie it counts if the packet was either new or very old, both of those move the window, periodtfalseβ the window was not moved/shifted π it stayed exactly where it was, no shift, no movement, nothing
so when you're reading the return value, don't assume true means "fresh packet" β it genuinely means "window moved", and "very old" moves it too π that's the whole iykyk of this function
π SEE ALSO π
- the kernel file
./net/batman-adv/bitarray.cπ β yes, that's the actual path,./net/batman-adv/bitarray.c, go read it batadv_bitmap_shift_left(9)π¦ the shifting sibling, the main character of the shift-left moment
and that's the page bestie π
β¨ source and version vibes: this is from ./net/batman-adv, and the date on it is October 2026 β go off, future manual ππ«Άπ
π¦ 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