diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-06 16:09:29 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-06 16:09:29 +0000 |
commit | f4a4901fee693791493c340fd380658a24d4cf26 (patch) | |
tree | 27a9d24c0d4bee19bfe0c4c33079e9e91a8b5912 /src/inspircd.cpp | |
parent | a9621bc98996e08d86734e6848de13223341ea64 (diff) |
Support CIDR, CIDR zline, /oper and CIDR <connect> tags. NOTE: With CIDR oper, ident field is not supported (yet)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4732 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r-- | src/inspircd.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 09cd74d69..a2b4e0d92 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -940,13 +940,13 @@ int InspIRCd::Run() int main(int argc, char** argv) { - - unsigned char addr[] = {0xCC,0xAA,0xCC,0xAA}; - unsigned char mask[] = {0xCC,0xAA,0xC0,0xAA}; - - printf("%d",MatchCIDRBits(addr, mask, 20)); - - exit(0); + /* This is a MatchCIDR() test suite - + printf("Should be 0: %d\n",MatchCIDR("127.0.0.1","1.2.3.4/8")); + printf("Should be 1: %d\n",MatchCIDR("127.0.0.1","127.0.0.0/8")); + printf("Should be 1: %d\n",MatchCIDR("127.0.0.1","127.0.0.0/18")); + printf("Should be 0: %d\n",MatchCIDR("3ffe::0","2fc9::0/16")); + printf("Should be 1: %d\n",MatchCIDR("3ffe:1:3::0", "3ffe:1::0/32")); + exit(0); */ try { |