#include <vnet/vnet.h>
#include <vnet/ethernet/packet.h>
#include <vnet/pg/pg.h>
-#include <vnet/ip/ip_feature_registration.h>
+#include <vnet/feature/feature.h>
always_inline u64
ethernet_mac_address_u64 (u8 * a)
/* debug: make sure we don't wipe out an ethernet registration by mistake */
u8 next_by_ethertype_register_called;
- /** per-interface features */
- ip_config_main_t feature_config_mains[VNET_N_IP_FEAT];
-
- /** Feature path configuration lists */
- vnet_ip_feature_registration_t *next_feature[VNET_N_IP_FEAT];
-
- /** Save results for show command */
- char **feature_nodes[VNET_N_IP_FEAT];
-
- /** feature node indicies */
- u32 ethernet_tx_feature_drop;
+ /* Feature arc index */
+ u8 output_feature_arc_index;
} ethernet_main_t;
ethernet_main_t ethernet_main;
-#define VNET_ETHERNET_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) \
-{ \
- ethernet_main_t * im = ðernet_main; \
- tx_##x.next = im->next_feature[VNET_IP_TX_FEAT]; \
- im->next_feature[VNET_IP_TX_FEAT] = &tx_##x; \
-} \
-__VA_ARGS__ vnet_ip_feature_registration_t tx_##x
-
-
always_inline ethernet_type_info_t *
ethernet_get_type_info (ethernet_main_t * em, ethernet_type_t type)
{
void ethernet_arp_change_mac (vnet_main_t * vnm, u32 sw_if_index);
+void arp_update_adjacency (vnet_main_t * vnm, u32 sw_if_index, u32 ai);
+
+void ethernet_update_adjacency (vnet_main_t * vnm, u32 sw_if_index, u32 ai);
+u8 *ethernet_build_rewrite (vnet_main_t * vnm,
+ u32 sw_if_index,
+ vnet_link_t link_type, const void *dst_address);
+
extern vlib_node_registration_t ethernet_input_node;
#endif /* included_ethernet_h */