| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
The problem only appears in the html conversion.
Use .nf (no-fill) mode.
|
|
|
|
|
|
| |
Found with the codespell command.
[skip ci]
|
|\
| |
| | |
Add support for Realtek (Ethertype) DSA data
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Realtek switchtag rtl4a (4 bytes long, protocol 0xA) and rtl8_4 (8 bytes
long, protocol 0x04) are Ethertype DSA tags, inserted in the Ethernet
header similar to an 802.1Q tag. Both shares the same Ethertype 0x8899
as other Realtek proprietary protocols.
Realtek switchtag rtl8_4t is identical to rtl8_4 but positioned before
the CRC, at the end of the Ethernet frame.
|
|\ \
| | |
| | | |
nflog: only increment packets_nobufs when recv() returns an error
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Errno should only be valid when recv() returns a `-1`, indicating an
error.
I believe the intended behavior here is for packets_nobufs to
be a counter that reports back how many times recv() returns
an ENOBUFS during a packet capture. Because of the existing logic
however, packets_nobufs begins incrementing for every recv() call
once the first ENOBUFS error is seen, since errno is not reset when
there are no errors returned from recv().
Before (counter deviates from strace):
# tcpdump output
38069 packets captured
38069 packets received by filter
38061 packets dropped by kernel
# strace output
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
26.47 0.282728 7 38067 3 recvfrom
After (counter matches strace):
# tcpdump output
38095 packets captured
38095 packets received by filter
7 packets dropped by kernel
# strace output
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
27.11 0.258596 6 38096 7 recvfrom
|
| | | |
|
| | |
| | |
| | |
| | | |
[skip ci]
|
| | |
| | |
| | |
| | |
| | |
| | | |
Update based on draft-ietf-opsawg-pcap.
[skip ci]
|
| | | |
|
| | |
| | |
| | |
| | | |
Fix a typo (= when == was intended) while we're at it.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If map_arphrd_to_dlt() fails, free sock_fd before returning the error
status, as we do elsewhere.
Fixes Coverity CID 1539177.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Do it with a bunch of ifs rather than with a translation table; that
lets the logic work differently for DLT_ -> LINKTYPE_ mapping and
LINKTYPE_ -> DLT_ mapping.
Have two "matching" ranges, so that the linktypes that preceded the BSDs
all going off in their own directions can be handled as a matching
range.
Avoid doing mapping if the corresponding LINKTYPE_ and DLT_ codes have
the same numerical value.
For LINKTYPE_ -> DLT_ mapping, don't map link-layer type values outside
either of the matching ranges if we don't have a specific mapping set up
for them, just treat the LINKTYPE_ value as if it's a DLT_ value. That
makes us handle some DLT_ codes outside the high mapping range to which
we assigned matching LINKTYPE_ codes, as well as attempting, as best we
can, files written with platform-dependent DLT_ codes (such as DLT_RAW)
as link-layer type codes (programs *on that platform* will handle them
correctly; programs will not do so on other platforms, but that's better
than not handling them correctly anywhere).
Update various comments.
|
| | |
| | |
| | |
| | |
| | |
| | | |
-Wnull-pointer-subtraction
-Wunused-but-set-parameter
-Wunused-but-set-variable
|
| | | |
|
|\ \ \
| | | |
| | | | |
MSDOS packet driver interface is no longer testable
|
| | | | |
|
| | | | |
|
| | | | |
|
|/ / /
| | |
| | |
| | | |
a previous version
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When adding values whose sum might overflow an unsigned integer, first
check whether the sum *would* overflow an unsigned integer and, if so,
clamp the sum at UINT_MAX.
Do the same for a multiplication.
This should fix #1134, as well as the issue in #1205.
|
|\ \ \
| | | |
| | | | |
Numeric truncation at `pcap-util.c:374`
|
|/ / / |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Apple appears to have tweaked their pcap/funcattrs.h to do the right
thing at some point, so 1) there's no need to urge them to do so any
more and 2) they only seem to export libpcap APIs in macOS, so redo the
PCAP_AVAILABLE() stuff to be more like what they've done.
We remove the include of <Availability.h>, as we don't need it ourselves
(we don't do the availability stuff in our releases, for reasons given
in the comment before the availability stuff), and Apple uses
<os/availability.h> - we leave it up to them to modify the header, just
as they do with, for example, ZLib's zlib.h.
(Many thanks to the Apple people who picked this up!)
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
There are CI platforms that are useful for doing Windows CI using Visual
Studio. It appears that Cirrus CI is not one of them, as they don't
appear to have images with VS pre-installed, and it does appear that
using Chocolatey to install it takes a long time.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Apparently the container starts out pretty bare-bones, with just
Chocolatey and git+git-bash. Everything else, *including Visual
Studio*, is up to you.
Thanks for documenting this so well, Cirrus folks! (Note: not
mentioning Visual Studio is inequivalent to mentioning that it's not
part of the container.)
|
| | |
| | |
| | |
| | | |
Why the obsession with hiding directories, Cirrus CI?
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
That's probably where Visual Studio is hiding, and we'll probably have
to run the vcvars.bat script to get the directory containing cl.exe into
the Windows path.
(And the paths for stuff under C:\Program Files\Git looks weird because
that stuff appears under / in git-bash; that's not the problem.)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
There's too much stuff under there; look at the directories that appear
in the Windows PATH. Look at the new stuff in the UN*X path as well; it
might be that C:\Program Files\Git is the MinGW/MSYS2 root, so the UN*X
PATH isn't getting mangled. (And it may be that the failure to find
cmake may be that cmake isn't installed by default, so we'd have to
choco it or something such as that. It'd be nice if it were installed
as part of Visual Studio in the containers.)
|
| | |
| | |
| | |
| | |
| | | |
Where are the programs we need hidden, and how do we get those locations
into $PATH?
|
| | |
| | |
| | |
| | |
| | |
| | | |
It's run by /etc/profile.
Get rid of the overwrite of /etc/profile.
|
| | |
| | |
| | |
| | | |
That should cause /etc/profile to be run.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
If so, we can then do our own path construction from it, overriding the
garbage that we're getting from the system.
|
| | |
| | |
| | |
| | |
| | | |
It doesn't show up in env's output, but maybe, just maybe, please?,
it'll be available.
|