clean: remove dns lookup

This commit is contained in:
2025-11-19 08:11:46 -06:00
parent 5da4efc3e8
commit 3c66cc9884
3 changed files with 1 additions and 19 deletions

View File

@ -32,19 +32,3 @@ int dns_lookup(struct hostenv *host)
return 0;
}
int dns_reverse_lookup(struct hostenv *host)
{
int ret = getnameinfo(
(struct sockaddr *)&host->ip, sizeof(host->ip),
host->reverse_dns, sizeof(host->reverse_dns),
NULL, 0, NI_NAMEREQD);
if (ret != 0)
{
print_err("reverse dns failed.");
return 1;
}
return 0;
}

View File

@ -3,4 +3,3 @@
#include "host.h"
int dns_lookup(struct hostenv *host);
int dns_reverse_lookup(struct hostenv *host);

View File

@ -7,5 +7,4 @@ struct hostenv {
char ipstr[INET_ADDRSTRLEN];
struct sockaddr_in ip;
char *hostname;
char reverse_dns[NI_MAXHOST];
};