2 * Copyright (C) 2011 Felix Fietkau <nbd@openwrt.org>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License version 2.1
6 * as published by the Free Software Foundation
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
18 #include <libubox/blob.h>
20 #define __packetdata __attribute__((packed)) __attribute__((__aligned__(4)))
22 #define UBUS_MAX_MSGLEN 65536
24 #define UBUS_SYSTEM_OBJECT_EVENT 1
25 #define UBUS_SYSTEM_OBJECT_MAX 1024
32 struct blob_attr data
[];
36 /* initial server message */
39 /* generic command response */
42 /* data message response */
48 /* look up one or more objects */
51 /* invoke a method on a single object */
55 UBUS_MSG_REMOVE_OBJECT
,
79 enum ubus_msg_status
{
81 UBUS_STATUS_INVALID_COMMAND
,
82 UBUS_STATUS_INVALID_ARGUMENT
,
83 UBUS_STATUS_METHOD_NOT_FOUND
,
84 UBUS_STATUS_NOT_FOUND
,
86 UBUS_STATUS_PERMISSION_DENIED
,
88 UBUS_STATUS_NOT_SUPPORTED
,
89 UBUS_STATUS_UNKNOWN_ERROR
,