summaryrefslogtreecommitdiff
path: root/iwinfo.c
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2013-09-02 14:52:22 +0200
committerJo-Philipp Wich <jow@openwrt.org>2013-09-02 15:23:09 +0200
commitbc100538d3883639a948f4158015f6a0b255bcd7 (patch)
treea1e7bc25f653e006f2e64688439ae8c57aae43de /iwinfo.c
parent3d358bb3a15852a760355ce28f87fb9f79c72462 (diff)
downloadrpcd-bc100538d3883639a948f4158015f6a0b255bcd7.tar.gz
iwinfo: convert to plugin library
Diffstat (limited to 'iwinfo.c')
-rw-r--r--iwinfo.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/iwinfo.c b/iwinfo.c
index d3866cb..893da01 100644
--- a/iwinfo.c
+++ b/iwinfo.c
@@ -16,10 +16,8 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/types.h>
-#include <dirent.h>
-
#include "iwinfo.h"
+#include "plugin.h"
static struct blob_buf buf;
static const struct iwinfo_ops *iw;
@@ -622,7 +620,8 @@ rpc_iwinfo_devices(struct ubus_context *ctx, struct ubus_object *obj,
}
-int rpc_iwinfo_api_init(struct ubus_context *ctx)
+static int
+rpc_iwinfo_api_init(const struct rpc_daemon_ops *o, struct ubus_context *ctx)
{
static const struct ubus_method iwinfo_methods[] = {
{ .name = "devices", .handler = rpc_iwinfo_devices },
@@ -646,3 +645,7 @@ int rpc_iwinfo_api_init(struct ubus_context *ctx)
return ubus_add_object(ctx, &obj);
}
+
+const struct rpc_plugin rpc_plugin = {
+ .init = rpc_iwinfo_api_init
+};