/* \summary: Zephyr printer */
#ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
#endif
-#include <netdissect-stdinc.h>
+#include "netdissect-stdinc.h"
#include <stdio.h>
#include <string.h>
{
if (!*recipient)
recipient = "*";
- snprintf(z_buf, sizeof(z_buf), "<%s,%s,%s>", class, inst, recipient);
+ nd_snprintf(z_buf, sizeof(z_buf), "<%s,%s,%s>", class, inst, recipient);
z_buf[sizeof(z_buf)-1] = '\0';
return z_buf;
}
void
zephyr_print(netdissect_options *ndo, const u_char *cp, int length)
{
- struct z_packet z = {0};
+ struct z_packet z = {
+ NULL, /* version */
+ 0, /* numfields */
+ 0, /* kind */
+ NULL, /* uid */
+ 0, /* port */
+ 0, /* auth */
+ 0, /* authlen */
+ NULL, /* authdata */
+ NULL, /* class */
+ NULL, /* inst */
+ NULL, /* opcode */
+ NULL, /* sender */
+ NULL, /* recipient */
+ NULL, /* format */
+ 0, /* cksum */
+ 0, /* multi */
+ NULL /* multi_uid */
+ };
const char *parse = (const char *) cp;
int parselen = length;
const char *s;
int lose = 0;
int truncated = 0;
+ ndo->ndo_protocol = "zephyr";
/* squelch compiler warnings */
#define PARSE_STRING \
return;
trunc:
- ND_PRINT(" [|zephyr] (%d)", length);
+ nd_print_trunc(ndo);
return;
}