int socket_listen(SocketAddressLegacy *addr, Error **errp)

{

    int fd;



    switch (addr->type) {

    case SOCKET_ADDRESS_LEGACY_KIND_INET:

        fd = inet_listen_saddr(addr->u.inet.data, 0, false, errp);

        break;



    case SOCKET_ADDRESS_LEGACY_KIND_UNIX:

        fd = unix_listen_saddr(addr->u.q_unix.data, false, errp);

        break;



    case SOCKET_ADDRESS_LEGACY_KIND_FD:

        fd = monitor_get_fd(cur_mon, addr->u.fd.data->str, errp);

        break;



    case SOCKET_ADDRESS_LEGACY_KIND_VSOCK:

        fd = vsock_listen_saddr(addr->u.vsock.data, errp);

        break;



    default:

        abort();

    }

    return fd;

}

int socket_listen(SocketAddressLegacy *addr, Error **errp)

{

    int fd;



    switch (addr->type) {

    case SOCKET_ADDRESS_LEGACY_KIND_INET:

        fd = inet_listen_saddr(addr->u.inet.data, 0, false, errp);

        break;



    case SOCKET_ADDRESS_LEGACY_KIND_UNIX:

        fd = unix_listen_saddr(addr->u.q_unix.data, false, errp);

        break;



    case SOCKET_ADDRESS_LEGACY_KIND_FD:

        fd = monitor_get_fd(cur_mon, addr->u.fd.data->str, errp);

        break;



    case SOCKET_ADDRESS_LEGACY_KIND_VSOCK:

        fd = vsock_listen_saddr(addr->u.vsock.data, errp);

        break;



    default:

        abort();

    }

    return fd;

}

int FUNC_0(SocketAddressLegacy *VAR_0, Error **VAR_1)

{

    int VAR_2;



    switch (VAR_0->type) {

    case SOCKET_ADDRESS_LEGACY_KIND_INET:

        VAR_2 = inet_listen_saddr(VAR_0->u.inet.data, 0, false, VAR_1);

        break;



    case SOCKET_ADDRESS_LEGACY_KIND_UNIX:

        VAR_2 = unix_listen_saddr(VAR_0->u.q_unix.data, false, VAR_1);

        break;



    case SOCKET_ADDRESS_LEGACY_KIND_FD:

        VAR_2 = monitor_get_fd(cur_mon, VAR_0->u.VAR_2.data->str, VAR_1);

        break;



    case SOCKET_ADDRESS_LEGACY_KIND_VSOCK:

        VAR_2 = vsock_listen_saddr(VAR_0->u.vsock.data, VAR_1);

        break;



    default:

        abort();

    }

    return VAR_2;

}

int FUNC_0(SocketAddressLegacy *VAR_0, Error **VAR_1)
{ int VAR_2; switch (VAR_0->type) { case SOCKET_ADDRESS_LEGACY_KIND_INET:
VAR_2 = inet_listen_saddr(VAR_0->u.inet.data, 0, false, VAR_1); break; case SOCKET_ADDRESS_LEGACY_KIND_UNIX:
VAR_2 = unix_listen_saddr(VAR_0->u.q_unix.data, false, VAR_1); break; case SOCKET_ADDRESS_LEGACY_KIND_FD:
VAR_2 = monitor_get_fd(cur_mon, VAR_0->u.VAR_2.data->str, VAR_1); break; case SOCKET_ADDRESS_LEGACY_KIND_VSOCK:
VAR_2 = vsock_listen_saddr(VAR_0->u.vsock.data, VAR_1); break; default:
abort(); } return VAR_2; }