Lines Matching defs:iph1

120 xauth_sendreq(iph1)
121 struct ph1handle *iph1;
128 struct xauth_state *xst = &iph1->mode_cfg->xauth;
132 if (iph1->status != PHASE1ST_ESTABLISHED) {
175 isakmp_cfg_send(iph1, buffer,
186 xauth_attr_reply(iph1, attr, id)
187 struct ph1handle *iph1;
194 struct xauth_state *xst = &iph1->mode_cfg->xauth;
196 if ((iph1->mode_cfg->flags & ISAKMP_CFG_VENDORID_XAUTH) == 0) {
265 strncpy(iph1->mode_cfg->login, usr, LOGINLEN);
266 iph1->mode_cfg->login[LOGINLEN] = '\0';
269 if ((port = isakmp_cfg_getport(iph1)) == -1) {
281 res = xauth_login_radius(iph1, usr, pwd);
286 res = privsep_xauth_login_pam(iph1->mode_cfg->port,
287 iph1->remote, usr, pwd);
292 res = xauth_login_ldap(iph1, usr, pwd);
306 res = group_check(iph1,
314 throttle_delay = throttle_host(iph1->remote, res) - time(NULL);
318 str = saddrwop2str(iph1->remote);
335 return xauth_reply(iph1, port, id, res);
343 xra->index = iph1->index;
349 return xauth_reply(iph1, port, id, res);
361 struct ph1handle *iph1;
363 if ((iph1 = getph1byindex(&xra->index)) != NULL)
364 (void)xauth_reply(iph1, xra->port, xra->id, xra->res);
374 xauth_reply(iph1, port, id, res)
375 struct ph1handle *iph1;
382 struct xauth_state *xst = &iph1->mode_cfg->xauth;
387 isakmp_cfg_putport(iph1, port);
392 xauth_sendstatus(iph1, XAUTH_STATUS_FAIL, id);
396 if (iph1->status == PHASE1ST_ESTABLISHED)
397 isakmp_info_send_d1(iph1);
398 remph1(iph1);
399 delph1(iph1);
408 xauth_sendstatus(iph1, XAUTH_STATUS_OK, id);
414 xauth_sendstatus(iph1, status, id)
415 struct ph1handle *iph1;
443 isakmp_cfg_send(iph1, buffer,
496 xauth_login_radius(iph1, usr, pwd)
497 struct ph1handle *iph1;
527 if (isakmp_cfg_radius_common(radius_auth_state, iph1->mode_cfg->port) != 0)
535 iph1->mode_cfg->addr4 = rad_cvt_addr(data);
536 iph1->mode_cfg->flags
541 iph1->mode_cfg->mask4 = rad_cvt_addr(data);
542 iph1->mode_cfg->flags
796 xauth_login_ldap(iph1, usr, pwd)
797 struct ph1handle *iph1;
950 iph1->mode_cfg->xauth.udn = racoon_malloc(strlen(userdn)+1);
951 strcpy(iph1->mode_cfg->xauth.udn,userdn);
966 iph1->mode_cfg->addr4.s_addr = inet_addr(tmpaddr);
967 iph1->mode_cfg->flags |= ISAKMP_CFG_ADDR4_EXTERN;
986 iph1->mode_cfg->mask4.s_addr = inet_addr(tmpmask);
987 iph1->mode_cfg->flags |= ISAKMP_CFG_MASK4_EXTERN;
1255 xauth_check(iph1)
1256 struct ph1handle *iph1;
1258 struct xauth_state *xst = &iph1->mode_cfg->xauth;
1265 switch (AUTHMETHOD(iph1)) {
1274 if ((iph1->mode_cfg->flags & ISAKMP_CFG_VENDORID_XAUTH) == 0) {
1299 group_check(iph1, grp_list, grp_count)
1300 struct ph1handle *iph1;
1310 if(iph1->mode_cfg == NULL) {
1322 usr = iph1->mode_cfg->xauth.authdata.generic.usr;
1343 iph1->mode_cfg->xauth.udn,
1373 isakmp_xauth_req(iph1, attr)
1374 struct ph1handle *iph1;
1389 if ((iph1->mode_cfg->flags & ISAKMP_CFG_VENDORID_XAUTH) == 0) {
1418 if (!iph1->rmconf->xauth || !iph1->rmconf->xauth->login) {
1424 dlen = iph1->rmconf->xauth->login->l - 1;
1425 iph1->rmconf->xauth->state |= XAUTH_SENT_USERNAME;
1432 if (!iph1->rmconf->xauth || !iph1->rmconf->xauth->login)
1436 usr = vmalloc(iph1->rmconf->xauth->login->l - 1 + skip);
1444 iph1->rmconf->xauth->login->v,
1445 iph1->rmconf->xauth->login->l - 1);
1447 if (iph1->rmconf->xauth->pass) {
1449 pwd = iph1->rmconf->xauth->pass;
1454 iph1->rmconf->xauth->login->v);
1463 iph1->rmconf->xauth->state |= XAUTH_SENT_PASSWORD;
1474 plog(LLV_ERROR, LOCATION, iph1->remote,
1478 plog(LLV_NOTIFY,LOCATION, iph1->remote,
1512 * iph1->rmconf->xauth->login->v is valid,
1515 memcpy(data, iph1->rmconf->xauth->login->v, dlen);
1535 isakmp_xauth_set(iph1, attr)
1536 struct ph1handle *iph1;
1546 if ((iph1->mode_cfg->flags & ISAKMP_CFG_VENDORID_XAUTH) == 0) {
1561 xst = &iph1->mode_cfg->xauth;
1562 switch(AUTHMETHOD(iph1)) {
1579 /* If we got a failure, delete iph1 */
1584 EVT_PUSH(iph1->local, iph1->remote,
1587 iph1->mode_cfg->flags |= ISAKMP_CFG_DELETE_PH1;
1589 EVT_PUSH(iph1->local, iph1->remote,
1603 plog(LLV_ERROR, LOCATION, iph1->remote,
1607 plog(LLV_NOTIFY,LOCATION, iph1->remote,