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") 37 #define _(sym, str) IPIP_ERROR_##sym, 134 if (t->
sixrd.ip4_prefix_len == 32)
135 return (t->
sixrd.ip4_prefix.as_u32);
137 dal = clib_net_to_host_u64 (dal);
141 u32 mask = ~(~0ULL << (32 - t->
sixrd.ip4_prefix_len));
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,
151 u32 fib_index,
u32 * sw_if_indexp);
156 u32 fib_index,
u32 * sw_if_index);
#define CLIB_CACHE_LINE_ALIGN_MARK(mark)
A representation of a IPIP tunnel.
ip46_address_t tunnel_src
vnet_hw_interface_class_t ipip_hw_interface_class
bool ip4_protocol_registered
fib_node_index_t fib_entry_index
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_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 fib_index, u32 *sw_if_index)
int sixrd_del_tunnel(u32 sw_if_index)
int ipip_add_tunnel(ipip_transport_t transport, u32 instance, ip46_address_t *src, ip46_address_t *dst, u32 fib_index, u32 *sw_if_indexp)
An node in the FIB graph.
ipip_transport_t
IPIP Tunnel key.
vlib_node_registration_t ipip4_input_node
(constructor) VLIB_REGISTER_NODE (ipip4_input_node)
u32 fib_node_index_t
A typedef of a node index.
struct ipip_tunnel_t::@225::@228 sixrd
fib_node_type_t fib_node_type
ipip_transport_t transport
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_tunnel_db_add(ipip_tunnel_t *t, ipip_tunnel_key_t *key)
enum fib_node_type_t_ fib_node_type_t
The types of nodes in a FIB graph.
ip46_address_t tunnel_dst
void ipip_tunnel_db_remove(ipip_tunnel_t *t)