summaryrefslogtreecommitdiffstats
path: root/print-zep.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:52:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:52:31 +0000
commit31cd589d20ba8d3d6b3fc4fccacc40d38a163c5d (patch)
tree99d6c086833d530e5d1d33a8128961f8149843f0 /print-zep.c
parentAdding upstream version 4.99.4. (diff)
downloadtcpdump-31cd589d20ba8d3d6b3fc4fccacc40d38a163c5d.tar.xz
tcpdump-31cd589d20ba8d3d6b3fc4fccacc40d38a163c5d.zip
Adding upstream version 4.99.5.upstream/4.99.5upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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));