}
});
+ luaCtx.registerFunction<void(DNSQuestion::*)(uint16_t code, const std::string&)>("setEDNSOption", [](DNSQuestion& dq, uint16_t code, const std::string& data) {
+ std::string result;
+ SetEDNSOptionAction seoa(code, data);
+ seoa(&dq, &result);
+ });
+
/* LuaWrapper doesn't support inheritance */
luaCtx.registerMember<const ComboAddress (DNSResponse::*)>("localaddr", [](const DNSResponse& dq) -> const ComboAddress { return *dq.local; }, [](DNSResponse& dq, const ComboAddress newLocal) { (void) newLocal; });
luaCtx.registerMember<const DNSName (DNSResponse::*)>("qname", [](const DNSResponse& dq) -> const DNSName { return *dq.qname; }, [](DNSResponse& dq, const DNSName newName) { (void) newName; });
:param string reason: An optional string describing the reason why this trap was sent
+ .. method:: DNSQuestion:setEDNSOption(code, data)
+
+ .. versionadded:: 1.8.0
+
+ Add arbitrary EDNS option and data to the query. Any existing EDNS content with the same option code will be overwritten.
+
+ :param int code: The EDNS option code
+ :param string data: The EDNS option raw data
+
.. method:: DNSQuestion:setHTTPResponse(status, body, contentType="")
.. versionadded:: 1.4.0