18 #ifndef __UDEBUG_RINGBUF_H
19 #define __UDEBUG_RINGBUF_H
21 #include <sys/types.h>
29 #define UDEBUG_SOCK_NAME "/var/run/udebug.sock"
52 #define UDEBUG_TS_MSEC 1000ULL
53 #define UDEBUG_TS_SEC (1000ULL * UDEBUG_TS_MSEC)
197 return ctx->
fd.
fd >= 0;
200 int udebug_id_cmp(
const void *k1,
const void *k2,
void *ptr);
struct blob_attr_info __attribute__
const struct udebug_buf_meta * meta
struct udebug_snapshot * s
struct udebug_snapshot ** list
const char * attr[__UDEBUG_META_MAX]
const struct udebug_packet_info * meta
enum udebug_format format
struct udebug_ptr * entries
struct uloop_timeout reconnect
void(* notify_cb)(struct udebug *ctx, struct udebug_remote_buf *rb)
struct avl_tree remote_rings
struct list_head local_rings
void udebug_iter_start(struct udebug_iter *it, struct udebug_snapshot **s, size_t n)
void udebug_add_uloop(struct udebug *ctx)
@ UDEBUG_DLT_IEEE_802_11_RADIOTAP
struct udebug_remote_buf * udebug_remote_buf_get(struct udebug *ctx, uint32_t id)
static bool udebug_is_connected(struct udebug *ctx)
void udebug_entry_add(struct udebug_buf *buf)
bool udebug_iter_next(struct udebug_iter *it)
int udebug_remote_buf_set_poll(struct udebug *ctx, struct udebug_remote_buf *rb, bool val)
void * udebug_entry_append(struct udebug_buf *buf, const void *data, uint32_t len)
int int uint16_t udebug_entry_trim(struct udebug_buf *buf, uint16_t len)
bool udebug_snapshot_get_entry(struct udebug_snapshot *s, struct udebug_iter *it, unsigned int entry)
int udebug_remote_buf_map(struct udebug *ctx, struct udebug_remote_buf *rb, uint32_t id)
int udebug_connect(struct udebug *ctx, const char *path)
int udebug_buf_add(struct udebug *ctx, struct udebug_buf *buf, const struct udebug_buf_meta *meta)
uint64_t udebug_buf_flags(struct udebug_buf *buf)
void udebug_remote_buf_set_flags(struct udebug_remote_buf *rb, uint64_t mask, uint64_t set)
void udebug_free(struct udebug *ctx)
void udebug_remote_buf_set_start_offset(struct udebug_remote_buf *rb, uint32_t idx)
struct udebug_snapshot * udebug_remote_buf_snapshot(struct udebug_remote_buf *rb)
void udebug_buf_free(struct udebug_buf *buf)
int int udebug_entry_vprintf(struct udebug_buf *buf, const char *fmt, va_list ap) __attribute__((format(printf
uint64_t udebug_timestamp(void)
static bool udebug_buf_valid(struct udebug_buf *buf)
void udebug_remote_buf_unmap(struct udebug *ctx, struct udebug_remote_buf *rb)
int udebug_buf_init(struct udebug_buf *buf, size_t entries, size_t size)
static void udebug_entry_init(struct udebug_buf *buf)
void udebug_auto_connect(struct udebug *ctx, const char *path)
int udebug_entry_printf(struct udebug_buf *buf, const char *fmt,...) __attribute__((format(printf
void udebug_poll(struct udebug *ctx)
void udebug_entry_set_length(struct udebug_buf *buf, uint16_t len)
void udebug_init(struct udebug *ctx)
void udebug_remote_buf_set_start_time(struct udebug_remote_buf *rb, uint64_t ts)
void udebug_entry_init_ts(struct udebug_buf *buf, uint64_t timestamp)
int udebug_id_cmp(const void *k1, const void *k2, void *ptr)