summaryrefslogtreecommitdiffstats
path: root/print-zep.c
diff options
context:
space:
mode:
Diffstat (limited to 'print-zep.c')
-rw-r--r--print-zep.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/print-zep.c b/print-zep.c
index 52901e7..c507e36 100644
--- a/print-zep.c
+++ b/print-zep.c
@@ -21,9 +21,7 @@
/* \summary: ZigBee Encapsulation Protocol (ZEP) printer */
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
#include "netdissect-stdinc.h"
@@ -85,7 +83,7 @@ static void zep_print_ts(netdissect_options *ndo, const u_char *p)
char time_buf[128];
ND_PRINT(" (%s)",
- nd_format_time(time_buf, sizeof (time_buf), "%Y/%m/%d %H:%M:%S",
+ nd_format_time(time_buf, sizeof (time_buf), "%Y-%m-%d %H:%M:%S",
localtime(&seconds)));
}
}
@@ -120,7 +118,7 @@ zep_print(netdissect_options *ndo,
if (version == 1) {
/* ZEP v1 packet. */
- ND_LCHECK_U(len, 16);
+ ND_ICHECK_U(len, <, 16);
ND_PRINT("Channel ID %u, Device ID 0x%04x, ",
GET_U_1(bp + 3), GET_BE_U_2(bp + 4));
if (GET_U_1(bp + 6))
@@ -136,7 +134,7 @@ zep_print(netdissect_options *ndo,
/* ZEP v2 packet. */
if (GET_U_1(bp + 3) == 2) {
/* ZEP v2 ack. */
- ND_LCHECK_U(len, 8);
+ ND_ICHECK_U(len, <, 8);
seq_no = GET_BE_U_4(bp + 4);
ND_PRINT("ACK, seq# = %u", seq_no);
inner_len = 0;
@@ -144,7 +142,7 @@ zep_print(netdissect_options *ndo,
len -= 8;
} else {
/* ZEP v2 data, or some other. */
- ND_LCHECK_U(len, 32);
+ ND_ICHECK_U(len, <, 32);
ND_PRINT("Type %u, Channel ID %u, Device ID 0x%04x, ",
GET_U_1(bp + 3), GET_U_1(bp + 4),
GET_BE_U_2(bp + 5));