X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fipaccess.h;h=b407783885eef4d93a36413000b3492c87eca036;hb=39d5e9acc6d93c07cbb408fe27144c8a485499ac;hp=2fed62a3efbe7d2bd1521a1b43640ac275af782e;hpb=f86adbc60833d5eafd664602b62797d37c9d61b9;p=libucw.git diff --git a/lib/ipaccess.h b/lib/ipaccess.h index 2fed62a3..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_xxx(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