ucode: check for errors in ftruncate()
[project/udebug.git] / udebug.h
index 0d7ea30508d32fc3af746049485426e01d2c4d0d..88f663b22235c1e711f38dc5a5584f7dfaf49cf5 100644 (file)
--- a/udebug.h
+++ b/udebug.h
@@ -4,6 +4,13 @@
 struct udebug_ubus;
 typedef void (*udebug_config_cb)(struct udebug_ubus *ctx, struct blob_attr *data, bool enabled);
 
+struct udebug_ubus_ring {
+       struct udebug_buf *buf;
+       const struct udebug_buf_meta *meta;
+       unsigned int size, default_size;
+       unsigned int entries, default_entries;
+};
+
 struct udebug_ubus {
        struct ubus_context *ubus;
        struct uloop_timeout t;
@@ -12,6 +19,11 @@ struct udebug_ubus {
        udebug_config_cb cb;
 };
 
+void udebug_netlink_msg(struct udebug_buf *buf, uint16_t proto, const void *data, size_t len);
+
 void udebug_ubus_init(struct udebug_ubus *ctx, struct ubus_context *ubus,
                      const char *service, udebug_config_cb cb);
+void udebug_ubus_ring_init(struct udebug *ud, struct udebug_ubus_ring *ring);
+void udebug_ubus_apply_config(struct udebug *ud, struct udebug_ubus_ring *rings, int n,
+                             struct blob_attr *data, bool enabled);
 void udebug_ubus_free(struct udebug_ubus *ctx);