batadv_mcas..._expand_head(9)
π 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 theskbdata buffer viaskb_cow/skb_linearize/... and bestie, that means any pointer into theskbdata (e.g. obtained fromskb->dataoreth_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 givenskb'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 π:
batadv_mcast_forw_skb_push(9),batadv_mcast_forw_push_padding(9),batadv_mcast_forw_push_est_padding(9),batadv_mcast_forw_orig_entry(9),batadv_mcast_forw_push_dest(9),batadv_mcast_forw_push_dests_list(9),batadv_mcast_forw_push_tt(9),batadv_mcast_forw_push_want_all(9),batadv_mcast_forw_push_want_rtr(9),batadv_mcast_forw_scrape(9),batadv_mcast_forw_push_scrape_padding(9),batadv_mcast_forw_push_insert_padding(9),batadv_mcast_forw_push_adjust_padding(9),batadv_mcast_forw_push_dests(9),batadv_mcast_forw_push_tracker(9),batadv_mcast_forw_push_tvlvs(9),batadv_mcast_forw_push_hdr(9),batadv_mcast_forw_scrub_dests(9),batadv_mcast_forw_shrink_fill(9),batadv_mcast_forw_shrink_pack_dests(9),batadv_mcast_forw_shrink_align_offset(9),batadv_mcast_forw_shrink_update_headers(9),batadv_mcast_forw_shrink_move_headers(9),batadv_mcast_forw_shrink_tracker(9),batadv_mcast_forw_packet(9),batadv_mcast_forw_tracker_tvlv_handler(9),batadv_mcast_forw_packet_hdrlen(9),batadv_mcast_forw_push(9),batadv_mcast_forw_mcsend(9)
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
- 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