summaryrefslogtreecommitdiff
path: root/src/network/core/address.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-04-04 00:47:08 +0000
committerrubidium <rubidium@openttd.org>2009-04-04 00:47:08 +0000
commit2fd9f0fffa0d7e13d098f29fc04b8028adce8acf (patch)
treea96b39b4df230207ef70cb1fad7e6f23b98e34b5 /src/network/core/address.h
parente460d3f4d02c72f6b661a722b70ddaaa48bc5e92 (diff)
downloadopenttd-2fd9f0fffa0d7e13d098f29fc04b8028adce8acf.tar.xz
(svn r15946) -Codechange: move netmask matching to NetworkAddress and add some support for IPv6 netmask matching.
Diffstat (limited to 'src/network/core/address.h')
-rw-r--r--src/network/core/address.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/network/core/address.h b/src/network/core/address.h
index 2b5f7444f..f972a0397 100644
--- a/src/network/core/address.h
+++ b/src/network/core/address.h
@@ -159,6 +159,14 @@ public:
}
/**
+ * 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.
*/