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.
Showing the changes to include/uapi (1 of 3 files). Show all
Unified · Split
| @@ -288,6 +288,7 @@ enum rtattr_type_t { · 287 unmodified lines | ||
| 288 | 288 | RTA_MP_ALGO, /* no longer used */ |
| 289 | 289 | RTA_TABLE, |
| 290 | 290 | RTA_MARK, |
| 291 | + RTA_MFC_STATS, | |
| 291 | 292 | __RTA_MAX |
| 292 | 293 | }; |
| 293 | 294 | |
| @@ -408,6 +409,12 @@ struct rta_session { · 114 unmodified lines | ||
| 408 | 409 | } u; |
| 409 | 410 | }; |
| 410 | 411 | |
| 412 | +struct rta_mfc_stats { | |
| 413 | + __u64 mfcs_packets; | |
| 414 | + __u64 mfcs_bytes; | |
| 415 | + __u64 mfcs_wrong_if; | |
| 416 | +}; | |
| 417 | + | |
| 411 | 418 | /**** |
| 412 | 419 | * General form of address family dependent message. |
| 413 | 420 | ****/ |