int net_slirp_parse_legacy(QemuOptsList *opts_list, const char *optarg, int *ret)

{

    if (strcmp(opts_list->name, "net") != 0 ||

        strncmp(optarg, "channel,", strlen("channel,")) != 0) {

        return 0;

    }



    error_report("The '-net channel' option is deprecated. "

                 "Please use '-netdev user,guestfwd=...' instead.");



    /* handle legacy -net channel,port:chr */

    optarg += strlen("channel,");



    if (QTAILQ_EMPTY(&slirp_stacks)) {

        struct slirp_config_str *config;



        config = g_malloc(sizeof(*config));

        pstrcpy(config->str, sizeof(config->str), optarg);

        config->flags = SLIRP_CFG_LEGACY;

        config->next = slirp_configs;

        slirp_configs = config;

        *ret = 0;

    } else {

        *ret = slirp_guestfwd(QTAILQ_FIRST(&slirp_stacks), optarg, 1);

    }



    return 1;

}

int net_slirp_parse_legacy(QemuOptsList *opts_list, const char *optarg, int *ret)

{

    if (strcmp(opts_list->name, "net") != 0 ||

        strncmp(optarg, "channel,", strlen("channel,")) != 0) {

        return 0;

    }



    error_report("The '-net channel' option is deprecated. "

                 "Please use '-netdev user,guestfwd=...' instead.");



    

    optarg += strlen("channel,");



    if (QTAILQ_EMPTY(&slirp_stacks)) {

        struct slirp_config_str *config;



        config = g_malloc(sizeof(*config));

        pstrcpy(config->str, sizeof(config->str), optarg);

        config->flags = SLIRP_CFG_LEGACY;

        config->next = slirp_configs;

        slirp_configs = config;

        *ret = 0;

    } else {

        *ret = slirp_guestfwd(QTAILQ_FIRST(&slirp_stacks), optarg, 1);

    }



    return 1;

}

        *ret = slirp_guestfwd(QTAILQ_FIRST(&slirp_stacks), optarg, 1);
int FUNC_0(QemuOptsList *VAR_0, const char *VAR_1, int *VAR_2)

{

    if (strcmp(VAR_0->name, "net") != 0 ||

        strncmp(VAR_1, "channel,", strlen("channel,")) != 0) {

        return 0;

    }



    error_report("The '-net channel' option is deprecated. "

                 "Please use '-netdev user,guestfwd=...' instead.");



    

    VAR_1 += strlen("channel,");



    if (QTAILQ_EMPTY(&slirp_stacks)) {

        struct slirp_config_str *VAR_3;



        VAR_3 = g_malloc(sizeof(*VAR_3));

        pstrcpy(VAR_3->str, sizeof(VAR_3->str), VAR_1);

        VAR_3->flags = SLIRP_CFG_LEGACY;

        VAR_3->next = slirp_configs;

        slirp_configs = VAR_3;

        *VAR_2 = 0;

    } else {

        *VAR_2 = slirp_guestfwd(QTAILQ_FIRST(&slirp_stacks), VAR_1, 1);

    }



    return 1;

}

int FUNC_0(QemuOptsList *VAR_0, const char *VAR_1, int *VAR_2)
{ if (strcmp(VAR_0->name, "net") != 0 ||
strncmp(VAR_1, "channel,", strlen("channel,")) != 0) { return 0; } error_report("The '-net channel' option is deprecated. "
"Please use '-netdev user,guestfwd=...' instead."); VAR_1 += strlen("channel,"); if (QTAILQ_EMPTY(&slirp_stacks)) { struct slirp_config_str *VAR_3; VAR_3 = g_malloc(sizeof(*VAR_3)); pstrcpy(VAR_3->str, sizeof(VAR_3->str), VAR_1); VAR_3->flags = SLIRP_CFG_LEGACY; VAR_3->next = slirp_configs; slirp_configs = VAR_3; *VAR_2 = 0; } else { *VAR_2 = slirp_guestfwd(QTAILQ_FIRST(&slirp_stacks), VAR_1, 1); } return 1; }