1 /*
   2  * This file and its contents are supplied under the terms of the
   3  * Common Development and Distribution License ("CDDL"), version 1.0.
   4  * You may only use this file in accordance with the terms of version
   5  * 1.0 of the CDDL.
   6  *
   7  * A full copy of the text of the CDDL should have accompanied this
   8  * source.  A copy of the CDDL is also available via the Internet at
   9  * http://www.illumos.org/license/CDDL.
  10  */
  11 
  12 /*
  13  * Copyright 2012 David Hoeppner.  All rights reserved.
  14  */
  15 
  16 /*
  17  * This file contains tunable properties for DCCP.
  18  */
  19 #include <inet/ip.h>
  20 #include <inet/ip6.h>
  21 #include <inet/dccp_impl.h>
  22 #include <sys/sunddi.h>
  23 
  24 mod_prop_info_t dccp_propinfo_tbl[] = {
  25         /* tunable - 0 */
  26         { "smallest_nonpriv_port", MOD_PROTO_DCCP,
  27             mod_set_uint32, mod_get_uint32,
  28             {1024, (32 * 1024), 1024}, {1024} },
  29 
  30         { "smallest_anon_port", MOD_PROTO_DCCP,
  31             mod_set_uint32, mod_get_uint32,
  32             {1024, ULP_MAX_PORT, 32*1024}, {32*1024} },
  33 
  34         { "largest_anon_port", MOD_PROTO_DCCP,
  35             mod_set_uint32, mod_get_uint32,
  36             {1024, ULP_MAX_PORT, ULP_MAX_PORT}, {ULP_MAX_PORT} },
  37 
  38         { "_xmit_lowat", MOD_PROTO_DCCP,
  39             mod_set_uint32, mod_get_uint32,
  40             {0, (1<<30), DCCP_XMIT_LOWATER},
  41             {DCCP_XMIT_LOWATER} },
  42 
  43         { "_debug", MOD_PROTO_DCCP,
  44             mod_set_uint32, mod_get_uint32,
  45             {0, 10, 0}, {0} },
  46 
  47         { "_rst_sent_rate_enabled", MOD_PROTO_DCCP,
  48             mod_set_boolean, mod_get_boolean,
  49             {B_TRUE}, {B_TRUE} },
  50 
  51         { "_rst_sent_rate", MOD_PROTO_DCCP,
  52             mod_set_uint32, mod_get_uint32,
  53             {0, UINT32_MAX, 40}, {40} },
  54 
  55         { "_ip_abort_cinterval", MOD_PROTO_DCCP,
  56             mod_set_uint32, mod_get_uint32,
  57             {1*SECONDS, UINT32_MAX, 3*MINUTES}, {3*MINUTES} },
  58 
  59         { "_ip_abort_linterval", MOD_PROTO_DCCP,
  60             mod_set_uint32, mod_get_uint32,
  61             {1*SECONDS, UINT32_MAX, 3*MINUTES}, {3*MINUTES} },
  62 
  63         { "_ip_abort_interval", MOD_PROTO_DCCP,
  64             mod_set_uint32, mod_get_uint32,
  65             {500*MS, UINT32_MAX, 5*MINUTES}, {5*MINUTES} },
  66 
  67         /* tunable - 10 */
  68         { "_ip_notify_cinterval", MOD_PROTO_DCCP,
  69             mod_set_uint32, mod_get_uint32,
  70             {1*SECONDS, UINT32_MAX, 10*SECONDS}, {10*SECONDS} },
  71 
  72         { "_ip_notify_interval", MOD_PROTO_DCCP,
  73             mod_set_uint32, mod_get_uint32,
  74             {500*MS, UINT32_MAX, 10*SECONDS}, {10*SECONDS} },
  75 
  76         { "_keepalive_interval", MOD_PROTO_DCCP,
  77             mod_set_uint32, mod_get_uint32,
  78             {10*SECONDS, 10*DAYS, 2*HOURS}, {2*HOURS} },
  79 
  80         { "_keepalive_abort_interval", MOD_PROTO_DCCP,
  81             mod_set_uint32, mod_get_uint32,
  82             {0, UINT32_MAX, 8*MINUTES}, {8*MINUTES} },
  83 
  84         { NULL, 0, NULL, NULL, {0}, {0} }
  85 };
  86 
  87 int dccp_propinfo_count = A_CNT(dccp_propinfo_tbl);