X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/e2982e7f6f0b624a773ec5a58885ee80fab46d34..a8abce5c5e2dce2ba6dbccd5d3829da104b80f9c:/print-fddi.c?ds=sidebyside diff --git a/print-fddi.c b/print-fddi.c index 825866fb..d73d92d6 100644 --- a/print-fddi.c +++ b/print-fddi.c @@ -22,10 +22,10 @@ /* \summary: Fiber Distributed Data Interface (FDDI) printer */ #ifdef HAVE_CONFIG_H -#include "config.h" +#include #endif -#include +#include "netdissect-stdinc.h" #include @@ -158,7 +158,7 @@ static const u_char fddi_bit_swap[] = { /* * Print FDDI frame-control bits */ -static inline void +static void print_fddi_fc(netdissect_options *ndo, u_char fc) { switch (fc) { @@ -226,7 +226,7 @@ print_fddi_fc(netdissect_options *ndo, u_char fc) } /* Extract src, dst addresses */ -static inline void +static void extract_fddi_addrs(const struct fddi_header *fddip, char *fsrc, char *fdst) { int i; @@ -250,7 +250,7 @@ extract_fddi_addrs(const struct fddi_header *fddip, char *fsrc, char *fdst) /* * Print the FDDI MAC header */ -static inline void +static void fddi_hdr_print(netdissect_options *ndo, const struct fddi_header *fddip, u_int length, const u_char *fsrc, const u_char *fdst) @@ -267,7 +267,7 @@ fddi_hdr_print(netdissect_options *ndo, length); } -static inline void +static void fddi_smt_print(netdissect_options *ndo, const u_char *p _U_, u_int length _U_) { ND_PRINT(""); @@ -282,8 +282,9 @@ fddi_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen) struct lladdr_info src, dst; int llc_hdrlen; + ndo->ndo_protocol = "fddi"; if (caplen < FDDI_HDRLEN) { - ND_PRINT("[|fddi]"); + nd_print_trunc(ndo); return (caplen); } @@ -344,5 +345,6 @@ fddi_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen) u_int fddi_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *p) { + ndo->ndo_protocol = "fddi_if"; return (fddi_print(ndo, p, h->len, h->caplen)); }