Disconnect hostapd from building in base
[dragonfly.git] / contrib / hostapd / src / radius / radius_das.h
CommitLineData
4781064b
JM
1/*
2 * RADIUS Dynamic Authorization Server (DAS)
3 * Copyright (c) 2012, Jouni Malinen <j@w1.fi>
4 *
5 * This software may be distributed under the terms of the BSD license.
6 * See README for more details.
7 */
8
9#ifndef RADIUS_DAS_H
10#define RADIUS_DAS_H
11
12struct radius_das_data;
13
14enum radius_das_res {
15 RADIUS_DAS_SUCCESS,
16 RADIUS_DAS_NAS_MISMATCH,
17 RADIUS_DAS_SESSION_NOT_FOUND
18};
19
20struct radius_das_attrs {
21 const u8 *sta_addr;
22 const u8 *user_name;
23 size_t user_name_len;
24 const u8 *acct_session_id;
25 size_t acct_session_id_len;
26 const u8 *cui;
27 size_t cui_len;
28};
29
30struct radius_das_conf {
31 int port;
32 const u8 *shared_secret;
33 size_t shared_secret_len;
34 const struct hostapd_ip_addr *client_addr;
35 unsigned int time_window;
36 int require_event_timestamp;
37 void *ctx;
38 enum radius_das_res (*disconnect)(void *ctx,
39 struct radius_das_attrs *attr);
40};
41
42struct radius_das_data *
43radius_das_init(struct radius_das_conf *conf);
44
45void radius_das_deinit(struct radius_das_data *data);
46
47#endif /* RADIUS_DAS_H */