]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-zephyr.c
CARP: NDOize
[tcpdump] / print-zephyr.c
index a9833785f32d980611b6008fabb28dc428cfd689..a08ab04ca253df61581223a4be09c0eada14935d 100644 (file)
@@ -1,6 +1,8 @@
 /*
  * Decode and print Zephyr packets.
  *
+ *     http://web.mit.edu/zephyr/doc/protocol
+ *
  * Copyright (c) 2001 Nickolai Zeldovich <[email protected]>
  * All rights reserved.
  *
@@ -18,7 +20,6 @@
  * PURPOSE.
  */
 
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
 #include "interface.h"
 
-#ifndef lint
-static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-zephyr.c,v 1.7 2003-11-15 00:39:44 guy Exp $";
-#endif
 struct z_packet {
     char *version;
     int numfields;
@@ -68,7 +65,7 @@ enum z_packet_type {
     Z_PACKET_STAT
 };
 
-static struct tok z_types[] = {
+static const struct tok z_types[] = {
     { Z_PACKET_UNSAFE,         "unsafe" },
     { Z_PACKET_UNACKED,                "unacked" },
     { Z_PACKET_ACKED,          "acked" },
@@ -138,6 +135,15 @@ zephyr_print(const u_char *cp, int length)
     char *s;
     int lose = 0;
 
+    /* squelch compiler warnings */
+
+    z.kind = 0;
+    z.class = 0;
+    z.inst = 0;
+    z.opcode = 0;
+    z.sender = 0;
+    z.recipient = 0;
+
 #define PARSE_STRING                           \
        s = parse_field(&parse, &parselen);     \
        if (!s) lose = 1;