Statistics
| Branch: | Revision:

root / slirp / libslirp.h @ c94c8d64

History | View | Annotate | Download (828 Bytes)

1
#ifndef _LIBSLIRP_H
2
#define _LIBSLIRP_H
3

    
4
#ifdef _WIN32
5
#include <winsock2.h>
6
int inet_aton(const char *cp, struct in_addr *ia);
7
#else
8
#include <sys/select.h>
9
#include <arpa/inet.h>
10
#endif
11

    
12
void slirp_init(void);
13

    
14
void slirp_select_fill(int *pnfds, 
15
                       fd_set *readfds, fd_set *writefds, fd_set *xfds);
16

    
17
void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds);
18

    
19
void slirp_input(const uint8_t *pkt, int pkt_len);
20

    
21
/* you must provide the following functions: */
22
int slirp_can_output(void);
23
void slirp_output(const uint8_t *pkt, int pkt_len);
24

    
25
int slirp_redir(int is_udp, int host_port, 
26
                struct in_addr guest_addr, int guest_port);
27
int slirp_add_exec(int do_pty, const char *args, int addr_low_byte, 
28
                   int guest_port);
29

    
30
extern const char *tftp_prefix;
31

    
32
#endif