link_iptnl.o link_gre6.o iplink_bond.o iplink_bond_slave.o iplink_hsr.o \
iplink_bridge.o iplink_bridge_slave.o ipfou.o iplink_ipvlan.o \
iplink_geneve.o iplink_vrf.o iproute_lwtunnel.o ipmacsec.o ipila.o \
- ipvrf.o
+ ipvrf.o iplink_xstats.o
RTMONOBJ=rtmon.o
int netns_identify_pid(const char *pidstr, char *name, int len);
int iplink_get(unsigned int flags, char *name, __u32 filt_mask);
+int iplink_ifla_xstats(int argc, char **argv);
static inline int rtm_get_table(struct rtmsg *r, struct rtattr **tb)
{
void (*print_opt)(struct link_util *, FILE *,
struct rtattr *[]);
void (*print_xstats)(struct link_util *, FILE *,
- struct rtattr *);
+ struct rtattr *);
void (*print_help)(struct link_util *, int, char **,
- FILE *);
+ FILE *);
+ int (*parse_ifla_xstats)(struct link_util *,
+ int, char **);
+ int (*print_ifla_xstats)(const struct sockaddr_nl *,
+ struct nlmsghdr *, void *);
};
struct link_util *get_link_kind(const char *kind);
"\n"
" ip link show [ DEVICE | group GROUP ] [up] [master DEV] [vrf NAME] [type TYPE]\n");
+ fprintf(stderr, "\n ip link xstats type TYPE [ ARGS ]\n");
+
if (iplink_have_newlink()) {
fprintf(stderr,
"\n"
matches(*argv, "list") == 0)
return ipaddr_list_link(argc-1, argv+1);
+ if (matches(*argv, "xstats") == 0)
+ return iplink_ifla_xstats(argc-1, argv+1);
+
if (matches(*argv, "help") == 0) {
do_help(argc-1, argv+1);
return 0;
.B vrf
.IR NAME " ]"
+.ti -8
+.B ip link xstats
+.BI type " TYPE"
+.RI "[ " ARGS " ]"
+
.ti -8
.B ip link help
.RI "[ " TYPE " ]"
didn't filter already. Therefore any string is accepted, but may lead to empty
output.
+.SS ip link xstats - display extended statistics
+
+.TP
+.BI type " TYPE "
+.I TYPE
+specifies the type of devices to display extended statistics for.
+
.SS ip link help - display help
.PP