]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ppi.c
Fix spaces
[tcpdump] / print-ppi.c
index 1c4469fa3da82414873e9dc94d12c50165e8929b..398ed689134818492879f73d2e97797ff12d81fd 100644 (file)
@@ -5,15 +5,14 @@
 /* \summary: Oracle DLT_PPI printer */
 
 #ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
 #endif
 
-#include <netdissect-stdinc.h>
+#include "netdissect-stdinc.h"
 
 #include "netdissect.h"
 #include "extract.h"
 
-static const char tstr[] = "[|ppi]";
 
 typedef struct ppi_header {
        nd_uint8_t      ppi_ver;
@@ -26,7 +25,7 @@ typedef struct ppi_header {
 
 #ifdef DLT_PPI
 
-static inline void
+static void
 ppi_header_print(netdissect_options *ndo, const u_char *bp, u_int length)
 {
        const ppi_header_t *hdr;
@@ -64,8 +63,9 @@ ppi_print(netdissect_options *ndo,
        uint32_t hdrlen;
        struct pcap_pkthdr nhdr;
 
+       ndo->ndo_protocol = "ppi";
        if (caplen < sizeof(ppi_header_t)) {
-               ND_PRINT(" %s", tstr);
+               nd_print_trunc(ndo);
                return (caplen);
        }
 
@@ -77,11 +77,11 @@ ppi_print(netdissect_options *ndo,
                 * If we don't have the entire PPI header, don't
                 * bother.
                 */
-               ND_PRINT(" %s", tstr);
+               nd_print_trunc(ndo);
                return (caplen);
        }
        if (len < sizeof(ppi_header_t)) {
-               ND_PRINT(" %s", tstr);
+               nd_print_trunc(ndo);
                return (len);
        }
        ND_TCHECK_4(hdr->ppi_dlt);
@@ -122,14 +122,7 @@ u_int
 ppi_if_print(netdissect_options *ndo,
             const struct pcap_pkthdr *h, const u_char *p)
 {
+       ndo->ndo_protocol = "ppi_if";
        return (ppi_print(ndo, h, p));
 }
-
-/*
- * Local Variables:
- * c-style: whitesmith
- * c-basic-offset: 8
- * End:
- */
-
 #endif /* DLT_PPI */