Files

218 lines
5.4 KiB
C
Raw Permalink Normal View History

/* SPDX-License-Identifier: GPL-2.0 */
2007-12-16 13:29:36 -08:00
/*
* ipv4 in net namespaces
*/
#ifndef __NETNS_IPV4_H__
#define __NETNS_IPV4_H__
2008-01-10 03:27:51 -08:00
#include <linux/uidgid.h>
#include <net/inet_frag.h>
2015-03-04 15:02:44 -08:00
#include <linux/rcupdate.h>
struct tcpm_hash_bucket;
struct ctl_table_header;
struct ipv4_devconf;
2008-01-10 03:27:51 -08:00
struct fib_rules_ops;
2008-01-10 03:28:24 -08:00
struct hlist_head;
struct fib_table;
struct sock;
struct local_ports {
seqlock_t lock;
int range[2];
bool warned;
};
struct ping_group_range {
seqlock_t lock;
kgid_t range[2];
};
struct inet_hashinfo;
struct inet_timewait_death_row {
atomic_t tw_count;
struct inet_hashinfo *hashinfo ____cacheline_aligned_in_smp;
int sysctl_max_tw_buckets;
};
2017-09-27 11:35:42 +08:00
struct tcp_fastopen_context;
2007-12-16 13:29:36 -08:00
struct netns_ipv4 {
2008-01-05 23:08:49 -08:00
#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;
struct ctl_table_header *xfrm4_hdr;
2008-01-05 23:08:49 -08:00
#endif
struct ipv4_devconf *devconf_all;
struct ipv4_devconf *devconf_dflt;
2018-03-22 12:45:32 +03:00
struct ip_ra_chain __rcu *ra_chain;
2018-03-22 12:45:40 +03:00
struct mutex ra_mutex;
2008-01-10 03:27:51 -08:00
#ifdef CONFIG_IP_MULTIPLE_TABLES
struct fib_rules_ops *rules_ops;
bool fib_has_custom_rules;
unsigned int fib_rules_require_fldissect;
2015-03-04 15:02:44 -08:00
struct fib_table __rcu *fib_main;
struct fib_table __rcu *fib_default;
#endif
bool fib_has_custom_local_routes;
#ifdef CONFIG_IP_ROUTE_CLASSID
int fib_num_tclassid_users;
2008-01-10 03:27:51 -08:00
#endif
2008-01-10 03:28:24 -08:00
struct hlist_head *fib_table_hash;
2015-03-05 21:21:18 -08:00
bool fib_offload_disabled;
struct sock *fibnl;
2015-01-29 15:58:09 -08:00
struct sock * __percpu *icmp_sk;
struct sock *mc_autojoin_sk;
2015-01-29 15:58:09 -08:00
struct inet_peer_base *peers;
2015-01-29 21:35:05 -08:00
struct sock * __percpu *tcp_sk;
struct netns_frags frags;
#ifdef CONFIG_NETFILTER
struct xt_table *iptable_filter;
struct xt_table *iptable_mangle;
struct xt_table *iptable_raw;
struct xt_table *arptable_filter;
#ifdef CONFIG_SECURITY
struct xt_table *iptable_security;
#endif
2008-10-08 11:35:10 +02:00
struct xt_table *nat_table;
#endif
int sysctl_icmp_echo_ignore_all;
int sysctl_icmp_echo_ignore_broadcasts;
int sysctl_icmp_ignore_bogus_error_responses;
int sysctl_icmp_ratelimit;
int sysctl_icmp_ratemask;
int sysctl_icmp_errors_use_inbound_ifaddr;
struct local_ports ip_local_ports;
2013-01-05 16:10:48 +00:00
int sysctl_tcp_ecn;
2015-05-19 21:04:22 +02:00
int sysctl_tcp_ecn_fallback;
int sysctl_ip_default_ttl;
int sysctl_ip_no_pmtu_disc;
int sysctl_ip_fwd_use_pmtu;
int sysctl_ip_fwd_update_priority;
int sysctl_ip_nonlocal_bind;
2016-02-15 12:11:29 +02:00
/* Shall we try to damage output packets if routing dev changes? */
int sysctl_ip_dynaddr;
int sysctl_ip_early_demux;
int sysctl_tcp_early_demux;
int sysctl_udp_early_demux;
2013-01-05 16:10:48 +00:00
int sysctl_fwmark_reflect;
2014-05-13 10:17:35 -07:00
int sysctl_tcp_fwmark_accept;
#ifdef CONFIG_NET_L3_MASTER_DEV
int sysctl_tcp_l3mdev_accept;
#endif
2015-02-10 09:53:16 +08:00
int sysctl_tcp_mtu_probing;
int sysctl_tcp_base_mss;
int sysctl_tcp_probe_threshold;
u32 sysctl_tcp_probe_interval;
int sysctl_tcp_keepalive_time;
int sysctl_tcp_keepalive_probes;
int sysctl_tcp_keepalive_intvl;
int sysctl_tcp_syn_retries;
int sysctl_tcp_synack_retries;
int sysctl_tcp_syncookies;
int sysctl_tcp_reordering;
2016-02-03 09:46:53 +02:00
int sysctl_tcp_retries1;
2016-02-03 09:46:54 +02:00
int sysctl_tcp_retries2;
int sysctl_tcp_orphan_retries;
int sysctl_tcp_fin_timeout;
unsigned int sysctl_tcp_notsent_lowat;
2016-12-25 14:33:16 +08:00
int sysctl_tcp_tw_reuse;
2017-06-07 10:34:37 -07:00
int sysctl_tcp_sack;
2017-06-07 10:34:38 -07:00
int sysctl_tcp_window_scaling;
2017-06-07 10:34:39 -07:00
int sysctl_tcp_timestamps;
2017-10-26 21:54:56 -07:00
int sysctl_tcp_early_retrans;
2017-10-26 21:54:57 -07:00
int sysctl_tcp_recovery;
int sysctl_tcp_thin_linear_timeouts;
int sysctl_tcp_slow_start_after_idle;
int sysctl_tcp_retrans_collapse;
2017-10-26 21:55:01 -07:00
int sysctl_tcp_stdurg;
2017-10-26 21:55:02 -07:00
int sysctl_tcp_rfc1337;
int sysctl_tcp_abort_on_overflow;
2017-10-26 21:55:04 -07:00
int sysctl_tcp_fack;
int sysctl_tcp_max_reordering;
2017-10-26 21:55:07 -07:00
int sysctl_tcp_dsack;
2017-10-26 21:55:08 -07:00
int sysctl_tcp_app_win;
2017-10-26 21:55:09 -07:00
int sysctl_tcp_adv_win_scale;
2017-10-26 21:55:10 -07:00
int sysctl_tcp_frto;
int sysctl_tcp_nometrics_save;
int sysctl_tcp_moderate_rcvbuf;
int sysctl_tcp_tso_win_divisor;
int sysctl_tcp_workaround_signed_windows;
int sysctl_tcp_limit_output_bytes;
int sysctl_tcp_challenge_ack_limit;
2017-10-27 07:47:27 -07:00
int sysctl_tcp_min_tso_segs;
2017-10-27 07:47:28 -07:00
int sysctl_tcp_min_rtt_wlen;
2017-10-27 07:47:29 -07:00
int sysctl_tcp_autocorking;
int sysctl_tcp_invalid_ratelimit;
int sysctl_tcp_pacing_ss_ratio;
int sysctl_tcp_pacing_ca_ratio;
int sysctl_tcp_wmem[3];
int sysctl_tcp_rmem[3];
2018-05-17 14:47:29 -07:00
int sysctl_tcp_comp_sack_nr;
2018-05-17 14:47:28 -07:00
unsigned long sysctl_tcp_comp_sack_delay_ns;
struct inet_timewait_death_row tcp_death_row;
2016-12-28 17:52:33 +08:00
int sysctl_max_syn_backlog;
2017-09-27 11:35:40 +08:00
int sysctl_tcp_fastopen;
const struct tcp_congestion_ops __rcu *tcp_congestion_control;
2017-09-27 11:35:42 +08:00
struct tcp_fastopen_context __rcu *tcp_fastopen_ctx;
spinlock_t tcp_fastopen_ctx_lock;
unsigned int sysctl_tcp_fastopen_blackhole_timeout;
atomic_t tfo_active_disable_times;
unsigned long tfo_active_disable_stamp;
2018-03-13 21:57:16 -07:00
int sysctl_udp_wmem_min;
int sysctl_udp_rmem_min;
#ifdef CONFIG_NET_L3_MASTER_DEV
int sysctl_udp_l3mdev_accept;
#endif
int sysctl_igmp_max_memberships;
2016-02-08 23:29:22 +02:00
int sysctl_igmp_max_msf;
int sysctl_igmp_llm_reports;
2016-02-08 23:29:24 +02:00
int sysctl_igmp_qrv;
struct ping_group_range ping_group_range;
2011-05-13 10:01:00 +00:00
atomic_t dev_addr_genid;
#ifdef CONFIG_SYSCTL
unsigned long *sysctl_local_reserved_ports;
int sysctl_ip_prot_sock;
#endif
#ifdef CONFIG_IP_MROUTE
2010-04-13 05:03:23 +00:00
#ifndef CONFIG_IP_MROUTE_MULTIPLE_TABLES
struct mr_table *mrt;
2010-04-13 05:03:23 +00:00
#else
struct list_head mr_tables;
struct fib_rules_ops *mr_rules_ops;
#endif
#endif
#ifdef CONFIG_IP_ROUTE_MULTIPATH
int sysctl_fib_multipath_use_neigh;
int sysctl_fib_multipath_hash_policy;
#endif
2016-12-03 16:45:06 +01:00
struct fib_notifier_ops *notifier_ops;
2016-12-03 16:45:06 +01:00
unsigned int fib_seq; /* protected by rtnl_mutex */
2017-09-27 08:23:13 +02:00
struct fib_notifier_ops *ipmr_notifier_ops;
unsigned int ipmr_seq; /* protected by rtnl_mutex */
2013-07-30 08:33:53 +08:00
atomic_t rt_genid;
2007-12-16 13:29:36 -08:00
};
#endif