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

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/inet/tcp/tcp_stats.c
          +++ new/usr/src/uts/common/inet/tcp/tcp_stats.c
↓ open down ↓ 28 lines elided ↑ open up ↑
  29   29  #include <sys/tsol/tnet.h>
  30   30  
  31   31  #include <inet/common.h>
  32   32  #include <inet/ip.h>
  33   33  #include <inet/tcp.h>
  34   34  #include <inet/tcp_impl.h>
  35   35  #include <inet/tcp_stats.h>
  36   36  #include <inet/kstatcom.h>
  37   37  #include <inet/snmpcom.h>
  38   38  
  39      -static int      tcp_kstat_update(kstat_t *kp, int rw);
  40      -static int      tcp_kstat2_update(kstat_t *kp, int rw);
       39 +static int      tcp_snmp_state(tcp_t *);
       40 +static int      tcp_kstat_update(kstat_t *, int);
       41 +static int      tcp_kstat2_update(kstat_t *, int);
  41   42  static void     tcp_sum_mib(tcp_stack_t *, mib2_tcp_t *);
  42   43  
  43   44  static void     tcp_add_mib(mib2_tcp_t *, mib2_tcp_t *);
  44   45  static void     tcp_add_stats(tcp_stat_counter_t *, tcp_stat_t *);
  45   46  static void     tcp_clr_stats(tcp_stat_t *);
  46   47  
  47   48  tcp_g_stat_t    tcp_g_statistics;
  48   49  kstat_t         *tcp_g_kstat;
  49   50  
  50   51  /* Translate TCP state to MIB2 TCP state. */
↓ open down ↓ 743 lines elided ↑ open up ↑
 794  795                  tcp_add_stats(&tcps->tcps_sc[i]->tcp_sc_stats, stats);
 795  796  
 796  797          netstack_rele(ns);
 797  798          return (0);
 798  799  }
 799  800  
 800  801  /*
 801  802   * To add stats from one mib2_tcp_t to another.  Static fields are not added.
 802  803   * The caller should set them up propertly.
 803  804   */
 804      -void
      805 +static void
 805  806  tcp_add_mib(mib2_tcp_t *from, mib2_tcp_t *to)
 806  807  {
 807  808          to->tcpActiveOpens += from->tcpActiveOpens;
 808  809          to->tcpPassiveOpens += from->tcpPassiveOpens;
 809  810          to->tcpAttemptFails += from->tcpAttemptFails;
 810  811          to->tcpEstabResets += from->tcpEstabResets;
 811  812          to->tcpInSegs += from->tcpInSegs;
 812  813          to->tcpOutSegs += from->tcpOutSegs;
 813  814          to->tcpRetransSegs += from->tcpRetransSegs;
 814  815          to->tcpOutRsts += from->tcpOutRsts;
↓ open down ↓ 227 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX