X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Fipaccess.h;h=b407783885eef4d93a36413000b3492c87eca036;hb=707fc4ba760bac1d356c0268e933885f9da1f616;hp=8e003bdc28e59cdc6e900f5c0acfe4b980a84544;hpb=b1fbf9e3292eab73fa448dd6c937e70eb66dc4a7;p=libucw.git diff --git a/lib/ipaccess.h b/lib/ipaccess.h index 8e003bdc..b4077838 100644 --- a/lib/ipaccess.h +++ b/lib/ipaccess.h @@ -1,7 +1,7 @@ /* * UCW Library -- IP address access lists * - * (c) 1997--2006 Martin Mares + * (c) 1997--2007 Martin Mares * * This software may be freely distributed and used according to the terms * of the GNU Lesser General Public License. @@ -15,10 +15,14 @@ extern struct cf_section ipaccess_cf; int ipaccess_check(clist *l, u32 ip); -/* FIXME: Hacks to make older modules compile */ -struct ipaccess_list { }; -#define ipaccess_init() NULL -#define ipaccess_parse(x,y,z) NULL -#define ipaccess_check(x,y) 0 +/* Low-level handling of addresses and masks */ + +struct ip_addrmask { + u32 addr; + u32 mask; +}; + +extern struct cf_user_type ip_addrmask_type; +int ip_addrmask_match(struct ip_addrmask *am, u32 ip); #endif