]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ipfc.c
OSPF: Use %zu to print sizeof values
[tcpdump] / print-ipfc.c
index 358bf0ba24c97bcbd56b422be410b95addb7755c..5222e51248e3207f7e964ef098daaa1fcd753f28 100644 (file)
@@ -34,7 +34,6 @@
 #include "netdissect.h"
 #include "addrtoname.h"
 
-static const char tstr[] = " [|ipfc]";
 
 struct ipfc_header {
        nd_byte ipfc_dhost[2+MAC_ADDR_LEN];
@@ -95,6 +94,7 @@ ipfc_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 = "ipfc";
        if (caplen < IPFC_HDRLEN)
                goto trunc;
        /*
@@ -129,7 +129,7 @@ ipfc_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen)
        }
        return (IPFC_HDRLEN + llc_hdrlen);
 trunc:
-       ND_PRINT("%s", tstr);
+       nd_print_trunc(ndo);
        return caplen;
 }
 
@@ -139,8 +139,9 @@ trunc:
  * 'h->len' is the length of the packet off the wire, and 'h->caplen'
  * is the number of bytes actually captured.
  */
-u_int
+void
 ipfc_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *p)
 {
-       return (ipfc_print(ndo, p, h->len, h->caplen));
+       ndo->ndo_protocol = "ipfc";
+       ndo->ndo_ll_hdr_len += ipfc_print(ndo, p, h->len, h->caplen);
 }