Last change
on this file since 52560 was 49252, checked in by vboxsync, 11 years ago |
NATNetwork: localize windows' headers inclusion.
|
-
Property svn:eol-style
set to
native
|
File size:
1.2 KB
|
Line | |
---|
1 | /* -*- indent-tabs-mode: nil; -*- */
|
---|
2 | #ifndef _portfwd_h_
|
---|
3 | #define _portfwd_h_
|
---|
4 |
|
---|
5 | #ifndef RT_OS_WINDOWS
|
---|
6 | #include <sys/types.h>
|
---|
7 | #include <sys/socket.h>
|
---|
8 | #include <netinet/in.h>
|
---|
9 | #endif
|
---|
10 |
|
---|
11 | #include "lwip/ip_addr.h"
|
---|
12 |
|
---|
13 |
|
---|
14 | struct fwspec {
|
---|
15 | int sdom; /* PF_INET, PF_INET6 */
|
---|
16 | int stype; /* SOCK_STREAM, SOCK_DGRAM */
|
---|
17 |
|
---|
18 | /* listen on */
|
---|
19 | union {
|
---|
20 | struct sockaddr sa;
|
---|
21 | struct sockaddr_in sin; /* sdom == PF_INET */
|
---|
22 | struct sockaddr_in6 sin6; /* sdom == PF_INET6 */
|
---|
23 | } src;
|
---|
24 |
|
---|
25 | /* forward to */
|
---|
26 | union {
|
---|
27 | struct sockaddr sa;
|
---|
28 | struct sockaddr_in sin; /* sdom == PF_INET */
|
---|
29 | struct sockaddr_in6 sin6; /* sdom == PF_INET6 */
|
---|
30 | } dst;
|
---|
31 | };
|
---|
32 |
|
---|
33 |
|
---|
34 | void portfwd_init(void);
|
---|
35 | int portfwd_rule_add(struct fwspec *);
|
---|
36 | int portfwd_rule_del(struct fwspec *);
|
---|
37 |
|
---|
38 |
|
---|
39 | int fwspec_set(struct fwspec *, int, int,
|
---|
40 | const char *, uint16_t,
|
---|
41 | const char *, uint16_t);
|
---|
42 |
|
---|
43 | int fwspec_equal(struct fwspec *, struct fwspec *);
|
---|
44 |
|
---|
45 | void fwtcp_init(void);
|
---|
46 | void fwudp_init(void);
|
---|
47 |
|
---|
48 | void fwtcp_add(struct fwspec *);
|
---|
49 | void fwtcp_del(struct fwspec *);
|
---|
50 | void fwudp_add(struct fwspec *);
|
---|
51 | void fwudp_del(struct fwspec *);
|
---|
52 |
|
---|
53 | int fwany_ipX_addr_set_src(ipX_addr_t *, const struct sockaddr *);
|
---|
54 |
|
---|
55 | #endif /* _portfwd_h_ */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.