mirror of
https://github.com/linux-can/can-utils.git
synced 2026-08-05 14:29:54 +02:00
Initialize packet counters when printing each routing entry.
This commit is contained in:
@@ -255,8 +255,7 @@ int main(int argc, char **argv)
|
|||||||
struct nlmsgerr *rte;
|
struct nlmsgerr *rte;
|
||||||
struct rtcanmsg *rtc;
|
struct rtcanmsg *rtc;
|
||||||
struct rtattr *rta;
|
struct rtattr *rta;
|
||||||
__u32 handled = 0;
|
__u32 handled, dropped;
|
||||||
__u32 dropped = 0;
|
|
||||||
int rtlen;
|
int rtlen;
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
@@ -478,6 +477,10 @@ int main(int argc, char **argv)
|
|||||||
printf("-t ");
|
printf("-t ");
|
||||||
|
|
||||||
/* check for attributes */
|
/* check for attributes */
|
||||||
|
|
||||||
|
handled = 0;
|
||||||
|
dropped = 0;
|
||||||
|
|
||||||
rta = (struct rtattr *) RTM_RTA(rtc);
|
rta = (struct rtattr *) RTM_RTA(rtc);
|
||||||
rtlen = RTM_PAYLOAD(nlh);
|
rtlen = RTM_PAYLOAD(nlh);
|
||||||
for(;RTA_OK(rta, rtlen);rta=RTA_NEXT(rta,rtlen))
|
for(;RTA_OK(rta, rtlen);rta=RTA_NEXT(rta,rtlen))
|
||||||
|
|||||||
Reference in New Issue
Block a user