Lines Matching +full:tlv +full:- +full:layout
1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
4 * Copyright (c) 2002-2009 Luigi Rizzo, Universita` di Pisa
51 * Most commands (queue, pipe, tag, untag, limit...) can have a 16-bit
56 * the use of a 16-bit fields for that value. In reality, we can have
75 uint16_t reserved[2]; /* Align to 64-bit boundary */
153 * such structures contain pointers or other 64-bit entities,
155 * 64-bit architectures, so the must be handled with care.
338 * a single 16-bit value (arg1), or a couple of 8-bit values.
343 * The size of the instruction (in 32-bit words) is in the low
363 u_int8_t len; /* number of 32-bit words */
367 #define F_LEN(cmd) ((cmd)->len & F_LEN_MASK)
373 * The F_INSN_SIZE(type) computes the size, in 4-byte words, of
379 * This is used to store an array of 16-bit entries (ports etc.)
387 * This is used to store an array of 32-bit entries
396 * This is used to store IP addr-mask pairs.
421 * This is used for MAC addr-mask pairs.
470 u_int32_t max_log; /* how many do we log -- 0 = all */
584 (addr)->__u6_addr.__u6_addr32[0] &= (mask)->__u6_addr.__u6_addr32[0]; \
585 (addr)->__u6_addr.__u6_addr32[1] &= (mask)->__u6_addr.__u6_addr32[1]; \
586 (addr)->__u6_addr.__u6_addr32[2] &= (mask)->__u6_addr.__u6_addr32[2]; \
587 (addr)->__u6_addr.__u6_addr32[3] &= (mask)->__u6_addr.__u6_addr32[3]; \
610 * Layout:
612 * [ counter block, size = rule->cntr_len ]
613 * [ one or more instructions, size = rule->cmd_len * 4 ]
616 * Counter block may be next (if rule->cntr_len > 0),
618 * accesses as an array of 32-bit values. rule->cmd_len represents
624 * + if a rule has a "keep-state" (or "limit") option, then the
625 * first instruction (at r->cmd) MUST BE an O_PROBE_STATE
632 * All structures (excluding instructions) are u64-aligned.
637 uint16_t act_ofs; /* offset of action in 32-bit units */
638 uint16_t cmd_len; /* # of 32-bit words in cmd */
671 uint16_t act_ofs; /* offset of action in 32-bit units */
672 uint16_t cmd_len; /* # of 32-bit words in cmd */
688 (ipfw_insn *)( (u_int32_t *)((rule)->cmd) + ((rule)->act_ofs) )
690 #define RULESIZE(rule) (sizeof(*(rule)) + (rule)->cmd_len * 4 - 4)
707 uint8_t _flags; /* protocol-specific flags */
716 #define IS_IP4_FLOW_ID(id) ((id)->addr_type == 4)
717 #define IS_IP6_FLOW_ID(id) ((id)->addr_type == 6)
815 /* Longest field needs to be aligned by 4-byte boundary */
839 uint16_t type; /* TLV type */
840 uint16_t flags; /* TLV-specific flags */
865 /* Object name TLV */
867 ipfw_obj_tlv head; /* TLV header */
872 char name[64]; /* Null-terminated name */
894 /* 64-byte structure representing multi-field table value */
911 uint32_t refcnt; /* XXX 64-bit in kernel */
914 /* Table entry TLV */
916 ipfw_obj_tlv head; /* TLV header */
924 /* Longest field needs to be aligned by 8-byte boundary */
938 /* Container TLV */
958 ipfw_obj_tlv head; /* TLV header */
959 uint32_t count; /* Number of sub-TLVs */
961 uint8_t version; /* TLV version */
962 uint8_t flags; /* TLV-specific flags */
965 /* Range TLV */
967 ipfw_obj_tlv head; /* TLV header */
978 /* User-settable flags */
1025 /* Table type-specific flags */
1060 ipfw_obj_ntlv ntlv; /* object name tlv */