1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __NETNS_SCTP_H__
3 #define __NETNS_SCTP_H__
8 struct ctl_table_header;
11 DEFINE_SNMP_STAT(struct sctp_mib, sctp_statistics);
14 struct proc_dir_entry *proc_net_sctp;
17 struct ctl_table_header *sysctl_header;
19 /* This is the global socket data structure used for responding to
20 * the Out-of-the-blue (OOTB) packets. A control sock will be created
21 * for this socket at the initialization time.
23 struct sock *ctl_sock;
25 /* UDP tunneling listening sock. */
26 struct sock *udp4_sock;
27 struct sock *udp6_sock;
28 /* UDP tunneling listening port. */
30 /* UDP tunneling remote encap port. */
33 /* This is the global local address list.
34 * We actively maintain this complete list of addresses on
35 * the system by catching address add/delete events.
37 * It is a list of sctp_sockaddr_entry.
39 struct list_head local_addr_list;
40 struct list_head addr_waitq;
41 struct timer_list addr_wq_timer;
42 struct list_head auto_asconf_splist;
43 /* Lock that protects both addr_waitq and auto_asconf_splist */
44 spinlock_t addr_wq_lock;
46 /* Lock that protects the local_addr_list writers */
47 spinlock_t local_addr_lock;
49 /* RFC2960 Section 14. Suggested SCTP Protocol Parameter Values
51 * The following protocol parameters are RECOMMENDED:
53 * RTO.Initial - 3 seconds
55 * RTO.Max - 60 seconds
56 * RTO.Alpha - 1/8 (3 when converted to right shifts.)
57 * RTO.Beta - 1/4 (2 when converted to right shifts.)
59 unsigned int rto_initial;
63 /* Note: rto_alpha and rto_beta are really defined as inverse
64 * powers of two to facilitate integer operations.
72 /* Whether Cookie Preservative is enabled(1) or not(0) */
73 int cookie_preserve_enable;
75 /* The namespace default hmac alg */
78 /* Valid.Cookie.Life - 60 seconds */
79 unsigned int valid_cookie_life;
81 /* Delayed SACK timeout 200ms default*/
82 unsigned int sack_timeout;
84 /* HB.interval - 30 seconds */
85 unsigned int hb_interval;
87 /* The interval for PLPMTUD probe timer */
88 unsigned int probe_interval;
90 /* Association.Max.Retrans - 10 attempts
91 * Path.Max.Retrans - 5 attempts (per destination address)
92 * Max.Init.Retransmits - 8 attempts
94 int max_retrans_association;
97 /* Potentially-Failed.Max.Retrans sysctl value
99 * http://tools.ietf.org/html/draft-nishida-tsvwg-sctp-failover-05
103 /* Primary.Switchover.Max.Retrans sysctl value
105 * https://tools.ietf.org/html/rfc7829
110 * Disable Potentially-Failed feature, the feature is enabled by default
111 * pf_enable - 0 : disable pf
117 * Disable Potentially-Failed state exposure, ignored by default
118 * pf_expose - 0 : compatible with old applications (by default)
119 * - 1 : disable pf state exposure
120 * - 2 : enable pf state exposure
125 * Policy for preforming sctp/socket accounting
126 * 0 - do socket level accounting, all assocs share sk_sndbuf
127 * 1 - do sctp accounting, each asoc may use sk_sndbuf bytes
132 * Policy for preforming sctp/socket accounting
133 * 0 - do socket level accounting, all assocs share sk_rcvbuf
134 * 1 - do sctp accounting, each asoc may use sk_rcvbuf bytes
138 int default_auto_asconf;
140 /* Flag to indicate if addip is enabled. */
144 /* Flag to indicate if PR-SCTP is enabled. */
147 /* Flag to indicate if PR-CONFIG is enabled. */
150 /* Flag to indicate if SCTP-AUTH is enabled */
153 /* Flag to indicate if stream interleave is enabled */
156 /* Flag to indicate if ecn is enabled */
160 * Policy to control SCTP IPv4 address scoping
161 * 0 - Disable IPv4 address scoping
162 * 1 - Enable IPv4 address scoping
163 * 2 - Selectively allow only IPv4 private addresses
164 * 3 - Selectively allow only IPv4 link local address
168 /* Threshold for rwnd update SACKS. Receive buffer shifted this many
169 * bits is an indicator of when to send and window update SACK.
173 /* Threshold for autoclose timeout, in seconds. */
174 unsigned long max_autoclose;
177 #endif /* __NETNS_SCTP_H__ */