Print this page
some functions in the tcp module can be static

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/inet/tcp/tcp_opt_data.c
          +++ new/usr/src/uts/common/inet/tcp/tcp_opt_data.c
↓ open down ↓ 34 lines elided ↑ open up ↑
  35   35  #include <inet/common.h>
  36   36  #include <netinet/ip6.h>
  37   37  #include <inet/ip.h>
  38   38  
  39   39  #include <netinet/in.h>
  40   40  #include <netinet/tcp.h>
  41   41  #include <inet/optcom.h>
  42   42  #include <inet/proto_set.h>
  43   43  #include <inet/tcp_impl.h>
  44   44  
       45 +static int      tcp_opt_default(queue_t *, int, int, uchar_t *);
       46 +
  45   47  /*
  46   48   * Table of all known options handled on a TCP protocol stack.
  47   49   *
  48   50   * Note: This table contains options processed by both TCP and IP levels
  49   51   *       and is the superset of options that can be performed on a TCP over IP
  50   52   *       stack.
  51   53   */
  52   54  opdes_t tcp_opt_arr[] = {
  53   55  
  54   56  { SO_LINGER,    SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0,
↓ open down ↓ 244 lines elided ↑ open up ↑
 299  301                  return (B_FALSE);
 300  302          }
 301  303          /*NOTREACHED*/
 302  304  }
 303  305  
 304  306  /*
 305  307   * This routine gets default values of certain options whose default
 306  308   * values are maintained by protocol specific code
 307  309   */
 308  310  /* ARGSUSED */
 309      -int
      311 +static int
 310  312  tcp_opt_default(queue_t *q, int level, int name, uchar_t *ptr)
 311  313  {
 312  314          int32_t *i1 = (int32_t *)ptr;
 313  315          tcp_stack_t     *tcps = Q_TO_TCP(q)->tcp_tcps;
 314  316  
 315  317          switch (level) {
 316  318          case IPPROTO_TCP:
 317  319                  switch (name) {
 318  320                  case TCP_NOTIFY_THRESHOLD:
 319  321                          *i1 = tcps->tcps_ip_notify_interval;
↓ open down ↓ 770 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX