VirtualBox

source: vbox/trunk/src/VBox/Devices/Network/slirp/libslirp.h@ 478

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)
7extern "C" {
8#endif
9int 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
26extern "C" {
27#endif
28
29#ifndef VBOX
30void slirp_init(void);
31#else /* VBOX */
32int slirp_init(void);
33void slirp_term(void);
34void slirp_link_up(void);
35void slirp_link_down(void);
36#endif /* VBOX */
37
38void slirp_select_fill(int *pnfds,
39 fd_set *readfds, fd_set *writefds, fd_set *xfds);
40
41void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds);
42
43void slirp_input(const uint8_t *pkt, int pkt_len);
44
45/* you must provide the following functions: */
46int slirp_can_output(void);
47void slirp_output(const uint8_t *pkt, int pkt_len);
48
49int slirp_redir(int is_udp, int host_port,
50 struct in_addr guest_addr, int guest_port);
51int slirp_add_exec(int do_pty, const char *args, int addr_low_byte,
52 int guest_port);
53
54extern const char *tftp_prefix;
55extern char slirp_hostname[33];
56
57#ifdef __cplusplus
58}
59#endif
60
61#endif
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette