A wrapper class for pcap_t* which is the libpcap packet capture descriptor. This class is used to manage the lifecycle of the pcap_t* object.
More...
|
constexpr | PcapHandle () noexcept=default |
| Creates an empty handle.
|
|
| PcapHandle (pcap_t *pcapDescriptor) noexcept |
| Creates a handle from the provided pcap descriptor. More...
|
|
bool | isValid () const noexcept |
|
pcap_t * | get () const noexcept |
|
pcap_t * | release () noexcept |
| Releases ownership of the handle and returns the pcap descriptor. More...
|
|
void | reset (pcap_t *pcapDescriptor=nullptr) noexcept |
| Replaces the managed handle with the provided one. More...
|
|
char const * | getLastError () const noexcept |
| Helper function to retrieve a view of the last error string for this handle. More...
|
|
| operator bool () const noexcept |
|
A wrapper class for pcap_t* which is the libpcap packet capture descriptor. This class is used to manage the lifecycle of the pcap_t* object.