From 5a77419f3926baee6d2116ae2ec52a05ece999e1 Mon Sep 17 00:00:00 2001 From: David Cantrell Date: Fri, 28 Jul 2006 19:00:39 +0000 Subject: * isys/dns.c: Removed code that's not in use anymore. * loader2/ftp.c: Notes to myself. --- isys/dns.c | 32 -------------------------------- 1 file changed, 32 deletions(-) (limited to 'isys') diff --git a/isys/dns.c b/isys/dns.c index b52241254..200360e0d 100644 --- a/isys/dns.c +++ b/isys/dns.c @@ -9,7 +9,6 @@ /* This is dumb, but glibc doesn't like to do hostname lookups w/o libc.so */ -#ifndef DIET union dns_response{ HEADER hdr; u_char buf[PACKETSZ]; @@ -153,37 +152,6 @@ int mygethostbyname(char * name, struct in_addr * addr) { return doQuery(name, T_A, NULL, addr); } -#else -#include -#include -#include - -int mygethostbyname(char * host, struct in_addr * address) { - struct hostent * hostinfo; - - hostinfo = gethostbyname(host); - if (!hostinfo) return 1; - - memcpy(address, hostinfo->h_addr_list[0], hostinfo->h_length); - return 0; -} - -char * mygethostbyaddr(const char * ipnum) { - struct hostent * he; - struct in_addr addr; - - if (!inet_aton(ipnum, &addr)) - return NULL; - - he = gethostbyaddr(&addr, sizeof(struct in_addr), AF_INET); - if (he) - return he->h_name; - else - return NULL; -} - -#endif - #if 0 int main(int argc, char **argv) -- cgit