summaryrefslogtreecommitdiffstats
path: root/include/qemu/sockets.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/qemu/sockets.h')
-rw-r--r--include/qemu/sockets.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/qemu/sockets.h b/include/qemu/sockets.h
index 5dd2648169..462033a4de 100644
--- a/include/qemu/sockets.h
+++ b/include/qemu/sockets.h
@@ -111,4 +111,18 @@ SocketAddress *socket_remote_address(int fd, Error **errp);
void qapi_copy_SocketAddress(SocketAddress **p_dest,
SocketAddress *src);
+/**
+ * socket_address_to_string:
+ * @addr: the socket address struct
+ * @errp: pointer to uninitialized error object
+ *
+ * Get the string representation of the socket
+ * address. A pointer to the char array containing
+ * string format will be returned, the caller is
+ * required to release the returned value when no
+ * longer required with g_free.
+ *
+ * Returns: the socket address in string format, or NULL on error
+ */
+char *socket_address_to_string(struct SocketAddress *addr, Error **errp);
#endif /* QEMU_SOCKET_H */