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

Diff for /src/usr.bin/netstat/show.c between version 1.34 and 1.35

version 1.34, 2010/10/11 12:33:36 version 1.35, 2011/11/01 17:30:04
Line 116 
Line 116 
  * Print routing tables.   * Print routing tables.
  */   */
 void  void
 p_rttables(int af, u_int tableid, int hastable)  p_rttables(int af, u_int tableid)
 {  {
         struct rt_msghdr *rtm;          struct rt_msghdr *rtm;
         struct sadb_msg *msg;          struct sadb_msg *msg;
Line 131 
Line 131 
         mib[3] = af;          mib[3] = af;
         mib[4] = NET_RT_DUMP;          mib[4] = NET_RT_DUMP;
         mib[5] = 0;          mib[5] = 0;
         if (hastable) {          mib[6] = tableid;
                 mib[6] = tableid;          mcnt = 7;
                 mcnt = 7;  
         } else  
                 mcnt = 6;  
   
         if (sysctl(mib, mcnt, NULL, &needed, NULL, 0) < 0)          if (sysctl(mib, mcnt, NULL, &needed, NULL, 0) < 0)
                 err(1, "route-sysctl-estimate");                  err(1, "route-sysctl-estimate");

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.35