Mercurial > dnsbl
diff src/dnsbl.h @ 382:c378e9d03f37
start parsing spf txt records
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Mon, 06 Mar 2017 12:21:05 -0800 |
parents | 7fd39f029936 |
children | f9165d9aa689 |
line wrap: on
line diff
--- a/src/dnsbl.h Tue Feb 28 17:02:07 2017 -0800 +++ b/src/dnsbl.h Mon Mar 06 12:21:05 2017 -0800 @@ -12,7 +12,6 @@ #include "context.h" #include "spamass.h" #include "dccifd.h" -#include <stdint.h> extern int debug_syslog; #define dccbulk 1000 @@ -85,9 +84,18 @@ void need_content_filter(CONTEXT &con); }; +struct ns_map { + // all the strings are owned by the keys/values in the ns_host string map + string_map ns_host; // nameserver name -> host name that uses this name server + ns_mapper ns_ip; // nameserver name -> ipv4 address of the name server + ~ns_map(); + void add(const char *name, const char *refer); +}; + void my_syslog(const char *queueid, const char *text); void my_syslog(mlfiPriv *priv, const char *text); void my_syslog(mlfiPriv *priv, const string text); void my_syslog(const char *text); +uint32_t dns_interface(mlfiPriv &priv, const char *question, int qtype, bool maybe_ip = false, ns_map *nameservers = NULL, char *txt_answer = NULL, size_t txt_size = 0); #endif