clean: remove dns lookup
This commit is contained in:
16
src/dns.c
16
src/dns.c
@ -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;
|
||||
}
|
||||
@ -3,4 +3,3 @@
|
||||
#include "host.h"
|
||||
|
||||
int dns_lookup(struct hostenv *host);
|
||||
int dns_reverse_lookup(struct hostenv *host);
|
||||
@ -7,5 +7,4 @@ struct hostenv {
|
||||
char ipstr[INET_ADDRSTRLEN];
|
||||
struct sockaddr_in ip;
|
||||
char *hostname;
|
||||
char reverse_dns[NI_MAXHOST];
|
||||
};
|
||||
Reference in New Issue
Block a user