diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/qemu/sockets.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/include/qemu/sockets.h b/include/qemu/sockets.h index 1bd92180f3..3a1a8873af 100644 --- a/include/qemu/sockets.h +++ b/include/qemu/sockets.h @@ -110,4 +110,18 @@ SocketAddress *socket_remote_address(int fd, Error **errp); void qapi_copy_SocketAddress(SocketAddress **p_dest, SocketAddress *src); -#endif /* QEMU_SOCKET_H */ +/** + * 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 */
\ No newline at end of file |