net/ipv4/nexthop.c
Source file repositories/reference/linux-study-clean/net/ipv4/nexthop.c
File Facts
- System
- Linux kernel
- Corpus path
net/ipv4/nexthop.c- Extension
.c- Size
- 103554 bytes
- Lines
- 4204
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- 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/nexthop.hlinux/rtnetlink.hlinux/slab.hlinux/vmalloc.hnet/arp.hnet/ip6_route.hnet/lwtunnel.hnet/ndisc.hnet/nexthop.hnet/route.hnet/sock.h
Detected Declarations
struct nh_dump_filterstruct rtm_dump_nh_ctxstruct rtm_dump_res_bucket_ctxstruct rtm_dump_nexthop_bucket_datafunction nexthop_notifiers_is_emptyfunction __nh_notifier_single_info_initfunction nh_notifier_single_info_initfunction nh_notifier_single_info_finifunction nh_notifier_mpath_info_initfunction nh_notifier_res_table_info_initfunction nh_notifier_grp_info_initfunction nh_notifier_grp_info_finifunction nh_notifier_info_initfunction nh_notifier_info_finifunction call_nexthop_notifiersfunction nh_notifier_res_bucket_idle_timer_getfunction nh_notifier_res_bucket_info_initfunction nh_notifier_res_bucket_info_finifunction __call_nexthop_res_bucket_notifiersfunction rtnl_dereferencefunction call_nexthop_res_table_notifiersfunction call_nexthop_notifierfunction nh_dev_hashfnfunction nexthop_devhash_addfunction nexthop_free_groupfunction nexthop_free_singlefunction nexthop_free_rcufunction nexthop_res_table_allocfunction nh_base_seq_incfunction nh_find_unused_idfunction nh_res_time_set_deadlinefunction nh_res_table_unbalanced_timefunction nla_put_nh_group_resfunction nh_grp_entry_stats_incfunction nh_grp_entry_stats_readfunction for_each_possible_cpufunction nh_notifier_grp_hw_stats_initfunction nh_notifier_grp_hw_stats_finifunction nh_grp_hw_stats_report_deltafunction nh_grp_hw_stats_apply_updatefunction nh_grp_hw_stats_updatefunction nla_put_nh_group_stats_entryfunction nla_put_nh_group_statsfunction nla_put_nh_groupfunction nh_fill_nodefunction nh_nlmsg_size_grp_resfunction nh_nlmsg_size_grpfunction nh_nlmsg_size_single
Annotated Snippet
subsys_initcall(nexthop_init);
Annotation
- Immediate include surface: `linux/nexthop.h`, `linux/rtnetlink.h`, `linux/slab.h`, `linux/vmalloc.h`, `net/arp.h`, `net/ip6_route.h`, `net/lwtunnel.h`, `net/ndisc.h`.
- Detected declarations: `struct nh_dump_filter`, `struct rtm_dump_nh_ctx`, `struct rtm_dump_res_bucket_ctx`, `struct rtm_dump_nexthop_bucket_data`, `function nexthop_notifiers_is_empty`, `function __nh_notifier_single_info_init`, `function nh_notifier_single_info_init`, `function nh_notifier_single_info_fini`, `function nh_notifier_mpath_info_init`, `function nh_notifier_res_table_info_init`.
- Atlas domain: Networking Core / Sockets, Protocols, Packet Path, And Network Policy.
- Implementation status: integration 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.