1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-29 02:49:01 +00:00

Upgrade libpcap to version 1.0.0.

This commit is contained in:
david
2009-10-27 19:33:50 +00:00
parent a56ff60c50
commit 9a1ec98da3
145 changed files with 22384 additions and 17731 deletions

View File

@@ -24,7 +24,7 @@
#ifndef lint
static const char rcsid[] _U_ =
"@(#) $Header: /tcpdump/master/libpcap/nametoaddr.c,v 1.77.2.4 2007/06/11 09:52:05 guy Exp $ (LBL)";
"@(#) $Header: /tcpdump/master/libpcap/nametoaddr.c,v 1.82.2.1 2008/02/06 10:21:47 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -80,7 +80,7 @@ struct rtentry; /* declarations in <net/if.h> */
#include "pcap-int.h"
#include "gencode.h"
#include <pcap-namedb.h>
#include <pcap/namedb.h>
#ifdef HAVE_OS_PROTO_H
#include "os-proto.h"
@@ -398,7 +398,15 @@ __pcap_atodn(const char *s, bpf_u_int32 *addr)
}
/*
* Convert 's' which has the form "xx:xx:xx:xx:xx:xx" into a new
* Convert 's', which can have the one of the forms:
*
* "xx:xx:xx:xx:xx:xx"
* "xx.xx.xx.xx.xx.xx"
* "xx-xx-xx-xx-xx-xx"
* "xxxx.xxxx.xxxx"
* "xxxxxxxxxxxx"
*
* (or various mixes of ':', '.', and '-') into a new
* ethernet address. Assumes 's' is well formed.
*/
u_char *
@@ -410,7 +418,7 @@ pcap_ether_aton(const char *s)
e = ep = (u_char *)malloc(6);
while (*s) {
if (*s == ':')
if (*s == ':' || *s == '.' || *s == '-')
s += 1;
d = xdtoi(*s++);
if (isxdigit((unsigned char)*s)) {