Support for reading Wireshark files

Detection of Wireshark files implemented

Guard statements for build on Linux

pcaplite added

Wireshark support works on Windows

pcap support on Lunux fixed

Build warning fixed

Update pcaplite.cpp

Cleanup

Removed extra define
This commit is contained in:
Chavdar Kirov
2022-01-29 17:44:07 +02:00
committed by tcfx44
parent c4a9f99445
commit 8b0d5bd023
5 changed files with 348 additions and 2 deletions
+32
View File
@@ -0,0 +1,32 @@
#ifndef PCAPLITE_H
#define PCAPLITE_H
#include <stdio.h>
#if defined(unix)
#include <sys/time.h>
#else
#include <winsock.h>
#endif
#define PCAP_ERRBUF_SIZE 256
struct pcap_pkthdr {
struct timeval ts; /* time stamp */
unsigned int caplen; /* length of portion present */
unsigned int len; /* length of this packet (off wire) */
};
struct pcap {
FILE *file;
bool is_ng;
};
typedef struct pcap pcap_t;
pcap *pcap_open_offline(const char *, char *);
const unsigned char *pcap_next(pcap_t *, struct pcap_pkthdr *);
void pcap_close(pcap_t *);
#endif// PCAPLITE_H