static int net_vde_init(VLANState *vlan, const char *model,

                        const char *name, const char *sock,

                        int port, const char *group, int mode)

{

    VDEState *s;

    char *init_group = strlen(group) ? (char *)group : NULL;

    char *init_sock = strlen(sock) ? (char *)sock : NULL;



    struct vde_open_args args = {

        .port = port,

        .group = init_group,

        .mode = mode,

    };



    s = qemu_mallocz(sizeof(VDEState));

    s->vde = vde_open(init_sock, "QEMU", &args);

    if (!s->vde){

        free(s);

        return -1;

    }

    s->vc = qemu_new_vlan_client(vlan, model, name, vde_from_qemu, NULL, s);

    qemu_set_fd_handler(vde_datafd(s->vde), vde_to_qemu, NULL, s);

    snprintf(s->vc->info_str, sizeof(s->vc->info_str), "sock=%s,fd=%d",

             sock, vde_datafd(s->vde));

    return 0;

}

static int net_vde_init(VLANState *vlan, const char *model,

                        const char *name, const char *sock,

                        int port, const char *group, int mode)

{

    VDEState *s;

    char *init_group = strlen(group) ? (char *)group : NULL;

    char *init_sock = strlen(sock) ? (char *)sock : NULL;



    struct vde_open_args args = {

        .port = port,

        .group = init_group,

        .mode = mode,

    };



    s = qemu_mallocz(sizeof(VDEState));

    s->vde = vde_open(init_sock, "QEMU", &args);

    if (!s->vde){

        free(s);

        return -1;

    }

    s->vc = qemu_new_vlan_client(vlan, model, name, vde_from_qemu, NULL, s);

    qemu_set_fd_handler(vde_datafd(s->vde), vde_to_qemu, NULL, s);

    snprintf(s->vc->info_str, sizeof(s->vc->info_str), "sock=%s,fd=%d",

             sock, vde_datafd(s->vde));

    return 0;

}

    s->vc = qemu_new_vlan_client(vlan, model, name, vde_from_qemu, NULL, s);
static int FUNC_0(VLANState *VAR_0, const char *VAR_1,

                        const char *VAR_2, const char *VAR_3,

                        int VAR_4, const char *VAR_5, int VAR_6)

{

    VDEState *s;

    char *VAR_7 = strlen(VAR_5) ? (char *)VAR_5 : NULL;

    char *VAR_8 = strlen(VAR_3) ? (char *)VAR_3 : NULL;



    struct vde_open_args VAR_9 = {

        .VAR_4 = VAR_4,

        .VAR_5 = VAR_7,

        .VAR_6 = VAR_6,

    };



    s = qemu_mallocz(sizeof(VDEState));

    s->vde = vde_open(VAR_8, "QEMU", &VAR_9);

    if (!s->vde){

        free(s);

        return -1;

    }

    s->vc = qemu_new_vlan_client(VAR_0, VAR_1, VAR_2, vde_from_qemu, NULL, s);

    qemu_set_fd_handler(vde_datafd(s->vde), vde_to_qemu, NULL, s);

    snprintf(s->vc->info_str, sizeof(s->vc->info_str), "VAR_3=%s,fd=%d",

             VAR_3, vde_datafd(s->vde));

    return 0;

}

static int FUNC_0(VLANState *VAR_0, const char *VAR_1,
const char *VAR_2, const char *VAR_3,
int VAR_4, const char *VAR_5, int VAR_6)
{ VDEState *s; char *VAR_7 = strlen(VAR_5) ? (char *)VAR_5 : NULL; char *VAR_8 = strlen(VAR_3) ? (char *)VAR_3 : NULL; struct vde_open_args VAR_9 = { .VAR_4 = VAR_4,
.VAR_5 = VAR_7,
.VAR_6 = VAR_6,
}; s = qemu_mallocz(sizeof(VDEState)); s->vde = vde_open(VAR_8, "QEMU", &VAR_9); if (!s->vde){ free(s); return -1; } s->vc = qemu_new_vlan_client(VAR_0, VAR_1, VAR_2, vde_from_qemu, NULL, s); qemu_set_fd_handler(vde_datafd(s->vde), vde_to_qemu, NULL, s); snprintf(s->vc->info_str, sizeof(s->vc->info_str), "VAR_3=%s,fd=%d",
VAR_3, vde_datafd(s->vde)); return 0; }