X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/24598ce6b7cfe72ada92aed48691fdf092d94fc7..refs/pull/471/head:/print-hsrp.c?ds=sidebyside diff --git a/print-hsrp.c b/print-hsrp.c index 9b8e70e4..b63f3190 100644 --- a/print-hsrp.c +++ b/print-hsrp.c @@ -29,14 +29,13 @@ /* Cisco Hot Standby Router Protocol (HSRP). */ -#define NETDISSECT_REWORKED #ifdef HAVE_CONFIG_H #include "config.h" #endif -#include +#include -#include "interface.h" +#include "netdissect.h" #include "addrtoname.h" /* HSRP op code types. */ @@ -79,22 +78,22 @@ static const struct tok states[] = { /* HSRP protocol header. */ struct hsrp { - u_int8_t hsrp_version; - u_int8_t hsrp_op_code; - u_int8_t hsrp_state; - u_int8_t hsrp_hellotime; - u_int8_t hsrp_holdtime; - u_int8_t hsrp_priority; - u_int8_t hsrp_group; - u_int8_t hsrp_reserved; - u_int8_t hsrp_authdata[HSRP_AUTH_SIZE]; + uint8_t hsrp_version; + uint8_t hsrp_op_code; + uint8_t hsrp_state; + uint8_t hsrp_hellotime; + uint8_t hsrp_holdtime; + uint8_t hsrp_priority; + uint8_t hsrp_group; + uint8_t hsrp_reserved; + uint8_t hsrp_authdata[HSRP_AUTH_SIZE]; struct in_addr hsrp_virtaddr; }; void -hsrp_print(netdissect_options *ndo, register const u_int8_t *bp, register u_int len) +hsrp_print(netdissect_options *ndo, register const uint8_t *bp, register u_int len) { - struct hsrp *hp = (struct hsrp *) bp; + const struct hsrp *hp = (const struct hsrp *) bp; ND_TCHECK(hp->hsrp_version); ND_PRINT((ndo, "HSRPv%d", hp->hsrp_version));