Home | History | Annotate | Download | only in racoon

Lines Matching refs:iph1

141 isakmp_cfg_r(iph1, msg)
142 struct ph1handle *iph1;
172 if (iph1->mode_cfg->ivm == NULL ||
173 iph1->mode_cfg->last_msgid != packet->msgid )
174 iph1->mode_cfg->ivm =
175 isakmp_cfg_newiv(iph1, packet->msgid);
176 ivm = iph1->mode_cfg->ivm;
178 dmsg = oakley_do_decrypt(iph1, msg, ivm->iv, ivm->ive);
230 if ((check = oakley_compute_hash1(iph1,
253 isakmp_cfg_attr_r(iph1, packet->msgid, attrpl);
276 isakmp_cfg_attr_r(iph1, msgid, attrpl)
277 struct ph1handle *iph1;
288 oakley_delivm(iph1->mode_cfg->ivm);
289 iph1->mode_cfg->ivm = NULL;
294 return isakmp_cfg_reply(iph1, attrpl);
298 iph1->msgid = msgid;
299 return isakmp_cfg_request(iph1, attrpl);
303 iph1->msgid = msgid;
304 return isakmp_cfg_set(iph1, attrpl);
318 isakmp_cfg_reply(iph1, attrpl)
319 struct ph1handle *iph1;
347 if ((error = xauth_attr_reply(iph1,
390 if ((error = xauth_attr_reply(iph1,
395 isakmp_cfg_getaddr4(attr, &iph1->mode_cfg->addr4);
396 iph1->mode_cfg->flags |= ISAKMP_CFG_GOT_ADDR4;
399 isakmp_cfg_getaddr4(attr, &iph1->mode_cfg->mask4);
400 iph1->mode_cfg->flags |= ISAKMP_CFG_GOT_MASK4;
404 &iph1->mode_cfg->dns4[iph1->mode_cfg->dns4_index],
405 &iph1->mode_cfg->dns4_index, MAXNS);
406 iph1->mode_cfg->flags |= ISAKMP_CFG_GOT_DNS4;
410 &iph1->mode_cfg->wins4[iph1->mode_cfg->wins4_index],
411 &iph1->mode_cfg->wins4_index, MAXNS);
412 iph1->mode_cfg->flags |= ISAKMP_CFG_GOT_WINS4;
416 iph1->mode_cfg->default_domain);
417 iph1->mode_cfg->flags |= ISAKMP_CFG_GOT_DEFAULT_DOMAIN;
429 isakmp_unity_reply(iph1, attr);
451 if ((iph1->status == PHASE1ST_ESTABLISHED) &&
452 iph1->rmconf->mode_cfg) {
453 switch (iph1->approval->authmethod) {
462 script_hook(iph1, SCRIPT_PHASE1_UP);
480 evt_phase1(iph1, EVT_PHASE1_MODE_CFG, buf);
490 isakmp_cfg_request(iph1, attrpl)
491 struct ph1handle *iph1;
528 reply_attr = isakmp_xauth_req(iph1, attr);
569 reply_attr = isakmp_cfg_net(iph1, attr);
582 reply_attr = isakmp_xauth_req(iph1, attr);
586 reply_attr = isakmp_cfg_string(iph1,
601 reply_attr = isakmp_unity_req(iph1, attr);
631 error = isakmp_cfg_send(iph1, payload,
634 if (iph1->status == PHASE1ST_ESTABLISHED) {
635 switch (iph1->approval->authmethod) {
644 script_hook(iph1, SCRIPT_PHASE1_UP);
658 isakmp_cfg_set(iph1, attrpl)
659 struct ph1handle *iph1;
695 reply_attr = isakmp_xauth_set(iph1, attr);
733 error = isakmp_cfg_send(iph1, payload,
736 if (iph1->mode_cfg->flags & ISAKMP_CFG_DELETE_PH1) {
737 if (iph1->status == PHASE1ST_ESTABLISHED ||
738 iph1->status == PHASE1ST_DYING)
739 isakmp_info_send_d1(iph1);
740 remph1(iph1);
741 delph1(iph1);
742 iph1 = NULL;
750 if ((iph1 != NULL) && (iph1->rmconf->mode_cfg) && (error == 0))
751 error = isakmp_cfg_getconfig(iph1);
779 isakmp_cfg_net(iph1, attr)
780 struct ph1handle *iph1;
792 if (xauth_check(iph1) != 0) {
811 if (iph1->mode_cfg->flags & ISAKMP_CFG_ADDR4_EXTERN)
821 if ((iph1->mode_cfg->flags & ISAKMP_CFG_ADDR4_EXTERN)
822 && (iph1->mode_cfg->addr4.s_addr != htonl(-2)))
835 if (isakmp_cfg_getport(iph1) == -1) {
841 iph1->mode_cfg->addr4.s_addr =
843 + iph1->mode_cfg->port);
844 iph1->mode_cfg->flags |= ISAKMP_CFG_ADDR4_LOCAL;
852 if (isakmp_cfg_accounting(iph1, ISAKMP_CFG_LOGIN) != 0)
855 return isakmp_cfg_addr4(iph1,
856 attr, &iph1->mode_cfg->addr4.s_addr);
863 if (iph1->mode_cfg->flags & ISAKMP_CFG_MASK4_EXTERN)
873 if (iph1->mode_cfg->flags & ISAKMP_CFG_MASK4_EXTERN)
882 iph1->mode_cfg->mask4.s_addr
884 iph1->mode_cfg->flags |= ISAKMP_CFG_MASK4_LOCAL;
891 return isakmp_cfg_addr4(iph1, attr,
892 &iph1->mode_cfg->mask4.s_addr);
896 return isakmp_cfg_addr4_list(iph1,
902 return isakmp_cfg_addr4_list(iph1,
909 return isakmp_cfg_addrnet4(iph1, attr,
928 isakmp_cfg_void(iph1, attr)
929 struct ph1handle *iph1;
950 isakmp_cfg_copy(iph1, attr)
951 struct ph1handle *iph1;
971 isakmp_cfg_short(iph1, attr, value)
972 struct ph1handle *iph1;
995 isakmp_cfg_varlen(iph1, attr, string, len)
996 struct ph1handle *iph1;
1021 isakmp_cfg_string(iph1, attr, string)
1022 struct ph1handle *iph1;
1027 return isakmp_cfg_varlen(iph1, attr, string, len);
1031 isakmp_cfg_addr4(iph1, attr, addr)
1032 struct ph1handle *iph1;
1056 isakmp_cfg_addrnet4(iph1, attr, addr, mask)
1057 struct ph1handle *iph1;
1086 isakmp_cfg_addr4_list(iph1, attr, addr, nbr)
1087 struct ph1handle *iph1;
1131 isakmp_cfg_newiv(iph1, msgid)
1132 struct ph1handle *iph1;
1135 struct isakmp_cfg_state *ics = iph1->mode_cfg;
1146 ics->ivm = oakley_newiv2(iph1, msgid);
1154 isakmp_cfg_send(iph1, payload, np, flags, new_exchange)
1155 struct ph1handle *iph1;
1168 struct isakmp_cfg_state *ics = iph1->mode_cfg;
1171 if ((iph1->status < PHASE1ST_ESTABLISHED) ||
1172 (iph1->local == NULL) ||
1173 (iph1->remote == NULL)) {
1184 iph2->dst = dupsaddr(iph1->remote);
1189 iph2->src = dupsaddr(iph1->local);
1199 iph2->msgid = isakmp_newmsgid2(iph1);
1201 iph2->msgid = iph1->msgid;
1204 if (iph1->skeyid_a != NULL) {
1206 if (isakmp_cfg_newiv(iph1, iph2->msgid) == NULL) {
1213 hash = oakley_compute_hash1(iph1, iph2->msgid, payload);
1235 bindph12(iph1, iph2);
1249 memcpy(&isakmp->i_ck, &iph1->index.i_ck, sizeof(cookie_t));
1250 memcpy(&isakmp->r_ck, &iph1->index.r_ck, sizeof(cookie_t));
1252 isakmp->v = iph1->version;
1274 isakmp_printpacket(iph2->sendbuf, iph1->local, iph1->remote, 1);
1322 isakmp_cfg_rmstate(iph1)
1323 struct ph1handle *iph1;
1325 struct isakmp_cfg_state *state = iph1->mode_cfg;
1327 if (isakmp_cfg_accounting(iph1, ISAKMP_CFG_LOGOUT) != 0)
1331 isakmp_cfg_putport(iph1, state->port);
1334 if(iph1->mode_cfg->ivm) {
1335 oakley_delivm(iph1->mode_cfg->ivm);
1336 iph1->mode_cfg->ivm = NULL;
1340 if(iph1->mode_cfg->split_include != NULL)
1341 splitnet_list_free(iph1->mode_cfg->split_include,
1342 &iph1->mode_cfg->include_count);
1343 if(iph1->mode_cfg->split_local != NULL)
1344 splitnet_list_free(iph1->mode_cfg->split_local,
1345 &iph1->mode_cfg->local_count);
1350 iph1->mode_cfg = NULL;
1371 isakmp_cfg_getport(iph1)
1372 struct ph1handle *iph1;
1377 if (iph1->mode_cfg->flags & ISAKMP_CFG_PORT_ALLOCATED)
1378 return iph1->mode_cfg->port;
1401 iph1->mode_cfg->flags |= ISAKMP_CFG_PORT_ALLOCATED;
1402 iph1->mode_cfg->port = i;
1408 isakmp_cfg_putport(iph1, index)
1409 struct ph1handle *iph1;
1431 iph1->mode_cfg->flags &= ISAKMP_CFG_PORT_ALLOCATED;
1454 isakmp_cfg_accounting(iph1, inout)
1455 struct ph1handle *iph1;
1460 return privsep_accounting_pam(iph1->mode_cfg->port,
1465 return isakmp_cfg_accounting_radius(iph1, inout);
1468 return privsep_accounting_system(iph1->mode_cfg->port,
1469 iph1->remote, iph1->mode_cfg->login, inout);
1521 isakmp_cfg_accounting_radius(iph1, inout)
1522 struct ph1handle *iph1;
1534 iph1->mode_cfg->login) != 0) {
1554 RAD_FRAMED_IP_ADDRESS, iph1->mode_cfg->addr4) != 0) {
1562 RAD_LOGIN_IP_HOST, iph1->mode_cfg->addr4) != 0) {
1577 iph1->mode_cfg->port) != 0)
1717 isakmp_cfg_getconfig(iph1)
1718 struct ph1handle *iph1;
1764 error = isakmp_cfg_send(iph1, buffer,
1872 isakmp_cfg_setenv(iph1, envp, envc)
1873 struct ph1handle *iph1;
1893 if ((iph1->mode_cfg->flags & ISAKMP_CFG_GOT_ADDR4) ||
1895 (iph1->mode_cfg->flags & ISAKMP_CFG_ADDR4_EXTERN) ||
1898 (iph1->mode_cfg->flags & ISAKMP_CFG_ADDR4_EXTERN) ||
1900 (iph1->mode_cfg->flags & ISAKMP_CFG_ADDR4_LOCAL)) {
1901 inet_ntop(AF_INET, &iph1->mode_cfg->addr4,
1911 if (iph1->mode_cfg->xauth.authdata.generic.usr != NULL) {
1913 iph1->mode_cfg->xauth.authdata.generic.usr) != 0) {
1921 if (iph1->mode_cfg->flags & ISAKMP_CFG_GOT_MASK4)
1922 inet_ntop(AF_INET, &iph1->mode_cfg->mask4,
1943 tmp = ntohl(iph1->mode_cfg->mask4.s_addr);
1954 if (iph1->mode_cfg->flags & ISAKMP_CFG_GOT_DNS4) {
1956 inet_ntop(AF_INET, &iph1->mode_cfg->dns4[0],
1960 isakmp_cfg_iplist_to_str(addrlist, iph1->mode_cfg->dns4_index,
1961 (void *)iph1->mode_cfg->dns4, 0);
1978 if (iph1->mode_cfg->flags & ISAKMP_CFG_GOT_WINS4) {
1983 inet_ntop(AF_INET, &iph1->mode_cfg->wins4[0],
1987 isakmp_cfg_iplist_to_str(addrlist, iph1->mode_cfg->wins4_index,
1988 (void *)iph1->mode_cfg->wins4, 0);
2007 if(iph1->mode_cfg->flags & ISAKMP_CFG_GOT_DEFAULT_DOMAIN)
2009 iph1->mode_cfg->default_domain,
2021 if (iph1->mode_cfg->flags & ISAKMP_CFG_GOT_SPLIT_INCLUDE) {
2023 splitnet_list_2str(iph1->mode_cfg->split_include, NETMASK);
2025 splitnet_list_2str(iph1->mode_cfg->split_include, CIDR);
2047 if (iph1->mode_cfg->flags & ISAKMP_CFG_GOT_SPLIT_LOCAL) {
2049 splitnet_list_2str(iph1->mode_cfg->split_local, NETMASK);
2051 splitnet_list_2str(iph1->mode_cfg->split_local, CIDR);