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