]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-isakmp.c
More nd_ification of structures.
[tcpdump] / print-isakmp.c
index 641ee734734d59310593fb8b1f5de029a54a3f73..d82c4f2848cc85e0d223d210b39d5e9a8f87ea29 100644 (file)
@@ -918,7 +918,7 @@ ikev1_attrmap_print(netdissect_options *ndo,
        int totlen;
        uint32_t t, v;
 
-       ND_TCHECK(p[0]);
+       ND_TCHECK_1(p);
        if (EXTRACT_U_1(p) & 0x80)
                totlen = 4;
        else {
@@ -969,7 +969,7 @@ ikev1_attr_print(netdissect_options *ndo, const u_char *p, const u_char *ep2)
        int totlen;
        uint32_t t;
 
-       ND_TCHECK(p[0]);
+       ND_TCHECK_1(p);
        if (EXTRACT_U_1(p) & 0x80)
                totlen = 4;
        else {
@@ -987,7 +987,7 @@ ikev1_attr_print(netdissect_options *ndo, const u_char *p, const u_char *ep2)
        ND_PRINT((ndo,"type=#%d ", t));
        if (EXTRACT_U_1(p) & 0x80) {
                ND_PRINT((ndo,"value="));
-               t = p[2];
+               t = EXTRACT_U_1(p + 2);
                if (!rawprint(ndo, (const uint8_t *)(p + 2), 2)) {
                        ND_PRINT((ndo,")"));
                        goto trunc;
@@ -3095,7 +3095,7 @@ isakmp_rfc3948_print(netdissect_options *ndo,
                     const u_char *bp, u_int length,
                     const u_char *bp2)
 {
-       ND_TCHECK(bp[0]);
+       ND_TCHECK_1(bp);
        if(length == 1 && EXTRACT_U_1(bp)==0xff) {
                ND_PRINT((ndo, "isakmp-nat-keep-alive"));
                return;
@@ -3104,7 +3104,7 @@ isakmp_rfc3948_print(netdissect_options *ndo,
        if(length < 4) {
                goto trunc;
        }
-       ND_TCHECK(bp[3]);
+       ND_TCHECK_1(bp + 3);
 
        /*
         * see if this is an IKE packet