123 |
|
} |
124 |
|
#endif |
125 |
|
|
126 |
< |
void slirp_init(void) |
126 |
> |
int slirp_init(void) |
127 |
|
{ |
128 |
|
// debug_init("/tmp/slirp.log", DEBUG_DEFAULT); |
129 |
|
|
147 |
|
getouraddr(); |
148 |
|
inet_aton("127.0.0.1", &loopback_addr); |
149 |
|
|
150 |
< |
if (get_dns_addr(&dns_addr) < 0) { |
151 |
< |
fprintf(stderr, "Could not get DNS address\n"); |
152 |
< |
exit(1); |
153 |
< |
} |
150 |
> |
if (get_dns_addr(&dns_addr) < 0) |
151 |
> |
return -1; |
152 |
|
|
153 |
|
inet_aton(CTL_SPECIAL, &special_addr); |
154 |
+ |
return 0; |
155 |
|
} |
156 |
|
|
157 |
|
#define CONN_CANFSEND(so) (((so)->so_state & (SS_FCANTSENDMORE|SS_ISFCONNECTED)) == SS_ISFCONNECTED) |