52 #define foreach_sixrd_error \ 54 _(NONE, "valid SIXRD packets") \ 55 _(BAD_PROTOCOL, "bad protocol") \ 56 _(WRONG_ICMP_TYPE, "wrong icmp type") \ 57 _(SEC_CHECK, "security check failed") \ 58 _(ICMP, "unable to translate ICMP") \ 59 _(UNKNOWN, "unknown") \ 60 _(NO_DOMAIN, "no domain") \ 61 _(ENCAPSULATED, "encapsulated") \ 62 _(DECAPSULATED, "decapsulated") \ 63 _(TRANSLATED_4TO6, "translated 4 to 6") \ 64 _(TRANSLATED_6TO4, "translated 6 to 4") \ 65 _(FRAGMENT, "fragment handling error") \ 66 _(FRAGMENT_QUEUED, "dropped, missing first fragment") \ 67 _(FRAGMENTED, "packets requiring fragmentation") \ 68 _(FRAGMENT_PARTS, "fragment parts") \ 69 _(MALFORMED, "malformed packet") 72 #define _(sym,str) SIXRD_ERROR_##sym, 121 u32 *sixrd_domain_index,
u8 *error)
128 if (*sixrd_domain_index != ~0)
139 *error = SIXRD_ERROR_NO_DOMAIN;
static_always_inline sixrd_domain_t * ip6_sixrd_get_domain(u32 sdi, u32 *sixrd_domain_index)
static_always_inline sixrd_domain_t * ip4_sixrd_get_domain(u32 sdi, ip6_address_t *addr, u32 *sixrd_domain_index, u8 *error)
dpo_type_t sixrd_dpo_type
The register SIXRD DPO type.
static u32 ip6_fib_table_fwding_lookup(ip6_main_t *im, u32 fib_index, const ip6_address_t *dst)
static_always_inline u32 sixrd_get_addr(sixrd_domain_t *d, u64 dal)
u32 sd_domain
the SIXRD domain index
#define static_always_inline
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
dpo_type_t dpoi_type
the type
#define foreach_sixrd_error
static sixrd_dpo_t * sixrd_dpo_get(index_t index)
const dpo_id_t * load_balance_get_bucket(index_t lbi, u32 bucket)
int sixrd_delete_domain(u32 sixrd_domain_index)
index_t dpoi_index
the index of objects of that type
u8 * format_sixrd_trace(u8 *s, va_list *args)
A representation of a 6RD DPO.
int sixrd_create_domain(ip6_address_t *ip6_prefix, u8 ip6_prefix_len, ip4_address_t *ip4_prefix, u8 ip4_prefix_len, ip4_address_t *ip4_src, u32 *sixrd_domain_index, u16 mtu)