1 | /** |
1 | /** |
2 | * cidr.C: CIDR matching. |
2 | * cidr.C: CIDR matching. |
|
|
3 | * |
|
|
4 | * Copyright © 2007 Pippijn van Steenhoven / The Ermyth Team |
|
|
5 | * Rights to this code are as documented in COPYING. |
|
|
6 | * |
|
|
7 | * |
|
|
8 | * Portions of this file were derived from sources bearing the following license: |
3 | * Rights to this code are documented in doc/pod/license.pod. |
9 | * Rights to this code are documented in doc/pod/license.pod. |
4 | * |
10 | * |
5 | * Most code in this file has been copied from ratbox, src/match.c and |
11 | * Most code in this file has been copied from ratbox, src/match.c and |
6 | * src/irc_string.c. It provides CIDR matching for IPv4 and IPv6 without |
12 | * src/irc_string.c. It provides CIDR matching for IPv4 and IPv6 without |
7 | * special OS support. |
13 | * special OS support. |
… | |
… | |
9 | * Copyright © 1996-2002 Hybrid Development Team |
15 | * Copyright © 1996-2002 Hybrid Development Team |
10 | * Copyright © 2002-2005 ircd-ratbox development team |
16 | * Copyright © 2002-2005 ircd-ratbox development team |
11 | * Copyright © 2005-2007 Atheme Project (http://www.atheme.org) |
17 | * Copyright © 2005-2007 Atheme Project (http://www.atheme.org) |
12 | */ |
18 | */ |
13 | |
19 | |
14 | static char const rcsid[] = "$Id: cidr.C,v 1.4 2007/08/28 17:08:12 pippijn Exp $"; |
20 | static char const rcsid[] = "$Id: cidr.C,v 1.5 2007/09/16 18:54:44 pippijn Exp $"; |
15 | |
21 | |
16 | #include "atheme.h" |
22 | #include "atheme.h" |
17 | |
23 | |
18 | #ifndef INADDRSZ |
24 | #ifndef INADDRSZ |
19 | #define INADDRSZ 4 |
25 | #define INADDRSZ 4 |