1 #include <libubox/udebug.h>
5 typedef void (*udebug_config_cb
)(struct udebug_ubus
*ctx
, struct blob_attr
*data
, bool enabled
);
7 struct udebug_ubus_ring
{
8 struct udebug_buf
*buf
;
9 const struct udebug_buf_meta
*meta
;
10 unsigned int size
, default_size
;
11 unsigned int entries
, default_entries
;
15 struct ubus_context
*ubus
;
16 struct uloop_timeout t
;
18 struct ubus_subscriber sub
;
22 void udebug_netlink_msg(struct udebug_buf
*buf
, uint16_t proto
, const void *data
, size_t len
);
24 void udebug_ubus_init(struct udebug_ubus
*ctx
, struct ubus_context
*ubus
,
25 const char *service
, udebug_config_cb cb
);
26 void udebug_ubus_ring_init(struct udebug
*ud
, struct udebug_ubus_ring
*ring
);
27 void udebug_ubus_apply_config(struct udebug
*ud
, struct udebug_ubus_ring
*rings
, int n
,
28 struct blob_attr
*data
, bool enabled
);
29 void udebug_ubus_free(struct udebug_ubus
*ctx
);