]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-isakmp.c
Merge pull request #4 from infrastation/master
[tcpdump] / print-isakmp.c
index a8fde08834df1608fe1da107f9649dfb4a431cf5..4f96afe38115032fc2b753261e055c5d2d1c1db1 100644 (file)
@@ -1542,21 +1542,21 @@ ikev2_sa_print(netdissect_options *ndo, u_char tpay,
                u_int32_t proto _U_, int depth _U_)
 {
        struct isakmp_gen e;
-       int    osa_len, sa_len;
+       int    osa_length, sa_length;
 
        ND_TCHECK(*ext1);
        safememcpy(&e, ext1, sizeof(e));
        ikev2_pay_print(ndo, "sa", e.critical);
 
-       osa_len= ntohs(e.len);
-       sa_len = osa_len - 4;
-       ND_PRINT((ndo," len=%d", sa_len));
+       osa_length= ntohs(e.len);
+       sa_length = osa_length - 4;
+       ND_PRINT((ndo," len=%d", sa_length));
 
        ikev2_sub_print(ndo, NULL, ISAKMP_NPTYPE_P,
                        ext1+1, ep,
                        0, 0, 0, depth);
 
-       return (u_char *)ext1 + osa_len;
+       return (u_char *)ext1 + osa_length;
 trunc:
        ND_PRINT((ndo," [|%s]", NPSTR(tpay)));
        return NULL;
@@ -1999,7 +1999,7 @@ ikev2_vid_print(netdissect_options *ndo, u_char tpay,
        ND_TCHECK2(*vid, len);
        for(i=0; i<len; i++) {
                if(isprint(vid[i])) ND_PRINT((ndo, "%c", vid[i]));
-               else ND_PRINT((ndo, ".", vid[i]));
+               else ND_PRINT((ndo, "."));
        }
        if (2 < ndo->ndo_vflag && 4 < len) {
                ND_PRINT((ndo," "));
@@ -2214,7 +2214,7 @@ safememcpy(void *p, const void *q, size_t l)
        memcpy(p, q, l);
 }
 
-void
+static void
 ikev1_print(netdissect_options *ndo,
            const u_char *bp,  u_int length,
            const u_char *bp2, struct isakmp *base)
@@ -2407,7 +2407,7 @@ ikev2_print(netdissect_options *ndo,
 
        ND_PRINT((ndo, " %s", ETYPESTR(base->etype)));
        if (base->flags) {
-               ND_PRINT((ndo, "[%s%s]",
+               ND_PRINT((ndo, "[%s%s%s]",
                          base->flags & ISAKMP_FLAG_I ? "I" : "",
                          base->flags & ISAKMP_FLAG_V ? "V" : "",
                          base->flags & ISAKMP_FLAG_R ? "R" : ""));