socket_sockaddr_to_address_vsock(struct sockaddr_storage *sa,

                                 socklen_t salen,

                                 Error **errp)

{

    SocketAddressLegacy *addr;

    VsockSocketAddress *vaddr;

    struct sockaddr_vm *svm = (struct sockaddr_vm *)sa;



    addr = g_new0(SocketAddressLegacy, 1);

    addr->type = SOCKET_ADDRESS_LEGACY_KIND_VSOCK;

    addr->u.vsock.data = vaddr = g_new0(VsockSocketAddress, 1);

    vaddr->cid = g_strdup_printf("%u", svm->svm_cid);

    vaddr->port = g_strdup_printf("%u", svm->svm_port);



    return addr;

}

socket_sockaddr_to_address_vsock(struct sockaddr_storage *sa,

                                 socklen_t salen,

                                 Error **errp)

{

    SocketAddressLegacy *addr;

    VsockSocketAddress *vaddr;

    struct sockaddr_vm *svm = (struct sockaddr_vm *)sa;



    addr = g_new0(SocketAddressLegacy, 1);

    addr->type = SOCKET_ADDRESS_LEGACY_KIND_VSOCK;

    addr->u.vsock.data = vaddr = g_new0(VsockSocketAddress, 1);

    vaddr->cid = g_strdup_printf("%u", svm->svm_cid);

    vaddr->port = g_strdup_printf("%u", svm->svm_port);



    return addr;

}

FUNC_0(struct sockaddr_storage *VAR_0,

                                 socklen_t VAR_1,

                                 Error **VAR_2)

{

    SocketAddressLegacy *addr;

    VsockSocketAddress *vaddr;

    struct sockaddr_vm *VAR_3 = (struct sockaddr_vm *)VAR_0;



    addr = g_new0(SocketAddressLegacy, 1);

    addr->type = SOCKET_ADDRESS_LEGACY_KIND_VSOCK;

    addr->u.vsock.data = vaddr = g_new0(VsockSocketAddress, 1);

    vaddr->cid = g_strdup_printf("%u", VAR_3->svm_cid);

    vaddr->port = g_strdup_printf("%u", VAR_3->svm_port);



    return addr;

}

FUNC_0(struct sockaddr_storage *VAR_0,
socklen_t VAR_1,
Error **VAR_2)
{ SocketAddressLegacy *addr; VsockSocketAddress *vaddr; struct sockaddr_vm *VAR_3 = (struct sockaddr_vm *)VAR_0; addr = g_new0(SocketAddressLegacy, 1); addr->type = SOCKET_ADDRESS_LEGACY_KIND_VSOCK; addr->u.vsock.data = vaddr = g_new0(VsockSocketAddress, 1); vaddr->cid = g_strdup_printf("%u", VAR_3->svm_cid); vaddr->port = g_strdup_printf("%u", VAR_3->svm_port); return addr; }