The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Data Structures | Functions
io.h File Reference

Function prototypes and datatypes for the REST (HTTP) transport. More...

#include <unbound.h>
#include <unbound-event.h>
+ Include dependency graph for io.h:
+ This graph shows which files directly or indirectly include this file:

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...
 

Detailed Description

Function prototypes and datatypes for the REST (HTTP) transport.

Id
3756341a79a76af3a53339ca462ccead8daba565

Definition in file io.h.


Data Structure Documentation

◆ unbound_io_event_base_t

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.

Definition at line 48 of file io.h.

+ Collaboration diagram for unbound_io_event_base_t:
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.

Function Documentation

◆ unbound_io_init()

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.

Parameters
[in]ctxTalloc ctx to allocate even base in.
[out]ev_b_outEvent base. Free with talloc_free.
[in]elTo use to run the unbound event loop.
Returns
  • 0 on success.
  • -1 on failure.

Definition at line 482 of file io.c.

+ Here is the caller graph for this function: