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)

{

#ifdef _WIN32

    WSADATA Data;



    WSAStartup(MAKEWORD(2,0), &Data);

    atexit(slirp_cleanup);

#endif



    link_up = 1;

    slirp_restrict = restricted;



    if_init();

    ip_init();



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

    m_init();



    /* set default addresses */

    inet_aton("127.0.0.1", &loopback_addr);



    if (get_dns_addr(&dns_addr) < 0) {

        dns_addr = loopback_addr;

        fprintf (stderr, "Warning: No DNS servers found\n");

    }



    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;



    getouraddr();

    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)

{

#ifdef _WIN32

    WSADATA Data;



    WSAStartup(MAKEWORD(2,0), &Data);

    atexit(slirp_cleanup);

#endif



    link_up = 1;

    slirp_restrict = restricted;



    if_init();

    ip_init();



    

    m_init();



    

    inet_aton("127.0.0.1", &loopback_addr);



    if (get_dns_addr(&dns_addr) < 0) {

        dns_addr = loopback_addr;

        fprintf (stderr, "Warning: No DNS servers found\n");

    }



    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;



    getouraddr();

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

}

#ifdef _WIN32 #ifdef _WIN32     WSADATA Data;     WSAStartup(MAKEWORD(2,0), &Data);     atexit(slirp_cleanup); #endif     inet_aton("127.0.0.1", &loopback_addr);     if (get_dns_addr(&dns_addr) < 0) {         dns_addr = loopback_addr;         fprintf (stderr, "Warning: No DNS servers found\n");     getouraddr();
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)

{

#ifdef _WIN32

    WSADATA Data;



    WSAStartup(MAKEWORD(2,0), &Data);

    atexit(slirp_cleanup);

#endif



    link_up = 1;

    slirp_restrict = VAR_0;



    if_init();

    ip_init();



    

    m_init();



    

    inet_aton("127.0.0.1", &loopback_addr);



    if (get_dns_addr(&dns_addr) < 0) {

        dns_addr = loopback_addr;

        fprintf (stderr, "Warning: No DNS servers found\n");

    }



    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;



    getouraddr();

    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)
{ #ifdef _WIN32
WSADATA Data; WSAStartup(MAKEWORD(2,0), &Data); atexit(slirp_cleanup); #endif
link_up = 1; slirp_restrict = VAR_0; if_init(); ip_init(); m_init(); inet_aton("127.0.0.1", &loopback_addr); if (get_dns_addr(&dns_addr) < 0) { dns_addr = loopback_addr; fprintf (stderr, "Warning: No DNS servers found\n"); } 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; getouraddr(); register_savevm("slirp", 0, 1, slirp_state_save, slirp_state_load, NULL); }