VirtualBox

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

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

NAT/Lwip: bypass registered loopbacks to proxy.

  • 屬性 svn:eol-style 設為 native
檔案大小: 2.0 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 ip4_lomap
21{
22 ip_addr_t loaddr;
23 uint32_t off;
24};
25
26struct ip4_lomap_desc
27{
28 const struct ip4_lomap *lomap;
29 unsigned int num_lomap;
30};
31
32struct proxy_options {
33 const char *tftp_root;
34 const struct sockaddr_in *src4;
35 const struct sockaddr_in6 *src6;
36 const struct ip4_lomap_desc *lomap_desc;
37};
38
39extern volatile const struct proxy_options *g_proxy_options;
40extern struct netif *g_proxy_netif;
41
42void proxy_init(struct netif *, const struct proxy_options *);
43SOCKET proxy_connected_socket(int, int, ipX_addr_t *, u16_t);
44SOCKET proxy_bound_socket(int, int, struct sockaddr *);
45void proxy_reset_socket(SOCKET);
46void proxy_sendto(SOCKET, struct pbuf *, void *, size_t);
47void proxy_lwip_post(struct tcpip_msg *);
48const char *proxy_lwip_strerr(err_t);
49
50/* proxy_rtadvd.c */
51void proxy_rtadvd_start(struct netif *);
52
53/* rtmon_*.c */
54int rtmon_get_defaults(void);
55
56/* proxy_dhcp6ds.c */
57err_t dhcp6ds_init(struct netif *);
58
59/* proxy_tftpd.c */
60err_t tftpd_init(struct netif *, const char *);
61
62/* pxtcp.c */
63void pxtcp_init(void);
64
65/* pxudp.c */
66void pxudp_init(void);
67
68
69#if defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS) || defined(RT_OS_WINDOWS)
70# define HAVE_SA_LEN 0
71#else
72# define HAVE_SA_LEN 1
73#endif
74
75#define LWIP_ASSERT1(condition) LWIP_ASSERT(#condition, condition)
76/* TODO: review debug levels and types */
77#if !LWIP_PROXY_DEBUG
78# define DPRINTF_LEVEL(y, x) do {} while (0)
79#else
80# define DPRINTF_LEVEL(level, x) do { LWIP_DEBUGF(LWIP_PROXY_DEBUG | (level), x); } while (0)
81#endif
82
83#define DPRINTF(x) DPRINTF_LEVEL(0, x)
84#define DPRINTF0(x) DPRINTF_LEVEL(LWIP_DBG_LEVEL_WARNING, x)
85#define DPRINTF1(x) DPRINTF_LEVEL(LWIP_DBG_LEVEL_SERIOUS, x)
86#define DPRINTF2(x) DPRINTF_LEVEL(LWIP_DBG_LEVEL_SEVERE, x)
87
88#endif /* _proxytest_h_ */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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