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

Diff for /src/usr.bin/netstat/unix.c between version 1.13 and 1.14

version 1.13, 2007/12/19 01:47:00 version 1.14, 2010/04/28 18:22:11
Line 57 
Line 57 
 static  void unixdomainpr(struct socket *, caddr_t);  static  void unixdomainpr(struct socket *, caddr_t);
   
 static struct   file *file, *fileNFILE;  static struct   file *file, *fileNFILE;
 static int      nfiles;  static int      fcnt;
 extern  kvm_t *kvmd;  extern  kvm_t *kvmd;
   
 void  void
Line 68 
Line 68 
         char *filebuf;          char *filebuf;
         struct protosw *unixsw = (struct protosw *)off;          struct protosw *unixsw = (struct protosw *)off;
   
         filebuf = kvm_getfiles(kvmd, KERN_FILE, 0, &nfiles);          filebuf = kvm_getfiles(kvmd, KERN_FILE, 0, &fcnt);
         if (filebuf == NULL) {          if (filebuf == NULL) {
                 printf("Out of memory (file table).\n");                  printf("Out of memory (file table).\n");
                 return;                  return;
         }          }
         file = (struct file *)(filebuf + sizeof(fp));          file = (struct file *)(filebuf + sizeof(fp));
         fileNFILE = file + nfiles;          fileNFILE = file + fcnt;
         for (fp = file; fp < fileNFILE; fp++) {          for (fp = file; fp < fileNFILE; fp++) {
                 if (fp->f_count == 0 || fp->f_type != DTYPE_SOCKET)                  if (fp->f_count == 0 || fp->f_type != DTYPE_SOCKET)
                         continue;                          continue;

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14