[BACK]Return to ns.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / netstat

Diff for /src/usr.bin/netstat/Attic/ns.c between version 1.2 and 1.3

version 1.2, 1996/06/26 05:37:25 version 1.3, 1997/06/29 20:18:03
Line 140 
Line 140 
                         first = 0;                          first = 0;
                 }                  }
                 if (Aflag)                  if (Aflag)
                         printf("%8x ", ppcb);                          printf("%8lx ", ppcb);
                 printf("%-5.5s %6d %6d ", name, sockb.so_rcv.sb_cc,                  printf("%-5.5s %6ld %6ld ", name, sockb.so_rcv.sb_cc,
                         sockb.so_snd.sb_cc);                          sockb.so_snd.sb_cc);
                 printf("  %-22.22s", ns_prpr(&nspcb.nsp_laddr));                  printf("  %-22.22s", ns_prpr(&nspcb.nsp_laddr));
                 printf(" %-22.22s", ns_prpr(&nspcb.nsp_faddr));                  printf(" %-22.22s", ns_prpr(&nspcb.nsp_faddr));
Line 157 
Line 157 
         }          }
 }  }
 #define ANY(x,y,z) \  #define ANY(x,y,z) \
         ((x) ? printf("\t%d %s%s%s -- %s\n",x,y,plural(x),z,"x") : 0)          ((x) ? printf("\t%ld %s%s%s -- %s\n",x,y,plural(x),z,"x") : 0)
   
 /*  /*
  * Dump SPP statistics structure.   * Dump SPP statistics structure.
Line 174 
Line 174 
                 return;                  return;
         kread(off, (char *)&spp_istat, sizeof (spp_istat));          kread(off, (char *)&spp_istat, sizeof (spp_istat));
         printf("%s:\n", name);          printf("%s:\n", name);
         ANY(spp_istat.nonucn, "connection", " dropped due to no new sockets ");          ANY((long)spp_istat.nonucn, "connection",
         ANY(spp_istat.gonawy, "connection", " terminated due to our end dying");              " dropped due to no new sockets ");
         ANY(spp_istat.nonucn, "connection",          ANY((long)spp_istat.gonawy, "connection",
               " terminated due to our end dying");
           ANY((long)spp_istat.nonucn, "connection",
             " dropped due to inability to connect");              " dropped due to inability to connect");
         ANY(spp_istat.noconn, "connection",          ANY((long)spp_istat.noconn, "connection",
             " dropped due to inability to connect");              " dropped due to inability to connect");
         ANY(spp_istat.notme, "connection",          ANY((long)spp_istat.notme, "connection",
             " incompleted due to mismatched id's");              " incompleted due to mismatched id's");
         ANY(spp_istat.wrncon, "connection", " dropped due to mismatched id's");          ANY((long)spp_istat.wrncon, "connection",
         ANY(spp_istat.bdreas, "packet", " dropped out of sequence");              " dropped due to mismatched id's");
         ANY(spp_istat.lstdup, "packet", " duplicating the highest packet");          ANY((long)spp_istat.bdreas, "packet", " dropped out of sequence");
         ANY(spp_istat.notyet, "packet", " refused as exceeding allocation");          ANY((long)spp_istat.lstdup, "packet",
               " duplicating the highest packet");
           ANY((long)spp_istat.notyet, "packet",
               " refused as exceeding allocation");
         ANY(sppstat.spps_connattempt, "connection", " initiated");          ANY(sppstat.spps_connattempt, "connection", " initiated");
         ANY(sppstat.spps_accepts, "connection", " accepted");          ANY(sppstat.spps_accepts, "connection", " accepted");
         ANY(sppstat.spps_connects, "connection", " established");          ANY(sppstat.spps_connects, "connection", " established");

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3