mirror of
https://github.com/mfontanini/libtins
synced 2026-01-27 04:11:35 +01:00
Modified some examples fixed some doxygen documentation.
This commit is contained in:
@@ -36,6 +36,8 @@
|
||||
using std::string;
|
||||
|
||||
namespace Tins{
|
||||
const IPv4Address IPv4Address::broadcast("255.255.255.255");
|
||||
|
||||
const AddressRange<IPv4Address> private_ranges[] = {
|
||||
IPv4Address("192.168.0.0") / 16,
|
||||
IPv4Address("10.0.0.0") / 8,
|
||||
@@ -122,4 +124,12 @@ bool IPv4Address::is_loopback() const {
|
||||
bool IPv4Address::is_multicast() const {
|
||||
return multicast_range.contains(*this);
|
||||
}
|
||||
|
||||
bool IPv4Address::is_unicast() const {
|
||||
return !is_multicast() && !is_broadcast();
|
||||
}
|
||||
|
||||
bool IPv4Address::is_broadcast() const {
|
||||
return *this == broadcast;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user