diff options
Diffstat (limited to 'src/resolve/resolved-dns-server.c')
-rw-r--r-- | src/resolve/resolved-dns-server.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/resolve/resolved-dns-server.c b/src/resolve/resolved-dns-server.c index b37f541c7f..c092bb1189 100644 --- a/src/resolve/resolved-dns-server.c +++ b/src/resolve/resolved-dns-server.c @@ -1106,27 +1106,27 @@ static const char* const dns_server_feature_level_table[_DNS_SERVER_FEATURE_LEVE }; DEFINE_STRING_TABLE_LOOKUP(dns_server_feature_level, DnsServerFeatureLevel); -int dns_server_dump_state_to_json(DnsServer *server, JsonVariant **ret) { +int dns_server_dump_state_to_json(DnsServer *server, sd_json_variant **ret) { assert(server); assert(ret); - return json_build(ret, - JSON_BUILD_OBJECT( - JSON_BUILD_PAIR_STRING("Server", strna(dns_server_string_full(server))), - JSON_BUILD_PAIR_STRING("Type", strna(dns_server_type_to_string(server->type))), - JSON_BUILD_PAIR_CONDITION(server->type == DNS_SERVER_LINK, "Interface", JSON_BUILD_STRING(server->link ? server->link->ifname : NULL)), - JSON_BUILD_PAIR_CONDITION(server->type == DNS_SERVER_LINK, "InterfaceIndex", JSON_BUILD_UNSIGNED(server->link ? server->link->ifindex : 0)), - JSON_BUILD_PAIR_STRING("VerifiedFeatureLevel", strna(dns_server_feature_level_to_string(server->verified_feature_level))), - JSON_BUILD_PAIR_STRING("PossibleFeatureLevel", strna(dns_server_feature_level_to_string(server->possible_feature_level))), - JSON_BUILD_PAIR_STRING("DNSSECMode", strna(dnssec_mode_to_string(dns_server_get_dnssec_mode(server)))), - JSON_BUILD_PAIR_BOOLEAN("DNSSECSupported", dns_server_dnssec_supported(server)), - JSON_BUILD_PAIR_UNSIGNED("ReceivedUDPFragmentMax", server->received_udp_fragment_max), - JSON_BUILD_PAIR_UNSIGNED("FailedUDPAttempts", server->n_failed_udp), - JSON_BUILD_PAIR_UNSIGNED("FailedTCPAttempts", server->n_failed_tcp), - JSON_BUILD_PAIR_BOOLEAN("PacketTruncated", server->packet_truncated), - JSON_BUILD_PAIR_BOOLEAN("PacketBadOpt", server->packet_bad_opt), - JSON_BUILD_PAIR_BOOLEAN("PacketRRSIGMissing", server->packet_rrsig_missing), - JSON_BUILD_PAIR_BOOLEAN("PacketInvalid", server->packet_invalid), - JSON_BUILD_PAIR_BOOLEAN("PacketDoOff", server->packet_do_off))); + return sd_json_build(ret, + SD_JSON_BUILD_OBJECT( + SD_JSON_BUILD_PAIR_STRING("Server", strna(dns_server_string_full(server))), + SD_JSON_BUILD_PAIR_STRING("Type", strna(dns_server_type_to_string(server->type))), + SD_JSON_BUILD_PAIR_CONDITION(server->type == DNS_SERVER_LINK, "Interface", SD_JSON_BUILD_STRING(server->link ? server->link->ifname : NULL)), + SD_JSON_BUILD_PAIR_CONDITION(server->type == DNS_SERVER_LINK, "InterfaceIndex", SD_JSON_BUILD_UNSIGNED(server->link ? server->link->ifindex : 0)), + SD_JSON_BUILD_PAIR_STRING("VerifiedFeatureLevel", strna(dns_server_feature_level_to_string(server->verified_feature_level))), + SD_JSON_BUILD_PAIR_STRING("PossibleFeatureLevel", strna(dns_server_feature_level_to_string(server->possible_feature_level))), + SD_JSON_BUILD_PAIR_STRING("DNSSECMode", strna(dnssec_mode_to_string(dns_server_get_dnssec_mode(server)))), + SD_JSON_BUILD_PAIR_BOOLEAN("DNSSECSupported", dns_server_dnssec_supported(server)), + SD_JSON_BUILD_PAIR_UNSIGNED("ReceivedUDPFragmentMax", server->received_udp_fragment_max), + SD_JSON_BUILD_PAIR_UNSIGNED("FailedUDPAttempts", server->n_failed_udp), + SD_JSON_BUILD_PAIR_UNSIGNED("FailedTCPAttempts", server->n_failed_tcp), + SD_JSON_BUILD_PAIR_BOOLEAN("PacketTruncated", server->packet_truncated), + SD_JSON_BUILD_PAIR_BOOLEAN("PacketBadOpt", server->packet_bad_opt), + SD_JSON_BUILD_PAIR_BOOLEAN("PacketRRSIGMissing", server->packet_rrsig_missing), + SD_JSON_BUILD_PAIR_BOOLEAN("PacketInvalid", server->packet_invalid), + SD_JSON_BUILD_PAIR_BOOLEAN("PacketDoOff", server->packet_do_off))); } |