|
Tor
0.4.7.0-alpha-dev
|
Code to construct a dispatch_t from a dispatch_cfg_t. More...
#include "orconfig.h"#include "lib/dispatch/dispatch.h"#include "lib/dispatch/dispatch_st.h"#include "lib/dispatch/dispatch_cfg.h"#include "lib/dispatch/dispatch_cfg_st.h"#include "lib/cc/ctassert.h"#include "lib/intmath/cmp.h"#include "lib/malloc/malloc.h"#include "lib/log/util_bug.h"#include <string.h>Go to the source code of this file.
Functions | |
| STATIC int | max_in_u16_sl (const smartlist_t *sl, int dflt) |
| CTASSERT (sizeof(uint16_t)==sizeof(msg_type_id_t)) | |
| static char * | type_fmt_nop (msg_aux_data_t arg) |
| static void | type_free_nop (msg_aux_data_t arg) |
| static void | alert_fn_nop (dispatch_t *d, channel_id_t ch, void *arg) |
| static dtbl_entry_t * | dtbl_entry_from_lst (smartlist_t *receivers) |
| dispatch_t * | dispatch_new (const dispatch_cfg_t *cfg) |
Variables | |
| static dispatch_typefns_t | nop_typefns |
Code to construct a dispatch_t from a dispatch_cfg_t.
Definition in file dispatch_new.c.
|
static |
Alert function to use when none is configured: do nothing.
Definition at line 77 of file dispatch_new.c.
| dispatch_t* dispatch_new | ( | const dispatch_cfg_t * | cfg | ) |
Create and return a new dispatcher from a given dispatch_cfg_t.
Definition at line 113 of file dispatch_new.c.
|
static |
Given a list of recvfn_t, create and return a new dtbl_entry_t mapping to each of those functions.
Definition at line 89 of file dispatch_new.c.
| STATIC int max_in_u16_sl | ( | const smartlist_t * | sl, |
| int | dflt | ||
| ) |
Given a smartlist full of (possibly NULL) pointers to uint16_t values, return the largest value, or dflt if the list is empty.
Definition at line 31 of file dispatch_new.c.
|
static |
Helper: Format an unformattable message auxiliary data item: just return a copy of the string <>.
Definition at line 54 of file dispatch_new.c.
|
static |
Helper: Free an unfreeable message auxiliary data item: do nothing.
Definition at line 62 of file dispatch_new.c.
|
static |
Type functions to use when no type functions are provided.
Definition at line 68 of file dispatch_new.c.