Statistics
| Branch: | Revision:

root / slirp / libslirp.h @ c4dfa5b7

History | View | Annotate | Download (723 Bytes)

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