VirtualBox

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

最後變更 在這個檔案從8009是 8009,由 vboxsync 提交於 17 年 前

slirp: make it possible to configure the netmask

  • 屬性 svn:eol-style 設為 native
檔案大小: 1.3 KB
 
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 RT_OS_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 *, uint32_t, bool, const char *, 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
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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