tcpdump mailing list archives
Re: [tcpdump] Remove an unnecessicary bit shifting loop (#451)
From: Michael Richardson <mcr () sandelman ca>
Date: Thu, 09 Apr 2015 10:11:59 -0400
Forwarding to list for wider discussion.
Guy Harris <notifications () github com> wrote:
> The bittok2str routines are, for better or worse, currently being used
> for bitfields that aren't flags, e.g. the "recursion count" field in
> GRE (or "recursion control", as it's called in RFC 1701). They don't
> work as one might expect for that, as the routine assumes that each
> entry refers to something that's either true or false.
> Should we change the routines to take a table in which each entry
> contains an optional format string and, if the entry has a format
> string, the bitfield's value is extracted (including shifting it right
> appropriately) and printed using the format string, so that the
> recursion count would show up as recursion count n? Or should we fix
> the tables so that they only contain single-bit values?
> — Reply to this email directly or view it on GitHub.
https://github.com/the-tcpdump-group/tcpdump/pull/451#issuecomment-90988880
_______________________________________________
tcpdump-workers mailing list
tcpdump-workers () lists tcpdump org
https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers
Current thread:
- Re: [tcpdump] Remove an unnecessicary bit shifting loop (#451) Michael Richardson (Apr 09)
