Lines Matching refs:ndo

71 		netdissect_options *ndo, u_char tpay,	              \
107 static const u_char *ikev2_e_print(netdissect_options *ndo,
118 static const u_char *ike_sub0_print(netdissect_options *ndo,u_char, const struct isakmp_gen *,
120 static const u_char *ikev1_sub_print(netdissect_options *ndo,u_char, const struct isakmp_gen *,
123 static const u_char *ikev2_sub_print(netdissect_options *ndo,
134 ikev1_print(netdissect_options *ndo,
167 static const u_char *(*npfunc[])(netdissect_options *ndo, u_char tpay,
230 ND_PRINT((ndo," [|%s]", NPSTR(np))); \
412 hexprint(netdissect_options *ndo, caddr_t loc, size_t len) in hexprint() argument
419 ND_PRINT((ndo,"%02x", p[i] & 0xff)); in hexprint()
423 rawprint(netdissect_options *ndo, caddr_t loc, size_t len) in rawprint() argument
427 hexprint(ndo, loc, len); in rawprint()
437 static int ike_show_somedata(struct netdissect_options *ndo, in ike_show_somedata() argument
454 ND_PRINT((ndo," data=(")); in ike_show_somedata()
455 if(!rawprint(ndo, (caddr_t)(cp), len)) goto trunc; in ike_show_somedata()
456 ND_PRINT((ndo, "...")); in ike_show_somedata()
458 if(!rawprint(ndo, (caddr_t)(end), elen)) goto trunc; in ike_show_somedata()
460 ND_PRINT((ndo,")")); in ike_show_somedata()
474 ikev1_attrmap_print(netdissect_options *ndo, in ikev1_attrmap_print() argument
486 ND_PRINT((ndo,"[|attr]")); in ikev1_attrmap_print()
490 ND_PRINT((ndo,"(")); in ikev1_attrmap_print()
493 ND_PRINT((ndo,"type=%s ", map[t].type)); in ikev1_attrmap_print()
495 ND_PRINT((ndo,"type=#%d ", t)); in ikev1_attrmap_print()
497 ND_PRINT((ndo,"value=")); in ikev1_attrmap_print()
500 ND_PRINT((ndo,"%s", map[t].value[v])); in ikev1_attrmap_print()
502 rawprint(ndo, (caddr_t)&p[2], 2); in ikev1_attrmap_print()
504 ND_PRINT((ndo,"len=%d value=", EXTRACT_16BITS(&p[2]))); in ikev1_attrmap_print()
505 rawprint(ndo, (caddr_t)&p[4], EXTRACT_16BITS(&p[2])); in ikev1_attrmap_print()
507 ND_PRINT((ndo,")")); in ikev1_attrmap_print()
512 ikev1_attr_print(netdissect_options *ndo, const u_char *p, const u_char *ep) in ikev1_attr_print() argument
522 ND_PRINT((ndo,"[|attr]")); in ikev1_attr_print()
526 ND_PRINT((ndo,"(")); in ikev1_attr_print()
528 ND_PRINT((ndo,"type=#%d ", t)); in ikev1_attr_print()
530 ND_PRINT((ndo,"value=")); in ikev1_attr_print()
532 rawprint(ndo, (caddr_t)&p[2], 2); in ikev1_attr_print()
534 ND_PRINT((ndo,"len=%d value=", EXTRACT_16BITS(&p[2]))); in ikev1_attr_print()
535 rawprint(ndo, (caddr_t)&p[4], EXTRACT_16BITS(&p[2])); in ikev1_attr_print()
537 ND_PRINT((ndo,")")); in ikev1_attr_print()
542 ikev1_sa_print(netdissect_options *ndo, u_char tpay _U_, in ikev1_sa_print() argument
554 ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_SA))); in ikev1_sa_print()
562 ND_PRINT((ndo," doi=%d", doi)); in ikev1_sa_print()
563 ND_PRINT((ndo," situation=%u", (u_int32_t)ntohl(sa.sit))); in ikev1_sa_print()
567 ND_PRINT((ndo," doi=ipsec")); in ikev1_sa_print()
568 ND_PRINT((ndo," situation=")); in ikev1_sa_print()
571 ND_PRINT((ndo,"identity")); in ikev1_sa_print()
575 ND_PRINT((ndo,"%ssecrecy", t ? "+" : "")); in ikev1_sa_print()
579 ND_PRINT((ndo,"%sintegrity", t ? "+" : "")); in ikev1_sa_print()
585 ND_PRINT((ndo," ident=%u", (u_int32_t)ntohl(ident))); in ikev1_sa_print()
592 cp = ikev1_sub_print(ndo, ISAKMP_NPTYPE_P, ext, ep, phase, doi, proto0, in ikev1_sa_print()
597 ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_SA))); in ikev1_sa_print()
602 ikev1_p_print(netdissect_options *ndo, u_char tpay _U_, in ikev1_p_print() argument
611 ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_P))); in ikev1_p_print()
616 ND_PRINT((ndo," #%d protoid=%s transform=%d", in ikev1_p_print()
619 ND_PRINT((ndo," spi=")); in ikev1_p_print()
620 if (!rawprint(ndo, (caddr_t)(p + 1), prop.spi_size)) in ikev1_p_print()
627 cp = ikev1_sub_print(ndo, ISAKMP_NPTYPE_T, ext, ep, phase, doi0, in ikev1_p_print()
632 ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_P))); in ikev1_p_print()
765 ikev1_t_print(netdissect_options *ndo, u_char tpay _U_, in ikev1_t_print() argument
778 ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_T))); in ikev1_t_print()
813 ND_PRINT((ndo," #%d id=%s ", t.t_no, idstr)); in ikev1_t_print()
815 ND_PRINT((ndo," #%d id=%d ", t.t_no, t.t_id)); in ikev1_t_print()
820 cp = ikev1_attrmap_print(ndo, cp, (ep < ep2) ? ep : ep2, in ikev1_t_print()
823 cp = ikev1_attr_print(ndo, cp, (ep < ep2) ? ep : ep2); in ikev1_t_print()
826 ND_PRINT((ndo,"...")); in ikev1_t_print()
829 ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_T))); in ikev1_t_print()
834 ikev1_ke_print(netdissect_options *ndo, u_char tpay _U_, in ikev1_ke_print() argument
841 ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_KE))); in ikev1_ke_print()
845 ND_PRINT((ndo," key len=%d", ntohs(e.len) - 4)); in ikev1_ke_print()
846 if (2 < ndo->ndo_vflag && 4 < ntohs(e.len)) { in ikev1_ke_print()
847 ND_PRINT((ndo," ")); in ikev1_ke_print()
848 if (!rawprint(ndo, (caddr_t)(ext + 1), ntohs(e.len) - 4)) in ikev1_ke_print()
853 ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_KE))); in ikev1_ke_print()
858 ikev1_id_print(netdissect_options *ndo, u_char tpay _U_, in ikev1_id_print() argument
877 ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_ID))); in ikev1_id_print()
891 ND_PRINT((ndo," [phase=%d doi=%d proto=%d]", phase, doi, proto)); in ikev1_id_print()
898 ND_PRINT((ndo," idtype=%s", STR_OR_ID(id.d.id_type, idtypestr))); in ikev1_id_print()
899 ND_PRINT((ndo," doi_data=%u", in ikev1_id_print()
915 ND_PRINT((ndo," idtype=%s", STR_OR_ID(id.type, ipsecidtypestr))); in ikev1_id_print()
922 ND_PRINT((ndo," protoid=%s", pe->p_name)); in ikev1_id_print()
928 ND_PRINT((ndo," protoid=%s", "0")); in ikev1_id_print()
930 ND_PRINT((ndo," port=%d", ntohs(id.port))); in ikev1_id_print()
939 ND_PRINT((ndo," len=%d [bad: < 4]", len)); in ikev1_id_print()
941 ND_PRINT((ndo," len=%d %s", len, ipaddr_string(data))); in ikev1_id_print()
948 ND_PRINT((ndo," len=%d ", len)); in ikev1_id_print()
958 ND_PRINT((ndo," len=%d [bad: < 8]", len)); in ikev1_id_print()
961 ND_PRINT((ndo," len=%d %s/%u.%u.%u.%u", len, in ikev1_id_print()
971 ND_PRINT((ndo," len=%d [bad: < 16]", len)); in ikev1_id_print()
973 ND_PRINT((ndo," len=%d %s", len, ip6addr_string(data))); in ikev1_id_print()
980 ND_PRINT((ndo," len=%d [bad: < 20]", len)); in ikev1_id_print()
984 …ND_PRINT((ndo," len=%d %s/0x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", len, in ikev1_id_print()
997 ND_PRINT((ndo," len=%d [bad: < 8]", len)); in ikev1_id_print()
999 ND_PRINT((ndo," len=%d %s-%s", len, in ikev1_id_print()
1008 ND_PRINT((ndo," len=%d [bad: < 32]", len)); in ikev1_id_print()
1010 ND_PRINT((ndo," len=%d %s-%s", len, in ikev1_id_print()
1026 ND_PRINT((ndo," len=%d", len)); in ikev1_id_print()
1027 if (2 < ndo->ndo_vflag) { in ikev1_id_print()
1028 ND_PRINT((ndo," ")); in ikev1_id_print()
1029 if (!rawprint(ndo, (caddr_t)data, len)) in ikev1_id_print()
1035 ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_ID))); in ikev1_id_print()
1040 ikev1_cert_print(netdissect_options *ndo, u_char tpay _U_, in ikev1_cert_print() argument
1054 ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_CERT))); in ikev1_cert_print()
1059 ND_PRINT((ndo," len=%d", item_len - 4)); in ikev1_cert_print()
1060 ND_PRINT((ndo," type=%s", STR_OR_ID((cert.encode), certstr))); in ikev1_cert_print()
1061 if (2 < ndo->ndo_vflag && 4 < item_len) { in ikev1_cert_print()
1062 ND_PRINT((ndo," ")); in ikev1_cert_print()
1063 if (!rawprint(ndo, (caddr_t)(ext + 1), item_len - 4)) in ikev1_cert_print()
1068 ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_CERT))); in ikev1_cert_print()
1073 ikev1_cr_print(netdissect_options *ndo, u_char tpay _U_, in ikev1_cr_print() argument
1086 ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_CR))); in ikev1_cr_print()
1091 ND_PRINT((ndo," len=%d", item_len - 4)); in ikev1_cr_print()
1092 ND_PRINT((ndo," type=%s", STR_OR_ID((cert.encode), certstr))); in ikev1_cr_print()
1093 if (2 < ndo->ndo_vflag && 4 < item_len) { in ikev1_cr_print()
1094 ND_PRINT((ndo," ")); in ikev1_cr_print()
1095 if (!rawprint(ndo, (caddr_t)(ext + 1), item_len - 4)) in ikev1_cr_print()
1100 ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_CR))); in ikev1_cr_print()
1105 ikev1_hash_print(netdissect_options *ndo, u_char tpay _U_, in ikev1_hash_print() argument
1112 ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_HASH))); in ikev1_hash_print()
1116 ND_PRINT((ndo," len=%d", ntohs(e.len) - 4)); in ikev1_hash_print()
1117 if (2 < ndo->ndo_vflag && 4 < ntohs(e.len)) { in ikev1_hash_print()
1118 ND_PRINT((ndo," ")); in ikev1_hash_print()
1119 if (!rawprint(ndo, (caddr_t)(ext + 1), ntohs(e.len) - 4)) in ikev1_hash_print()
1124 ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_HASH))); in ikev1_hash_print()
1129 ikev1_sig_print(netdissect_options *ndo, u_char tpay _U_, in ikev1_sig_print() argument
1136 ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_SIG))); in ikev1_sig_print()
1140 ND_PRINT((ndo," len=%d", ntohs(e.len) - 4)); in ikev1_sig_print()
1141 if (2 < ndo->ndo_vflag && 4 < ntohs(e.len)) { in ikev1_sig_print()
1142 ND_PRINT((ndo," ")); in ikev1_sig_print()
1143 if (!rawprint(ndo, (caddr_t)(ext + 1), ntohs(e.len) - 4)) in ikev1_sig_print()
1148 ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_SIG))); in ikev1_sig_print()
1153 ikev1_nonce_print(netdissect_options *ndo, u_char tpay _U_, in ikev1_nonce_print() argument
1162 ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_NONCE))); in ikev1_nonce_print()
1166 ND_PRINT((ndo," n len=%d", ntohs(e.len) - 4)); in ikev1_nonce_print()
1167 if (2 < ndo->ndo_vflag && 4 < ntohs(e.len)) { in ikev1_nonce_print()
1168 ND_PRINT((ndo," ")); in ikev1_nonce_print()
1169 if (!rawprint(ndo, (caddr_t)(ext + 1), ntohs(e.len) - 4)) in ikev1_nonce_print()
1171 } else if (1 < ndo->ndo_vflag && 4 < ntohs(e.len)) { in ikev1_nonce_print()
1172 ND_PRINT((ndo," ")); in ikev1_nonce_print()
1173 if (!ike_show_somedata(ndo, (u_char *)(caddr_t)(ext + 1), ep)) in ikev1_nonce_print()
1178 ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_NONCE))); in ikev1_nonce_print()
1183 ikev1_n_print(netdissect_options *ndo, u_char tpay _U_, in ikev1_n_print() argument
1239 ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_N))); in ikev1_n_print()
1247 ND_PRINT((ndo," doi=%d", doi)); in ikev1_n_print()
1248 ND_PRINT((ndo," proto=%d", proto)); in ikev1_n_print()
1250 ND_PRINT((ndo," type=%s", NOTIFY_ERROR_STR(ntohs(n.type)))); in ikev1_n_print()
1252 ND_PRINT((ndo," type=%s", numstr(ntohs(n.type)))); in ikev1_n_print()
1254 ND_PRINT((ndo," type=%s", NOTIFY_STATUS_STR(ntohs(n.type)))); in ikev1_n_print()
1256 ND_PRINT((ndo," type=%s", numstr(ntohs(n.type)))); in ikev1_n_print()
1258 ND_PRINT((ndo," spi=")); in ikev1_n_print()
1259 if (!rawprint(ndo, (caddr_t)(p + 1), n.spi_size)) in ikev1_n_print()
1265 ND_PRINT((ndo," doi=ipsec")); in ikev1_n_print()
1266 ND_PRINT((ndo," proto=%s", PROTOIDSTR(proto))); in ikev1_n_print()
1268 ND_PRINT((ndo," type=%s", NOTIFY_ERROR_STR(ntohs(n.type)))); in ikev1_n_print()
1270 ND_PRINT((ndo," type=%s", IPSEC_NOTIFY_ERROR_STR(ntohs(n.type)))); in ikev1_n_print()
1272 ND_PRINT((ndo," type=%s", NOTIFY_STATUS_STR(ntohs(n.type)))); in ikev1_n_print()
1274 ND_PRINT((ndo," type=%s", IPSEC_NOTIFY_STATUS_STR(ntohs(n.type)))); in ikev1_n_print()
1276 ND_PRINT((ndo," type=%s", numstr(ntohs(n.type)))); in ikev1_n_print()
1278 ND_PRINT((ndo," spi=")); in ikev1_n_print()
1279 if (!rawprint(ndo, (caddr_t)(p + 1), n.spi_size)) in ikev1_n_print()
1287 ND_PRINT((ndo," orig=(")); in ikev1_n_print()
1294 cp = ikev1_attrmap_print(ndo, cp, in ikev1_n_print()
1300 ND_PRINT((ndo,"replay detection %sabled", in ikev1_n_print()
1304 if (ikev1_sub_print(ndo, ISAKMP_NPTYPE_SA, in ikev1_n_print()
1311 isakmp_print(ndo, cp, in ikev1_n_print()
1315 ND_PRINT((ndo,")")); in ikev1_n_print()
1319 ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_N))); in ikev1_n_print()
1324 ikev1_d_print(netdissect_options *ndo, u_char tpay _U_, in ikev1_d_print() argument
1336 ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_D))); in ikev1_d_print()
1344 ND_PRINT((ndo," doi=%u", doi)); in ikev1_d_print()
1345 ND_PRINT((ndo," proto=%u", proto)); in ikev1_d_print()
1347 ND_PRINT((ndo," doi=ipsec")); in ikev1_d_print()
1348 ND_PRINT((ndo," proto=%s", PROTOIDSTR(proto))); in ikev1_d_print()
1350 ND_PRINT((ndo," spilen=%u", d.spi_size)); in ikev1_d_print()
1351 ND_PRINT((ndo," nspi=%u", ntohs(d.num_spi))); in ikev1_d_print()
1352 ND_PRINT((ndo," spi=")); in ikev1_d_print()
1356 ND_PRINT((ndo,",")); in ikev1_d_print()
1357 if (!rawprint(ndo, (caddr_t)q, d.spi_size)) in ikev1_d_print()
1363 ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_D))); in ikev1_d_print()
1368 ikev1_vid_print(netdissect_options *ndo, u_char tpay _U_, in ikev1_vid_print() argument
1376 ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_VID))); in ikev1_vid_print()
1380 ND_PRINT((ndo," len=%d", ntohs(e.len) - 4)); in ikev1_vid_print()
1381 if (2 < ndo->ndo_vflag && 4 < ntohs(e.len)) { in ikev1_vid_print()
1382 ND_PRINT((ndo," ")); in ikev1_vid_print()
1383 if (!rawprint(ndo, (caddr_t)(ext + 1), ntohs(e.len) - 4)) in ikev1_vid_print()
1388 ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_VID))); in ikev1_vid_print()
1399 ikev2_pay_print(netdissect_options *ndo, const char *payname, int critical) in ikev2_pay_print() argument
1401 ND_PRINT((ndo,"%s%s:", payname, critical&0x80 ? "[C]" : "")); in ikev2_pay_print()
1405 ikev2_gen_print(netdissect_options *ndo, u_char tpay, in ikev2_gen_print() argument
1412 ikev2_pay_print(ndo, NPSTR(tpay), e.critical); in ikev2_gen_print()
1414 ND_PRINT((ndo," len=%d", ntohs(e.len) - 4)); in ikev2_gen_print()
1415 if (2 < ndo->ndo_vflag && 4 < ntohs(e.len)) { in ikev2_gen_print()
1416 ND_PRINT((ndo," ")); in ikev2_gen_print()
1417 if (!rawprint(ndo, (caddr_t)(ext + 1), ntohs(e.len) - 4)) in ikev2_gen_print()
1422 ND_PRINT((ndo," [|%s]", NPSTR(tpay))); in ikev2_gen_print()
1427 ikev2_t_print(netdissect_options *ndo, u_char tpay _U_, int pcount, in ikev2_t_print() argument
1444 ikev2_pay_print(ndo, NPSTR(ISAKMP_NPTYPE_T), t.h.critical); in ikev2_t_print()
1480 ND_PRINT((ndo," #%u type=%s id=%s ", pcount, in ikev2_t_print()
1484 ND_PRINT((ndo," #%u type=%s id=%u ", pcount, in ikev2_t_print()
1491 cp = ikev1_attrmap_print(ndo, cp, (ep < ep2) ? ep : ep2, in ikev2_t_print()
1494 cp = ikev1_attr_print(ndo, cp, (ep < ep2) ? ep : ep2); in ikev2_t_print()
1497 ND_PRINT((ndo,"...")); in ikev2_t_print()
1500 ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_T))); in ikev2_t_print()
1505 ikev2_p_print(netdissect_options *ndo, u_char tpay _U_, int pcount _U_, in ikev2_p_print() argument
1517 ikev2_pay_print(ndo, NPSTR(ISAKMP_NPTYPE_P), prop.h.critical); in ikev2_p_print()
1519 ND_PRINT((ndo," #%u protoid=%s transform=%d len=%u", in ikev2_p_print()
1523 ND_PRINT((ndo," spi=")); in ikev2_p_print()
1524 if (!rawprint(ndo, (caddr_t)(p + 1), prop.spi_size)) in ikev2_p_print()
1531 cp = ikev2_sub_print(ndo, NULL, ISAKMP_NPTYPE_T, ext, ep, phase, doi0, in ikev2_p_print()
1536 ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_P))); in ikev2_p_print()
1541 ikev2_sa_print(netdissect_options *ndo, u_char tpay, in ikev2_sa_print() argument
1552 ikev2_pay_print(ndo, "sa", e.critical); in ikev2_sa_print()
1556 ND_PRINT((ndo," len=%d", sa_length)); in ikev2_sa_print()
1558 ikev2_sub_print(ndo, NULL, ISAKMP_NPTYPE_P, in ikev2_sa_print()
1564 ND_PRINT((ndo," [|%s]", NPSTR(tpay))); in ikev2_sa_print()
1569 ikev2_ke_print(netdissect_options *ndo, u_char tpay, in ikev2_ke_print() argument
1581 ikev2_pay_print(ndo, NPSTR(tpay), ke.h.critical); in ikev2_ke_print()
1583 ND_PRINT((ndo," len=%u group=%s", ntohs(ke.h.len) - 8, in ikev2_ke_print()
1586 if (2 < ndo->ndo_vflag && 8 < ntohs(ke.h.len)) { in ikev2_ke_print()
1587 ND_PRINT((ndo," ")); in ikev2_ke_print()
1588 if (!rawprint(ndo, (caddr_t)(k + 1), ntohs(ke.h.len) - 8)) in ikev2_ke_print()
1593 ND_PRINT((ndo," [|%s]", NPSTR(tpay))); in ikev2_ke_print()
1598 ikev2_ID_print(netdissect_options *ndo, u_char tpay, in ikev2_ID_print() argument
1611 ikev2_pay_print(ndo, NPSTR(tpay), id.h.critical); in ikev2_ID_print()
1615 ND_PRINT((ndo," len=%d", id_len - 4)); in ikev2_ID_print()
1616 if (2 < ndo->ndo_vflag && 4 < id_len) { in ikev2_ID_print()
1617 ND_PRINT((ndo," ")); in ikev2_ID_print()
1618 if (!rawprint(ndo, (caddr_t)(ext + 1), id_len - 4)) in ikev2_ID_print()
1629 ND_PRINT((ndo, " ipv4:")); in ikev2_ID_print()
1633 ND_PRINT((ndo, " fqdn:")); in ikev2_ID_print()
1637 ND_PRINT((ndo, " rfc822:")); in ikev2_ID_print()
1641 ND_PRINT((ndo, " ipv6:")); in ikev2_ID_print()
1645 ND_PRINT((ndo, " dn:")); in ikev2_ID_print()
1649 ND_PRINT((ndo, " gn:")); in ikev2_ID_print()
1653 ND_PRINT((ndo, " keyid:")); in ikev2_ID_print()
1662 ND_PRINT((ndo, "%c", typedata[i])); in ikev2_ID_print()
1664 ND_PRINT((ndo, ".")); in ikev2_ID_print()
1669 if (!rawprint(ndo, (caddr_t)typedata, idtype_len)) in ikev2_ID_print()
1675 ND_PRINT((ndo," [|%s]", NPSTR(tpay))); in ikev2_ID_print()
1680 ikev2_cert_print(netdissect_options *ndo, u_char tpay, in ikev2_cert_print() argument
1686 return ikev2_gen_print(ndo, tpay, ext); in ikev2_cert_print()
1690 ikev2_cr_print(netdissect_options *ndo, u_char tpay, in ikev2_cr_print() argument
1696 return ikev2_gen_print(ndo, tpay, ext); in ikev2_cr_print()
1700 ikev2_auth_print(netdissect_options *ndo, u_char tpay, in ikev2_auth_print() argument
1714 ikev2_pay_print(ndo, NPSTR(tpay), a.h.critical); in ikev2_auth_print()
1717 ND_PRINT((ndo," len=%d method=%s", len-4, in ikev2_auth_print()
1720 if (1 < ndo->ndo_vflag && 4 < len) { in ikev2_auth_print()
1721 ND_PRINT((ndo," authdata=(")); in ikev2_auth_print()
1722 if (!rawprint(ndo, (caddr_t)authdata, len - sizeof(a))) in ikev2_auth_print()
1724 ND_PRINT((ndo,") ")); in ikev2_auth_print()
1725 } else if(ndo->ndo_vflag && 4 < len) { in ikev2_auth_print()
1726 if(!ike_show_somedata(ndo, authdata, ep)) goto trunc; in ikev2_auth_print()
1731 ND_PRINT((ndo," [|%s]", NPSTR(tpay))); in ikev2_auth_print()
1736 ikev2_nonce_print(netdissect_options *ndo, u_char tpay, in ikev2_nonce_print() argument
1746 ikev2_pay_print(ndo, "nonce", e.critical); in ikev2_nonce_print()
1748 ND_PRINT((ndo," len=%d", ntohs(e.len) - 4)); in ikev2_nonce_print()
1749 if (1 < ndo->ndo_vflag && 4 < ntohs(e.len)) { in ikev2_nonce_print()
1750 ND_PRINT((ndo," nonce=(")); in ikev2_nonce_print()
1751 if (!rawprint(ndo, (caddr_t)(ext + 1), ntohs(e.len) - 4)) in ikev2_nonce_print()
1753 ND_PRINT((ndo,") ")); in ikev2_nonce_print()
1754 } else if(ndo->ndo_vflag && 4 < ntohs(e.len)) { in ikev2_nonce_print()
1755 if(!ike_show_somedata(ndo, (const u_char *)(ext+1), ep)) goto trunc; in ikev2_nonce_print()
1760 ND_PRINT((ndo," [|%s]", NPSTR(tpay))); in ikev2_nonce_print()
1766 ikev2_n_print(netdissect_options *ndo, u_char tpay _U_, in ikev2_n_print() argument
1781 ikev2_pay_print(ndo, NPSTR(ISAKMP_NPTYPE_N), n.h.critical); in ikev2_n_print()
1788 ND_PRINT((ndo," prot_id=%s", PROTOIDSTR(n.prot_id))); in ikev2_n_print()
1939 ND_PRINT((ndo," type=%u(%s)", type, notify_name)); in ikev2_n_print()
1944 ND_PRINT((ndo," spi=")); in ikev2_n_print()
1945 if (!rawprint(ndo, (caddr_t)(p + 1), n.spi_size)) in ikev2_n_print()
1951 if(3 < ndo->ndo_vflag) { in ikev2_n_print()
1956 ND_PRINT((ndo," data=(")); in ikev2_n_print()
1957 if (!rawprint(ndo, (caddr_t)(cp), ep - cp)) in ikev2_n_print()
1960 ND_PRINT((ndo,")")); in ikev2_n_print()
1963 if(!ike_show_somedata(ndo, cp, ep)) goto trunc; in ikev2_n_print()
1968 ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_N))); in ikev2_n_print()
1973 ikev2_d_print(netdissect_options *ndo, u_char tpay, in ikev2_d_print() argument
1979 return ikev2_gen_print(ndo, tpay, ext); in ikev2_d_print()
1983 ikev2_vid_print(netdissect_options *ndo, u_char tpay, in ikev2_vid_print() argument
1995 ikev2_pay_print(ndo, NPSTR(tpay), e.critical); in ikev2_vid_print()
1996 ND_PRINT((ndo," len=%d vid=", ntohs(e.len) - 4)); in ikev2_vid_print()
2002 if(ND_ISPRINT(vid[i])) ND_PRINT((ndo, "%c", vid[i])); in ikev2_vid_print()
2003 else ND_PRINT((ndo, ".")); in ikev2_vid_print()
2005 if (2 < ndo->ndo_vflag && 4 < len) { in ikev2_vid_print()
2006 ND_PRINT((ndo," ")); in ikev2_vid_print()
2007 if (!rawprint(ndo, (caddr_t)(ext + 1), ntohs(e.len) - 4)) in ikev2_vid_print()
2012 ND_PRINT((ndo," [|%s]", NPSTR(tpay))); in ikev2_vid_print()
2017 ikev2_TS_print(netdissect_options *ndo, u_char tpay, in ikev2_TS_print() argument
2023 return ikev2_gen_print(ndo, tpay, ext); in ikev2_TS_print()
2027 ikev2_e_print(netdissect_options *ndo, in ikev2_e_print() argument
2058 ikev2_pay_print(ndo, NPSTR(tpay), e.critical); in ikev2_e_print()
2062 ND_PRINT((ndo," len=%d", dlen)); in ikev2_e_print()
2063 if (2 < ndo->ndo_vflag && 4 < dlen) { in ikev2_e_print()
2064 ND_PRINT((ndo," ")); in ikev2_e_print()
2065 if (!rawprint(ndo, (caddr_t)(ext + 1), dlen)) in ikev2_e_print()
2074 if(esp_print_decrypt_buffer_by_ikev2(ndo, in ikev2_e_print()
2079 ext = (const struct isakmp_gen *)ndo->ndo_packetp; in ikev2_e_print()
2082 ikev2_sub_print(ndo, base, e.np, ext, ndo->ndo_snapend, in ikev2_e_print()
2093 ND_PRINT((ndo," [|%s]", NPSTR(tpay))); in ikev2_e_print()
2098 ikev2_cp_print(netdissect_options *ndo, u_char tpay, in ikev2_cp_print() argument
2104 return ikev2_gen_print(ndo, tpay, ext); in ikev2_cp_print()
2108 ikev2_eap_print(netdissect_options *ndo, u_char tpay, in ikev2_eap_print() argument
2114 return ikev2_gen_print(ndo, tpay, ext); in ikev2_eap_print()
2118 ike_sub0_print(netdissect_options *ndo, in ike_sub0_print() argument
2146 cp = (*npfunc[np])(ndo, np, ext, item_len, ep, phase, doi, proto, depth); in ike_sub0_print()
2148 ND_PRINT((ndo,"%s", NPSTR(np))); in ike_sub0_print()
2154 ND_PRINT((ndo," [|isakmp]")); in ike_sub0_print()
2159 ikev1_sub_print(netdissect_options *ndo, in ikev1_sub_print() argument
2177 ND_PRINT((ndo,"\n")); in ikev1_sub_print()
2179 ND_PRINT((ndo," ")); in ikev1_sub_print()
2180 ND_PRINT((ndo,"(")); in ikev1_sub_print()
2181 cp = ike_sub0_print(ndo, np, ext, ep, phase, doi, proto, depth); in ikev1_sub_print()
2182 ND_PRINT((ndo,")")); in ikev1_sub_print()
2195 ND_PRINT((ndo," [|%s]", NPSTR(np))); in ikev1_sub_print()
2208 ikev1_print(netdissect_options *ndo, in ikev1_print() argument
2219 ep = ndo->ndo_snapend; in ikev1_print()
2223 ND_PRINT((ndo," phase %d", phase)); in ikev1_print()
2225 ND_PRINT((ndo," phase %d/others", phase)); in ikev1_print()
2231 ND_PRINT((ndo," I")); in ikev1_print()
2235 ND_PRINT((ndo," ?")); in ikev1_print()
2238 ND_PRINT((ndo," I")); in ikev1_print()
2240 ND_PRINT((ndo," R")); in ikev1_print()
2242 ND_PRINT((ndo," ?")); in ikev1_print()
2245 ND_PRINT((ndo," %s", ETYPESTR(base->etype))); in ikev1_print()
2247 ND_PRINT((ndo,"[%s%s]", base->flags & ISAKMP_FLAG_E ? "E" : "", in ikev1_print()
2251 if (ndo->ndo_vflag) { in ikev1_print()
2254 ND_PRINT((ndo,":")); in ikev1_print()
2262 ND_PRINT((ndo," [encrypted %s]", NPSTR(base->np))); in ikev1_print()
2269 ikev1_sub_print(ndo, np, ext, ep, phase, 0, 0, 0); in ikev1_print()
2273 if (ndo->ndo_vflag) { in ikev1_print()
2275 ND_PRINT((ndo," (len mismatch: isakmp %u/ip %u)", in ikev1_print()
2282 ikev2_sub0_print(netdissect_options *ndo, struct isakmp *base, in ikev2_sub0_print() argument
2306 cp = ikev2_p_print(ndo, np, pcount, ext, item_len, in ikev2_sub0_print()
2309 cp = ikev2_t_print(ndo, np, pcount, ext, item_len, in ikev2_sub0_print()
2312 cp = ikev2_e_print(ndo, base, np, ext, item_len, in ikev2_sub0_print()
2319 cp = (*npfunc[np])(ndo, np, /*pcount,*/ ext, item_len, in ikev2_sub0_print()
2322 ND_PRINT((ndo,"%s", NPSTR(np))); in ikev2_sub0_print()
2328 ND_PRINT((ndo," [|isakmp]")); in ikev2_sub0_print()
2333 ikev2_sub_print(netdissect_options *ndo, in ikev2_sub_print() argument
2354 ND_PRINT((ndo,"\n")); in ikev2_sub_print()
2356 ND_PRINT((ndo," ")); in ikev2_sub_print()
2357 ND_PRINT((ndo,"(")); in ikev2_sub_print()
2358 cp = ikev2_sub0_print(ndo, base, np, pcount, in ikev2_sub_print()
2360 ND_PRINT((ndo,")")); in ikev2_sub_print()
2373 ND_PRINT((ndo," [|%s]", NPSTR(np))); in ikev2_sub_print()
2378 ikev2_print(netdissect_options *ndo, in ikev2_print() argument
2388 ep = ndo->ndo_snapend; in ikev2_print()
2392 ND_PRINT((ndo, " parent_sa")); in ikev2_print()
2394 ND_PRINT((ndo, " child_sa ")); in ikev2_print()
2396 ND_PRINT((ndo, " %s", ETYPESTR(base->etype))); in ikev2_print()
2398 ND_PRINT((ndo, "[%s%s%s]", in ikev2_print()
2404 if (ndo->ndo_vflag) { in ikev2_print()
2407 ND_PRINT((ndo, ":")); in ikev2_print()
2415 ND_PRINT((ndo, " [encrypted %s]", NPSTR(base->np))); in ikev2_print()
2423 ikev2_sub_print(ndo, base, np, ext, ep, phase, 0, 0, 0); in ikev2_print()
2427 if (ndo->ndo_vflag) { in ikev2_print()
2429 ND_PRINT((ndo, " (len mismatch: isakmp %u/ip %u)", in ikev2_print()
2436 isakmp_print(netdissect_options *ndo, in isakmp_print() argument
2447 if (ndo->ndo_sa_list_head == NULL) { in isakmp_print()
2448 if (ndo->ndo_espsecret) in isakmp_print()
2449 esp_print_decodesecret(ndo); in isakmp_print()
2454 ep = ndo->ndo_snapend; in isakmp_print()
2457 ND_PRINT((ndo,"[|isakmp]")); in isakmp_print()
2463 ND_PRINT((ndo,"isakmp")); in isakmp_print()
2469 if (ndo->ndo_vflag) { in isakmp_print()
2470 ND_PRINT((ndo," %d.%d", major, minor)); in isakmp_print()
2473 if (ndo->ndo_vflag) { in isakmp_print()
2474 ND_PRINT((ndo," msgid ")); in isakmp_print()
2475 hexprint(ndo, (caddr_t)&base.msgid, sizeof(base.msgid)); in isakmp_print()
2478 if (1 < ndo->ndo_vflag) { in isakmp_print()
2479 ND_PRINT((ndo," cookie ")); in isakmp_print()
2480 hexprint(ndo, (caddr_t)&base.i_ck, sizeof(base.i_ck)); in isakmp_print()
2481 ND_PRINT((ndo,"->")); in isakmp_print()
2482 hexprint(ndo, (caddr_t)&base.r_ck, sizeof(base.r_ck)); in isakmp_print()
2484 ND_PRINT((ndo,":")); in isakmp_print()
2488 ikev1_print(ndo, bp, length, bp2, &base); in isakmp_print()
2492 ikev2_print(ndo, bp, length, bp2, &base); in isakmp_print()
2498 isakmp_rfc3948_print(netdissect_options *ndo, in isakmp_rfc3948_print() argument
2504 ND_PRINT((ndo, "isakmp-nat-keep-alive")); in isakmp_rfc3948_print()
2516 ND_PRINT((ndo, "NONESP-encap: ")); in isakmp_rfc3948_print()
2517 isakmp_print(ndo, bp+4, length-4, bp2); in isakmp_rfc3948_print()
2526 ND_PRINT((ndo, "UDP-encap: ")); in isakmp_rfc3948_print()
2528 advance = esp_print(ndo, bp, length, bp2, &enh, &padlen); in isakmp_rfc3948_print()
2536 ip_print_inner(ndo, bp, length, nh, bp2); in isakmp_rfc3948_print()
2541 ND_PRINT((ndo,"[|isakmp]")); in isakmp_rfc3948_print()