Statistics
| Branch: | Revision:

root / slirp / libslirp.h @ 511d2b14

History | View | Annotate | Download (987 Bytes)

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