Home | History | Annotate | Download | only in eap_server

Lines Matching defs:hdr

447 				      const struct ikev2_hdr *hdr,
458 hdr, encrypted, encrypted_len,
482 const struct ikev2_hdr *hdr,
490 os_memcpy(data->r_spi, hdr->r_spi, IKEV2_SPI_LEN);
498 if (ikev2_process_sa_init_encr(data, hdr, pl->encrypted,
713 const struct ikev2_hdr *hdr,
722 &data->keys, 0, hdr, pl->encrypted,
745 /* Expect to receive IKE_SA_INIT: HDR, SAr, KEr, Nr, [CERTREQ],
760 * HDR, SK {IDr, [CERT,] [CERTREQ,] [NFID,] AUTH}
796 const struct ikev2_hdr *hdr;
804 if (wpabuf_len(buf) < sizeof(*hdr)) {
805 wpa_printf(MSG_INFO, "IKEV2: Too short frame to include HDR");
809 hdr = (const struct ikev2_hdr *) wpabuf_head(buf);
811 message_id = WPA_GET_BE32(hdr->message_id);
812 length = WPA_GET_BE32(hdr->length);
815 hdr->i_spi, IKEV2_SPI_LEN);
817 hdr->r_spi, IKEV2_SPI_LEN);
820 hdr->next_payload, hdr->version, hdr->exchange_type);
824 if (hdr->version != IKEV2_VERSION) {
825 wpa_printf(MSG_INFO, "IKEV2: Unsupported HDR version 0x%x "
826 "(expected 0x%x)", hdr->version, IKEV2_VERSION);
831 wpa_printf(MSG_INFO, "IKEV2: Invalid length (HDR: %lu != "
837 if (ikev2_validate_rx_state(data, hdr->exchange_type, message_id) < 0)
840 if ((hdr->flags & (IKEV2_HDR_INITIATOR | IKEV2_HDR_RESPONSE)) !=
843 hdr->flags);
848 if (os_memcmp(data->i_spi, hdr->i_spi, IKEV2_SPI_LEN) != 0) {
853 if (os_memcmp(data->r_spi, hdr->r_spi, IKEV2_SPI_LEN) != 0) {
860 pos = (const u8 *) (hdr + 1);
861 if (ikev2_parse_payloads(&pl, hdr->next_payload, pos, end) < 0)
866 if (ikev2_process_sa_init(data, hdr, &pl) < 0)
872 if (ikev2_process_sa_auth(data, hdr, &pl) < 0)
888 struct ikev2_hdr *hdr;
890 wpa_printf(MSG_DEBUG, "IKEV2: Adding HDR");
892 /* HDR - RFC 4306, Sect. 3.1 */
893 hdr = wpabuf_put(msg, sizeof(*hdr));
894 os_memcpy(hdr->i_spi, data->i_spi, IKEV2_SPI_LEN);
895 os_memcpy(hdr->r_spi, data->r_spi, IKEV2_SPI_LEN);
896 hdr->next_payload = next_payload;
897 hdr->version = IKEV2_VERSION;
898 hdr->exchange_type = exchange_type;
899 hdr->flags = IKEV2_HDR_INITIATOR;
900 WPA_PUT_BE32(hdr->message_id, message_id);
1090 /* build IKE_SA_INIT: HDR, SAi, KEi, Ni */
1157 /* build IKE_SA_AUTH: HDR, SK {IDi, [CERT,] [CERTREQ,] AUTH} */