]>
Commit | Line | Data |
---|---|---|
f0cbd3ec FB |
1 | #ifndef _LIBSLIRP_H |
2 | #define _LIBSLIRP_H | |
3 | ||
379ff53d FB |
4 | #ifdef _WIN32 |
5 | #include <winsock2.h> | |
9bf05444 | 6 | int inet_aton(const char *cp, struct in_addr *ia); |
379ff53d | 7 | #else |
f0cbd3ec | 8 | #include <sys/select.h> |
9bf05444 | 9 | #include <arpa/inet.h> |
379ff53d | 10 | #endif |
f0cbd3ec FB |
11 | |
12 | void slirp_init(void); | |
13 | ||
14 | void slirp_select_fill(int *pnfds, | |
15 | fd_set *readfds, fd_set *writefds, fd_set *xfds); | |
16 | ||
17 | void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds); | |
18 | ||
19 | void slirp_input(const uint8_t *pkt, int pkt_len); | |
20 | ||
21 | /* you must provide the following functions: */ | |
22 | int slirp_can_output(void); | |
23 | void slirp_output(const uint8_t *pkt, int pkt_len); | |
24 | ||
9bf05444 FB |
25 | int slirp_redir(int is_udp, int host_port, |
26 | struct in_addr guest_addr, int guest_port); | |
27 | ||
28 | extern const char *tftp_prefix; | |
29 | ||
f0cbd3ec | 30 | #endif |