Go to the documentation of this file.
35 #include <pcap/pcap.h>
85 bool connect(
const char* device);
121 #endif // PCAP_READER_H
std::vector< uint8_t > buffer_t
PcapDevice(ROSaicNodeBase *node, buffer_t &buffer)
Constructor for PcapDevice.
@ READ_PARSE_FAILED
Unable to parse data, parsing error.
void disconnect()
Close connected file.
bool isConnected() const
Check if file is open and healthy.
This class is the base class for abstraction.
~PcapDevice()
Destructor for PcapDevice.
ReadResult
Read operation status.
@ READ_SUCCESS
Data read successfully.
ReadResult read()
Attempt to read a packet and store data to buffer.
buffer_t & m_dataBuff
Reference to raw data buffer to write to.
ROSaicNodeBase * node_
Pointer to the node.
pcap_t * m_device
File handle to pcap file.
bool connect(const char *device)
Try to open a pcap file.
Class for handling a pcap file.
static const size_t BUFFSIZE