X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/b46194277a029332c9d1b0ba38110cabc179210f..6c8ef0eb86a39c277d1a43802dd8ea01b51cfb2a:/print-krb.c diff --git a/print-krb.c b/print-krb.c index bcc81bf1..de69054c 100644 --- a/print-krb.c +++ b/print-krb.c @@ -21,14 +21,15 @@ * Initial contribution from John Hawkinson (jhawk@mit.edu). */ -#define NETDISSECT_REWORKED +/* \summary: Kerberos printer */ + #ifdef HAVE_CONFIG_H #include "config.h" #endif -#include +#include -#include "interface.h" +#include "netdissect.h" #include "extract.h" static const char tstr[] = " [|kerberos]"; @@ -60,8 +61,8 @@ static void krb4_print(netdissect_options *, const u_char *); #define KERB_ERR_NULL_KEY 10 struct krb { - u_int8_t pvno; /* Protocol Version */ - u_int8_t type; /* Type+B */ + uint8_t pvno; /* Protocol Version */ + uint8_t type; /* Type+B */ }; static const struct tok type2str[] = { @@ -156,7 +157,7 @@ krb4_print(netdissect_options *ndo, #define IS_LENDIAN(kp) (((kp)->type & 0x01) != 0) #define KTOHSP(kp, cp) (IS_LENDIAN(kp) ? EXTRACT_LE_16BITS(cp) : EXTRACT_16BITS(cp)) - kp = (struct krb *)cp; + kp = (const struct krb *)cp; if ((&kp->type) >= ndo->ndo_snapend) { ND_PRINT((ndo, "%s", tstr)); @@ -227,7 +228,7 @@ krb_print(netdissect_options *ndo, { register const struct krb *kp; - kp = (struct krb *)dat; + kp = (const struct krb *)dat; if (dat >= ndo->ndo_snapend) { ND_PRINT((ndo, "%s", tstr));