#ifndef MOD_DNSBL_LOOKUP_H #define MOD_DNSBL_LOOKUP_H #include #include /* Boolean-like result of a dnsbl lookup */ #define DNSBL_NEGATIVE 0 /* negative */ #define DNSBL_POSITIVE 1 /* positive match */ #define DNSBL_FAILURE 2 /* generic failure, not enabled or configured */ /* Types of queries for dnsbl_lookup_ip() and dnsbl_lookup_domain() */ #define DNSBL_ANYPOSTV_RETFIRST 0 /* Any positive from chain, stop and return first */ #define DNSBL_ANYPOSTV_RETEVERY 1 /* Any positive, check all and return every positive */ #define DNSBL_ALLPOSTV_RETEVERY 2 /* All must check positive, return every positive */ #define DNSBL_MATCH_ANY "any" APR_DECLARE_OPTIONAL_FN(int, dnsbl_lookup_ip, (const char*, int, apr_sockaddr_t*, apr_pool_t*, server_rec*, apr_table_t**) ); APR_DECLARE_OPTIONAL_FN(int, dnsbl_lookup_domain, (const char*, int, const char*, apr_pool_t*, server_rec*, apr_table_t**) ); /* This structure defines a zone in a chain These are stored within hash tables - one table for IPv4 DNSBLs, another for RHSBLs */ typedef struct { const char* zonedomain; const char* postvresp; /* positive response, (sub)string or DNSBL_MATCH_ANY */ } zone_entry; #endif