Skip to content

Add autoconf option to enable a stripped down build. #518

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

biot
Copy link

@biot biot commented May 8, 2016

The --enable-minimal option to configure reduces the list of dissectors to a smaller set, the minimum needed to bring up an embedded system.

This produces a smaller tcpdump binary, something that is very useful on small embedded systems, such as SOHO routers. Size reduction is 45-50%, depending on architecture. OpenWrt currently has a similar patch for an older version, but cannot upgrade to current tcpdump with it. Other embedded distributions like Buildroot and Yocto would greatly benefit from this patch as well.

The patch necessarily introduces a lot of #ifdefs to various dissectors. Those can be reduced by grouping together non-minimal functions in dissectors files. I did it this way in print.c for example. Please let me know if that's your preference, happy to respin.

@infrastation
Copy link
Member

This idea looks useful to me. One nit: it would be better to rename the macro to ND_MINIMAL or even to something like ND_PROFILE, in the latter case defaulting its value to "full" and allowing to set it to "minimal" (or "embedded"), such that in future it would be easier to add another profile that sits somewhere in between. Would you like to respin this change?

The --enable-minimal option to configure reduces the list of dissectors
to a smaller set, needed to bring up an embedded system.

This produces a smaller tcpdump binary, something that is very
useful on small embedded systems such as SOHO routers.
@biot
Copy link
Author

biot commented Aug 2, 2018

I've rebased the patch to master, and changed it to ND_MINIMAL. Binary size is about half with the minimal build.

@mcr
Copy link
Member

mcr commented Sep 5, 2018

We intend to merge this as soon as some other more fragile security related changes have been merged.

@infrastation
Copy link
Member

I have to some extent rebased the proposed change in my working copy, it is now 230 commits ahead (was August 2018, now March 2019), but this pull request does not allow me to force-push into the biot:mini branch. I can make another rebase round later or I can hand the intermediate result over to whoever has time and interest to do it now.

@mcr mcr marked this pull request as draft August 28, 2020 20:22
@mcr mcr self-assigned this Aug 28, 2020
@mcr mcr added this to the next_release milestone Aug 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants