+static int test_hello(struct ubus_context *ctx, struct ubus_object *obj,
+ struct ubus_request_data *req, const char *method,
+ struct blob_attr *msg)
+{
+ blob_buf_init(&b, 0);
+ blobmsg_add_string(&b, "message", "Hello, world!\n");
+ ubus_send_reply(ctx, req, b.head);
+ return 0;
+}
+
+static const struct ubus_method test_methods[] = {
+ { .name = "hello", .handler = test_hello },
+};
+