/*
- * luci-rpcd - LuCI UBUS RPC server
+ * rpcd - UBUS RPC server
*
* Copyright (C) 2013 Jo-Philipp Wich <jow@openwrt.org>
*
#include <sys/types.h>
#include <dirent.h>
+#include <libubus.h>
+#include <iwinfo.h>
+#include <iwinfo/utils.h>
+
+#include <rpcd/plugin.h>
-#include "iwinfo.h"
static struct blob_buf buf;
static const struct iwinfo_ops *iw;
}
-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 },
return ubus_add_object(ctx, &obj);
}
+
+const struct rpc_plugin rpc_plugin = {
+ .init = rpc_iwinfo_api_init
+};