export ringbuf_t struct and make some of it's members const