]>
Commit | Line | Data |
---|---|---|
f0cbd3ec FB |
1 | #ifndef _LIBSLIRP_H |
2 | #define _LIBSLIRP_H | |
3 | ||
101c5935 FB |
4 | #ifdef __cplusplus |
5 | extern "C" { | |
6 | #endif | |
7 | ||
ad196a9d JK |
8 | void slirp_init(int restricted, const char *special_ip, const char *tftp_path, |
9 | const char *bootfile); | |
f0cbd3ec | 10 | |
5fafdf24 | 11 | void slirp_select_fill(int *pnfds, |
f0cbd3ec FB |
12 | fd_set *readfds, fd_set *writefds, fd_set *xfds); |
13 | ||
14 | void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds); | |
15 | ||
16 | void slirp_input(const uint8_t *pkt, int pkt_len); | |
17 | ||
18 | /* you must provide the following functions: */ | |
19 | int slirp_can_output(void); | |
20 | void slirp_output(const uint8_t *pkt, int pkt_len); | |
21 | ||
c1261d8d | 22 | int slirp_redir_rm(int is_udp, int host_port); |
5fafdf24 | 23 | int slirp_redir(int is_udp, int host_port, |
9bf05444 | 24 | struct in_addr guest_addr, int guest_port); |
e1c5a2b3 | 25 | int slirp_add_exec(int do_pty, const void *args, int addr_low_byte, |
a3d4af03 | 26 | int guest_port); |
9bf05444 | 27 | |
3f423c9c | 28 | extern char slirp_hostname[33]; |
9bf05444 | 29 | |
31a60e22 | 30 | void slirp_stats(void); |
e1c5a2b3 AL |
31 | void slirp_socket_recv(int addr_low_byte, int guest_port, const uint8_t *buf, |
32 | int size); | |
33 | size_t slirp_socket_can_recv(int addr_low_byte, int guest_port); | |
31a60e22 | 34 | |
101c5935 FB |
35 | #ifdef __cplusplus |
36 | } | |
37 | #endif | |
38 | ||
f0cbd3ec | 39 | #endif |