[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v14 12/17] net: dgram: add unix socket
On 21/10/22 11:09, Laurent Vivier wrote: Signed-off-by: Laurent Vivier <lvivier@xxxxxxxxxx> Reviewed-by: Stefano Brivio <sbrivio@xxxxxxxxxx> Reviewed-by: David Gibson <david@xxxxxxxxxxxxxxxxxxxxx> Acked-by: Michael S. Tsirkin <mst@xxxxxxxxxx> Acked-by: Markus Armbruster <armbru@xxxxxxxxxx> (QAPI schema) --- net/dgram.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++++- qapi/net.json | 2 +- qemu-options.hx | 1 + 3 files changed, 56 insertions(+), 2 deletions(-) diff --git a/net/dgram.c b/net/dgram.c index e581cc62f39f..9f7bf3837653 100644 --- a/net/dgram.c +++ b/net/dgram.c @@ -426,6 +426,7 @@ int net_init_dgram(const Netdev *netdev, const char *name, SocketAddress *remote, *local; struct sockaddr *dest_addr; struct sockaddr_in laddr_in, raddr_in; + struct sockaddr_un laddr_un, raddr_un; socklen_t dest_len;assert(netdev->type == NET_CLIENT_DRIVER_DGRAM);@@ -465,7 +466,8 @@ int net_init_dgram(const Netdev *netdev, const char *name, } } else { if (local->type != SOCKET_ADDRESS_TYPE_FD) { - error_setg(errp, "type=inet requires remote parameter"); + error_setg(errp, + "type=inet or type=unix requires remote parameter"); Thanks for updating. @@ -546,6 +595,10 @@ int net_init_dgram(const Netdev *netdev, const char *name, inet_ntoa(raddr_in.sin_addr), ntohs(raddr_in.sin_port)); break; + case SOCKET_ADDRESS_TYPE_UNIX: + qemu_set_info_str(&s->nc, "udp=%s:%s", + laddr_un.sun_path, raddr_un.sun_path); + break; "udp"?
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |