VirtualBox

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

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

NATNetwork: localize windows' headers inclusion.

  • 屬性 svn:eol-style 設為 native
檔案大小: 1.2 KB
 
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_ */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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