Added build option for disabling control interface (CONFIG_NO_CTRL_IFACE)
[mech_eap.orig] / hostapd / ctrl_iface.h
1 /*
2  * hostapd / UNIX domain socket -based control interface
3  * Copyright (c) 2004, 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 CTRL_IFACE_H
16 #define CTRL_IFACE_H
17
18 #ifndef CONFIG_NO_CTRL_IFACE
19 int hostapd_ctrl_iface_init(struct hostapd_data *hapd);
20 void hostapd_ctrl_iface_deinit(struct hostapd_data *hapd);
21 void hostapd_ctrl_iface_send(struct hostapd_data *hapd, int level,
22                              char *buf, size_t len);
23 #else /* CONFIG_NO_CTRL_IFACE */
24 static inline int hostapd_ctrl_iface_init(struct hostapd_data *hapd)
25 {
26         return 0;
27 }
28
29 static inline void hostapd_ctrl_iface_deinit(struct hostapd_data *hapd)
30 {
31 }
32
33 static inline void hostapd_ctrl_iface_send(struct hostapd_data *hapd,
34                                            int level, char *buf, size_t len)
35 {
36 }
37 #endif /* CONFIG_NO_CTRL_IFACE */
38
39 #endif /* CTRL_IFACE_H */