23 RCSID(
"$Id: c27814f8f3fdb18f3d49e45fbb2261e79595ca6a $")
25 #include <freeradius-devel/util/sbuff.h>
26 #include <freeradius-devel/util/table.h>
27 #include <freeradius-devel/util/value.h>
71 fr_value_box_entry_t entry = uri_vb->entry;
77 uri_vb->entry = entry;
93 if (uri_vb->vb_length == 0)
return 0;
106 if (adv == 0)
continue;
170 char scheme_buff[20];
fr_dcursor_eval_t void const * uctx
@ FR_TYPE_STRING
String of printable characters.
ssize_t fr_sbuff_in_bstrncpy(fr_sbuff_t *sbuff, char const *str, size_t len)
Copy bytes into the sbuff up to the first \0.
size_t fr_sbuff_adv_until(fr_sbuff_t *sbuff, size_t len, fr_sbuff_term_t const *tt, char escape_chr)
Wind position until we hit a character in the terminal set.
#define fr_sbuff_start(_sbuff_or_marker)
#define fr_sbuff_char(_sbuff_or_marker, _eob)
#define fr_sbuff_advance(_sbuff_or_marker, _len)
#define fr_sbuff_init_in(_out, _start, _len_or_end)
#define fr_sbuff_remaining(_sbuff_or_marker)
#define FR_SBUFF_OUT(_start, _len_or_end)
#define fr_sbuff_used(_sbuff_or_marker)
An element in a lexicographically sorted array of name to num mappings.
int fr_uri_escape_list(fr_value_box_list_t *uri, fr_uri_part_t const *uri_parts, void *uctx)
Parse a list of value boxes representing a URI.
return fr_table_value_by_longest_prefix(NULL, schemes, fr_sbuff_start(&sbuff), fr_sbuff_used(&sbuff), def)
int fr_uri_escape(fr_value_box_t *uri_vb, void *uctx)
Escapes an individual value box that's part of a URI, advancing the pointer to uri_parts.
int fr_uri_has_scheme(fr_value_box_list_t *uri, fr_table_num_sorted_t const *schemes, size_t schemes_len, int def)
Searches for a matching scheme in the table of schemes, using a list of value boxes representing the ...
fr_sbuff_term_t const * terminals
Characters that mark the end of this part.
size_t extra_skip
How many additional characters to skip after the terminal.
fr_uri_part_t const * uri_part
Start of the uri parts array.
fr_uri_escape_func_t func
Function to use to escape tainted values.
fr_value_box_safe_for_t safe_for
What type of value is safe for this part.
char const * name
Name of this part of the URI.
void * uctx
to pass to fr_uri_escape_func_t.
uint8_t const part_adv[UINT8_MAX+1]
How many parts to advance for a specific terminal.
uctx to pass to fr_uri_escape
Definition for a single part of a URI.
void fr_strerror_clear(void)
Clears all pending messages from the talloc pools.
#define fr_strerror_printf_push(_fmt,...)
Add a message to an existing stack of messages at the tail.
int fr_value_box_cast(TALLOC_CTX *ctx, fr_value_box_t *dst, fr_type_t dst_type, fr_dict_attr_t const *dst_enumv, fr_value_box_t const *src)
Convert one type of fr_value_box_t to another.
int fr_value_box_cast_in_place(TALLOC_CTX *ctx, fr_value_box_t *vb, fr_type_t dst_type, fr_dict_attr_t const *dst_enumv)
Convert one type of fr_value_box_t to another in place.
void fr_value_box_clear_value(fr_value_box_t *data)
Clear/free any existing value.
#define fr_value_box_list_foreach_safe(_list_head, _iter)
#define fr_value_box_mark_safe_for(_box, _safe_for)
#define fr_value_box_is_safe_for(_box, _safe_for)