Ubus
OpenWrt system message/RPC bus.
libubus-internal.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2011-2014 Felix Fietkau <nbd@openwrt.org>
3  *
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
7  *
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.
12  */
13 
14 #ifndef __LIBUBUS_IO_H
15 #define __LIBUBUS_IO_H
16 
17 extern struct blob_buf b;
18 extern const struct ubus_method watch_method;
19 
20 struct blob_attr **ubus_parse_msg(struct blob_attr *msg, size_t len);
21 bool ubus_validate_hdr(struct ubus_msghdr *hdr);
22 void ubus_handle_data(struct uloop_fd *u, unsigned int events);
23 int ubus_send_msg(struct ubus_context *ctx, uint32_t seq,
24  struct blob_attr *msg, int cmd, uint32_t peer, int fd);
25 void ubus_process_msg(struct ubus_context *ctx, struct ubus_msghdr_buf *buf, int fd);
27  struct blob_attr *msg, int cmd, uint32_t peer);
29  struct blob_attr *msg, int cmd, uint32_t peer);
30 void ubus_process_obj_msg(struct ubus_context *ctx, struct ubus_msghdr_buf *buf, int fd);
31 void ubus_process_req_msg(struct ubus_context *ctx, struct ubus_msghdr_buf *buf, int fd);
33 
34 
35 #endif
static int timeout
Definition: cli.c:21
static struct ubus_context * ctx
Definition: client.c:22
void ubus_process_obj_msg(struct ubus_context *ctx, struct ubus_msghdr_buf *buf, int fd)
Definition: libubus-obj.c:115
void ubus_handle_data(struct uloop_fd *u, unsigned int events)
Definition: libubus-io.c:312
int ubus_send_msg(struct ubus_context *ctx, uint32_t seq, struct blob_attr *msg, int cmd, uint32_t peer, int fd)
Definition: libubus-io.c:126
int __hidden ubus_start_request(struct ubus_context *ctx, struct ubus_request *req, struct blob_attr *msg, int cmd, uint32_t peer)
Definition: libubus-req.c:69
void ubus_process_msg(struct ubus_context *ctx, struct ubus_msghdr_buf *buf, int fd)
Definition: libubus.c:93
void __hidden ubus_poll_data(struct ubus_context *ctx, int timeout)
Definition: libubus-io.c:335
int __hidden __ubus_start_request(struct ubus_context *ctx, struct ubus_request *req, struct blob_attr *msg, int cmd, uint32_t peer)
Definition: libubus-req.c:53
void ubus_process_req_msg(struct ubus_context *ctx, struct ubus_msghdr_buf *buf, int fd)
Definition: libubus-req.c:462
struct blob_buf b
Definition: ubusd_proto.c:19
const struct ubus_method watch_method
struct blob_attr ** ubus_parse_msg(struct blob_attr *msg, size_t len)
Definition: libubus-io.c:46
bool ubus_validate_hdr(struct ubus_msghdr *hdr)
Definition: libubus-io.c:224
const struct ubus_method watch_method __hidden
Definition: libubus-sub.c:29
uint16_t seq
Definition: ubusmsg.h:2
uint32_t peer
Definition: ubusmsg.h:3