]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-zephyr.c
OpenFlow: Use bittok2str(), fix OF1.0 port status.
[tcpdump] / print-zephyr.c
index bce7394b26ef0eb18e28306ae4b5a2be558b2d92..8d199b56bdee0f2a9588acdeba85cdaac7b221c2 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.
@@ -32,6 +32,8 @@
 #include <string.h>
 #include <stdlib.h>
 
+#include "netdissect-ctype.h"
+
 #include "netdissect.h"
 
 struct z_packet {
@@ -119,7 +121,7 @@ z_triple(const char *class, const char *inst, const char *recipient)
 {
     if (!*recipient)
        recipient = "*";
-    nd_snprintf(z_buf, sizeof(z_buf), "<%s,%s,%s>", class, inst, recipient);
+    snprintf(z_buf, sizeof(z_buf), "<%s,%s,%s>", class, inst, recipient);
     z_buf[sizeof(z_buf)-1] = '\0';
     return z_buf;
 }
@@ -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++;
     }
 
@@ -344,5 +346,4 @@ zephyr_print(netdissect_options *ndo, const u_char *cp, int length)
 
 trunc:
     nd_print_trunc(ndo);
-    return;
 }