]> mj.ucw.cz Git - libucw.git/blobdiff - lib/ipaccess.h
autoconf.h needs to be handled differently, since it is copied from obj/lib
[libucw.git] / lib / ipaccess.h
index fefd34a8b78f657738ccc8283054106c99dd7eaa..b407783885eef4d93a36413000b3492c87eca036 100644 (file)
@@ -1,13 +1,28 @@
 /*
- *     Sherlock Library -- IP address access lists
+ *     UCW Library -- IP address access lists
  *
- *     (c) 1997--2001 Martin Mares <mj@ucw.cz>
+ *     (c) 1997--2007 Martin Mares <mj@ucw.cz>
+ *
+ *     This software may be freely distributed and used according to the terms
+ *     of the GNU Lesser General Public License.
  */
 
-#include "lib/lists.h"
+#ifndef _UCW_IPACCESS_H
+#define _UCW_IPACCESS_H
+
+#include "lib/clists.h"
+
+extern struct cf_section ipaccess_cf;
+int ipaccess_check(clist *l, u32 ip);
+
+/* Low-level handling of addresses and masks */
+
+struct ip_addrmask {
+  u32 addr;
+  u32 mask;
+};
 
-typedef list ipaccess_list;
+extern struct cf_user_type ip_addrmask_type;
+int ip_addrmask_match(struct ip_addrmask *am, u32 ip);
 
-void ipaccess_init(ipaccess_list *l);
-byte *ipaccess_parse(ipaccess_list *l, byte *c, int is_allow);
-int ipaccess_check(ipaccess_list *l, u32 ip);
+#endif