static char *assign_name(NetClientState *nc1, const char *model)

{

    NetClientState *nc;

    char buf[256];

    int id = 0;



    QTAILQ_FOREACH(nc, &net_clients, next) {

        if (nc == nc1) {

            continue;

        }

        /* For compatibility only bump id for net clients on a vlan */

        if (strcmp(nc->model, model) == 0 &&

            net_hub_id_for_client(nc, NULL) == 0) {

            id++;

        }

    }



    snprintf(buf, sizeof(buf), "%s.%d", model, id);



    return g_strdup(buf);

}

static char *assign_name(NetClientState *nc1, const char *model)

{

    NetClientState *nc;

    char buf[256];

    int id = 0;



    QTAILQ_FOREACH(nc, &net_clients, next) {

        if (nc == nc1) {

            continue;

        }

        

        if (strcmp(nc->model, model) == 0 &&

            net_hub_id_for_client(nc, NULL) == 0) {

            id++;

        }

    }



    snprintf(buf, sizeof(buf), "%s.%d", model, id);



    return g_strdup(buf);

}

static char *FUNC_0(NetClientState *VAR_0, const char *VAR_1)

{

    NetClientState *nc;

    char VAR_2[256];

    int VAR_3 = 0;



    QTAILQ_FOREACH(nc, &net_clients, next) {

        if (nc == VAR_0) {

            continue;

        }

        

        if (strcmp(nc->VAR_1, VAR_1) == 0 &&

            net_hub_id_for_client(nc, NULL) == 0) {

            VAR_3++;

        }

    }



    snprintf(VAR_2, sizeof(VAR_2), "%s.%d", VAR_1, VAR_3);



    return g_strdup(VAR_2);

}

static char *FUNC_0(NetClientState *VAR_0, const char *VAR_1)
{ NetClientState *nc; char VAR_2[256]; int VAR_3 = 0; QTAILQ_FOREACH(nc, &net_clients, next) { if (nc == VAR_0) { continue; } if (strcmp(nc->VAR_1, VAR_1) == 0 &&
net_hub_id_for_client(nc, NULL) == 0) { VAR_3++; } } snprintf(VAR_2, sizeof(VAR_2), "%s.%d", VAR_1, VAR_3); return g_strdup(VAR_2); }