The FreeRADIUS server
$Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
Function prototypes and datatypes for the REST (HTTP) transport. More...
#include <unbound.h>
#include <unbound-event.h>
Go to the source code of this file.
Data Structures | |
struct | unbound_io_event_base_t |
Wrapper around our event loop specifying callbacks for creating new event handles. More... | |
Functions | |
int | unbound_io_init (TALLOC_CTX *ctx, unbound_io_event_base_t **ev_b_out, fr_event_list_t *el) |
Alloc a new event base, and unbound ctx initialised from that event base. More... | |
Function prototypes and datatypes for the REST (HTTP) transport.
Definition in file io.h.
struct unbound_io_event_base_t |
Wrapper around our event loop specifying callbacks for creating new event handles.
This stores libunbound specific information in addition to the el for the current worker thread. It's passed into the 'new_event' callback when a new event handle is created. So we use it to pass in the el, and any other useful information.
Lifetime should be bound to the thread instance.
Data Fields | ||
---|---|---|
struct ub_event_base | base |
Interface structure for libunbound. MUST BE LISTED FIRST. |
fr_event_list_t * | el | Event loop events should be inserted into. |
struct ub_ctx * | ub | Unbound ctx instantiated from this event base. |
int unbound_io_init | ( | TALLOC_CTX * | ctx, |
unbound_io_event_base_t ** | ev_b_out, | ||
fr_event_list_t * | el | ||
) |
Alloc a new event base, and unbound ctx initialised from that event base.
The ub_ctx is configured to use the el specified.
When the thread ctx is freed, unbound_io_free should be called to gracefully free the ub_ctx, and then the event base structure it depends on.
[in] | ctx | Talloc ctx to allocate even base in. |
[out] | ev_b_out | Event base. Free with talloc_free. |
[in] | el | To use to run the unbound event loop. |
Definition at line 482 of file io.c.