Last change
on this file since 478 was 1, checked in by vboxsync, 55 years ago |
import
|
-
Property svn:eol-style
set to
native
|
File size:
1.3 KB
|
Line | |
---|
1 | #ifndef _LIBSLIRP_H
|
---|
2 | #define _LIBSLIRP_H
|
---|
3 |
|
---|
4 | #ifdef _WIN32
|
---|
5 | #include <winsock2.h>
|
---|
6 | #if defined(VBOX) && defined(__cplusplus)
|
---|
7 | extern "C" {
|
---|
8 | #endif
|
---|
9 | int inet_aton(const char *cp, struct in_addr *ia);
|
---|
10 | #if defined(VBOX) && defined(__cplusplus)
|
---|
11 | }
|
---|
12 | #endif
|
---|
13 | #else
|
---|
14 | #if defined(VBOX) && defined(__OS2__) /* temporary workaround, see ticket #127 */
|
---|
15 | # include <sys/time.h>
|
---|
16 | #endif
|
---|
17 | #include <sys/select.h>
|
---|
18 | #include <arpa/inet.h>
|
---|
19 | #endif
|
---|
20 |
|
---|
21 | #ifdef VBOX
|
---|
22 | #include <VBox/types.h>
|
---|
23 | #endif /* VBOX */
|
---|
24 |
|
---|
25 | #ifdef __cplusplus
|
---|
26 | extern "C" {
|
---|
27 | #endif
|
---|
28 |
|
---|
29 | #ifndef VBOX
|
---|
30 | void slirp_init(void);
|
---|
31 | #else /* VBOX */
|
---|
32 | int slirp_init(void);
|
---|
33 | void slirp_term(void);
|
---|
34 | void slirp_link_up(void);
|
---|
35 | void slirp_link_down(void);
|
---|
36 | #endif /* VBOX */
|
---|
37 |
|
---|
38 | void slirp_select_fill(int *pnfds,
|
---|
39 | fd_set *readfds, fd_set *writefds, fd_set *xfds);
|
---|
40 |
|
---|
41 | void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds);
|
---|
42 |
|
---|
43 | void slirp_input(const uint8_t *pkt, int pkt_len);
|
---|
44 |
|
---|
45 | /* you must provide the following functions: */
|
---|
46 | int slirp_can_output(void);
|
---|
47 | void slirp_output(const uint8_t *pkt, int pkt_len);
|
---|
48 |
|
---|
49 | int slirp_redir(int is_udp, int host_port,
|
---|
50 | struct in_addr guest_addr, int guest_port);
|
---|
51 | int slirp_add_exec(int do_pty, const char *args, int addr_low_byte,
|
---|
52 | int guest_port);
|
---|
53 |
|
---|
54 | extern const char *tftp_prefix;
|
---|
55 | extern char slirp_hostname[33];
|
---|
56 |
|
---|
57 | #ifdef __cplusplus
|
---|
58 | }
|
---|
59 | #endif
|
---|
60 |
|
---|
61 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.