112016SGirish.Moodalbail@Sun.COM /*
212016SGirish.Moodalbail@Sun.COM * CDDL HEADER START
312016SGirish.Moodalbail@Sun.COM *
412016SGirish.Moodalbail@Sun.COM * The contents of this file are subject to the terms of the
512016SGirish.Moodalbail@Sun.COM * Common Development and Distribution License (the "License").
612016SGirish.Moodalbail@Sun.COM * You may not use this file except in compliance with the License.
712016SGirish.Moodalbail@Sun.COM *
812016SGirish.Moodalbail@Sun.COM * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
912016SGirish.Moodalbail@Sun.COM * or http://www.opensolaris.org/os/licensing.
1012016SGirish.Moodalbail@Sun.COM * See the License for the specific language governing permissions
1112016SGirish.Moodalbail@Sun.COM * and limitations under the License.
1212016SGirish.Moodalbail@Sun.COM *
1312016SGirish.Moodalbail@Sun.COM * When distributing Covered Code, include this CDDL HEADER in each
1412016SGirish.Moodalbail@Sun.COM * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1512016SGirish.Moodalbail@Sun.COM * If applicable, add the following below this CDDL HEADER, with the
1612016SGirish.Moodalbail@Sun.COM * fields enclosed by brackets "[]" replaced with your own identifying
1712016SGirish.Moodalbail@Sun.COM * information: Portions Copyright [yyyy] [name of copyright owner]
1812016SGirish.Moodalbail@Sun.COM *
1912016SGirish.Moodalbail@Sun.COM * CDDL HEADER END
2012016SGirish.Moodalbail@Sun.COM */
2112869SKacheong.Poon@Sun.COM
2212016SGirish.Moodalbail@Sun.COM /*
2312869SKacheong.Poon@Sun.COM * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
2412016SGirish.Moodalbail@Sun.COM */
2512016SGirish.Moodalbail@Sun.COM
2612016SGirish.Moodalbail@Sun.COM #include <inet/ip.h>
2712016SGirish.Moodalbail@Sun.COM #include <inet/ip6.h>
2812016SGirish.Moodalbail@Sun.COM #include <inet/sctp/sctp_stack.h>
2912016SGirish.Moodalbail@Sun.COM #include <inet/sctp/sctp_impl.h>
3012016SGirish.Moodalbail@Sun.COM #include <sys/sunddi.h>
3112016SGirish.Moodalbail@Sun.COM
3212016SGirish.Moodalbail@Sun.COM /* Max size IP datagram is 64k - 1 */
3312016SGirish.Moodalbail@Sun.COM #define SCTP_MSS_MAX_IPV4 (IP_MAXPACKET - (sizeof (ipha_t) + \
3412016SGirish.Moodalbail@Sun.COM sizeof (sctp_hdr_t)))
3512016SGirish.Moodalbail@Sun.COM #define SCTP_MSS_MAX_IPV6 (IP_MAXPACKET - (sizeof (ip6_t) + \
3612016SGirish.Moodalbail@Sun.COM sizeof (sctp_hdr_t)))
3712016SGirish.Moodalbail@Sun.COM /* Max of the above */
3812016SGirish.Moodalbail@Sun.COM #define SCTP_MSS_MAX SCTP_MSS_MAX_IPV4
3912016SGirish.Moodalbail@Sun.COM
4012016SGirish.Moodalbail@Sun.COM /*
4112869SKacheong.Poon@Sun.COM * returns the current list of listener limit configuration.
4212869SKacheong.Poon@Sun.COM */
4312869SKacheong.Poon@Sun.COM /* ARGSUSED */
4412869SKacheong.Poon@Sun.COM static int
sctp_listener_conf_get(void * cbarg,mod_prop_info_t * pinfo,const char * ifname,void * val,uint_t psize,uint_t flags)4512869SKacheong.Poon@Sun.COM sctp_listener_conf_get(void *cbarg, mod_prop_info_t *pinfo, const char *ifname,
4612869SKacheong.Poon@Sun.COM void *val, uint_t psize, uint_t flags)
4712869SKacheong.Poon@Sun.COM {
4812869SKacheong.Poon@Sun.COM sctp_stack_t *sctps = (sctp_stack_t *)cbarg;
4912869SKacheong.Poon@Sun.COM sctp_listener_t *sl;
5012869SKacheong.Poon@Sun.COM char *pval = val;
5112869SKacheong.Poon@Sun.COM size_t nbytes = 0, tbytes = 0;
5212869SKacheong.Poon@Sun.COM uint_t size;
5312869SKacheong.Poon@Sun.COM int err = 0;
5412869SKacheong.Poon@Sun.COM
5512869SKacheong.Poon@Sun.COM bzero(pval, psize);
5612869SKacheong.Poon@Sun.COM size = psize;
5712869SKacheong.Poon@Sun.COM
5812869SKacheong.Poon@Sun.COM if (flags & (MOD_PROP_DEFAULT|MOD_PROP_PERM|MOD_PROP_POSSIBLE))
5912869SKacheong.Poon@Sun.COM return (0);
6012869SKacheong.Poon@Sun.COM
6112869SKacheong.Poon@Sun.COM mutex_enter(&sctps->sctps_listener_conf_lock);
6212869SKacheong.Poon@Sun.COM for (sl = list_head(&sctps->sctps_listener_conf); sl != NULL;
6312869SKacheong.Poon@Sun.COM sl = list_next(&sctps->sctps_listener_conf, sl)) {
6412869SKacheong.Poon@Sun.COM if (psize == size)
6512869SKacheong.Poon@Sun.COM nbytes = snprintf(pval, size, "%d:%d", sl->sl_port,
6612869SKacheong.Poon@Sun.COM sl->sl_ratio);
6712869SKacheong.Poon@Sun.COM else
6812869SKacheong.Poon@Sun.COM nbytes = snprintf(pval, size, ",%d:%d", sl->sl_port,
6912869SKacheong.Poon@Sun.COM sl->sl_ratio);
7012869SKacheong.Poon@Sun.COM size -= nbytes;
7112869SKacheong.Poon@Sun.COM pval += nbytes;
7212869SKacheong.Poon@Sun.COM tbytes += nbytes;
7312869SKacheong.Poon@Sun.COM if (tbytes >= psize) {
7412869SKacheong.Poon@Sun.COM /* Buffer overflow, stop copying information */
7512869SKacheong.Poon@Sun.COM err = ENOBUFS;
7612869SKacheong.Poon@Sun.COM break;
7712869SKacheong.Poon@Sun.COM }
7812869SKacheong.Poon@Sun.COM }
7912869SKacheong.Poon@Sun.COM
8012869SKacheong.Poon@Sun.COM mutex_exit(&sctps->sctps_listener_conf_lock);
8112869SKacheong.Poon@Sun.COM return (err);
8212869SKacheong.Poon@Sun.COM }
8312869SKacheong.Poon@Sun.COM
8412869SKacheong.Poon@Sun.COM /*
8512869SKacheong.Poon@Sun.COM * add a new listener limit configuration.
8612869SKacheong.Poon@Sun.COM */
8712869SKacheong.Poon@Sun.COM /* ARGSUSED */
8812869SKacheong.Poon@Sun.COM static int
sctp_listener_conf_add(void * cbarg,cred_t * cr,mod_prop_info_t * pinfo,const char * ifname,const void * pval,uint_t flags)8912869SKacheong.Poon@Sun.COM sctp_listener_conf_add(void *cbarg, cred_t *cr, mod_prop_info_t *pinfo,
9012869SKacheong.Poon@Sun.COM const char *ifname, const void* pval, uint_t flags)
9112869SKacheong.Poon@Sun.COM {
9212869SKacheong.Poon@Sun.COM sctp_listener_t *new_sl;
9312869SKacheong.Poon@Sun.COM sctp_listener_t *sl;
9412869SKacheong.Poon@Sun.COM long lport;
9512869SKacheong.Poon@Sun.COM long ratio;
9612869SKacheong.Poon@Sun.COM char *colon;
9712869SKacheong.Poon@Sun.COM sctp_stack_t *sctps = (sctp_stack_t *)cbarg;
9812869SKacheong.Poon@Sun.COM
9912869SKacheong.Poon@Sun.COM if (flags & MOD_PROP_DEFAULT)
10012869SKacheong.Poon@Sun.COM return (ENOTSUP);
10112869SKacheong.Poon@Sun.COM
10212869SKacheong.Poon@Sun.COM if (ddi_strtol(pval, &colon, 10, &lport) != 0 || lport <= 0 ||
10312869SKacheong.Poon@Sun.COM lport > USHRT_MAX || *colon != ':') {
10412869SKacheong.Poon@Sun.COM return (EINVAL);
10512869SKacheong.Poon@Sun.COM }
10612869SKacheong.Poon@Sun.COM if (ddi_strtol(colon + 1, NULL, 10, &ratio) != 0 || ratio <= 0)
10712869SKacheong.Poon@Sun.COM return (EINVAL);
10812869SKacheong.Poon@Sun.COM
10912869SKacheong.Poon@Sun.COM mutex_enter(&sctps->sctps_listener_conf_lock);
11012869SKacheong.Poon@Sun.COM for (sl = list_head(&sctps->sctps_listener_conf); sl != NULL;
11112869SKacheong.Poon@Sun.COM sl = list_next(&sctps->sctps_listener_conf, sl)) {
11212869SKacheong.Poon@Sun.COM /* There is an existing entry, so update its ratio value. */
11312869SKacheong.Poon@Sun.COM if (sl->sl_port == lport) {
11412869SKacheong.Poon@Sun.COM sl->sl_ratio = ratio;
11512869SKacheong.Poon@Sun.COM mutex_exit(&sctps->sctps_listener_conf_lock);
11612869SKacheong.Poon@Sun.COM return (0);
11712869SKacheong.Poon@Sun.COM }
11812869SKacheong.Poon@Sun.COM }
11912869SKacheong.Poon@Sun.COM
12012869SKacheong.Poon@Sun.COM if ((new_sl = kmem_alloc(sizeof (sctp_listener_t), KM_NOSLEEP)) ==
12112869SKacheong.Poon@Sun.COM NULL) {
12212869SKacheong.Poon@Sun.COM mutex_exit(&sctps->sctps_listener_conf_lock);
12312869SKacheong.Poon@Sun.COM return (ENOMEM);
12412869SKacheong.Poon@Sun.COM }
12512869SKacheong.Poon@Sun.COM
12612869SKacheong.Poon@Sun.COM new_sl->sl_port = lport;
12712869SKacheong.Poon@Sun.COM new_sl->sl_ratio = ratio;
12812869SKacheong.Poon@Sun.COM list_insert_tail(&sctps->sctps_listener_conf, new_sl);
12912869SKacheong.Poon@Sun.COM mutex_exit(&sctps->sctps_listener_conf_lock);
13012869SKacheong.Poon@Sun.COM return (0);
13112869SKacheong.Poon@Sun.COM }
13212869SKacheong.Poon@Sun.COM
13312869SKacheong.Poon@Sun.COM /*
13412869SKacheong.Poon@Sun.COM * remove a listener limit configuration.
13512869SKacheong.Poon@Sun.COM */
13612869SKacheong.Poon@Sun.COM /* ARGSUSED */
13712869SKacheong.Poon@Sun.COM static int
sctp_listener_conf_del(void * cbarg,cred_t * cr,mod_prop_info_t * pinfo,const char * ifname,const void * pval,uint_t flags)13812869SKacheong.Poon@Sun.COM sctp_listener_conf_del(void *cbarg, cred_t *cr, mod_prop_info_t *pinfo,
13912869SKacheong.Poon@Sun.COM const char *ifname, const void* pval, uint_t flags)
14012869SKacheong.Poon@Sun.COM {
14112869SKacheong.Poon@Sun.COM sctp_listener_t *sl;
14212869SKacheong.Poon@Sun.COM long lport;
14312869SKacheong.Poon@Sun.COM sctp_stack_t *sctps = (sctp_stack_t *)cbarg;
14412869SKacheong.Poon@Sun.COM
14512869SKacheong.Poon@Sun.COM if (flags & MOD_PROP_DEFAULT)
14612869SKacheong.Poon@Sun.COM return (ENOTSUP);
14712869SKacheong.Poon@Sun.COM
14812869SKacheong.Poon@Sun.COM if (ddi_strtol(pval, NULL, 10, &lport) != 0 || lport <= 0 ||
14912869SKacheong.Poon@Sun.COM lport > USHRT_MAX) {
15012869SKacheong.Poon@Sun.COM return (EINVAL);
15112869SKacheong.Poon@Sun.COM }
15212869SKacheong.Poon@Sun.COM mutex_enter(&sctps->sctps_listener_conf_lock);
15312869SKacheong.Poon@Sun.COM for (sl = list_head(&sctps->sctps_listener_conf); sl != NULL;
15412869SKacheong.Poon@Sun.COM sl = list_next(&sctps->sctps_listener_conf, sl)) {
15512869SKacheong.Poon@Sun.COM if (sl->sl_port == lport) {
15612869SKacheong.Poon@Sun.COM list_remove(&sctps->sctps_listener_conf, sl);
15712869SKacheong.Poon@Sun.COM mutex_exit(&sctps->sctps_listener_conf_lock);
15812869SKacheong.Poon@Sun.COM kmem_free(sl, sizeof (sctp_listener_t));
15912869SKacheong.Poon@Sun.COM return (0);
16012869SKacheong.Poon@Sun.COM }
16112869SKacheong.Poon@Sun.COM }
16212869SKacheong.Poon@Sun.COM mutex_exit(&sctps->sctps_listener_conf_lock);
16312869SKacheong.Poon@Sun.COM return (ESRCH);
16412869SKacheong.Poon@Sun.COM }
16512869SKacheong.Poon@Sun.COM
16612869SKacheong.Poon@Sun.COM /*
16712016SGirish.Moodalbail@Sun.COM * All of these are alterable, within the min/max values given, at run time.
16812016SGirish.Moodalbail@Sun.COM *
169*13125SGirish.Moodalbail@oracle.COM * Note: All those tunables which do not start with "_" are Committed and
170*13125SGirish.Moodalbail@oracle.COM * therefore are public. See PSARC 2010/080.
17112016SGirish.Moodalbail@Sun.COM */
17212016SGirish.Moodalbail@Sun.COM mod_prop_info_t sctp_propinfo_tbl[] = {
173*13125SGirish.Moodalbail@oracle.COM { "_max_init_retr", MOD_PROTO_SCTP,
17412016SGirish.Moodalbail@Sun.COM mod_set_uint32, mod_get_uint32,
17512016SGirish.Moodalbail@Sun.COM {0, 128, 8}, {8} },
17612016SGirish.Moodalbail@Sun.COM
177*13125SGirish.Moodalbail@oracle.COM { "_pa_max_retr", MOD_PROTO_SCTP,
17812016SGirish.Moodalbail@Sun.COM mod_set_uint32, mod_get_uint32,
17912016SGirish.Moodalbail@Sun.COM {1, 128, 10}, {10} },
18012016SGirish.Moodalbail@Sun.COM
181*13125SGirish.Moodalbail@oracle.COM { "_pp_max_retr", MOD_PROTO_SCTP,
18212016SGirish.Moodalbail@Sun.COM mod_set_uint32, mod_get_uint32,
18312016SGirish.Moodalbail@Sun.COM {1, 128, 5}, {5} },
18412016SGirish.Moodalbail@Sun.COM
185*13125SGirish.Moodalbail@oracle.COM { "_cwnd_max", MOD_PROTO_SCTP,
18612016SGirish.Moodalbail@Sun.COM mod_set_uint32, mod_get_uint32,
18712016SGirish.Moodalbail@Sun.COM {128, (1<<30), 1024*1024}, {1024*1024} },
18812016SGirish.Moodalbail@Sun.COM
18912016SGirish.Moodalbail@Sun.COM { "smallest_nonpriv_port", MOD_PROTO_SCTP,
19012016SGirish.Moodalbail@Sun.COM mod_set_uint32, mod_get_uint32,
19112016SGirish.Moodalbail@Sun.COM {1024, (32*1024), 1024}, {1024} },
19212016SGirish.Moodalbail@Sun.COM
193*13125SGirish.Moodalbail@oracle.COM { "_ipv4_ttl", MOD_PROTO_SCTP,
19412016SGirish.Moodalbail@Sun.COM mod_set_uint32, mod_get_uint32,
19512016SGirish.Moodalbail@Sun.COM {1, 255, 64}, {64} },
19612016SGirish.Moodalbail@Sun.COM
197*13125SGirish.Moodalbail@oracle.COM { "_heartbeat_interval", MOD_PROTO_SCTP,
19812016SGirish.Moodalbail@Sun.COM mod_set_uint32, mod_get_uint32,
19912016SGirish.Moodalbail@Sun.COM {0, 1*DAYS, 30*SECONDS}, {30*SECONDS} },
20012016SGirish.Moodalbail@Sun.COM
201*13125SGirish.Moodalbail@oracle.COM { "_initial_mtu", MOD_PROTO_SCTP,
20212016SGirish.Moodalbail@Sun.COM mod_set_uint32, mod_get_uint32,
20312016SGirish.Moodalbail@Sun.COM {68, 65535, 1500}, {1500} },
20412016SGirish.Moodalbail@Sun.COM
205*13125SGirish.Moodalbail@oracle.COM { "_mtu_probe_interval", MOD_PROTO_SCTP,
20612016SGirish.Moodalbail@Sun.COM mod_set_uint32, mod_get_uint32,
20712016SGirish.Moodalbail@Sun.COM {0, 1*DAYS, 10*MINUTES}, {10*MINUTES} },
20812016SGirish.Moodalbail@Sun.COM
209*13125SGirish.Moodalbail@oracle.COM { "_new_secret_interval", MOD_PROTO_SCTP,
21012016SGirish.Moodalbail@Sun.COM mod_set_uint32, mod_get_uint32,
21112016SGirish.Moodalbail@Sun.COM {0, 1*DAYS, 2*MINUTES}, {2*MINUTES} },
21212016SGirish.Moodalbail@Sun.COM
21312016SGirish.Moodalbail@Sun.COM /* tunable - 10 */
214*13125SGirish.Moodalbail@oracle.COM { "_deferred_ack_interval", MOD_PROTO_SCTP,
21512016SGirish.Moodalbail@Sun.COM mod_set_uint32, mod_get_uint32,
21612016SGirish.Moodalbail@Sun.COM {10*MS, 1*MINUTES, 100*MS}, {100*MS} },
21712016SGirish.Moodalbail@Sun.COM
218*13125SGirish.Moodalbail@oracle.COM { "_snd_lowat_fraction", MOD_PROTO_SCTP,
21912016SGirish.Moodalbail@Sun.COM mod_set_uint32, mod_get_uint32,
22012016SGirish.Moodalbail@Sun.COM {0, 16, 0}, {0} },
22112016SGirish.Moodalbail@Sun.COM
222*13125SGirish.Moodalbail@oracle.COM { "_ignore_path_mtu", MOD_PROTO_SCTP,
22312016SGirish.Moodalbail@Sun.COM mod_set_boolean, mod_get_boolean,
22412016SGirish.Moodalbail@Sun.COM {B_FALSE}, {B_FALSE} },
22512016SGirish.Moodalbail@Sun.COM
226*13125SGirish.Moodalbail@oracle.COM { "_initial_ssthresh", MOD_PROTO_SCTP,
22712016SGirish.Moodalbail@Sun.COM mod_set_uint32, mod_get_uint32,
22812016SGirish.Moodalbail@Sun.COM {1024, UINT32_MAX, SCTP_RECV_HIWATER}, { SCTP_RECV_HIWATER} },
22912016SGirish.Moodalbail@Sun.COM
23012016SGirish.Moodalbail@Sun.COM { "smallest_anon_port", MOD_PROTO_SCTP,
23112016SGirish.Moodalbail@Sun.COM mod_set_uint32, mod_get_uint32,
23212016SGirish.Moodalbail@Sun.COM {1024, ULP_MAX_PORT, 32*1024}, {32*1024} },
23312016SGirish.Moodalbail@Sun.COM
23412016SGirish.Moodalbail@Sun.COM { "largest_anon_port", MOD_PROTO_SCTP,
23512016SGirish.Moodalbail@Sun.COM mod_set_uint32, mod_get_uint32,
23612016SGirish.Moodalbail@Sun.COM {1024, ULP_MAX_PORT, ULP_MAX_PORT}, {ULP_MAX_PORT} },
23712016SGirish.Moodalbail@Sun.COM
23812016SGirish.Moodalbail@Sun.COM { "send_maxbuf", MOD_PROTO_SCTP,
23912016SGirish.Moodalbail@Sun.COM mod_set_uint32, mod_get_uint32,
24012016SGirish.Moodalbail@Sun.COM {SCTP_XMIT_LOWATER, (1<<30), SCTP_XMIT_HIWATER},
24112016SGirish.Moodalbail@Sun.COM {SCTP_XMIT_HIWATER} },
24212016SGirish.Moodalbail@Sun.COM
243*13125SGirish.Moodalbail@oracle.COM { "_xmit_lowat", MOD_PROTO_SCTP,
24412016SGirish.Moodalbail@Sun.COM mod_set_uint32, mod_get_uint32,
24512016SGirish.Moodalbail@Sun.COM {SCTP_XMIT_LOWATER, (1<<30), SCTP_XMIT_LOWATER},
24612016SGirish.Moodalbail@Sun.COM {SCTP_XMIT_LOWATER} },
24712016SGirish.Moodalbail@Sun.COM
24812016SGirish.Moodalbail@Sun.COM { "recv_maxbuf", MOD_PROTO_SCTP,
24912016SGirish.Moodalbail@Sun.COM mod_set_uint32, mod_get_uint32,
25012016SGirish.Moodalbail@Sun.COM {SCTP_RECV_LOWATER, (1<<30), SCTP_RECV_HIWATER},
25112016SGirish.Moodalbail@Sun.COM {SCTP_RECV_HIWATER} },
25212016SGirish.Moodalbail@Sun.COM
253*13125SGirish.Moodalbail@oracle.COM { "_max_buf", MOD_PROTO_SCTP,
25412016SGirish.Moodalbail@Sun.COM mod_set_uint32, mod_get_uint32,
25512016SGirish.Moodalbail@Sun.COM {8192, (1<<30), 1024*1024}, {1024*1024} },
25612016SGirish.Moodalbail@Sun.COM
25712016SGirish.Moodalbail@Sun.COM /* tunable - 20 */
258*13125SGirish.Moodalbail@oracle.COM { "_rtt_updates", MOD_PROTO_SCTP,
25912016SGirish.Moodalbail@Sun.COM mod_set_uint32, mod_get_uint32,
26012016SGirish.Moodalbail@Sun.COM {0, 65536, 20}, {20} },
26112016SGirish.Moodalbail@Sun.COM
262*13125SGirish.Moodalbail@oracle.COM { "_ipv6_hoplimit", MOD_PROTO_SCTP,
26312016SGirish.Moodalbail@Sun.COM mod_set_uint32, mod_get_uint32,
26412016SGirish.Moodalbail@Sun.COM {0, IPV6_MAX_HOPS, IPV6_DEFAULT_HOPS}, {IPV6_DEFAULT_HOPS} },
26512016SGirish.Moodalbail@Sun.COM
266*13125SGirish.Moodalbail@oracle.COM { "_rto_min", MOD_PROTO_SCTP,
26712016SGirish.Moodalbail@Sun.COM mod_set_uint32, mod_get_uint32,
26812016SGirish.Moodalbail@Sun.COM {500*MS, 60*SECONDS, 1*SECONDS}, {1*SECONDS} },
26912016SGirish.Moodalbail@Sun.COM
270*13125SGirish.Moodalbail@oracle.COM { "_rto_max", MOD_PROTO_SCTP,
27112016SGirish.Moodalbail@Sun.COM mod_set_uint32, mod_get_uint32,
27212016SGirish.Moodalbail@Sun.COM {1*SECONDS, 60000*SECONDS, 60*SECONDS}, {60*SECONDS} },
27312016SGirish.Moodalbail@Sun.COM
274*13125SGirish.Moodalbail@oracle.COM { "_rto_initial", MOD_PROTO_SCTP,
27512016SGirish.Moodalbail@Sun.COM mod_set_uint32, mod_get_uint32,
27612016SGirish.Moodalbail@Sun.COM {1*SECONDS, 60000*SECONDS, 3*SECONDS}, {3*SECONDS} },
27712016SGirish.Moodalbail@Sun.COM
278*13125SGirish.Moodalbail@oracle.COM { "_cookie_life", MOD_PROTO_SCTP,
27912016SGirish.Moodalbail@Sun.COM mod_set_uint32, mod_get_uint32,
28012016SGirish.Moodalbail@Sun.COM {10*MS, 60000*SECONDS, 60*SECONDS}, {60*SECONDS} },
28112016SGirish.Moodalbail@Sun.COM
282*13125SGirish.Moodalbail@oracle.COM { "_max_in_streams", MOD_PROTO_SCTP,
28312016SGirish.Moodalbail@Sun.COM mod_set_uint32, mod_get_uint32,
28412016SGirish.Moodalbail@Sun.COM {1, UINT16_MAX, 32}, {32} },
28512016SGirish.Moodalbail@Sun.COM
286*13125SGirish.Moodalbail@oracle.COM { "_initial_out_streams", MOD_PROTO_SCTP,
28712016SGirish.Moodalbail@Sun.COM mod_set_uint32, mod_get_uint32,
28812016SGirish.Moodalbail@Sun.COM {1, UINT16_MAX, 32}, {32} },
28912016SGirish.Moodalbail@Sun.COM
290*13125SGirish.Moodalbail@oracle.COM { "_shutack_wait_bound", MOD_PROTO_SCTP,
29112016SGirish.Moodalbail@Sun.COM mod_set_uint32, mod_get_uint32,
29212016SGirish.Moodalbail@Sun.COM {0, 300*SECONDS, 60*SECONDS}, {60*SECONDS} },
29312016SGirish.Moodalbail@Sun.COM
294*13125SGirish.Moodalbail@oracle.COM { "_maxburst", MOD_PROTO_SCTP,
29512016SGirish.Moodalbail@Sun.COM mod_set_uint32, mod_get_uint32,
29612016SGirish.Moodalbail@Sun.COM {2, 8, 4}, {4} },
29712016SGirish.Moodalbail@Sun.COM
29812016SGirish.Moodalbail@Sun.COM /* tunable - 30 */
299*13125SGirish.Moodalbail@oracle.COM { "_addip_enabled", MOD_PROTO_SCTP,
30012016SGirish.Moodalbail@Sun.COM mod_set_boolean, mod_get_boolean,
30112016SGirish.Moodalbail@Sun.COM {B_FALSE}, {B_FALSE} },
30212016SGirish.Moodalbail@Sun.COM
303*13125SGirish.Moodalbail@oracle.COM { "_recv_hiwat_minmss", MOD_PROTO_SCTP,
30412016SGirish.Moodalbail@Sun.COM mod_set_uint32, mod_get_uint32,
30512016SGirish.Moodalbail@Sun.COM {1, 65536, 4}, {4} },
30612016SGirish.Moodalbail@Sun.COM
307*13125SGirish.Moodalbail@oracle.COM { "_slow_start_initial", MOD_PROTO_SCTP,
30812016SGirish.Moodalbail@Sun.COM mod_set_uint32, mod_get_uint32,
30912016SGirish.Moodalbail@Sun.COM {1, 16, 4}, {4} },
31012016SGirish.Moodalbail@Sun.COM
311*13125SGirish.Moodalbail@oracle.COM { "_slow_start_after_idle", MOD_PROTO_SCTP,
31212016SGirish.Moodalbail@Sun.COM mod_set_uint32, mod_get_uint32,
31312016SGirish.Moodalbail@Sun.COM {1, 16384, 4}, {4} },
31412016SGirish.Moodalbail@Sun.COM
315*13125SGirish.Moodalbail@oracle.COM { "_prsctp_enabled", MOD_PROTO_SCTP,
31612016SGirish.Moodalbail@Sun.COM mod_set_boolean, mod_get_boolean,
31712016SGirish.Moodalbail@Sun.COM {B_TRUE}, {B_TRUE} },
31812016SGirish.Moodalbail@Sun.COM
319*13125SGirish.Moodalbail@oracle.COM { "_fast_rxt_thresh", MOD_PROTO_SCTP,
32012016SGirish.Moodalbail@Sun.COM mod_set_uint32, mod_get_uint32,
32112016SGirish.Moodalbail@Sun.COM {1, 10000, 3}, {3} },
32212016SGirish.Moodalbail@Sun.COM
323*13125SGirish.Moodalbail@oracle.COM { "_deferred_acks_max", MOD_PROTO_SCTP,
32412016SGirish.Moodalbail@Sun.COM mod_set_uint32, mod_get_uint32,
32512016SGirish.Moodalbail@Sun.COM { 1, 16, 2}, {2} },
32612016SGirish.Moodalbail@Sun.COM
32712016SGirish.Moodalbail@Sun.COM /*
32812016SGirish.Moodalbail@Sun.COM * sctp_wroff_xtra is the extra space in front of SCTP/IP header
32912016SGirish.Moodalbail@Sun.COM * for link layer header. It has to be a multiple of 8.
33012016SGirish.Moodalbail@Sun.COM */
331*13125SGirish.Moodalbail@oracle.COM { "_wroff_xtra", MOD_PROTO_SCTP,
33212016SGirish.Moodalbail@Sun.COM mod_set_aligned, mod_get_uint32,
33312016SGirish.Moodalbail@Sun.COM {0, 256, 32}, {32} },
33412016SGirish.Moodalbail@Sun.COM
33512016SGirish.Moodalbail@Sun.COM { "extra_priv_ports", MOD_PROTO_SCTP,
33612016SGirish.Moodalbail@Sun.COM mod_set_extra_privports, mod_get_extra_privports,
33712016SGirish.Moodalbail@Sun.COM {1, ULP_MAX_PORT, 0}, {0} },
33812016SGirish.Moodalbail@Sun.COM
339*13125SGirish.Moodalbail@oracle.COM { "_listener_limit_conf", MOD_PROTO_SCTP,
34012869SKacheong.Poon@Sun.COM NULL, sctp_listener_conf_get, {0}, {0} },
34112869SKacheong.Poon@Sun.COM
342*13125SGirish.Moodalbail@oracle.COM { "_listener_limit_conf_add", MOD_PROTO_SCTP,
34312869SKacheong.Poon@Sun.COM sctp_listener_conf_add, NULL, {0}, {0} },
34412869SKacheong.Poon@Sun.COM
345*13125SGirish.Moodalbail@oracle.COM { "_listener_limit_conf_del", MOD_PROTO_SCTP,
34612869SKacheong.Poon@Sun.COM sctp_listener_conf_del, NULL, {0}, {0} },
34712869SKacheong.Poon@Sun.COM
34812016SGirish.Moodalbail@Sun.COM { "?", MOD_PROTO_SCTP, NULL, mod_get_allprop, {0}, {0} },
34912016SGirish.Moodalbail@Sun.COM
35012016SGirish.Moodalbail@Sun.COM { NULL, 0, NULL, NULL, {0}, {0} }
35112016SGirish.Moodalbail@Sun.COM };
35212016SGirish.Moodalbail@Sun.COM
35312016SGirish.Moodalbail@Sun.COM int sctp_propinfo_count = A_CNT(sctp_propinfo_tbl);
354