VirtualBox

source: vbox/trunk/src/VBox/NetworkServices/NAT/proxy.h@ 49245

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

On NATNetworkSetting trigger quick RAs.

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

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