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 */
|
---|
13 | struct netif;
|
---|
14 | struct tcpip_msg;
|
---|
15 | struct pbuf;
|
---|
16 | struct sockaddr;
|
---|
17 |
|
---|
18 | struct proxy_options {
|
---|
19 | const char *tftp_root;
|
---|
20 | };
|
---|
21 |
|
---|
22 | void proxy_init(struct netif *, const struct proxy_options *);
|
---|
23 | SOCKET proxy_connected_socket(int, int, ipX_addr_t *, u16_t);
|
---|
24 | SOCKET proxy_bound_socket(int, int, struct sockaddr *);
|
---|
25 | void proxy_reset_socket(SOCKET);
|
---|
26 | void proxy_sendto(SOCKET, struct pbuf *, void *, size_t);
|
---|
27 | void proxy_lwip_post(struct tcpip_msg *);
|
---|
28 | const char *proxy_lwip_strerr(err_t);
|
---|
29 |
|
---|
30 | /* proxy_rtadvd.c */
|
---|
31 | void proxy_rtadvd_start(struct netif *);
|
---|
32 |
|
---|
33 | /* rtmon_*.c */
|
---|
34 | int rtmon_get_defaults(void);
|
---|
35 |
|
---|
36 | /* proxy_dhcp6ds.c */
|
---|
37 | err_t dhcp6ds_init(struct netif *);
|
---|
38 |
|
---|
39 | /* proxy_tftpd.c */
|
---|
40 | err_t tftpd_init(struct netif *, const char *);
|
---|
41 |
|
---|
42 | /* pxtcp.c */
|
---|
43 | void pxtcp_init(void);
|
---|
44 |
|
---|
45 | /* pxudp.c */
|
---|
46 | void pxudp_init(void);
|
---|
47 |
|
---|
48 |
|
---|
49 | #if defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS) || defined(RT_OS_WINDOWS)
|
---|
50 | # define HAVE_SA_LEN 0
|
---|
51 | #else
|
---|
52 | # define HAVE_SA_LEN 1
|
---|
53 | #endif
|
---|
54 |
|
---|
55 | #define LWIP_ASSERT1(condition) LWIP_ASSERT(#condition, condition)
|
---|
56 | /* TODO: review debug levels and types */
|
---|
57 | #if !LWIP_PROXY_DEBUG
|
---|
58 | # define DPRINTF_LEVEL(y, x) do {} while (0)
|
---|
59 | #else
|
---|
60 | # define DPRINTF_LEVEL(level, x) do { LWIP_DEBUGF(LWIP_PROXY_DEBUG | (level), x); } while (0)
|
---|
61 | #endif
|
---|
62 |
|
---|
63 | #define DPRINTF(x) DPRINTF_LEVEL(0, x)
|
---|
64 | #define DPRINTF0(x) DPRINTF_LEVEL(LWIP_DBG_LEVEL_WARNING, x)
|
---|
65 | #define DPRINTF1(x) DPRINTF_LEVEL(LWIP_DBG_LEVEL_SERIOUS, x)
|
---|
66 | #define DPRINTF2(x) DPRINTF_LEVEL(LWIP_DBG_LEVEL_SEVERE, x)
|
---|
67 |
|
---|
68 | #endif /* _proxytest_h_ */
|
---|