00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef EAP_FAST_PAC_H
00016 #define EAP_FAST_PAC_H
00017
00018 #include "eap_common/eap_fast_common.h"
00019
00020 struct eap_fast_pac {
00021 struct eap_fast_pac *next;
00022
00023 u8 pac_key[EAP_FAST_PAC_KEY_LEN];
00024 u8 *pac_opaque;
00025 size_t pac_opaque_len;
00026 u8 *pac_info;
00027 size_t pac_info_len;
00028 u8 *a_id;
00029 size_t a_id_len;
00030 u8 *i_id;
00031 size_t i_id_len;
00032 u8 *a_id_info;
00033 size_t a_id_info_len;
00034 u16 pac_type;
00035 };
00036
00037
00038 void eap_fast_free_pac(struct eap_fast_pac *pac);
00039 struct eap_fast_pac * eap_fast_get_pac(struct eap_fast_pac *pac_root,
00040 const u8 *a_id, size_t a_id_len,
00041 u16 pac_type);
00042 int eap_fast_add_pac(struct eap_fast_pac **pac_root,
00043 struct eap_fast_pac **pac_current,
00044 struct eap_fast_pac *entry);
00045 int eap_fast_load_pac(struct eap_sm *sm, struct eap_fast_pac **pac_root,
00046 const char *pac_file);
00047 int eap_fast_save_pac(struct eap_sm *sm, struct eap_fast_pac *pac_root,
00048 const char *pac_file);
00049 size_t eap_fast_pac_list_truncate(struct eap_fast_pac *pac_root,
00050 size_t max_len);
00051 int eap_fast_load_pac_bin(struct eap_sm *sm, struct eap_fast_pac **pac_root,
00052 const char *pac_file);
00053 int eap_fast_save_pac_bin(struct eap_sm *sm, struct eap_fast_pac *pac_root,
00054 const char *pac_file);
00055
00056 #endif