|
@@ -16,6 +16,7 @@
|
|
#include "chardev/char-fe.h"
|
|
#include "chardev/char-fe.h"
|
|
#include "qapi/error.h"
|
|
#include "qapi/error.h"
|
|
#include "qapi/qapi-commands-net.h"
|
|
#include "qapi/qapi-commands-net.h"
|
|
|
|
+#include "qapi/qapi-events-net.h"
|
|
#include "qemu/config-file.h"
|
|
#include "qemu/config-file.h"
|
|
#include "qemu/error-report.h"
|
|
#include "qemu/error-report.h"
|
|
#include "qemu/option.h"
|
|
#include "qemu/option.h"
|
|
@@ -271,6 +272,7 @@ static void chr_closed_bh(void *opaque)
|
|
if (err) {
|
|
if (err) {
|
|
error_report_err(err);
|
|
error_report_err(err);
|
|
}
|
|
}
|
|
|
|
+ qapi_event_send_netdev_vhost_user_disconnected(name);
|
|
}
|
|
}
|
|
|
|
|
|
static void net_vhost_user_event(void *opaque, QEMUChrEvent event)
|
|
static void net_vhost_user_event(void *opaque, QEMUChrEvent event)
|
|
@@ -300,6 +302,7 @@ static void net_vhost_user_event(void *opaque, QEMUChrEvent event)
|
|
net_vhost_user_watch, s);
|
|
net_vhost_user_watch, s);
|
|
qmp_set_link(name, true, &err);
|
|
qmp_set_link(name, true, &err);
|
|
s->started = true;
|
|
s->started = true;
|
|
|
|
+ qapi_event_send_netdev_vhost_user_connected(name, chr->label);
|
|
break;
|
|
break;
|
|
case CHR_EVENT_CLOSED:
|
|
case CHR_EVENT_CLOSED:
|
|
/* a close event may happen during a read/write, but vhost
|
|
/* a close event may happen during a read/write, but vhost
|