31#define NG_NAT_NODE_TYPE "nat"
32#define NGM_NAT_COOKIE 1107718711
34#define NG_NAT_HOOK_IN "in"
35#define NG_NAT_HOOK_OUT "out"
44#define NG_NAT_MODE_INFO { \
45 { "flags", &ng_parse_uint32_type }, \
46 { "mask", &ng_parse_uint32_type }, \
50#define NG_NAT_LOG 0x01
51#define NG_NAT_DENY_INCOMING 0x02
52#define NG_NAT_SAME_PORTS 0x04
53#define NG_NAT_UNREGISTERED_ONLY 0x10
54#define NG_NAT_RESET_ON_ADDR_CHANGE 0x20
55#define NG_NAT_PROXY_ONLY 0x40
56#define NG_NAT_REVERSE 0x80
57#define NG_NAT_UNREGISTERED_CGN 0x100
59#define NG_NAT_DESC_LENGTH 64
60#define NG_NAT_REDIRPROTO_ADDR (IPPROTO_MAX + 3)
75#define NG_NAT_REDIRECT_PORT_TYPE_INFO(desctype) { \
76 { "local_addr", &ng_parse_ipaddr_type }, \
77 { "alias_addr", &ng_parse_ipaddr_type }, \
78 { "remote_addr", &ng_parse_ipaddr_type }, \
79 { "local_port", &ng_parse_uint16_type }, \
80 { "alias_port", &ng_parse_uint16_type }, \
81 { "remote_port", &ng_parse_uint16_type }, \
82 { "proto", &ng_parse_uint8_type }, \
83 { "description", (desctype) }, \
95#define NG_NAT_REDIRECT_ADDR_TYPE_INFO(desctype) { \
96 { "local_addr", &ng_parse_ipaddr_type }, \
97 { "alias_addr", &ng_parse_ipaddr_type }, \
98 { "description", (desctype) }, \
112#define NG_NAT_REDIRECT_PROTO_TYPE_INFO(desctype) { \
113 { "local_addr", &ng_parse_ipaddr_type }, \
114 { "alias_addr", &ng_parse_ipaddr_type }, \
115 { "remote_addr", &ng_parse_ipaddr_type }, \
116 { "proto", &ng_parse_uint8_type }, \
117 { "description", (desctype) }, \
129#define NG_NAT_ADD_SERVER_TYPE_INFO { \
130 { "id", &ng_parse_uint32_type }, \
131 { "addr", &ng_parse_ipaddr_type }, \
132 { "port", &ng_parse_uint16_type }, \
151#define NG_NAT_LISTRDRS_ENTRY_TYPE_INFO(desctype) { \
152 { "id", &ng_parse_uint32_type }, \
153 { "local_addr", &ng_parse_ipaddr_type }, \
154 { "alias_addr", &ng_parse_ipaddr_type }, \
155 { "remote_addr", &ng_parse_ipaddr_type }, \
156 { "local_port", &ng_parse_uint16_type }, \
157 { "alias_port", &ng_parse_uint16_type }, \
158 { "remote_port", &ng_parse_uint16_type }, \
159 { "proto", &ng_parse_uint16_type }, \
160 { "lsnat", &ng_parse_uint16_type }, \
161 { "description", (desctype) }, \
172#define NG_NAT_LIST_REDIRECTS_TYPE_INFO(redirtype) { \
173 { "total_count", &ng_parse_uint32_type }, \
174 { "redirects", (redirtype) }, \
192#define NG_NAT_LIBALIAS_INFO { \
193 { "icmpLinkCount", &ng_parse_uint32_type }, \
194 { "udpLinkCount", &ng_parse_uint32_type }, \
195 { "tcpLinkCount", &ng_parse_uint32_type }, \
196 { "sctpLinkCount", &ng_parse_uint32_type }, \
197 { "pptpLinkCount", &ng_parse_uint32_type }, \
198 { "protoLinkCount", &ng_parse_uint32_type }, \
199 { "fragmentIdLinkCount", &ng_parse_uint32_type }, \
200 { "fragmentPtrLinkCount", &ng_parse_uint32_type }, \
201 { "sockCount", &ng_parse_uint32_type }, \
#define NG_NAT_DESC_LENGTH
@ NGM_NAT_REDIRECT_DYNAMIC
@ NGM_NAT_REDIRECT_DELETE
uint32_t fragmentPtrLinkCount
uint32_t fragmentIdLinkCount
struct ng_nat_listrdrs_entry redirects[]
struct in_addr remote_addr
struct in_addr alias_addr
struct in_addr local_addr
char description[NG_NAT_DESC_LENGTH]
struct in_addr alias_addr
struct in_addr local_addr
char description[NG_NAT_DESC_LENGTH]
struct in_addr remote_addr
struct in_addr local_addr
struct in_addr alias_addr
char description[NG_NAT_DESC_LENGTH]
char description[NG_NAT_DESC_LENGTH]
struct in_addr remote_addr
struct in_addr alias_addr
struct in_addr local_addr