2 * Copyright (C) 2011-2012 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.
14 #ifndef __LIBUBUS_IO_H
15 #define __LIBUBUS_IO_H
17 #define __hidden __attribute__((visibility ("hidden")))
19 extern struct blob_buf b
;
20 extern const struct ubus_method watch_method
;
22 struct blob_attr
**ubus_parse_msg(struct blob_attr
*msg
);
23 void ubus_handle_data(struct uloop_fd
*u
, unsigned int events
);
24 int ubus_send_msg(struct ubus_context
*ctx
, uint32_t seq
,
25 struct blob_attr
*msg
, int cmd
, uint32_t peer
);
26 void ubus_process_msg(struct ubus_context
*ctx
, struct ubus_msghdr
*hdr
);
27 int __hidden
ubus_start_request(struct ubus_context
*ctx
, struct ubus_request
*req
,
28 struct blob_attr
*msg
, int cmd
, uint32_t peer
);
29 void ubus_process_obj_msg(struct ubus_context
*ctx
, struct ubus_msghdr
*hdr
);
30 void ubus_process_req_msg(struct ubus_context
*ctx
, struct ubus_msghdr
*hdr
);
31 void ubus_process_pending_msg(struct ubus_context
*ctx
);