Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/ip_fw.h
Show First 20 Lines • Show All 520 Lines • ▼ Show 20 Lines | struct nat44_cfg_spool { | ||||
struct in_addr addr; | struct in_addr addr; | ||||
uint16_t port; | uint16_t port; | ||||
uint16_t spare; | uint16_t spare; | ||||
}; | }; | ||||
#define NAT44_REDIR_ADDR 0x01 | #define NAT44_REDIR_ADDR 0x01 | ||||
#define NAT44_REDIR_PORT 0x02 | #define NAT44_REDIR_PORT 0x02 | ||||
#define NAT44_REDIR_PROTO 0x04 | #define NAT44_REDIR_PROTO 0x04 | ||||
/* Port ranges for port aliasing. */ | |||||
struct nat_port_range { | |||||
u_short lower; | |||||
u_short upper; | |||||
}; | |||||
/* Nat redirect configuration. */ | /* Nat redirect configuration. */ | ||||
struct nat44_cfg_redir { | struct nat44_cfg_redir { | ||||
struct in_addr laddr; /* local ip address */ | struct in_addr laddr; /* local ip address */ | ||||
struct in_addr paddr; /* public ip address */ | struct in_addr paddr; /* public ip address */ | ||||
struct in_addr raddr; /* remote ip address */ | struct in_addr raddr; /* remote ip address */ | ||||
uint16_t lport; /* local port */ | uint16_t lport; /* local port */ | ||||
uint16_t pport; /* public port */ | uint16_t pport; /* public port */ | ||||
uint16_t rport; /* remote port */ | uint16_t rport; /* remote port */ | ||||
uint16_t pport_cnt; /* number of public ports */ | uint16_t pport_cnt; /* number of public ports */ | ||||
uint16_t rport_cnt; /* number of remote ports */ | uint16_t rport_cnt; /* number of remote ports */ | ||||
uint16_t mode; /* type of redirect mode */ | uint16_t mode; /* type of redirect mode */ | ||||
uint16_t spool_cnt; /* num of entry in spool chain */ | uint16_t spool_cnt; /* num of entry in spool chain */ | ||||
uint16_t spare; | uint16_t spare; | ||||
uint32_t proto; /* protocol: tcp/udp */ | uint32_t proto; /* protocol: tcp/udp */ | ||||
}; | }; | ||||
/* Nat configuration data struct. */ | /* Nat configuration data struct. */ | ||||
struct nat44_cfg_nat { | struct nat44_cfg_nat { | ||||
char name[64]; /* nat name */ | char name[64]; /* nat name */ | ||||
char if_name[64]; /* interface name */ | char if_name[64]; /* interface name */ | ||||
uint32_t size; /* structure size incl. redirs */ | uint32_t size; /* structure size incl. redirs */ | ||||
struct in_addr ip; /* nat IPv4 address */ | struct in_addr ip; /* nat IPv4 address */ | ||||
uint32_t mode; /* aliasing mode */ | uint32_t mode; /* aliasing mode */ | ||||
uint32_t redir_cnt; /* number of entry in spool chain */ | uint32_t redir_cnt; /* number of entry in spool chain */ | ||||
/* port ranges for port aliasing */ | |||||
struct nat_port_range alias_port_range; | |||||
}; | }; | ||||
/* Nat command. */ | /* Nat command. */ | ||||
typedef struct _ipfw_insn_nat { | typedef struct _ipfw_insn_nat { | ||||
ipfw_insn o; | ipfw_insn o; | ||||
struct cfg_nat *nat; | struct cfg_nat *nat; | ||||
} ipfw_insn_nat; | } ipfw_insn_nat; | ||||
▲ Show 20 Lines • Show All 510 Lines • Show Last 20 Lines |