batadv_dat_get_vid(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… batadv_dat_get_vid(9) β€” like, the Kernel API Manual era ✨

okay bestie, welcome to the Kernel API Manual πŸ’– this one's all about batadv_dat_get_vid and honestly? she's a little diva with a realloc warning, so pay attention πŸŽ€


✨ NAME ✨

batadv_dat_get_vid β€” extract the VLAN identifier from skb if any πŸ¦‹ (yes, if any, she's conditional like that)


🌸 SYNOPSIS 🌸

unsigned short batadv_dat_get_vid (struct sk_buff *skb , int *hdr_size
);

πŸŽ€ ARGUMENTS πŸŽ€

  • skb β€” the buffer containing the packet to extract the VID from, iykyk 🫢
  • hdr_size β€” the size of the batman-adv header encapsulating the packet, literally the header size bestie πŸ’«

πŸ’œ DESCRIPTION πŸ’œ

okay so the caller must ensure that at least hdr_size + ETH_HLEN bytes are accessible after skb->data. that's on you, not on her πŸ’…

⚠️ Warning, and I mean it: this function calls batadv_get_vid and may therefore reallocate the skb data buffer 😭 any pointer into the skb data (e.g. obtained from skb->data or eth_hdr) before this call must be considered invalid afterwards and has to be reacquired. no cap, do not keep those stale pointers around, they will betray you πŸ’€

πŸ‘‘ RETURN πŸ‘‘

if the packet embedded in the skb is vlan tagged, this function returns the VID with the BATADV_VLAN_HAS_TAG flag 🌈 otherwise BATADV_NO_FLAGS is returned. slay, simple as that ✨


🌟 SEE ALSO 🌟

the kernel file is ./net/batman-adv/distributed-arp-table.c β€” go look, she ate πŸ”₯

and then the whole extended friend group, all of them, no skipped invites πŸ’–:


🫢 and that's the whole page babes!! brought to you by the folks over at ./net/batman-adv, dated October 2026, and this absolute icon of a manpage is batadv_dat_get_vid(9) β€” periodt πŸ’…βœ¨πŸ§šπŸ’œ

πŸ“¦ where this page comes from