Print this page
917 Make TCP's iss_incr a tunable


   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.

  23  */
  24 /* Copyright (c) 1990 Mentat Inc. */
  25 
  26 #include <inet/ip.h>
  27 #include <inet/tcp_impl.h>
  28 #include <sys/multidata.h>
  29 #include <sys/sunddi.h>
  30 
  31 /* Max size IP datagram is 64k - 1 */
  32 #define TCP_MSS_MAX_IPV4 (IP_MAXPACKET - (sizeof (ipha_t) + sizeof (tcpha_t)))
  33 #define TCP_MSS_MAX_IPV6 (IP_MAXPACKET - (sizeof (ip6_t) + sizeof (tcpha_t)))
  34 
  35 /* Max of the above */
  36 #define TCP_MSS_MAX             TCP_MSS_MAX_IPV4
  37 
  38 #define TCP_XMIT_LOWATER        4096
  39 #define TCP_XMIT_HIWATER        49152
  40 #define TCP_RECV_LOWATER        2048
  41 #define TCP_RECV_HIWATER        128000
  42 


 455             mod_set_uint32, mod_get_uint32,
 456             {0, UINT32_MAX, 100*SECONDS}, {100*SECONDS} },
 457 
 458         /* tunable - 60 */
 459         { "extra_priv_ports", MOD_PROTO_TCP,
 460             mod_set_extra_privports, mod_get_extra_privports,
 461             {1, ULP_MAX_PORT, 0}, {0} },
 462 
 463         { "_1948_phrase", MOD_PROTO_TCP,
 464             tcp_set_1948phrase, NULL, {0}, {0} },
 465 
 466         { "_listener_limit_conf", MOD_PROTO_TCP,
 467             NULL, tcp_listener_conf_get, {0}, {0} },
 468 
 469         { "_listener_limit_conf_add", MOD_PROTO_TCP,
 470             tcp_listener_conf_add, NULL, {0}, {0} },
 471 
 472         { "_listener_limit_conf_del", MOD_PROTO_TCP,
 473             tcp_listener_conf_del, NULL, {0}, {0} },
 474 





 475         { "?", MOD_PROTO_TCP, NULL, mod_get_allprop, {0}, {0} },
 476 
 477         { NULL, 0, NULL, NULL, {0}, {0} }
 478 };
 479 
 480 int tcp_propinfo_count = A_CNT(tcp_propinfo_tbl);


   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
  23  * Copyright (c) 2011, Joyent Inc. All rights reserved.
  24  */
  25 /* Copyright (c) 1990 Mentat Inc. */
  26 
  27 #include <inet/ip.h>
  28 #include <inet/tcp_impl.h>
  29 #include <sys/multidata.h>
  30 #include <sys/sunddi.h>
  31 
  32 /* Max size IP datagram is 64k - 1 */
  33 #define TCP_MSS_MAX_IPV4 (IP_MAXPACKET - (sizeof (ipha_t) + sizeof (tcpha_t)))
  34 #define TCP_MSS_MAX_IPV6 (IP_MAXPACKET - (sizeof (ip6_t) + sizeof (tcpha_t)))
  35 
  36 /* Max of the above */
  37 #define TCP_MSS_MAX             TCP_MSS_MAX_IPV4
  38 
  39 #define TCP_XMIT_LOWATER        4096
  40 #define TCP_XMIT_HIWATER        49152
  41 #define TCP_RECV_LOWATER        2048
  42 #define TCP_RECV_HIWATER        128000
  43 


 456             mod_set_uint32, mod_get_uint32,
 457             {0, UINT32_MAX, 100*SECONDS}, {100*SECONDS} },
 458 
 459         /* tunable - 60 */
 460         { "extra_priv_ports", MOD_PROTO_TCP,
 461             mod_set_extra_privports, mod_get_extra_privports,
 462             {1, ULP_MAX_PORT, 0}, {0} },
 463 
 464         { "_1948_phrase", MOD_PROTO_TCP,
 465             tcp_set_1948phrase, NULL, {0}, {0} },
 466 
 467         { "_listener_limit_conf", MOD_PROTO_TCP,
 468             NULL, tcp_listener_conf_get, {0}, {0} },
 469 
 470         { "_listener_limit_conf_add", MOD_PROTO_TCP,
 471             tcp_listener_conf_add, NULL, {0}, {0} },
 472 
 473         { "_listener_limit_conf_del", MOD_PROTO_TCP,
 474             tcp_listener_conf_del, NULL, {0}, {0} },
 475 
 476         { "_iss_incr", MOD_PROTO_TCP,
 477             mod_set_uint32, mod_get_uint32,
 478             {1, ISS_INCR, ISS_INCR},
 479             {ISS_INCR} },
 480 
 481         { "?", MOD_PROTO_TCP, NULL, mod_get_allprop, {0}, {0} },
 482 
 483         { NULL, 0, NULL, NULL, {0}, {0} }
 484 };
 485 
 486 int tcp_propinfo_count = A_CNT(tcp_propinfo_tbl);