]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: agent: split out qemuAgentGetInterfaceAddresses
authorJán Tomko <jtomko@redhat.com>
Mon, 5 Oct 2020 19:48:12 +0000 (21:48 +0200)
committerJán Tomko <jtomko@redhat.com>
Thu, 8 Oct 2020 09:16:08 +0000 (11:16 +0200)
commit67e744cb578e072bfa4871732eeb966be3aa5d2e
treea178e50888034ce259cc94192798fde7e221ae83
parentaa61f7f9c9e5d8a0ab425961a801f6e88f381c96
qemu: agent: split out qemuAgentGetInterfaceAddresses

Convert one interface from the "return" array returned by
"guest-network-get-interfaces" to virDomainInterface.

Due to the functionality of squashing interface aliases together,
this is not a pure function - it either:
* Adds the interface to ifaces_ret, incrementing ifaces_count
  and adds a pointer to it into the ifaces_store hash table.
* Adds the additional IP addresses from the interface alias
  to the existing interface entry, found through the hash table.
  This does not increment ifaces_count or extend the array.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
src/qemu/qemu_agent.c