Lines Matching refs:ndo

64 		netdissect_options *ndo, u_char tpay,	              \
100 static const u_char *ikev2_e_print(netdissect_options *ndo,
111 static const u_char *ike_sub0_print(netdissect_options *ndo,u_char, const struct isakmp_gen *,
113 static const u_char *ikev1_sub_print(netdissect_options *ndo,u_char, const struct isakmp_gen *,
116 static const u_char *ikev2_sub_print(netdissect_options *ndo,
128 ikev1_print(netdissect_options *ndo,
161 static const u_char *(*npfunc[])(netdissect_options *ndo, u_char tpay,
224 ND_PRINT((ndo," [|%s]", NPSTR(np))); \
406 hexprint(netdissect_options *ndo, caddr_t loc, size_t len)
413 ND_PRINT((ndo,"%02x", p[i] & 0xff));
417 rawprint(netdissect_options *ndo, caddr_t loc, size_t len)
421 hexprint(ndo, loc, len);
431 static int ike_show_somedata(struct netdissect_options *ndo,
448 ND_PRINT((ndo," data=("));
449 if(!rawprint(ndo, (caddr_t)(cp), len)) goto trunc;
450 ND_PRINT((ndo, "..."));
452 if(!rawprint(ndo, (caddr_t)(end), elen)) goto trunc;
454 ND_PRINT((ndo,")"));
468 ikev1_attrmap_print(netdissect_options *ndo,
482 ND_PRINT((ndo,"[|attr]"));
486 ND_PRINT((ndo,"("));
489 ND_PRINT((ndo,"type=%s ", map[t].type));
491 ND_PRINT((ndo,"type=#%d ", t));
493 ND_PRINT((ndo,"value="));
496 ND_PRINT((ndo,"%s", map[t].value[v]));
498 rawprint(ndo, (caddr_t)&q[1], 2);
500 ND_PRINT((ndo,"len=%d value=", EXTRACT_16BITS(&q[1])));
501 rawprint(ndo, (caddr_t)&p[4], EXTRACT_16BITS(&q[1]));
503 ND_PRINT((ndo,")"));
508 ikev1_attr_print(netdissect_options *ndo, const u_char *p, const u_char *ep)
520 ND_PRINT((ndo,"[|attr]"));
524 ND_PRINT((ndo,"("));
526 ND_PRINT((ndo,"type=#%d ", t));
528 ND_PRINT((ndo,"value="));
530 rawprint(ndo, (caddr_t)&q[1], 2);
532 ND_PRINT((ndo,"len=%d value=", EXTRACT_16BITS(&q[1])));
533 rawprint(ndo, (caddr_t)&p[2], EXTRACT_16BITS(&q[1]));
535 ND_PRINT((ndo,")"));
540 ikev1_sa_print(netdissect_options *ndo, u_char tpay _U_,
553 ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_SA)));
561 ND_PRINT((ndo," doi=%d", doi));
562 ND_PRINT((ndo," situation=%u", (u_int32_t)ntohl(sa.sit)));
566 ND_PRINT((ndo," doi=ipsec"));
568 ND_PRINT((ndo," situation="));
571 ND_PRINT((ndo,"identity"));
575 ND_PRINT((ndo,"%ssecrecy", t ? "+" : ""));
579 ND_PRINT((ndo,"%sintegrity", t ? "+" : ""));
585 ND_PRINT((ndo," ident=%u", (u_int32_t)ntohl(ident)));
592 cp = ikev1_sub_print(ndo, ISAKMP_NPTYPE_P, ext, ep, phase, doi, proto0,
597 ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_SA)));
602 ikev1_p_print(netdissect_options *ndo, u_char tpay _U_,
611 ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_P)));
616 ND_PRINT((ndo," #%d protoid=%s transform=%d",
619 ND_PRINT((ndo," spi="));
620 if (!rawprint(ndo, (caddr_t)(p + 1), prop.spi_size))
627 cp = ikev1_sub_print(ndo, ISAKMP_NPTYPE_T, ext, ep, phase, doi0,
632 ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_P)));
765 ikev1_t_print(netdissect_options *ndo, u_char tpay _U_,
778 ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_T)));
813 ND_PRINT((ndo," #%d id=%s ", t.t_no, idstr));
815 ND_PRINT((ndo," #%d id=%d ", t.t_no, t.t_id));
820 cp = ikev1_attrmap_print(ndo, cp, (ep < ep2) ? ep : ep2,
823 cp = ikev1_attr_print(ndo, cp, (ep < ep2) ? ep : ep2);
826 ND_PRINT((ndo,"..."));
829 ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_T)));
834 ikev1_ke_print(netdissect_options *ndo, u_char tpay _U_,
841 ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_KE)));
845 ND_PRINT((ndo," key len=%d", ntohs(e.len) - 4));
846 if (2 < ndo->ndo_vflag && 4 < ntohs(e.len)) {
847 ND_PRINT((ndo," "));
848 if (!rawprint(ndo, (caddr_t)(ext + 1), ntohs(e.len) - 4))
853 ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_KE)));
858 ikev1_id_print(netdissect_options *ndo, u_char tpay _U_,
877 ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_ID)));
891 ND_PRINT((ndo," [phase=%d doi=%d proto=%d]", phase, doi, proto));
898 ND_PRINT((ndo," idtype=%s", STR_OR_ID(id.d.id_type, idtypestr)));
899 ND_PRINT((ndo," doi_data=%u",
915 ND_PRINT((ndo," idtype=%s", STR_OR_ID(id.type, ipsecidtypestr)));
922 ND_PRINT((ndo," protoid=%s", pe->p_name));
928 ND_PRINT((ndo," protoid=%s", "0"));
930 ND_PRINT((ndo," port=%d", ntohs(id.port)));
939 ND_PRINT((ndo," len=%d [bad: < 4]", len));
941 ND_PRINT((ndo," len=%d %s", len, ipaddr_string(data)));
948 ND_PRINT((ndo," len=%d ", len));
958 ND_PRINT((ndo," len=%d [bad: < 8]", len));
961 ND_PRINT((ndo," len=%d %s/%u.%u.%u.%u", len,
971 ND_PRINT((ndo," len=%d [bad: < 16]", len));
973 ND_PRINT((ndo," len=%d %s", len, ip6addr_string(data)));
980 ND_PRINT((ndo," len=%d [bad: < 20]", len));
984 ND_PRINT((ndo," len=%d %s/0x%08x%08x%08x%08x", len,
994 ND_PRINT((ndo," len=%d [bad: < 8]", len));
996 ND_PRINT((ndo," len=%d %s-%s", len,
1005 ND_PRINT((ndo," len=%d [bad: < 32]", len));
1007 ND_PRINT((ndo," len=%d %s-%s", len,
1023 ND_PRINT((ndo," len=%d", len));
1024 if (2 < ndo->ndo_vflag) {
1025 ND_PRINT((ndo," "));
1026 if (!rawprint(ndo, (caddr_t)data, len))
1032 ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_ID)));
1037 ikev1_cert_print(netdissect_options *ndo, u_char tpay _U_,
1051 ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_CERT)));
1056 ND_PRINT((ndo," len=%d", item_len - 4));
1057 ND_PRINT((ndo," type=%s", STR_OR_ID((cert.encode), certstr)));
1058 if (2 < ndo->ndo_vflag && 4 < item_len) {
1059 ND_PRINT((ndo," "));
1060 if (!rawprint(ndo, (caddr_t)(ext + 1), item_len - 4))
1065 ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_CERT)));
1070 ikev1_cr_print(netdissect_options *ndo, u_char tpay _U_,
1083 ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_CR)));
1088 ND_PRINT((ndo," len=%d", item_len - 4));
1089 ND_PRINT((ndo," type=%s", STR_OR_ID((cert.encode), certstr)));
1090 if (2 < ndo->ndo_vflag && 4 < item_len) {
1091 ND_PRINT((ndo," "));
1092 if (!rawprint(ndo, (caddr_t)(ext + 1), item_len - 4))
1097 ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_CR)));
1102 ikev1_hash_print(netdissect_options *ndo, u_char tpay _U_,
1109 ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_HASH)));
1113 ND_PRINT((ndo," len=%d", ntohs(e.len) - 4));
1114 if (2 < ndo->ndo_vflag && 4 < ntohs(e.len)) {
1115 ND_PRINT((ndo," "));
1116 if (!rawprint(ndo, (caddr_t)(ext + 1), ntohs(e.len) - 4))
1121 ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_HASH)));
1126 ikev1_sig_print(netdissect_options *ndo, u_char tpay _U_,
1133 ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_SIG)));
1137 ND_PRINT((ndo," len=%d", ntohs(e.len) - 4));
1138 if (2 < ndo->ndo_vflag && 4 < ntohs(e.len)) {
1139 ND_PRINT((ndo," "));
1140 if (!rawprint(ndo, (caddr_t)(ext + 1), ntohs(e.len) - 4))
1145 ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_SIG)));
1150 ikev1_nonce_print(netdissect_options *ndo, u_char tpay _U_,
1159 ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_NONCE)));
1163 ND_PRINT((ndo," n len=%d", ntohs(e.len) - 4));
1164 if (2 < ndo->ndo_vflag && 4 < ntohs(e.len)) {
1165 ND_PRINT((ndo," "));
1166 if (!rawprint(ndo, (caddr_t)(ext + 1), ntohs(e.len) - 4))
1168 } else if (1 < ndo->ndo_vflag && 4 < ntohs(e.len)) {
1169 ND_PRINT((ndo," "));
1170 if (!ike_show_somedata(ndo, (u_char *)(caddr_t)(ext + 1), ep))
1175 ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_NONCE)));
1180 ikev1_n_print(netdissect_options *ndo, u_char tpay _U_,
1236 ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_N)));
1244 ND_PRINT((ndo," doi=%d", doi));
1245 ND_PRINT((ndo," proto=%d", proto));
1247 ND_PRINT((ndo," type=%s", NOTIFY_ERROR_STR(ntohs(n.type))));
1249 ND_PRINT((ndo," type=%s", numstr(ntohs(n.type))));
1251 ND_PRINT((ndo," type=%s", NOTIFY_STATUS_STR(ntohs(n.type))));
1253 ND_PRINT((ndo," type=%s", numstr(ntohs(n.type))));
1255 ND_PRINT((ndo," spi="));
1256 if (!rawprint(ndo, (caddr_t)(p + 1), n.spi_size))
1262 ND_PRINT((ndo," doi=ipsec"));
1263 ND_PRINT((ndo," proto=%s", PROTOIDSTR(proto)));
1265 ND_PRINT((ndo," type=%s", NOTIFY_ERROR_STR(ntohs(n.type))));
1267 ND_PRINT((ndo," type=%s", IPSEC_NOTIFY_ERROR_STR(ntohs(n.type))));
1269 ND_PRINT((ndo," type=%s", NOTIFY_STATUS_STR(ntohs(n.type))));
1271 ND_PRINT((ndo," type=%s", IPSEC_NOTIFY_STATUS_STR(ntohs(n.type))));
1273 ND_PRINT((ndo," type=%s", numstr(ntohs(n.type))));
1275 ND_PRINT((ndo," spi="));
1276 if (!rawprint(ndo, (caddr_t)(p + 1), n.spi_size))
1284 ND_PRINT((ndo," orig=("));
1291 cp = ikev1_attrmap_print(ndo, cp,
1297 ND_PRINT((ndo,"replay detection %sabled",
1301 if (ikev1_sub_print(ndo, ISAKMP_NPTYPE_SA,
1308 isakmp_print(ndo, cp,
1312 ND_PRINT((ndo,")"));
1316 ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_N)));
1321 ikev1_d_print(netdissect_options *ndo, u_char tpay _U_,
1333 ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_D)));
1341 ND_PRINT((ndo," doi=%u", doi));
1342 ND_PRINT((ndo," proto=%u", proto));
1344 ND_PRINT((ndo," doi=ipsec"));
1345 ND_PRINT((ndo," proto=%s", PROTOIDSTR(proto)));
1347 ND_PRINT((ndo," spilen=%u", d.spi_size));
1348 ND_PRINT((ndo," nspi=%u", ntohs(d.num_spi)));
1349 ND_PRINT((ndo," spi="));
1353 ND_PRINT((ndo,","));
1354 if (!rawprint(ndo, (caddr_t)q, d.spi_size))
1360 ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_D)));
1365 ikev1_vid_print(netdissect_options *ndo, u_char tpay _U_,
1373 ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_VID)));
1377 ND_PRINT((ndo," len=%d", ntohs(e.len) - 4));
1378 if (2 < ndo->ndo_vflag && 4 < ntohs(e.len)) {
1379 ND_PRINT((ndo," "));
1380 if (!rawprint(ndo, (caddr_t)(ext + 1), ntohs(e.len) - 4))
1385 ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_VID)));
1396 ikev2_pay_print(netdissect_options *ndo, const char *payname, int critical)
1398 ND_PRINT((ndo,"%s%s:", payname, critical&0x80 ? "[C]" : ""));
1402 ikev2_gen_print(netdissect_options *ndo, u_char tpay,
1409 ikev2_pay_print(ndo, NPSTR(tpay), e.critical);
1411 ND_PRINT((ndo," len=%d", ntohs(e.len) - 4));
1412 if (2 < ndo->ndo_vflag && 4 < ntohs(e.len)) {
1413 ND_PRINT((ndo," "));
1414 if (!rawprint(ndo, (caddr_t)(ext + 1), ntohs(e.len) - 4))
1419 ND_PRINT((ndo," [|%s]", NPSTR(tpay)));
1424 ikev2_t_print(netdissect_options *ndo, u_char tpay _U_, int pcount,
1441 ikev2_pay_print(ndo, NPSTR(ISAKMP_NPTYPE_T), t.h.critical);
1477 ND_PRINT((ndo," #%u type=%s id=%s ", pcount,
1481 ND_PRINT((ndo," #%u type=%s id=%u ", pcount,
1488 cp = ikev1_attrmap_print(ndo, cp, (ep < ep2) ? ep : ep2,
1491 cp = ikev1_attr_print(ndo, cp, (ep < ep2) ? ep : ep2);
1494 ND_PRINT((ndo,"..."));
1497 ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_T)));
1502 ikev2_p_print(netdissect_options *ndo, u_char tpay _U_, int pcount _U_,
1514 ikev2_pay_print(ndo, NPSTR(ISAKMP_NPTYPE_P), prop.h.critical);
1516 ND_PRINT((ndo," #%u protoid=%s transform=%d len=%u",
1520 ND_PRINT((ndo," spi="));
1521 if (!rawprint(ndo, (caddr_t)(p + 1), prop.spi_size))
1528 cp = ikev2_sub_print(ndo, NULL, ISAKMP_NPTYPE_T, ext, ep, phase, doi0,
1533 ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_P)));
1538 ikev2_sa_print(netdissect_options *ndo, u_char tpay,
1549 ikev2_pay_print(ndo, "sa", e.critical);
1553 ND_PRINT((ndo," len=%d", sa_length));
1555 ikev2_sub_print(ndo, NULL, ISAKMP_NPTYPE_P,
1561 ND_PRINT((ndo," [|%s]", NPSTR(tpay)));
1566 ikev2_ke_print(netdissect_options *ndo, u_char tpay,
1578 ikev2_pay_print(ndo, NPSTR(tpay), ke.h.critical);
1580 ND_PRINT((ndo," len=%u group=%s", ntohs(ke.h.len) - 8,
1583 if (2 < ndo->ndo_vflag && 8 < ntohs(ke.h.len)) {
1584 ND_PRINT((ndo," "));
1585 if (!rawprint(ndo, (caddr_t)(k + 1), ntohs(ke.h.len) - 8))
1590 ND_PRINT((ndo," [|%s]", NPSTR(tpay)));
1595 ikev2_ID_print(netdissect_options *ndo, u_char tpay,
1608 ikev2_pay_print(ndo, NPSTR(tpay), id.h.critical);
1612 ND_PRINT((ndo," len=%d", id_len - 4));
1613 if (2 < ndo->ndo_vflag && 4 < id_len) {
1614 ND_PRINT((ndo," "));
1615 if (!rawprint(ndo, (caddr_t)(ext + 1), id_len - 4))
1626 ND_PRINT((ndo, " ipv4:"));
1630 ND_PRINT((ndo, " fqdn:"));
1634 ND_PRINT((ndo, " rfc822:"));
1638 ND_PRINT((ndo, " ipv6:"));
1642 ND_PRINT((ndo, " dn:"));
1646 ND_PRINT((ndo, " gn:"));
1650 ND_PRINT((ndo, " keyid:"));
1659 ND_PRINT((ndo, "%c", typedata[i]));
1661 ND_PRINT((ndo, "."));
1666 if (!rawprint(ndo, (caddr_t)typedata, idtype_len))
1672 ND_PRINT((ndo," [|%s]", NPSTR(tpay)));
1677 ikev2_cert_print(netdissect_options *ndo, u_char tpay,
1683 return ikev2_gen_print(ndo, tpay, ext);
1687 ikev2_cr_print(netdissect_options *ndo, u_char tpay,
1693 return ikev2_gen_print(ndo, tpay, ext);
1697 ikev2_auth_print(netdissect_options *ndo, u_char tpay,
1711 ikev2_pay_print(ndo, NPSTR(tpay), a.h.critical);
1714 ND_PRINT((ndo," len=%d method=%s", len-4,
1717 if (1 < ndo->ndo_vflag && 4 < len) {
1718 ND_PRINT((ndo," authdata=("));
1719 if (!rawprint(ndo, (caddr_t)authdata, len - sizeof(a)))
1721 ND_PRINT((ndo,") "));
1722 } else if(ndo->ndo_vflag && 4 < len) {
1723 if(!ike_show_somedata(ndo, authdata, ep)) goto trunc;
1728 ND_PRINT((ndo," [|%s]", NPSTR(tpay)));
1733 ikev2_nonce_print(netdissect_options *ndo, u_char tpay,
1743 ikev2_pay_print(ndo, "nonce", e.critical);
1745 ND_PRINT((ndo," len=%d", ntohs(e.len) - 4));
1746 if (1 < ndo->ndo_vflag && 4 < ntohs(e.len)) {
1747 ND_PRINT((ndo," nonce=("));
1748 if (!rawprint(ndo, (caddr_t)(ext + 1), ntohs(e.len) - 4))
1750 ND_PRINT((ndo,") "));
1751 } else if(ndo->ndo_vflag && 4 < ntohs(e.len)) {
1752 if(!ike_show_somedata(ndo, (const u_char *)(ext+1), ep)) goto trunc;
1757 ND_PRINT((ndo," [|%s]", NPSTR(tpay)));
1763 ikev2_n_print(netdissect_options *ndo, u_char tpay _U_,
1779 ikev2_pay_print(ndo, NPSTR(ISAKMP_NPTYPE_N), n.h.critical);
1786 ND_PRINT((ndo," prot_id=%s", PROTOIDSTR(n.prot_id)));
1937 ND_PRINT((ndo," type=%u(%s)", type, notify_name));
1942 ND_PRINT((ndo," spi="));
1943 if (!rawprint(ndo, (caddr_t)(p + 1), n.spi_size))
1950 if(3 < ndo->ndo_vflag) {
1955 ND_PRINT((ndo," data=("));
1956 if (!rawprint(ndo, (caddr_t)(cp), ep - cp))
1959 ND_PRINT((ndo,")"));
1962 if(!ike_show_somedata(ndo, cp, ep)) goto trunc;
1967 ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_N)));
1972 ikev2_d_print(netdissect_options *ndo, u_char tpay,
1978 return ikev2_gen_print(ndo, tpay, ext);
1982 ikev2_vid_print(netdissect_options *ndo, u_char tpay,
1994 ikev2_pay_print(ndo, NPSTR(tpay), e.critical);
1995 ND_PRINT((ndo," len=%d vid=", ntohs(e.len) - 4));
2001 if(isprint(vid[i])) ND_PRINT((ndo, "%c", vid[i]));
2002 else ND_PRINT((ndo, "."));
2004 if (2 < ndo->ndo_vflag && 4 < len) {
2005 ND_PRINT((ndo," "));
2006 if (!rawprint(ndo, (caddr_t)(ext + 1), ntohs(e.len) - 4))
2011 ND_PRINT((ndo," [|%s]", NPSTR(tpay)));
2016 ikev2_TS_print(netdissect_options *ndo, u_char tpay,
2022 return ikev2_gen_print(ndo, tpay, ext);
2026 ikev2_e_print(netdissect_options *ndo,
2057 ikev2_pay_print(ndo, NPSTR(tpay), e.critical);
2061 ND_PRINT((ndo," len=%d", dlen));
2062 if (2 < ndo->ndo_vflag && 4 < dlen) {
2063 ND_PRINT((ndo," "));
2064 if (!rawprint(ndo, (caddr_t)(ext + 1), dlen))
2073 if(esp_print_decrypt_buffer_by_ikev2(ndo,
2078 ext = (const struct isakmp_gen *)ndo->ndo_packetp;
2081 ikev2_sub_print(ndo, base, e.np, ext, ndo->ndo_snapend,
2092 ND_PRINT((ndo," [|%s]", NPSTR(tpay)));
2097 ikev2_cp_print(netdissect_options *ndo, u_char tpay,
2103 return ikev2_gen_print(ndo, tpay, ext);
2107 ikev2_eap_print(netdissect_options *ndo, u_char tpay,
2113 return ikev2_gen_print(ndo, tpay, ext);
2117 ike_sub0_print(netdissect_options *ndo,
2145 cp = (*npfunc[np])(ndo, np, ext, item_len, ep, phase, doi, proto, depth);
2147 ND_PRINT((ndo,"%s", NPSTR(np)));
2153 ND_PRINT((ndo," [|isakmp]"));
2158 ikev1_sub_print(netdissect_options *ndo,
2176 ND_PRINT((ndo,"\n"));
2178 ND_PRINT((ndo," "));
2179 ND_PRINT((ndo,"("));
2180 cp = ike_sub0_print(ndo, np, ext, ep, phase, doi, proto, depth);
2181 ND_PRINT((ndo,")"));
2194 ND_PRINT((ndo," [|%s]", NPSTR(np)));
2218 ikev1_print(netdissect_options *ndo,
2229 ep = ndo->ndo_snapend;
2233 ND_PRINT((ndo," phase %d", phase));
2235 ND_PRINT((ndo," phase %d/others", phase));
2241 ND_PRINT((ndo," I"));
2245 ND_PRINT((ndo," ?"));
2248 ND_PRINT((ndo," I"));
2250 ND_PRINT((ndo," R"));
2252 ND_PRINT((ndo," ?"));
2255 ND_PRINT((ndo," %s", ETYPESTR(base->etype)));
2257 ND_PRINT((ndo,"[%s%s]", base->flags & ISAKMP_FLAG_E ? "E" : "",
2261 if (ndo->ndo_vflag) {
2265 ND_PRINT((ndo,":"));
2273 ND_PRINT((ndo," [encrypted %s]", NPSTR(base->np)));
2281 ikev1_sub_print(ndo, np, ext, ep, phase, 0, 0, 0);
2285 if (ndo->ndo_vflag) {
2287 ND_PRINT((ndo," (len mismatch: isakmp %u/ip %u)",
2294 ikev2_sub0_print(netdissect_options *ndo, struct isakmp *base,
2318 cp = ikev2_p_print(ndo, np, pcount, ext, item_len,
2321 cp = ikev2_t_print(ndo, np, pcount, ext, item_len,
2324 cp = ikev2_e_print(ndo, base, np, ext, item_len,
2331 cp = (*npfunc[np])(ndo, np, /*pcount,*/ ext, item_len,
2334 ND_PRINT((ndo,"%s", NPSTR(np)));
2340 ND_PRINT((ndo," [|isakmp]"));
2345 ikev2_sub_print(netdissect_options *ndo,
2366 ND_PRINT((ndo,"\n"));
2368 ND_PRINT((ndo," "));
2369 ND_PRINT((ndo,"("));
2370 cp = ikev2_sub0_print(ndo, base, np, pcount,
2372 ND_PRINT((ndo,")"));
2385 ND_PRINT((ndo," [|%s]", NPSTR(np)));
2390 ikev2_print(netdissect_options *ndo,
2400 ep = ndo->ndo_snapend;
2404 ND_PRINT((ndo, " parent_sa"));
2406 ND_PRINT((ndo, " child_sa "));
2408 ND_PRINT((ndo, " %s", ETYPESTR(base->etype)));
2410 ND_PRINT((ndo, "[%s%s%s]",
2416 if (ndo->ndo_vflag) {
2420 ND_PRINT((ndo, ":"));
2428 ND_PRINT((ndo, " [encrypted %s]", NPSTR(base->np)));
2437 ikev2_sub_print(ndo, base, np, ext, ep, phase, 0, 0, 0);
2441 if (ndo->ndo_vflag) {
2443 ND_PRINT((ndo, " (len mismatch: isakmp %u/ip %u)",
2450 isakmp_print(netdissect_options *ndo,
2461 if (ndo->ndo_sa_list_head == NULL) {
2462 if (ndo->ndo_espsecret)
2463 esp_print_decodesecret(ndo);
2468 ep = ndo->ndo_snapend;
2471 ND_PRINT((ndo,"[|isakmp]"));
2477 ND_PRINT((ndo,"isakmp"));
2483 if (ndo->ndo_vflag) {
2484 ND_PRINT((ndo," %d.%d", major, minor));
2487 if (ndo->ndo_vflag) {
2488 ND_PRINT((ndo," msgid "));
2489 hexprint(ndo, (caddr_t)&base.msgid, sizeof(base.msgid));
2492 if (1 < ndo->ndo_vflag) {
2493 ND_PRINT((ndo," cookie "));
2494 hexprint(ndo, (caddr_t)&base.i_ck, sizeof(base.i_ck));
2495 ND_PRINT((ndo,"->"));
2496 hexprint(ndo, (caddr_t)&base.r_ck, sizeof(base.r_ck));
2498 ND_PRINT((ndo,":"));
2502 ikev1_print(ndo, bp, length, bp2, &base);
2506 ikev2_print(ndo, bp, length, bp2, &base);
2512 isakmp_rfc3948_print(netdissect_options *ndo,
2517 ep = ndo->ndo_snapend;
2520 ND_PRINT((ndo, "isakmp-nat-keep-alive"));
2532 ND_PRINT((ndo, "NONESP-encap: "));
2533 isakmp_print(ndo, bp+4, length-4, bp2);
2542 ND_PRINT((ndo, "UDP-encap: "));
2544 advance = esp_print(ndo, bp, length, bp2, &enh, &padlen);
2552 ip_print_inner(ndo, bp, length, nh, bp2);
2557 ND_PRINT((ndo,"[|isakmp]"));