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 */ 21*12869SKacheong.Poon@Sun.COM 2212016SGirish.Moodalbail@Sun.COM /* 23*12869SKacheong.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 /* 41*12869SKacheong.Poon@Sun.COM * returns the current list of listener limit configuration. 42*12869SKacheong.Poon@Sun.COM */ 43*12869SKacheong.Poon@Sun.COM /* ARGSUSED */ 44*12869SKacheong.Poon@Sun.COM static int 45*12869SKacheong.Poon@Sun.COM sctp_listener_conf_get(void *cbarg, mod_prop_info_t *pinfo, const char *ifname, 46*12869SKacheong.Poon@Sun.COM void *val, uint_t psize, uint_t flags) 47*12869SKacheong.Poon@Sun.COM { 48*12869SKacheong.Poon@Sun.COM sctp_stack_t *sctps = (sctp_stack_t *)cbarg; 49*12869SKacheong.Poon@Sun.COM sctp_listener_t *sl; 50*12869SKacheong.Poon@Sun.COM char *pval = val; 51*12869SKacheong.Poon@Sun.COM size_t nbytes = 0, tbytes = 0; 52*12869SKacheong.Poon@Sun.COM uint_t size; 53*12869SKacheong.Poon@Sun.COM int err = 0; 54*12869SKacheong.Poon@Sun.COM 55*12869SKacheong.Poon@Sun.COM bzero(pval, psize); 56*12869SKacheong.Poon@Sun.COM size = psize; 57*12869SKacheong.Poon@Sun.COM 58*12869SKacheong.Poon@Sun.COM if (flags & (MOD_PROP_DEFAULT|MOD_PROP_PERM|MOD_PROP_POSSIBLE)) 59*12869SKacheong.Poon@Sun.COM return (0); 60*12869SKacheong.Poon@Sun.COM 61*12869SKacheong.Poon@Sun.COM mutex_enter(&sctps->sctps_listener_conf_lock); 62*12869SKacheong.Poon@Sun.COM for (sl = list_head(&sctps->sctps_listener_conf); sl != NULL; 63*12869SKacheong.Poon@Sun.COM sl = list_next(&sctps->sctps_listener_conf, sl)) { 64*12869SKacheong.Poon@Sun.COM if (psize == size) 65*12869SKacheong.Poon@Sun.COM nbytes = snprintf(pval, size, "%d:%d", sl->sl_port, 66*12869SKacheong.Poon@Sun.COM sl->sl_ratio); 67*12869SKacheong.Poon@Sun.COM else 68*12869SKacheong.Poon@Sun.COM nbytes = snprintf(pval, size, ",%d:%d", sl->sl_port, 69*12869SKacheong.Poon@Sun.COM sl->sl_ratio); 70*12869SKacheong.Poon@Sun.COM size -= nbytes; 71*12869SKacheong.Poon@Sun.COM pval += nbytes; 72*12869SKacheong.Poon@Sun.COM tbytes += nbytes; 73*12869SKacheong.Poon@Sun.COM if (tbytes >= psize) { 74*12869SKacheong.Poon@Sun.COM /* Buffer overflow, stop copying information */ 75*12869SKacheong.Poon@Sun.COM err = ENOBUFS; 76*12869SKacheong.Poon@Sun.COM break; 77*12869SKacheong.Poon@Sun.COM } 78*12869SKacheong.Poon@Sun.COM } 79*12869SKacheong.Poon@Sun.COM 80*12869SKacheong.Poon@Sun.COM mutex_exit(&sctps->sctps_listener_conf_lock); 81*12869SKacheong.Poon@Sun.COM return (err); 82*12869SKacheong.Poon@Sun.COM } 83*12869SKacheong.Poon@Sun.COM 84*12869SKacheong.Poon@Sun.COM /* 85*12869SKacheong.Poon@Sun.COM * add a new listener limit configuration. 86*12869SKacheong.Poon@Sun.COM */ 87*12869SKacheong.Poon@Sun.COM /* ARGSUSED */ 88*12869SKacheong.Poon@Sun.COM static int 89*12869SKacheong.Poon@Sun.COM sctp_listener_conf_add(void *cbarg, cred_t *cr, mod_prop_info_t *pinfo, 90*12869SKacheong.Poon@Sun.COM const char *ifname, const void* pval, uint_t flags) 91*12869SKacheong.Poon@Sun.COM { 92*12869SKacheong.Poon@Sun.COM sctp_listener_t *new_sl; 93*12869SKacheong.Poon@Sun.COM sctp_listener_t *sl; 94*12869SKacheong.Poon@Sun.COM long lport; 95*12869SKacheong.Poon@Sun.COM long ratio; 96*12869SKacheong.Poon@Sun.COM char *colon; 97*12869SKacheong.Poon@Sun.COM sctp_stack_t *sctps = (sctp_stack_t *)cbarg; 98*12869SKacheong.Poon@Sun.COM 99*12869SKacheong.Poon@Sun.COM if (flags & MOD_PROP_DEFAULT) 100*12869SKacheong.Poon@Sun.COM return (ENOTSUP); 101*12869SKacheong.Poon@Sun.COM 102*12869SKacheong.Poon@Sun.COM if (ddi_strtol(pval, &colon, 10, &lport) != 0 || lport <= 0 || 103*12869SKacheong.Poon@Sun.COM lport > USHRT_MAX || *colon != ':') { 104*12869SKacheong.Poon@Sun.COM return (EINVAL); 105*12869SKacheong.Poon@Sun.COM } 106*12869SKacheong.Poon@Sun.COM if (ddi_strtol(colon + 1, NULL, 10, &ratio) != 0 || ratio <= 0) 107*12869SKacheong.Poon@Sun.COM return (EINVAL); 108*12869SKacheong.Poon@Sun.COM 109*12869SKacheong.Poon@Sun.COM mutex_enter(&sctps->sctps_listener_conf_lock); 110*12869SKacheong.Poon@Sun.COM for (sl = list_head(&sctps->sctps_listener_conf); sl != NULL; 111*12869SKacheong.Poon@Sun.COM sl = list_next(&sctps->sctps_listener_conf, sl)) { 112*12869SKacheong.Poon@Sun.COM /* There is an existing entry, so update its ratio value. */ 113*12869SKacheong.Poon@Sun.COM if (sl->sl_port == lport) { 114*12869SKacheong.Poon@Sun.COM sl->sl_ratio = ratio; 115*12869SKacheong.Poon@Sun.COM mutex_exit(&sctps->sctps_listener_conf_lock); 116*12869SKacheong.Poon@Sun.COM return (0); 117*12869SKacheong.Poon@Sun.COM } 118*12869SKacheong.Poon@Sun.COM } 119*12869SKacheong.Poon@Sun.COM 120*12869SKacheong.Poon@Sun.COM if ((new_sl = kmem_alloc(sizeof (sctp_listener_t), KM_NOSLEEP)) == 121*12869SKacheong.Poon@Sun.COM NULL) { 122*12869SKacheong.Poon@Sun.COM mutex_exit(&sctps->sctps_listener_conf_lock); 123*12869SKacheong.Poon@Sun.COM return (ENOMEM); 124*12869SKacheong.Poon@Sun.COM } 125*12869SKacheong.Poon@Sun.COM 126*12869SKacheong.Poon@Sun.COM new_sl->sl_port = lport; 127*12869SKacheong.Poon@Sun.COM new_sl->sl_ratio = ratio; 128*12869SKacheong.Poon@Sun.COM list_insert_tail(&sctps->sctps_listener_conf, new_sl); 129*12869SKacheong.Poon@Sun.COM mutex_exit(&sctps->sctps_listener_conf_lock); 130*12869SKacheong.Poon@Sun.COM return (0); 131*12869SKacheong.Poon@Sun.COM } 132*12869SKacheong.Poon@Sun.COM 133*12869SKacheong.Poon@Sun.COM /* 134*12869SKacheong.Poon@Sun.COM * remove a listener limit configuration. 135*12869SKacheong.Poon@Sun.COM */ 136*12869SKacheong.Poon@Sun.COM /* ARGSUSED */ 137*12869SKacheong.Poon@Sun.COM static int 138*12869SKacheong.Poon@Sun.COM sctp_listener_conf_del(void *cbarg, cred_t *cr, mod_prop_info_t *pinfo, 139*12869SKacheong.Poon@Sun.COM const char *ifname, const void* pval, uint_t flags) 140*12869SKacheong.Poon@Sun.COM { 141*12869SKacheong.Poon@Sun.COM sctp_listener_t *sl; 142*12869SKacheong.Poon@Sun.COM long lport; 143*12869SKacheong.Poon@Sun.COM sctp_stack_t *sctps = (sctp_stack_t *)cbarg; 144*12869SKacheong.Poon@Sun.COM 145*12869SKacheong.Poon@Sun.COM if (flags & MOD_PROP_DEFAULT) 146*12869SKacheong.Poon@Sun.COM return (ENOTSUP); 147*12869SKacheong.Poon@Sun.COM 148*12869SKacheong.Poon@Sun.COM if (ddi_strtol(pval, NULL, 10, &lport) != 0 || lport <= 0 || 149*12869SKacheong.Poon@Sun.COM lport > USHRT_MAX) { 150*12869SKacheong.Poon@Sun.COM return (EINVAL); 151*12869SKacheong.Poon@Sun.COM } 152*12869SKacheong.Poon@Sun.COM mutex_enter(&sctps->sctps_listener_conf_lock); 153*12869SKacheong.Poon@Sun.COM for (sl = list_head(&sctps->sctps_listener_conf); sl != NULL; 154*12869SKacheong.Poon@Sun.COM sl = list_next(&sctps->sctps_listener_conf, sl)) { 155*12869SKacheong.Poon@Sun.COM if (sl->sl_port == lport) { 156*12869SKacheong.Poon@Sun.COM list_remove(&sctps->sctps_listener_conf, sl); 157*12869SKacheong.Poon@Sun.COM mutex_exit(&sctps->sctps_listener_conf_lock); 158*12869SKacheong.Poon@Sun.COM kmem_free(sl, sizeof (sctp_listener_t)); 159*12869SKacheong.Poon@Sun.COM return (0); 160*12869SKacheong.Poon@Sun.COM } 161*12869SKacheong.Poon@Sun.COM } 162*12869SKacheong.Poon@Sun.COM mutex_exit(&sctps->sctps_listener_conf_lock); 163*12869SKacheong.Poon@Sun.COM return (ESRCH); 164*12869SKacheong.Poon@Sun.COM } 165*12869SKacheong.Poon@Sun.COM 166*12869SKacheong.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 * 16912016SGirish.Moodalbail@Sun.COM * Note: All those tunables which do not start with "sctp_" are Committed and 17012016SGirish.Moodalbail@Sun.COM * therefore are public. See PSARC 2009/306. 17112016SGirish.Moodalbail@Sun.COM */ 17212016SGirish.Moodalbail@Sun.COM mod_prop_info_t sctp_propinfo_tbl[] = { 17312016SGirish.Moodalbail@Sun.COM { "sctp_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 17712016SGirish.Moodalbail@Sun.COM { "sctp_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 18112016SGirish.Moodalbail@Sun.COM { "sctp_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 18512016SGirish.Moodalbail@Sun.COM { "sctp_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 19312016SGirish.Moodalbail@Sun.COM { "sctp_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 19712016SGirish.Moodalbail@Sun.COM { "sctp_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 20112016SGirish.Moodalbail@Sun.COM { "sctp_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 20512016SGirish.Moodalbail@Sun.COM { "sctp_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 20912016SGirish.Moodalbail@Sun.COM { "sctp_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 */ 21412016SGirish.Moodalbail@Sun.COM { "sctp_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 21812016SGirish.Moodalbail@Sun.COM { "sctp_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 22212016SGirish.Moodalbail@Sun.COM { "sctp_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 22612016SGirish.Moodalbail@Sun.COM { "sctp_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 24312016SGirish.Moodalbail@Sun.COM { "sctp_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 25312016SGirish.Moodalbail@Sun.COM { "sctp_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 */ 25812016SGirish.Moodalbail@Sun.COM { "sctp_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 26212016SGirish.Moodalbail@Sun.COM { "sctp_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 26612016SGirish.Moodalbail@Sun.COM { "sctp_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 27012016SGirish.Moodalbail@Sun.COM { "sctp_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 27412016SGirish.Moodalbail@Sun.COM { "sctp_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 27812016SGirish.Moodalbail@Sun.COM { "sctp_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 28212016SGirish.Moodalbail@Sun.COM { "sctp_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 28612016SGirish.Moodalbail@Sun.COM { "sctp_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 29012016SGirish.Moodalbail@Sun.COM { "sctp_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 29412016SGirish.Moodalbail@Sun.COM { "sctp_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 */ 29912016SGirish.Moodalbail@Sun.COM { "sctp_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 30312016SGirish.Moodalbail@Sun.COM { "sctp_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 30712016SGirish.Moodalbail@Sun.COM { "sctp_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 31112016SGirish.Moodalbail@Sun.COM { "sctp_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 31512016SGirish.Moodalbail@Sun.COM { "sctp_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 31912016SGirish.Moodalbail@Sun.COM { "sctp_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 32312016SGirish.Moodalbail@Sun.COM { "sctp_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 */ 33112016SGirish.Moodalbail@Sun.COM { "sctp_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*12869SKacheong.Poon@Sun.COM { "sctp_listener_limit_conf", MOD_PROTO_SCTP, 340*12869SKacheong.Poon@Sun.COM NULL, sctp_listener_conf_get, {0}, {0} }, 341*12869SKacheong.Poon@Sun.COM 342*12869SKacheong.Poon@Sun.COM { "sctp_listener_limit_conf_add", MOD_PROTO_SCTP, 343*12869SKacheong.Poon@Sun.COM sctp_listener_conf_add, NULL, {0}, {0} }, 344*12869SKacheong.Poon@Sun.COM 345*12869SKacheong.Poon@Sun.COM { "sctp_listener_limit_conf_del", MOD_PROTO_SCTP, 346*12869SKacheong.Poon@Sun.COM sctp_listener_conf_del, NULL, {0}, {0} }, 347*12869SKacheong.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