eap: Make enums fit with our coding guidelines
This commit is contained in:
parent
9112f7e18e
commit
5b3be6fcd4
|
@ -102,7 +102,7 @@ size_t eap_get_mtu(struct eap_state *eap)
|
||||||
}
|
}
|
||||||
|
|
||||||
void eap_send_response(struct eap_state *eap,
|
void eap_send_response(struct eap_state *eap,
|
||||||
enum eap_request_type request_type,
|
enum eap_type request_type,
|
||||||
uint8_t *buf, size_t len)
|
uint8_t *buf, size_t len)
|
||||||
{
|
{
|
||||||
buf[0] = EAP_CODE_RESPONSE;
|
buf[0] = EAP_CODE_RESPONSE;
|
||||||
|
@ -148,7 +148,7 @@ static void eap_send_identity_response(struct eap_state *eap, char *identity)
|
||||||
static void eap_handle_request(struct eap_state *eap,
|
static void eap_handle_request(struct eap_state *eap,
|
||||||
const uint8_t *pkt, size_t len)
|
const uint8_t *pkt, size_t len)
|
||||||
{
|
{
|
||||||
enum eap_request_type type;
|
enum eap_type type;
|
||||||
uint8_t buf[10];
|
uint8_t buf[10];
|
||||||
int buf_len;
|
int buf_len;
|
||||||
|
|
||||||
|
@ -218,7 +218,7 @@ void eap_rx_packet(struct eap_state *eap, const uint8_t *pkt, size_t len)
|
||||||
id = pkt[1];
|
id = pkt[1];
|
||||||
eap_len = l_get_be16(&pkt[2]);
|
eap_len = l_get_be16(&pkt[2]);
|
||||||
|
|
||||||
switch ((enum eap_pkt_code) code) {
|
switch ((enum eap_code) code) {
|
||||||
case EAP_CODE_REQUEST:
|
case EAP_CODE_REQUEST:
|
||||||
if (id == eap->last_id) {
|
if (id == eap->last_id) {
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -61,7 +61,7 @@ void eap_exit(void);
|
||||||
|
|
||||||
/* EAP method API */
|
/* EAP method API */
|
||||||
|
|
||||||
enum eap_request_type {
|
enum eap_type {
|
||||||
EAP_TYPE_IDENTITY = 1,
|
EAP_TYPE_IDENTITY = 1,
|
||||||
EAP_TYPE_NOTIFICATION = 2,
|
EAP_TYPE_NOTIFICATION = 2,
|
||||||
EAP_TYPE_NAK = 3,
|
EAP_TYPE_NAK = 3,
|
||||||
|
@ -72,7 +72,7 @@ enum eap_request_type {
|
||||||
EAP_TYPE_EXPANDED = 254,
|
EAP_TYPE_EXPANDED = 254,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum eap_pkt_code {
|
enum eap_code {
|
||||||
EAP_CODE_REQUEST = 1,
|
EAP_CODE_REQUEST = 1,
|
||||||
EAP_CODE_RESPONSE = 2,
|
EAP_CODE_RESPONSE = 2,
|
||||||
EAP_CODE_SUCCESS = 3,
|
EAP_CODE_SUCCESS = 3,
|
||||||
|
@ -80,7 +80,7 @@ enum eap_pkt_code {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct eap_method {
|
struct eap_method {
|
||||||
enum eap_request_type request_type;
|
enum eap_type request_type;
|
||||||
bool exports_msk;
|
bool exports_msk;
|
||||||
const char *name;
|
const char *name;
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ void eap_set_data(struct eap_state *eap, void *data);
|
||||||
void *eap_get_data(struct eap_state *eap);
|
void *eap_get_data(struct eap_state *eap);
|
||||||
|
|
||||||
void eap_send_response(struct eap_state *eap,
|
void eap_send_response(struct eap_state *eap,
|
||||||
enum eap_request_type request_type,
|
enum eap_type request_type,
|
||||||
uint8_t *buf, size_t len);
|
uint8_t *buf, size_t len);
|
||||||
|
|
||||||
void eap_set_key_material(struct eap_state *eap,
|
void eap_set_key_material(struct eap_state *eap,
|
||||||
|
|
Loading…
Reference in New Issue