/*
* Decode and print Zephyr packets.
*
+ * http://web.mit.edu/zephyr/doc/protocol
+ *
* All rights reserved.
*
*/
#ifndef lint
-static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-zephyr.c,v 1.3 2002-03-05 11:33: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 <tcpdump-stdinc.h>
+
#include <stdio.h>
-#include <ctype.h>
#include <string.h>
#include <stdlib.h>
-#include <sys/types.h>
#include "interface.h"
char *inst;
char *opcode;
char *sender;
- char *recipient;
+ const char *recipient;
char *format;
int cksum;
int multi;
}
static const char *
-z_triple(char *class, char *inst, char *recipient)
+z_triple(char *class, char *inst, const char *recipient)
{
if (!*recipient)
recipient = "*";
string = z_buf;
while (*string) {
- *string = tolower(*string);
+ *string = tolower((unsigned char)(*string));
string++;
}
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;