]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-isakmp.c
On Solaris, for 64-bit builds, use the 64-bit pcap-config.
[tcpdump] / print-isakmp.c
index 21ca902744f0895671b9013a887d790bba8a179e..52bf1fda5216d1f50e67120a1c015c4f90b43c06 100644 (file)
@@ -914,11 +914,9 @@ ikev1_attrmap_print(netdissect_options *ndo,
        u_int totlen;
        uint32_t t, v;
 
-       ND_TCHECK_1(p);
        if (GET_U_1(p) & 0x80)
                totlen = 4;
        else {
-               ND_TCHECK_2(p + 2);
                totlen = 4 + GET_BE_U_2(p + 2);
        }
        if (ep2 < p + totlen) {
@@ -926,7 +924,6 @@ ikev1_attrmap_print(netdissect_options *ndo,
                return ep2 + 1;
        }
 
-       ND_TCHECK_2(p);
        ND_PRINT("(");
        t = GET_BE_U_2(p) & 0x7fff;
        if (map && t < nmap && map[t].type)
@@ -935,7 +932,6 @@ ikev1_attrmap_print(netdissect_options *ndo,
                ND_PRINT("type=#%u ", t);
        if (GET_U_1(p) & 0x80) {
                ND_PRINT("value=");
-               ND_TCHECK_2(p + 2);
                v = GET_BE_U_2(p + 2);
                if (map && t < nmap && v < map[t].nvalue && map[t].value[v])
                        ND_PRINT("%s", map[t].value[v]);
@@ -965,11 +961,9 @@ ikev1_attr_print(netdissect_options *ndo, const u_char *p, const u_char *ep2)
        u_int totlen;
        uint32_t t;
 
-       ND_TCHECK_1(p);
        if (GET_U_1(p) & 0x80)
                totlen = 4;
        else {
-               ND_TCHECK_2(p + 2);
                totlen = 4 + GET_BE_U_2(p + 2);
        }
        if (ep2 < p + totlen) {
@@ -977,7 +971,6 @@ ikev1_attr_print(netdissect_options *ndo, const u_char *p, const u_char *ep2)
                return ep2 + 1;
        }
 
-       ND_TCHECK_2(p);
        ND_PRINT("(");
        t = GET_BE_U_2(p) & 0x7fff;
        ND_PRINT("type=#%u ", t);
@@ -1042,7 +1035,6 @@ ikev1_sa_print(netdissect_options *ndo, u_char tpay _U_,
 
        np = (const u_char *)ext + sizeof(struct ikev1_pl_sa);
        if (sit != 0x01) {
-               ND_TCHECK_4(ext + 1);
                ident = GET_BE_U_4(ext + 1);
                ND_PRINT(" ident=%u", ident);
                np += sizeof(ident);
@@ -2689,7 +2681,7 @@ ikev2_e_print(netdissect_options *ndo,
        np = GET_U_1(ext->np);
 
        /* try to decrypt it! */
-       if(esp_print_decrypt_buffer_by_ikev2(ndo,
+       if(esp_decrypt_buffer_by_ikev2_print(ndo,
                                             GET_U_1(base->flags) & ISAKMP_FLAG_I,
                                             base->i_ck, base->r_ck,
                                             dat, dat+dlen)) {
@@ -2701,7 +2693,7 @@ ikev2_e_print(netdissect_options *ndo,
                                ndo->ndo_snapend, phase, doi, proto, depth+1);
 
                /*
-                * esp_print_decrypt_buffer_by_ikev2 pushed information
+                * esp_decrypt_buffer_by_ikev2_print pushed information
                 * on the buffer stack; we're done with the buffer, so
                 * pop it (which frees the buffer)
                 */
@@ -3059,7 +3051,7 @@ isakmp_print(netdissect_options *ndo,
        /* initialize SAs */
        if (ndo->ndo_sa_list_head == NULL) {
                if (ndo->ndo_espsecret)
-                       esp_print_decodesecret(ndo);
+                       esp_decodesecret_print(ndo);
        }
 #endif
 
@@ -3111,7 +3103,6 @@ isakmp_rfc3948_print(netdissect_options *ndo,
                     const u_char *bp2, int ver, int fragmented, u_int ttl_hl)
 {
        ndo->ndo_protocol = "isakmp_rfc3948";
-       ND_TCHECK_1(bp);
        if(length == 1 && GET_U_1(bp)==0xff) {
                ND_PRINT("isakmp-nat-keep-alive");
                return;
@@ -3120,7 +3111,6 @@ isakmp_rfc3948_print(netdissect_options *ndo,
        if(length < 4) {
                goto trunc;
        }
-       ND_TCHECK_1(bp + 3);
 
        /*
         * see if this is an IKE packet
@@ -3148,5 +3138,4 @@ isakmp_rfc3948_print(netdissect_options *ndo,
 
 trunc:
        nd_print_trunc(ndo);
-       return;
 }