batadv_frag_create(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… batadv_frag_create(9) πŸ’…

okay so we're in the Kernel API Manual today bestie, and this page is all about batadv_frag_create(9) β€” yes that's the title AND the manual name, we're keeping it cute and keeping it real ✨


🌸 NAME 🌸

batadv_frag_create β€” create a fragment from skb πŸ’–

like literally, it makes a fragment. from an skb. that's the whole vibe.


πŸŽ€ SYNOPSIS πŸŽ€

struct sk_buff * batadv_frag_create (struct net_device *net_dev , struct
sk_buff *skb , struct batadv_frag_packet *frag_head , unsigned int
fragment_size );

no cap, that's the whole signature 🫢


✨ ARGUMENTS ✨

  • net_dev β€” the outgoing device for the fragment. it's giving "where is this baby going" πŸ¦‹
  • skb β€” the skb you wanna create the fragment from. the raw material, the main character πŸ”₯
  • frag_head β€” the header to use in the new fragment. gotta have a cute lil header, iykyk πŸ‘‘
  • fragment_size β€” size of the new fragment. numbers matter, periodt ⭐

πŸ’œ DESCRIPTION πŸ’œ

so here's the tea β˜• β€” this function splits the passed skb into two fragments:

  1. a new one, with a size matching the passed mtu 🌈
  2. the old one, which keeps the rest πŸ’€

and the plot twist? the new skb contains data from the tail of the old skb. tail data. not head. the tail. don't get it twisted bestie πŸ™ˆ


πŸ“ RETURN πŸ“

  • the new fragment πŸŽ‰
  • NULL on error 😭 (we don't talk about the error case)

🧚 SEE ALSO 🧚

kernel file ./net/batman-adv/fragmentation.c β€” go read it, it's iconic, fr fr:

that's the whole friend group, they all ate πŸ’…


ok that's the page!! mwah 🫢 from the source ./net/batman-adv, dated October 2026, batman-adv version, signing off β€” slay, bye bestie πŸ’–βœ¨πŸŽ€
πŸ“¦ where this page comes from