aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/af_packet/af_packet.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/devices/af_packet/af_packet.h')
-rw-r--r--src/vnet/devices/af_packet/af_packet.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/vnet/devices/af_packet/af_packet.h b/src/vnet/devices/af_packet/af_packet.h
index d7d16b91c8c..ed3f10bb092 100644
--- a/src/vnet/devices/af_packet/af_packet.h
+++ b/src/vnet/devices/af_packet/af_packet.h
@@ -17,9 +17,15 @@
*------------------------------------------------------------------
*/
+#include <linux/if_packet.h>
+
#include <vppinfra/lock.h>
#include <vlib/log.h>
+typedef struct tpacket_block_desc block_desc_t;
+typedef struct tpacket_req3 tpacket_req3_t;
+typedef struct tpacket3_hdr tpacket3_hdr_t;
+
typedef enum
{
AF_PACKET_IF_MODE_ETHERNET = 1,
@@ -39,15 +45,16 @@ typedef struct
u8 *host_if_name;
int host_if_index;
int fd;
- struct tpacket_req *rx_req;
- struct tpacket_req *tx_req;
- u8 *rx_ring;
- u8 *tx_ring;
+ tpacket_req3_t *rx_req;
+ tpacket_req3_t *tx_req;
+ u8 **rx_ring;
+ u8 **tx_ring;
+ u32 hdrlen;
u32 hw_if_index;
u32 sw_if_index;
u32 clib_file_index;
- u32 next_rx_frame;
+ u32 next_rx_block;
u32 next_tx_frame;
u32 per_interface_next_index;