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

Diff for /src/usr.bin/netstat/route.c between version 1.84 and 1.85

version 1.84, 2009/01/28 17:19:47 version 1.85, 2009/05/07 15:51:53
Line 93 
Line 93 
  * Print routing tables.   * Print routing tables.
  */   */
 void  void
 routepr(u_long rtree, u_long mtree, u_long af2idx, u_long rtbl_id_max)  routepr(u_long rtree, u_long mtree, u_long af2idx, u_long rtbl_id_max,
       u_int tableid)
 {  {
         struct radix_node_head *rnh, head;          struct radix_node_head *rnh, head;
         int i, idxmax = 0;          int i, idxmax = 0;
Line 121 
Line 122 
   
         kread((u_long)rt_head, rnt, (rtidxmax + 1) *          kread((u_long)rt_head, rnt, (rtidxmax + 1) *
             sizeof(struct radix_node_head **));              sizeof(struct radix_node_head **));
         kread((u_long)rnt[0], rt_tables, (idxmax + 1) * sizeof(rnh));          if (tableid > rtidxmax || rnt[tableid] == NULL) {
                   printf("Bad table %u\n", tableid);
                   return;
           }
           kread((u_long)rnt[tableid], rt_tables, (idxmax + 1) * sizeof(rnh));
   
         for (i = 0; i <= AF_MAX; i++) {          for (i = 0; i <= AF_MAX; i++) {
                 if (i == AF_UNSPEC) {                  if (i == AF_UNSPEC) {

Legend:
Removed from v.1.84  
changed lines
  Added in v.1.85