summaryrefslogtreecommitdiff
path: root/print-arcnet.c
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2020-03-28 20:56:02 +0100
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2020-03-28 20:56:02 +0100
commitddefbd82c9b42b1feb26144d3228acef45abce9e (patch)
tree8e87be86eb614ceacb15654dc60c913c63992d0c /print-arcnet.c
parent8e5898dd615c019cebd506c0680db6e445b22ee5 (diff)
downloadtcpdump-ddefbd82c9b42b1feb26144d3228acef45abce9e.tar.gz
ARCNET: Update the link-layer dissectors to void functions
Diffstat (limited to 'print-arcnet.c')
-rw-r--r--print-arcnet.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/print-arcnet.c b/print-arcnet.c
index 7077c109..0fa64b29 100644
--- a/print-arcnet.c
+++ b/print-arcnet.c
@@ -178,7 +178,7 @@ arcnet_print(netdissect_options *ndo, const u_char *bp, u_int length, int phds,
* 'h->len' is the length of the packet off the wire, and 'h->caplen'
* is the number of bytes actually captured.
*/
-u_int
+void
arcnet_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *p)
{
u_int caplen = h->caplen;
@@ -193,7 +193,8 @@ arcnet_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_ch
ndo->ndo_protocol = "arcnet_if";
if (caplen < ARC_HDRLEN) {
nd_print_trunc(ndo);
- return (caplen);
+ ndo->ndo_ll_header_length += caplen;
+ return;
}
ap = (const struct arc_header *)p;
@@ -216,7 +217,8 @@ arcnet_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_ch
arcnet_print(ndo, p, length, 0, 0, 0);
ND_PRINT(" phds");
nd_print_trunc(ndo);
- return (caplen);
+ ndo->ndo_ll_header_length += caplen;
+ return;
}
flag = GET_U_1(ap->arc_flag);
@@ -225,7 +227,8 @@ arcnet_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_ch
arcnet_print(ndo, p, length, 0, 0, 0);
ND_PRINT(" phds extended");
nd_print_trunc(ndo);
- return (caplen);
+ ndo->ndo_ll_header_length += caplen;
+ return;
}
flag = GET_U_1(ap->arc_flag2);
seqid = GET_BE_U_2(ap->arc_seqid2);
@@ -251,13 +254,14 @@ arcnet_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_ch
/*
* This is a middle fragment.
*/
- return (archdrlen);
+ ndo->ndo_ll_header_length += archdrlen;
+ return;
}
if (!arcnet_encap_print(ndo, arc_type, p, length, caplen))
ND_DEFAULTPRINT(p, caplen);
- return (archdrlen);
+ ndo->ndo_ll_header_length += archdrlen;
}
/*
@@ -270,7 +274,7 @@ arcnet_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_ch
* reassembled packets rather than raw frames, and headers have an
* extra "offset" field between the src/dest and packet type.
*/
-u_int
+void
arcnet_linux_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *p)
{
u_int caplen = h->caplen;
@@ -283,7 +287,8 @@ arcnet_linux_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, cons
ndo->ndo_protocol = "arcnet_linux_if";
if (caplen < ARC_LINUX_HDRLEN) {
nd_print_trunc(ndo);
- return (caplen);
+ ndo->ndo_ll_header_length += caplen;
+ return;
}
ap = (const struct arc_linux_header *)p;
@@ -294,7 +299,8 @@ arcnet_linux_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, cons
archdrlen = ARC_LINUX_HDRNEWLEN;
if (caplen < ARC_LINUX_HDRNEWLEN) {
nd_print_trunc(ndo);
- return (caplen);
+ ndo->ndo_ll_header_length += caplen;
+ return;
}
break;
case ARCTYPE_IP_OLD:
@@ -317,7 +323,7 @@ arcnet_linux_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, cons
if (!arcnet_encap_print(ndo, arc_type, p, length, caplen))
ND_DEFAULTPRINT(p, caplen);
- return (archdrlen);
+ ndo->ndo_ll_header_length += archdrlen;
}
/*