VirtualBox

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

Last change on this file since 1824 was 1076, checked in by vboxsync, 18 years ago

Removed tons of ifdef VBOX conditionals to make slirp readable again

  • 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#ifdef __cplusplus
7extern "C" {
8#endif
9int inet_aton(const char *cp, struct in_addr *ia);
10#ifdef __cplusplus
11}
12#endif
13#else
14#ifdef __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#include <VBox/types.h>
22
23typedef struct NATState *PNATState;
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
29int slirp_init(PNATState *, const char *, void *);
30void slirp_term(PNATState);
31void slirp_link_up(PNATState);
32void slirp_link_down(PNATState);
33
34void slirp_select_fill(PNATState pData, int *pnfds,
35 fd_set *readfds, fd_set *writefds, fd_set *xfds);
36
37void slirp_select_poll(PNATState pData, fd_set *readfds, fd_set *writefds, fd_set *xfds);
38
39void slirp_input(PNATState pData, const uint8_t *pkt, int pkt_len);
40
41/* you must provide the following functions: */
42int slirp_can_output(void * pvUser);
43void slirp_output(void * pvUser, const uint8_t *pkt, int pkt_len);
44
45int slirp_redir(PNATState pData, int is_udp, int host_port,
46 struct in_addr guest_addr, int guest_port);
47int slirp_add_exec(PNATState pData, int do_pty, const char *args, int addr_low_byte,
48 int guest_port);
49
50
51#ifdef __cplusplus
52}
53#endif
54
55#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