1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-04 21:59: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

@@ -11,7 +11,7 @@
* it been given an infinite-sized buffer.
*/
int
pcap_vasprintf(char **strp, const char *format, va_list args)
pcapint_vasprintf(char **strp, const char *format, va_list args)
{
char buf;
int len;
@@ -21,7 +21,7 @@ pcap_vasprintf(char **strp, const char *format, va_list args)
/*
* XXX - the C99 standard says, in section 7.19.6.5 "The
* nprintf function":
* snprintf function":
*
* The snprintf function is equivalent to fprintf, except that
* the output is written into an array (specified by argument s)
@@ -88,13 +88,13 @@ pcap_vasprintf(char **strp, const char *format, va_list args)
}
int
pcap_asprintf(char **strp, const char *format, ...)
pcapint_asprintf(char **strp, const char *format, ...)
{
va_list args;
int ret;
va_start(args, format);
ret = pcap_vasprintf(strp, format, args);
ret = pcapint_vasprintf(strp, format, args);
va_end(args);
return (ret);
}

View File

@@ -1,4 +1,4 @@
/* $OpenBSD: pcap_strlcat.c,v 1.15 2015/03/02 21:41:08 millert Exp $ */
/* $OpenBSD: strlcat.c,v 1.15 2015/03/02 21:41:08 millert Exp $ */
/*
* Copyright (c) 1998, 2015 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -16,9 +16,7 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stddef.h>
#include <string.h>
@@ -33,7 +31,7 @@
* If retval >= dsize, truncation occurred.
*/
size_t
pcap_strlcat(char * restrict dst, const char * restrict src, size_t dsize)
pcapint_strlcat(char * restrict dst, const char * restrict src, size_t dsize)
{
const char *odst = dst;
const char *osrc = src;

View File

@@ -1,4 +1,4 @@
/* $OpenBSD: pcap_strlcpy.c,v 1.12 2015/01/15 03:54:12 millert Exp $ */
/* $OpenBSD: strlcpy.c,v 1.12 2015/01/15 03:54:12 millert Exp $ */
/*
* Copyright (c) 1998, 2015 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -16,9 +16,7 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stddef.h>
#include <string.h>
@@ -31,7 +29,7 @@
* Returns strlen(src); if retval >= dsize, truncation occurred.
*/
size_t
pcap_strlcpy(char * restrict dst, const char * restrict src, size_t dsize)
pcapint_strlcpy(char * restrict dst, const char * restrict src, size_t dsize)
{
const char *osrc = src;
size_t nleft = dsize;

View File

@@ -34,14 +34,12 @@
* From: @(#)strtok.c 8.1 (Berkeley) 6/4/93
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "portability.h"
char *
pcap_strtok_r(char *s, const char *delim, char **last)
pcapint_strtok_r(char *s, const char *delim, char **last)
{
char *spanp, *tok;
int c, sc;

View File

@@ -5,7 +5,7 @@
#include "portability.h"
int
pcap_vasprintf(char **strp, const char *format, va_list args)
pcapint_vasprintf(char **strp, const char *format, va_list args)
{
int len;
size_t str_size;
@@ -39,13 +39,13 @@ pcap_vasprintf(char **strp, const char *format, va_list args)
}
int
pcap_asprintf(char **strp, const char *format, ...)
pcapint_asprintf(char **strp, const char *format, ...)
{
va_list args;
int ret;
va_start(args, format);
ret = pcap_vasprintf(strp, format, args);
ret = pcapint_vasprintf(strp, format, args);
va_end(args);
return (ret);
}