VirtualBox

source: vbox/trunk/src/VBox/NetworkServices/NAT/portfwd.h@ 53349

Last change on this file since 53349 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
14struct 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
34void portfwd_init(void);
35int portfwd_rule_add(struct fwspec *);
36int portfwd_rule_del(struct fwspec *);
37
38
39int fwspec_set(struct fwspec *, int, int,
40 const char *, uint16_t,
41 const char *, uint16_t);
42
43int fwspec_equal(struct fwspec *, struct fwspec *);
44
45void fwtcp_init(void);
46void fwudp_init(void);
47
48void fwtcp_add(struct fwspec *);
49void fwtcp_del(struct fwspec *);
50void fwudp_add(struct fwspec *);
51void fwudp_del(struct fwspec *);
52
53int 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.

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