| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
| | |
| | |
| | |
| | |
| | | |
If we can't allocate the list of DLT_ values, format a message; if
PCAP_ERROR is returned, the caller will expect pcap_geterr() to return a
pointer to an appropriate error message.
|
| | |
| | |
| | |
| | |
| | |
| | | |
If you have only one DLT_ per interface, you don't need to construct a
list containing that DLT_; pcap_list_datalinks() will construct a
one-element list containing that DLT_ and provide it to the caller.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The only thing DLT_LINUX_SLL2 adds is the interface index and, if we're
falling back on cooked captures just because we don't have a DLT_ to
which to map the ARPHRD_ type, we're capturing on a single device and
the interface index adds no additional information.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Don't overwrite PCAP_WARNING_ codes with 0 (success).
While we're at it, clean up some leftovers from when we supported older
Linux kernels and failures to, for example, set up PF_PACKET sockets or
to set up a memory-mapped buffer meant "fall back on older mechanisms"
rather than "fail".
|
| | |
| | |
| | |
| | |
| | |
| | | |
Only test for "I don't know what DLT to map this ARPHRD to" case once
and, if we don't know that, set the error message and arrange that we
return PCAP_WARNING.
|
| | |
| | |
| | |
| | | |
[skip ci]
|
| | |
| | |
| | |
| | | |
Set the date stamp appropriately while at it.
|
| | |
| | |
| | |
| | | |
[skip ci]
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
There's no good run-time test, so we test at configure time, by checking
whether /usr/include/inet/ipnet.h exists and contains IPNET_ANY_LINK.
See https://github.com/the-tcpdump-group/tcpdump/issues/1057#issuecomment-1584088911
We make a common routine to use to add that device.
|
| | |
| | |
| | |
| | |
| | | |
Thanks for changing the error code, and thanks for promptly telling us
that you did so!
|
| | |
| | |
| | |
| | | |
[skip ci]
|
| | |
| | |
| | |
| | |
| | |
| | | |
No need for the SDK to be unpacked into a directory whose name contains
the SDK version; leaving the SDK version reduces the number of places
you have to change if you go to a newversion of the SDK.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
One advantage of d7f44c5f8328a3979286ed2715f900a3a556001f is that it
revealed that we were installing the 1.13 Npcap SDK and trying to
configure with the 1.12 SDK; now that doing so fails, the build fails.
Fix that, so we use the same SDK as we install.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
On Windows, tell the user that they need to install Npcap or WinPcap,
and the respective SDK, and tell CMake where the SDK is located. On
UN*X, tell them to check INSTALL.md.
In addition, tell the user to set the capture type to "null" when
configuring if they just want a version of libpcap that can read capture
files but can't do live captures.
That way, the user won't be surprised at run time by a libpcap that
fails with "live packet capture not supported on this system" if they
try to capture traffic.
Fixes #1016 (in the sense that configuration stops if a capture
mechanism can't be found, and tells the user what they need to do).
|
| | |
| | |
| | |
| | |
| | |
| | | |
Reminder: bpf_error() do a longjmp().
This change should fix Coverity CID 1529951.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The warnings were like:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
With the current behavior, we log the error,
but try to scan the string anyway.
We need to quit if the scanner cannot be initialized.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
install-sh has no longer a tab at the end of one line.
This is a follow-up to b46c2cfc9a1968e61d628ce03b2d919a1136013f.
diff --git a/Makefile.in b/Makefile.in
index cd0f01c3..80f5bc82 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -546,8 +546,7 @@ whitespacecheck:
exit 1; \
fi
@# trailing tab(s)?
- @# install-sh has a tab at the end of one line
- @if git grep -I -n ' $$' $$(git ls-files|grep -vE '^(tests/|install-sh$$)'); then \
+ @if git grep -I -n ' $$' $$(git ls-files|grep -v '^tests/'); then \
echo 'Error: Trailing tabs(s).'; \
exit 1; \
fi
.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The version of install-sh we have was made over 2 decades ago,
and last edited 9 years ago.
I updated the script by running autoreconf -fiv on autoconf 2.71,
and autoreconf automatically updated the script.
|
|\ \ \
| | | |
| | | | |
Add a routine to use as an atexit() routine to clean up Winsock 2.
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Wrap WSACleanup() in a routine that calls it but returns nothing, so
that the wrapper has the right type for an atexit() routine.
This is cleaner that casting a pointer to WSACleanup(), and should avoid
warnings from VS 2022.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This gives it a name similar to the other README.{operatingsystem}
files.
It also reflects that 1) 16-bit Windows is now so old and tired that
there's no need to use a name that specifically mentions a non-16-bit
version of Windows to indicates that we don't support it and 2) there's
now 64-bit Windows, so "Win32" is an out-of-date name.
|
| | |
| | |
| | |
| | |
| | | |
This avoids potential and, in one case (SIMH), actual collisions with
names in other libraries or in applications using libpcap.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This part is in line with the draft-ietf-opsawg-pcap.
Moreover:
Update some comments.
Update pcap-sita.html.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This reverts commit c2dfd817646d071bf62a3968a0454301e5395d18.
From a Denis remark: struct pcap_file_header is in a public header.
pcap-savefile.manfile.in will be updated separately.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The warning/error was:
./findalldevstest.c:193:8: error: unused variable 'ipv6_buf'
[-Werror,-Wunused-variable]
char ipv6_buf[INET6_ADDRSTRLEN];
^
|
| | |
| | |
| | |
| | |
| | |
| | | |
Update pcap-savefile.manfile.in accordingly.
This is in line with the draft-ietf-opsawg-pcap.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This change should avoid these cppcheck warnings:
pcap-hurd.c:77:18: warning: 'p->buffer' is of type 'void *'. When using
void pointers in calculations, the behaviour is undefined.
[arithOperationsOnVoidPointer]
pkt = p->buffer + offsetof(struct net_rcv_msg, packet)
^
pcap-hurd.c:78:8: warning: 'p->buffer+offsetof(struct net_rcv_msg,packet)'
is of type 'void *'. When using void pointers in calculations, the
behaviour is undefined. [arithOperationsOnVoidPointer]
+ sizeof(struct packet_header) - ETH_HLEN;
^
pcap-hurd.c:79:25: warning: 'p->buffer' is of type 'void *'. When using
void pointers in calculations, the behaviour is undefined.
[arithOperationsOnVoidPointer]
memmove(pkt, p->buffer + offsetof(struct net_rcv_msg, header),
^
Remove some '(u_char *)' casts accordingly.
|
| | |
| | |
| | |
| | | |
This quiets the compiler since it is not even returned anyway, and is a misleading variable name.
|
| | | |
|
|\ \ \
| | | |
| | | | |
Work around a bug in Npcap 1.00 in case of driver version mismatch
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Use the intended date types for variables passed as or compared to other types
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
build.sh: remove the check for Clang 15 and 16.
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | | |
We're working around the warning they produce for yynerrs in the parser
being set but not used.
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
compiler: squelch set-but-not-used warning for yynerrs.
|
|/ / / / |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Valgrind does not like binaries produced by Clang 15:
$ valgrind --leak-check=full --error-exitcode=1 testprogs/findalldevstest
==23242== Memcheck, a memory error detector
==23242== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==23242== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==23242== Command: testprogs/findalldevstest
==23242==
==23242== Valgrind: debuginfo reader: ensure_valid failed:
==23242== Valgrind: during call to ML_(img_get)
==23242== Valgrind: request for range [70669806, +4) exceeds
==23242== Valgrind: valid image size of 1078392 for image:
==23242== Valgrind: "/tmp/cirrus-ci-build/testprogs/findalldevstest"
==23242==
==23242== Valgrind: debuginfo reader: Possibly corrupted debuginfo file.
==23242== Valgrind: I can't recover. Giving up. Sorry.
|
|\ \ \ \
| | | | |
| | | | | |
compiler: limit some Berkeley YACC workarounds to pre-2017-07-09 releases.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Those later releases only define yydebug if YYDEBUG is defined and only
declare yynerrs as global for non-reentrant parsers, so limit the
workarounds for those problems to releases before the 1.9 20170709
release.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Switch to FreeBSD 13.2 and size it down as in tcpdump much earlier.
Switch Clang to 15 in FreeBSD and Linux (for some reason there was no
pkg error in this project, but it makes sense to upgrade consistently
anyway).
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This reverts commit c7f7036094bf9c48fdfa803085857a35753e938f.
This is a follow-up to 5e6aead918140299fd5b12c74dd4c728732ab47d.
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This should avoid, with autotools, when doing parallel builds:
make[2]: *** No rule to make target '../libpcap.a', needed by
'valgrindtest'. Stop.
|