sctp.h 3.4 KB

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