Statistics
| Branch: | Revision:

root / slirp / libslirp.h @ c1261d8d

History | View | Annotate | Download (1 kB)

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 c1261d8d Alexander Graf
int slirp_redir_rm(int is_udp, int host_port);
22 5fafdf24 ths
int slirp_redir(int is_udp, int host_port,
23 9bf05444 bellard
                struct in_addr guest_addr, int guest_port);
24 e1c5a2b3 aliguori
int slirp_add_exec(int do_pty, const void *args, int addr_low_byte,
25 a3d4af03 bellard
                   int guest_port);
26 9bf05444 bellard
27 9bf05444 bellard
extern const char *tftp_prefix;
28 3f423c9c bellard
extern char slirp_hostname[33];
29 aa806132 blueswir1
extern const char *bootp_filename;
30 9bf05444 bellard
31 31a60e22 blueswir1
void slirp_stats(void);
32 e1c5a2b3 aliguori
void slirp_socket_recv(int addr_low_byte, int guest_port, const uint8_t *buf,
33 e1c5a2b3 aliguori
                int size);
34 e1c5a2b3 aliguori
size_t slirp_socket_can_recv(int addr_low_byte, int guest_port);
35 31a60e22 blueswir1
36 101c5935 bellard
#ifdef __cplusplus
37 101c5935 bellard
}
38 101c5935 bellard
#endif
39 101c5935 bellard
40 f0cbd3ec bellard
#endif