The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Functions
dcursor.c File Reference

Functions to iterate over a sets and subsets of items in dlists. More...

#include <string.h>
#include <stdint.h>
#include <freeradius-devel/util/dcursor.h>
#include <freeradius-devel/util/pair.h>
+ Include dependency graph for dcursor.c:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void * fr_dcursor_intersect_head (fr_dcursor_t *a, fr_dcursor_t *b)
 Return the first item matching the iterator in cursor a and cursor b. More...
 
void * fr_dcursor_intersect_next (fr_dcursor_t *a, fr_dcursor_t *b)
 Return the next item matching the iterator in cursor a and cursor b. More...
 

Detailed Description

Functions to iterate over a sets and subsets of items in dlists.

Note
Do not modify collections of items pointed to by a cursor with non fr_dcursor_* functions over the lifetime of that cursor.
Author
Arran Cudbard-Bell (a.cud.nosp@m.bard.nosp@m.b@fre.nosp@m.erad.nosp@m.ius.o.nosp@m.rg)

Definition in file dcursor.c.

Function Documentation

◆ fr_dcursor_intersect_head()

void* fr_dcursor_intersect_head ( fr_dcursor_t a,
fr_dcursor_t b 
)

Return the first item matching the iterator in cursor a and cursor b.

If a and b are not currently set to the same item, b will be reset, and wound to the item before a's current item.

Note
Both cursors must operate on the same list of items.
Parameters
[in]aFirst cursor.
[in]bSecond cursor.
Returns
item at the start of the list.

Definition at line 47 of file dcursor.c.

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

◆ fr_dcursor_intersect_next()

void* fr_dcursor_intersect_next ( fr_dcursor_t a,
fr_dcursor_t b 
)

Return the next item matching the iterator in cursor a and cursor b.

If a and b are not currently set to the same item, b will be reset, and wound to the item before a's current item.

The purpose of this function is to return items that match both iterators.

Note
Both cursors must operate on the same list of items.
Parameters
[in]aFirst cursor.
[in]bSecond cursor.
Returns
next item in the list.

Definition at line 76 of file dcursor.c.

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