tcpdump mailing list archives

Re: [tcpdump] After setjmp/longjmp update


From: Denis Ovsienko via tcpdump-workers <tcpdump-workers () lists tcpdump org>
Date: Thu, 17 Sep 2020 22:43:16 +0100

--- Begin Message --- From: Denis Ovsienko <denis () ovsienko info>
Date: Thu, 17 Sep 2020 22:43:16 +0100
On Thu, 17 Sep 2020 22:05:30 +0200
Francois-Xavier Le Bail <devel.fx.lebail () orange fr> wrote:

[...]
Should we have something like:

        if (setjmp(ndo->early_end) == 0) {
                /* Print the packet. */
                (ndo->ndo_if_printer)(ndo, h, sp);
        } else {
                switch (ndo->early_end_reason) {
              case TRUNCATED:
                      /* A printer quit because the packet was
truncated; report it */ nd_print_trunc(ndo);
                      break;
                case INVALID:
                      ...
              }
        }

(ndo->ndo_truncated -> ndo->early_end and ndo->early_end_reason =
TRUNCATED/INVALID/other?

Not immediately, but if later there is another reason why the current
packet cannot be processed any more, and if that other reason requires a
different handling in pretty_print_packet(), then that would be a
straightforward way to do that, yes.

-- 
    Denis Ovsienko

--- End Message ---
_______________________________________________
tcpdump-workers mailing list
tcpdump-workers () lists tcpdump org
https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers

Current thread: