25 #define _(a, b, c) TUNNEL_ENCAP_DECAP_FLAG_##a | 30 #define _(a, b, c) TUNNEL_FLAG_##a | 42 #define _(n, v) case TUNNEL_MODE_##n: \ 43 s = format (s, "%s", v); \ 71 if (f == TUNNEL_ENCAP_DECAP_FLAG_NONE)
75 else if (f & TUNNEL_ENCAP_DECAP_FLAG_##a) s = format (s, "%s ", b); 86 #define _(a,b,c) if (unformat(input, b)) {\ 87 *f |= TUNNEL_ENCAP_DECAP_FLAG_##a;\ 103 #define _(a, b, c) else if (f & TUNNEL_FLAG_##a) s = format (s, "%s ", c); 114 if (unformat (input, c)) \ 116 *f |= TUNNEL_FLAG_##a; \ 144 dst->
t_flags &= ~TUNNEL_FLAG_RESOLVED;
153 u32 indent = va_arg (*args,
u32);
155 s =
format (s,
"%Utable-ID:%d [%U->%U] hop-limit:%d %U %U [%U] [%U]",
161 if (t->
t_flags & TUNNEL_FLAG_RESOLVED)
198 return VNET_API_ERROR_NO_SUCH_FIB;
203 t->
t_flags |= TUNNEL_FLAG_RESOLVED;
211 if (t->
t_flags & TUNNEL_FLAG_RESOLVED)
214 t->
t_flags &= ~TUNNEL_FLAG_RESOLVED;
233 clib_host_to_net_u32 (0x60000000);
unformat_function_t unformat_ip_dscp
fib_protocol_t fp_proto
protocol type
fib_node_index_t fib_entry_track(u32 fib_index, const fib_prefix_t *prefix, fib_node_type_t child_type, index_t child_index, u32 *sibling)
Trackers are used on FIB entries by objects that which to track the changing state of the entry...
u32 t_fib_index
derived data
u8 * format_tunnel(u8 *s, va_list *args)
uword unformat_tunnel_encap_decap_flags(unformat_input_t *input, va_list *args)
u8 * format_tunnel_flags(u8 *s, va_list *args)
void fib_entry_contribute_forwarding(fib_node_index_t fib_entry_index, fib_forward_chain_type_t fct, dpo_id_t *dpo)
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
A representation of an IP tunnel config.
uword unformat_tunnel_mode(unformat_input_t *input, va_list *args)
void tunnel_build_v4_hdr(const tunnel_t *t, ip_protocol_t next_proto, ip4_header_t *ip)
uword unformat_tunnel(unformat_input_t *input, va_list *args)
uword unformat_tunnel_flags(unformat_input_t *input, va_list *args)
#define ip_addr_version(_a)
description fragment has unexpected format
Aggregate type for a prefix.
void ip_address_to_fib_prefix(const ip_address_t *addr, fib_prefix_t *prefix)
convert from a IP address to a FIB prefix
u32 fib_table_find(fib_protocol_t proto, u32 table_id)
Get the index of the FIB for a Table-ID.
u8 * format_ip_dscp(u8 *s, va_list *va)
enum tunnel_flags_t_ tunnel_flags_t
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
enum ip_protocol ip_protocol_t
void tunnel_build_v6_hdr(const tunnel_t *t, ip_protocol_t next_proto, ip6_header_t *ip)
const u8 TUNNEL_ENCAP_DECAP_FLAG_MASK
uword unformat_ip_address(unformat_input_t *input, va_list *args)
#define IP_FLOW_HASH_DEFAULT
Default: 5-tuple + flowlabel without the "reverse" bit.
enum tunnel_encap_decap_flags_t_ tunnel_encap_decap_flags_t
vl_api_tunnel_mode_t mode
static_always_inline void ip6_set_dscp_network_order(ip6_header_t *ip6, ip_dscp_t dscp)
u8 * format_ip_address(u8 *s, va_list *args)
tunnel_encap_decap_flags_t t_encap_decap_flags
fib_protocol_t ip_address_family_to_fib_proto(ip_address_family_t af)
void fib_entry_untrack(fib_node_index_t fei, u32 sibling)
Stop tracking a FIB entry.
enum fib_forward_chain_type_t_ fib_forward_chain_type_t
FIB output chain type.
void tunnel_unresolve(tunnel_t *t)
int tunnel_resolve(tunnel_t *t, fib_node_type_t child_type, index_t child_index)
enum ip_address_family_t_ ip_address_family_t
static u32 ip6_compute_flow_hash(const ip6_header_t *ip, flow_hash_config_t flow_hash_config)
#define FIB_NODE_INDEX_INVALID
fib_node_index_t t_fib_entry_index
static void ip6_address_copy(ip6_address_t *dst, const ip6_address_t *src)
void tunnel_contribute_forwarding(const tunnel_t *t, dpo_id_t *dpo)
enum fib_node_type_t_ fib_node_type_t
The types of nodes in a FIB graph.
void ip_address_copy(ip_address_t *dst, const ip_address_t *src)
u8 * format_tunnel_mode(u8 *s, va_list *args)
u8 * format_tunnel_encap_decap_flags(u8 *s, va_list *args)
void tunnel_copy(const tunnel_t *src, tunnel_t *dst)
enum tunnel_mode_t_ tunnel_mode_t
static_always_inline void ip6_set_flow_label_network_order(ip6_header_t *ip6, u32 flow_label)
static u16 ip4_header_checksum(ip4_header_t *i)
const u8 TUNNEL_FLAG_MASK
ip_address_family_t tunnel_get_af(const tunnel_t *t)
fib_forward_chain_type_t fib_forw_chain_type_from_fib_proto(fib_protocol_t proto)
Convert from a fib-protocol to a chain type.