int res = locateEDNSOptRR(packet, &optStart, &optLen, &last);
if (res != 0) {
- return std::make_pair(std::nullopt, std::nullopt);
+ return {std::nullopt, std::nullopt};
}
size_t optContentStart = 0;
std::optional<std::string> extraText{std::nullopt};
/* we need at least 2 bytes after the option length (info-code) */
if (!isEDNSOptionInOpt(packet, optStart, optLen, EDNSOptionCode::EXTENDEDERROR, &optContentStart, &optContentLen) || optContentLen < sizeof(infoCode)) {
- return std::make_pair(std::nullopt, std::nullopt);
+ return {std::nullopt, std::nullopt};
}
memcpy(&infoCode, &packet.at(optContentStart), sizeof(infoCode));
infoCode = ntohs(infoCode);
extraText->resize(optContentLen - sizeof(infoCode));
memcpy(extraText->data(), &packet.at(optContentStart + sizeof(infoCode)), optContentLen - sizeof(infoCode));
}
- return std::make_pair(infoCode, std::move(extraText));
+ return {infoCode, std::move(extraText)};
}
}
* ``serverID=""``: str - Set the Server Identity field.
* ``ipEncryptKey=""``: str - A key, that can be generated via the :func:`makeIPCipherKey` function, to encrypt the IP address of the requestor for anonymization purposes. The encryption is done using ipcrypt for IPv4 and a 128-bit AES ECB operation for IPv6.
* ``exportTags=""``: str - The comma-separated list of keys of internal tags to export into the ``tags`` Protocol Buffer field, as "key:value" strings. Note that a tag with an empty value will be exported as "<key>", not "<key>:". An empty string means that no internal tag will be exported. The special value ``*`` means that all tags will be exported.
- * ``exportExtendedErrorsToMeta=""``: str - Export Extended DNS Errors present in the DNS response, if any, into the specified ``tags`` Protocol Buffer field. The EDE info code will be exported as an integer value, and the EDE extra text, if present, as a string value.
+ * ``exportExtendedErrorsToMeta=""``: str - Export Extended DNS Errors present in the DNS response, if any, into the ``meta`` Protocol Buffer field using the specified ``key``. The EDE info code will be exported as an integer value, and the EDE extra text, if present, as a string value.
.. function:: SetAdditionalProxyProtocolValueAction(type, value)