#define included_ip_ip6_h
#include <vlib/mc.h>
+#include <vlib/buffer.h>
+#include <vnet/ethernet/packet.h>
#include <vnet/ip/ip6_packet.h>
#include <vnet/ip/ip6_hop_by_hop_packet.h>
#include <vnet/ip/lookup.h>
/* feature path configuration lists */
vnet_ip_feature_registration_t * next_uc_feature;
vnet_ip_feature_registration_t * next_mc_feature;
+ vnet_ip_feature_registration_t * next_tx_feature;
/* Built-in unicast feature path indices, see ip_feature_init_cast(...) */
u32 ip6_unicast_rx_feature_check_access;
+ u32 ip6_unicast_rx_feature_policer_classify;
u32 ip6_unicast_rx_feature_ipsec;
u32 ip6_unicast_rx_feature_l2tp_decap;
u32 ip6_unicast_rx_feature_vpath;
/* Built-in multicast feature path indices */
u32 ip6_multicast_rx_feature_vpath;
u32 ip6_multicast_rx_feature_lookup;
+
+ /* Built-in tx feature path index */
+ u32 ip6_tx_feature_interface_output;
/* Save results for show command */
- char ** feature_nodes[VNET_N_CAST];
+ char ** feature_nodes[VNET_N_IP_FEAT];
/* Seed for Jenkins hash used to compute ip6 flow hash. */
u32 flow_hash_seed;
} \
__VA_ARGS__ vnet_ip_feature_registration_t mc_##x
+#define VNET_IP6_TX_FEATURE_INIT(x,...) \
+ __VA_ARGS__ vnet_ip_feature_registration_t tx_##x; \
+static void __vnet_add_feature_registration_tx_##x (void) \
+ __attribute__((__constructor__)) ; \
+static void __vnet_add_feature_registration_tx_##x (void) \
+{ \
+ ip6_main_t * im = &ip6_main; \
+ tx_##x.next = im->next_tx_feature; \
+ im->next_tx_feature = &tx_##x; \
+} \
+__VA_ARGS__ vnet_ip_feature_registration_t tx_##x
+
+
/* Global ip6 input node. Errors get attached to ip6 input node. */
extern vlib_node_registration_t ip6_input_node;
extern vlib_node_registration_t ip6_rewrite_node;
u32 next_hop_sw_if_index,
u32 next_hop_weight, u32 adj_index,
u32 explicit_fib_index);
+
+u32
+ip6_route_get_next_hop_adj (ip6_main_t * im,
+ u32 fib_index,
+ ip6_address_t *next_hop,
+ u32 next_hop_sw_if_index,
+ u32 explicit_fib_index);
+
u32
ip6_get_route (ip6_main_t * im,
u32 fib_index_or_table_id,
int
ip6_neighbor_ra_config(vlib_main_t * vm, u32 sw_if_index,
- u8 surpress, u8 managed, u8 other,
+ u8 suppress, u8 managed, u8 other,
u8 ll_option, u8 send_unicast, u8 cease,
u8 use_lifetime, u32 lifetime,
u32 initial_count, u32 initial_interval,
uword type_opaque,
uword data);
+int vnet_add_del_ip6_nd_change_event (vnet_main_t * vnm,
+ void * data_callback,
+ u32 pid,
+ void * address_arg,
+ uword node_index,
+ uword type_opaque,
+ uword data,
+ int is_add);
+
+int vnet_ip6_nd_term (vlib_main_t * vm,
+ vlib_node_runtime_t * node,
+ vlib_buffer_t * p0,
+ ethernet_header_t * eth,
+ ip6_header_t * ip,
+ u32 sw_if_index,
+ u16 bd_index,
+ u8 shg);
+
int vnet_set_ip6_classify_intfc (vlib_main_t * vm, u32 sw_if_index,
u32 table_index);
extern vlib_node_registration_t ip6_lookup_node;
/* Array of function pointers to HBH option handling routines */
int (*options[256])(vlib_buffer_t *b, ip6_header_t *ip, ip6_hop_by_hop_option_t *opt);
u8 *(*trace[256])(u8 *s, ip6_hop_by_hop_option_t *opt);
+ uword next_override;
} ip6_hop_by_hop_main_t;
extern ip6_hop_by_hop_main_t ip6_hop_by_hop_main;
int options(vlib_buffer_t *b, ip6_header_t *ip, ip6_hop_by_hop_option_t *opt),
u8 *trace(u8 *s, ip6_hop_by_hop_option_t *opt));
int ip6_hbh_unregister_option (u8 option);
+void ip6_hbh_set_next_override (uword next);
/* Flag used by IOAM code. Classifier sets it pop-hop-by-hop checks it */
#define OI_DECAP 100