X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/e2982e7f6f0b624a773ec5a58885ee80fab46d34..a8abce5c5e2dce2ba6dbccd5d3829da104b80f9c:/print-rrcp.c diff --git a/print-rrcp.c b/print-rrcp.c index 94406f9f..1d76613d 100644 --- a/print-rrcp.c +++ b/print-rrcp.c @@ -41,10 +41,10 @@ */ #ifdef HAVE_CONFIG_H -#include "config.h" +#include #endif -#include +#include "netdissect-stdinc.h" #include "netdissect.h" #include "addrtoname.h" @@ -96,6 +96,7 @@ rrcp_print(netdissect_options *ndo, uint8_t rrcp_proto; uint8_t rrcp_opcode; + ndo->ndo_protocol = "rrcp"; ND_TCHECK_1(cp + RRCP_PROTO_OFFSET); rrcp_proto = EXTRACT_U_1(cp + RRCP_PROTO_OFFSET); ND_TCHECK_1(cp + RRCP_OPCODE_ISREPLY_OFFSET); @@ -126,7 +127,7 @@ rrcp_print(netdissect_options *ndo, if (rrcp_proto==1 && rrcp_opcode==0 && ((EXTRACT_U_1(cp + RRCP_OPCODE_ISREPLY_OFFSET)) & RRCP_ISREPLY)){ ND_TCHECK_4(cp + RRCP_VENDOR_ID_OFFSET); - ND_PRINT(" downlink_port=%d, uplink_port=%d, uplink_mac=%s, vendor_id=%08x ,chip_id=%04x ", + ND_PRINT(" downlink_port=%u, uplink_port=%u, uplink_mac=%s, vendor_id=%08x ,chip_id=%04x ", EXTRACT_U_1(cp + RRCP_DOWNLINK_PORT_OFFSET), EXTRACT_U_1(cp + RRCP_UPLINK_PORT_OFFSET), etheraddr_string(ndo, cp + RRCP_UPLINK_MAC_OFFSET), @@ -141,5 +142,5 @@ rrcp_print(netdissect_options *ndo, return; trunc: - ND_PRINT("[|rrcp]"); + nd_print_trunc(ndo); }