static int net_vhost_check_net(void *opaque, QemuOpts *opts, Error **errp)

{

    const char *name = opaque;

    const char *driver, *netdev;

    const char virtio_name[] = "virtio-net-";



    driver = qemu_opt_get(opts, "driver");

    netdev = qemu_opt_get(opts, "netdev");



    if (!driver || !netdev) {

        return 0;

    }



    if (strcmp(netdev, name) == 0 &&

        strncmp(driver, virtio_name, strlen(virtio_name)) != 0) {

        error_report("vhost-user requires frontend driver virtio-net-*");

        return -1;

    }



    return 0;

}

static int net_vhost_check_net(void *opaque, QemuOpts *opts, Error **errp)

{

    const char *name = opaque;

    const char *driver, *netdev;

    const char virtio_name[] = "virtio-net-";



    driver = qemu_opt_get(opts, "driver");

    netdev = qemu_opt_get(opts, "netdev");



    if (!driver || !netdev) {

        return 0;

    }



    if (strcmp(netdev, name) == 0 &&

        strncmp(driver, virtio_name, strlen(virtio_name)) != 0) {

        error_report("vhost-user requires frontend driver virtio-net-*");

        return -1;

    }



    return 0;

}

        error_report("vhost-user requires frontend driver virtio-net-*");
static int FUNC_0(void *VAR_0, QemuOpts *VAR_1, Error **VAR_2)

{

    const char *VAR_3 = VAR_0;

    const char *VAR_4, *VAR_5;

    const char VAR_6[] = "virtio-net-";



    VAR_4 = qemu_opt_get(VAR_1, "VAR_4");

    VAR_5 = qemu_opt_get(VAR_1, "VAR_5");



    if (!VAR_4 || !VAR_5) {

        return 0;

    }



    if (strcmp(VAR_5, VAR_3) == 0 &&

        strncmp(VAR_4, VAR_6, strlen(VAR_6)) != 0) {

        error_report("vhost-user requires frontend VAR_4 virtio-net-*");

        return -1;

    }



    return 0;

}

static int FUNC_0(void *VAR_0, QemuOpts *VAR_1, Error **VAR_2)
{ const char *VAR_3 = VAR_0; const char *VAR_4, *VAR_5; const char VAR_6[] = "virtio-net-"; VAR_4 = qemu_opt_get(VAR_1, "VAR_4"); VAR_5 = qemu_opt_get(VAR_1, "VAR_5"); if (!VAR_4 || !VAR_5) { return 0; } if (strcmp(VAR_5, VAR_3) == 0 &&
strncmp(VAR_4, VAR_6, strlen(VAR_6)) != 0) { error_report("vhost-user requires frontend VAR_4 virtio-net-*"); return -1; } return 0; }