Lines Matching defs:chap
114 if (strcmp(name, "chap-name") == 0) {
116 "specify 1 argument for `chap-name'");
120 "chap-name is too long");
371 chall->chap.code = CHAP_CHALLENGE;
372 chall->chap.id = ++req->chap_id;
373 chall->chap.length = htons(msgsiz -
374 offsetof(struct eap_mschap_challenge, chap));
455 RADIUS_PACKET *pkt, struct eap_chap *chap)
462 eapsiz = ntohs(chap->eap.length);
463 switch (chap->chap.code) {
473 resp = (struct eap_mschap_response *)chap;
475 htons(resp->chap.length) <
477 offsetof(struct eap_mschap_response, chap)) {
480 "chap.length=%u valuesize=%u", req->q_id,
483 ntohs(resp->chap.length), resp->chap.value[9]);
491 namelen = ntohs(resp->chap.length) -
493 offsetof(struct eap_mschap_response, chap));
508 rr.ident = resp->chap.id;
542 if (chap->eap.code != EAP_CODE_RESPONSE) {
546 sizeof(buf)), chap->eap.code);
609 "(chap.code=%d) in EAP CHAP state=%s", req->q_id, hex_string(
610 req->state, sizeof(req->state), buf, sizeof(buf)), chap->chap.code,
626 struct eap_chap chap;
671 eapsiz = offsetof(struct eap_chap, chap.value[respsiz - 1]);
672 eap.chap.eap.code = EAP_CODE_REQUEST;
673 eap.chap.eap.id = ++req->eap_id;
674 eap.chap.eap.length = htons(eapsiz);
675 eap.chap.eap_type = EAP_TYPE_MSCHAPV2;
676 eap.chap.chap.id = resp[0];
677 eap.chap.chap.length = htons(
678 offsetof(struct chap, value[respsiz - 1]));
679 memcpy(eap.chap.chap.value, resp + 1, respsiz - 1);
681 eap.chap.chap.code = CHAP_SUCCESS;
683 eap.chap.chap.code = CHAP_FAILURE;