]> The Tcpdump Group git mirrors - tcpdump/commit
pflog: handle all types of pflog files, as best as can be done.
authorGuy Harris <[email protected]>
Tue, 17 Dec 2024 08:22:06 +0000 (00:22 -0800)
committerGuy Harris <[email protected]>
Tue, 17 Dec 2024 08:22:06 +0000 (00:22 -0800)
commit5b278cfa3e6f02773b95eb7ae2f3d8a46f1ae752
tree433d5083ebdfcb475a5680a87a1a7b4055930041
parenteefe51e56eeeed88cec9a7fdfefa4e7744372d87
pflog: handle all types of pflog files, as best as can be done.

We can distinguish between FreeBSD, OpenBSD, and everything else
(NetBSD, DragonFly BSD, and Darwin) based on the length field in the
header.

For NetBSD, DragonFly BSD, and Darwin, the differences are the meaning
of certain reason and action codes; we just mark those with the OSes and
meanings, so the user will have to figure out whether reason code 15 is
"state-locked' (NetBSD)" or "dummynet" (Darwin)". The other ones
shouldn't occur on OSes other than Darwin, but we mark it just in case
they do.

Fix the handling of "UID not present"; that's 0xFFFFFFFFU in FreeBSD,
OpenBSD, and DragonFly BSD, but it's 0x7FFFFFFFU in NetBSD and Darwin,
so for "neither NetBSD nor OpenBSD" we check for both of those values.

Do the checks for minimum and maximum header lengths before we round
the header length up.
CHANGES
print-pflog.c