aboutsummaryrefslogtreecommitdiff
path: root/include/net/net.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/net.h')
-rw-r--r--include/net/net.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/net/net.h b/include/net/net.h
index fad589cc1d..1d88621c12 100644
--- a/include/net/net.h
+++ b/include/net/net.h
@@ -203,6 +203,20 @@ void net_socket_rs_init(SocketReadState *rs,
bool vnet_hdr);
NetClientState *qemu_get_peer(NetClientState *nc, int queue_index);
+/**
+ * qemu_get_nic_models:
+ * @device_type: Defines which devices should be taken into consideration
+ * (e.g. TYPE_DEVICE for all devices, or TYPE_PCI_DEVICE for PCI)
+ *
+ * Get an array of pointers to names of NIC devices that are available in
+ * the QEMU binary. The array is terminated with a NULL pointer entry.
+ * The caller is responsible for freeing the memory when it is not required
+ * anymore, e.g. with g_ptr_array_free(..., true).
+ *
+ * Returns: Pointer to the array that contains the pointers to the names.
+ */
+GPtrArray *qemu_get_nic_models(const char *device_type);
+
/* NIC info */
#define MAX_NICS 8