On Mon, Mar 17, 2025 at 12:28:49PM +0100, Michal Privoznik via Devel wrote:
The aim off this event is to notify management application that guest changed MAC address on one of its vNICs so the app can update its internal records, e.g. for finding match between guest/host view of vNICs. Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> --- examples/c/misc/event-test.c | 14 +++++ include/libvirt/libvirt-domain.h | 28 +++++++++ src/conf/domain_event.c | 93 +++++++++++++++++++++++++++++ src/conf/domain_event.h | 12 ++++ src/libvirt_private.syms | 2 + src/remote/remote_daemon_dispatch.c | 32 ++++++++++ src/remote/remote_driver.c | 34 +++++++++++ src/remote/remote_protocol.x | 17 +++++- tools/virsh-domain-event.c | 20 +++++++ 9 files changed, 251 insertions(+), 1 deletion(-) diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x index 41c045ff78..b18ac43f7f 100644 --- a/src/remote/remote_protocol.x +++ b/src/remote/remote_protocol.x @@ -3973,6 +3973,15 @@ struct remote_domain_fd_associate_args { remote_nonnull_string name; unsigned int flags; }; + +struct remote_domain_event_nic_mac_change_msg { + int callbackID; + remote_nonnull_domain dom; + remote_nonnull_string alias; + remote_nonnull_string oldMAC; + remote_nonnull_string newMAC; +}; + /*----- Protocol. -----*/ /* Define the program number, protocol version and procedure numbers here. */ @@ -7048,5 +7057,11 @@ enum remote_procedure { * @generate: both * @acl: domain:write */ - REMOTE_PROC_DOMAIN_GRAPHICS_RELOAD = 448 + REMOTE_PROC_DOMAIN_GRAPHICS_RELOAD = 448, + + /** + * @generate: both + * @acl: none + */ + REMOTE_PROC_DOMAIN_EVENT_NIC_MAC_CHANGE = 449
This is fine, and done with all the events, but I was just wondering, are we doing acl: none because the registration APIs already have e.g. acl: domain:read or is that for some other reason? Anyway, you might want to regenerate the protocol files with: ninja -C build regen-remote_protocol otherwise the build fails. With that fixed, Reviewed-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
Attachment:
signature.asc
Description: PGP signature