aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/ctrl_iface_common.h
diff options
context:
space:
mode:
authorJanusz Dziedzic <janusz.dziedzic@tieto.com>2016-03-04 09:20:20 (GMT)
committerJouni Malinen <j@w1.fi>2016-03-05 15:15:05 (GMT)
commitca974ae53fc3dd038902746c95f36de4c87473d9 (patch)
tree01ccb2edd2406fbdd5ab67e334146fb1c0e6c6c8 /src/common/ctrl_iface_common.h
parentd60886cdafbf839be05ca5f7d4877565d4958a44 (diff)
downloadhostap-ca974ae53fc3dd038902746c95f36de4c87473d9.zip
hostap-ca974ae53fc3dd038902746c95f36de4c87473d9.tar.gz
hostap-ca974ae53fc3dd038902746c95f36de4c87473d9.tar.bz2
Add common ctrl_iface files
This is preparation for sharing a single implementation for ctrl_iface functionality in wpa_supplicant and hostapd. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Diffstat (limited to 'src/common/ctrl_iface_common.h')
-rw-r--r--src/common/ctrl_iface_common.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/common/ctrl_iface_common.h b/src/common/ctrl_iface_common.h
new file mode 100644
index 0000000..6844093
--- /dev/null
+++ b/src/common/ctrl_iface_common.h
@@ -0,0 +1,38 @@
+/*
+ * Common hostapd/wpa_supplicant ctrl iface code.
+ * Copyright (c) 2002-2013, Jouni Malinen <j@w1.fi>
+ * Copyright (c) 2015, Qualcomm Atheros, Inc.
+ *
+ * This software may be distributed under the terms of the BSD license.
+ * See README for more details.
+ */
+#ifndef CONTROL_IFACE_COMMON_H
+#define CONTROL_IFACE_COMMON_H
+
+#include "utils/list.h"
+
+/**
+ * struct wpa_ctrl_dst - Data structure of control interface monitors
+ *
+ * This structure is used to store information about registered control
+ * interface monitors into struct wpa_supplicant.
+ */
+struct wpa_ctrl_dst {
+ struct dl_list list;
+ struct sockaddr_un addr;
+ socklen_t addrlen;
+ int debug_level;
+ int errors;
+};
+
+void sockaddr_print(int level, const char *msg, struct sockaddr_storage *sock,
+ socklen_t socklen);
+
+int ctrl_iface_attach(struct dl_list *ctrl_dst, struct sockaddr_un *from,
+ socklen_t fromlen);
+int ctrl_iface_detach(struct dl_list *ctrl_dst, struct sockaddr_un *from,
+ socklen_t fromlen);
+int ctrl_iface_level(struct dl_list *ctrl_dst, struct sockaddr_un *from,
+ socklen_t fromlen, const char *level);
+
+#endif /* CONTROL_IFACE_COMMON_H */