History

ipmr/ip6mr: advertise mfc stats via rtnetlink

These statistics can be checked only via /proc/net/ip_mr_cache or SIOCGETSGCNT[_IN6] and thus only for the table RT_TABLE_DEFAULT. Advertising them via rtnetlink allows to get statistics for all cache entries, whatever the table is.

Nicolas Dichtel committed 13 years ago

Commit adfa85e1 parent 70b386a3 files · +21 −0Browse files

Showing the changes to include/uapi (1 of 3 files). Show all

Unified · Split

include/uapi/linux/rtnetlink.h+7−0
@@ -288,6 +288,7 @@ enum rtattr_type_t { · 287 unmodified lines
288288 RTA_MP_ALGO, /* no longer used */
289289 RTA_TABLE,
290290 RTA_MARK,
291+ RTA_MFC_STATS,
291292 __RTA_MAX
292293 };
293294
@@ -408,6 +409,12 @@ struct rta_session { · 114 unmodified lines
408409 } u;
409410 };
410411
412+struct rta_mfc_stats {
413+ __u64 mfcs_packets;
414+ __u64 mfcs_bytes;
415+ __u64 mfcs_wrong_if;
416+};
417+
411418 /****
412419 * General form of address family dependent message.
413420 ****/