comparison 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
comparison
equal deleted inserted replaced
381:879a470c6ac3 382:c378e9d03f37
10 #define dnsbl_include 10 #define dnsbl_include
11 11
12 #include "context.h" 12 #include "context.h"
13 #include "spamass.h" 13 #include "spamass.h"
14 #include "dccifd.h" 14 #include "dccifd.h"
15 #include <stdint.h>
16 15
17 extern int debug_syslog; 16 extern int debug_syslog;
18 #define dccbulk 1000 17 #define dccbulk 1000
19 18
20 class recorder; 19 class recorder;
83 size_t my_write(const char *buf, size_t len); 82 size_t my_write(const char *buf, size_t len);
84 const char *check_uribl_signers(); 83 const char *check_uribl_signers();
85 void need_content_filter(CONTEXT &con); 84 void need_content_filter(CONTEXT &con);
86 }; 85 };
87 86
88 void my_syslog(const char *queueid, const char *text); 87 struct ns_map {
89 void my_syslog(mlfiPriv *priv, const char *text); 88 // all the strings are owned by the keys/values in the ns_host string map
90 void my_syslog(mlfiPriv *priv, const string text); 89 string_map ns_host; // nameserver name -> host name that uses this name server
91 void my_syslog(const char *text); 90 ns_mapper ns_ip; // nameserver name -> ipv4 address of the name server
91 ~ns_map();
92 void add(const char *name, const char *refer);
93 };
94
95 void my_syslog(const char *queueid, const char *text);
96 void my_syslog(mlfiPriv *priv, const char *text);
97 void my_syslog(mlfiPriv *priv, const string text);
98 void my_syslog(const char *text);
99 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);
92 100
93 #endif 101 #endif