void slirp_init(int restricted, struct in_addr vnetwork,

                struct in_addr vnetmask, struct in_addr vhost,

                const char *vhostname, const char *tftp_path,

                const char *bootfile, struct in_addr vdhcp_start,

                struct in_addr vnameserver)

{

    slirp_init_once();



    link_up = 1;

    slirp_restrict = restricted;



    if_init();

    ip_init();



    /* Initialise mbufs *after* setting the MTU */

    m_init();



    vnetwork_addr = vnetwork;

    vnetwork_mask = vnetmask;

    vhost_addr = vhost;

    if (vhostname) {

        pstrcpy(slirp_hostname, sizeof(slirp_hostname), vhostname);

    }

    qemu_free(tftp_prefix);

    tftp_prefix = NULL;

    if (tftp_path) {

        tftp_prefix = qemu_strdup(tftp_path);

    }

    qemu_free(bootp_filename);

    bootp_filename = NULL;

    if (bootfile) {

        bootp_filename = qemu_strdup(bootfile);

    }

    vdhcp_startaddr = vdhcp_start;

    vnameserver_addr = vnameserver;



    register_savevm("slirp", 0, 1, slirp_state_save, slirp_state_load, NULL);

}

void slirp_init(int restricted, struct in_addr vnetwork,

                struct in_addr vnetmask, struct in_addr vhost,

                const char *vhostname, const char *tftp_path,

                const char *bootfile, struct in_addr vdhcp_start,

                struct in_addr vnameserver)

{

    slirp_init_once();



    link_up = 1;

    slirp_restrict = restricted;



    if_init();

    ip_init();



    

    m_init();



    vnetwork_addr = vnetwork;

    vnetwork_mask = vnetmask;

    vhost_addr = vhost;

    if (vhostname) {

        pstrcpy(slirp_hostname, sizeof(slirp_hostname), vhostname);

    }

    qemu_free(tftp_prefix);

    tftp_prefix = NULL;

    if (tftp_path) {

        tftp_prefix = qemu_strdup(tftp_path);

    }

    qemu_free(bootp_filename);

    bootp_filename = NULL;

    if (bootfile) {

        bootp_filename = qemu_strdup(bootfile);

    }

    vdhcp_startaddr = vdhcp_start;

    vnameserver_addr = vnameserver;



    register_savevm("slirp", 0, 1, slirp_state_save, slirp_state_load, NULL);

}

void FUNC_0(int VAR_0, struct in_addr VAR_1,

                struct in_addr VAR_2, struct in_addr VAR_3,

                const char *VAR_4, const char *VAR_5,

                const char *VAR_6, struct in_addr VAR_7,

                struct in_addr VAR_8)

{

    slirp_init_once();



    link_up = 1;

    slirp_restrict = VAR_0;



    if_init();

    ip_init();



    

    m_init();



    vnetwork_addr = VAR_1;

    vnetwork_mask = VAR_2;

    vhost_addr = VAR_3;

    if (VAR_4) {

        pstrcpy(slirp_hostname, sizeof(slirp_hostname), VAR_4);

    }

    qemu_free(tftp_prefix);

    tftp_prefix = NULL;

    if (VAR_5) {

        tftp_prefix = qemu_strdup(VAR_5);

    }

    qemu_free(bootp_filename);

    bootp_filename = NULL;

    if (VAR_6) {

        bootp_filename = qemu_strdup(VAR_6);

    }

    vdhcp_startaddr = VAR_7;

    vnameserver_addr = VAR_8;



    register_savevm("slirp", 0, 1, slirp_state_save, slirp_state_load, NULL);

}

void FUNC_0(int VAR_0, struct in_addr VAR_1,
struct in_addr VAR_2, struct in_addr VAR_3,
const char *VAR_4, const char *VAR_5,
const char *VAR_6, struct in_addr VAR_7,
struct in_addr VAR_8)
{ slirp_init_once(); link_up = 1; slirp_restrict = VAR_0; if_init(); ip_init(); m_init(); vnetwork_addr = VAR_1; vnetwork_mask = VAR_2; vhost_addr = VAR_3; if (VAR_4) { pstrcpy(slirp_hostname, sizeof(slirp_hostname), VAR_4); } qemu_free(tftp_prefix); tftp_prefix = NULL; if (VAR_5) { tftp_prefix = qemu_strdup(VAR_5); } qemu_free(bootp_filename); bootp_filename = NULL; if (VAR_6) { bootp_filename = qemu_strdup(VAR_6); } vdhcp_startaddr = VAR_7; vnameserver_addr = VAR_8; register_savevm("slirp", 0, 1, slirp_state_save, slirp_state_load, NULL); }