__vlan_insert_inner_tag(9)
π NAME π
okay so bestie, welcome to the __vlan_insert_inner_tag(9) page from the Kernel API Manual β it's literally about inner VLAN tag inserting, and yes that's the whole name. iconic. π
β¨ SYNOPSIS β¨
the signature is exactly this, no cap:
int __vlan_insert_inner_tag (struct sk_buff *skb , __be16 vlan_proto ,
u16 vlan_tci , unsigned int mac_len );
π¦ ARGUMENTS π¦
skbβ the skbuff you're tagging, bestie π«Άvlan_protoβ the VLAN encapsulation protocol, periodt.vlan_tciβ the VLAN TCI to insert, lowkey important.mac_lenβ MAC header length including outer vlan headers β don't forget the outer vlan headers, iykyk π
πΈ DESCRIPTION πΈ
so the way this works is: it inserts the VLAN tag into skb as part of the payload at offset mac_len. that's the move. β¨
and it does not change skb->protocol, so this function can be used during receive. main character energy for receive paths, honestly. π¦
π RETURN π
it returns an error if skb_cow_head fails. that's the return vibe β if skb_cow_head fails, you get an error, and that's on periodt. π
π SEE ALSO π
go touch grass in the Kernel file ./include/linux/if_vlan.h, and also peek at the whole friend group:
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_tag(9)vlan_insert_inner_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 bye bestie! π source/version: ./include/linux Β· date: October 2026 Β· page: __vlan_insert_inner_tag(9) πβ¨
π¦ 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