FreeBSD kernel netgraph code
ng_nat.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ng_nat_mode
 
struct  ng_nat_redirect_port
 
struct  ng_nat_redirect_addr
 
struct  ng_nat_redirect_proto
 
struct  ng_nat_add_server
 
struct  ng_nat_listrdrs_entry
 
struct  ng_nat_list_redirects
 
struct  ng_nat_libalias_info
 

Macros

#define NG_NAT_NODE_TYPE   "nat"
 
#define NGM_NAT_COOKIE   1107718711
 
#define NG_NAT_HOOK_IN   "in"
 
#define NG_NAT_HOOK_OUT   "out"
 
#define NG_NAT_MODE_INFO
 
#define NG_NAT_LOG   0x01
 
#define NG_NAT_DENY_INCOMING   0x02
 
#define NG_NAT_SAME_PORTS   0x04
 
#define NG_NAT_UNREGISTERED_ONLY   0x10
 
#define NG_NAT_RESET_ON_ADDR_CHANGE   0x20
 
#define NG_NAT_PROXY_ONLY   0x40
 
#define NG_NAT_REVERSE   0x80
 
#define NG_NAT_UNREGISTERED_CGN   0x100
 
#define NG_NAT_DESC_LENGTH   64
 
#define NG_NAT_REDIRPROTO_ADDR   (IPPROTO_MAX + 3) /* LibAlias' LINK_ADDR, also unused in in.h */
 
#define NG_NAT_REDIRECT_PORT_TYPE_INFO(desctype)
 
#define NG_NAT_REDIRECT_ADDR_TYPE_INFO(desctype)
 
#define NG_NAT_REDIRECT_PROTO_TYPE_INFO(desctype)
 
#define NG_NAT_ADD_SERVER_TYPE_INFO
 
#define NG_NAT_LISTRDRS_ENTRY_TYPE_INFO(desctype)
 
#define NG_NAT_LIST_REDIRECTS_TYPE_INFO(redirtype)
 
#define NG_NAT_LIBALIAS_INFO
 

Enumerations

enum  {
  NGM_NAT_SET_IPADDR = 1 , NGM_NAT_SET_MODE , NGM_NAT_SET_TARGET , NGM_NAT_REDIRECT_PORT ,
  NGM_NAT_REDIRECT_ADDR , NGM_NAT_REDIRECT_PROTO , NGM_NAT_REDIRECT_DYNAMIC , NGM_NAT_REDIRECT_DELETE ,
  NGM_NAT_ADD_SERVER , NGM_NAT_LIST_REDIRECTS , NGM_NAT_PROXY_RULE , NGM_NAT_LIBALIAS_INFO ,
  NGM_NAT_SET_DLT , NGM_NAT_GET_DLT
}
 

Macro Definition Documentation

◆ NG_NAT_ADD_SERVER_TYPE_INFO

#define NG_NAT_ADD_SERVER_TYPE_INFO
Value:
{ \
{ "id", &ng_parse_uint32_type }, \
{ "addr", &ng_parse_ipaddr_type }, \
{ "port", &ng_parse_uint16_type }, \
{ NULL } \
}
const struct ng_parse_type ng_parse_uint16_type
Definition: ng_parse.c:509
const struct ng_parse_type ng_parse_ipaddr_type
Definition: ng_parse.c:1002
const struct ng_parse_type ng_parse_uint32_type
Definition: ng_parse.c:608

Definition at line 129 of file ng_nat.h.

◆ NG_NAT_DENY_INCOMING

#define NG_NAT_DENY_INCOMING   0x02

Definition at line 51 of file ng_nat.h.

◆ NG_NAT_DESC_LENGTH

#define NG_NAT_DESC_LENGTH   64

Definition at line 59 of file ng_nat.h.

◆ NG_NAT_HOOK_IN

#define NG_NAT_HOOK_IN   "in"

Definition at line 34 of file ng_nat.h.

◆ NG_NAT_HOOK_OUT

#define NG_NAT_HOOK_OUT   "out"

Definition at line 35 of file ng_nat.h.

◆ NG_NAT_LIBALIAS_INFO

#define NG_NAT_LIBALIAS_INFO
Value:
{ \
{ "icmpLinkCount", &ng_parse_uint32_type }, \
{ "udpLinkCount", &ng_parse_uint32_type }, \
{ "tcpLinkCount", &ng_parse_uint32_type }, \
{ "sctpLinkCount", &ng_parse_uint32_type }, \
{ "pptpLinkCount", &ng_parse_uint32_type }, \
{ "protoLinkCount", &ng_parse_uint32_type }, \
{ "fragmentIdLinkCount", &ng_parse_uint32_type }, \
{ "fragmentPtrLinkCount", &ng_parse_uint32_type }, \
{ "sockCount", &ng_parse_uint32_type }, \
{ NULL } \
}

Definition at line 192 of file ng_nat.h.

◆ NG_NAT_LIST_REDIRECTS_TYPE_INFO

#define NG_NAT_LIST_REDIRECTS_TYPE_INFO (   redirtype)
Value:
{ \
{ "total_count", &ng_parse_uint32_type }, \
{ "redirects", (redirtype) }, \
{ NULL } \
}

Definition at line 172 of file ng_nat.h.

◆ NG_NAT_LISTRDRS_ENTRY_TYPE_INFO

#define NG_NAT_LISTRDRS_ENTRY_TYPE_INFO (   desctype)
Value:
{ \
{ "id", &ng_parse_uint32_type }, \
{ "local_addr", &ng_parse_ipaddr_type }, \
{ "alias_addr", &ng_parse_ipaddr_type }, \
{ "remote_addr", &ng_parse_ipaddr_type }, \
{ "local_port", &ng_parse_uint16_type }, \
{ "alias_port", &ng_parse_uint16_type }, \
{ "remote_port", &ng_parse_uint16_type }, \
{ "proto", &ng_parse_uint16_type }, \
{ "lsnat", &ng_parse_uint16_type }, \
{ "description", (desctype) }, \
{ NULL } \
}

Definition at line 151 of file ng_nat.h.

◆ NG_NAT_LOG

#define NG_NAT_LOG   0x01

Definition at line 50 of file ng_nat.h.

◆ NG_NAT_MODE_INFO

#define NG_NAT_MODE_INFO
Value:
{ \
{ "flags", &ng_parse_uint32_type }, \
{ "mask", &ng_parse_uint32_type }, \
{ NULL } \
}

Definition at line 44 of file ng_nat.h.

◆ NG_NAT_NODE_TYPE

#define NG_NAT_NODE_TYPE   "nat"

Definition at line 31 of file ng_nat.h.

◆ NG_NAT_PROXY_ONLY

#define NG_NAT_PROXY_ONLY   0x40

Definition at line 55 of file ng_nat.h.

◆ NG_NAT_REDIRECT_ADDR_TYPE_INFO

#define NG_NAT_REDIRECT_ADDR_TYPE_INFO (   desctype)
Value:
{ \
{ "local_addr", &ng_parse_ipaddr_type }, \
{ "alias_addr", &ng_parse_ipaddr_type }, \
{ "description", (desctype) }, \
{ NULL } \
}

Definition at line 95 of file ng_nat.h.

◆ NG_NAT_REDIRECT_PORT_TYPE_INFO

#define NG_NAT_REDIRECT_PORT_TYPE_INFO (   desctype)
Value:
{ \
{ "local_addr", &ng_parse_ipaddr_type }, \
{ "alias_addr", &ng_parse_ipaddr_type }, \
{ "remote_addr", &ng_parse_ipaddr_type }, \
{ "local_port", &ng_parse_uint16_type }, \
{ "alias_port", &ng_parse_uint16_type }, \
{ "remote_port", &ng_parse_uint16_type }, \
{ "proto", &ng_parse_uint8_type }, \
{ "description", (desctype) }, \
{ NULL } \
}
const struct ng_parse_type ng_parse_uint8_type
Definition: ng_parse.c:413

Definition at line 75 of file ng_nat.h.

◆ NG_NAT_REDIRECT_PROTO_TYPE_INFO

#define NG_NAT_REDIRECT_PROTO_TYPE_INFO (   desctype)
Value:
{ \
{ "local_addr", &ng_parse_ipaddr_type }, \
{ "alias_addr", &ng_parse_ipaddr_type }, \
{ "remote_addr", &ng_parse_ipaddr_type }, \
{ "proto", &ng_parse_uint8_type }, \
{ "description", (desctype) }, \
{ NULL } \
}

Definition at line 112 of file ng_nat.h.

◆ NG_NAT_REDIRPROTO_ADDR

#define NG_NAT_REDIRPROTO_ADDR   (IPPROTO_MAX + 3) /* LibAlias' LINK_ADDR, also unused in in.h */

Definition at line 60 of file ng_nat.h.

◆ NG_NAT_RESET_ON_ADDR_CHANGE

#define NG_NAT_RESET_ON_ADDR_CHANGE   0x20

Definition at line 54 of file ng_nat.h.

◆ NG_NAT_REVERSE

#define NG_NAT_REVERSE   0x80

Definition at line 56 of file ng_nat.h.

◆ NG_NAT_SAME_PORTS

#define NG_NAT_SAME_PORTS   0x04

Definition at line 52 of file ng_nat.h.

◆ NG_NAT_UNREGISTERED_CGN

#define NG_NAT_UNREGISTERED_CGN   0x100

Definition at line 57 of file ng_nat.h.

◆ NG_NAT_UNREGISTERED_ONLY

#define NG_NAT_UNREGISTERED_ONLY   0x10

Definition at line 53 of file ng_nat.h.

◆ NGM_NAT_COOKIE

#define NGM_NAT_COOKIE   1107718711

Definition at line 32 of file ng_nat.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
NGM_NAT_SET_IPADDR 
NGM_NAT_SET_MODE 
NGM_NAT_SET_TARGET 
NGM_NAT_REDIRECT_PORT 
NGM_NAT_REDIRECT_ADDR 
NGM_NAT_REDIRECT_PROTO 
NGM_NAT_REDIRECT_DYNAMIC 
NGM_NAT_REDIRECT_DELETE 
NGM_NAT_ADD_SERVER 
NGM_NAT_LIST_REDIRECTS 
NGM_NAT_PROXY_RULE 
NGM_NAT_LIBALIAS_INFO 
NGM_NAT_SET_DLT 
NGM_NAT_GET_DLT 

Definition at line 205 of file ng_nat.h.