ieee802_1x.h
Go to the documentation of this file.00001
00016 #ifndef IEEE802_1X_H
00017 #define IEEE802_1X_H
00018
00019 struct hostapd_data;
00020 struct sta_info;
00021 struct eapol_state_machine;
00022 struct hostapd_config;
00023 struct hostapd_bss_config;
00024
00025
00026
00027 struct ieee802_1x_eapol_key {
00028 u8 type;
00029 u16 key_length;
00030 u8 replay_counter[8];
00031
00032
00033 u8 key_iv[16];
00034 u8 key_index;
00035
00036
00037
00038 u8 key_signature[16];
00039
00040
00041
00042
00043
00044
00045
00046
00047 } __attribute__ ((packed));
00048
00049
00050 void ieee802_1x_receive(struct hostapd_data *hapd, const u8 *sa, const u8 *buf,
00051 size_t len);
00052 void ieee802_1x_new_station(struct hostapd_data *hapd, struct sta_info *sta);
00053 void ieee802_1x_free_station(struct sta_info *sta);
00054
00055 void ieee802_1x_tx_key(struct hostapd_data *hapd, struct sta_info *sta);
00056 void ieee802_1x_abort_auth(struct hostapd_data *hapd, struct sta_info *sta);
00057 void ieee802_1x_set_sta_authorized(struct hostapd_data *hapd,
00058 struct sta_info *sta, int authorized);
00059 void ieee802_1x_dump_state(FILE *f, const char *prefix, struct sta_info *sta);
00060 int ieee802_1x_init(struct hostapd_data *hapd);
00061 void ieee802_1x_deinit(struct hostapd_data *hapd);
00062 int ieee802_1x_reconfig(struct hostapd_data *hapd,
00063 struct hostapd_config *oldconf,
00064 struct hostapd_bss_config *oldbss);
00065 int ieee802_1x_tx_status(struct hostapd_data *hapd, struct sta_info *sta,
00066 const u8 *buf, size_t len, int ack);
00067 u8 * ieee802_1x_get_identity(struct eapol_state_machine *sm, size_t *len);
00068 u8 * ieee802_1x_get_radius_class(struct eapol_state_machine *sm, size_t *len,
00069 int idx);
00070 const u8 * ieee802_1x_get_key(struct eapol_state_machine *sm, size_t *len);
00071 void ieee802_1x_notify_port_enabled(struct eapol_state_machine *sm,
00072 int enabled);
00073 void ieee802_1x_notify_port_valid(struct eapol_state_machine *sm,
00074 int valid);
00075 void ieee802_1x_notify_pre_auth(struct eapol_state_machine *sm, int pre_auth);
00076 int ieee802_1x_get_mib(struct hostapd_data *hapd, char *buf, size_t buflen);
00077 int ieee802_1x_get_mib_sta(struct hostapd_data *hapd, struct sta_info *sta,
00078 char *buf, size_t buflen);
00079 void hostapd_get_ntp_timestamp(u8 *buf);
00080 char *eap_type_text(u8 type);
00081
00082 const char *radius_mode_txt(struct hostapd_data *hapd);
00083 int radius_sta_rate(struct hostapd_data *hapd, struct sta_info *sta);
00084
00085 #endif
00086