![]() |
|
|||
0001 /* SPDX-License-Identifier: GPL-2.0 */ 0002 #ifndef __NETNS_SCTP_H__ 0003 #define __NETNS_SCTP_H__ 0004 0005 #include <linux/timer.h> 0006 #include <net/snmp.h> 0007 0008 struct sock; 0009 struct proc_dir_entry; 0010 struct sctp_mib; 0011 struct ctl_table_header; 0012 0013 struct netns_sctp { 0014 DEFINE_SNMP_STAT(struct sctp_mib, sctp_statistics); 0015 0016 #ifdef CONFIG_PROC_FS 0017 struct proc_dir_entry *proc_net_sctp; 0018 #endif 0019 #ifdef CONFIG_SYSCTL 0020 struct ctl_table_header *sysctl_header; 0021 #endif 0022 /* This is the global socket data structure used for responding to 0023 * the Out-of-the-blue (OOTB) packets. A control sock will be created 0024 * for this socket at the initialization time. 0025 */ 0026 struct sock *ctl_sock; 0027 0028 /* UDP tunneling listening sock. */ 0029 struct sock *udp4_sock; 0030 struct sock *udp6_sock; 0031 /* UDP tunneling listening port. */ 0032 int udp_port; 0033 /* UDP tunneling remote encap port. */ 0034 int encap_port; 0035 0036 /* This is the global local address list. 0037 * We actively maintain this complete list of addresses on 0038 * the system by catching address add/delete events. 0039 * 0040 * It is a list of sctp_sockaddr_entry. 0041 */ 0042 struct list_head local_addr_list; 0043 struct list_head addr_waitq; 0044 struct timer_list addr_wq_timer; 0045 struct list_head auto_asconf_splist; 0046 /* Lock that protects both addr_waitq and auto_asconf_splist */ 0047 spinlock_t addr_wq_lock; 0048 0049 /* Lock that protects the local_addr_list writers */ 0050 spinlock_t local_addr_lock; 0051 0052 /* RFC2960 Section 14. Suggested SCTP Protocol Parameter Values 0053 * 0054 * The following protocol parameters are RECOMMENDED: 0055 * 0056 * RTO.Initial - 3 seconds 0057 * RTO.Min - 1 second 0058 * RTO.Max - 60 seconds 0059 * RTO.Alpha - 1/8 (3 when converted to right shifts.) 0060 * RTO.Beta - 1/4 (2 when converted to right shifts.) 0061 */ 0062 unsigned int rto_initial; 0063 unsigned int rto_min; 0064 unsigned int rto_max; 0065 0066 /* Note: rto_alpha and rto_beta are really defined as inverse 0067 * powers of two to facilitate integer operations. 0068 */ 0069 int rto_alpha; 0070 int rto_beta; 0071 0072 /* Max.Burst - 4 */ 0073 int max_burst; 0074 0075 /* Whether Cookie Preservative is enabled(1) or not(0) */ 0076 int cookie_preserve_enable; 0077 0078 /* The namespace default hmac alg */ 0079 char *sctp_hmac_alg; 0080 0081 /* Valid.Cookie.Life - 60 seconds */ 0082 unsigned int valid_cookie_life; 0083 0084 /* Delayed SACK timeout 200ms default*/ 0085 unsigned int sack_timeout; 0086 0087 /* HB.interval - 30 seconds */ 0088 unsigned int hb_interval; 0089 0090 /* The interval for PLPMTUD probe timer */ 0091 unsigned int probe_interval; 0092 0093 /* Association.Max.Retrans - 10 attempts 0094 * Path.Max.Retrans - 5 attempts (per destination address) 0095 * Max.Init.Retransmits - 8 attempts 0096 */ 0097 int max_retrans_association; 0098 int max_retrans_path; 0099 int max_retrans_init; 0100 /* Potentially-Failed.Max.Retrans sysctl value 0101 * taken from: 0102 * http://tools.ietf.org/html/draft-nishida-tsvwg-sctp-failover-05 0103 */ 0104 int pf_retrans; 0105 0106 /* Primary.Switchover.Max.Retrans sysctl value 0107 * taken from: 0108 * https://tools.ietf.org/html/rfc7829 0109 */ 0110 int ps_retrans; 0111 0112 /* 0113 * Disable Potentially-Failed feature, the feature is enabled by default 0114 * pf_enable - 0 : disable pf 0115 * - >0 : enable pf 0116 */ 0117 int pf_enable; 0118 0119 /* 0120 * Disable Potentially-Failed state exposure, ignored by default 0121 * pf_expose - 0 : compatible with old applications (by default) 0122 * - 1 : disable pf state exposure 0123 * - 2 : enable pf state exposure 0124 */ 0125 int pf_expose; 0126 0127 /* 0128 * Policy for preforming sctp/socket accounting 0129 * 0 - do socket level accounting, all assocs share sk_sndbuf 0130 * 1 - do sctp accounting, each asoc may use sk_sndbuf bytes 0131 */ 0132 int sndbuf_policy; 0133 0134 /* 0135 * Policy for preforming sctp/socket accounting 0136 * 0 - do socket level accounting, all assocs share sk_rcvbuf 0137 * 1 - do sctp accounting, each asoc may use sk_rcvbuf bytes 0138 */ 0139 int rcvbuf_policy; 0140 0141 int default_auto_asconf; 0142 0143 /* Flag to indicate if addip is enabled. */ 0144 int addip_enable; 0145 int addip_noauth; 0146 0147 /* Flag to indicate if PR-SCTP is enabled. */ 0148 int prsctp_enable; 0149 0150 /* Flag to indicate if PR-CONFIG is enabled. */ 0151 int reconf_enable; 0152 0153 /* Flag to indicate if SCTP-AUTH is enabled */ 0154 int auth_enable; 0155 0156 /* Flag to indicate if stream interleave is enabled */ 0157 int intl_enable; 0158 0159 /* Flag to indicate if ecn is enabled */ 0160 int ecn_enable; 0161 0162 /* 0163 * Policy to control SCTP IPv4 address scoping 0164 * 0 - Disable IPv4 address scoping 0165 * 1 - Enable IPv4 address scoping 0166 * 2 - Selectively allow only IPv4 private addresses 0167 * 3 - Selectively allow only IPv4 link local address 0168 */ 0169 int scope_policy; 0170 0171 /* Threshold for rwnd update SACKS. Receive buffer shifted this many 0172 * bits is an indicator of when to send and window update SACK. 0173 */ 0174 int rwnd_upd_shift; 0175 0176 /* Threshold for autoclose timeout, in seconds. */ 0177 unsigned long max_autoclose; 0178 }; 0179 0180 #endif /* __NETNS_SCTP_H__ */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |