mirror of
https://github.com/nmap/nmap.git
synced 2026-01-28 00:59:04 +00:00
Upgrade libpcap to 1.10.4
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "pcap-int.h"
|
||||
#include "pcap-util.h"
|
||||
|
||||
#include "pcap-common.h"
|
||||
|
||||
@@ -1094,7 +1095,7 @@ pcap_ng_cleanup(pcap_t *p)
|
||||
|
||||
/*
|
||||
* Read and return the next packet from the savefile. Return the header
|
||||
* in hdr and a pointer to the contents in data. Return 0 on success, 1
|
||||
* in hdr and a pointer to the contents in data. Return 1 on success, 0
|
||||
* if there were no more packets, and -1 on an error.
|
||||
*/
|
||||
static int
|
||||
@@ -1123,7 +1124,7 @@ pcap_ng_next_packet(pcap_t *p, struct pcap_pkthdr *hdr, u_char **data)
|
||||
*/
|
||||
status = read_block(fp, p, &cursor, p->errbuf);
|
||||
if (status == 0)
|
||||
return (1); /* EOF */
|
||||
return (0); /* EOF */
|
||||
if (status == -1)
|
||||
return (-1); /* error */
|
||||
switch (cursor.block_type) {
|
||||
@@ -1511,8 +1512,7 @@ found:
|
||||
if (*data == NULL)
|
||||
return (-1);
|
||||
|
||||
if (p->swapped)
|
||||
swap_pseudo_headers(p->linktype, hdr, *data);
|
||||
pcap_post_process(p->linktype, p->swapped, hdr, *data);
|
||||
|
||||
return (0);
|
||||
return (1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user