sctp_sysctl.h 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627
  1. /*-
  2. * SPDX-License-Identifier: BSD-3-Clause
  3. *
  4. * Copyright (c) 2007, by Cisco Systems, Inc. All rights reserved.
  5. * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved.
  6. * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved.
  7. *
  8. * Redistribution and use in source and binary forms, with or without
  9. * modification, are permitted provided that the following conditions are met:
  10. *
  11. * a) Redistributions of source code must retain the above copyright notice,
  12. * this list of conditions and the following disclaimer.
  13. *
  14. * b) Redistributions in binary form must reproduce the above copyright
  15. * notice, this list of conditions and the following disclaimer in
  16. * the documentation and/or other materials provided with the distribution.
  17. *
  18. * c) Neither the name of Cisco Systems, Inc. nor the names of its
  19. * contributors may be used to endorse or promote products derived
  20. * from this software without specific prior written permission.
  21. *
  22. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  23. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
  24. * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  25. * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  26. * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  27. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  28. * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  29. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  30. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  31. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  32. * THE POSSIBILITY OF SUCH DAMAGE.
  33. */
  34. #if defined(__FreeBSD__) && !defined(__Userspace__)
  35. #include <sys/cdefs.h>
  36. __FBSDID("$FreeBSD$");
  37. #endif
  38. #ifndef _NETINET_SCTP_SYSCTL_H_
  39. #define _NETINET_SCTP_SYSCTL_H_
  40. #include <netinet/sctp_os.h>
  41. #include <netinet/sctp_constants.h>
  42. struct sctp_sysctl {
  43. uint32_t sctp_sendspace;
  44. uint32_t sctp_recvspace;
  45. uint32_t sctp_auto_asconf;
  46. uint32_t sctp_multiple_asconfs;
  47. uint32_t sctp_ecn_enable;
  48. uint32_t sctp_pr_enable;
  49. uint32_t sctp_auth_enable;
  50. uint32_t sctp_asconf_enable;
  51. uint32_t sctp_reconfig_enable;
  52. uint32_t sctp_nrsack_enable;
  53. uint32_t sctp_pktdrop_enable;
  54. uint32_t sctp_fr_max_burst_default;
  55. #if !(defined(__FreeBSD__) && !defined(__Userspace__))
  56. uint32_t sctp_no_csum_on_loopback;
  57. #endif
  58. uint32_t sctp_peer_chunk_oh;
  59. uint32_t sctp_max_burst_default;
  60. uint32_t sctp_max_chunks_on_queue;
  61. uint32_t sctp_hashtblsize;
  62. uint32_t sctp_pcbtblsize;
  63. uint32_t sctp_min_split_point;
  64. uint32_t sctp_chunkscale;
  65. uint32_t sctp_delayed_sack_time_default;
  66. uint32_t sctp_sack_freq_default;
  67. uint32_t sctp_system_free_resc_limit;
  68. uint32_t sctp_asoc_free_resc_limit;
  69. uint32_t sctp_heartbeat_interval_default;
  70. uint32_t sctp_pmtu_raise_time_default;
  71. uint32_t sctp_shutdown_guard_time_default;
  72. uint32_t sctp_secret_lifetime_default;
  73. uint32_t sctp_rto_max_default;
  74. uint32_t sctp_rto_min_default;
  75. uint32_t sctp_rto_initial_default;
  76. uint32_t sctp_init_rto_max_default;
  77. uint32_t sctp_valid_cookie_life_default;
  78. uint32_t sctp_init_rtx_max_default;
  79. uint32_t sctp_assoc_rtx_max_default;
  80. uint32_t sctp_path_rtx_max_default;
  81. uint32_t sctp_path_pf_threshold;
  82. uint32_t sctp_add_more_threshold;
  83. uint32_t sctp_nr_incoming_streams_default;
  84. uint32_t sctp_nr_outgoing_streams_default;
  85. uint32_t sctp_cmt_on_off;
  86. uint32_t sctp_cmt_use_dac;
  87. uint32_t sctp_use_cwnd_based_maxburst;
  88. uint32_t sctp_nat_friendly;
  89. uint32_t sctp_L2_abc_variable;
  90. uint32_t sctp_mbuf_threshold_count;
  91. uint32_t sctp_do_drain;
  92. uint32_t sctp_hb_maxburst;
  93. uint32_t sctp_abort_if_one_2_one_hits_limit;
  94. uint32_t sctp_min_residual;
  95. uint32_t sctp_max_retran_chunk;
  96. uint32_t sctp_logging_level;
  97. /* JRS - Variable for default congestion control module */
  98. uint32_t sctp_default_cc_module;
  99. /* RS - Variable for default stream scheduling module */
  100. uint32_t sctp_default_ss_module;
  101. uint32_t sctp_default_frag_interleave;
  102. uint32_t sctp_mobility_base;
  103. uint32_t sctp_mobility_fasthandoff;
  104. uint32_t sctp_inits_include_nat_friendly;
  105. uint32_t sctp_rttvar_bw;
  106. uint32_t sctp_rttvar_rtt;
  107. uint32_t sctp_rttvar_eqret;
  108. uint32_t sctp_steady_step;
  109. uint32_t sctp_use_dccc_ecn;
  110. uint32_t sctp_diag_info_code;
  111. #if defined(SCTP_LOCAL_TRACE_BUF)
  112. #if defined(_WIN32) && !defined(__Userspace__)
  113. struct sctp_log *sctp_log;
  114. #else
  115. struct sctp_log sctp_log;
  116. #endif
  117. #endif
  118. uint32_t sctp_udp_tunneling_port;
  119. uint32_t sctp_enable_sack_immediately;
  120. uint32_t sctp_vtag_time_wait;
  121. uint32_t sctp_buffer_splitting;
  122. uint32_t sctp_initial_cwnd;
  123. uint32_t sctp_blackhole;
  124. uint32_t sctp_sendall_limit;
  125. #if defined(SCTP_DEBUG)
  126. uint32_t sctp_debug_on;
  127. #endif
  128. #if defined(__APPLE__) && !defined(__Userspace__)
  129. uint32_t sctp_ignore_vmware_interfaces;
  130. uint32_t sctp_main_timer;
  131. uint32_t sctp_addr_watchdog_limit;
  132. uint32_t sctp_vtag_watchdog_limit;
  133. #endif
  134. #if defined(__APPLE__) && !defined(__Userspace__)
  135. uint32_t sctp_output_unlocked;
  136. #endif
  137. };
  138. /*
  139. * limits for the sysctl variables
  140. */
  141. /* maxdgram: Maximum outgoing SCTP buffer size */
  142. #define SCTPCTL_MAXDGRAM_DESC "Maximum outgoing SCTP buffer size"
  143. #define SCTPCTL_MAXDGRAM_MIN 0
  144. #define SCTPCTL_MAXDGRAM_MAX 0xFFFFFFFF
  145. #if defined(__Userspace__)
  146. #define SCTPCTL_MAXDGRAM_DEFAULT SB_MAX
  147. #else
  148. #define SCTPCTL_MAXDGRAM_DEFAULT 262144 /* 256k */
  149. #endif
  150. /* recvspace: Maximum incoming SCTP buffer size */
  151. #define SCTPCTL_RECVSPACE_DESC "Maximum incoming SCTP buffer size"
  152. #define SCTPCTL_RECVSPACE_MIN 0
  153. #define SCTPCTL_RECVSPACE_MAX 0xFFFFFFFF
  154. #if defined(__Userspace__)
  155. #define SCTPCTL_RECVSPACE_DEFAULT SB_RAW
  156. #else
  157. #define SCTPCTL_RECVSPACE_DEFAULT 262144 /* 256k */
  158. #endif
  159. /* autoasconf: Enable SCTP Auto-ASCONF */
  160. #define SCTPCTL_AUTOASCONF_DESC "Enable SCTP Auto-ASCONF"
  161. #define SCTPCTL_AUTOASCONF_MIN 0
  162. #define SCTPCTL_AUTOASCONF_MAX 1
  163. #define SCTPCTL_AUTOASCONF_DEFAULT 1
  164. /* autoasconf: Enable SCTP Auto-ASCONF */
  165. #define SCTPCTL_MULTIPLEASCONFS_DESC "Enable SCTP Multiple-ASCONFs"
  166. #define SCTPCTL_MULTIPLEASCONFS_MIN 0
  167. #define SCTPCTL_MULTIPLEASCONFS_MAX 1
  168. #define SCTPCTL_MULTIPLEASCONFS_DEFAULT SCTP_DEFAULT_MULTIPLE_ASCONFS
  169. /* ecn_enable: Enable SCTP ECN */
  170. #define SCTPCTL_ECN_ENABLE_DESC "Enable SCTP ECN"
  171. #define SCTPCTL_ECN_ENABLE_MIN 0
  172. #define SCTPCTL_ECN_ENABLE_MAX 1
  173. #define SCTPCTL_ECN_ENABLE_DEFAULT 1
  174. /* pr_enable: Enable PR-SCTP */
  175. #define SCTPCTL_PR_ENABLE_DESC "Enable PR-SCTP"
  176. #define SCTPCTL_PR_ENABLE_MIN 0
  177. #define SCTPCTL_PR_ENABLE_MAX 1
  178. #define SCTPCTL_PR_ENABLE_DEFAULT 1
  179. /* auth_enable: Enable SCTP AUTH function */
  180. #define SCTPCTL_AUTH_ENABLE_DESC "Enable SCTP AUTH function"
  181. #define SCTPCTL_AUTH_ENABLE_MIN 0
  182. #define SCTPCTL_AUTH_ENABLE_MAX 1
  183. #define SCTPCTL_AUTH_ENABLE_DEFAULT 1
  184. /* asconf_enable: Enable SCTP ASCONF */
  185. #define SCTPCTL_ASCONF_ENABLE_DESC "Enable SCTP ASCONF"
  186. #define SCTPCTL_ASCONF_ENABLE_MIN 0
  187. #define SCTPCTL_ASCONF_ENABLE_MAX 1
  188. #define SCTPCTL_ASCONF_ENABLE_DEFAULT 1
  189. /* reconfig_enable: Enable SCTP RE-CONFIG */
  190. #define SCTPCTL_RECONFIG_ENABLE_DESC "Enable SCTP RE-CONFIG"
  191. #define SCTPCTL_RECONFIG_ENABLE_MIN 0
  192. #define SCTPCTL_RECONFIG_ENABLE_MAX 1
  193. #define SCTPCTL_RECONFIG_ENABLE_DEFAULT 1
  194. /* nrsack_enable: Enable NR_SACK */
  195. #define SCTPCTL_NRSACK_ENABLE_DESC "Enable SCTP NR-SACK"
  196. #define SCTPCTL_NRSACK_ENABLE_MIN 0
  197. #define SCTPCTL_NRSACK_ENABLE_MAX 1
  198. #define SCTPCTL_NRSACK_ENABLE_DEFAULT 0
  199. /* pktdrop_enable: Enable SCTP Packet Drop Reports */
  200. #define SCTPCTL_PKTDROP_ENABLE_DESC "Enable SCTP PKTDROP"
  201. #define SCTPCTL_PKTDROP_ENABLE_MIN 0
  202. #define SCTPCTL_PKTDROP_ENABLE_MAX 1
  203. #define SCTPCTL_PKTDROP_ENABLE_DEFAULT 0
  204. /* loopback_nocsum: Enable NO Csum on packets sent on loopback */
  205. #define SCTPCTL_LOOPBACK_NOCSUM_DESC "Enable NO Csum on packets sent on loopback"
  206. #define SCTPCTL_LOOPBACK_NOCSUM_MIN 0
  207. #define SCTPCTL_LOOPBACK_NOCSUM_MAX 1
  208. #define SCTPCTL_LOOPBACK_NOCSUM_DEFAULT 1
  209. /* peer_chkoh: Amount to debit peers rwnd per chunk sent */
  210. #define SCTPCTL_PEER_CHKOH_DESC "Amount to debit peers rwnd per chunk sent"
  211. #define SCTPCTL_PEER_CHKOH_MIN 0
  212. #define SCTPCTL_PEER_CHKOH_MAX 0xFFFFFFFF
  213. #define SCTPCTL_PEER_CHKOH_DEFAULT 256
  214. /* maxburst: Default max burst for sctp endpoints */
  215. #define SCTPCTL_MAXBURST_DESC "Default max burst for sctp endpoints"
  216. #define SCTPCTL_MAXBURST_MIN 0
  217. #define SCTPCTL_MAXBURST_MAX 0xFFFFFFFF
  218. #define SCTPCTL_MAXBURST_DEFAULT SCTP_DEF_MAX_BURST
  219. /* fr_maxburst: Default max burst for sctp endpoints when fast retransmitting */
  220. #define SCTPCTL_FRMAXBURST_DESC "Default max burst for SCTP endpoints when fast retransmitting"
  221. #define SCTPCTL_FRMAXBURST_MIN 0
  222. #define SCTPCTL_FRMAXBURST_MAX 0xFFFFFFFF
  223. #define SCTPCTL_FRMAXBURST_DEFAULT SCTP_DEF_FRMAX_BURST
  224. /* maxchunks: Default max chunks on queue per asoc */
  225. #define SCTPCTL_MAXCHUNKS_DESC "Default max chunks on queue per asoc"
  226. #define SCTPCTL_MAXCHUNKS_MIN 0
  227. #define SCTPCTL_MAXCHUNKS_MAX 0xFFFFFFFF
  228. #define SCTPCTL_MAXCHUNKS_DEFAULT SCTP_ASOC_MAX_CHUNKS_ON_QUEUE
  229. /* tcbhashsize: Tunable for Hash table sizes */
  230. #define SCTPCTL_TCBHASHSIZE_DESC "Tunable for TCB hash table sizes"
  231. #define SCTPCTL_TCBHASHSIZE_MIN 1
  232. #define SCTPCTL_TCBHASHSIZE_MAX 0xFFFFFFFF
  233. #define SCTPCTL_TCBHASHSIZE_DEFAULT SCTP_TCBHASHSIZE
  234. /* pcbhashsize: Tunable for PCB Hash table sizes */
  235. #define SCTPCTL_PCBHASHSIZE_DESC "Tunable for PCB hash table sizes"
  236. #define SCTPCTL_PCBHASHSIZE_MIN 1
  237. #define SCTPCTL_PCBHASHSIZE_MAX 0xFFFFFFFF
  238. #define SCTPCTL_PCBHASHSIZE_DEFAULT SCTP_PCBHASHSIZE
  239. /* min_split_point: Minimum size when splitting a chunk */
  240. #define SCTPCTL_MIN_SPLIT_POINT_DESC "Minimum size when splitting a chunk"
  241. #define SCTPCTL_MIN_SPLIT_POINT_MIN 0
  242. #define SCTPCTL_MIN_SPLIT_POINT_MAX 0xFFFFFFFF
  243. #define SCTPCTL_MIN_SPLIT_POINT_DEFAULT SCTP_DEFAULT_SPLIT_POINT_MIN
  244. /* chunkscale: Tunable for Scaling of number of chunks and messages */
  245. #define SCTPCTL_CHUNKSCALE_DESC "Tunable for scaling of number of chunks and messages"
  246. #define SCTPCTL_CHUNKSCALE_MIN 1
  247. #define SCTPCTL_CHUNKSCALE_MAX 0xFFFFFFFF
  248. #define SCTPCTL_CHUNKSCALE_DEFAULT SCTP_CHUNKQUEUE_SCALE
  249. /* delayed_sack_time: Default delayed SACK timer in ms */
  250. #define SCTPCTL_DELAYED_SACK_TIME_DESC "Default delayed SACK timer in ms"
  251. #define SCTPCTL_DELAYED_SACK_TIME_MIN 0
  252. #define SCTPCTL_DELAYED_SACK_TIME_MAX 0xFFFFFFFF
  253. #define SCTPCTL_DELAYED_SACK_TIME_DEFAULT SCTP_RECV_MSEC
  254. /* sack_freq: Default SACK frequency */
  255. #define SCTPCTL_SACK_FREQ_DESC "Default SACK frequency"
  256. #define SCTPCTL_SACK_FREQ_MIN 0
  257. #define SCTPCTL_SACK_FREQ_MAX 0xFFFFFFFF
  258. #define SCTPCTL_SACK_FREQ_DEFAULT SCTP_DEFAULT_SACK_FREQ
  259. /* sys_resource: Max number of cached resources in the system */
  260. #define SCTPCTL_SYS_RESOURCE_DESC "Max number of cached resources in the system"
  261. #define SCTPCTL_SYS_RESOURCE_MIN 0
  262. #define SCTPCTL_SYS_RESOURCE_MAX 0xFFFFFFFF
  263. #define SCTPCTL_SYS_RESOURCE_DEFAULT SCTP_DEF_SYSTEM_RESC_LIMIT
  264. /* asoc_resource: Max number of cached resources in an asoc */
  265. #define SCTPCTL_ASOC_RESOURCE_DESC "Max number of cached resources in an asoc"
  266. #define SCTPCTL_ASOC_RESOURCE_MIN 0
  267. #define SCTPCTL_ASOC_RESOURCE_MAX 0xFFFFFFFF
  268. #define SCTPCTL_ASOC_RESOURCE_DEFAULT SCTP_DEF_ASOC_RESC_LIMIT
  269. /* heartbeat_interval: Default heartbeat interval in ms */
  270. #define SCTPCTL_HEARTBEAT_INTERVAL_DESC "Default heartbeat interval in ms"
  271. #define SCTPCTL_HEARTBEAT_INTERVAL_MIN 0
  272. #define SCTPCTL_HEARTBEAT_INTERVAL_MAX 0xFFFFFFFF
  273. #define SCTPCTL_HEARTBEAT_INTERVAL_DEFAULT SCTP_HB_DEFAULT_MSEC
  274. /* pmtu_raise_time: Default PMTU raise timer in seconds */
  275. #define SCTPCTL_PMTU_RAISE_TIME_DESC "Default PMTU raise timer in seconds"
  276. #define SCTPCTL_PMTU_RAISE_TIME_MIN 0
  277. #define SCTPCTL_PMTU_RAISE_TIME_MAX 0xFFFFFFFF
  278. #define SCTPCTL_PMTU_RAISE_TIME_DEFAULT SCTP_DEF_PMTU_RAISE_SEC
  279. /* shutdown_guard_time: Default shutdown guard timer in seconds */
  280. #define SCTPCTL_SHUTDOWN_GUARD_TIME_DESC "Shutdown guard timer in seconds (0 means 5 times RTO.Max)"
  281. #define SCTPCTL_SHUTDOWN_GUARD_TIME_MIN 0
  282. #define SCTPCTL_SHUTDOWN_GUARD_TIME_MAX 0xFFFFFFFF
  283. #define SCTPCTL_SHUTDOWN_GUARD_TIME_DEFAULT 0
  284. /* secret_lifetime: Default secret lifetime in seconds */
  285. #define SCTPCTL_SECRET_LIFETIME_DESC "Default secret lifetime in seconds"
  286. #define SCTPCTL_SECRET_LIFETIME_MIN 0
  287. #define SCTPCTL_SECRET_LIFETIME_MAX 0xFFFFFFFF
  288. #define SCTPCTL_SECRET_LIFETIME_DEFAULT SCTP_DEFAULT_SECRET_LIFE_SEC
  289. /* rto_max: Default maximum retransmission timeout in ms */
  290. #define SCTPCTL_RTO_MAX_DESC "Default maximum retransmission timeout in ms"
  291. #define SCTPCTL_RTO_MAX_MIN 0
  292. #define SCTPCTL_RTO_MAX_MAX 0xFFFFFFFF
  293. #define SCTPCTL_RTO_MAX_DEFAULT SCTP_RTO_UPPER_BOUND
  294. /* rto_min: Default minimum retransmission timeout in ms */
  295. #define SCTPCTL_RTO_MIN_DESC "Default minimum retransmission timeout in ms"
  296. #define SCTPCTL_RTO_MIN_MIN 0
  297. #define SCTPCTL_RTO_MIN_MAX 0xFFFFFFFF
  298. #define SCTPCTL_RTO_MIN_DEFAULT SCTP_RTO_LOWER_BOUND
  299. /* rto_initial: Default initial retransmission timeout in ms */
  300. #define SCTPCTL_RTO_INITIAL_DESC "Default initial retransmission timeout in ms"
  301. #define SCTPCTL_RTO_INITIAL_MIN 0
  302. #define SCTPCTL_RTO_INITIAL_MAX 0xFFFFFFFF
  303. #define SCTPCTL_RTO_INITIAL_DEFAULT SCTP_RTO_INITIAL
  304. /* init_rto_max: Default maximum retransmission timeout during association setup in ms */
  305. #define SCTPCTL_INIT_RTO_MAX_DESC "Default maximum retransmission timeout during association setup in ms"
  306. #define SCTPCTL_INIT_RTO_MAX_MIN 0
  307. #define SCTPCTL_INIT_RTO_MAX_MAX 0xFFFFFFFF
  308. #define SCTPCTL_INIT_RTO_MAX_DEFAULT SCTP_RTO_UPPER_BOUND
  309. /* valid_cookie_life: Default cookie lifetime in ms */
  310. #define SCTPCTL_VALID_COOKIE_LIFE_DESC "Default cookie lifetime in ms"
  311. #define SCTPCTL_VALID_COOKIE_LIFE_MIN SCTP_MIN_COOKIE_LIFE
  312. #define SCTPCTL_VALID_COOKIE_LIFE_MAX SCTP_MAX_COOKIE_LIFE
  313. #define SCTPCTL_VALID_COOKIE_LIFE_DEFAULT SCTP_DEFAULT_COOKIE_LIFE
  314. /* init_rtx_max: Default maximum number of retransmission for INIT chunks */
  315. #define SCTPCTL_INIT_RTX_MAX_DESC "Default maximum number of retransmissions for INIT chunks"
  316. #define SCTPCTL_INIT_RTX_MAX_MIN 0
  317. #define SCTPCTL_INIT_RTX_MAX_MAX 0xFFFFFFFF
  318. #define SCTPCTL_INIT_RTX_MAX_DEFAULT SCTP_DEF_MAX_INIT
  319. /* assoc_rtx_max: Default maximum number of retransmissions per association */
  320. #define SCTPCTL_ASSOC_RTX_MAX_DESC "Default maximum number of retransmissions per association"
  321. #define SCTPCTL_ASSOC_RTX_MAX_MIN 0
  322. #define SCTPCTL_ASSOC_RTX_MAX_MAX 0xFFFFFFFF
  323. #define SCTPCTL_ASSOC_RTX_MAX_DEFAULT SCTP_DEF_MAX_SEND
  324. /* path_rtx_max: Default maximum of retransmissions per path */
  325. #define SCTPCTL_PATH_RTX_MAX_DESC "Default maximum of retransmissions per path"
  326. #define SCTPCTL_PATH_RTX_MAX_MIN 0
  327. #define SCTPCTL_PATH_RTX_MAX_MAX 0xFFFFFFFF
  328. #define SCTPCTL_PATH_RTX_MAX_DEFAULT SCTP_DEF_MAX_PATH_RTX
  329. /* path_pf_threshold: threshold for considering the path potentially failed */
  330. #define SCTPCTL_PATH_PF_THRESHOLD_DESC "Default potentially failed threshold"
  331. #define SCTPCTL_PATH_PF_THRESHOLD_MIN 0
  332. #define SCTPCTL_PATH_PF_THRESHOLD_MAX 0xFFFF
  333. #define SCTPCTL_PATH_PF_THRESHOLD_DEFAULT SCTPCTL_PATH_PF_THRESHOLD_MAX
  334. /* add_more_on_output: When space-wise is it worthwhile to try to add more to a socket send buffer */
  335. #define SCTPCTL_ADD_MORE_ON_OUTPUT_DESC "When space-wise is it worthwhile to try to add more to a socket send buffer"
  336. #define SCTPCTL_ADD_MORE_ON_OUTPUT_MIN 0
  337. #define SCTPCTL_ADD_MORE_ON_OUTPUT_MAX 0xFFFFFFFF
  338. #define SCTPCTL_ADD_MORE_ON_OUTPUT_DEFAULT SCTP_DEFAULT_ADD_MORE
  339. /* incoming_streams: Default number of incoming streams */
  340. #define SCTPCTL_INCOMING_STREAMS_DESC "Default number of incoming streams"
  341. #define SCTPCTL_INCOMING_STREAMS_MIN 1
  342. #define SCTPCTL_INCOMING_STREAMS_MAX 65535
  343. #define SCTPCTL_INCOMING_STREAMS_DEFAULT SCTP_ISTREAM_INITIAL
  344. /* outgoing_streams: Default number of outgoing streams */
  345. #define SCTPCTL_OUTGOING_STREAMS_DESC "Default number of outgoing streams"
  346. #define SCTPCTL_OUTGOING_STREAMS_MIN 1
  347. #define SCTPCTL_OUTGOING_STREAMS_MAX 65535
  348. #define SCTPCTL_OUTGOING_STREAMS_DEFAULT SCTP_OSTREAM_INITIAL
  349. /* cmt_on_off: CMT on/off flag */
  350. #define SCTPCTL_CMT_ON_OFF_DESC "CMT settings"
  351. #define SCTPCTL_CMT_ON_OFF_MIN SCTP_CMT_OFF
  352. #define SCTPCTL_CMT_ON_OFF_MAX SCTP_CMT_MAX
  353. #define SCTPCTL_CMT_ON_OFF_DEFAULT SCTP_CMT_OFF
  354. /* cmt_use_dac: CMT DAC on/off flag */
  355. #define SCTPCTL_CMT_USE_DAC_DESC "CMT DAC on/off flag"
  356. #define SCTPCTL_CMT_USE_DAC_MIN 0
  357. #define SCTPCTL_CMT_USE_DAC_MAX 1
  358. #define SCTPCTL_CMT_USE_DAC_DEFAULT 0
  359. /* cwnd_maxburst: Use a CWND adjusting to implement maxburst */
  360. #define SCTPCTL_CWND_MAXBURST_DESC "Adjust congestion control window to limit maximum burst when sending"
  361. #define SCTPCTL_CWND_MAXBURST_MIN 0
  362. #define SCTPCTL_CWND_MAXBURST_MAX 1
  363. #define SCTPCTL_CWND_MAXBURST_DEFAULT 1
  364. /* nat_friendly: SCTP NAT friendly operation */
  365. #define SCTPCTL_NAT_FRIENDLY_DESC "SCTP NAT friendly operation"
  366. #define SCTPCTL_NAT_FRIENDLY_MIN 0
  367. #define SCTPCTL_NAT_FRIENDLY_MAX 1
  368. #define SCTPCTL_NAT_FRIENDLY_DEFAULT 1
  369. /* abc_l_var: SCTP ABC max increase per SACK (L) */
  370. #define SCTPCTL_ABC_L_VAR_DESC "SCTP ABC max increase per SACK (L)"
  371. #define SCTPCTL_ABC_L_VAR_MIN 0
  372. #define SCTPCTL_ABC_L_VAR_MAX 0xFFFFFFFF
  373. #define SCTPCTL_ABC_L_VAR_DEFAULT 2
  374. /* max_chained_mbufs: Default max number of small mbufs on a chain */
  375. #define SCTPCTL_MAX_CHAINED_MBUFS_DESC "Default max number of small mbufs on a chain"
  376. #define SCTPCTL_MAX_CHAINED_MBUFS_MIN 0
  377. #define SCTPCTL_MAX_CHAINED_MBUFS_MAX 0xFFFFFFFF
  378. #define SCTPCTL_MAX_CHAINED_MBUFS_DEFAULT SCTP_DEFAULT_MBUFS_IN_CHAIN
  379. /* do_sctp_drain: Should SCTP respond to the drain calls */
  380. #define SCTPCTL_DO_SCTP_DRAIN_DESC "Should SCTP respond to the drain calls"
  381. #define SCTPCTL_DO_SCTP_DRAIN_MIN 0
  382. #define SCTPCTL_DO_SCTP_DRAIN_MAX 1
  383. #define SCTPCTL_DO_SCTP_DRAIN_DEFAULT 1
  384. /* hb_max_burst: Confirmation Heartbeat max burst? */
  385. #define SCTPCTL_HB_MAX_BURST_DESC "Confirmation Heartbeat max burst"
  386. #define SCTPCTL_HB_MAX_BURST_MIN 1
  387. #define SCTPCTL_HB_MAX_BURST_MAX 0xFFFFFFFF
  388. #define SCTPCTL_HB_MAX_BURST_DEFAULT SCTP_DEF_HBMAX_BURST
  389. /* abort_at_limit: When one-2-one hits qlimit abort */
  390. #define SCTPCTL_ABORT_AT_LIMIT_DESC "Abort when one-to-one hits qlimit"
  391. #define SCTPCTL_ABORT_AT_LIMIT_MIN 0
  392. #define SCTPCTL_ABORT_AT_LIMIT_MAX 1
  393. #define SCTPCTL_ABORT_AT_LIMIT_DEFAULT 0
  394. /* min_residual: min residual in a data fragment leftover */
  395. #define SCTPCTL_MIN_RESIDUAL_DESC "Minimum residual data chunk in second part of split"
  396. #define SCTPCTL_MIN_RESIDUAL_MIN 20
  397. #define SCTPCTL_MIN_RESIDUAL_MAX 65535
  398. #define SCTPCTL_MIN_RESIDUAL_DEFAULT 1452
  399. /* max_retran_chunk: max chunk retransmissions */
  400. #define SCTPCTL_MAX_RETRAN_CHUNK_DESC "Maximum times an unlucky chunk can be retransmitted before assoc abort"
  401. #define SCTPCTL_MAX_RETRAN_CHUNK_MIN 0
  402. #define SCTPCTL_MAX_RETRAN_CHUNK_MAX 65535
  403. #define SCTPCTL_MAX_RETRAN_CHUNK_DEFAULT 30
  404. /* sctp_logging: This gives us logging when the options are enabled */
  405. #define SCTPCTL_LOGGING_LEVEL_DESC "Ltrace/KTR trace logging level"
  406. #define SCTPCTL_LOGGING_LEVEL_MIN 0
  407. #define SCTPCTL_LOGGING_LEVEL_MAX 0xffffffff
  408. #define SCTPCTL_LOGGING_LEVEL_DEFAULT 0
  409. /* JRS - default congestion control module sysctl */
  410. #define SCTPCTL_DEFAULT_CC_MODULE_DESC "Default congestion control module"
  411. #define SCTPCTL_DEFAULT_CC_MODULE_MIN 0
  412. #define SCTPCTL_DEFAULT_CC_MODULE_MAX 2
  413. #define SCTPCTL_DEFAULT_CC_MODULE_DEFAULT 0
  414. /* RS - default stream scheduling module sysctl */
  415. #define SCTPCTL_DEFAULT_SS_MODULE_DESC "Default stream scheduling module"
  416. #define SCTPCTL_DEFAULT_SS_MODULE_MIN 0
  417. #define SCTPCTL_DEFAULT_SS_MODULE_MAX 5
  418. #define SCTPCTL_DEFAULT_SS_MODULE_DEFAULT 0
  419. /* RRS - default fragment interleave */
  420. #define SCTPCTL_DEFAULT_FRAG_INTERLEAVE_DESC "Default fragment interleave level"
  421. #define SCTPCTL_DEFAULT_FRAG_INTERLEAVE_MIN 0
  422. #define SCTPCTL_DEFAULT_FRAG_INTERLEAVE_MAX 2
  423. #define SCTPCTL_DEFAULT_FRAG_INTERLEAVE_DEFAULT 1
  424. /* mobility_base: Enable SCTP mobility support */
  425. #define SCTPCTL_MOBILITY_BASE_DESC "Enable SCTP base mobility"
  426. #define SCTPCTL_MOBILITY_BASE_MIN 0
  427. #define SCTPCTL_MOBILITY_BASE_MAX 1
  428. #define SCTPCTL_MOBILITY_BASE_DEFAULT 0
  429. /* mobility_fasthandoff: Enable SCTP fast handoff support */
  430. #define SCTPCTL_MOBILITY_FASTHANDOFF_DESC "Enable SCTP fast handoff"
  431. #define SCTPCTL_MOBILITY_FASTHANDOFF_MIN 0
  432. #define SCTPCTL_MOBILITY_FASTHANDOFF_MAX 1
  433. #define SCTPCTL_MOBILITY_FASTHANDOFF_DEFAULT 0
  434. /* Enable SCTP/UDP tunneling port */
  435. #define SCTPCTL_UDP_TUNNELING_PORT_DESC "Set the SCTP/UDP tunneling port"
  436. #define SCTPCTL_UDP_TUNNELING_PORT_MIN 0
  437. #define SCTPCTL_UDP_TUNNELING_PORT_MAX 65535
  438. #if defined(__FreeBSD__) && !defined(__Userspace__)
  439. #define SCTPCTL_UDP_TUNNELING_PORT_DEFAULT 0
  440. #else
  441. #define SCTPCTL_UDP_TUNNELING_PORT_DEFAULT SCTP_OVER_UDP_TUNNELING_PORT
  442. #endif
  443. /* Enable sending of the SACK-IMMEDIATELY bit */
  444. #define SCTPCTL_SACK_IMMEDIATELY_ENABLE_DESC "Enable sending of the SACK-IMMEDIATELY-bit"
  445. #define SCTPCTL_SACK_IMMEDIATELY_ENABLE_MIN 0
  446. #define SCTPCTL_SACK_IMMEDIATELY_ENABLE_MAX 1
  447. #define SCTPCTL_SACK_IMMEDIATELY_ENABLE_DEFAULT SCTPCTL_SACK_IMMEDIATELY_ENABLE_MAX
  448. /* Enable sending of the NAT-FRIENDLY message */
  449. #define SCTPCTL_NAT_FRIENDLY_INITS_DESC "Enable sending of the nat-friendly SCTP option on INITs"
  450. #define SCTPCTL_NAT_FRIENDLY_INITS_MIN 0
  451. #define SCTPCTL_NAT_FRIENDLY_INITS_MAX 1
  452. #define SCTPCTL_NAT_FRIENDLY_INITS_DEFAULT SCTPCTL_NAT_FRIENDLY_INITS_MIN
  453. /* Vtag time wait in seconds */
  454. #define SCTPCTL_TIME_WAIT_DESC "Vtag time wait time in seconds, 0 disables it"
  455. #define SCTPCTL_TIME_WAIT_MIN 0
  456. #define SCTPCTL_TIME_WAIT_MAX 0xffffffff
  457. #define SCTPCTL_TIME_WAIT_DEFAULT SCTP_TIME_WAIT
  458. /* Enable Send/Receive buffer splitting */
  459. #define SCTPCTL_BUFFER_SPLITTING_DESC "Enable send/receive buffer splitting"
  460. #define SCTPCTL_BUFFER_SPLITTING_MIN 0
  461. #define SCTPCTL_BUFFER_SPLITTING_MAX 0x3
  462. #define SCTPCTL_BUFFER_SPLITTING_DEFAULT SCTPCTL_BUFFER_SPLITTING_MIN
  463. /* Initial congestion window in MTUs */
  464. #define SCTPCTL_INITIAL_CWND_DESC "Defines the initial congestion window size in MTUs"
  465. #define SCTPCTL_INITIAL_CWND_MIN 0
  466. #define SCTPCTL_INITIAL_CWND_MAX 0xffffffff
  467. #define SCTPCTL_INITIAL_CWND_DEFAULT 3
  468. /* rttvar smooth avg for bw calc */
  469. #define SCTPCTL_RTTVAR_BW_DESC "Shift amount DCCC uses for bw smoothing on rtt calc"
  470. #define SCTPCTL_RTTVAR_BW_MIN 0
  471. #define SCTPCTL_RTTVAR_BW_MAX 32
  472. #define SCTPCTL_RTTVAR_BW_DEFAULT 4
  473. /* rttvar smooth avg for bw calc */
  474. #define SCTPCTL_RTTVAR_RTT_DESC "Shift amount DCCC uses for rtt smoothing on rtt calc"
  475. #define SCTPCTL_RTTVAR_RTT_MIN 0
  476. #define SCTPCTL_RTTVAR_RTT_MAX 32
  477. #define SCTPCTL_RTTVAR_RTT_DEFAULT 5
  478. #define SCTPCTL_RTTVAR_EQRET_DESC "Whether DCCC increases cwnd when the rtt and bw are unchanged"
  479. #define SCTPCTL_RTTVAR_EQRET_MIN 0
  480. #define SCTPCTL_RTTVAR_EQRET_MAX 1
  481. #define SCTPCTL_RTTVAR_EQRET_DEFAULT 0
  482. #define SCTPCTL_RTTVAR_STEADYS_DESC "Number of identical bw measurements DCCC takes to try step down of cwnd"
  483. #define SCTPCTL_RTTVAR_STEADYS_MIN 0
  484. #define SCTPCTL_RTTVAR_STEADYS_MAX 0xFFFF
  485. #define SCTPCTL_RTTVAR_STEADYS_DEFAULT 20 /* 0 means disable feature */
  486. #define SCTPCTL_RTTVAR_DCCCECN_DESC "Enable ECN for DCCC."
  487. #define SCTPCTL_RTTVAR_DCCCECN_MIN 0
  488. #define SCTPCTL_RTTVAR_DCCCECN_MAX 1
  489. #define SCTPCTL_RTTVAR_DCCCECN_DEFAULT 1 /* 0 means disable feature */
  490. #define SCTPCTL_BLACKHOLE_DESC "Enable SCTP blackholing, see blackhole(4) for more details"
  491. #define SCTPCTL_BLACKHOLE_MIN 0
  492. #define SCTPCTL_BLACKHOLE_MAX 2
  493. #define SCTPCTL_BLACKHOLE_DEFAULT SCTPCTL_BLACKHOLE_MIN
  494. /* sendall_limit: Maximum message with SCTP_SENDALL */
  495. #define SCTPCTL_SENDALL_LIMIT_DESC "Maximum size of a message send with SCTP_SENDALL"
  496. #define SCTPCTL_SENDALL_LIMIT_MIN 0
  497. #define SCTPCTL_SENDALL_LIMIT_MAX 0xFFFFFFFF
  498. #define SCTPCTL_SENDALL_LIMIT_DEFAULT 1432
  499. #define SCTPCTL_DIAG_INFO_CODE_DESC "Diagnostic information error cause code"
  500. #define SCTPCTL_DIAG_INFO_CODE_MIN 0
  501. #define SCTPCTL_DIAG_INFO_CODE_MAX 65535
  502. #define SCTPCTL_DIAG_INFO_CODE_DEFAULT 0
  503. #if defined(SCTP_DEBUG)
  504. /* debug: Configure debug output */
  505. #define SCTPCTL_DEBUG_DESC "Configure debug output"
  506. #define SCTPCTL_DEBUG_MIN 0
  507. #define SCTPCTL_DEBUG_MAX 0xFFFFFFFF
  508. #define SCTPCTL_DEBUG_DEFAULT 0
  509. #endif
  510. #if defined(__APPLE__) && !defined(__Userspace__)
  511. #define SCTPCTL_MAIN_TIMER_DESC "Main timer interval in ms"
  512. #define SCTPCTL_MAIN_TIMER_MIN 1
  513. #define SCTPCTL_MAIN_TIMER_MAX 0xFFFFFFFF
  514. #define SCTPCTL_MAIN_TIMER_DEFAULT 10
  515. #define SCTPCTL_IGNORE_VMWARE_INTERFACES_DESC "Ignore VMware Interfaces"
  516. #define SCTPCTL_IGNORE_VMWARE_INTERFACES_MIN 0
  517. #define SCTPCTL_IGNORE_VMWARE_INTERFACES_MAX 1
  518. #define SCTPCTL_IGNORE_VMWARE_INTERFACES_DEFAULT SCTPCTL_IGNORE_VMWARE_INTERFACES_MAX
  519. #define SCTPCTL_OUTPUT_UNLOCKED_DESC "Unlock socket when sending packets down to IP"
  520. #define SCTPCTL_OUTPUT_UNLOCKED_MIN 0
  521. #define SCTPCTL_OUTPUT_UNLOCKED_MAX 1
  522. #define SCTPCTL_OUTPUT_UNLOCKED_DEFAULT SCTPCTL_OUTPUT_UNLOCKED_MIN
  523. #define SCTPCTL_ADDR_WATCHDOG_LIMIT_DESC "Address watchdog limit"
  524. #define SCTPCTL_ADDR_WATCHDOG_LIMIT_MIN 0
  525. #define SCTPCTL_ADDR_WATCHDOG_LIMIT_MAX 0xFFFFFFFF
  526. #define SCTPCTL_ADDR_WATCHDOG_LIMIT_DEFAULT SCTPCTL_ADDR_WATCHDOG_LIMIT_MIN
  527. #define SCTPCTL_VTAG_WATCHDOG_LIMIT_DESC "VTag watchdog limit"
  528. #define SCTPCTL_VTAG_WATCHDOG_LIMIT_MIN 0
  529. #define SCTPCTL_VTAG_WATCHDOG_LIMIT_MAX 0xFFFFFFFF
  530. #define SCTPCTL_VTAG_WATCHDOG_LIMIT_DEFAULT SCTPCTL_VTAG_WATCHDOG_LIMIT_MIN
  531. #endif
  532. #if defined(_KERNEL) || defined(__Userspace__)
  533. #if defined(__FreeBSD__) || defined(__APPLE__) || defined(__Userspace__)
  534. #if defined(SYSCTL_DECL)
  535. SYSCTL_DECL(_net_inet_sctp);
  536. #endif
  537. #endif
  538. void sctp_init_sysctls(void);
  539. #if defined(_WIN32) && !defined(__Userspace__)
  540. void sctp_finish_sysctls(void);
  541. #endif
  542. #endif /* _KERNEL */
  543. #endif /* __sctp_sysctl_h__ */