aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2022-01-29 22:30:33 -0800
committerGuy Harris <gharris@sonic.net>2022-03-19 18:37:42 -0700
commit74587e9bcd198223080326383926b412f86c6846 (patch)
tree2ec6ee365d6b755884e9ab78bdc3af155fad05b7 /CMakeLists.txt
parent55fb258d79a9876e61a8c62659340cba300211b7 (diff)
downloadtcpdump-74587e9bcd198223080326383926b412f86c6846.tar.gz
Handle DLT_PFLOG on all OSes.
Don't pad the pflog header with BPF_WORDALIGN(); round up to a multiple of 4, instead, as that's what all but FreeBSD do, and FreeBSD used to do that and should go back to doing so (kern/261566). Don't rely on the OS's pflog include files to define direction types, reason types, action types, or the layout of the header; instead, define them ourselves in a header of our own, with #ifs to select the ones that are only on some platforms. That way, it'll handle some fields and field values (the ones common to all OSes with pflog) on all OSes, even ones without pflog. That also expands the set of direction, reason, and action codes to what various *BSDs and Darwin support. Also, handle all the different AF_INET6 values in various *BSDs and Darwin. (cherry picked from commit fe762c04a6d3bbf7f1a21ebf825075e2fb201acc)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 1 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7a4acec7..775ff4b7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -275,15 +275,6 @@ check_include_file(net/if.h HAVE_NET_IF_H)
if(HAVE_RPC_RPC_H)
check_include_files("rpc/rpc.h;rpc/rpcent.h" HAVE_RPC_RPCENT_H)
endif(HAVE_RPC_RPC_H)
-if(NOT WIN32)
- check_include_files("sys/types.h;sys/socket.h;net/if.h;net/pfvar.h" HAVE_NET_PFVAR_H)
- if(HAVE_NET_PFVAR_H)
- check_include_files("sys/types.h;sys/socket.h;net/if.h;net/pfvar.h;net/if_pflog.h" HAVE_NET_IF_PFLOG_H)
- if(HAVE_NET_IF_PFLOG_H)
- set(LOCALSRC print-pflog.c ${LOCALSRC})
- endif(HAVE_NET_IF_PFLOG_H)
- endif(HAVE_NET_PFVAR_H)
-endif(NOT WIN32)
#
# Functions.
@@ -1093,6 +1084,7 @@ set(NETDISSECT_SOURCE_LIST_C
print-ospf.c
print-ospf6.c
print-otv.c
+ print-pflog.c
print-pgm.c
print-pim.c
print-pktap.c