Linux Audio

Check our new training course

Loading...
v5.4
  1/* SPDX-License-Identifier: GPL-2.0 */
  2/*
  3 * ipv4 in net namespaces
  4 */
  5
  6#ifndef __NETNS_IPV4_H__
  7#define __NETNS_IPV4_H__
  8
  9#include <linux/uidgid.h>
 10#include <net/inet_frag.h>
 11#include <linux/rcupdate.h>
 12#include <linux/siphash.h>
 13
 14struct tcpm_hash_bucket;
 15struct ctl_table_header;
 16struct ipv4_devconf;
 17struct fib_rules_ops;
 18struct hlist_head;
 19struct fib_table;
 20struct sock;
 21struct local_ports {
 22	seqlock_t	lock;
 23	int		range[2];
 24	bool		warned;
 25};
 26
 27struct ping_group_range {
 28	seqlock_t	lock;
 29	kgid_t		range[2];
 30};
 31
 32struct inet_hashinfo;
 33
 34struct inet_timewait_death_row {
 35	atomic_t		tw_count;
 36
 37	struct inet_hashinfo 	*hashinfo ____cacheline_aligned_in_smp;
 38	int			sysctl_max_tw_buckets;
 39};
 40
 41struct tcp_fastopen_context;
 42
 43struct netns_ipv4 {
 44#ifdef CONFIG_SYSCTL
 45	struct ctl_table_header	*forw_hdr;
 46	struct ctl_table_header	*frags_hdr;
 47	struct ctl_table_header	*ipv4_hdr;
 48	struct ctl_table_header *route_hdr;
 49	struct ctl_table_header *xfrm4_hdr;
 50#endif
 51	struct ipv4_devconf	*devconf_all;
 52	struct ipv4_devconf	*devconf_dflt;
 53	struct ip_ra_chain __rcu *ra_chain;
 54	struct mutex		ra_mutex;
 55#ifdef CONFIG_IP_MULTIPLE_TABLES
 56	struct fib_rules_ops	*rules_ops;
 57	bool			fib_has_custom_rules;
 58	unsigned int		fib_rules_require_fldissect;
 59	struct fib_table __rcu	*fib_main;
 60	struct fib_table __rcu	*fib_default;
 61#endif
 62	bool			fib_has_custom_local_routes;
 63#ifdef CONFIG_IP_ROUTE_CLASSID
 64	int			fib_num_tclassid_users;
 65#endif
 66	struct hlist_head	*fib_table_hash;
 67	bool			fib_offload_disabled;
 68	struct sock		*fibnl;
 69
 70	struct sock  * __percpu	*icmp_sk;
 71	struct sock		*mc_autojoin_sk;
 72
 73	struct inet_peer_base	*peers;
 74	struct sock  * __percpu	*tcp_sk;
 75	struct fqdir		*fqdir;
 76#ifdef CONFIG_NETFILTER
 77	struct xt_table		*iptable_filter;
 78	struct xt_table		*iptable_mangle;
 79	struct xt_table		*iptable_raw;
 80	struct xt_table		*arptable_filter;
 81#ifdef CONFIG_SECURITY
 82	struct xt_table		*iptable_security;
 83#endif
 84	struct xt_table		*nat_table;
 85#endif
 86
 87	int sysctl_icmp_echo_ignore_all;
 88	int sysctl_icmp_echo_ignore_broadcasts;
 89	int sysctl_icmp_ignore_bogus_error_responses;
 90	int sysctl_icmp_ratelimit;
 91	int sysctl_icmp_ratemask;
 92	int sysctl_icmp_errors_use_inbound_ifaddr;
 93
 94	struct local_ports ip_local_ports;
 95
 96	int sysctl_tcp_ecn;
 97	int sysctl_tcp_ecn_fallback;
 98
 99	int sysctl_ip_default_ttl;
100	int sysctl_ip_no_pmtu_disc;
101	int sysctl_ip_fwd_use_pmtu;
102	int sysctl_ip_fwd_update_priority;
103	int sysctl_ip_nonlocal_bind;
104	/* Shall we try to damage output packets if routing dev changes? */
105	int sysctl_ip_dynaddr;
106	int sysctl_ip_early_demux;
107#ifdef CONFIG_NET_L3_MASTER_DEV
108	int sysctl_raw_l3mdev_accept;
109#endif
110	int sysctl_tcp_early_demux;
111	int sysctl_udp_early_demux;
112
113	int sysctl_fwmark_reflect;
114	int sysctl_tcp_fwmark_accept;
115#ifdef CONFIG_NET_L3_MASTER_DEV
116	int sysctl_tcp_l3mdev_accept;
117#endif
118	int sysctl_tcp_mtu_probing;
119	int sysctl_tcp_mtu_probe_floor;
120	int sysctl_tcp_base_mss;
121	int sysctl_tcp_min_snd_mss;
122	int sysctl_tcp_probe_threshold;
123	u32 sysctl_tcp_probe_interval;
124
125	int sysctl_tcp_keepalive_time;
126	int sysctl_tcp_keepalive_probes;
127	int sysctl_tcp_keepalive_intvl;
128
129	int sysctl_tcp_syn_retries;
130	int sysctl_tcp_synack_retries;
131	int sysctl_tcp_syncookies;
132	int sysctl_tcp_reordering;
133	int sysctl_tcp_retries1;
134	int sysctl_tcp_retries2;
135	int sysctl_tcp_orphan_retries;
136	int sysctl_tcp_fin_timeout;
137	unsigned int sysctl_tcp_notsent_lowat;
138	int sysctl_tcp_tw_reuse;
139	int sysctl_tcp_sack;
140	int sysctl_tcp_window_scaling;
141	int sysctl_tcp_timestamps;
142	int sysctl_tcp_early_retrans;
143	int sysctl_tcp_recovery;
144	int sysctl_tcp_thin_linear_timeouts;
145	int sysctl_tcp_slow_start_after_idle;
146	int sysctl_tcp_retrans_collapse;
147	int sysctl_tcp_stdurg;
148	int sysctl_tcp_rfc1337;
149	int sysctl_tcp_abort_on_overflow;
150	int sysctl_tcp_fack;
151	int sysctl_tcp_max_reordering;
152	int sysctl_tcp_dsack;
153	int sysctl_tcp_app_win;
154	int sysctl_tcp_adv_win_scale;
155	int sysctl_tcp_frto;
156	int sysctl_tcp_nometrics_save;
157	int sysctl_tcp_moderate_rcvbuf;
158	int sysctl_tcp_tso_win_divisor;
159	int sysctl_tcp_workaround_signed_windows;
160	int sysctl_tcp_limit_output_bytes;
161	int sysctl_tcp_challenge_ack_limit;
162	int sysctl_tcp_min_tso_segs;
163	int sysctl_tcp_min_rtt_wlen;
164	int sysctl_tcp_autocorking;
165	int sysctl_tcp_invalid_ratelimit;
166	int sysctl_tcp_pacing_ss_ratio;
167	int sysctl_tcp_pacing_ca_ratio;
168	int sysctl_tcp_wmem[3];
169	int sysctl_tcp_rmem[3];
170	int sysctl_tcp_comp_sack_nr;
171	unsigned long sysctl_tcp_comp_sack_delay_ns;
172	struct inet_timewait_death_row tcp_death_row;
173	int sysctl_max_syn_backlog;
174	int sysctl_tcp_fastopen;
175	const struct tcp_congestion_ops __rcu  *tcp_congestion_control;
176	struct tcp_fastopen_context __rcu *tcp_fastopen_ctx;
177	spinlock_t tcp_fastopen_ctx_lock;
178	unsigned int sysctl_tcp_fastopen_blackhole_timeout;
179	atomic_t tfo_active_disable_times;
180	unsigned long tfo_active_disable_stamp;
181
182	int sysctl_udp_wmem_min;
183	int sysctl_udp_rmem_min;
184
185#ifdef CONFIG_NET_L3_MASTER_DEV
186	int sysctl_udp_l3mdev_accept;
187#endif
188
189	int sysctl_igmp_max_memberships;
190	int sysctl_igmp_max_msf;
191	int sysctl_igmp_llm_reports;
192	int sysctl_igmp_qrv;
193
194	struct ping_group_range ping_group_range;
195
196	atomic_t dev_addr_genid;
197
198#ifdef CONFIG_SYSCTL
199	unsigned long *sysctl_local_reserved_ports;
200	int sysctl_ip_prot_sock;
201#endif
202
203#ifdef CONFIG_IP_MROUTE
204#ifndef CONFIG_IP_MROUTE_MULTIPLE_TABLES
205	struct mr_table		*mrt;
206#else
207	struct list_head	mr_tables;
208	struct fib_rules_ops	*mr_rules_ops;
209#endif
210#endif
211#ifdef CONFIG_IP_ROUTE_MULTIPATH
212	int sysctl_fib_multipath_use_neigh;
213	int sysctl_fib_multipath_hash_policy;
214#endif
215
216	struct fib_notifier_ops	*notifier_ops;
217	unsigned int	fib_seq;	/* protected by rtnl_mutex */
218
219	struct fib_notifier_ops	*ipmr_notifier_ops;
220	unsigned int	ipmr_seq;	/* protected by rtnl_mutex */
221
222	atomic_t	rt_genid;
223	siphash_key_t	ip_id_key;
224};
225#endif
v4.10.11
 
  1/*
  2 * ipv4 in net namespaces
  3 */
  4
  5#ifndef __NETNS_IPV4_H__
  6#define __NETNS_IPV4_H__
  7
  8#include <linux/uidgid.h>
  9#include <net/inet_frag.h>
 10#include <linux/rcupdate.h>
 
 11
 12struct tcpm_hash_bucket;
 13struct ctl_table_header;
 14struct ipv4_devconf;
 15struct fib_rules_ops;
 16struct hlist_head;
 17struct fib_table;
 18struct sock;
 19struct local_ports {
 20	seqlock_t	lock;
 21	int		range[2];
 22	bool		warned;
 23};
 24
 25struct ping_group_range {
 26	seqlock_t	lock;
 27	kgid_t		range[2];
 28};
 29
 
 
 
 
 
 
 
 
 
 
 
 30struct netns_ipv4 {
 31#ifdef CONFIG_SYSCTL
 32	struct ctl_table_header	*forw_hdr;
 33	struct ctl_table_header	*frags_hdr;
 34	struct ctl_table_header	*ipv4_hdr;
 35	struct ctl_table_header *route_hdr;
 36	struct ctl_table_header *xfrm4_hdr;
 37#endif
 38	struct ipv4_devconf	*devconf_all;
 39	struct ipv4_devconf	*devconf_dflt;
 
 
 40#ifdef CONFIG_IP_MULTIPLE_TABLES
 41	struct fib_rules_ops	*rules_ops;
 42	bool			fib_has_custom_rules;
 
 43	struct fib_table __rcu	*fib_main;
 44	struct fib_table __rcu	*fib_default;
 45#endif
 
 46#ifdef CONFIG_IP_ROUTE_CLASSID
 47	int			fib_num_tclassid_users;
 48#endif
 49	struct hlist_head	*fib_table_hash;
 50	bool			fib_offload_disabled;
 51	struct sock		*fibnl;
 52
 53	struct sock  * __percpu	*icmp_sk;
 54	struct sock		*mc_autojoin_sk;
 55
 56	struct inet_peer_base	*peers;
 57	struct sock  * __percpu	*tcp_sk;
 58	struct netns_frags	frags;
 59#ifdef CONFIG_NETFILTER
 60	struct xt_table		*iptable_filter;
 61	struct xt_table		*iptable_mangle;
 62	struct xt_table		*iptable_raw;
 63	struct xt_table		*arptable_filter;
 64#ifdef CONFIG_SECURITY
 65	struct xt_table		*iptable_security;
 66#endif
 67	struct xt_table		*nat_table;
 68#endif
 69
 70	int sysctl_icmp_echo_ignore_all;
 71	int sysctl_icmp_echo_ignore_broadcasts;
 72	int sysctl_icmp_ignore_bogus_error_responses;
 73	int sysctl_icmp_ratelimit;
 74	int sysctl_icmp_ratemask;
 75	int sysctl_icmp_errors_use_inbound_ifaddr;
 76
 77	struct local_ports ip_local_ports;
 78
 79	int sysctl_tcp_ecn;
 80	int sysctl_tcp_ecn_fallback;
 81
 82	int sysctl_ip_default_ttl;
 83	int sysctl_ip_no_pmtu_disc;
 84	int sysctl_ip_fwd_use_pmtu;
 
 85	int sysctl_ip_nonlocal_bind;
 86	/* Shall we try to damage output packets if routing dev changes? */
 87	int sysctl_ip_dynaddr;
 88	int sysctl_ip_early_demux;
 
 
 
 
 
 89
 90	int sysctl_fwmark_reflect;
 91	int sysctl_tcp_fwmark_accept;
 92#ifdef CONFIG_NET_L3_MASTER_DEV
 93	int sysctl_tcp_l3mdev_accept;
 94#endif
 95	int sysctl_tcp_mtu_probing;
 
 96	int sysctl_tcp_base_mss;
 
 97	int sysctl_tcp_probe_threshold;
 98	u32 sysctl_tcp_probe_interval;
 99
100	int sysctl_tcp_keepalive_time;
101	int sysctl_tcp_keepalive_probes;
102	int sysctl_tcp_keepalive_intvl;
103
104	int sysctl_tcp_syn_retries;
105	int sysctl_tcp_synack_retries;
106	int sysctl_tcp_syncookies;
107	int sysctl_tcp_reordering;
108	int sysctl_tcp_retries1;
109	int sysctl_tcp_retries2;
110	int sysctl_tcp_orphan_retries;
111	int sysctl_tcp_fin_timeout;
112	unsigned int sysctl_tcp_notsent_lowat;
113	int sysctl_tcp_tw_reuse;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
114
115	int sysctl_igmp_max_memberships;
116	int sysctl_igmp_max_msf;
117	int sysctl_igmp_llm_reports;
118	int sysctl_igmp_qrv;
119
120	struct ping_group_range ping_group_range;
121
122	atomic_t dev_addr_genid;
123
124#ifdef CONFIG_SYSCTL
125	unsigned long *sysctl_local_reserved_ports;
 
126#endif
127
128#ifdef CONFIG_IP_MROUTE
129#ifndef CONFIG_IP_MROUTE_MULTIPLE_TABLES
130	struct mr_table		*mrt;
131#else
132	struct list_head	mr_tables;
133	struct fib_rules_ops	*mr_rules_ops;
134#endif
135#endif
136#ifdef CONFIG_IP_ROUTE_MULTIPATH
137	int sysctl_fib_multipath_use_neigh;
 
138#endif
139
 
140	unsigned int	fib_seq;	/* protected by rtnl_mutex */
141
 
 
 
142	atomic_t	rt_genid;
 
143};
144#endif