17 #include <pcap/pcap.h> 39 static void*
run(
void* p_this);
47 pcap_layer(
const std::string& p_type,
const std::string& param);
Forward declaration of TITAN class.
Definition: pcap_layer.hh:28
std::thread * _thread
PCAP instance handle.
Definition: pcap_layer.hh:32
int _fd[2]
Definition: pcap_layer.hh:37
Params _params
Definition: pcap_layer.hh:29
Forward declaration of TITAN class.
Definition: layer.hh:29
static void * run(void *p_this)
Definition: pcap_layer.cc:158
Header file for the parameter dictionary.
virtual void send_data(OCTETSTRING &data, Params ¶ms)
Send bytes formated data to the lower layers.
Definition: pcap_layer.cc:196
pcap_t * _device
Layer parameters.
Definition: pcap_layer.hh:30
virtual ~pcap_layer()
Default destructor.
Definition: pcap_layer.cc:137
virtual void receive_data(OCTETSTRING &data, Params &info)
Receive bytes formated data from the lower layers.
Definition: pcap_layer.cc:217
std::mutex _resume
Set to true when the thread is running, used in file mode.
Definition: pcap_layer.hh:34
This class provides basic functionalities for an ITS dictionary.
Definition: Params.hh:21
pcap_layer(const std::string &p_type, const std::string ¶m)
Specialised constructor Create a new instance of the pcap_layer class.
Definition: pcap_layer.cc:15
bool _running
Thread handle, used to read PCAP file instead of NIC, used in file mode.
Definition: pcap_layer.hh:33
std::string _time_key
Write file handle to save sent packet, used in file mode.
Definition: pcap_layer.hh:36
void Handle_Fd_Event_Readable(int fd)
Definition: pcap_layer.cc:225
int _pcap_h
Device handle.
Definition: pcap_layer.hh:31
Header file for ITS abstract protocol layer definition.
pcap_dumper_t * _sent_file
Definition: pcap_layer.hh:35