Go to the source code of this file.
◆ LIST_HEAD()
static LIST_HEAD |
( |
monitors |
| ) |
|
|
static |
◆ ubusd_monitor_connect()
Definition at line 33 of file ubusd_monitor.c.
39 m = calloc(1,
sizeof(*m));
44 list_add_tail(&m->
list, &monitors);
void ubusd_monitor_disconnect(struct ubus_client *cl)
◆ ubusd_monitor_disconnect()
void ubusd_monitor_disconnect |
( |
struct ubus_client * |
cl | ) |
|
Definition at line 65 of file ubusd_monitor.c.
static struct ubus_monitor * ubusd_monitor_find(struct ubus_client *cl)
static void ubusd_monitor_free(struct ubus_monitor *m)
◆ ubusd_monitor_find()
◆ ubusd_monitor_free()
◆ ubusd_monitor_init()
void ubusd_monitor_init |
( |
void |
| ) |
|
Definition at line 128 of file ubusd_monitor.c.
int(* recv_msg)(struct ubus_client *client, struct ubus_msg_buf *ub, const char *method, struct blob_attr *msg)
static int ubusd_monitor_recv(struct ubus_client *cl, struct ubus_msg_buf *ub, const char *method, struct blob_attr *msg)
static struct ubus_object * monitor_obj
struct ubus_object * ubusd_create_object_internal(struct ubus_object_type *type, uint32_t id)
#define UBUS_SYSTEM_OBJECT_MONITOR
◆ ubusd_monitor_message()
Definition at line 77 of file ubusd_monitor.c.
79 static struct blob_buf mb;
82 if (list_empty(&monitors))
85 blob_buf_init(&mb, 0);
96 list_for_each_entry(m, &monitors,
list) {
void ubus_msg_free(struct ubus_msg_buf *ub)
struct ubus_msg_buf * ubus_msg_new(void *data, int len, bool shared)
void ubus_msg_send(struct ubus_client *cl, struct ubus_msg_buf *ub)
◆ ubusd_monitor_recv()
static int ubusd_monitor_recv |
( |
struct ubus_client * |
cl, |
|
|
struct ubus_msg_buf * |
ub, |
|
|
const char * |
method, |
|
|
struct blob_attr * |
msg |
|
) |
| |
|
static |
Definition at line 105 of file ubusd_monitor.c.
109 if (cl->
uid != 0 || cl->
gid != 0)
112 if (!strcmp(method,
"add")) {
119 if (!strcmp(method,
"remove")) {
static bool ubusd_monitor_connect(struct ubus_client *cl, struct ubus_msg_buf *ub)
@ UBUS_STATUS_METHOD_NOT_FOUND
@ UBUS_STATUS_PERMISSION_DENIED
@ UBUS_STATUS_UNKNOWN_ERROR
◆ monitor_obj