[PACKET_IO] finish pcap live mode
This commit is contained in:
@@ -51,12 +51,13 @@ struct packet_io_config {
|
||||
/* delete after the pcap file is read */
|
||||
bool should_delete;
|
||||
|
||||
/* loop read pcap file in directory */
|
||||
bool should_loop;
|
||||
|
||||
time_t delay;
|
||||
|
||||
time_t poll_interval;
|
||||
/* snapshot length */
|
||||
int snaplen;
|
||||
|
||||
/* promiscuous value */
|
||||
int promisc;
|
||||
};
|
||||
|
||||
struct lib_config {
|
||||
|
||||
@@ -12,6 +12,14 @@
|
||||
|
||||
#include "../../sdk/include/packet.h"
|
||||
|
||||
#define PKT_QUEUE_MAX_NUM 256
|
||||
|
||||
#define SET_PKT_LEN(p, len) do { \
|
||||
(p)->pkt_len = (len); \
|
||||
} while(0)
|
||||
|
||||
#define GET_PKT_DIRECT_DATA(p) (uint8_t *)((p) + 1)
|
||||
|
||||
struct packet_queue {
|
||||
struct packet *top;
|
||||
struct packet *bot;
|
||||
|
||||
Reference in New Issue
Block a user