summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--netdissect.h18
-rw-r--r--print-bcm-li.c2
-rw-r--r--print-brcmtag.c14
-rw-r--r--print-dsa.c12
-rw-r--r--print-ether.c84
-rw-r--r--print-geneve.c2
-rw-r--r--print-gre.c2
-rw-r--r--print-juniper.c6
-rw-r--r--print-lane.c2
-rw-r--r--print-llc.c2
-rw-r--r--print-nsh.c2
-rw-r--r--print-openflow-1.0.c2
-rw-r--r--print-otv.c2
-rw-r--r--print-vxlan-gpe.c2
-rw-r--r--print-vxlan.c2
-rw-r--r--print.c38
16 files changed, 109 insertions, 83 deletions
diff --git a/netdissect.h b/netdissect.h
index f2e45700..5a94a747 100644
--- a/netdissect.h
+++ b/netdissect.h
@@ -468,14 +468,14 @@ extern void arcnet_if_print IF_PRINTER_ARGS;
extern void arcnet_linux_if_print IF_PRINTER_ARGS;
extern u_int atm_if_print IF_PRINTER_ARGS;
extern void bt_if_print IF_PRINTER_ARGS;
-extern u_int brcm_tag_if_print IF_PRINTER_ARGS;
-extern u_int brcm_tag_prepend_if_print IF_PRINTER_ARGS;
+extern void brcm_tag_if_print IF_PRINTER_ARGS;
+extern void brcm_tag_prepend_if_print IF_PRINTER_ARGS;
extern u_int chdlc_if_print IF_PRINTER_ARGS;
extern u_int cip_if_print IF_PRINTER_ARGS;
-extern u_int dsa_if_print IF_PRINTER_ARGS;
-extern u_int edsa_if_print IF_PRINTER_ARGS;
+extern void dsa_if_print IF_PRINTER_ARGS;
+extern void edsa_if_print IF_PRINTER_ARGS;
extern void enc_if_print IF_PRINTER_ARGS;
-extern u_int ether_if_print IF_PRINTER_ARGS;
+extern void ether_if_print IF_PRINTER_ARGS;
extern u_int fddi_if_print IF_PRINTER_ARGS;
extern u_int fr_if_print IF_PRINTER_ARGS;
extern u_int ieee802_11_if_print IF_PRINTER_ARGS;
@@ -504,8 +504,8 @@ extern u_int juniper_services_if_print IF_PRINTER_ARGS;
extern u_int lane_if_print IF_PRINTER_ARGS;
extern u_int ltalk_if_print IF_PRINTER_ARGS;
extern u_int mfr_if_print IF_PRINTER_ARGS;
-extern u_int netanalyzer_if_print IF_PRINTER_ARGS;
-extern u_int netanalyzer_transparent_if_print IF_PRINTER_ARGS;
+extern void netanalyzer_if_print IF_PRINTER_ARGS;
+extern void netanalyzer_transparent_if_print IF_PRINTER_ARGS;
extern void nflog_if_print IF_PRINTER_ARGS;
extern void null_if_print IF_PRINTER_ARGS;
extern u_int pflog_if_print IF_PRINTER_ARGS;
@@ -580,8 +580,8 @@ extern void eap_print(netdissect_options *, const u_char *, u_int);
extern void egp_print(netdissect_options *, const u_char *, u_int);
extern void eigrp_print(netdissect_options *, const u_char *, u_int);
extern void esp_print(netdissect_options *, const u_char *, u_int, const u_char *, u_int, int, u_int);
-extern u_int ether_print(netdissect_options *, const u_char *, u_int, u_int, void (*)(netdissect_options *, const u_char *), const u_char *);
-extern u_int ether_switch_tag_print(netdissect_options *, const u_char *, u_int, u_int, void (*)(netdissect_options *, const u_char *), u_int);
+extern void ether_print(netdissect_options *, const u_char *, u_int, u_int, void (*)(netdissect_options *, const u_char *), const u_char *, u_int);
+extern void ether_switch_tag_print(netdissect_options *, const u_char *, u_int, u_int, void (*)(netdissect_options *, const u_char *), u_int, u_int);
extern int ethertype_print(netdissect_options *, u_short, const u_char *, u_int, u_int, const struct lladdr_info *, const struct lladdr_info *);
extern u_int fddi_print(netdissect_options *, const u_char *, u_int, u_int);
extern void forces_print(netdissect_options *, const u_char *, u_int);
diff --git a/print-bcm-li.c b/print-bcm-li.c
index 0233c3cb..32214127 100644
--- a/print-bcm-li.c
+++ b/print-bcm-li.c
@@ -95,7 +95,7 @@ bcm_li_print(netdissect_options *ndo, const u_char *p, u_int length)
switch (pkt_type) {
case BCM_LI_PKT_TYPE_ETHERNET:
- ether_print(ndo, bp, length, length, NULL, NULL);
+ ether_print(ndo, bp, length, length, NULL, NULL, FALSE);
break;
case BCM_LI_PKT_TYPE_IPV4:
ip_print(ndo, bp, length);
diff --git a/print-brcmtag.c b/print-brcmtag.c
index da8b8a52..61521365 100644
--- a/print-brcmtag.c
+++ b/print-brcmtag.c
@@ -110,7 +110,7 @@ brcm_tag_print(netdissect_options *ndo, const u_char *bp)
ND_PRINT(", ");
}
-u_int
+void
brcm_tag_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h,
const u_char *p)
{
@@ -118,11 +118,12 @@ brcm_tag_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h,
u_int length = h->len;
ndo->ndo_protocol = "brcm-tag";
- return (ether_switch_tag_print(ndo, p, length, caplen,
- brcm_tag_print, BRCM_TAG_LEN));
+ ndo->ndo_ll_hdr_len += 0;
+ ether_switch_tag_print(ndo, p, length, caplen,
+ brcm_tag_print, BRCM_TAG_LEN, TRUE);
}
-u_int
+void
brcm_tag_prepend_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h,
const u_char *p)
{
@@ -131,8 +132,9 @@ brcm_tag_prepend_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h,
ndo->ndo_protocol = "brcm-tag-prepend";
if (caplen < BRCM_TAG_LEN) {
+ ndo->ndo_ll_hdr_len += caplen;
nd_print_trunc(ndo);
- return (caplen);
+ return;
}
if (ndo->ndo_eflag) {
@@ -146,5 +148,5 @@ brcm_tag_prepend_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h,
/*
* Now print the Ethernet frame following it.
*/
- return ether_print(ndo, p, length, caplen, NULL, NULL);
+ ether_print(ndo, p, length, caplen, NULL, NULL, TRUE);
}
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);
}
diff --git a/print-ether.c b/print-ether.c
index 205cc8a7..16b0fb7f 100644
--- a/print-ether.c
+++ b/print-ether.c
@@ -133,13 +133,13 @@ ether_type_print(netdissect_options *ndo, uint16_t type)
* switch chips, and extra encapsulation header information before
* printing Ethernet header information (such as a LANE ID for ATM LANE).
*/
-static u_int
+static void
ether_common_print(netdissect_options *ndo, const u_char *p, u_int length,
u_int caplen,
void (*print_switch_tag)(netdissect_options *ndo, const u_char *),
u_int switch_tag_len,
void (*print_encap_header)(netdissect_options *ndo, const u_char *),
- const u_char *encap_header_arg)
+ const u_char *encap_header_arg, u_int do_incr_ll_hdr_len)
{
const struct ether_header *ehp;
u_int orig_length;
@@ -151,11 +151,15 @@ ether_common_print(netdissect_options *ndo, const u_char *p, u_int length,
if (caplen < ETHER_HDRLEN + switch_tag_len) {
nd_print_trunc(ndo);
- return (caplen);
+ if (do_incr_ll_hdr_len)
+ ndo->ndo_ll_hdr_len += caplen;
+ return;
}
if (length < ETHER_HDRLEN + switch_tag_len) {
nd_print_trunc(ndo);
- return (length);
+ if (do_incr_ll_hdr_len)
+ ndo->ndo_ll_hdr_len += length;
+ return;
}
if (print_encap_header != NULL)
@@ -226,10 +230,14 @@ recurse:
/* Payload is encrypted; print it as raw data. */
if (!ndo->ndo_suppress_default_print)
ND_DEFAULTPRINT(p, caplen);
- return (hdrlen);
+ if (do_incr_ll_hdr_len)
+ ndo->ndo_ll_hdr_len += hdrlen;
+ return;
} else if (ret > 0) {
/* Problem printing the header; just quit. */
- return (ret);
+ if (do_incr_ll_hdr_len)
+ ndo->ndo_ll_hdr_len += ret;
+ return;
} else {
/*
* Keep processing type/length fields.
@@ -258,12 +266,16 @@ recurse:
if (caplen < 4) {
ndo->ndo_protocol = "vlan";
nd_print_trunc(ndo);
- return (hdrlen + caplen);
+ if (do_incr_ll_hdr_len)
+ ndo->ndo_ll_hdr_len += hdrlen + caplen;
+ return;
}
if (length < 4) {
ndo->ndo_protocol = "vlan";
nd_print_trunc(ndo);
- return (hdrlen + length);
+ if (do_incr_ll_hdr_len)
+ ndo->ndo_ll_hdr_len += hdrlen + length;
+ return;
}
if (ndo->ndo_eflag) {
uint16_t tag = GET_BE_U_2(p);
@@ -346,11 +358,15 @@ recurse:
} else if (length_type == ETHERTYPE_ARISTA) {
if (caplen < 2) {
ND_PRINT("[|arista]");
- return (hdrlen + caplen);
+ if (do_incr_ll_hdr_len)
+ ndo->ndo_ll_hdr_len += hdrlen + caplen;
+ return;
}
if (length < 2) {
ND_PRINT("[|arista]");
- return (hdrlen + length);
+ if (do_incr_ll_hdr_len)
+ ndo->ndo_ll_hdr_len += hdrlen + length;
+ return;
}
ether_type_print(ndo, length_type);
ND_PRINT(", length %u: ", orig_length);
@@ -401,7 +417,9 @@ recurse:
ND_DEFAULTPRINT(p, caplen);
}
}
- return (hdrlen);
+ if (do_incr_ll_hdr_len)
+ ndo->ndo_ll_hdr_len += hdrlen;
+ return;
}
/*
@@ -413,14 +431,14 @@ recurse:
*
* FIXME: caplen can and should be derived from ndo->ndo_snapend and p.
*/
-u_int
+void
ether_switch_tag_print(netdissect_options *ndo, const u_char *p, u_int length,
u_int caplen,
void (*print_switch_tag)(netdissect_options *, const u_char *),
- u_int switch_tag_len)
+ u_int switch_tag_len, u_int do_incr_ll_hdr_len)
{
- return (ether_common_print(ndo, p, length, caplen, print_switch_tag,
- switch_tag_len, NULL, NULL));
+ ether_common_print(ndo, p, length, caplen, print_switch_tag,
+ switch_tag_len, NULL, NULL, do_incr_ll_hdr_len);
}
/*
@@ -431,15 +449,15 @@ ether_switch_tag_print(netdissect_options *ndo, const u_char *p, u_int length,
*
* FIXME: caplen can and should be derived from ndo->ndo_snapend and p.
*/
-u_int
+void
ether_print(netdissect_options *ndo,
const u_char *p, u_int length, u_int caplen,
void (*print_encap_header)(netdissect_options *ndo, const u_char *),
- const u_char *encap_header_arg)
+ const u_char *encap_header_arg, u_int do_incr_ll_hdr_len)
{
ndo->ndo_protocol = "ether";
- return (ether_common_print(ndo, p, length, caplen, NULL, 0,
- print_encap_header, encap_header_arg));
+ ether_common_print(ndo, p, length, caplen, NULL, 0,
+ print_encap_header, encap_header_arg, do_incr_ll_hdr_len);
}
/*
@@ -448,12 +466,14 @@ ether_print(netdissect_options *ndo,
* of the packet off the wire, and 'h->caplen' is the number
* of bytes actually captured.
*/
-u_int
+void
ether_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h,
const u_char *p)
{
- ndo->ndo_protocol = "ether_if";
- return (ether_print(ndo, p, h->len, h->caplen, NULL, NULL));
+ ndo->ndo_protocol = "ether";
+ ndo->ndo_ll_hdr_len += 0;
+
+ ether_print(ndo, p, h->len, h->caplen, NULL, NULL, TRUE);
}
/*
@@ -465,21 +485,23 @@ ether_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h,
* This is for DLT_NETANALYZER, which has a 4-byte pseudo-header
* before the Ethernet header.
*/
-u_int
+void
netanalyzer_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h,
const u_char *p)
{
/*
* Fail if we don't have enough data for the Hilscher pseudo-header.
*/
- ndo->ndo_protocol = "netanalyzer_if";
+ ndo->ndo_protocol = "netanalyzer";
if (h->caplen < 4) {
+ ndo->ndo_ll_hdr_len += h->caplen;
nd_print_trunc(ndo);
- return (h->caplen);
+ return;
}
+ ndo->ndo_ll_hdr_len += 4;
/* Skip the pseudo-header. */
- return (4 + ether_print(ndo, p + 4, h->len - 4, h->caplen - 4, NULL, NULL));
+ ether_print(ndo, p + 4, h->len - 4, h->caplen - 4, NULL, NULL, TRUE);
}
/*
@@ -492,7 +514,7 @@ netanalyzer_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h,
* pseudo-header, a 7-byte Ethernet preamble, and a 1-byte Ethernet SOF
* before the Ethernet header.
*/
-u_int
+void
netanalyzer_transparent_if_print(netdissect_options *ndo,
const struct pcap_pkthdr *h,
const u_char *p)
@@ -501,14 +523,16 @@ netanalyzer_transparent_if_print(netdissect_options *ndo,
* Fail if we don't have enough data for the Hilscher pseudo-header,
* preamble, and SOF.
*/
- ndo->ndo_protocol = "netanalyzer_transparent_if";
+ ndo->ndo_protocol = "netanalyzer_transparent";
if (h->caplen < 12) {
+ ndo->ndo_ll_hdr_len += h->caplen;
nd_print_trunc(ndo);
- return (h->caplen);
+ return;
}
+ ndo->ndo_ll_hdr_len += 12;
/* Skip the pseudo-header, preamble, and SOF. */
- return (12 + ether_print(ndo, p + 12, h->len - 12, h->caplen - 12, NULL, NULL));
+ ether_print(ndo, p + 12, h->len - 12, h->caplen - 12, NULL, NULL, TRUE);
}
/*
diff --git a/print-geneve.c b/print-geneve.c
index 0b7ff6e5..d3e5e87e 100644
--- a/print-geneve.c
+++ b/print-geneve.c
@@ -232,7 +232,7 @@ geneve_print(netdissect_options *ndo, const u_char *bp, u_int len)
if (ethertype_print(ndo, prot, bp, len, ND_BYTES_AVAILABLE_AFTER(bp), NULL, NULL) == 0) {
if (prot == ETHERTYPE_TEB)
- ether_print(ndo, bp, len, ND_BYTES_AVAILABLE_AFTER(bp), NULL, NULL);
+ ether_print(ndo, bp, len, ND_BYTES_AVAILABLE_AFTER(bp), NULL, NULL, FALSE);
else
ND_PRINT("geneve-proto-0x%x", prot);
}
diff --git a/print-gre.c b/print-gre.c
index 09b2be11..53c418fb 100644
--- a/print-gre.c
+++ b/print-gre.c
@@ -224,7 +224,7 @@ gre_print_0(netdissect_options *ndo, const u_char *bp, u_int length)
isoclns_print(ndo, bp, len);
break;
case ETHERTYPE_TEB:
- ether_print(ndo, bp, len, ND_BYTES_AVAILABLE_AFTER(bp), NULL, NULL);
+ ether_print(ndo, bp, len, ND_BYTES_AVAILABLE_AFTER(bp), NULL, NULL, FALSE);
break;
default:
ND_PRINT("gre-proto-0x%x", prot);
diff --git a/print-juniper.c b/print-juniper.c
index 91d5755b..0394fd89 100644
--- a/print-juniper.c
+++ b/print-juniper.c
@@ -694,7 +694,7 @@ juniper_pppoe_if_print(netdissect_options *ndo,
p+=l2info.header_len;
/* this DLT contains nothing but raw ethernet frames */
- ether_print(ndo, p, l2info.length, l2info.caplen, NULL, NULL);
+ ether_print(ndo, p, l2info.length, l2info.caplen, NULL, NULL, FALSE);
return l2info.header_len;
}
#endif
@@ -713,7 +713,7 @@ juniper_ether_if_print(netdissect_options *ndo,
p+=l2info.header_len;
/* this DLT contains nothing but raw Ethernet frames */
- ether_print(ndo, p, l2info.length, l2info.caplen, NULL, NULL);
+ ether_print(ndo, p, l2info.length, l2info.caplen, NULL, NULL, FALSE);
return l2info.header_len;
}
#endif
@@ -1071,7 +1071,7 @@ juniper_atm2_if_print(netdissect_options *ndo,
if (l2info.direction != JUNIPER_BPF_PKT_IN && /* ether-over-1483 encaps ? */
/* use EXTRACT_, not GET_ (not packet buffer pointer) */
(EXTRACT_BE_U_4(l2info.cookie) & ATM2_GAP_COUNT_MASK)) {
- ether_print(ndo, p, l2info.length, l2info.caplen, NULL, NULL);
+ ether_print(ndo, p, l2info.length, l2info.caplen, NULL, NULL, FALSE);
return l2info.header_len;
}
diff --git a/print-lane.c b/print-lane.c
index a6f83b1a..d608ffde 100644
--- a/print-lane.c
+++ b/print-lane.c
@@ -113,7 +113,7 @@ lane_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen)
* Now print the encapsulated frame, under the assumption
* that it's an Ethernet frame.
*/
- ether_print(ndo, p, length, caplen, lane_hdr_print, p - 2);
+ ether_print(ndo, p, length, caplen, lane_hdr_print, p - 2, FALSE);
}
u_int
diff --git a/print-llc.c b/print-llc.c
index 750a8ccd..c4422d94 100644
--- a/print-llc.c
+++ b/print-llc.c
@@ -525,7 +525,7 @@ snap_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen,
/*
* What remains is an Ethernet packet.
*/
- ether_print(ndo, p, length, caplen, NULL, NULL);
+ ether_print(ndo, p, length, caplen, NULL, NULL, FALSE);
return (1);
case PID_RFC2684_802_5_FCS:
diff --git a/print-nsh.c b/print-nsh.c
index 17d62569..70e962df 100644
--- a/print-nsh.c
+++ b/print-nsh.c
@@ -170,7 +170,7 @@ nsh_print(netdissect_options *ndo, const u_char *bp, u_int len)
ip6_print(ndo, bp, next_len);
break;
case 0x3:
- ether_print(ndo, bp, next_len, ND_BYTES_AVAILABLE_AFTER(bp), NULL, NULL);
+ ether_print(ndo, bp, next_len, ND_BYTES_AVAILABLE_AFTER(bp), NULL, NULL, FALSE);
break;
default:
ND_PRINT("ERROR: unknown-next-protocol");
diff --git a/print-openflow-1.0.c b/print-openflow-1.0.c
index 71d8a7c1..51ed38ef 100644
--- a/print-openflow-1.0.c
+++ b/print-openflow-1.0.c
@@ -1128,7 +1128,7 @@ of10_packet_data_print(netdissect_options *ndo,
ND_TCHECK_LEN(cp, len);
ndo->ndo_vflag -= 3;
ND_PRINT(", frame decoding below\n");
- ether_print(ndo, cp, len, ND_BYTES_AVAILABLE_AFTER(cp), NULL, NULL);
+ ether_print(ndo, cp, len, ND_BYTES_AVAILABLE_AFTER(cp), NULL, NULL, FALSE);
ndo->ndo_vflag += 3;
return cp + len;
diff --git a/print-otv.c b/print-otv.c
index dbcef9f6..f578d89e 100644
--- a/print-otv.c
+++ b/print-otv.c
@@ -67,7 +67,7 @@ otv_print(netdissect_options *ndo, const u_char *bp, u_int len)
ND_TCHECK_1(bp);
bp += 1;
- ether_print(ndo, bp, len - OTV_HDR_LEN, ND_BYTES_AVAILABLE_AFTER(bp), NULL, NULL);
+ ether_print(ndo, bp, len - OTV_HDR_LEN, ND_BYTES_AVAILABLE_AFTER(bp), NULL, NULL, FALSE);
return;
trunc:
diff --git a/print-vxlan-gpe.c b/print-vxlan-gpe.c
index d7a80f25..eb885824 100644
--- a/print-vxlan-gpe.c
+++ b/print-vxlan-gpe.c
@@ -92,7 +92,7 @@ vxlan_gpe_print(netdissect_options *ndo, const u_char *bp, u_int len)
ip6_print(ndo, bp, len - VXLAN_GPE_HDR_LEN);
break;
case 0x3:
- ether_print(ndo, bp, len - VXLAN_GPE_HDR_LEN, ND_BYTES_AVAILABLE_AFTER(bp), NULL, NULL);
+ ether_print(ndo, bp, len - VXLAN_GPE_HDR_LEN, ND_BYTES_AVAILABLE_AFTER(bp), NULL, NULL, FALSE);
break;
case 0x4:
nsh_print(ndo, bp, len - VXLAN_GPE_HDR_LEN);
diff --git a/print-vxlan.c b/print-vxlan.c
index d2b896b0..3d8c76c3 100644
--- a/print-vxlan.c
+++ b/print-vxlan.c
@@ -65,7 +65,7 @@ vxlan_print(netdissect_options *ndo, const u_char *bp, u_int len)
ND_PRINT("flags [%s] (0x%02x), ", flags & 0x08 ? "I" : ".", flags);
ND_PRINT("vni %u\n", vni);
- ether_print(ndo, bp, len - VXLAN_HDR_LEN, ND_BYTES_AVAILABLE_AFTER(bp), NULL, NULL);
+ ether_print(ndo, bp, len - VXLAN_HDR_LEN, ND_BYTES_AVAILABLE_AFTER(bp), NULL, NULL, FALSE);
return;
diff --git a/print.c b/print.c
index 9c4eef55..dcecb1ff 100644
--- a/print.c
+++ b/print.c
@@ -53,7 +53,6 @@ struct void_printer {
};
static const struct uint_printer uint_printers[] = {
- { ether_if_print, DLT_EN10MB },
#ifdef DLT_IEEE802_15_4
{ ieee802_15_4_if_print, DLT_IEEE802_15_4 },
#endif
@@ -63,12 +62,6 @@ static const struct uint_printer uint_printers[] = {
#ifdef DLT_IEEE802_15_4_TAP
{ ieee802_15_4_tap_if_print, DLT_IEEE802_15_4_TAP },
#endif
-#ifdef DLT_NETANALYZER
- { netanalyzer_if_print, DLT_NETANALYZER },
-#endif
-#ifdef DLT_NETANALYZER_TRANSPARENT
- { netanalyzer_transparent_if_print, DLT_NETANALYZER_TRANSPARENT },
-#endif
#ifdef DLT_CIP
{ cip_if_print, DLT_CIP },
#endif
@@ -184,21 +177,9 @@ static const struct uint_printer uint_printers[] = {
#ifdef DLT_PPP_SERIAL
{ ppp_hdlc_if_print, DLT_PPP_SERIAL },
#endif
-#ifdef DLT_DSA_TAG_BRCM
- { brcm_tag_if_print, DLT_DSA_TAG_BRCM },
-#endif
-#ifdef DLT_DSA_TAG_BRCM_PREPEND
- { brcm_tag_prepend_if_print, DLT_DSA_TAG_BRCM_PREPEND },
-#endif
#ifdef DLT_VSOCK
{ vsock_if_print, DLT_VSOCK },
#endif
-#ifdef DLT_DSA_TAG_DSA
- { dsa_if_print, DLT_DSA_TAG_DSA },
-#endif
-#ifdef DLT_DSA_TAG_EDSA
- { edsa_if_print, DLT_DSA_TAG_EDSA },
-#endif
{ NULL, 0 },
};
@@ -210,15 +191,34 @@ static const struct void_printer void_printers[] = {
#ifdef DLT_ARCNET_LINUX
{ arcnet_linux_if_print, DLT_ARCNET_LINUX },
#endif
+#ifdef DLT_DSA_TAG_BRCM
+ { brcm_tag_if_print, DLT_DSA_TAG_BRCM },
+#endif
+#ifdef DLT_DSA_TAG_BRCM_PREPEND
+ { brcm_tag_prepend_if_print, DLT_DSA_TAG_BRCM_PREPEND },
+#endif
#ifdef DLT_BLUETOOTH_HCI_H4_WITH_PHDR
{ bt_if_print, DLT_BLUETOOTH_HCI_H4_WITH_PHDR},
#endif
+#ifdef DLT_DSA_TAG_DSA
+ { dsa_if_print, DLT_DSA_TAG_DSA },
+#endif
+#ifdef DLT_DSA_TAG_EDSA
+ { edsa_if_print, DLT_DSA_TAG_EDSA },
+#endif
#ifdef DLT_ENC
{ enc_if_print, DLT_ENC },
#endif
+ { ether_if_print, DLT_EN10MB },
#ifdef DLT_IPNET
{ ipnet_if_print, DLT_IPNET },
#endif
+#ifdef DLT_NETANALYZER
+ { netanalyzer_if_print, DLT_NETANALYZER },
+#endif
+#ifdef DLT_NETANALYZER_TRANSPARENT
+ { netanalyzer_transparent_if_print, DLT_NETANALYZER_TRANSPARENT },
+#endif
#ifdef DLT_NFLOG
{ nflog_if_print, DLT_NFLOG},
#endif