#include <vlib/unix/unix.h>
#include <vnet/ip/ip.h>
#include <vnet/ethernet/ethernet.h>
+#include <vnet/devices/devices.h>
#include <vnet/feature/feature.h>
#include <vnet/devices/af_packet/af_packet.h>
#undef _
};
-enum
-{
- AF_PACKET_INPUT_NEXT_DROP,
- AF_PACKET_INPUT_NEXT_ETHERNET_INPUT,
- AF_PACKET_INPUT_N_NEXT,
-};
-
typedef struct
{
u32 next_index;
af_packet_main_t *apm = &af_packet_main;
af_packet_if_t *apif = pool_elt_at_index (apm->interfaces, device_idx);
struct tpacket2_hdr *tph;
- u32 next_index = AF_PACKET_INPUT_NEXT_ETHERNET_INPUT;
+ u32 next_index = VNET_DEVICE_INPUT_NEXT_ETHERNET_INPUT;
u32 block = 0;
u32 rx_frame;
u32 n_free_bufs;
.n_errors = AF_PACKET_INPUT_N_ERROR,
.error_strings = af_packet_input_error_strings,
- .n_next_nodes = AF_PACKET_INPUT_N_NEXT,
- .next_nodes = {
- [AF_PACKET_INPUT_NEXT_DROP] = "error-drop",
- [AF_PACKET_INPUT_NEXT_ETHERNET_INPUT] = "ethernet-input",
- },
+ .n_next_nodes = VNET_DEVICE_INPUT_N_NEXT_NODES,
+ .next_nodes = VNET_DEVICE_INPUT_NEXT_NODES,
};
VLIB_NODE_FUNCTION_MULTIARCH (af_packet_input_node, af_packet_input_fn)