This will be used as an accessor for the few functions that need this
outside of ring.c.
int ring_dispatch_messages(struct ring *ring, void *ctx, size_t *ofs_ptr, size_t *last_ofs_ptr, uint flags,
ssize_t (*msg_handler)(void *ctx, const struct buffer *buf, size_t ofs, size_t len));
+/* returns the number of bytes in the ring */
+static inline size_t ring_data(const struct ring *ring)
+{
+ return b_data(&ring->buf);
+}
+
#endif /* _HAPROXY_RING_H */
/*