X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/7885cfa165458a05ef818c34ee03affc79f03725..296d466cd6bbf2f7e75e15bb6a01268e88c76ed0:/print-rsvp.c diff --git a/print-rsvp.c b/print-rsvp.c index ea6ccfd7..9226c84e 100644 --- a/print-rsvp.c +++ b/print-rsvp.c @@ -19,9 +19,7 @@ /* specification: RFC 2205 */ -#ifdef HAVE_CONFIG_H #include -#endif #include "netdissect-stdinc.h" @@ -341,7 +339,7 @@ struct rsvp_obj_frr_t { #define RSVP_OBJ_XRO_MASK_SUBOBJ(x) ((x)&0x7f) #define RSVP_OBJ_XRO_MASK_LOOSE(x) ((x)&0x80) -#define RSVP_OBJ_CAPABILITY_FLAGS_MASK 0x7 +#define RSVP_OBJ_CAPABILITY_FLAGS_MASK 0x7U #define RSVP_OBJ_XRO_RES 0 #define RSVP_OBJ_XRO_IPV4 1 @@ -520,9 +518,7 @@ rsvp_intserv_print(netdissect_options *ndo, if (obj_tlen < 4) return 0; - ND_TCHECK_1(tptr); parameter_id = GET_U_1(tptr); - ND_TCHECK_2(tptr + 2); parameter_length = GET_BE_U_2(tptr + 2)<<2; /* convert wordcount to bytecount */ ND_PRINT("\n\t Parameter ID: %s (%u), length: %u, Flags: [0x%02x]", @@ -544,7 +540,6 @@ rsvp_intserv_print(netdissect_options *ndo, * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */ if (parameter_length == 4) { - ND_TCHECK_4(tptr + 4); ND_PRINT("\n\t\tIS hop count: %u", GET_BE_U_4(tptr + 4)); } break; @@ -558,7 +553,6 @@ rsvp_intserv_print(netdissect_options *ndo, * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */ if (parameter_length == 4) { - ND_TCHECK_4(tptr + 4); bw.i = GET_BE_U_4(tptr + 4); ND_PRINT("\n\t\tPath b/w estimate: %.10g Mbps", bw.f / 125000); } @@ -573,7 +567,6 @@ rsvp_intserv_print(netdissect_options *ndo, * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */ if (parameter_length == 4) { - ND_TCHECK_4(tptr + 4); ND_PRINT("\n\t\tMinimum path latency: "); if (GET_BE_U_4(tptr + 4) == 0xffffffff) ND_PRINT("don't care"); @@ -592,7 +585,6 @@ rsvp_intserv_print(netdissect_options *ndo, * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */ if (parameter_length == 4) { - ND_TCHECK_4(tptr + 4); ND_PRINT("\n\t\tComposed MTU: %u bytes", GET_BE_U_4(tptr + 4)); } break; @@ -652,7 +644,6 @@ rsvp_intserv_print(netdissect_options *ndo, case 135: case 136: if (parameter_length == 4) { - ND_TCHECK_4(tptr + 4); ND_PRINT("\n\t\tValue: %u", GET_BE_U_4(tptr + 4)); } break;