diff --git a/src/seeder/dns.h b/src/seeder/dns.h --- a/src/seeder/dns.h +++ b/src/seeder/dns.h @@ -1,6 +1,7 @@ #ifndef BITCOIN_SEEDER_DNS_H #define BITCOIN_SEEDER_DNS_H 1 +#include #include struct addr_t { @@ -24,6 +25,13 @@ uint64_t nRequests; }; +// 0: ok +// -1: premature end of input, forward reference, component > 63 char, invalid +// character +// -2: insufficient space in output +int parse_name(const uint8_t **inpos, const uint8_t *inend, + const uint8_t *inbuf, char *buf, size_t bufsize); + int dnsserver(dns_opt_t *opt); #endif // BITCOIN_SEEDER_DNS_H diff --git a/src/seeder/dns.cpp b/src/seeder/dns.cpp --- a/src/seeder/dns.cpp +++ b/src/seeder/dns.cpp @@ -46,12 +46,8 @@ QTYPE_ANY = 255 } dns_type; -// 0: ok -// -1: premature end of input, forward reference, component > 63 char, invalid -// character -// -2: insufficient space in output -static int parse_name(const uint8_t **inpos, const uint8_t *inend, - const uint8_t *inbuf, char *buf, size_t bufsize) { +int parse_name(const uint8_t **inpos, const uint8_t *inend, + const uint8_t *inbuf, char *buf, size_t bufsize) { size_t bufused = 0; int init = 1; do {