include/net/netns/ipv4.h
Source file repositories/reference/linux-study-clean/include/net/netns/ipv4.h
File Facts
- System
- Linux kernel
- Corpus path
include/net/netns/ipv4.h- Extension
.h- Size
- 8023 bytes
- Lines
- 304
- 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/uidgid.hnet/inet_frag.hlinux/rcupdate.hlinux/seqlock.hlinux/siphash.h
Detected Declarations
struct ctl_table_headerstruct ipv4_devconfstruct fib_rules_opsstruct hlist_headstruct fib_tablestruct sockstruct local_portsstruct ping_group_rangestruct inet_hashinfostruct inet_timewait_death_rowstruct tcp_fastopen_contextstruct sysctl_fib_multipath_hash_seedstruct udp_tunnel_grostruct netns_ipv4
Annotated Snippet
struct local_ports {
u32 range; /* high << 16 | low */
bool warned;
};
struct ping_group_range {
seqlock_t lock;
kgid_t range[2];
};
struct inet_hashinfo;
struct inet_timewait_death_row {
refcount_t tw_refcount;
/* Padding to avoid false sharing, tw_refcount can be often written */
struct inet_hashinfo *hashinfo ____cacheline_aligned_in_smp;
int sysctl_max_tw_buckets;
};
struct tcp_fastopen_context;
#ifdef CONFIG_IP_ROUTE_MULTIPATH
struct sysctl_fib_multipath_hash_seed {
u32 user_seed;
u32 mp_seed;
};
#endif
struct udp_tunnel_gro {
struct sock __rcu *sk;
struct hlist_head list;
};
struct netns_ipv4 {
/* Cacheline organization can be found documented in
* Documentation/networking/net_cachelines/netns_ipv4_sysctl.rst.
* Please update the document when adding new fields.
*/
/* TX readonly hotpath cache lines */
__cacheline_group_begin(netns_ipv4_read_tx);
u8 sysctl_tcp_early_retrans;
u8 sysctl_tcp_tso_win_divisor;
u8 sysctl_tcp_tso_rtt_log;
u8 sysctl_tcp_autocorking;
int sysctl_tcp_min_snd_mss;
unsigned int sysctl_tcp_notsent_lowat;
int sysctl_tcp_limit_output_bytes;
int sysctl_tcp_min_rtt_wlen;
int sysctl_tcp_wmem[3];
u8 sysctl_ip_fwd_use_pmtu;
__cacheline_group_end(netns_ipv4_read_tx);
/* TXRX readonly hotpath cache lines */
__cacheline_group_begin(netns_ipv4_read_txrx);
u8 sysctl_tcp_shrink_window;
__cacheline_group_end(netns_ipv4_read_txrx);
/* RX readonly hotpath cache line */
__cacheline_group_begin(netns_ipv4_read_rx);
u8 sysctl_tcp_moderate_rcvbuf;
u8 sysctl_ip_early_demux;
u8 sysctl_tcp_early_demux;
u8 sysctl_tcp_l3mdev_accept;
/* 3 bytes hole, try to pack */
int sysctl_tcp_reordering;
int sysctl_tcp_rmem[3];
int sysctl_tcp_rcvbuf_low_rtt;
__cacheline_group_end(netns_ipv4_read_rx);
/* ICMP rate limiter hot cache line. */
__cacheline_group_begin_aligned(icmp);
atomic_t icmp_global_credit;
u32 icmp_global_stamp;
__cacheline_group_end_aligned(icmp);
struct inet_timewait_death_row tcp_death_row;
struct udp_table *udp_table;
#if IS_ENABLED(CONFIG_NET_UDP_TUNNEL)
/* Not in a pernet subsys because need to be available at GRO stage */
struct udp_tunnel_gro udp_tunnel_gro[2];
#endif
#ifdef CONFIG_SYSCTL
struct ctl_table_header *forw_hdr;
struct ctl_table_header *frags_hdr;
struct ctl_table_header *ipv4_hdr;
struct ctl_table_header *route_hdr;
Annotation
- Immediate include surface: `linux/uidgid.h`, `net/inet_frag.h`, `linux/rcupdate.h`, `linux/seqlock.h`, `linux/siphash.h`.
- Detected declarations: `struct ctl_table_header`, `struct ipv4_devconf`, `struct fib_rules_ops`, `struct hlist_head`, `struct fib_table`, `struct sock`, `struct local_ports`, `struct ping_group_range`, `struct inet_hashinfo`, `struct inet_timewait_death_row`.
- 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.