• Home
  • Raw
  • Download

Lines Matching refs:isakmp

200 	struct isakmp isakmp;  local
202 char buf[sizeof (isakmp) + 4];
210 sizeof(isakmp) + 4];
275 memcpy ((char *)&isakmp, x.buf + extralen, sizeof (isakmp));
278 if (len < sizeof(isakmp) || ntohl(isakmp.len) < sizeof(isakmp)) {
281 len, ntohl(isakmp.len), sizeof(isakmp));
283 if ((len = recvfrom(so_isakmp, (char *)&isakmp, sizeof(isakmp),
293 if (ntohl(isakmp.len) > 0xffff) {
296 if ((len = recvfrom(so_isakmp, (char *)&isakmp, sizeof(isakmp),
306 if ((tmpbuf = vmalloc(ntohl(isakmp.len) + extralen)) == NULL) {
309 ntohl(isakmp.len) + extralen);
311 if ((len = recvfrom(so_isakmp, (char *)&isakmp, sizeof(isakmp),
401 struct isakmp *isakmp = (struct isakmp *)msg->v; local
402 isakmp_index *index = (isakmp_index *)isakmp;
403 u_int32_t msgid = isakmp->msgid;
411 if (memcmp(&isakmp->i_ck, r_ck0, sizeof(cookie_t)) == 0) {
423 if (isakmp->v < ISAKMP_VERSION_NUMBER) {
424 if (ISAKMP_GETMAJORV(isakmp->v) < ISAKMP_MAJOR_VERSION) {
427 ISAKMP_GETMAJORV(isakmp->v));
431 if (ISAKMP_GETMINORV(isakmp->v) < ISAKMP_MINOR_VERSION) {
434 ISAKMP_GETMINORV(isakmp->v));
442 if (isakmp->flags & ~(ISAKMP_FLAG_E | ISAKMP_FLAG_C | ISAKMP_FLAG_A)) {
444 "invalid flag 0x%02x.\n", isakmp->flags);
449 if (ISSET(isakmp->flags, ISAKMP_FLAG_C)) {
450 if (isakmp->msgid == 0) {
451 isakmp_info_send_nx(isakmp, remote, local,
462 if (memcmp(&isakmp->r_ck, r_ck0, sizeof(cookie_t)) == 0 &&
540 switch (isakmp->etype) {
545 if (isakmp->msgid != 0) {
562 if (memcmp(&isakmp->r_ck, r_ck0,
573 isakmp->etype) < 0)
595 if (iph1->etype != isakmp->etype) {
600 s_isakmp_etype(isakmp->etype));
605 if (isakmp->np == ISAKMP_NPTYPE_FRAG)
622 isakmp->etype);
651 if (isakmp->np == ISAKMP_NPTYPE_FRAG)
664 isakmp_info_send_nx(isakmp, remote, local,
669 isakmp_pindex((isakmp_index *)&isakmp->i_ck,
670 isakmp->msgid));
681 if (isakmp->np == ISAKMP_NPTYPE_FRAG)
711 if (ISSET(isakmp->flags, ISAKMP_FLAG_C))
735 if (isakmp->np == ISAKMP_NPTYPE_FRAG)
748 isakmp->etype, saddr2str(remote));
753 if (isakmp->np == ISAKMP_NPTYPE_FRAG)
765 isakmp->etype, saddr2str(remote));
949 struct isakmp *isakmp = (struct isakmp *)msg->v; local
965 if (ph2exchange[etypesw2(isakmp->etype)]
972 error = (ph2exchange[etypesw2(isakmp->etype)]
1001 if ((ph2exchange[etypesw2(isakmp->etype)]
1120 struct isakmp *isakmp = (struct isakmp *)msg->v; in isakmp_ph1begin_r() local
1150 memcpy(&iph1->index.i_ck, &isakmp->i_ck, sizeof(iph1->index.i_ck)); in isakmp_ph1begin_r()
1156 iph1->version = isakmp->v; in isakmp_ph1begin_r()
1299 struct isakmp *isakmp = (struct isakmp *)msg->v; local
1323 iph2->flags = isakmp->flags;
1324 iph2->msgid = isakmp->msgid;
1392 if ((ph2exchange[etypesw2(isakmp->etype)]
1503 struct isakmp *isakmp = (struct isakmp *)buf->v; local
1509 np = isakmp->np;
1510 gen = (struct isakmp_gen *)(buf->v + sizeof(*isakmp));
1511 tlen = buf->l - sizeof(struct isakmp);
2604 struct isakmp *isakmp; local
2606 if (vbuf->l < sizeof(*isakmp))
2609 isakmp = (struct isakmp *)vbuf->v;
2611 memcpy(&isakmp->i_ck, &iph1->index.i_ck, sizeof(cookie_t));
2612 memcpy(&isakmp->r_ck, &iph1->index.r_ck, sizeof(cookie_t));
2613 isakmp->np = nptype;
2614 isakmp->v = iph1->version;
2615 isakmp->etype = etype;
2616 isakmp->flags = flags;
2617 isakmp->msgid = msgid;
2618 isakmp->len = htonl(vbuf->l);
2620 return vbuf->v + sizeof(*isakmp);
2788 struct isakmp *isakmp; local
2831 isakmp = (struct isakmp *)buf->v;
2832 if (isakmp->flags & ISAKMP_FLAG_E) {
2839 isakmp->flags &= ~ISAKMP_FLAG_E;
2972 size_t tlen = sizeof (struct isakmp), n = 0; in isakmp_plist_set_all()