39#define IPFW_DEFAULT_RULE 65535
42#define IPFW_MAX_SETS 32
48#define IPFW_TABLES_MAX 65535
49#define IPFW_TABLES_DEFAULT 128
62#define IPFW_ARG_MAX 65534
63#define IP_FW_TABLEARG 65535
65#define IP_FW_NAT44_GLOBAL 65535
71#define IPFW_CALLSTACK_SIZE 16
81#define IP_FW_TABLE_XADD 86
82#define IP_FW_TABLE_XDEL 87
83#define IP_FW_TABLE_XGETSIZE 88
84#define IP_FW_TABLE_XLIST 89
85#define IP_FW_TABLE_XDESTROY 90
86#define IP_FW_TABLES_XLIST 92
87#define IP_FW_TABLE_XINFO 93
88#define IP_FW_TABLE_XFLUSH 94
89#define IP_FW_TABLE_XCREATE 95
90#define IP_FW_TABLE_XMODIFY 96
94#define IP_FW_XMOVE 100
95#define IP_FW_XZERO 101
96#define IP_FW_XRESETLOG 102
97#define IP_FW_SET_SWAP 103
98#define IP_FW_SET_MOVE 104
99#define IP_FW_SET_ENABLE 105
100#define IP_FW_TABLE_XFIND 106
101#define IP_FW_XIFLIST 107
102#define IP_FW_TABLES_ALIST 108
103#define IP_FW_TABLE_XSWAP 109
104#define IP_FW_TABLE_VLIST 110
106#define IP_FW_NAT44_XCONFIG 111
107#define IP_FW_NAT44_DESTROY 112
108#define IP_FW_NAT44_XGETCONFIG 113
109#define IP_FW_NAT44_LIST_NAT 114
110#define IP_FW_NAT44_XGETLOG 115
112#define IP_FW_DUMP_SOPTCODES 116
113#define IP_FW_DUMP_SRVOBJECTS 117
115#define IP_FW_NAT64STL_CREATE 130
116#define IP_FW_NAT64STL_DESTROY 131
117#define IP_FW_NAT64STL_CONFIG 132
118#define IP_FW_NAT64STL_LIST 133
119#define IP_FW_NAT64STL_STATS 134
120#define IP_FW_NAT64STL_RESET_STATS 135
122#define IP_FW_NAT64LSN_CREATE 140
123#define IP_FW_NAT64LSN_DESTROY 141
124#define IP_FW_NAT64LSN_CONFIG 142
125#define IP_FW_NAT64LSN_LIST 143
126#define IP_FW_NAT64LSN_STATS 144
127#define IP_FW_NAT64LSN_LIST_STATES 145
128#define IP_FW_NAT64LSN_RESET_STATS 146
130#define IP_FW_NPTV6_CREATE 150
131#define IP_FW_NPTV6_DESTROY 151
132#define IP_FW_NPTV6_CONFIG 152
133#define IP_FW_NPTV6_LIST 153
134#define IP_FW_NPTV6_STATS 154
135#define IP_FW_NPTV6_RESET_STATS 155
137#define IP_FW_NAT64CLAT_CREATE 160
138#define IP_FW_NAT64CLAT_DESTROY 161
139#define IP_FW_NAT64CLAT_CONFIG 162
140#define IP_FW_NAT64CLAT_LIST 163
141#define IP_FW_NAT64CLAT_STATS 164
142#define IP_FW_NAT64CLAT_RESET_STATS 165
305#define EXT_FRAGMENT 0x1
306#define EXT_HOPOPTS 0x2
307#define EXT_ROUTING 0x4
310#define EXT_DSTOPTS 0x20
311#define EXT_RTHDR0 0x40
312#define EXT_RTHDR2 0x80
346#define F_LEN_MASK 0x3f
347#define F_LEN(cmd) ((cmd)->len & F_LEN_MASK)
356#define F_INSN_SIZE(t) ((sizeof (t))/sizeof(u_int32_t))
397 struct sockaddr_in6
sa;
437#define DYN_SRC_ADDR 0x1
438#define DYN_SRC_PORT 0x2
439#define DYN_DST_ADDR 0x4
440#define DYN_DST_PORT 0x8
463 LIST_ENTRY(cfg_spool) _next;
470#define REDIR_ADDR 0x01
471#define REDIR_PORT 0x02
472#define REDIR_PROTO 0x04
477 LIST_ENTRY(cfg_redir) _next;
492 LIST_HEAD(spool_chain, cfg_spool) spool_chain;
500 LIST_ENTRY(cfg_nat) _next;
503 char if_name[IF_NAMESIZE];
509 LIST_HEAD(redir_chain, cfg_redir) redir_chain;
513#define SOF_NAT sizeof(struct cfg_nat)
514#define SOF_REDIR sizeof(struct cfg_redir)
515#define SOF_SPOOL sizeof(struct cfg_spool)
524#define NAT44_REDIR_ADDR 0x01
525#define NAT44_REDIR_PORT 0x02
526#define NAT44_REDIR_PROTO 0x04
563#define APPLY_MASK(addr,mask) do { \
564 (addr)->__u6_addr.__u6_addr32[0] &= (mask)->__u6_addr.__u6_addr32[0]; \
565 (addr)->__u6_addr.__u6_addr32[1] &= (mask)->__u6_addr.__u6_addr32[1]; \
566 (addr)->__u6_addr.__u6_addr32[2] &= (mask)->__u6_addr.__u6_addr32[2]; \
567 (addr)->__u6_addr.__u6_addr32[3] &= (mask)->__u6_addr.__u6_addr32[3]; \
627#define IPFW_RULE_NOOPT 0x01
628#define IPFW_RULE_JUSTOPTS 0x02
647 struct ip_fw *x_next;
648 struct ip_fw *next_rule;
667#define ACTION_PTR(rule) \
668 (ipfw_insn *)( (u_int32_t *)((rule)->cmd) + ((rule)->act_ofs) )
670#define RULESIZE(rule) (sizeof(*(rule)) + (rule)->cmd_len * 4 - 4)
696#define IS_IP4_FLOW_ID(id) ((id)->addr_type == 4)
697#define IS_IP6_FLOW_ID(id) ((id)->addr_type == 6)
718#define IPFW_DYN_ORPHANED 0x40000
730#define IP_FW_IPOPT_LSRR 0x01
731#define IP_FW_IPOPT_SSRR 0x02
732#define IP_FW_IPOPT_RR 0x04
733#define IP_FW_IPOPT_TS 0x08
738#define IP_FW_TCPOPT_MSS 0x01
739#define IP_FW_TCPOPT_WINDOW 0x02
740#define IP_FW_TCPOPT_SACK 0x04
741#define IP_FW_TCPOPT_TS 0x08
742#define IP_FW_TCPOPT_CC 0x10
744#define ICMP_REJECT_RST 0x100
745#define ICMP6_UNREACH_RST 0x100
746#define ICMP_REJECT_ABORT 0x101
747#define ICMP6_UNREACH_ABORT 0x101
753#define IPFW_TABLE_ADDR 1
754#define IPFW_TABLE_INTERFACE 2
755#define IPFW_TABLE_NUMBER 3
756#define IPFW_TABLE_FLOW 4
757#define IPFW_TABLE_MAXTYPE 4
759#define IPFW_TABLE_CIDR IPFW_TABLE_ADDR
762#define IPFW_VTYPE_LEGACY 0xFFFFFFFF
763#define IPFW_VTYPE_SKIPTO 0x00000001
764#define IPFW_VTYPE_PIPE 0x00000002
765#define IPFW_VTYPE_FIB 0x00000004
766#define IPFW_VTYPE_NAT 0x00000008
767#define IPFW_VTYPE_DSCP 0x00000010
768#define IPFW_VTYPE_TAG 0x00000020
769#define IPFW_VTYPE_DIVERT 0x00000040
770#define IPFW_VTYPE_NETGRAPH 0x00000080
771#define IPFW_VTYPE_LIMIT 0x00000100
772#define IPFW_VTYPE_NH4 0x00000200
773#define IPFW_VTYPE_NH6 0x00000400
795#define IPFW_TCF_INET 0x01
818#define IPFW_TLV_TBL_NAME 1
819#define IPFW_TLV_TBLNAME_LIST 2
820#define IPFW_TLV_RULE_LIST 3
821#define IPFW_TLV_DYNSTATE_LIST 4
822#define IPFW_TLV_TBL_ENT 5
823#define IPFW_TLV_DYN_ENT 6
824#define IPFW_TLV_RULE_ENT 7
825#define IPFW_TLV_TBLENT_LIST 8
826#define IPFW_TLV_RANGE 9
827#define IPFW_TLV_EACTION 10
828#define IPFW_TLV_COUNTERS 11
829#define IPFW_TLV_OBJDATA 12
830#define IPFW_TLV_STATE_NAME 14
832#define IPFW_TLV_EACTION_BASE 1000
833#define IPFW_TLV_EACTION_NAME(arg) (IPFW_TLV_EACTION_BASE + (arg))
909#define IPFW_TF_UPDATE 0x01
911#define IPFW_CTF_ATOMIC 0x01
913#define IPFW_TR_IGNORED 0
914#define IPFW_TR_ADDED 1
915#define IPFW_TR_UPDATED 2
916#define IPFW_TR_DELETED 3
917#define IPFW_TR_LIMIT 4
918#define IPFW_TR_NOTFOUND 5
919#define IPFW_TR_EXISTS 6
920#define IPFW_TR_ERROR 7
926#define IPFW_DF_LAST 0x01
946#define IPFW_RCFLAG_RANGE 0x01
947#define IPFW_RCFLAG_ALL 0x02
948#define IPFW_RCFLAG_SET 0x04
949#define IPFW_RCFLAG_DYNAMIC 0x08
951#define IPFW_RCFLAG_USER (IPFW_RCFLAG_RANGE | IPFW_RCFLAG_ALL | \
952 IPFW_RCFLAG_SET | IPFW_RCFLAG_DYNAMIC)
954#define IPFW_RCFLAG_DEFAULT 0x0100
970#define IPFW_TACLASS_HASH 1
971#define IPFW_TACLASS_ARRAY 2
972#define IPFW_TACLASS_RADIX 3
974#define IPFW_TATFLAGS_DATA 0x0001
975#define IPFW_TATFLAGS_AFDATA 0x0002
976#define IPFW_TATFLAGS_AFITEM 0x0004
996#define IPFW_TGFLAGS_LOCKED 0x01
998#define IPFW_TFFLAG_SRCIP 0x01
999#define IPFW_TFFLAG_DSTIP 0x02
1000#define IPFW_TFFLAG_SRCPORT 0x04
1001#define IPFW_TFFLAG_DSTPORT 0x08
1002#define IPFW_TFFLAG_PROTO 0x10
1004#define IPFW_TMFLAGS_LIMIT 0x0002
1005#define IPFW_TMFLAGS_LOCK 0x0004
1015#define IPFW_IFFLAG_RESOLVED 0x01
1043#define IPFW_CFG_GET_STATIC 0x01
1044#define IPFW_CFG_GET_STATES 0x02
1045#define IPFW_CFG_GET_COUNTERS 0x04
struct icmp6_hdr __packed
static LIST_HEAD(carp_softc)
struct _ipfw_obj_ctlv ipfw_obj_ctlv
struct _ipfw_dyn_rule __aligned(8)
struct _ipfw_table_xentry ipfw_table_xentry
struct _ipfw_obj_lheader ipfw_obj_lheader
struct _ipfw_obj_tentry ipfw_obj_tentry
struct _ipfw_insn_sa6 ipfw_insn_sa6
struct _ipfw_sopt_info ipfw_sopt_info
struct _ipfw_cfg_lheader ipfw_cfg_lheader
struct _ipfw_table_entry ipfw_table_entry
struct _ipfw_obj_ntlv ipfw_obj_ntlv
struct _ipfw_obj_header ipfw_obj_header
struct _ipfw_insn_mac ipfw_insn_mac
struct _ipfw_insn_nat ipfw_insn_nat
struct _ipfw_xtable ipfw_xtable
struct _ipfw_xtable_info ipfw_xtable_info
struct _ipfw_obj_dyntlv ipfw_obj_dyntlv
struct _ipfw_insn_icmp6 ipfw_insn_icmp6
struct _ipfw_table ipfw_table
struct _ipfw_insn ipfw_insn
struct _ipfw_ta_info ipfw_ta_info
struct _ipfw_insn_u16 ipfw_insn_u16
struct _ipfw_range_header ipfw_range_header
struct _ipfw_obj_tlv ipfw_obj_tlv
struct _ipfw_insn_if ipfw_insn_if
struct _ipfw_range_tlv ipfw_range_tlv
struct _ipfw_iface_info ipfw_iface_info
struct _ipfw_obj_data ipfw_obj_data
struct _ipfw_insn_u32 ipfw_insn_u32
struct _ipfw_insn_log ipfw_insn_log
struct _ipfw_insn_altq ipfw_insn_altq
struct _ipfw_ta_tinfo ipfw_ta_tinfo
struct _ipfw_insn_ip ipfw_insn_ip
struct _ipfw_insn_limit ipfw_insn_limit
struct _ipfw_insn_sa ipfw_insn_sa
struct _ip_fw3_opheader ip_fw3_opheader
struct _ipfw_table_value ipfw_table_value
struct _ipfw_insn_ip6 ipfw_insn_ip6
union _ipfw_insn_if::@14 p
_Alignas(_Alignof(u_int32_t)) u_int8_t opcode
union _ipfw_obj_tentry::@20 v
union _ipfw_obj_tentry::@19 k
union _ipfw_table_xentry::@15 k
ipfw_table_xentry xent[0]
struct tflow_entry::@16::@17 a4
struct tflow_entry::@16::@18 a6