summaryrefslogtreecommitdiff
path: root/print-dsa.c
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2020-07-12 22:27:33 +0200
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2020-07-15 09:18:35 +0200
commit81dbf4a0b05092760d0ff0cdd48c692e4769ba99 (patch)
tree2abaed75f47f71ffe886d35e14ad3ccbcddf9835 /print-dsa.c
parent96c60029b3f935eff892d1f49b52f305423e4671 (diff)
downloadtcpdump-81dbf4a0b05092760d0ff0cdd48c692e4769ba99.tar.gz
Update more link-layer dissectors to void functions
brcm_tag_if_print() brcm_tag_prepend_if_print() dsa_if_print() edsa_if_print() ether_if_print() netanalyzer_if_print() netanalyzer_transparent_if_print() Update ether_print(), ether_common_print() and ether_switch_tag_print() to void functions. Add a flag parameter to ether_print(), ether_common_print() and ether_switch_tag_print() to increment the link-layer header length field of the netdissect_options when needed. The calls use TRUE when the return value of the funtions was used. The calls with FALSE avoid increments when the calls are nested. Moreover: Remove trailing "_if" from some protocol names.
Diffstat (limited to 'print-dsa.c')
-rw-r--r--print-dsa.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/print-dsa.c b/print-dsa.c
index 7dad9e2a..aec58f48 100644
--- a/print-dsa.c
+++ b/print-dsa.c
@@ -196,24 +196,24 @@ edsa_tag_print(netdissect_options *ndo, const u_char *bp)
tag_common_print(ndo, p);
}
-u_int
+void
dsa_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *p)
{
u_int caplen = h->caplen;
u_int length = h->len;
ndo->ndo_protocol = "dsa";
- return (ether_switch_tag_print(ndo, p, length, caplen,
- dsa_tag_print, DSA_LEN));
+ ndo->ndo_ll_hdr_len += 0;
+ ether_switch_tag_print(ndo, p, length, caplen, dsa_tag_print, DSA_LEN, TRUE);
}
-u_int
+void
edsa_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *p)
{
u_int caplen = h->caplen;
u_int length = h->len;
ndo->ndo_protocol = "edsa";
- return (ether_switch_tag_print(ndo, p, length, caplen,
- edsa_tag_print, EDSA_LEN));
+ ndo->ndo_ll_hdr_len += 0;
+ ether_switch_tag_print(ndo, p, length, caplen, edsa_tag_print, EDSA_LEN, TRUE);
}