Add resident.conf(5) and varsym.conf(5) manual pages.
[dragonfly/vkernel-mp.git] / contrib / hostapd-0.4.9 / eap_sim_db.h
blob57a9871073e287aa3981b00c0caf016bd92daaa0
1 #ifndef EAP_SIM_DB_H
2 #define EAP_SIM_DB_H
4 #ifdef EAP_SIM
6 /* Initialize EAP-SIM database/authentication gateway interface.
7 * Returns pointer to a private data structure. */
8 void * eap_sim_db_init(const char *config);
10 /* Deinitialize EAP-SIM database/authentication gateway interface.
11 * priv is the pointer from eap_sim_db_init(). */
12 void eap_sim_db_deinit(void *priv);
14 /* Get GSM triplets for user name identity (identity_len bytes). In most cases,
15 * the user name is '1' | IMSI, i.e., 1 followed by the IMSI in ASCII format.
16 * priv is the pointer from eap_sim_db_init().
17 * Returns the number of triplets received (has to be less than or equal to
18 * max_chal) or -1 on error (e.g., user not found). rand, kc, and sres are
19 * pointers to data areas for the triplets. */
20 int eap_sim_db_get_gsm_triplets(void *priv, const u8 *identity,
21 size_t identity_len, int max_chal,
22 u8 *rand, u8 *kc, u8 *sres);
24 /* Verify whether the given user identity (identity_len bytes) is known. In
25 * most cases, the user name is '1' | IMSI, i.e., 1 followed by the IMSI in
26 * ASCII format.
27 * priv is the pointer from eap_sim_db_init().
28 * Returns 0 if the user is found and GSM triplets would be available for it or
29 * -1 on error (e.g., user not found or no triplets available). */
30 int eap_sim_db_identity_known(void *priv, const u8 *identity,
31 size_t identity_len);
33 #else /* EAP_SIM */
34 static inline void * eap_sim_db_init(const char *config)
36 return NULL;
39 static inline void eap_sim_db_deinit(void *priv)
42 #endif /* EAP_SIM */
44 #endif /* EAP_SIM_DB_H */