1
0
mirror of https://github.com/anope/anope.git synced 2026-07-07 01:43:13 +02:00

Make sockaddrs/cidr not throw on invalid ips to give us an easier/cheaper way to test for a valid IP

This commit is contained in:
Adam
2013-05-08 09:50:43 -04:00
parent 6859decfb8
commit 9b07e163c0
16 changed files with 212 additions and 244 deletions
+3
View File
@@ -79,6 +79,8 @@ union CoreExport sockaddrs
* @throws A socket exception if given an invalid structure
*/
void ntop(int type, const void *src);
bool valid() const;
};
class CoreExport cidr
@@ -91,6 +93,7 @@ class CoreExport cidr
cidr(const Anope::string &ip, unsigned char len);
Anope::string mask() const;
bool match(const sockaddrs &other);
bool valid() const;
bool operator<(const cidr &other) const;
bool operator==(const cidr &other) const;