1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-23 02:35:57 +01:00

Added BaseSniffer::set_extract_raw_pdus.

This commit is contained in:
Matias Fontanini
2014-07-30 23:01:03 -03:00
parent 3bb310dd6b
commit 3ef85aae38
2 changed files with 26 additions and 2 deletions

View File

@@ -200,6 +200,22 @@ namespace Tins {
*/
void set_timeout(int ms);
/**
* \brief Sets whether to extract RawPDUs or fully parsed packets.
*
* By default, packets will be parsed starting from link layer.
* However, if you're parsing a lot of traffic, then you might
* want to extract packets and push them into a queue,
* so a consumer can parse them when they're popped.
*
* This method allows doing that. If the parameter is true,
* then packets taken from this BaseSniffer will only contain
* a RawPDU which will have to entire contents of the packet.
*
* \param value Whether to extract RawPDUs or not.
*/
void set_extract_raw_pdus(bool value);
/**
* \brief Retrieves this sniffer's link type.
*
@@ -239,6 +255,7 @@ namespace Tins {
pcap_t *handle;
bpf_u_int32 mask;
bool extract_raw;
};
/**