net/netlink/diag.c
Source file repositories/reference/linux-study-clean/net/netlink/diag.c
File Facts
- System
- Linux kernel
- Corpus path
net/netlink/diag.c- Extension
.c- Size
- 5672 bytes
- Lines
- 264
- Domain
- Networking Core
- Bucket
- Sockets, Protocols, Packet Path, And Network Policy
- Inferred role
- Networking Core: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hnet/sock.hlinux/netlink.hlinux/sock_diag.hlinux/netlink_diag.hlinux/rhashtable.haf_netlink.h
Detected Declarations
function sk_diag_dump_groupsfunction sk_diag_put_flagsfunction sk_diag_fillfunction __netlink_diag_dumpfunction netlink_diag_dumpfunction netlink_diag_dump_donefunction netlink_diag_handler_dumpfunction netlink_diag_initfunction netlink_diag_exitmodule init netlink_diag_init
Annotated Snippet
module_init(netlink_diag_init);
module_exit(netlink_diag_exit);
MODULE_DESCRIPTION("Netlink-based socket monitoring/diagnostic interface (sock_diag)");
MODULE_LICENSE("GPL");
MODULE_ALIAS_NET_PF_PROTO_TYPE(PF_NETLINK, NETLINK_SOCK_DIAG, 16 /* AF_NETLINK */);
Annotation
- Immediate include surface: `linux/module.h`, `net/sock.h`, `linux/netlink.h`, `linux/sock_diag.h`, `linux/netlink_diag.h`, `linux/rhashtable.h`, `af_netlink.h`.
- Detected declarations: `function sk_diag_dump_groups`, `function sk_diag_put_flags`, `function sk_diag_fill`, `function __netlink_diag_dump`, `function netlink_diag_dump`, `function netlink_diag_dump_done`, `function netlink_diag_handler_dump`, `function netlink_diag_init`, `function netlink_diag_exit`, `module init netlink_diag_init`.
- Atlas domain: Networking Core / Sockets, Protocols, Packet Path, And Network Policy.
- Implementation status: integration implementation candidate.
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.