X-Git-Url: http://git.archive.openwrt.org/?p=project%2Frpcd.git;a=blobdiff_plain;f=iwinfo.c;h=b78a335ce7b30a744425348355c1e8fcc92c2a9d;hp=d3866cb78adc2079319e1469afe79075afc551ea;hb=07c2f0a9b1c7f79e81fa8a51cca5ecbe9eaf7293;hpb=060f7cbf8b17e13bc1620d8fc602d4c5f2acd343 diff --git a/iwinfo.c b/iwinfo.c index d3866cb..b78a335 100644 --- a/iwinfo.c +++ b/iwinfo.c @@ -1,5 +1,5 @@ /* - * luci-rpcd - LuCI UBUS RPC server + * rpcd - UBUS RPC server * * Copyright (C) 2013 Jo-Philipp Wich * @@ -16,10 +16,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include -#include - #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 +};