The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
Tokenisation code and constants. More...
#include <freeradius-devel/util/misc.h>
#include <freeradius-devel/util/strerror.h>
#include <freeradius-devel/util/token.h>
#include <ctype.h>
Go to the source code of this file.
Macros | |
#define | T(_x) [T_OP_ ## _x] = true |
#define | T(_x) [T_ ## _x] = true |
#define | T(_x) [T_## _x] = true |
#define | TOKEN_MATCH(bptr, tptr) |
Functions | |
ssize_t | fr_skip_string (char const *start, char const *end) |
Skip a quoted string. | |
char const * | fr_token_name (int token) |
fr_token_t | getop (char const **ptr) |
fr_token_t | getstring (char const **ptr, char *buf, int buflen, bool unescape) |
static fr_token_t | getthing (char const **ptr, char *buf, int buflen, bool tok, fr_table_num_ordered_t const *tokenlist, size_t tokenlist_len, bool unescape) |
fr_token_t | gettoken (char const **ptr, char *buf, int buflen, bool unescape) |
int | getword (char const **ptr, char *buf, int buflen, bool unescape) |
Variables | |
const bool | fr_assignment_op [T_TOKEN_LAST] |
const bool | fr_binary_op [T_TOKEN_LAST] |
const bool | fr_comparison_op [T_TOKEN_LAST] |
const bool | fr_list_assignment_op [T_TOKEN_LAST] |
const bool | fr_str_tok [T_TOKEN_LAST] |
const char | fr_token_quote [T_TOKEN_LAST] |
Convert tokens back to a quoting character. | |
fr_table_num_sorted_t const | fr_token_quotes_table [] |
size_t | fr_token_quotes_table_len = NUM_ELEMENTS(fr_token_quotes_table) |
char const * | fr_tokens [T_TOKEN_LAST] |
fr_table_num_ordered_t const | fr_tokens_table [] |
size_t | fr_tokens_table_len = NUM_ELEMENTS(fr_tokens_table) |
Tokenisation code and constants.
This is mostly for the attribute filter and user files.
Definition in file token.c.
#define TOKEN_MATCH | ( | bptr, | |
tptr | |||
) |
ssize_t fr_skip_string | ( | char const * | start, |
char const * | end | ||
) |
Skip a quoted string.
[in] | start | start of the string, pointing to the quotation character |
[in] | end | end of the string (or NULL for zero-terminated strings) |
Definition at line 525 of file token.c.
char const * fr_token_name | ( | int | token | ) |
fr_token_t getop | ( | char const ** | ptr | ) |
fr_token_t getstring | ( | char const ** | ptr, |
char * | buf, | ||
int | buflen, | ||
bool | unescape | ||
) |
|
static |
fr_token_t gettoken | ( | char const ** | ptr, |
char * | buf, | ||
int | buflen, | ||
bool | unescape | ||
) |
int getword | ( | char const ** | ptr, |
char * | buf, | ||
int | buflen, | ||
bool | unescape | ||
) |
const bool fr_assignment_op[T_TOKEN_LAST] |
const bool fr_binary_op[T_TOKEN_LAST] |
const bool fr_comparison_op[T_TOKEN_LAST] |
const bool fr_list_assignment_op[T_TOKEN_LAST] |
const bool fr_str_tok[T_TOKEN_LAST] |
const char fr_token_quote[T_TOKEN_LAST] |
Convert tokens back to a quoting character.
Non-string types convert to '?' to screw ups can be identified easily
fr_table_num_sorted_t const fr_token_quotes_table[] |
size_t fr_token_quotes_table_len = NUM_ELEMENTS(fr_token_quotes_table) |
char const* fr_tokens[T_TOKEN_LAST] |
fr_table_num_ordered_t const fr_tokens_table[] |
size_t fr_tokens_table_len = NUM_ELEMENTS(fr_tokens_table) |