vlan_insert_inner_tag(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… vlan_insert_inner_tag(9) β€” inner VLAN tag inserting πŸ’…

okay so bestie, welcome to the Kernel API Manual corner of the group chat 🫢 this page is literally about inner VLAN tag inserting, and it’s lowkey iconic. Let’s unpack it, no cap.

🌸 NAME 🌸

vlan_insert_inner_tag β€” inner VLAN tag inserting. That’s the whole name, periodt.

✨ SYNOPSIS ✨

struct sk_buff * vlan_insert_inner_tag (struct sk_buff *skb , __be16
vlan_proto , u16 vlan_tci , unsigned int mac_len );

πŸŽ€ ARGUMENTS πŸŽ€

  • skb β€” the skbuff to tag, bestie.
  • vlan_proto β€” VLAN encapsulation protocol.
  • vlan_tci β€” VLAN TCI to insert.
  • mac_len β€” MAC header length including outer vlan headers.

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so what it does: it inserts the VLAN tag into skb as part of the payload at offset mac_len, and it returns a VLAN tagged skb. Heads up: this might change skb->head β€” so don’t get too attached to that pointer, bestie 😭.

Following the skb_unshare example, if there’s an error, the calling function does not have to worry about freeing the original skb. That’s the self-care we deserve πŸ’….

It does not change skb->protocol, so this function can be used during receive. Slay.

πŸ‘‘ RETURN πŸ‘‘

  • On success: modified skb ✨
  • On error: NULL (and skb is freed) πŸ’€

🌈 SEE ALSO 🌈

the kernel file is right here: ./include/linux/if_vlan.h. And these related pages are all in the group chat too:


okay that’s the whole page, bestie 🫢 this was vlan_insert_inner_tag(9) from the Kernel API Manual, sourced from ./include/linux, dated October 2026. mwah πŸ’‹

πŸ“¦ where this page comes from