batadv_mcas..._expand_head(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… batadv_mcas..._expand_head(9) πŸ’…

okay so real talk, bestie, we're in the Kernel API Manual today and this little icon is called batadv_mcast_forw_expand_head β€” say that five times fast, i literally can't 😭. it's giving batman-adv multicast energy and honestly? we're obsessed.


✨ NAME ✨

batadv_mcast_forw_expand_head β€” expand headroom for an mcast packet πŸŽ€

like, it makes room at the front of your packet. that's the whole vibe.


🌸 SYNOPSIS 🌸

int batadv_mcast_forw_expand_head (struct batadv_priv *bat_priv , struct
       sk_buff *skb );

two args, one int back, we love a tidy little signature bestie 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • bat_priv β€” the bat priv with all the mesh interface information ✨ like, all of it. every little mesh interface detail lives in here, it's the main character.
  • skb β€” the multicast packet to send πŸ’Œ the lil guy we're about to make room in.

πŸ’œ DESCRIPTION πŸ’œ

okay so here's the tea: this function tries to expand an skb's headroom so that its head to tail is 1298 bytes large (that's minimum IPv6 MTU + vlan ethernet header size, no cap πŸ“).

⚠️ Warning warning warning ⚠️ β€” this function may reallocate the skb data buffer via skb_cow/skb_linearize/... and bestie, that means any pointer into the skb data (e.g. obtained from skb->data or eth_hdr) that you grabbed before this call must be considered invalid afterwards and has to be reacquired. like, do not be out here using a stale pointer, it's giving undefined chaos πŸ’€πŸ™ˆ

πŸ”₯ RETURN πŸ”₯

  • -EINVAL β€” if the given skb's length is too large 😀
  • -ENOMEM β€” on memory allocation failure 😭
  • zero β€” on success! πŸŽ‰ slay, we love a zero return

🌈 SEE ALSO 🌈

the kernel file itself, first of all:

  • Kernel file ./net/batman-adv/multicast_forw.c

and then the whole friend group, no one left out, periodt πŸ‘‘:


k bye bestie, go expand some headroom responsibly πŸ’…βœ¨

this page lives in ./net/batman-adv, it's dated October 2026, and it signs off as batadv_mcas..._expand_head(9) β€” mwah, see u in the group chat πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from