Merge branch 'vendor/BYACC'
[dragonfly.git] / contrib / hostapd / src / eap_common / eap_common.h
1 /*
2  * EAP common peer/server definitions
3  * Copyright (c) 2004-2012, Jouni Malinen <j@w1.fi>
4  *
5  * This software may be distributed under the terms of the BSD license.
6  * See README for more details.
7  */
8
9 #ifndef EAP_COMMON_H
10 #define EAP_COMMON_H
11
12 #include "wpabuf.h"
13
14 int eap_hdr_len_valid(const struct wpabuf *msg, size_t min_payload);
15 const u8 * eap_hdr_validate(int vendor, EapType eap_type,
16                             const struct wpabuf *msg, size_t *plen);
17 struct wpabuf * eap_msg_alloc(int vendor, EapType type, size_t payload_len,
18                               u8 code, u8 identifier);
19 void eap_update_len(struct wpabuf *msg);
20 u8 eap_get_id(const struct wpabuf *msg);
21 EapType eap_get_type(const struct wpabuf *msg);
22
23 #endif /* EAP_COMMON_H */