VirtualBox

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

最後變更 在這個檔案從52822是 51573,由 vboxsync 提交於 10 年 前

NAT/Net: Use logger for DPRINTFs.

  • 屬性 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 SOCKET icmpsock4;
36 SOCKET icmpsock6;
37 const char *tftp_root;
38 const struct sockaddr_in *src4;
39 const struct sockaddr_in6 *src6;
40 const struct ip4_lomap_desc *lomap_desc;
41 const char **nameservers;
42};
43
44extern volatile struct proxy_options *g_proxy_options;
45extern struct netif *g_proxy_netif;
46
47void proxy_init(struct netif *, struct proxy_options *);
48SOCKET proxy_connected_socket(int, int, ipX_addr_t *, u16_t);
49SOCKET proxy_bound_socket(int, int, struct sockaddr *);
50void proxy_reset_socket(SOCKET);
51int proxy_sendto(SOCKET, struct pbuf *, void *, size_t);
52void proxy_lwip_post(struct tcpip_msg *);
53const char *proxy_lwip_strerr(err_t);
54
55/* proxy_rtadvd.c */
56void proxy_rtadvd_start(struct netif *);
57void proxy_rtadvd_do_quick(void *);
58
59/* rtmon_*.c */
60int rtmon_get_defaults(void);
61
62/* proxy_dhcp6ds.c */
63err_t dhcp6ds_init(struct netif *);
64
65/* proxy_tftpd.c */
66err_t tftpd_init(struct netif *, const char *);
67
68/* pxtcp.c */
69void pxtcp_init(void);
70
71/* pxudp.c */
72void pxudp_init(void);
73
74/* pxdns.c */
75err_t pxdns_init(struct netif *);
76void pxdns_set_nameservers(void *);
77
78/* pxping.c */
79err_t pxping_init(struct netif *, SOCKET, SOCKET);
80
81
82#if defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS) || defined(RT_OS_WINDOWS)
83# define HAVE_SA_LEN 0
84#else
85# define HAVE_SA_LEN 1
86#endif
87
88#define LWIP_ASSERT1(condition) LWIP_ASSERT(#condition, condition)
89
90/*
91 * TODO: DPRINTF0 should probably become LogRel but its usage needs to
92 * be cleaned up a bit before.
93 */
94#define DPRINTF0(a) Log(a)
95
96#define DPRINTF(a) DPRINTF1(a)
97#define DPRINTF1(a) Log2(a)
98#define DPRINTF2(a) Log3(a)
99
100#endif /* _nat_proxy_h_ */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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