diff options
author | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2020-02-07 17:51:01 +0100 |
---|---|---|
committer | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2020-02-07 20:36:26 +0100 |
commit | 5cea888d12b8ca4009baff3207a3d5712c58acc7 (patch) | |
tree | 4aebb84b26b20ce9dc0a9607e1448b7f7752c949 /print-sunatm.c | |
parent | 65577c96191eba7bc33b8bf3a79df7419b465c10 (diff) | |
download | tcpdump-5cea888d12b8ca4009baff3207a3d5712c58acc7.tar.gz |
SunATM DLPI: Update the link-layer dissector to a void function
Moreover:
Remove trailing "_if" from protocol name.
Diffstat (limited to 'print-sunatm.c')
-rw-r--r-- | print-sunatm.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/print-sunatm.c b/print-sunatm.c index 0e8fe57d..27f63c3d 100644 --- a/print-sunatm.c +++ b/print-sunatm.c @@ -59,7 +59,7 @@ * 'h->len' is the length of the packet off the wire, and 'h->caplen' * is the number of bytes actually captured. */ -u_int +void sunatm_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *p) { @@ -69,11 +69,13 @@ sunatm_if_print(netdissect_options *ndo, u_char vpi; u_int traftype; - ndo->ndo_protocol = "sunatm_if"; + ndo->ndo_protocol = "sunatm"; if (caplen < PKT_BEGIN_POS) { + ndo->ndo_ll_header_length += caplen; nd_print_trunc(ndo); - return (caplen); + return; } + ndo->ndo_ll_header_length += PKT_BEGIN_POS; if (ndo->ndo_eflag) { ND_PRINT(GET_U_1(p + DIR_POS) & 0x80 ? "Tx: " : "Rx: "); @@ -102,5 +104,5 @@ sunatm_if_print(netdissect_options *ndo, length -= PKT_BEGIN_POS; atm_print(ndo, vpi, vci, traftype, p, length, caplen); - return (PKT_BEGIN_POS); + return; } |