[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.11 and 1.12

version 1.11, 2003/06/03 02:56:13 version 1.12, 2005/03/25 17:01:04
Line 94 
Line 94 
         if (off == 0)          if (off == 0)
                 return;                  return;
         isspp = strcmp(name, "spp") == 0;          isspp = strcmp(name, "spp") == 0;
         kread(off, (char *)&cb, sizeof (struct nspcb));          kread(off, &cb, sizeof (struct nspcb));
         nspcb = cb;          nspcb = cb;
         prev = (struct nspcb *)off;          prev = (struct nspcb *)off;
         if (nspcb.nsp_next == (struct nspcb *)off)          if (nspcb.nsp_next == (struct nspcb *)off)
Line 103 
Line 103 
                 u_long ppcb;                  u_long ppcb;
   
                 next = nspcb.nsp_next;                  next = nspcb.nsp_next;
                 kread((u_long)next, (char *)&nspcb, sizeof (nspcb));                  kread((u_long)next, &nspcb, sizeof (nspcb));
                 if (nspcb.nsp_prev != prev) {                  if (nspcb.nsp_prev != prev) {
                         printf("???\n");                          printf("???\n");
                         break;                          break;
Line 111 
Line 111 
                 if (!aflag && ns_nullhost(nspcb.nsp_faddr) ) {                  if (!aflag && ns_nullhost(nspcb.nsp_faddr) ) {
                         continue;                          continue;
                 }                  }
                 kread((u_long)nspcb.nsp_socket,                  kread((u_long)nspcb.nsp_socket, &sockb, sizeof (sockb));
                                 (char *)&sockb, sizeof (sockb));  
                 ppcb = (u_long) nspcb.nsp_pcb;                  ppcb = (u_long) nspcb.nsp_pcb;
                 if (ppcb) {                  if (ppcb) {
                         if (isspp) {                          if (isspp) {
                                 kread(ppcb, (char *)&sppcb, sizeof (sppcb));                                  kread(ppcb, &sppcb, sizeof (sppcb));
                         } else continue;                          } else continue;
                 } else if (isspp)                  } else if (isspp)
                         continue;                          continue;
Line 165 
Line 164 
   
         if (off == 0)          if (off == 0)
                 return;                  return;
         kread(off, (char *)&spp_istat, sizeof (spp_istat));          kread(off, &spp_istat, sizeof (spp_istat));
         printf("%s:\n", name);          printf("%s:\n", name);
         ANY((long)spp_istat.nonucn, "connection",          ANY((long)spp_istat.nonucn, "connection",
             " dropped due to no new sockets ");              " dropped due to no new sockets ");
Line 245 
Line 244 
   
         if (off == 0)          if (off == 0)
                 return;                  return;
         kread(off, (char *)&idpstat, sizeof (idpstat));          kread(off, &idpstat, sizeof (idpstat));
         printf("%s:\n", name);          printf("%s:\n", name);
         ANY(idpstat.idps_toosmall, "packet", " smaller than a header");          ANY(idpstat.idps_toosmall, "packet", " smaller than a header");
         ANY(idpstat.idps_tooshort, "packet", " smaller than advertised");          ANY(idpstat.idps_tooshort, "packet", " smaller than advertised");
Line 282 
Line 281 
   
         if (off == 0)          if (off == 0)
                 return;                  return;
         kread(off, (char *)&ns_errstat, sizeof (ns_errstat));          kread(off, &ns_errstat, sizeof (ns_errstat));
         printf("NS error statistics:\n");          printf("NS error statistics:\n");
         ANY(ns_errstat.ns_es_error, "call", " to ns_error");          ANY(ns_errstat.ns_es_error, "call", " to ns_error");
         ANY(ns_errstat.ns_es_oldshort, "error",          ANY(ns_errstat.ns_es_oldshort, "error",

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12