16e91bbaGirish Moodalbail/*
26e91bbaGirish Moodalbail * CDDL HEADER START
36e91bbaGirish Moodalbail *
46e91bbaGirish Moodalbail * The contents of this file are subject to the terms of the
56e91bbaGirish Moodalbail * Common Development and Distribution License (the "License").
66e91bbaGirish Moodalbail * You may not use this file except in compliance with the License.
76e91bbaGirish Moodalbail *
86e91bbaGirish Moodalbail * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
96e91bbaGirish Moodalbail * or http://www.opensolaris.org/os/licensing.
106e91bbaGirish Moodalbail * See the License for the specific language governing permissions
116e91bbaGirish Moodalbail * and limitations under the License.
126e91bbaGirish Moodalbail *
136e91bbaGirish Moodalbail * When distributing Covered Code, include this CDDL HEADER in each
146e91bbaGirish Moodalbail * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
156e91bbaGirish Moodalbail * If applicable, add the following below this CDDL HEADER, with the
166e91bbaGirish Moodalbail * fields enclosed by brackets "[]" replaced with your own identifying
176e91bbaGirish Moodalbail * information: Portions Copyright [yyyy] [name of copyright owner]
186e91bbaGirish Moodalbail *
196e91bbaGirish Moodalbail * CDDL HEADER END
206e91bbaGirish Moodalbail */
215dd46abKacheong Poon
226e91bbaGirish Moodalbail/*
235dd46abKacheong Poon * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
24299625cSebastien Roy * Copyright (c) 2013 by Delphix. All rights reserved.
256e91bbaGirish Moodalbail */
266e91bbaGirish Moodalbail
276e91bbaGirish Moodalbail#include <inet/ip.h>
286e91bbaGirish Moodalbail#include <inet/ip6.h>
296e91bbaGirish Moodalbail#include <inet/sctp/sctp_stack.h>
306e91bbaGirish Moodalbail#include <inet/sctp/sctp_impl.h>
316e91bbaGirish Moodalbail#include <sys/sunddi.h>
326e91bbaGirish Moodalbail
336e91bbaGirish Moodalbail/* Max size IP datagram is 64k - 1 */
346e91bbaGirish Moodalbail#define	SCTP_MSS_MAX_IPV4 (IP_MAXPACKET - (sizeof (ipha_t) + \
356e91bbaGirish Moodalbail					sizeof (sctp_hdr_t)))
366e91bbaGirish Moodalbail#define	SCTP_MSS_MAX_IPV6 (IP_MAXPACKET - (sizeof (ip6_t) + \
376e91bbaGirish Moodalbail					sizeof (sctp_hdr_t)))
386e91bbaGirish Moodalbail/* Max of the above */
396e91bbaGirish Moodalbail#define	SCTP_MSS_MAX	SCTP_MSS_MAX_IPV4
406e91bbaGirish Moodalbail
416e91bbaGirish Moodalbail/*
425dd46abKacheong Poon * returns the current list of listener limit configuration.
435dd46abKacheong Poon */
445dd46abKacheong Poon/* ARGSUSED */
455dd46abKacheong Poonstatic int
46299625cSebastien Roysctp_listener_conf_get(netstack_t *stack, mod_prop_info_t *pinfo,
47299625cSebastien Roy    const char *ifname, void *val, uint_t psize, uint_t flags)
485dd46abKacheong Poon{
49299625cSebastien Roy	sctp_stack_t	*sctps = stack->netstack_sctp;
505dd46abKacheong Poon	sctp_listener_t	*sl;
515dd46abKacheong Poon	char		*pval = val;
525dd46abKacheong Poon	size_t		nbytes = 0, tbytes = 0;
535dd46abKacheong Poon	uint_t		size;
545dd46abKacheong Poon	int		err = 0;
555dd46abKacheong Poon
565dd46abKacheong Poon	bzero(pval, psize);
575dd46abKacheong Poon	size = psize;
585dd46abKacheong Poon
595dd46abKacheong Poon	if (flags & (MOD_PROP_DEFAULT|MOD_PROP_PERM|MOD_PROP_POSSIBLE))
605dd46abKacheong Poon		return (0);
615dd46abKacheong Poon
625dd46abKacheong Poon	mutex_enter(&sctps->sctps_listener_conf_lock);
635dd46abKacheong Poon	for (sl = list_head(&sctps->sctps_listener_conf); sl != NULL;
645dd46abKacheong Poon	    sl = list_next(&sctps->sctps_listener_conf, sl)) {
655dd46abKacheong Poon		if (psize == size)
665dd46abKacheong Poon			nbytes = snprintf(pval, size, "%d:%d",  sl->sl_port,
675dd46abKacheong Poon			    sl->sl_ratio);
685dd46abKacheong Poon		else
695dd46abKacheong Poon			nbytes = snprintf(pval, size, ",%d:%d",  sl->sl_port,
705dd46abKacheong Poon			    sl->sl_ratio);
715dd46abKacheong Poon		size -= nbytes;
725dd46abKacheong Poon		pval += nbytes;
735dd46abKacheong Poon		tbytes += nbytes;
745dd46abKacheong Poon		if (tbytes >= psize) {
755dd46abKacheong Poon			/* Buffer overflow, stop copying information */
765dd46abKacheong Poon			err = ENOBUFS;
775dd46abKacheong Poon			break;
785dd46abKacheong Poon		}
795dd46abKacheong Poon	}
805dd46abKacheong Poon
815dd46abKacheong Poon	mutex_exit(&sctps->sctps_listener_conf_lock);
825dd46abKacheong Poon	return (err);
835dd46abKacheong Poon}
845dd46abKacheong Poon
855dd46abKacheong Poon/*
865dd46abKacheong Poon * add a new listener limit configuration.
875dd46abKacheong Poon */
885dd46abKacheong Poon/* ARGSUSED */
895dd46abKacheong Poonstatic int
90299625cSebastien Roysctp_listener_conf_add(netstack_t *stack, cred_t *cr, mod_prop_info_t *pinfo,
915dd46abKacheong Poon    const char *ifname, const void* pval, uint_t flags)
925dd46abKacheong Poon{
935dd46abKacheong Poon	sctp_listener_t	*new_sl;
945dd46abKacheong Poon	sctp_listener_t	*sl;
955dd46abKacheong Poon	long		lport;
965dd46abKacheong Poon	long		ratio;
975dd46abKacheong Poon	char		*colon;
98299625cSebastien Roy	sctp_stack_t	*sctps = stack->netstack_sctp;
995dd46abKacheong Poon
1005dd46abKacheong Poon	if (flags & MOD_PROP_DEFAULT)
1015dd46abKacheong Poon		return (ENOTSUP);
1025dd46abKacheong Poon
1035dd46abKacheong Poon	if (ddi_strtol(pval, &colon, 10, &lport) != 0 || lport <= 0 ||
1045dd46abKacheong Poon	    lport > USHRT_MAX || *colon != ':') {
1055dd46abKacheong Poon		return (EINVAL);
1065dd46abKacheong Poon	}
1075dd46abKacheong Poon	if (ddi_strtol(colon + 1, NULL, 10, &ratio) != 0 || ratio <= 0)
1085dd46abKacheong Poon		return (EINVAL);
1095dd46abKacheong Poon
1105dd46abKacheong Poon	mutex_enter(&sctps->sctps_listener_conf_lock);
1115dd46abKacheong Poon	for (sl = list_head(&sctps->sctps_listener_conf); sl != NULL;
1125dd46abKacheong Poon	    sl = list_next(&sctps->sctps_listener_conf, sl)) {
1135dd46abKacheong Poon		/* There is an existing entry, so update its ratio value. */
1145dd46abKacheong Poon		if (sl->sl_port == lport) {
1155dd46abKacheong Poon			sl->sl_ratio = ratio;
1165dd46abKacheong Poon			mutex_exit(&sctps->sctps_listener_conf_lock);
1175dd46abKacheong Poon			return (0);
1185dd46abKacheong Poon		}
1195dd46abKacheong Poon	}
1205dd46abKacheong Poon
1215dd46abKacheong Poon	if ((new_sl = kmem_alloc(sizeof (sctp_listener_t), KM_NOSLEEP)) ==
1225dd46abKacheong Poon	    NULL) {
1235dd46abKacheong Poon		mutex_exit(&sctps->sctps_listener_conf_lock);
1245dd46abKacheong Poon		return (ENOMEM);
1255dd46abKacheong Poon	}
1265dd46abKacheong Poon
1275dd46abKacheong Poon	new_sl->sl_port = lport;
1285dd46abKacheong Poon	new_sl->sl_ratio = ratio;
1295dd46abKacheong Poon	list_insert_tail(&sctps->sctps_listener_conf, new_sl);
1305dd46abKacheong Poon	mutex_exit(&sctps->sctps_listener_conf_lock);
1315dd46abKacheong Poon	return (0);
1325dd46abKacheong Poon}
1335dd46abKacheong Poon
1345dd46abKacheong Poon/*
1355dd46abKacheong Poon * remove a listener limit configuration.
1365dd46abKacheong Poon */
1375dd46abKacheong Poon/* ARGSUSED */
1385dd46abKacheong Poonstatic int
139299625cSebastien Roysctp_listener_conf_del(netstack_t *stack, cred_t *cr, mod_prop_info_t *pinfo,
1405dd46abKacheong Poon    const char *ifname, const void* pval, uint_t flags)
1415dd46abKacheong Poon{
1425dd46abKacheong Poon	sctp_listener_t	*sl;
1435dd46abKacheong Poon	long		lport;
144299625cSebastien Roy	sctp_stack_t	*sctps = stack->netstack_sctp;
1455dd46abKacheong Poon
1465dd46abKacheong Poon	if (flags & MOD_PROP_DEFAULT)
1475dd46abKacheong Poon		return (ENOTSUP);
1485dd46abKacheong Poon
1495dd46abKacheong Poon	if (ddi_strtol(pval, NULL, 10, &lport) != 0 || lport <= 0 ||
1505dd46abKacheong Poon	    lport > USHRT_MAX) {
1515dd46abKacheong Poon		return (EINVAL);
1525dd46abKacheong Poon	}
1535dd46abKacheong Poon	mutex_enter(&sctps->sctps_listener_conf_lock);
1545dd46abKacheong Poon	for (sl = list_head(&sctps->sctps_listener_conf); sl != NULL;
1555dd46abKacheong Poon	    sl = list_next(&sctps->sctps_listener_conf, sl)) {
1565dd46abKacheong Poon		if (sl->sl_port == lport) {
1575dd46abKacheong Poon			list_remove(&sctps->sctps_listener_conf, sl);
1585dd46abKacheong Poon			mutex_exit(&sctps->sctps_listener_conf_lock);
1595dd46abKacheong Poon			kmem_free(sl, sizeof (sctp_listener_t));
1605dd46abKacheong Poon			return (0);
1615dd46abKacheong Poon		}
1625dd46abKacheong Poon	}
1635dd46abKacheong Poon	mutex_exit(&sctps->sctps_listener_conf_lock);
1645dd46abKacheong Poon	return (ESRCH);
1655dd46abKacheong Poon}
1665dd46abKacheong Poon
167299625cSebastien Roystatic int
168299625cSebastien Roysctp_set_buf_prop(netstack_t *stack, cred_t *cr, mod_prop_info_t *pinfo,
169299625cSebastien Roy    const char *ifname, const void *pval, uint_t flags)
170299625cSebastien Roy{
171299625cSebastien Roy	return (mod_set_buf_prop(stack->netstack_sctp->sctps_propinfo_tbl,
172299625cSebastien Roy	    stack, cr, pinfo, ifname, pval, flags));
173299625cSebastien Roy}
174299625cSebastien Roy
175299625cSebastien Roystatic int
176299625cSebastien Roysctp_get_buf_prop(netstack_t *stack, mod_prop_info_t *pinfo, const char *ifname,
177299625cSebastien Roy    void *val, uint_t psize, uint_t flags)
178299625cSebastien Roy{
179299625cSebastien Roy	return (mod_get_buf_prop(stack->netstack_sctp->sctps_propinfo_tbl,
180299625cSebastien Roy	    stack, pinfo, ifname, val, psize, flags));
181299625cSebastien Roy}
182299625cSebastien Roy
1835dd46abKacheong Poon/*
1846e91bbaGirish Moodalbail * All of these are alterable, within the min/max values given, at run time.
1856e91bbaGirish Moodalbail *
1868887b57Girish Moodalbail * Note: All those tunables which do not start with "_" are Committed and
1878887b57Girish Moodalbail * therefore are public. See PSARC 2010/080.
1886e91bbaGirish Moodalbail */
1896e91bbaGirish Moodalbailmod_prop_info_t sctp_propinfo_tbl[] = {
1908887b57Girish Moodalbail	{ "_max_init_retr", MOD_PROTO_SCTP,
1916e91bbaGirish Moodalbail	    mod_set_uint32, mod_get_uint32,
1926e91bbaGirish Moodalbail	    {0, 128, 8}, {8} },
1936e91bbaGirish Moodalbail
1948887b57Girish Moodalbail	{ "_pa_max_retr", MOD_PROTO_SCTP,
1956e91bbaGirish Moodalbail	    mod_set_uint32, mod_get_uint32,
1966e91bbaGirish Moodalbail	    {1, 128, 10}, {10} },
1976e91bbaGirish Moodalbail
1988887b57Girish Moodalbail	{ "_pp_max_retr", MOD_PROTO_SCTP,
1996e91bbaGirish Moodalbail	    mod_set_uint32, mod_get_uint32,
2006e91bbaGirish Moodalbail	    {1, 128, 5}, {5} },
2016e91bbaGirish Moodalbail
2028887b57Girish Moodalbail	{ "_cwnd_max", MOD_PROTO_SCTP,
2036e91bbaGirish Moodalbail	    mod_set_uint32, mod_get_uint32,
204299625cSebastien Roy	    {128, ULP_MAX_BUF, 1024*1024}, {1024*1024} },
2056e91bbaGirish Moodalbail
2066e91bbaGirish Moodalbail	{ "smallest_nonpriv_port", MOD_PROTO_SCTP,
2076e91bbaGirish Moodalbail	    mod_set_uint32, mod_get_uint32,
2086e91bbaGirish Moodalbail	    {1024, (32*1024), 1024}, {1024} },
2096e91bbaGirish Moodalbail
2108887b57Girish Moodalbail	{ "_ipv4_ttl", MOD_PROTO_SCTP,
2116e91bbaGirish Moodalbail	    mod_set_uint32, mod_get_uint32,
2126e91bbaGirish Moodalbail	    {1, 255, 64}, {64} },
2136e91bbaGirish Moodalbail
2148887b57Girish Moodalbail	{ "_heartbeat_interval", MOD_PROTO_SCTP,
2156e91bbaGirish Moodalbail	    mod_set_uint32, mod_get_uint32,
2166e91bbaGirish Moodalbail	    {0, 1*DAYS, 30*SECONDS}, {30*SECONDS} },
2176e91bbaGirish Moodalbail
2188887b57Girish Moodalbail	{ "_initial_mtu", MOD_PROTO_SCTP,
2196e91bbaGirish Moodalbail	    mod_set_uint32, mod_get_uint32,
2206e91bbaGirish Moodalbail	    {68, 65535, 1500}, {1500} },
2216e91bbaGirish Moodalbail
2228887b57Girish Moodalbail	{ "_mtu_probe_interval", MOD_PROTO_SCTP,
2236e91bbaGirish Moodalbail	    mod_set_uint32, mod_get_uint32,
2246e91bbaGirish Moodalbail	    {0, 1*DAYS, 10*MINUTES}, {10*MINUTES} },
2256e91bbaGirish Moodalbail
2268887b57Girish Moodalbail	{ "_new_secret_interval", MOD_PROTO_SCTP,
2276e91bbaGirish Moodalbail	    mod_set_uint32, mod_get_uint32,
2286e91bbaGirish Moodalbail	    {0, 1*DAYS, 2*MINUTES}, {2*MINUTES} },
2296e91bbaGirish Moodalbail
2306e91bbaGirish Moodalbail	/* tunable - 10 */
2318887b57Girish Moodalbail	{ "_deferred_ack_interval", MOD_PROTO_SCTP,
2326e91bbaGirish Moodalbail	    mod_set_uint32, mod_get_uint32,
2336e91bbaGirish Moodalbail	    {10*MS, 1*MINUTES, 100*MS}, {100*MS} },
2346e91bbaGirish Moodalbail
2358887b57Girish Moodalbail	{ "_snd_lowat_fraction", MOD_PROTO_SCTP,
2366e91bbaGirish Moodalbail	    mod_set_uint32, mod_get_uint32,
2376e91bbaGirish Moodalbail	    {0, 16, 0}, {0} },
2386e91bbaGirish Moodalbail
2398887b57Girish Moodalbail	{ "_ignore_path_mtu", MOD_PROTO_SCTP,
2406e91bbaGirish Moodalbail	    mod_set_boolean, mod_get_boolean,
2416e91bbaGirish Moodalbail	    {B_FALSE}, {B_FALSE} },
2426e91bbaGirish Moodalbail
2438887b57Girish Moodalbail	{ "_initial_ssthresh", MOD_PROTO_SCTP,
2446e91bbaGirish Moodalbail	    mod_set_uint32, mod_get_uint32,
2456e91bbaGirish Moodalbail	    {1024, UINT32_MAX, SCTP_RECV_HIWATER}, { SCTP_RECV_HIWATER} },
2466e91bbaGirish Moodalbail
2476e91bbaGirish Moodalbail	{ "smallest_anon_port", MOD_PROTO_SCTP,
2486e91bbaGirish Moodalbail	    mod_set_uint32, mod_get_uint32,
2496e91bbaGirish Moodalbail	    {1024, ULP_MAX_PORT, 32*1024}, {32*1024} },
2506e91bbaGirish Moodalbail
2516e91bbaGirish Moodalbail	{ "largest_anon_port", MOD_PROTO_SCTP,
2526e91bbaGirish Moodalbail	    mod_set_uint32, mod_get_uint32,
2536e91bbaGirish Moodalbail	    {1024, ULP_MAX_PORT, ULP_MAX_PORT}, {ULP_MAX_PORT} },
2546e91bbaGirish Moodalbail
255299625cSebastien Roy	{ "send_buf", MOD_PROTO_SCTP,
256299625cSebastien Roy	    sctp_set_buf_prop, sctp_get_buf_prop,
257299625cSebastien Roy	    {SCTP_XMIT_LOWATER,  ULP_MAX_BUF,  SCTP_XMIT_HIWATER},
2586e91bbaGirish Moodalbail	    {SCTP_XMIT_HIWATER} },
2596e91bbaGirish Moodalbail
2608887b57Girish Moodalbail	{ "_xmit_lowat", MOD_PROTO_SCTP,
2616e91bbaGirish Moodalbail	    mod_set_uint32, mod_get_uint32,
262299625cSebastien Roy	    {SCTP_XMIT_LOWATER,  ULP_MAX_BUF,  SCTP_XMIT_LOWATER},
2636e91bbaGirish Moodalbail	    {SCTP_XMIT_LOWATER} },
2646e91bbaGirish Moodalbail
265299625cSebastien Roy	{ "recv_buf", MOD_PROTO_SCTP,
266299625cSebastien Roy	    sctp_set_buf_prop, sctp_get_buf_prop,
267299625cSebastien Roy	    {SCTP_RECV_LOWATER,  ULP_MAX_BUF,  SCTP_RECV_HIWATER},
2686e91bbaGirish Moodalbail	    {SCTP_RECV_HIWATER} },
2696e91bbaGirish Moodalbail
270299625cSebastien Roy	{ "max_buf", MOD_PROTO_SCTP,
2716e91bbaGirish Moodalbail	    mod_set_uint32, mod_get_uint32,
272299625cSebastien Roy	    {8192, ULP_MAX_BUF, 1024*1024}, {1024*1024} },
2736e91bbaGirish Moodalbail
2746e91bbaGirish Moodalbail	/* tunable - 20 */
2758887b57Girish Moodalbail	{ "_rtt_updates", MOD_PROTO_SCTP,
2766e91bbaGirish Moodalbail	    mod_set_uint32, mod_get_uint32,
2776e91bbaGirish Moodalbail	    {0, 65536, 20}, {20} },
2786e91bbaGirish Moodalbail
2798887b57Girish Moodalbail	{ "_ipv6_hoplimit", MOD_PROTO_SCTP,
2806e91bbaGirish Moodalbail	    mod_set_uint32, mod_get_uint32,
2816e91bbaGirish Moodalbail	    {0, IPV6_MAX_HOPS, IPV6_DEFAULT_HOPS}, {IPV6_DEFAULT_HOPS} },
2826e91bbaGirish Moodalbail
2838887b57Girish Moodalbail	{ "_rto_min", MOD_PROTO_SCTP,
2846e91bbaGirish Moodalbail	    mod_set_uint32, mod_get_uint32,
2856e91bbaGirish Moodalbail	    {500*MS, 60*SECONDS, 1*SECONDS}, {1*SECONDS} },
2866e91bbaGirish Moodalbail
2878887b57Girish Moodalbail	{ "_rto_max", MOD_PROTO_SCTP,
2886e91bbaGirish Moodalbail	    mod_set_uint32, mod_get_uint32,
2896e91bbaGirish Moodalbail	    {1*SECONDS, 60000*SECONDS, 60*SECONDS}, {60*SECONDS} },
2906e91bbaGirish Moodalbail
2918887b57Girish Moodalbail	{ "_rto_initial", MOD_PROTO_SCTP,
2926e91bbaGirish Moodalbail	    mod_set_uint32, mod_get_uint32,
2936e91bbaGirish Moodalbail	    {1*SECONDS, 60000*SECONDS, 3*SECONDS}, {3*SECONDS} },
2946e91bbaGirish Moodalbail
2958887b57Girish Moodalbail	{ "_cookie_life", MOD_PROTO_SCTP,
2966e91bbaGirish Moodalbail	    mod_set_uint32, mod_get_uint32,
2976e91bbaGirish Moodalbail	    {10*MS, 60000*SECONDS, 60*SECONDS}, {60*SECONDS} },
2986e91bbaGirish Moodalbail
2998887b57Girish Moodalbail	{ "_max_in_streams", MOD_PROTO_SCTP,
3006e91bbaGirish Moodalbail	    mod_set_uint32, mod_get_uint32,
3016e91bbaGirish Moodalbail	    {1, UINT16_MAX, 32}, {32} },
3026e91bbaGirish Moodalbail
3038887b57Girish Moodalbail	{ "_initial_out_streams", MOD_PROTO_SCTP,
3046e91bbaGirish Moodalbail	    mod_set_uint32, mod_get_uint32,
3056e91bbaGirish Moodalbail	    {1, UINT16_MAX, 32}, {32} },
3066e91bbaGirish Moodalbail
3078887b57Girish Moodalbail	{ "_shutack_wait_bound", MOD_PROTO_SCTP,
3086e91bbaGirish Moodalbail	    mod_set_uint32, mod_get_uint32,
3096e91bbaGirish Moodalbail	    {0, 300*SECONDS, 60*SECONDS}, {60*SECONDS} },
3106e91bbaGirish Moodalbail
3118887b57Girish Moodalbail	{ "_maxburst", MOD_PROTO_SCTP,
3126e91bbaGirish Moodalbail	    mod_set_uint32, mod_get_uint32,
3136e91bbaGirish Moodalbail	    {2, 8, 4}, {4} },
3146e91bbaGirish Moodalbail
3156e91bbaGirish Moodalbail	/* tunable - 30 */
3168887b57Girish Moodalbail	{ "_addip_enabled", MOD_PROTO_SCTP,
3176e91bbaGirish Moodalbail	    mod_set_boolean, mod_get_boolean,
3186e91bbaGirish Moodalbail	    {B_FALSE}, {B_FALSE} },
3196e91bbaGirish Moodalbail
3208887b57Girish Moodalbail	{ "_recv_hiwat_minmss", MOD_PROTO_SCTP,
3216e91bbaGirish Moodalbail	    mod_set_uint32, mod_get_uint32,
3226e91bbaGirish Moodalbail	    {1, 65536, 4}, {4} },
3236e91bbaGirish Moodalbail
3248887b57Girish Moodalbail	{ "_slow_start_initial", MOD_PROTO_SCTP,
3256e91bbaGirish Moodalbail	    mod_set_uint32, mod_get_uint32,
3266e91bbaGirish Moodalbail	    {1, 16, 4}, {4} },
3276e91bbaGirish Moodalbail
3288887b57Girish Moodalbail	{ "_slow_start_after_idle", MOD_PROTO_SCTP,
3296e91bbaGirish Moodalbail	    mod_set_uint32, mod_get_uint32,
3306e91bbaGirish Moodalbail	    {1, 16384, 4}, {4} },
3316e91bbaGirish Moodalbail
3328887b57Girish Moodalbail	{ "_prsctp_enabled", MOD_PROTO_SCTP,
3336e91bbaGirish Moodalbail	    mod_set_boolean, mod_get_boolean,
3346e91bbaGirish Moodalbail	    {B_TRUE}, {B_TRUE} },
3356e91bbaGirish Moodalbail
3368887b57Girish Moodalbail	{ "_fast_rxt_thresh", MOD_PROTO_SCTP,
3376e91bbaGirish Moodalbail	    mod_set_uint32, mod_get_uint32,
3386e91bbaGirish Moodalbail	    {1, 10000, 3}, {3} },
3396e91bbaGirish Moodalbail
3408887b57Girish Moodalbail	{ "_deferred_acks_max", MOD_PROTO_SCTP,
3416e91bbaGirish Moodalbail	    mod_set_uint32, mod_get_uint32,
3426e91bbaGirish Moodalbail	    { 1, 16, 2}, {2} },
3436e91bbaGirish Moodalbail
3446e91bbaGirish Moodalbail	/*
3456e91bbaGirish Moodalbail	 * sctp_wroff_xtra is the extra space in front of SCTP/IP header
3466e91bbaGirish Moodalbail	 * for link layer header.  It has to be a multiple of 8.
3476e91bbaGirish Moodalbail	 */
3488887b57Girish Moodalbail	{ "_wroff_xtra", MOD_PROTO_SCTP,
3496e91bbaGirish Moodalbail	    mod_set_aligned, mod_get_uint32,
3506e91bbaGirish Moodalbail	    {0, 256, 32}, {32} },
3516e91bbaGirish Moodalbail
3526e91bbaGirish Moodalbail	{ "extra_priv_ports", MOD_PROTO_SCTP,
3536e91bbaGirish Moodalbail	    mod_set_extra_privports, mod_get_extra_privports,
3546e91bbaGirish Moodalbail	    {1, ULP_MAX_PORT, 0}, {0} },
3556e91bbaGirish Moodalbail
3568887b57Girish Moodalbail	{ "_listener_limit_conf", MOD_PROTO_SCTP,
3575dd46abKacheong Poon	    NULL, sctp_listener_conf_get, {0}, {0} },
3585dd46abKacheong Poon
3598887b57Girish Moodalbail	{ "_listener_limit_conf_add", MOD_PROTO_SCTP,
3605dd46abKacheong Poon	    sctp_listener_conf_add, NULL, {0}, {0} },
3615dd46abKacheong Poon
3628887b57Girish Moodalbail	{ "_listener_limit_conf_del", MOD_PROTO_SCTP,
3635dd46abKacheong Poon	    sctp_listener_conf_del, NULL, {0}, {0} },
3645dd46abKacheong Poon
3656e91bbaGirish Moodalbail	{ "?", MOD_PROTO_SCTP, NULL, mod_get_allprop, {0}, {0} },
3666e91bbaGirish Moodalbail
3676e91bbaGirish Moodalbail	{ NULL, 0, NULL, NULL, {0}, {0} }
3686e91bbaGirish Moodalbail};
3696e91bbaGirish Moodalbail
3706e91bbaGirish Moodalbailint sctp_propinfo_count = A_CNT(sctp_propinfo_tbl);