}
}
+#if defined(CONFIG_MARU)
+LinkInfo *qmp_get_link(const char *name, Error **errp)
+{
+ NetClientState *ncs[MAX_QUEUE_NUM];
+ int queues, i;
+ LinkInfo *info;
+ info = g_malloc0(sizeof (struct LinkInfo));
+
+ queues = qemu_find_net_clients_except(name, ncs,
+ NET_CLIENT_DRIVER__MAX,
+ MAX_QUEUE_NUM);
+
+ if (queues == 0) {
+ error_set(errp, ERROR_CLASS_DEVICE_NOT_FOUND,
+ "Device '%s' not found", name);
+ return info;
+ }
+
+ for (i = 0; i < queues; i++) {
+ info->is_up = !(ncs[i]->link_down);
+ }
+ return info;
+}
+#endif
+
void net_cleanup(void)
{
NetClientState *nc;