VirtualBox

source: vbox/trunk/src/VBox/NetworkServices/NAT/proxytest.h@ 48241

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

Provide ability to bind proxy socket to a local address - to be used
to implement equivalent of --natbindip<N>.

  • 屬性 svn:eol-style 設為 native
檔案大小: 1.7 KB
 
1#ifndef _proxytest_h_
2#define _proxytest_h_
3
4#if !defined(VBOX)
5#include "vbox-compat.h"
6#endif
7
8#include "lwip/err.h"
9#include "lwip/ip_addr.h"
10#include "winutils.h"
11
12/* forward */
13struct netif;
14struct tcpip_msg;
15struct pbuf;
16struct sockaddr;
17struct sockaddr_in;
18struct sockaddr_in6;
19
20struct proxy_options {
21 const char *tftp_root;
22 const struct sockaddr_in *src4;
23 const struct sockaddr_in6 *src6;
24};
25
26void proxy_init(struct netif *, const struct proxy_options *);
27SOCKET proxy_connected_socket(int, int, ipX_addr_t *, u16_t);
28SOCKET proxy_bound_socket(int, int, struct sockaddr *);
29void proxy_reset_socket(SOCKET);
30void proxy_sendto(SOCKET, struct pbuf *, void *, size_t);
31void proxy_lwip_post(struct tcpip_msg *);
32const char *proxy_lwip_strerr(err_t);
33
34/* proxy_rtadvd.c */
35void proxy_rtadvd_start(struct netif *);
36
37/* rtmon_*.c */
38int rtmon_get_defaults(void);
39
40/* proxy_dhcp6ds.c */
41err_t dhcp6ds_init(struct netif *);
42
43/* proxy_tftpd.c */
44err_t tftpd_init(struct netif *, const char *);
45
46/* pxtcp.c */
47void pxtcp_init(void);
48
49/* pxudp.c */
50void pxudp_init(void);
51
52
53#if defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS) || defined(RT_OS_WINDOWS)
54# define HAVE_SA_LEN 0
55#else
56# define HAVE_SA_LEN 1
57#endif
58
59#define LWIP_ASSERT1(condition) LWIP_ASSERT(#condition, condition)
60/* TODO: review debug levels and types */
61#if !LWIP_PROXY_DEBUG
62# define DPRINTF_LEVEL(y, x) do {} while (0)
63#else
64# define DPRINTF_LEVEL(level, x) do { LWIP_DEBUGF(LWIP_PROXY_DEBUG | (level), x); } while (0)
65#endif
66
67#define DPRINTF(x) DPRINTF_LEVEL(0, x)
68#define DPRINTF0(x) DPRINTF_LEVEL(LWIP_DBG_LEVEL_WARNING, x)
69#define DPRINTF1(x) DPRINTF_LEVEL(LWIP_DBG_LEVEL_SERIOUS, x)
70#define DPRINTF2(x) DPRINTF_LEVEL(LWIP_DBG_LEVEL_SEVERE, x)
71
72#endif /* _proxytest_h_ */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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