From 99c66c14910f541351a60be1d27a7b9b972df183 Mon Sep 17 00:00:00 2001 From: Shane Alcock Date: Tue, 11 Feb 2025 12:10:16 +1300 Subject: [PATCH] libpacketdump: add decode support for new ETSI CC formats This includes TCP, UDP and RTP. Update .deb and .rpm dependencies to require the upcoming libwandder release, as these new format types are only defined starting from 2.0.14. --- debian/control | 2 +- libpacketdump/link_22.c | 6 ++++++ rpm/libtrace4.spec | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index 5e7641fc..0ced57ec 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,7 @@ Maintainer: Shane Alcock Build-Depends: debhelper-compat (= 12), dh-autoreconf, libpcap-dev, zlib1g-dev, flex, bison, doxygen, liblzma-dev, graphviz, libncurses5-dev, libbz2-dev, libssl-dev, libwandio1-dev (>= 4.0.0), - libwandder2-dev (>= 2.0.6), dpdk-dev, libnuma-dev, libyaml-dev, + libwandder2-dev (>= 2.0.14), dpdk-dev, libnuma-dev, libyaml-dev, gcc-multilib Standards-Version: 4.1.3 Section: libs diff --git a/libpacketdump/link_22.c b/libpacketdump/link_22.c index 35b58033..9c305cc4 100644 --- a/libpacketdump/link_22.c +++ b/libpacketdump/link_22.c @@ -48,6 +48,12 @@ DLLEXPORT void decode(int link_type UNUSED, const char *packet, unsigned len) : TRACE_ETHERTYPE_IPV6); } else if (ccformat == WANDDER_ETSILI_CC_FORMAT_APPLICATION) { decode_next((const char *)cchdr, rem, "tcp", 0); + } else if (ccformat == WANDDER_ETSILI_CC_FORMAT_TCP) { + decode_next((const char *)cchdr, rem, "ip", 6); + } else if (ccformat == WANDDER_ETSILI_CC_FORMAT_UDP) { + decode_next((const char *)cchdr, rem, "ip", 17); + } else if (ccformat == WANDDER_ETSILI_CC_FORMAT_RTP) { + decode_next((const char *)cchdr, rem, "udp", 0); } wandder_free_etsili_decoder(dec); diff --git a/rpm/libtrace4.spec b/rpm/libtrace4.spec index 41c27c97..9ace1ce2 100644 --- a/rpm/libtrace4.spec +++ b/rpm/libtrace4.spec @@ -18,7 +18,7 @@ BuildRequires: numactl-devel BuildRequires: ncurses-devel BuildRequires: openssl-devel BuildRequires: libyaml-devel -BuildRequires: libwandder2-devel >= 2.0.6 +BuildRequires: libwandder2-devel >= 2.0.14 BuildRequires: libwandio1-devel BuildRequires: dpdk-devel BuildRequires: (flex-devel or libfl-static)