batadv_skb_decrement_ttl(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… batadv_skb_decrement_ttl(9) πŸ’…

okay so bestie, this is a page from the Kernel API Manual about batadv_skb_decrement_ttl β€” and honestly? she's a tiny function with main character energy. buckle up πŸŽ€


✨ NAME ✨

batadv_skb_decrement_ttl β€” decrements the ttl inside a batman-adv header, and does it csum-safe. like, it doesn't wreck your checksums. queen behavior πŸ‘‘


🌸 SYNOPSIS 🌸

bool batadv_skb_decrement_ttl(struct sk_buff *skb);

πŸ¦‹ ARGUMENTS πŸ¦‹

  • skb β€” the received packet, and listen: skb->data has to be pointing at the batman-adv header. that's the whole vibe check fr fr 🫢

πŸ”₯ DESCRIPTION πŸ”₯

she supports a whole lineup of packet types, and every single one of them carries the TTL at offset 2. no cap, offset 2 for all of them. iconic consistency πŸ’–

  • batadv_ogm_packet
  • batadv_ogm2_packet
  • batadv_icmp_header
  • batadv_icmp_packet
  • batadv_icmp_tp_packet
  • batadv_icmp_packet_rr
  • batadv_unicast_packet
  • batadv_frag_packet
  • batadv_bcast_packet
  • batadv_mcast_packet
  • batadv_coded_packet
  • batadv_unicast_tvlv_packet

twelve packet types, all ate, no crumbs 🌈


⭐ RETURN ⭐

  • true β€” the packet may be forwarded, because the ttl got decremented. slay, she's still alive πŸ’…
  • false β€” the packet must be dropped, because the ttl would expire. rip bestie, she's done 😭

πŸ’œ SEE ALSO πŸ’œ

all the routing.c girlies, from the kernel file ./net/batman-adv/routing.c:

go read them, iykyk 🧚


and that's the whole page, bestie! this one comes to you live from ./net/batman-adv, dated October 2026 β€” the manual name is batadv_skb_decrement_ttl(9) in case you forgot already πŸ™ˆ mwah, go forward those packets responsibly πŸ’‹πŸ’–

πŸ“¦ where this page comes from