]>
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 | 11 | |
101c5935 FB |
12 | #ifdef __cplusplus |
13 | extern "C" { | |
14 | #endif | |
15 | ||
f0cbd3ec FB |
16 | void slirp_init(void); |
17 | ||
18 | void slirp_select_fill(int *pnfds, | |
19 | fd_set *readfds, fd_set *writefds, fd_set *xfds); | |
20 | ||
21 | void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds); | |
22 | ||
23 | void slirp_input(const uint8_t *pkt, int pkt_len); | |
24 | ||
25 | /* you must provide the following functions: */ | |
26 | int slirp_can_output(void); | |
27 | void slirp_output(const uint8_t *pkt, int pkt_len); | |
28 | ||
9bf05444 FB |
29 | int slirp_redir(int is_udp, int host_port, |
30 | struct in_addr guest_addr, int guest_port); | |
a3d4af03 FB |
31 | int slirp_add_exec(int do_pty, const char *args, int addr_low_byte, |
32 | int guest_port); | |
9bf05444 FB |
33 | |
34 | extern const char *tftp_prefix; | |
35 | ||
101c5935 FB |
36 | #ifdef __cplusplus |
37 | } | |
38 | #endif | |
39 | ||
f0cbd3ec | 40 | #endif |