All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions
parser.h File Reference

Condition parser API. More...

Go to the source code of this file.

Data Structures

struct  fr_cond_t
 
union  fr_cond_t.data
 

Macros

#define FR_COND_ONE_PASS   (0)
 
#define FR_COND_TWO_PASS   (1)
 

Typedefs

typedef struct fr_cond_t fr_cond_t
 

Enumerations

enum  fr_cond_op_t {
  COND_NONE = 0,
  COND_AND = '&',
  COND_OR = '|'
}
 
enum  fr_cond_pass2_t {
  PASS2_FIXUP_NONE = 0,
  PASS2_FIXUP_ATTR,
  PASS2_FIXUP_TYPE,
  PASS2_PAIRCOMPARE
}
 
enum  fr_cond_type_t {
  COND_TYPE_INVALID = 0,
  COND_TYPE_TRUE,
  COND_TYPE_FALSE,
  COND_TYPE_EXISTS,
  COND_TYPE_MAP,
  COND_TYPE_CHILD
}
 

Functions

size_t fr_cond_snprint (char *buffer, size_t bufsize, fr_cond_t const *c)
 
ssize_t fr_condition_tokenize (TALLOC_CTX *ctx, CONF_ITEM *ci, char const *start, fr_cond_t **head, char const **error, int flag)
 Tokenize a conditional check. More...
 
bool fr_condition_walk (fr_cond_t *head, bool(*callback)(void *, fr_cond_t *), void *ctx)
 

Detailed Description

Condition parser API.

Id:
31fd2179c98ac8be584306ee87ff030bdf52fe58

Definition in file parser.h.


Data Structure Documentation

struct fr_cond_t

Definition at line 70 of file parser.h.

+ Collaboration diagram for fr_cond_t:
Data Fields
fr_dict_attr_t const * cast
CONF_ITEM const * ci
union fr_cond_t data
bool negate
fr_cond_t * next
fr_cond_op_t next_op
fr_cond_pass2_t pass2_fixup
fr_cond_type_t type
union fr_cond_t.data

Definition at line 74 of file parser.h.

Data Fields
fr_cond_t * child
vp_map_t * map
vp_tmpl_t * vpt

Macro Definition Documentation

#define FR_COND_ONE_PASS   (0)

Definition at line 96 of file parser.h.

#define FR_COND_TWO_PASS   (1)

Definition at line 97 of file parser.h.

Typedef Documentation

typedef struct fr_cond_t fr_cond_t

Definition at line 36 of file parser.h.

Enumeration Type Documentation

Enumerator
COND_NONE 
COND_AND 
COND_OR 

Definition at line 39 of file parser.h.

Enumerator
PASS2_FIXUP_NONE 
PASS2_FIXUP_ATTR 
PASS2_FIXUP_TYPE 
PASS2_PAIRCOMPARE 

Definition at line 54 of file parser.h.

Enumerator
COND_TYPE_INVALID 
COND_TYPE_TRUE 
COND_TYPE_FALSE 
COND_TYPE_EXISTS 
COND_TYPE_MAP 
COND_TYPE_CHILD 

Definition at line 45 of file parser.h.

Function Documentation

size_t fr_cond_snprint ( char *  buffer,
size_t  bufsize,
fr_cond_t const *  c 
)

Definition at line 50 of file parser.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ssize_t fr_condition_tokenize ( TALLOC_CTX *  ctx,
CONF_ITEM ci,
char const *  start,
fr_cond_t **  head,
char const **  error,
int  flags 
)

Tokenize a conditional check.

Parameters
[in]ctxfor talloc
[in]cifor CONF_ITEM
[in]startthe start of the string to process. Should be "(..."
[out]headthe parsed condition structure
[out]errorthe parse error (if any)
[in]flagsdo one/two pass
Returns
  • Length of the string skipped.
  • < 0 (the offset to the offending error) on error.

Definition at line 1711 of file parser.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool fr_condition_walk ( fr_cond_t head,
bool(*)(void *, fr_cond_t *)  callback,
void *  ctx 
)

Definition at line 1720 of file parser.c.

+ Here is the caller graph for this function: