diff options
author | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2020-02-07 20:31:51 +0100 |
---|---|---|
committer | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2020-02-07 20:36:41 +0100 |
commit | c3f8e04764b5f9dcb424722aaeee9598e705faed (patch) | |
tree | 28868d1e028f59f86ba7bffdd0fa1ba57856159b /print-enc.c | |
parent | 717095ab66fd1930248b6a3069ed275281214898 (diff) | |
download | tcpdump-c3f8e04764b5f9dcb424722aaeee9598e705faed.tar.gz |
ENC: Update the link-layer dissector to a void function
Moreover:
Remove trailing "_if" from protocol name.
Remove a no longer used 'out' label.
Diffstat (limited to 'print-enc.c')
-rw-r--r-- | print-enc.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/print-enc.c b/print-enc.c index e6c27870..aeacd6c6 100644 --- a/print-enc.c +++ b/print-enc.c @@ -94,7 +94,7 @@ struct enchdr { #define SWAPLONG(y) \ ((((y)&0xff)<<24) | (((y)&0xff00)<<8) | (((y)&0xff0000)>>8) | (((y)>>24)&0xff)) -u_int +void enc_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *p) { @@ -103,11 +103,13 @@ enc_if_print(netdissect_options *ndo, u_int af, flags; const struct enchdr *hdr; - ndo->ndo_protocol = "enc_if"; + ndo->ndo_protocol = "enc"; if (caplen < ENC_HDRLEN) { + ndo->ndo_ll_header_length += caplen; nd_print_trunc(ndo); - goto out; + return; } + ndo->ndo_ll_header_length += ENC_HDRLEN; hdr = (const struct enchdr *)p; /* @@ -159,6 +161,5 @@ enc_if_print(netdissect_options *ndo, break; } -out: - return (ENC_HDRLEN); + return; } |