Rework DNS_Mgr API to be more consistent and to support more request types

This commit is contained in:
Tim Wojtulewicz 2022-01-11 17:07:19 -07:00
parent 336c6ae5c2
commit 9f197aa458
6 changed files with 920 additions and 721 deletions

View file

@ -15,7 +15,7 @@ class DNS_Mapping
{
public:
DNS_Mapping() = delete;
DNS_Mapping(const char* host, struct hostent* h, uint32_t ttl);
DNS_Mapping(std::string host, struct hostent* h, uint32_t ttl);
DNS_Mapping(const IPAddr& addr, struct hostent* h, uint32_t ttl);
DNS_Mapping(FILE* f);
@ -35,6 +35,7 @@ public:
StringValPtr Host();
double CreationTime() const { return creation_time; }
uint32_t TTL() const { return req_ttl; }
void Save(FILE* f) const;