VirtualBox

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

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

NAT: set network address after loadstate (fixed #2467)

  • 屬性 svn:eol-style 設為 native
檔案大小: 1.4 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);
40void slirp_set_ethaddr(PNATState pData, const uint8_t *ethaddr);
41
42/* you must provide the following functions: */
43int slirp_can_output(void * pvUser);
44void slirp_output(void * pvUser, const uint8_t *pkt, int pkt_len);
45
46int slirp_redir(PNATState pData, int is_udp, int host_port,
47 struct in_addr guest_addr, int guest_port);
48int slirp_add_exec(PNATState pData, int do_pty, const char *args, int addr_low_byte,
49 int guest_port);
50
51
52#ifdef __cplusplus
53}
54#endif
55
56#endif
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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