diff options
| author | Adam <Adam@anope.org> | 2010-11-20 21:45:30 -0500 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2010-12-12 19:35:27 -0500 |
| commit | 246f44b9888161aecefc81f0ff17ddd893287e3c (patch) | |
| tree | b89607a9ad9c91914f292fc54cc32213a8d9f5c4 /include/sockets.h | |
| parent | a85112172d842aa74aa5531788d383328d153e74 (diff) | |
Added cs_mode, rewrote the old list mode code, and added CIDR support
Diffstat (limited to 'include/sockets.h')
| -rw-r--r-- | include/sockets.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/sockets.h b/include/sockets.h index a24e346d7..c9e5bfed0 100644 --- a/include/sockets.h +++ b/include/sockets.h @@ -80,6 +80,18 @@ union CoreExport sockaddrs void ntop(int type, const void *src); }; +class CoreExport cidr +{ + sockaddrs addr; + Anope::string cidr_ip; + unsigned char cidr_len; + public: + cidr(const Anope::string &ip); + cidr(const Anope::string &ip, unsigned char len); + Anope::string mask() const; + bool match(sockaddrs &other); +}; + class SocketException : public CoreException { public: |
