1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-15 12:19:02 +00:00

Update libpcap to 1.10.5

This commit is contained in:
dmiller
2025-04-14 19:06:54 +00:00
parent 2bc341de52
commit aed27d094e
141 changed files with 12626 additions and 9811 deletions

View File

@@ -92,7 +92,7 @@ static int ref_count = 0;
static u_long mac_count = 0;
static u_long filter_count = 0;
static volatile BOOL exc_occured = 0;
static volatile BOOL exc_occurred = 0;
static struct device *handle_to_device [20];
@@ -250,7 +250,7 @@ pcap_read_one (pcap_t *p, pcap_handler callback, u_char *data)
}
}
while (!exc_occured)
while (!exc_occurred)
{
volatile struct device *dev; /* might be reset by sig_handler */
@@ -480,7 +480,7 @@ static void pcap_cleanup_dos (pcap_t *p)
{
struct pcap_dos *pd;
if (!exc_occured)
if (!exc_occurred)
{
pd = p->priv;
if (pcap_stats(p,NULL) < 0)
@@ -599,7 +599,7 @@ int pcap_platform_finddevs (pcap_if_list_t *devlistp, char *errbuf)
* a wired device, and set PCAP_IF_CONNECTION_STATUS_CONNECTED
* or PCAP_IF_CONNECTION_STATUS_DISCONNECTED?
*/
if ((curdev = add_dev(devlistp, dev->name, 0,
if ((curdev = pcap_add_dev(devlistp, dev->name, 0,
dev->long_name, errbuf)) == NULL)
{
ret = -1;
@@ -618,7 +618,7 @@ int pcap_platform_finddevs (pcap_if_list_t *devlistp, char *errbuf)
broadaddr = (struct sockaddr*) &sa_ll_2;
memset (&sa_ll_2.sin_addr, 0xFF, sizeof(sa_ll_2.sin_addr));
if (add_addr_to_dev(curdev, addr, sizeof(*addr),
if (pcap_add_addr_to_dev(curdev, addr, sizeof(*addr),
netmask, sizeof(*netmask),
broadaddr, sizeof(*broadaddr),
dstaddr, sizeof(*dstaddr), errbuf) < 0)
@@ -663,7 +663,7 @@ void pcap_set_wait (pcap_t *p, void (*yield)(void), int wait)
}
/*
* Initialise a named network device.
* Initialize a named network device.
*/
static struct device *
open_driver (const char *dev_name, char *ebuf, int promisc)
@@ -741,7 +741,7 @@ not_probed:
}
/*
* Deinitialise MAC driver.
* Deinitialize MAC driver.
* Set receive mode back to default mode.
*/
static void close_driver (void)
@@ -803,7 +803,7 @@ static void exc_handler (int sig)
default:
fprintf (stderr, "Catching signal %d.\n", sig);
}
exc_occured = 1;
exc_occurred = 1;
close_driver();
}
#endif /* __DJGPP__ */
@@ -850,7 +850,7 @@ static int first_init (const char *name, char *ebuf, int promisc)
#ifdef USE_32BIT_DRIVERS
/*
* If driver is NOT a 16-bit "pkt/ndis" driver (having a 'copy_rx_buf'
* set in it's probe handler), initialise near-memory ring-buffer for
* set in it's probe handler), initialize near-memory ring-buffer for
* the 32-bit device.
*/
if (dev->copy_rx_buf == NULL)
@@ -1001,7 +1001,7 @@ static int init_watt32 (struct pcap *pcap, const char *dev_name, char *err_buf)
has_ip_addr = (rc != 8); /* IP-address assignment failed */
/* if pcap is using a 32-bit driver w/o a pktdrvr loaded, we
* just pretend Watt-32 is initialised okay.
* just pretend Watt-32 is initialized okay.
*
* !! fix-me: The Watt-32 config isn't done if no pktdrvr
* was found. In that case my_ip_addr + sin_mask
@@ -1295,7 +1295,7 @@ struct device tc90xbc_dev LOCKED_VAR = {
struct device wd_dev LOCKED_VAR = {
"wd",
"Westen Digital",
"Western Digital",
0,
0,0,0,0,0,0,
&tc90xbc_dev,