The FreeRADIUS server
$Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
Functions to allocate different types of xlat nodes. More...
#include <freeradius-devel/server/base.h>
#include <freeradius-devel/unlang/xlat.h>
#include <freeradius-devel/util/debug.h>
#include <freeradius-devel/util/types.h>
#include <freeradius-devel/unlang/xlat_priv.h>
Go to the source code of this file.
Macros | |
#define | _XLAT_PRIVATE |
Functions | |
int | _xlat_copy (NDEBUG_LOCATION_ARGS TALLOC_CTX *ctx, xlat_exp_head_t *out, xlat_exp_head_t const *in) |
static int | _xlat_copy_internal (NDEBUG_LOCATION_ARGS TALLOC_CTX *ctx, xlat_exp_head_t *out, xlat_exp_head_t const *in) |
Copy all nodes in the input list to the output list. More... | |
xlat_exp_t * | _xlat_exp_alloc (NDEBUG_LOCATION_ARGS TALLOC_CTX *ctx, xlat_type_t type, char const *in, size_t inlen) |
Allocate an xlat node. More... | |
xlat_exp_t * | _xlat_exp_alloc_null (NDEBUG_LOCATION_ARGS TALLOC_CTX *ctx) |
Allocate an xlat node with no name, and no type set. More... | |
xlat_exp_head_t * | _xlat_exp_head_alloc (NDEBUG_LOCATION_ARGS TALLOC_CTX *ctx) |
void | _xlat_exp_set_type (NDEBUG_LOCATION_ARGS xlat_exp_t *node, xlat_type_t type) |
Set the type of an xlat node. More... | |
static xlat_exp_t * | xlat_exp_alloc_pool (NDEBUG_LOCATION_ARGS TALLOC_CTX *ctx, unsigned int extra_hdrs, size_t extra) |
void | xlat_exp_set_name (xlat_exp_t *node, char const *fmt, size_t len) |
Set the format string for an xlat node. More... | |
void | xlat_exp_set_name_buffer (xlat_exp_t *node, char const *fmt) |
Set the format string for an xlat node, copying from a talloc'd buffer. More... | |
void | xlat_exp_set_name_buffer_shallow (xlat_exp_t *node, char const *fmt) |
Set the format string for an xlat node from a pre-existing buffer. More... | |
Functions to allocate different types of xlat nodes.
Definition in file xlat_alloc.c.
#define _XLAT_PRIVATE |
Definition at line 32 of file xlat_alloc.c.
int _xlat_copy | ( | NDEBUG_LOCATION_ARGS TALLOC_CTX * | ctx, |
xlat_exp_head_t * | out, | ||
xlat_exp_head_t const * | in | ||
) |
|
static |
Copy all nodes in the input list to the output list.
[in] | ctx | to allocate new nodes in. |
[out] | out | Where to write new nodes. |
[in] | in | Input nodes. |
Definition at line 228 of file xlat_alloc.c.
xlat_exp_t* _xlat_exp_alloc | ( | NDEBUG_LOCATION_ARGS TALLOC_CTX * | ctx, |
xlat_type_t | type, | ||
char const * | in, | ||
size_t | inlen | ||
) |
Allocate an xlat node.
[in] | ctx | to allocate node in. |
[in] | type | of the node. |
[in] | in | original input string. |
[in] | inlen | the length of the original input string. |
Definition at line 138 of file xlat_alloc.c.
xlat_exp_t* _xlat_exp_alloc_null | ( | NDEBUG_LOCATION_ARGS TALLOC_CTX * | ctx | ) |
Allocate an xlat node with no name, and no type set.
[in] | ctx | to allocate node in. |
Definition at line 125 of file xlat_alloc.c.
xlat_exp_head_t* _xlat_exp_head_alloc | ( | NDEBUG_LOCATION_ARGS TALLOC_CTX * | ctx | ) |
Definition at line 35 of file xlat_alloc.c.
void _xlat_exp_set_type | ( | NDEBUG_LOCATION_ARGS xlat_exp_t * | node, |
xlat_type_t | type | ||
) |
Set the type of an xlat node.
Also initialises any xlat_exp_head necessary
[in] | node | to set type for. |
[in] | type | to set. |
Definition at line 58 of file xlat_alloc.c.
|
static |
Definition at line 105 of file xlat_alloc.c.
void xlat_exp_set_name | ( | xlat_exp_t * | node, |
char const * | fmt, | ||
size_t | len | ||
) |
Set the format string for an xlat node.
[in] | node | to set fmt for. |
[in] | fmt | talloced buffer to set as the fmt string. |
[in] | len | of fmt string. |
Definition at line 191 of file xlat_alloc.c.
void xlat_exp_set_name_buffer | ( | xlat_exp_t * | node, |
char const * | fmt | ||
) |
Set the format string for an xlat node, copying from a talloc'd buffer.
[in] | node | to set fmt for. |
[in] | fmt | talloced buffer to set as the fmt string. |
Definition at line 202 of file xlat_alloc.c.
void xlat_exp_set_name_buffer_shallow | ( | xlat_exp_t * | node, |
char const * | fmt | ||
) |
Set the format string for an xlat node from a pre-existing buffer.
[in] | node | to set fmt for. |
[in] | fmt | talloced buffer to set as the fmt string. |
Definition at line 213 of file xlat_alloc.c.