18 #ifndef included_ipip_h 19 #define included_ipip_h 29 #define foreach_ipip_error \ 31 _(DECAP_PKTS, "packets decapsulated") \ 32 _(BAD_PROTOCOL, "bad protocol") \ 33 _(NO_TUNNEL, "no tunnel") \ 34 _(FRAGMENTED_PACKET, "fragmented outer packet") 38 #define _(sym, str) IPIP_ERROR_##sym, 70 #define forech_ipip_tunnel_flag \ 71 _(NONE, "none", 0x0) \ 72 _(ENCAP_COPY_DF, "encap-copy-df", 0x1) \ 73 _(ENCAP_SET_DF, "encap-set-df", 0x2) \ 74 _(ENCAP_COPY_DSCP, "encap-copy-dscp", 0x4) \ 75 _(ENCAP_COPY_ECN, "encap-copy-ecn", 0x8) \ 76 _(DECAP_COPY_ECN, "decap-copy-ecn", 0x10) 80 #define _(a,b,c) IPIP_TUNNEL_FLAG_##a = c, 85 #define IPIP_TUNNEL_FLAG_MASK (0x1f) 155 dal = clib_net_to_host_u64 (dal);
161 clib_net_to_host_u32 (t->
sixrd.
164 return clib_host_to_net_u32 (ip4);
168 ip46_address_t * src, ip46_address_t * dst,
169 u32 fib_index, ipip_tunnel_flags_t flags,
175 u32 ip4_fib_index,
u32 ip6_fib_index,
int sixrd_add_tunnel(ip6_address_t *ip6_prefix, u8 ip6_prefix_len, ip4_address_t *ip4_prefix, u8 ip4_prefix_len, ip4_address_t *ip4_src, bool security_check, u32 ip4_fib_index, u32 ip6_fib_index, u32 *sw_if_index)
#define CLIB_CACHE_LINE_ALIGN_MARK(mark)
A representation of a IPIP tunnel.
ip46_address_t tunnel_src
u8 * format_ipip_tunnel_flags(u8 *s, va_list *args)
vnet_hw_interface_class_t ipip_hw_interface_class
ipip_tunnel_flags_t flags
bool ip4_protocol_registered
int ipip_add_tunnel(ipip_transport_t transport, u32 instance, ip46_address_t *src, ip46_address_t *dst, u32 fib_index, ipip_tunnel_flags_t flags, ip_dscp_t dscp, u32 *sw_if_indexp)
static_always_inline u32 sixrd_get_addr_net(const ipip_tunnel_t *t, u64 dal)
#define static_always_inline
ipip_tunnel_t * ipip_tunnel_db_find_by_sw_if_index(u32 sw_if_index)
u32 * tunnel_index_by_sw_if_index
ipip_transport_t transport
#define foreach_ipip_error
ipip_tunnel_t * ipip_tunnel_db_find(ipip_tunnel_key_t *key)
int sixrd_del_tunnel(u32 sw_if_index)
ipip_transport_t
IPIP Tunnel key.
vlib_node_registration_t ipip4_input_node
(constructor) VLIB_REGISTER_NODE (ipip4_input_node)
ipip_transport_t transport
enum ip_dscp_t_ ip_dscp_t
enum ipip_tunnel_flags_t_ ipip_tunnel_flags_t
struct _vlib_node_registration vlib_node_registration_t
vlib_node_registration_t ipip6_input_node
(constructor) VLIB_REGISTER_NODE (ipip6_input_node)
#define forech_ipip_tunnel_flag
Keep these idenitical to those in ipip.api.
int ipip_del_tunnel(u32 sw_if_index)
struct _vnet_hw_interface_class vnet_hw_interface_class_t
bool ip6_protocol_registered
void ipip_tunnel_db_add(ipip_tunnel_t *t, ipip_tunnel_key_t *key)
struct ipip_tunnel_t::@338 sixrd
ip46_address_t tunnel_dst
void ipip_tunnel_db_remove(ipip_tunnel_t *t)