From: Bert Hubert Date: Sat, 1 Mar 2008 19:35:48 +0000 (+0000) Subject: add support for DHCID, IPSECKEY and KX records, thanks Norbert Sendetzky for the... X-Git-Tag: rec-3.1.7.1~97 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9fd71f2e76b959378bc8f246836c164f23dc5a1c;p=pdns add support for DHCID, IPSECKEY and KX records, thanks Norbert Sendetzky for the hint git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1144 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/pdns/dnsrecords.cc b/pdns/dnsrecords.cc index 0348c4adf..6919f9f87 100644 --- a/pdns/dnsrecords.cc +++ b/pdns/dnsrecords.cc @@ -215,6 +215,24 @@ boilerplate_conv(MX, ns_t_mx, conv.xfrLabel(d_mxname, true); ) +boilerplate_conv(KX, ns_t_mx, + conv.xfr16BitInt(d_preference); + conv.xfrLabel(d_exchanger, false); + ) + +boilerplate_conv(IPSECKEY, 45, /* ns_t_ipsec */ + conv.xfr8BitInt(d_preference); + conv.xfr8BitInt(d_gatewaytype); + conv.xfr8BitInt(d_algorithm); + conv.xfrLabel(d_gateway, false); + conv.xfrBlob(d_publickey); + ) + +boilerplate_conv(DHCID, 49, + conv.xfrBlob(d_content); + ) + + boilerplate_conv(AFSDB, ns_t_afsdb, conv.xfr16BitInt(d_subtype); conv.xfrLabel(d_hostname); diff --git a/pdns/dnsrecords.hh b/pdns/dnsrecords.hh index 2c9124b6d..64728e3cc 100644 --- a/pdns/dnsrecords.hh +++ b/pdns/dnsrecords.hh @@ -74,6 +74,40 @@ private: string d_mxname; }; +class KXRecordContent : public DNSRecordContent +{ +public: + KXRecordContent(uint16_t preference, const string& exchanger); + + includeboilerplate(KX) + +private: + uint16_t d_preference; + string d_exchanger; +}; + +class IPSECKEYRecordContent : public DNSRecordContent +{ +public: + IPSECKEYRecordContent(uint16_t preference, uint8_t gatewaytype, uint8_t algo, const std::string& gateway, const std::string &publickey); + + includeboilerplate(IPSECKEY) + +private: + uint8_t d_preference, d_gatewaytype, d_algorithm; + string d_gateway, d_publickey; +}; + +class DHCIDRecordContent : public DNSRecordContent +{ +public: + includeboilerplate(DHCID) + +private: + string d_content; +}; + + class SRVRecordContent : public DNSRecordContent { public: