uint32_t max_mtu;
uint32_t tx_queues;
uint32_t rx_queues;
+ char *qdisc;
char **alternative_names;
union {
for (unsigned i = 0; array && array[i].needs_freeing; i++) {
sd_device_unref(array[i].sd_device);
free(array[i].ssid);
+ free(array[i].qdisc);
strv_free(array[i].alternative_names);
}
static int decode_link(sd_netlink_message *m, LinkInfo *info, char **patterns, bool matched_patterns[]) {
_cleanup_strv_free_ char **altnames = NULL;
- const char *name;
+ const char *name, *qdisc;
int ifindex, r;
uint16_t type;
else if (sd_netlink_message_read(m, IFLA_STATS, sizeof info->stats, &info->stats) >= 0)
info->has_stats = true;
+ r = sd_netlink_message_read_string(m, IFLA_QDISC, &qdisc);
+ if (r >= 0) {
+ info->qdisc = strdup(qdisc);
+ if (!info->qdisc)
+ return log_oom();
+ }
+
/* fill kind info */
(void) decode_netdev(m, info);
return table_log_add_error(r);
}
+ if (info->qdisc) {
+ r = table_add_many(table,
+ TABLE_EMPTY,
+ TABLE_STRING, "QDisc:",
+ TABLE_STRING, info->qdisc);
+ if (r < 0)
+ return table_log_add_error(r);
+ }
+
if (streq_ptr(info->netdev_kind, "bridge")) {
r = table_add_many(table,
TABLE_EMPTY,