]> git.ipfire.org Git - thirdparty/pdns.git/blobdiff - pdns/ednsoptions.hh
Merge pull request #8223 from PowerDNS/omoerbeek-patch-1
[thirdparty/pdns.git] / pdns / ednsoptions.hh
index 2fdc9a57d0ca7ff19621fa2c125ceab5d95e89ea..019ac9bb9b01d343d7f8fdf62b00dd7ac19f2f42 100644 (file)
@@ -32,14 +32,21 @@ struct EDNSOptionCode
 /* extract a specific EDNS0 option from a pointer on the beginning rdLen of the OPT RR */
 int getEDNSOption(char* optRR, size_t len, uint16_t wantedOption, char ** optionValue, size_t * optionValueSize);
 
-struct EDNSOptionView
+struct EDNSOptionViewValue
 {
   const char* content{nullptr};
   uint16_t size{0};
 };
 
+struct EDNSOptionView
+{
+  std::vector<EDNSOptionViewValue> values;
+};
+
+typedef std::map<uint16_t, EDNSOptionView> EDNSOptionViewMap;
+
 /* extract all EDNS0 options from a pointer on the beginning rdLen of the OPT RR */
-int getEDNSOptions(const char* optRR, size_t len, std::map<uint16_t, EDNSOptionView>& options);
+int getEDNSOptions(const char* optRR, size_t len, EDNSOptionViewMap& options);
 
 void generateEDNSOption(uint16_t optionCode, const std::string& payload, std::string& res);