(svn r15946) -Codechange: move netmask matching to NetworkAddress and add some support for IPv6 netmask matching.

This commit is contained in:
rubidium
2009-04-04 00:47:08 +00:00
parent e460d3f4d0
commit 2fd9f0fffa
3 changed files with 68 additions and 25 deletions

View File

@@ -158,6 +158,14 @@ public:
return this->address_length != 0;
}
/**
* Checks whether this IP address is contained by the given netmask.
* @param netmask the netmask in CIDR notation to test against.
* @note netmask without /n assumes all bits need to match.
* @return true if this IP is within the netmask.
*/
bool IsInNetmask(char *netmask);
/**
* Compare the address of this class with the address of another.
* @param address the other address.