aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gencode.c6
-rw-r--r--nametoaddr.c8
-rw-r--r--pcap-namedb.h7
3 files changed, 10 insertions, 11 deletions
diff --git a/gencode.c b/gencode.c
index e5fccc3..e1b5ad5 100644
--- a/gencode.c
+++ b/gencode.c
@@ -21,7 +21,7 @@
*/
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.106 2000-04-27 09:11:11 itojun Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.107 2000-04-27 09:18:57 itojun Exp $ (LBL)";
#endif
#include <sys/types.h>
@@ -2040,7 +2040,7 @@ gen_scode(name, q)
return b;
#else
memset(&mask128, 0xff, sizeof(mask128));
- res0 = res = pcap_nametoaddr(name);
+ res0 = res = pcap_nametoaddrinfo(name);
if (res == NULL)
bpf_error("unknown host '%s'", name);
b = tmp = NULL;
@@ -2294,7 +2294,7 @@ gen_mcode6(s1, s2, masklen, q)
if (s2)
bpf_error("no mask %s supported", s2);
- res = pcap_nametoaddr(s1);
+ res = pcap_nametoaddrinfo(s1);
if (!res)
bpf_error("invalid ip6 address %s", s1);
if (res->ai_next)
diff --git a/nametoaddr.c b/nametoaddr.c
index 8ec6ba9..8cc0120 100644
--- a/nametoaddr.c
+++ b/nametoaddr.c
@@ -24,7 +24,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/libpcap/nametoaddr.c,v 1.51 1999-11-25 08:25:35 itojun Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/nametoaddr.c,v 1.52 2000-04-27 09:18:58 itojun Exp $ (LBL)";
#endif
#include <sys/param.h>
@@ -74,7 +74,6 @@ static inline int xdtoi(int);
* Convert host name to internet address.
* Return 0 upon failure.
*/
-#ifndef INET6
bpf_u_int32 **
pcap_nametoaddr(const char *name)
{
@@ -98,9 +97,10 @@ pcap_nametoaddr(const char *name)
else
return 0;
}
-#else
+
+#ifdef INET6
struct addrinfo *
-pcap_nametoaddr(const char *name)
+pcap_nametoaddrinfo(const char *name)
{
struct addrinfo hints, *res;
int error;
diff --git a/pcap-namedb.h b/pcap-namedb.h
index d08a69b..ccd21fd 100644
--- a/pcap-namedb.h
+++ b/pcap-namedb.h
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * @(#) $Header: /tcpdump/master/libpcap/pcap-namedb.h,v 1.6 1999-10-19 15:18:31 itojun Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/libpcap/pcap-namedb.h,v 1.7 2000-04-27 09:18:58 itojun Exp $ (LBL)
*/
#ifndef lib_pcap_ethers_h
@@ -54,10 +54,9 @@ struct pcap_etherent *pcap_next_etherent(FILE *);
u_char *pcap_ether_hostton(const char*);
u_char *pcap_ether_aton(const char *);
-#ifndef INET6
bpf_u_int32 **pcap_nametoaddr(const char *);
-#else
-struct addrinfo *pcap_nametoaddr(const char *);
+#ifdef INET6
+struct addrinfo *pcap_nametoaddrinfo(const char *);
#endif
bpf_u_int32 pcap_nametonetaddr(const char *);