Files
2017-07-19 14:08:03 +02:00

30 lines
624 B
C++

#ifndef GB_GBDNS_H
#define GB_GBDNS_H
#include <vector>
#include <string>
#include <netinet/in.h>
namespace GbDns {
struct DnsResponse {
DnsResponse();
std::vector<in_addr_t> m_ips;
std::vector<std::string> m_nameservers;
int m_errno;
};
bool initialize();
bool initializeSettings();
void finalize();
void getARecord(const char *hostname, size_t hostnameLen, void (*callback)(DnsResponse *response, void *state), void *state);
void getNSRecord(const char *hostname, size_t hostnameLen, void (*callback)(DnsResponse *response, void *state), void *state);
void makeCallbacks();
};
#endif //GB_GBDNS_H