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, 51 } __clib_packed ipip_transport_t;
58 } __clib_packed ipip_mode_t;
65 ipip_transport_t transport;
68 } __clib_packed ipip_tunnel_key_t;
137 dal = clib_net_to_host_u64 (dal);
143 clib_net_to_host_u32 (t->
sixrd.
146 return clib_host_to_net_u32 (ip4);
150 ip46_address_t *
src, ip46_address_t *
dst,
157 u32 ip4_fib_index,
u32 ip6_fib_index,
167 const ip46_address_t *
src,
168 const ip46_address_t *
dst,
169 u32 fib_index, ipip_tunnel_key_t *
key);
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)
vl_api_wireguard_peer_flags_t flags
A representation of a IPIP tunnel.
ip46_address_t tunnel_src
vnet_hw_interface_class_t ipip_hw_interface_class
ipip_tunnel_t * ipip_tunnel_db_find(const ipip_tunnel_key_t *key)
bool ip4_protocol_registered
static_always_inline u32 sixrd_get_addr_net(const ipip_tunnel_t *t, u64 dal)
struct ipip_tunnel_t::@408 sixrd
void ipip_mk_key(const ipip_tunnel_t *t, ipip_tunnel_key_t *key)
manual_print typedef ip6_prefix
#define static_always_inline
void ipip_tunnel_db_add(ipip_tunnel_t *t, const ipip_tunnel_key_t *key)
ipip_tunnel_t * ipip_tunnel_db_find_by_sw_if_index(u32 sw_if_index)
u32 * tunnel_index_by_sw_if_index
#define foreach_ipip_error
tunnel_encap_decap_flags_t flags
int ipip_add_tunnel(ipip_transport_t transport, u32 instance, ip46_address_t *src, ip46_address_t *dst, u32 fib_index, tunnel_encap_decap_flags_t flags, ip_dscp_t dscp, tunnel_mode_t mode, u32 *sw_if_indexp)
int sixrd_del_tunnel(u32 sw_if_index)
enum tunnel_encap_decap_flags_t_ tunnel_encap_decap_flags_t
vl_api_tunnel_mode_t mode
vlib_node_registration_t ipip4_input_node
(constructor) VLIB_REGISTER_NODE (ipip4_input_node)
ipip_transport_t transport
void ipip_tunnel_db_remove(ipip_tunnel_t *t, const ipip_tunnel_key_t *key)
enum ip_dscp_t_ ip_dscp_t
struct _vlib_node_registration vlib_node_registration_t
vlib_node_registration_t ipip6_input_node
(constructor) VLIB_REGISTER_NODE (ipip6_input_node)
int ipip_del_tunnel(u32 sw_if_index)
struct _vnet_hw_interface_class vnet_hw_interface_class_t
bool ip6_protocol_registered
void ipip_mk_key_i(ipip_transport_t transport, ipip_mode_t mode, const ip46_address_t *src, const ip46_address_t *dst, u32 fib_index, ipip_tunnel_key_t *key)
ip46_address_t tunnel_dst
enum tunnel_mode_t_ tunnel_mode_t
vl_api_interface_index_t sw_if_index
STATIC_ASSERT_SIZEOF(ipip_tunnel_key_t, 5 *sizeof(u64))