summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorDenis Ovsienko <denis@ovsienko.info>2018-07-23 23:28:24 +0100
committerDenis Ovsienko <denis@ovsienko.info>2019-11-03 23:46:28 +0000
commitc9e5ac541bbb4f01af0a6545fafe6c181d1eebbb (patch)
tree4fb07ed4169c357dd94939e69c482b4d426a01ff /CMakeLists.txt
parenteabcd87c1dc79255cbde14ef4559b327bb90d01e (diff)
downloadtcpdump-c9e5ac541bbb4f01af0a6545fafe6c181d1eebbb.tar.gz
libdnet has bugs, do not use it.
The only function tcpdump used in libdnet was dnet_htoa(), which tries to translate a binary DECnet address to a nodename through a lookup in /etc/decnet.conf. The translation is slow and has a bug, so stop using the function and remove the dependency on libdnet. This makes tcpdump always print DECnet addresses in numeric format, if anybody needs the translation back they are welcome to fix libdnet or (more realistically) add an implementation of dnet_htoa() to the tcpdump source code and use it. (This is a forward-port of commit 9a6eb27 from tcpdump-4.9 to master. Sadly, together with libdnet this change removes the fine work that Guy had done in the master branch in commits ebf3f19 and 4ef8d63 to put libdnet usage right whilst my original "do not use libdnet" commit was aging in the pipeline.)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt39
1 files changed, 0 insertions, 39 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3d2ab654..59ecbf92 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -482,45 +482,6 @@ if(HAVE_ETHER_NTOHOST)
endif()
cmake_pop_check_state()
-check_function_exists(dnet_htoa STDLIBS_HAVE_DNET_HTOA)
-if(STDLIBS_HAVE_DNET_HTOA)
- set(HAVE_DNET_HTOA TRUE)
-else(STDLIBS_HAVE_DNET_HTOA)
- check_library_exists(dnet dnet_htoa "" HAVE_DNET_HTOA)
- if(HAVE_DNET_HTOA)
- set(TCPDUMP_LINK_LIBRARIES dnet ${TCPDUMP_LINK_LIBRARIES})
- endif(HAVE_DNET_HTOA)
-endif(STDLIBS_HAVE_DNET_HTOA)
-if(HAVE_DNET_HTOA)
- #
- # OK, we have dnet_htoa(). Do we have netdnet/dnetdb.h?
- #
- check_include_files("sys/types.h;netdnet/dnetdb.h" HAVE_NETDNET_DNETDB_H)
- if(HAVE_NETDNET_DNETDB_H)
- #
- # Yes. Does it declare dnet_htoa()?
- #
- cmake_push_check_state()
- set(CMAKE_REQUIRED_LIBRARIES dnet)
- check_symbol_exists(dnet_htoa "sys/types.h;netdnet/dnetdb.h" NETDNET_DNETDB_H_DECLARES_DNET_HTOA)
- cmake_pop_check_state()
- endif(HAVE_NETDNET_DNETDB_H)
-
- #
- # Do we have netdnet/dn.h?
- #
- check_include_file(netdnet/dn.h HAVE_NETDNET_DN_H)
- if(HAVE_NETDNET_DN_H)
- #
- # Yes. Does it declare struct dn_naddr?
- #
- cmake_push_check_state()
- set(CMAKE_EXTRA_INCLUDE_FILES netdnet/dn.h)
- check_type_size("struct dn_naddr" STRUCT_DN_NADDR)
- cmake_pop_check_state()
- endif(HAVE_NETDNET_DN_H)
-endif(HAVE_DNET_HTOA)
-
#
# Data types.
#