X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/3805954a8c0fcc6b4933f3f1fabbb1c984ab74b6..10ac80fdecfa9b9b7d259d8f50d0b72ef1b18f12:/print-zephyr.c diff --git a/print-zephyr.c b/print-zephyr.c index 64b37d16..8d199b56 100644 --- a/print-zephyr.c +++ b/print-zephyr.c @@ -1,7 +1,7 @@ /* * Decode and print Zephyr packets. * - * http://web.mit.edu/zephyr/doc/protocol + * https://web.mit.edu/zephyr/doc/protocol * * Copyright (c) 2001 Nickolai Zeldovich * All rights reserved. @@ -23,15 +23,17 @@ /* \summary: Zephyr printer */ #ifdef HAVE_CONFIG_H -#include "config.h" +#include #endif -#include +#include "netdissect-stdinc.h" #include #include #include +#include "netdissect-ctype.h" + #include "netdissect.h" struct z_packet { @@ -134,7 +136,7 @@ str_to_lower(const char *string) zb_string = z_buf; while (*zb_string) { - *zb_string = tolower((unsigned char)(*zb_string)); + *zb_string = ND_ASCII_TOLOWER(*zb_string); zb_string++; } @@ -169,6 +171,7 @@ zephyr_print(netdissect_options *ndo, const u_char *cp, int length) int lose = 0; int truncated = 0; + ndo->ndo_protocol = "zephyr"; /* squelch compiler warnings */ #define PARSE_STRING \ @@ -342,6 +345,5 @@ zephyr_print(netdissect_options *ndo, const u_char *cp, int length) return; trunc: - ND_PRINT(" [|zephyr] (%d)", length); - return; + nd_print_trunc(ndo); }