]> git.ipfire.org Git - thirdparty/hostap.git/blob - src/radius/radius_server.h
EAP-FAST: Make PAC-Key lifetime values configurable
[thirdparty/hostap.git] / src / radius / radius_server.h
1 /*
2 * hostapd / RADIUS authentication server
3 * Copyright (c) 2005-2007, Jouni Malinen <j@w1.fi>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 *
9 * Alternatively, this software may be distributed under the terms of BSD
10 * license.
11 *
12 * See README and COPYING for more details.
13 */
14
15 #ifndef RADIUS_SERVER_H
16 #define RADIUS_SERVER_H
17
18 struct radius_server_data;
19 struct eap_user;
20
21 struct radius_server_conf {
22 int auth_port;
23 char *client_file;
24 void *conf_ctx;
25 void *eap_sim_db_priv;
26 void *ssl_ctx;
27 u8 *pac_opaque_encr_key;
28 char *eap_fast_a_id;
29 int eap_fast_prov;
30 int pac_key_lifetime;
31 int pac_key_refresh_time;
32 int eap_sim_aka_result_ind;
33 int tnc;
34 int ipv6;
35 int (*get_eap_user)(void *ctx, const u8 *identity, size_t identity_len,
36 int phase2, struct eap_user *user);
37 };
38
39
40 #ifdef RADIUS_SERVER
41
42 struct radius_server_data *
43 radius_server_init(struct radius_server_conf *conf);
44
45 void radius_server_deinit(struct radius_server_data *data);
46
47 int radius_server_get_mib(struct radius_server_data *data, char *buf,
48 size_t buflen);
49
50 void radius_server_eap_pending_cb(struct radius_server_data *data, void *ctx);
51
52 #else /* RADIUS_SERVER */
53
54 static inline struct radius_server_data *
55 radius_server_init(struct radius_server_conf *conf)
56 {
57 return NULL;
58 }
59
60 static inline void radius_server_deinit(struct radius_server_data *data)
61 {
62 }
63
64 static inline int radius_server_get_mib(struct radius_server_data *data,
65 char *buf, size_t buflen)
66 {
67 return 0;
68 }
69
70 static inline void
71 radius_server_eap_pending_cb(struct radius_server_data *data, void *ctx)
72 {
73 }
74
75 #endif /* RADIUS_SERVER */
76
77 #endif /* RADIUS_SERVER_H */