wpa_supplicant / hostapd  2.5
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
eap_common.h
Go to the documentation of this file.
1 
5 #ifndef EAP_COMMON_H
6 #define EAP_COMMON_H
7 
8 #include "wpabuf.h"
9 
10 struct erp_tlvs {
11  const u8 *keyname;
12  const u8 *domain;
13 
14  u8 keyname_len;
15  u8 domain_len;
16 };
17 
18 int eap_hdr_len_valid(const struct wpabuf *msg, size_t min_payload);
19 const u8 * eap_hdr_validate(int vendor, EapType eap_type,
20  const struct wpabuf *msg, size_t *plen);
21 struct wpabuf * eap_msg_alloc(int vendor, EapType type, size_t payload_len,
22  u8 code, u8 identifier);
23 void eap_update_len(struct wpabuf *msg);
24 u8 eap_get_id(const struct wpabuf *msg);
25 EapType eap_get_type(const struct wpabuf *msg);
26 int erp_parse_tlvs(const u8 *pos, const u8 *end, struct erp_tlvs *tlvs,
27  int stop_at_keyname);
28 
29 #endif /* EAP_COMMON_H */
struct wpabuf * eap_msg_alloc(int vendor, EapType type, size_t payload_len, u8 code, u8 identifier)
Allocate a buffer for an EAP message.
Definition: eap_common.c:124
EapType eap_get_type(const struct wpabuf *msg)
Get EAP Type from wpabuf.
Definition: eap_common.c:195
Definition: wpabuf.h:16
Dynamic data buffer.
void eap_update_len(struct wpabuf *msg)
Update EAP header length.
Definition: eap_common.c:163
const u8 * eap_hdr_validate(int vendor, EapType eap_type, const struct wpabuf *msg, size_t *plen)
Validate EAP header.
Definition: eap_common.c:62
u8 eap_get_id(const struct wpabuf *msg)
Get EAP Identifier from wpabuf.
Definition: eap_common.c:178
Definition: eap_common.h:10
int eap_hdr_len_valid(const struct wpabuf *msg, size_t min_payload)
Validate EAP header length field.
Definition: eap_common.c:21