ctrl_iface.h
Go to the documentation of this file.
00001 /*
00002  * WPA Supplicant / UNIX domain socket -based control interface
00003  * Copyright (c) 2004-2005, Jouni Malinen <j@w1.fi>
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License version 2 as
00007  * published by the Free Software Foundation.
00008  *
00009  * Alternatively, this software may be distributed under the terms of BSD
00010  * license.
00011  *
00012  * See README and COPYING for more details.
00013  */
00014 
00015 #ifndef CTRL_IFACE_H
00016 #define CTRL_IFACE_H
00017 
00018 #ifdef CONFIG_CTRL_IFACE
00019 
00020 /* Shared functions from ctrl_iface.c; to be called by ctrl_iface backends */
00021 
00037 char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s,
00038                                          char *buf, size_t *resp_len);
00039 
00054 char * wpa_supplicant_global_ctrl_iface_process(struct wpa_global *global,
00055                                                 char *buf, size_t *resp_len);
00056 
00057 
00058 /* Functions that each ctrl_iface backend must implement */
00059 
00070 struct ctrl_iface_priv *
00071 wpa_supplicant_ctrl_iface_init(struct wpa_supplicant *wpa_s);
00072 
00082 void wpa_supplicant_ctrl_iface_deinit(struct ctrl_iface_priv *priv);
00083 
00095 void wpa_supplicant_ctrl_iface_wait(struct ctrl_iface_priv *priv);
00096 
00107 struct ctrl_iface_global_priv *
00108 wpa_supplicant_global_ctrl_iface_init(struct wpa_global *global);
00109 
00119 void wpa_supplicant_global_ctrl_iface_deinit(
00120         struct ctrl_iface_global_priv *priv);
00121 
00122 #else /* CONFIG_CTRL_IFACE */
00123 
00124 static inline struct ctrl_iface_priv *
00125 wpa_supplicant_ctrl_iface_init(struct wpa_supplicant *wpa_s)
00126 {
00127         return (void *) -1;
00128 }
00129 
00130 static inline void
00131 wpa_supplicant_ctrl_iface_deinit(struct ctrl_iface_priv *priv)
00132 {
00133 }
00134 
00135 static inline void
00136 wpa_supplicant_ctrl_iface_send(struct ctrl_iface_priv *priv, int level,
00137                                char *buf, size_t len)
00138 {
00139 }
00140 
00141 static inline void
00142 wpa_supplicant_ctrl_iface_wait(struct ctrl_iface_priv *priv)
00143 {
00144 }
00145 
00146 static inline struct ctrl_iface_global_priv *
00147 wpa_supplicant_global_ctrl_iface_init(struct wpa_global *global)
00148 {
00149         return (void *) 1;
00150 }
00151 
00152 static inline void
00153 wpa_supplicant_global_ctrl_iface_deinit(struct ctrl_iface_global_priv *priv)
00154 {
00155 }
00156 
00157 #endif /* CONFIG_CTRL_IFACE */
00158 
00159 #endif /* CTRL_IFACE_H */


wpa_supplicant_node
Author(s): Package maintained by Blaise Gassend
autogenerated on Thu Jan 2 2014 11:25:12