batadv_seq_after(9)
β¨ batadv_seq_after(9) β¨
okay so this is a page from the Kernel API Manual and honestly? it's a little baddie π
πΈ NAME πΈ
batadv_seq_after β checks if a sequence number x is a successor of y π«Ά
π¦ SYNOPSIS π¦
batadv_seq_after (x , y );
π ARGUMENTS π
xβ the potential successor ofy, like, the one auditioning for the role πyβ the value we're comparingxagainst, the main character that everyone gets measured up to
π DESCRIPTION π
okay bestie so here's the tea: this one handles overflows and underflows, and it can correctly check for a successor unless the variable sequence number has grown by more than 2**(bitwidth(x)-1)-1. so like. it's giving "works great, within reason" β¨
which means, for a u8 with the maximum value 255, it would think:
- when adding nothing β it is neither a predecessor nor a successor π
- before adding more than
127to the starting value β it is a predecessor - when adding
128β it is neither a predecessor nor a successor π - after adding more than
127to the starting value β it is a successor π₯
ngl the middle ones are kinda the awkward "it's complicated" of sequence numbers π
β RETURN β
true when x is a successor of y, false otherwise. simple, iconic, no notes π
π SEE ALSO π
- Kernel file
./net/batman-adv/main.h 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_compare_eth(9)batadv_has_timed_out(9)batadv_atomic_dec_not_zero(9)batadv_smallest_signed_int(9)batadv_seq_before(9)batadv_add_counter(9)batadv_inc_counter(9)BATADV_SKB_CB(9)
okay that's the whole thing, you ate that π this was ./net/batman-adv, October 2026, batadv_seq_after(9) β mwah, go slay some sequence numbers, ily π§π
π¦ 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