vlan_insert_inner_tag(9)
π 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(andskbis 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:
- Kernel file
./include/linux/if_vlan.h struct vlan_ethhdr(9)struct vlan_pcpu_stats(9)struct vlan_priority_tci_mapping(9)struct vlan_dev_priv(9)eth_type_vlan(9)__vlan_insert_inner_tag(9)__vlan_insert_tag(9)vlan_insert_tag(9)vlan_insert_tag_set_proto(9)__vlan_hwaccel_clear_tag(9)__vlan_hwaccel_copy_tag(9)__vlan_hwaccel_put_tag(9)__vlan_get_tag(9)__vlan_hwaccel_get_tag(9)vlan_get_tag(9)vlan_get_protocol_offset_inline(9)vlan_get_protocol(9)vlan_remove_tag(9)skb_vlan_tagged(9)skb_vlan_tagged_multi(9)vlan_features_check(9)compare_vlan_header(9)
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
- 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