]> mj.ucw.cz Git - libucw.git/blob - ucw/ipaccess.h
Xtypes: Documentation
[libucw.git] / ucw / ipaccess.h
1 /*
2  *      UCW Library -- IP address access lists
3  *
4  *      (c) 1997--2007 Martin Mares <mj@ucw.cz>
5  *
6  *      This software may be freely distributed and used according to the terms
7  *      of the GNU Lesser General Public License.
8  */
9
10 #ifndef _UCW_IPACCESS_H
11 #define _UCW_IPACCESS_H
12
13 #include <ucw/clists.h>
14
15 #ifdef CONFIG_UCW_CLEAN_ABI
16 #define ip_addrmask_match ucw_ip_addrmask_match
17 #define ip_addrmask_type ucw_ip_addrmask_type
18 #define ipaccess_cf ucw_ipaccess_cf
19 #define ipaccess_check ucw_ipaccess_check
20 #endif
21
22 extern struct cf_section ipaccess_cf;
23 int ipaccess_check(clist *l, u32 ip);
24
25 /* Low-level handling of addresses and masks */
26
27 struct ip_addrmask {
28   u32 addr;
29   u32 mask;
30 };
31
32 extern struct cf_user_type ip_addrmask_type;
33 int ip_addrmask_match(struct ip_addrmask *am, u32 ip);
34
35 #endif