]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-zephyr.c
Merge pull request #827 from NanXiao/patch-1
[tcpdump] / print-zephyr.c
index b7b1defdcf77d7d89e082e3969a9483ecd67f1d5..b0f8cd31388a4480dfc64d30ccf0d679bc04185f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Decode and print Zephyr packets.
  *
- *     http://web.mit.edu/zephyr/doc/protocol
+ *     https://web.mit.edu/zephyr/doc/protocol
  *
  * Copyright (c) 2001 Nickolai Zeldovich <[email protected]>
  * All rights reserved.
@@ -23,7 +23,7 @@
 /* \summary: Zephyr printer */
 
 #ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
 #endif
 
 #include "netdissect-stdinc.h"
@@ -32,6 +32,8 @@
 #include <string.h>
 #include <stdlib.h>
 
+#include "netdissect-ctype.h"
+
 #include "netdissect.h"
 
 struct z_packet {
@@ -134,7 +136,7 @@ str_to_lower(const char *string)
 
     zb_string = z_buf;
     while (*zb_string) {
-       *zb_string = tolower((unsigned char)(*zb_string));
+       *zb_string = ND_ASCII_TOLOWER(*zb_string);
        zb_string++;
     }
 
@@ -169,6 +171,7 @@ zephyr_print(netdissect_options *ndo, const u_char *cp, int length)
     int lose = 0;
     int truncated = 0;
 
+    ndo->ndo_protocol = "zephyr";
     /* squelch compiler warnings */
 
 #define PARSE_STRING                                           \
@@ -342,6 +345,6 @@ zephyr_print(netdissect_options *ndo, const u_char *cp, int length)
     return;
 
 trunc:
-    ND_PRINT(" [|zephyr] (%d)", length);
+    nd_print_trunc(ndo);
     return;
 }