From: Pieter Lexis Date: Tue, 9 Feb 2021 16:04:36 +0000 (+0100) Subject: SVCB: make a superclass for SVBC and HTTPS X-Git-Tag: dnsdist-1.6.0-rc1~33^2~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e5acc81cf609bb9aa5bf1e527ff77cc08d1907ef;p=thirdparty%2Fpdns.git SVCB: make a superclass for SVBC and HTTPS --- diff --git a/pdns/dnsrecords.hh b/pdns/dnsrecords.hh index 8d2cea1014..d694f879f6 100644 --- a/pdns/dnsrecords.hh +++ b/pdns/dnsrecords.hh @@ -497,30 +497,28 @@ private: string d_keyring; }; -class SVCBRecordContent : public DNSRecordContent +class SVCBBaseRecordContent : public DNSRecordContent +{ + public: + const DNSName& getTarget() const {return d_target;} + uint16_t getPriority() const {return d_priority;} + + protected: + uint16_t d_priority; + DNSName d_target; + set d_params; +}; + +class SVCBRecordContent : public SVCBBaseRecordContent { public: includeboilerplate(SVCB) - const DNSName& getTarget() const {return d_target;} - uint16_t getPriority() const {return d_priority;} - -private: - uint16_t d_priority; - DNSName d_target; - set d_params; }; -class HTTPSRecordContent : public DNSRecordContent +class HTTPSRecordContent : public SVCBBaseRecordContent { public: includeboilerplate(HTTPS) - const DNSName& getTarget() const {return d_target;} - uint16_t getPriority() const {return d_priority;} - -private: - uint16_t d_priority; - DNSName d_target; - set d_params; }; class RRSIGRecordContent : public DNSRecordContent