26 RCSIDH(control_h,
"$Id: c82782bbbfad0f10cf1b9db838006f90bb8cc4c3 $")
28 #include <freeradius-devel/io/atomic_queue.h>
29 #include <freeradius-devel/io/ring_buffer.h>
30 #include <freeradius-devel/util/time.h>
31 #include <freeradius-devel/util/event.h>
33 #include <sys/types.h>
50 #define FR_CONTROL_MAX_MESSAGES (1024)
51 #define FR_CONTROL_MAX_SIZE (64)
56 #define FR_CONTROL_ID_CHANNEL (1)
57 #define FR_CONTROL_ID_LISTEN (2)
58 #define FR_CONTROL_ID_WORKER (3)
59 #define FR_CONTROL_ID_DIRECTORY (4)
60 #define FR_CONTROL_ID_INJECT (5)
61 #define FR_CONTROL_ID_LISTEN_DEAD (6)
Structure to hold the atomic queue.
int fr_control_gc(fr_control_t *c, fr_ring_buffer_t *rb)
ssize_t fr_control_message_pop(fr_atomic_queue_t *aq, uint32_t *p_id, void *data, size_t data_size)
Pop control-plane message.
fr_control_t * fr_control_create(TALLOC_CTX *ctx, fr_event_list_t *el, fr_atomic_queue_t *aq))
Create a control-plane signaling path.
int fr_control_message_send(fr_control_t *c, fr_ring_buffer_t *rb, uint32_t id, void *data, size_t data_size)
Send a control-plane message.
int fr_control_message_push(fr_control_t *c, fr_ring_buffer_t *rb, uint32_t id, void *data, size_t data_size)
Push a control-plane message.
int fr_control_callback_add(fr_control_t *c, uint32_t id, void *ctx, fr_control_callback_t callback))
Register a callback for an ID.
int fr_control_same_thread(fr_control_t *c)
int fr_control_callback_delete(fr_control_t *c, uint32_t id)
Delete a callback for an ID.
void(* fr_control_callback_t)(void *ctx, void const *data, size_t data_size, fr_time_t now)
static fr_ring_buffer_t * rb
static fr_atomic_queue_t * aq
Stores all information relating to an event list.
static fr_event_list_t * el