[tcpdump-workers] [RFC TCPDUMP PATCH 0/2] LINKTYPE_LINUX_SLL2 implementation
pvorel at suse.cz
Thu Jul 12 14:33:39 EDT 2018
this patch depends on libpcap compiled with patch .
By default LINKTYPE_LINUX_SLL2 is compiled in (--enable-sll-v2 is the
default). Users of old libpcap (or new compiled with --disable-sll-v2)
need to compile tcpdump with --disable-sll-v2 option.
Main problem is that libpcap supports only one from LINKTYPE_LINUX_SLL
and LINKTYPE_LINUX_SLL2 is the most controversial as it introduces an
incompatibility. I didn't find a way how to pass this info to libpcap,
see comments are mentioned in , but I probably overlooked some
Tests (make check) are broken as the output is different .
Introducing two versions requires having two versions for some of
outputs for tests (tests/*.out) and detect reliably compiled version
(this can be detected from config.h, but it might be better to state the
support in `tcpdump --version' output.
There is no warning/detection about using different version than libpcap
uses (libpcap using LINKTYPE_LINUX_SLL and we use LINKTYPE_LINUX_SLL2
and vice versa). There should be understandable runtime warning and
maybe compile detection / warning.
I see for SMB there are both --enable-smb and --disable-smb mentioned in
configure help. I guess I should specify also --disable-sll-v2 there
(only --enable-sll-v2 is mentioned).
The first commit is just to make changes in configure in next commit
clearer. Getting rid of configure in git might be accepted faster than
Petr Vorel (2):
Add sll_ifindex into sll_header + use it to print ifname
config.h.in | 4 ++++
configure | 34 +++++++++++++++++++++-------------
configure.ac | 10 ++++++++++
missing/dlnames.c | 3 +++
print-sll.c | 27 +++++++++++++++++++++++++--
print.c | 5 ++++-
6 files changed, 67 insertions(+), 16 deletions(-)
More information about the tcpdump-workers