// !! This file has been generated by dnsdist-settings-generator.py, do not edit by hand!! std::shared_ptr getAllowAction(const AllowActionConfiguration& config) { auto action = dnsdist::actions::getAllowAction(); return newDNSActionWrapper(std::move(action), config.name); } std::shared_ptr getDelayAction(const DelayActionConfiguration& config) { auto action = dnsdist::actions::getDelayAction(config.msec); return newDNSActionWrapper(std::move(action), config.name); } std::shared_ptr getDropAction(const DropActionConfiguration& config) { auto action = dnsdist::actions::getDropAction(); return newDNSActionWrapper(std::move(action), config.name); } std::shared_ptr getERCodeAction(const ERCodeActionConfiguration& config) { auto action = dnsdist::actions::getERCodeAction(dnsdist::configuration::yaml::strToRCode("config", "rcode", config.rcode), convertResponseConfig(config.vars)); return newDNSActionWrapper(std::move(action), config.name); } std::shared_ptr getHTTPStatusAction(const HTTPStatusActionConfiguration& config) { auto action = dnsdist::actions::getHTTPStatusAction(config.status, PacketBuffer(config.body.data(), config.body.data() + config.body.size()), std::string(config.content_type), convertResponseConfig(config.vars)); return newDNSActionWrapper(std::move(action), config.name); } std::shared_ptr getLogAction(const LogActionConfiguration& config) { auto action = dnsdist::actions::getLogAction(std::string(config.file_name), config.binary, config.append, config.buffered, config.verbose_only, config.include_timestamp); return newDNSActionWrapper(std::move(action), config.name); } std::shared_ptr getLuaFFIPerThreadAction(const LuaFFIPerThreadActionConfiguration& config) { auto action = dnsdist::actions::getLuaFFIPerThreadAction(std::string(config.code)); return newDNSActionWrapper(std::move(action), config.name); } std::shared_ptr getNegativeAndSOAAction(const NegativeAndSOAActionConfiguration& config) { auto action = dnsdist::actions::getNegativeAndSOAAction(config.nxd, DNSName(std::string(config.zone)), config.ttl, DNSName(std::string(config.mname)), DNSName(std::string(config.rname)), convertSOAParams(config.soa_parameters), config.soa_in_authority, convertResponseConfig(config.vars)); return newDNSActionWrapper(std::move(action), config.name); } std::shared_ptr getNoneAction(const NoneActionConfiguration& config) { auto action = dnsdist::actions::getNoneAction(); return newDNSActionWrapper(std::move(action), config.name); } std::shared_ptr getPoolAction(const PoolActionConfiguration& config) { auto action = dnsdist::actions::getPoolAction(std::string(config.pool_name), config.stop_processing); return newDNSActionWrapper(std::move(action), config.name); } std::shared_ptr getQPSAction(const QPSActionConfiguration& config) { auto action = dnsdist::actions::getQPSAction(config.limit); return newDNSActionWrapper(std::move(action), config.name); } std::shared_ptr getQPSPoolAction(const QPSPoolActionConfiguration& config) { auto action = dnsdist::actions::getQPSPoolAction(config.limit, std::string(config.pool_name), config.stop_processing); return newDNSActionWrapper(std::move(action), config.name); } std::shared_ptr getRCodeAction(const RCodeActionConfiguration& config) { auto action = dnsdist::actions::getRCodeAction(dnsdist::configuration::yaml::strToRCode("config", "rcode", config.rcode), convertResponseConfig(config.vars)); return newDNSActionWrapper(std::move(action), config.name); } std::shared_ptr getSetAdditionalProxyProtocolValueAction(const SetAdditionalProxyProtocolValueActionConfiguration& config) { auto action = dnsdist::actions::getSetAdditionalProxyProtocolValueAction(config.proxy_type, std::string(config.value)); return newDNSActionWrapper(std::move(action), config.name); } std::shared_ptr getSetDisableECSAction(const SetDisableECSActionConfiguration& config) { auto action = dnsdist::actions::getSetDisableECSAction(); return newDNSActionWrapper(std::move(action), config.name); } std::shared_ptr getSetDisableValidationAction(const SetDisableValidationActionConfiguration& config) { auto action = dnsdist::actions::getSetDisableValidationAction(); return newDNSActionWrapper(std::move(action), config.name); } std::shared_ptr getSetECSAction(const SetECSActionConfiguration& config) { auto action = dnsdist::actions::getSetECSAction(std::string(config.ipv4), std::string(config.ipv6)); return newDNSActionWrapper(std::move(action), config.name); } std::shared_ptr getSetECSOverrideAction(const SetECSOverrideActionConfiguration& config) { auto action = dnsdist::actions::getSetECSOverrideAction(config.override_existing); return newDNSActionWrapper(std::move(action), config.name); } std::shared_ptr getSetECSPrefixLengthAction(const SetECSPrefixLengthActionConfiguration& config) { auto action = dnsdist::actions::getSetECSPrefixLengthAction(config.ipv4, config.ipv6); return newDNSActionWrapper(std::move(action), config.name); } std::shared_ptr getSetEDNSOptionAction(const SetEDNSOptionActionConfiguration& config) { auto action = dnsdist::actions::getSetEDNSOptionAction(config.code, std::string(config.data)); return newDNSActionWrapper(std::move(action), config.name); } std::shared_ptr getSetExtendedDNSErrorAction(const SetExtendedDNSErrorActionConfiguration& config) { auto action = dnsdist::actions::getSetExtendedDNSErrorAction(config.info_code, std::string(config.extra_text), config.clear_existing_entries); return newDNSActionWrapper(std::move(action), config.name); } std::shared_ptr getSetMacAddrAction(const SetMacAddrActionConfiguration& config) { auto action = dnsdist::actions::getSetMacAddrAction(config.code); return newDNSActionWrapper(std::move(action), config.name); } std::shared_ptr getSetMaxReturnedTTLAction(const SetMaxReturnedTTLActionConfiguration& config) { auto action = dnsdist::actions::getSetMaxReturnedTTLAction(config.max); return newDNSActionWrapper(std::move(action), config.name); } std::shared_ptr getSetNoRecurseAction(const SetNoRecurseActionConfiguration& config) { auto action = dnsdist::actions::getSetNoRecurseAction(); return newDNSActionWrapper(std::move(action), config.name); } std::shared_ptr getSetSkipCacheAction(const SetSkipCacheActionConfiguration& config) { auto action = dnsdist::actions::getSetSkipCacheAction(); return newDNSActionWrapper(std::move(action), config.name); } std::shared_ptr getSetTagAction(const SetTagActionConfiguration& config) { auto action = dnsdist::actions::getSetTagAction(std::string(config.tag), std::string(config.value)); return newDNSActionWrapper(std::move(action), config.name); } std::shared_ptr getSetTempFailureCacheTTLAction(const SetTempFailureCacheTTLActionConfiguration& config) { auto action = dnsdist::actions::getSetTempFailureCacheTTLAction(config.ttl); return newDNSActionWrapper(std::move(action), config.name); } std::shared_ptr getSNMPTrapAction(const SNMPTrapActionConfiguration& config) { auto action = dnsdist::actions::getSNMPTrapAction(std::string(config.reason)); return newDNSActionWrapper(std::move(action), config.name); } std::shared_ptr getSpoofSVCAction(const SpoofSVCActionConfiguration& config) { auto action = dnsdist::actions::getSpoofSVCAction(convertSVCRecordParameters(config.parameters), convertResponseConfig(config.vars)); return newDNSActionWrapper(std::move(action), config.name); } std::shared_ptr getTCAction(const TCActionConfiguration& config) { auto action = dnsdist::actions::getTCAction(); return newDNSActionWrapper(std::move(action), config.name); } std::shared_ptr getTeeAction(const TeeActionConfiguration& config) { auto action = dnsdist::actions::getTeeAction(ComboAddress(std::string(config.rca)), ComboAddress(std::string(config.lca)), config.add_ecs, config.add_proxy_protocol); return newDNSActionWrapper(std::move(action), config.name); } std::shared_ptr getUnsetTagAction(const UnsetTagActionConfiguration& config) { auto action = dnsdist::actions::getUnsetTagAction(std::string(config.tag)); return newDNSActionWrapper(std::move(action), config.name); } std::shared_ptr getAllowResponseAction(const AllowResponseActionConfiguration& config) { auto action = dnsdist::actions::getAllowResponseAction(); return newDNSResponseActionWrapper(std::move(action), config.name); } std::shared_ptr getDelayResponseAction(const DelayResponseActionConfiguration& config) { auto action = dnsdist::actions::getDelayResponseAction(config.msec); return newDNSResponseActionWrapper(std::move(action), config.name); } std::shared_ptr getDropResponseAction(const DropResponseActionConfiguration& config) { auto action = dnsdist::actions::getDropResponseAction(); return newDNSResponseActionWrapper(std::move(action), config.name); } std::shared_ptr getLogResponseAction(const LogResponseActionConfiguration& config) { auto action = dnsdist::actions::getLogResponseAction(std::string(config.file_name), config.append, config.buffered, config.verbose_only, config.include_timestamp); return newDNSResponseActionWrapper(std::move(action), config.name); } std::shared_ptr getLuaFFIPerThreadResponseAction(const LuaFFIPerThreadResponseActionConfiguration& config) { auto action = dnsdist::actions::getLuaFFIPerThreadResponseAction(std::string(config.code)); return newDNSResponseActionWrapper(std::move(action), config.name); } std::shared_ptr getSetEDNSOptionResponseAction(const SetEDNSOptionResponseActionConfiguration& config) { auto action = dnsdist::actions::getSetEDNSOptionResponseAction(config.code, std::string(config.data)); return newDNSResponseActionWrapper(std::move(action), config.name); } std::shared_ptr getSetExtendedDNSErrorResponseAction(const SetExtendedDNSErrorResponseActionConfiguration& config) { auto action = dnsdist::actions::getSetExtendedDNSErrorResponseAction(config.info_code, std::string(config.extra_text), config.clear_existing_entries); return newDNSResponseActionWrapper(std::move(action), config.name); } std::shared_ptr getSetMaxReturnedTTLResponseAction(const SetMaxReturnedTTLResponseActionConfiguration& config) { auto action = dnsdist::actions::getSetMaxReturnedTTLResponseAction(config.max); return newDNSResponseActionWrapper(std::move(action), config.name); } std::shared_ptr getSetReducedTTLResponseAction(const SetReducedTTLResponseActionConfiguration& config) { auto action = dnsdist::actions::getSetReducedTTLResponseAction(config.percentage); return newDNSResponseActionWrapper(std::move(action), config.name); } std::shared_ptr getSetSkipCacheResponseAction(const SetSkipCacheResponseActionConfiguration& config) { auto action = dnsdist::actions::getSetSkipCacheResponseAction(); return newDNSResponseActionWrapper(std::move(action), config.name); } std::shared_ptr getSetTagResponseAction(const SetTagResponseActionConfiguration& config) { auto action = dnsdist::actions::getSetTagResponseAction(std::string(config.tag), std::string(config.value)); return newDNSResponseActionWrapper(std::move(action), config.name); } std::shared_ptr getSNMPTrapResponseAction(const SNMPTrapResponseActionConfiguration& config) { auto action = dnsdist::actions::getSNMPTrapResponseAction(std::string(config.reason)); return newDNSResponseActionWrapper(std::move(action), config.name); } std::shared_ptr getTCResponseAction(const TCResponseActionConfiguration& config) { auto action = dnsdist::actions::getTCResponseAction(); return newDNSResponseActionWrapper(std::move(action), config.name); } std::shared_ptr getUnsetTagResponseAction(const UnsetTagResponseActionConfiguration& config) { auto action = dnsdist::actions::getUnsetTagResponseAction(std::string(config.tag)); return newDNSResponseActionWrapper(std::move(action), config.name); }