The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Data Structures | Macros | Functions
section.h File Reference

Structures which identify sections. More...

#include <stdbool.h>
#include <freeradius-devel/server/cf_util.h>
+ Include dependency graph for section.h:

Go to the source code of this file.

Data Structures

struct  section_name_t
 Section name identifier. More...
 

Macros

#define SECTION_NAME(_name1, _name2)   &(section_name_t){ .name1 = _name1, .name2 = _name2 }
 Define a section name consisting of a verb and a noun. More...
 

Functions

static int section_name2_match (section_name_t const *a, section_name_t const *b)
 
int8_t section_name_cmp (void const *one, void const *two)
 Compare two sections. More...
 
static void section_name_dup (TALLOC_CTX *ctx, section_name_t *dst, section_name_t const *src)
 
static int section_name_match (section_name_t const *a, section_name_t const *b)
 
static char const * section_name_str (char const *name)
 Return a printable string for the section name. More...
 

Detailed Description

Structures which identify sections.

Id
7c8c1ae778cd16c3a88080d07a96f37d197ea5d1

Definition in file section.h.


Data Structure Documentation

◆ section_name_t

struct section_name_t

Section name identifier.

Definition at line 44 of file section.h.

Data Fields
char const * name1 First section name. Usually a verb like 'recv', 'send', etc...
char const * name2 Second section name. Usually a packet type like 'access-request', 'access-accept', etc...

Macro Definition Documentation

◆ SECTION_NAME

#define SECTION_NAME (   _name1,
  _name2 
)    &(section_name_t){ .name1 = _name1, .name2 = _name2 }

Define a section name consisting of a verb and a noun.

Parameters
[in]_name1verb name.
[in]_name2noun name.

Definition at line 40 of file section.h.

Function Documentation

◆ section_name2_match()

static int section_name2_match ( section_name_t const *  a,
section_name_t const *  b 
)
inlinestatic

Definition at line 60 of file section.h.

+ Here is the caller graph for this function:

◆ section_name_cmp()

int8_t section_name_cmp ( void const *  one,
void const *  two 
)

Compare two sections.

  • Sections are sorted by name1, then name2.
  • NULLs sort before non-NULLs.
  • CF_IDENT_ANY sort after non-CF_IDENT_ANY.
  • Any other comparisons are lexicographic.
Parameters
[in]oneFirst section name.
[in]twoSecond section name.
Returns
< 0 if one < two, 0 if one == two, > 0 if one > two.

Definition at line 48 of file section.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ section_name_dup()

static void section_name_dup ( TALLOC_CTX *  ctx,
section_name_t dst,
section_name_t const *  src 
)
inlinestatic

Definition at line 105 of file section.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ section_name_match()

static int section_name_match ( section_name_t const *  a,
section_name_t const *  b 
)
inlinestatic

Definition at line 84 of file section.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ section_name_str()

static char const* section_name_str ( char const *  name)
inlinestatic

Return a printable string for the section name.

Parameters
[in]nameSection name.

Definition at line 98 of file section.h.

+ Here is the caller graph for this function: