-/* $OpenBSD: if.c,v 1.73 2015/02/12 13:06:47 sthen Exp $ */
+/* $OpenBSD: if.c,v 1.74 2015/10/05 15:40:39 uebayasi Exp $ */
/* $NetBSD: if.c,v 1.16.4.2 1996/06/07 21:46:46 thorpej Exp $ */
/*
if (tflag)
total += 0; // XXX ifnet.if_timer;
if (dflag)
- total += 0; // XXX ifnet.if_snd.ifq_drops;
+ total += ifd->ifi_oqdrops;
if (total == 0)
continue;
}
if (tflag)
printf(" %4d", 0 /* XXX ifnet.if_timer */);
if (dflag)
- printf(" %4d", 0 /* XXX ifnet.if_snd.ifq_drops */);
+ printf(" %5llu", ifd->ifi_oqdrops);
putchar('\n');
}
ip_cur.ift_co - ip_old.ift_co);
if (dflag)
printf(" %5llu",
- /* XXX ifnet.if_snd.ifq_drops - ip->ift_dr); */
- 0LL);
+ ip_cur.ift_dr - ip_old.ift_dr);
ip_old = ip_cur;
ip_cur.ift_ob = ifd->ifi_obytes;
ip_cur.ift_oe = ifd->ifi_oerrors;
ip_cur.ift_co = ifd->ifi_collisions;
- ip_cur.ift_dr = 0;
- /* XXX ifnet.if_snd.ifq_drops */
+ ip_cur.ift_dr = ifd->ifi_oqdrops;
}
sum_cur.ift_ip += ifd->ifi_ipackets;
sum_cur.ift_ob += ifd->ifi_obytes;
sum_cur.ift_oe += ifd->ifi_oerrors;
sum_cur.ift_co += ifd->ifi_collisions;
- sum_cur.ift_dr += 0; /* XXX ifnet.if_snd.ifq_drops */
+ sum_cur.ift_dr += ifd->ifi_oqdrops;
break;
}
}
ip_cur.ift_ob = ifd->ifi_obytes;
ip_cur.ift_oe = ifd->ifi_oerrors;
ip_cur.ift_co = ifd->ifi_collisions;
- ip_cur.ift_dr = 0;
- /* XXX ifnet.if_snd.ifq_drops */
+ ip_cur.ift_dr = ifd->ifi_oqdrops;
}
free(buf);
}