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

Diff for /src/usr.bin/netstat/mroute.c between version 1.12 and 1.13

version 1.12, 2005/01/14 15:00:44 version 1.13, 2005/03/25 17:01:04
Line 103 
Line 103 
                 return;                  return;
         }          }
   
         kread(mrpaddr, (char *)&mrtproto, sizeof(mrtproto));          kread(mrpaddr, &mrtproto, sizeof(mrtproto));
         switch (mrtproto) {          switch (mrtproto) {
         case 0:          case 0:
                 printf("no multicast routing compiled into this system\n");                  printf("no multicast routing compiled into this system\n");
Line 133 
Line 133 
         saved_nflag = nflag;          saved_nflag = nflag;
         nflag = 1;          nflag = 1;
   
         kread(vifaddr, (char *)&viftable, sizeof(viftable));          kread(vifaddr, &viftable, sizeof(viftable));
         banner_printed = 0;          banner_printed = 0;
         numvifs = 0;          numvifs = 0;
   
Line 159 
Line 159 
         if (!banner_printed)          if (!banner_printed)
                 printf("\nVirtual Interface Table is empty\n");                  printf("\nVirtual Interface Table is empty\n");
   
         kread(mfchashtbladdr, (char *)&mfchashtbl, sizeof(mfchashtbl));          kread(mfchashtbladdr, &mfchashtbl, sizeof(mfchashtbl));
         kread(mfchashaddr, (char *)&mfchash, sizeof(mfchash));          kread(mfchashaddr, &mfchash, sizeof(mfchash));
         banner_printed = 0;          banner_printed = 0;
         nmfc = 0;          nmfc = 0;
   
         if (mfchashtbl != 0)          if (mfchashtbl != 0)
                 for (i = 0; i <= mfchash; ++i) {                  for (i = 0; i <= mfchash; ++i) {
                         kread((u_long)&mfchashtbl[i], (char *)&mfcp, sizeof(mfcp));                          kread((u_long)&mfchashtbl[i], &mfcp, sizeof(mfcp));
   
                         for (; mfcp != 0; mfcp = mfc.mfc_hash.le_next) {                          for (; mfcp != 0; mfcp = mfc.mfc_hash.le_next) {
                                 if (!banner_printed) {                                  if (!banner_printed) {
Line 176 
Line 176 
                                         banner_printed = 1;                                          banner_printed = 1;
                                 }                                  }
   
                                 kread((u_long)mfcp, (char *)&mfc, sizeof(mfc));                                  kread((u_long)mfcp, &mfc, sizeof(mfc));
                                 printf("  %3u  %-15.15s",                                  printf("  %3u  %-15.15s",
                                     i, routename(mfc.mfc_origin.s_addr));                                      i, routename(mfc.mfc_origin.s_addr));
                                 printf("  %-15.15s  %7s     %3u ",                                  printf("  %-15.15s  %7s     %3u ",
Line 197 
Line 197 
                                         bwm = mfc.mfc_bw_meter;                                          bwm = mfc.mfc_bw_meter;
                                         while (bwm) {                                          while (bwm) {
                                                 kread((u_long)bwm,                                                  kread((u_long)bwm,
                                                       (char *)&bw_meter,                                                        &bw_meter,
                                                       sizeof bw_meter);                                                        sizeof bw_meter);
                                                 print_bw_meter(&bw_meter,                                                  print_bw_meter(&bw_meter,
                                                                &banner_printed2);                                                                 &banner_printed2);
Line 309 
Line 309 
                 return;                  return;
         }          }
   
         kread(mrpaddr, (char *)&mrtproto, sizeof(mrtproto));          kread(mrpaddr, &mrtproto, sizeof(mrtproto));
         switch (mrtproto) {          switch (mrtproto) {
         case 0:          case 0:
                 printf("no multicast routing compiled into this system\n");                  printf("no multicast routing compiled into this system\n");
Line 328 
Line 328 
                 return;                  return;
         }          }
   
         kread(mstaddr, (char *)&mrtstat, sizeof(mrtstat));          kread(mstaddr, &mrtstat, sizeof(mrtstat));
         printf("multicast routing:\n");          printf("multicast routing:\n");
         printf("\t%lu datagram%s with no route for origin\n",          printf("\t%lu datagram%s with no route for origin\n",
             mrtstat.mrts_no_route, plural(mrtstat.mrts_no_route));              mrtstat.mrts_no_route, plural(mrtstat.mrts_no_route));

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