net/8021q/vlanproc.c
Source file repositories/reference/linux-study-clean/net/8021q/vlanproc.c
File Facts
- System
- Linux kernel
- Corpus path
net/8021q/vlanproc.c- Extension
.c- Size
- 7650 bytes
- Lines
- 282
- Domain
- Networking Core
- Bucket
- Sockets, Protocols, Packet Path, And Network Policy
- Inferred role
- Networking Core: implementation source
- Status
- source implementation candidate
Why This File Exists
Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hlinux/errno.hlinux/kernel.hlinux/string.hlinux/proc_fs.hlinux/seq_file.hlinux/fs.hlinux/netdevice.hlinux/if_vlan.hnet/net_namespace.hnet/netns/generic.hvlanproc.hvlan.h
Detected Declarations
function vlan_proc_cleanupfunction vlan_proc_initfunction vlan_proc_add_devfunction vlan_proc_rem_devfunction for_each_netdev_dumpfunction vlan_seq_stopfunction vlan_seq_showfunction vlandev_seq_show
Annotated Snippet
while (mp) {
u16 vlan_qos = READ_ONCE(mp->vlan_qos);
seq_printf(seq, "%u:%d ",
mp->priority, ((vlan_qos >> 13) & 0x7));
mp = rcu_dereference(mp->next);
}
}
rcu_read_unlock();
seq_puts(seq, "\n");
return 0;
}
Annotation
- Immediate include surface: `linux/module.h`, `linux/errno.h`, `linux/kernel.h`, `linux/string.h`, `linux/proc_fs.h`, `linux/seq_file.h`, `linux/fs.h`, `linux/netdevice.h`.
- Detected declarations: `function vlan_proc_cleanup`, `function vlan_proc_init`, `function vlan_proc_add_dev`, `function vlan_proc_rem_dev`, `function for_each_netdev_dump`, `function vlan_seq_stop`, `function vlan_seq_show`, `function vlandev_seq_show`.
- Atlas domain: Networking Core / Sockets, Protocols, Packet Path, And Network Policy.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.