X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Futils_dns.c;h=3e80e8690efa3360c99a2e4a34509b93a76a23ca;hb=e1bfa71aca1f37c2f293dc9adb44065c6e7a9ad9;hp=2a1e2e51d153b925b2aa6ba4c63b17ceb03e3db7;hpb=e6798095bb2f063dd97619399575fef3e0fe501e;p=collectd.git diff --git a/src/utils_dns.c b/src/utils_dns.c index 2a1e2e51..3e80e869 100644 --- a/src/utils_dns.c +++ b/src/utils_dns.c @@ -527,7 +527,7 @@ handle_ip(const struct ip *ip, int len) return (0); if (IPPROTO_UDP != ip->ip_p) return 0; - memcpy(buf, (void *) ip + offset, len - offset); + memcpy(buf, ((char *)ip) + offset, len - offset); if (0 == handle_udp((struct udphdr *) buf, len - offset)) return 0; return 1; @@ -749,22 +749,41 @@ const char *qtype_str(int t) case ns_t_srv: return ("SRV"); case ns_t_atma: return ("ATMA"); case ns_t_naptr: return ("NAPTR"); + case ns_t_opt: return ("OPT"); +# if __NAMESER >= 19991006 case ns_t_kx: return ("KX"); case ns_t_cert: return ("CERT"); case ns_t_a6: return ("A6"); case ns_t_dname: return ("DNAME"); case ns_t_sink: return ("SINK"); - case ns_t_opt: return ("OPT"); -# if __NAMESER >= 19991006 case ns_t_tsig: return ("TSIG"); # endif +# if __NAMESER >= 20090302 + case ns_t_apl: return ("APL"); + case ns_t_ds: return ("DS"); + case ns_t_sshfp: return ("SSHFP"); + case ns_t_ipseckey: return ("IPSECKEY"); + case ns_t_rrsig: return ("RRSIG"); + case ns_t_nsec: return ("NSEC"); + case ns_t_dnskey: return ("DNSKEY"); + case ns_t_dhcid: return ("DHCID"); + case ns_t_nsec3: return ("NSEC3"); + case ns_t_nsec3param: return ("NSEC3PARAM"); + case ns_t_hip: return ("HIP"); + case ns_t_spf: return ("SPF"); case ns_t_ixfr: return ("IXFR"); +# endif case ns_t_axfr: return ("AXFR"); case ns_t_mailb: return ("MAILB"); case ns_t_maila: return ("MAILA"); case ns_t_any: return ("ANY"); +# if __NAMESER >= 19991006 case ns_t_zxfr: return ("ZXFR"); -/* #endif __NAMESER >= 19991006 */ +# endif +# if __NAMESER >= 20090302 + case ns_t_dlv: return ("DLV"); +# endif +/* #endif __NAMESER >= 19991001 */ #elif (defined (__BIND)) && (__BIND >= 19950621) case T_A: return ("A"); /* 1 ... */ case T_NS: return ("NS");