The FreeRADIUS server
$Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
Functions for dealing with URIs. More...
#include <freeradius-devel/util/sbuff.h>
#include <freeradius-devel/util/table.h>
#include <freeradius-devel/util/value.h>
#include "uri.h"
Go to the source code of this file.
Functions | |
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. More... | |
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. More... | |
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 URI. More... | |
Variables | |
return | |
Functions for dealing with URIs.
Definition in file uri.c.
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.
[in,out] | uri_vb | to escape |
[in] | uctx | A fr_uri_escape_ctx_t containing the initial fr_uri_part_t and the uctx to pass to the escaping function. |
Definition at line 45 of file uri.c.
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.
Reads a URI from a list of value boxes and parses it according to the definition in uri_parts. Tainted values, where allowed, are escaped using the function specified for the uri part.
uri | to parse. A list of string type value boxes containing fragments of a URI. |
uri_parts | definition of URI structure. Should point to the start of the array of uri parts. |
uctx | to pass to escaping function |
Definition at line 141 of file uri.c.
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 URI.
uri | to parse. A list of string type value boxes containing fragments of a URI. |
schemes | Table of schemes to search. |
schemes_len | Number of schemes in the table. |
def | Default scheme to use if none is found. |
Definition at line 168 of file uri.c.