mirror of
https://github.com/mfontanini/libtins
synced 2026-01-23 02:35:57 +01:00
Merge pull request #114 from jllorente/master
Added pcap_setdirection to sniffer
This commit is contained in:
@@ -212,6 +212,14 @@ namespace Tins {
|
||||
*/
|
||||
void set_timeout(int ms);
|
||||
|
||||
/**
|
||||
* \brief Sets direction for the sniffer.
|
||||
*
|
||||
* This calls pcap_setdirection using the provided parameter.
|
||||
* \param d The direction for the sniffer.
|
||||
*/
|
||||
bool set_direction(pcap_direction_t d);
|
||||
|
||||
/**
|
||||
* \brief Sets whether to extract RawPDUs or fully parsed packets.
|
||||
*
|
||||
@@ -566,6 +574,12 @@ namespace Tins {
|
||||
*/
|
||||
void set_timeout(unsigned timeout);
|
||||
|
||||
/**
|
||||
* Sets the direction option.
|
||||
* \param direction The direction to be set.
|
||||
*/
|
||||
void set_direction(pcap_direction_t direction);
|
||||
|
||||
/**
|
||||
* Sets the immediate mode option.
|
||||
* \param enabled The immediate mode option value.
|
||||
@@ -596,6 +610,7 @@ namespace Tins {
|
||||
bool _promisc;
|
||||
bool _rfmon;
|
||||
bool _immediate_mode;
|
||||
pcap_direction_t _direction;
|
||||
};
|
||||
|
||||
template<class Functor>
|
||||
|
||||
Reference in New Issue
Block a user