PcapPlusPlus
Next
|
#include <IPLayer.h>
Public Member Functions | |
virtual IPAddress | getSrcIPAddress () const =0 |
virtual IPAddress | getDstIPAddress () const =0 |
virtual | ~IPLayer ()=default |
This is an interface (abstract class) implemented in the IP layers (IPv4Layer and IPv6Layer). It provides methods to fetch the source and destination IP addresses in an abdtract way that hides the IP type (IPv4 or IPv6). This is useful for use-cases in which the IP type doesn't matter. For example: if you're only interested in printing the IP address the IP type shouldn't matter.
|
virtualdefault |
An empty destructor
|
pure virtual |
An abstract method to get the destination IP address
Implemented in pcpp::IPv6Layer, and pcpp::IPv4Layer.
|
pure virtual |
An abstract method to get the source IP address
Implemented in pcpp::IPv6Layer, and pcpp::IPv4Layer.