/usr/include/measurement_kit/dns/query.hpp is in libmeasurement-kit-dev 0.7.1-2build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | // Part of measurement-kit <https://measurement-kit.github.io/>.
// Measurement-kit is free software. See AUTHORS and LICENSE for more
// information on the copying conditions.
#ifndef MEASUREMENT_KIT_DNS_QUERY_HPP
#define MEASUREMENT_KIT_DNS_QUERY_HPP
#include <measurement_kit/dns/query_class.hpp>
#include <measurement_kit/dns/query_type.hpp>
#include <measurement_kit/common.hpp>
namespace mk {
namespace dns {
class Answer {
public:
QueryType type;
QueryClass qclass;
int code = 0;
uint32_t ttl = 0;
std::string name;
std::string ipv4; ///< For A records
std::string ipv6; ///< For AAAA records
std::string hostname; ///< For PTR, SOA and CNAME records
std::string responsible_name; ///< For SOA records
uint32_t serial_number; ///< For SOA records
uint32_t refresh_interval; ///< For SOA records
uint32_t retry_interval; ///< For SOA records
uint32_t minimum_ttl; ///< For SOA records
uint32_t expiration_limit; ///< For SOA records
};
class Query {
public:
QueryType type;
QueryClass qclass;
uint32_t ttl = 0;
std::string name;
};
class Message {
public:
Message(){};
Message(std::nullptr_t){};
double rtt = 0.0;
int error_code = 66 /* This is evdns's generic error */;
std::vector<Answer> answers;
std::vector<Query> queries;
};
void query(
QueryClass dns_class,
QueryType dns_type,
std::string name,
Callback<Error, Var<Message>> func,
Settings settings = {},
Var<Reactor> reactor = Reactor::global(),
Var<Logger> logger = Logger::global()
);
} // namespace dns
} // namespace mk
#endif
|