summaryrefslogtreecommitdiff
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-01-29 22:30:33 -0800
commitfe762c04a6d3bbf7f1a21ebf825075e2fb201acc (patch)
tree122a84015317023db03bf20ff91d2370eff0b1dd /CMakeLists.txt
parent65f4c88d27fa3a333b7f5303c34d8d10999e1d4d (diff)
downloadtcpdump-fe762c04a6d3bbf7f1a21ebf825075e2fb201acc.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.
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 9de92bdf..5cd4024e 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