X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/ba95dd9079cfced3a0a72eb3205d2de087fc6050..1e2972d729659cc2d95e67d364473488effa0390:/print-zephyr.c diff --git a/print-zephyr.c b/print-zephyr.c index 55d1f4a5..7c52e654 100644 --- a/print-zephyr.c +++ b/print-zephyr.c @@ -1,6 +1,8 @@ /* * Decode and print Zephyr packets. * + * http://web.mit.edu/zephyr/doc/protocol + * * Copyright (c) 2001 Nickolai Zeldovich * All rights reserved. * @@ -19,19 +21,19 @@ */ #ifndef lint -static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-zephyr.c,v 1.4 2002-04-27 23:39:25 guy Exp $"; +static const char rcsid[] _U_ = + "@(#) $Header: /tcpdump/master/tcpdump/print-zephyr.c,v 1.10 2007-08-09 18:47:27 hannes Exp $"; #endif #ifdef HAVE_CONFIG_H #include "config.h" #endif +#include + #include -#include #include #include -#include #include "interface.h" @@ -48,7 +50,7 @@ struct z_packet { char *inst; char *opcode; char *sender; - char *recipient; + const char *recipient; char *format; int cksum; int multi; @@ -105,7 +107,7 @@ parse_field(char **pptr, int *len) } static const char * -z_triple(char *class, char *inst, char *recipient) +z_triple(char *class, char *inst, const char *recipient) { if (!*recipient) recipient = "*"; @@ -138,6 +140,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;