]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-isakmp.c
Fix spaces
[tcpdump] / print-isakmp.c
index af7e7b654f0f860802d318ee46c3048d44260173..8c3c0806db27196cc6a6a705827b58d36b20a4ae 100644 (file)
@@ -1398,7 +1398,7 @@ ikev1_id_print(netdissect_options *ndo, u_char tpay _U_,
                        u_int i;
                        ND_PRINT(" len=%u ", len);
                        for (i = 0; i < len; i++)
-                               safeputchar(ndo, EXTRACT_U_1(data + i));
+                               fn_print_char(ndo, EXTRACT_U_1(data + i));
                        len = 0;
                        break;
                    }
@@ -2650,7 +2650,7 @@ ikev2_e_print(netdissect_options *ndo,
              int depth)
 {
        const u_char *dat;
-       volatile u_int dlen;
+       u_int dlen;
 #ifdef HAVE_LIBCRYPTO
        uint8_t np;
 #endif
@@ -2752,7 +2752,7 @@ ike_sub0_print(netdissect_options *ndo,
 
        return cp;
 trunc:
-       ND_PRINT(" [|isakmp]");
+       nd_print_trunc(ndo);
        return NULL;
 }
 
@@ -2920,7 +2920,7 @@ ikev2_sub0_print(netdissect_options *ndo, const struct isakmp *base,
 
        return cp;
 trunc:
-       ND_PRINT(" [|isakmp]");
+       nd_print_trunc(ndo);
        return NULL;
 }
 
@@ -3032,6 +3032,7 @@ isakmp_print(netdissect_options *ndo,
        const u_char *ep;
        u_int major, minor;
 
+       ndo->ndo_protocol = "isakmp";
 #ifdef HAVE_LIBCRYPTO
        /* initialize SAs */
        if (ndo->ndo_sa_list_head == NULL) {
@@ -3044,7 +3045,7 @@ isakmp_print(netdissect_options *ndo,
        ep = ndo->ndo_snapend;
 
        if ((const struct isakmp *)ep < p + 1) {
-               ND_PRINT("[|isakmp]");
+               nd_print_trunc(ndo);
                return;
        }
 
@@ -3087,6 +3088,7 @@ isakmp_rfc3948_print(netdissect_options *ndo,
                     const u_char *bp, u_int length,
                     const u_char *bp2)
 {
+       ndo->ndo_protocol = "isakmp_rfc3948";
        ND_TCHECK_1(bp);
        if(length == 1 && EXTRACT_U_1(bp)==0xff) {
                ND_PRINT("isakmp-nat-keep-alive");
@@ -3123,18 +3125,11 @@ isakmp_rfc3948_print(netdissect_options *ndo,
                length -= advance + padlen;
                nh = enh & 0xff;
 
-               ip_print_inner(ndo, bp, length, nh, bp2);
+               ip_inner_print(ndo, bp, length, nh, bp2);
                return;
        }
 
 trunc:
-       ND_PRINT("[|isakmp]");
+       nd_print_trunc(ndo);
        return;
 }
-
-/*
- * Local Variables:
- * c-style: whitesmith
- * c-basic-offset: 8
- * End:
- */