14db67e80SEric W. Biederman #ifndef __NETNS_SCTP_H__ 24db67e80SEric W. Biederman #define __NETNS_SCTP_H__ 34db67e80SEric W. Biederman 42ce95503SEric W. Biederman struct sock; 513d782f6SEric W. Biederman struct proc_dir_entry; 6b01a2407SEric W. Biederman struct sctp_mib; 7ebb7e95dSEric W. Biederman struct ctl_table_header; 82ce95503SEric W. Biederman 94db67e80SEric W. Biederman struct netns_sctp { 10b01a2407SEric W. Biederman DEFINE_SNMP_STAT(struct sctp_mib, sctp_statistics); 11b01a2407SEric W. Biederman 1213d782f6SEric W. Biederman #ifdef CONFIG_PROC_FS 1313d782f6SEric W. Biederman struct proc_dir_entry *proc_net_sctp; 1413d782f6SEric W. Biederman #endif 15ebb7e95dSEric W. Biederman #ifdef CONFIG_SYSCTL 16ebb7e95dSEric W. Biederman struct ctl_table_header *sysctl_header; 17ebb7e95dSEric W. Biederman #endif 182ce95503SEric W. Biederman /* This is the global socket data structure used for responding to 192ce95503SEric W. Biederman * the Out-of-the-blue (OOTB) packets. A control sock will be created 202ce95503SEric W. Biederman * for this socket at the initialization time. 212ce95503SEric W. Biederman */ 222ce95503SEric W. Biederman struct sock *ctl_sock; 232ce95503SEric W. Biederman 244db67e80SEric W. Biederman /* This is the global local address list. 254db67e80SEric W. Biederman * We actively maintain this complete list of addresses on 264db67e80SEric W. Biederman * the system by catching address add/delete events. 274db67e80SEric W. Biederman * 284db67e80SEric W. Biederman * It is a list of sctp_sockaddr_entry. 294db67e80SEric W. Biederman */ 304db67e80SEric W. Biederman struct list_head local_addr_list; 314db67e80SEric W. Biederman struct list_head addr_waitq; 324db67e80SEric W. Biederman struct timer_list addr_wq_timer; 334db67e80SEric W. Biederman struct list_head auto_asconf_splist; 344db67e80SEric W. Biederman spinlock_t addr_wq_lock; 354db67e80SEric W. Biederman 364db67e80SEric W. Biederman /* Lock that protects the local_addr_list writers */ 374db67e80SEric W. Biederman spinlock_t local_addr_lock; 38ebb7e95dSEric W. Biederman 39*e1fc3b14SEric W. Biederman /* RFC2960 Section 14. Suggested SCTP Protocol Parameter Values 40*e1fc3b14SEric W. Biederman * 41*e1fc3b14SEric W. Biederman * The following protocol parameters are RECOMMENDED: 42*e1fc3b14SEric W. Biederman * 43*e1fc3b14SEric W. Biederman * RTO.Initial - 3 seconds 44*e1fc3b14SEric W. Biederman * RTO.Min - 1 second 45*e1fc3b14SEric W. Biederman * RTO.Max - 60 seconds 46*e1fc3b14SEric W. Biederman * RTO.Alpha - 1/8 (3 when converted to right shifts.) 47*e1fc3b14SEric W. Biederman * RTO.Beta - 1/4 (2 when converted to right shifts.) 48*e1fc3b14SEric W. Biederman */ 49*e1fc3b14SEric W. Biederman unsigned int rto_initial; 50*e1fc3b14SEric W. Biederman unsigned int rto_min; 51*e1fc3b14SEric W. Biederman unsigned int rto_max; 52*e1fc3b14SEric W. Biederman 53*e1fc3b14SEric W. Biederman /* Note: rto_alpha and rto_beta are really defined as inverse 54*e1fc3b14SEric W. Biederman * powers of two to facilitate integer operations. 55*e1fc3b14SEric W. Biederman */ 56*e1fc3b14SEric W. Biederman int rto_alpha; 57*e1fc3b14SEric W. Biederman int rto_beta; 58*e1fc3b14SEric W. Biederman 59*e1fc3b14SEric W. Biederman /* Max.Burst - 4 */ 60*e1fc3b14SEric W. Biederman int max_burst; 61*e1fc3b14SEric W. Biederman 62*e1fc3b14SEric W. Biederman /* Whether Cookie Preservative is enabled(1) or not(0) */ 63*e1fc3b14SEric W. Biederman int cookie_preserve_enable; 64*e1fc3b14SEric W. Biederman 65*e1fc3b14SEric W. Biederman /* Valid.Cookie.Life - 60 seconds */ 66*e1fc3b14SEric W. Biederman unsigned int valid_cookie_life; 67*e1fc3b14SEric W. Biederman 68*e1fc3b14SEric W. Biederman /* Delayed SACK timeout 200ms default*/ 69*e1fc3b14SEric W. Biederman unsigned int sack_timeout; 70*e1fc3b14SEric W. Biederman 71*e1fc3b14SEric W. Biederman /* HB.interval - 30 seconds */ 72*e1fc3b14SEric W. Biederman unsigned int hb_interval; 73*e1fc3b14SEric W. Biederman 74*e1fc3b14SEric W. Biederman /* Association.Max.Retrans - 10 attempts 75*e1fc3b14SEric W. Biederman * Path.Max.Retrans - 5 attempts (per destination address) 76*e1fc3b14SEric W. Biederman * Max.Init.Retransmits - 8 attempts 77*e1fc3b14SEric W. Biederman */ 78*e1fc3b14SEric W. Biederman int max_retrans_association; 79*e1fc3b14SEric W. Biederman int max_retrans_path; 80*e1fc3b14SEric W. Biederman int max_retrans_init; 81*e1fc3b14SEric W. Biederman /* Potentially-Failed.Max.Retrans sysctl value 82*e1fc3b14SEric W. Biederman * taken from: 83*e1fc3b14SEric W. Biederman * http://tools.ietf.org/html/draft-nishida-tsvwg-sctp-failover-05 84*e1fc3b14SEric W. Biederman */ 85*e1fc3b14SEric W. Biederman int pf_retrans; 86*e1fc3b14SEric W. Biederman 87*e1fc3b14SEric W. Biederman /* 88*e1fc3b14SEric W. Biederman * Policy for preforming sctp/socket accounting 89*e1fc3b14SEric W. Biederman * 0 - do socket level accounting, all assocs share sk_sndbuf 90*e1fc3b14SEric W. Biederman * 1 - do sctp accounting, each asoc may use sk_sndbuf bytes 91*e1fc3b14SEric W. Biederman */ 92*e1fc3b14SEric W. Biederman int sndbuf_policy; 93*e1fc3b14SEric W. Biederman 94*e1fc3b14SEric W. Biederman /* 95*e1fc3b14SEric W. Biederman * Policy for preforming sctp/socket accounting 96*e1fc3b14SEric W. Biederman * 0 - do socket level accounting, all assocs share sk_rcvbuf 97*e1fc3b14SEric W. Biederman * 1 - do sctp accounting, each asoc may use sk_rcvbuf bytes 98*e1fc3b14SEric W. Biederman */ 99*e1fc3b14SEric W. Biederman int rcvbuf_policy; 100*e1fc3b14SEric W. Biederman 101*e1fc3b14SEric W. Biederman int default_auto_asconf; 102*e1fc3b14SEric W. Biederman 103*e1fc3b14SEric W. Biederman /* Flag to indicate if addip is enabled. */ 104*e1fc3b14SEric W. Biederman int addip_enable; 105*e1fc3b14SEric W. Biederman int addip_noauth; 106*e1fc3b14SEric W. Biederman 107*e1fc3b14SEric W. Biederman /* Flag to indicate if PR-SCTP is enabled. */ 108*e1fc3b14SEric W. Biederman int prsctp_enable; 109*e1fc3b14SEric W. Biederman 110*e1fc3b14SEric W. Biederman /* Flag to idicate if SCTP-AUTH is enabled */ 111*e1fc3b14SEric W. Biederman int auth_enable; 112*e1fc3b14SEric W. Biederman 113*e1fc3b14SEric W. Biederman /* 114*e1fc3b14SEric W. Biederman * Policy to control SCTP IPv4 address scoping 115*e1fc3b14SEric W. Biederman * 0 - Disable IPv4 address scoping 116*e1fc3b14SEric W. Biederman * 1 - Enable IPv4 address scoping 117*e1fc3b14SEric W. Biederman * 2 - Selectively allow only IPv4 private addresses 118*e1fc3b14SEric W. Biederman * 3 - Selectively allow only IPv4 link local address 119*e1fc3b14SEric W. Biederman */ 120*e1fc3b14SEric W. Biederman int scope_policy; 121*e1fc3b14SEric W. Biederman 122*e1fc3b14SEric W. Biederman /* Threshold for rwnd update SACKS. Receive buffer shifted this many 123*e1fc3b14SEric W. Biederman * bits is an indicator of when to send and window update SACK. 124*e1fc3b14SEric W. Biederman */ 125*e1fc3b14SEric W. Biederman int rwnd_upd_shift; 126*e1fc3b14SEric W. Biederman 127*e1fc3b14SEric W. Biederman /* Threshold for autoclose timeout, in seconds. */ 128*e1fc3b14SEric W. Biederman unsigned long max_autoclose; 1294db67e80SEric W. Biederman }; 1304db67e80SEric W. Biederman 1314db67e80SEric W. Biederman #endif /* __NETNS_SCTP_H__ */ 132