devices: add support for l3 af_packet interface
[vpp.git] / src / vnet / devices / af_packet / af_packet.h
index 3163aa0..652e173 100644 (file)
  */
 
 #include <vppinfra/lock.h>
-
 #include <vlib/log.h>
 
+typedef enum
+{
+  AF_PACKET_IF_MODE_ETHERNET = 1,
+  AF_PACKET_IF_MODE_IP = 2
+} af_packet_if_mode_t;
+
 typedef struct
 {
   u32 sw_if_index;
@@ -49,6 +54,7 @@ typedef struct
   u8 is_admin_up;
   u32 queue_index;
   u32 host_mtu;
+  af_packet_if_mode_t mode;
 } af_packet_if_t;
 
 typedef struct
@@ -77,6 +83,7 @@ typedef struct
   u32 tx_frame_size;
   u32 rx_frames_per_block;
   u32 tx_frames_per_block;
+  af_packet_if_mode_t mode;
 
   /* return */
   u32 sw_if_index;