summaryrefslogtreecommitdiff
path: root/src/libwpactrl/wpactrl_msg.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-07-09 07:46:23 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-07-09 07:46:23 +0000
commit22a1dc61ef8e4e1c98e3a088db1dbc84d424c7a7 (patch)
treeefc5d779a40c004e708bd6a99b359c660931249b /src/libwpactrl/wpactrl_msg.c
parent0c9b6b3625dff03b6d590af597aa0f194790addb (diff)
downloadbcnm-22a1dc61ef8e4e1c98e3a088db1dbc84d424c7a7.tar.xz
Separate messages via \0, read messages one by one. Add wpactrl_scan_parse() skel.
Diffstat (limited to 'src/libwpactrl/wpactrl_msg.c')
-rw-r--r--src/libwpactrl/wpactrl_msg.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libwpactrl/wpactrl_msg.c b/src/libwpactrl/wpactrl_msg.c
new file mode 100644
index 0000000..b452c4b
--- /dev/null
+++ b/src/libwpactrl/wpactrl_msg.c
@@ -0,0 +1,8 @@
+/* ISC license. */
+
+#include <bcnm/wpactrl.h>
+
+char *wpactrl_msg (wpactrl_t *a)
+{
+ return a->datahead < a->data.len ? a->data.s + a->datahead : 0 ;
+}