extern void enc_if_print IF_PRINTER_ARGS;
extern void ether_if_print IF_PRINTER_ARGS;
extern void fddi_if_print IF_PRINTER_ARGS;
-extern u_int fr_if_print IF_PRINTER_ARGS;
+extern void fr_if_print IF_PRINTER_ARGS;
extern void ieee802_11_if_print IF_PRINTER_ARGS;
extern void ieee802_11_radio_avs_if_print IF_PRINTER_ARGS;
extern void ieee802_11_radio_if_print IF_PRINTER_ARGS;
extern void 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 void mfr_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;
}
}
-u_int
+/* Frame Relay */
+void
fr_if_print(netdissect_options *ndo,
const struct pcap_pkthdr *h, const u_char *p)
{
u_int length = h->len;
u_int caplen = h->caplen;
- ndo->ndo_protocol = "fr_if";
- ND_TCHECK_4(p); /* minimum frame header length */
+ ndo->ndo_protocol = "fr";
+ if (caplen < 4) { /* minimum frame header length */
+ nd_print_trunc(ndo);
+ ndo->ndo_ll_hdr_len += caplen;
+ return;
+ }
- if ((length = fr_print(ndo, p, length)) == 0)
- return (0);
- else
- return length;
-trunc:
- nd_print_trunc(ndo);
- return caplen;
+ ndo->ndo_ll_hdr_len += fr_print(ndo, p, length);
}
u_int
}
-u_int
+/* Multi Link Frame Relay (FRF.16) */
+void
mfr_if_print(netdissect_options *ndo,
const struct pcap_pkthdr *h, const u_char *p)
{
u_int length = h->len;
u_int caplen = h->caplen;
- ndo->ndo_protocol = "mfr_if";
- ND_TCHECK_2(p); /* minimum frame header length */
+ ndo->ndo_protocol = "mfr";
+ if (caplen < 2) { /* minimum frame header length */
+ nd_print_trunc(ndo);
+ ndo->ndo_ll_hdr_len += caplen;
+ return;
+ }
- if ((length = mfr_print(ndo, p, length)) == 0)
- return (0);
- else
- return length;
-trunc:
- nd_print_trunc(ndo);
- return caplen;
+ ndo->ndo_ll_hdr_len += mfr_print(ndo, p, length);
}
#if defined(DLT_PFLOG) && defined(HAVE_NET_IF_PFLOG_H)
{ pflog_if_print, DLT_PFLOG },
#endif
-#ifdef DLT_FR
- { fr_if_print, DLT_FR },
-#endif
-#ifdef DLT_FRELAY
- { fr_if_print, DLT_FRELAY },
-#endif
-#ifdef DLT_MFR
- { mfr_if_print, DLT_MFR },
-#endif
#ifdef DLT_LTALK
{ ltalk_if_print, DLT_LTALK },
#endif
#endif
{ ether_if_print, DLT_EN10MB },
{ fddi_if_print, DLT_FDDI },
+#ifdef DLT_FR
+ { fr_if_print, DLT_FR },
+#endif
+#ifdef DLT_FRELAY
+ { fr_if_print, DLT_FRELAY },
+#endif
#ifdef DLT_IEEE802_11
{ ieee802_11_if_print, DLT_IEEE802_11},
#endif
#ifdef DLT_JUNIPER_SERVICES
{ juniper_services_if_print, DLT_JUNIPER_SERVICES },
#endif
+#ifdef DLT_MFR
+ { mfr_if_print, DLT_MFR },
+#endif
#ifdef DLT_NETANALYZER
{ netanalyzer_if_print, DLT_NETANALYZER },
#endif