[tcpdump-workers] [RFC TCPDUMP PATCH 0/2] LINKTYPE_LINUX_SLL2 implementation

Petr Vorel pvorel at suse.cz
Thu Jul 12 14:33:39 EDT 2018


Hi,

this patch depends on libpcap compiled with patch [1].
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.

MAJOR ISSUES
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 [1], but I probably overlooked some
obvious solution.

Tests (make check) are broken as the output is different [2].
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.

MINOR ISSUES:
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
this patch.


Kind regards,
Petr

[1] https://lists.sandelman.ca/pipermail/tcpdump-workers/2018-July/001011.html
[2] https://travis-ci.org/pevik/tcpdump/jobs/403216728

Petr Vorel (2):
  Update configure
  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(-)

-- 
2.18.0



More information about the tcpdump-workers mailing list