batadv_bit_get_packet(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 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 cap
  • seq_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 honestly
  • seq_num_diff β€” the difference between the current/received sequence number and the last sequence number 🌈 literally just "received minus last", that's the diff
  • set_mark β€” whether this packet should be marked in seq_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, periodt
  • false β€” 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