]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-hsrp.c
Translate UDP/1700 as RADIUS
[tcpdump] / print-hsrp.c
index b72ac0a69fa610eb91ab8ec46f66fad4a7ed1686..b63f3190fcc11a141bd4f0c0839586839ae0311f 100644 (file)
 
 /* Cisco Hot Standby Router Protocol (HSRP). */
 
 
 /* Cisco Hot Standby Router Protocol (HSRP). */
 
-#define NETDISSECT_REWORKED
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <tcpdump-stdinc.h>
+#include <netdissect-stdinc.h>
 
 
-#include "interface.h"
+#include "netdissect.h"
 #include "addrtoname.h"
 
 /* HSRP op code types. */
 #include "addrtoname.h"
 
 /* HSRP op code types. */
@@ -79,22 +78,22 @@ static const struct tok states[] = {
 
 /* HSRP protocol header. */
 struct hsrp {
 
 /* HSRP protocol header. */
 struct hsrp {
-       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];
+       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 uint8_t *bp, register u_int len)
 {
        struct in_addr  hsrp_virtaddr;
 };
 
 void
 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));
 
        ND_TCHECK(hp->hsrp_version);
        ND_PRINT((ndo, "HSRPv%d", hp->hsrp_version));