Add merging to DNS_Mgr::AddResult() to support both ipv4 and ipv6 responses simultaneously

This commit is contained in:
Tim Wojtulewicz 2022-01-27 14:44:30 -07:00
parent 9f197aa458
commit 3bdc744b14
4 changed files with 120 additions and 60 deletions

View file

@ -218,8 +218,11 @@ public:
* @param dr The request associated with the result.
* @param h A hostent structure containing the actual result data.
* @param ttl A ttl value contained in the response from the server.
* @param merge A flag for whether these results should be merged into
* an existing mapping. If false, AddResult will attempt to replace the
* existing mapping with the new data and delete the old mapping.
*/
void AddResult(DNS_Request* dr, struct hostent* h, uint32_t ttl);
void AddResult(DNS_Request* dr, struct hostent* h, uint32_t ttl, bool merge = false);
/**
* Returns an empty set of addresses, used in various error cases and during