22#define DEBUG_BUFFER_SIZE 4096
32extern void dbg_print(
const int* which,
int how, FILE* where,
33 const char* fmt, ... ) G_GNUC_PRINTF(4, 5);
39#define SCS_HUGE_SIZE 65535
48extern char* scs_subscribe(
SCS_collection* collection,
const char* s);
66extern char* scs_subscribe_printf(
SCS_collection* collection,
char* fmt, ...)
72#define AVP_OP_EQUAL '='
73#define AVP_OP_NOTEQUAL '!'
74#define AVP_OP_STARTS '^'
75#define AVP_OP_ENDS '$'
76#define AVP_OP_CONTAINS '~'
77#define AVP_OP_LOWER '<'
78#define AVP_OP_HIGHER '>'
79#define AVP_OP_EXISTS '?'
80#define AVP_OP_ONEOFF '|'
81#define AVP_OP_TRANSF '&'
120typedef enum _avpl_match_mode {
131typedef enum _avpl_replace_mode {
194extern void avp_init(
void);
198extern void setup_avp_debug(FILE* fp,
int* general,
int* avp,
int* avp_op,
int* avpl,
int* avpl_op);
215extern AVP* new_avp(
const char* name,
const char* value,
char op);
225extern AVP* avp_copy(
AVP* from);
236extern AVP* new_avp_from_finfo(
const char* name,
field_info* finfo);
243extern void delete_avp(
AVP* avp);
254#define avp_to_str(avp) (ws_strdup_printf("%s%c%s",avp->n,avp->o,avp->v))
278extern AVPL* new_avpl(
const char* name);
289extern AVPL* new_avpl_from_avpl(
const char* name,
AVPL* avpl,
bool copy_avps);
302extern AVPL* new_avpl_loose_match(
const char* name,
AVPL* src,
AVPL* op,
bool copy_avps);
317extern AVPL* new_avpl_pairs_match(
const char* name,
AVPL* src,
AVPL* op,
bool strict,
bool copy_avps);
333extern AVPL* new_avpl_from_match(avpl_match_mode mode,
const char* name,
AVPL* src,
AVPL* op,
bool copy_avps);
347extern bool insert_avp(
AVPL* avpl,
AVP* avp);
355extern void rename_avpl(
AVPL* avpl,
char* name);
367extern void merge_avpl(
AVPL* dest,
AVPL* src,
bool copy);
380extern AVP* get_avp_by_name(
AVPL* avpl,
char* name,
void** cookie);
391extern AVP* get_next_avp(
AVPL* avpl,
void** cookie);
399extern AVP* extract_first_avp(
AVPL* avpl);
407extern AVP* extract_last_avp(
AVPL* avpl);
419extern AVP* extract_avp_by_name(
AVPL* avpl,
char* name);
429extern char* avpl_to_str(
AVPL* avpl);
439extern char* avpl_to_dotstr(
AVPL* avpl);
449extern void delete_avpl(
AVPL* avpl,
bool avps_too);
482extern LoAL* new_loal(
const char* name);
493extern LoAL* loal_from_file(
char* filename);
501extern void loal_append(
LoAL* loal,
AVPL* avpl);
509extern AVPL* extract_first_avpl(
LoAL* loal);
517extern AVPL* extract_last_avpl(
LoAL* loal);
528extern AVPL* get_next_avpl(
LoAL* loal,
void** cookie);
537extern void delete_loal(
LoAL* loal,
bool avpls_too,
bool avps_too);
Sorted, named list of AVPs (Attribute-Value Pair List).
Definition mate_util.h:110
AVPN null
Definition mate_util.h:113
char * name
Definition mate_util.h:111
uint32_t len
Definition mate_util.h:112
Doubly-linked list node wrapping a single AVP.
Definition mate_util.h:97
AVP * avp
Definition mate_util.h:98
struct _avp_node * next
Definition mate_util.h:99
struct _avp_node * prev
Definition mate_util.h:100
Attribute-Value Pair (AVP): a named value with an associated match operator.
Definition mate_util.h:87
char * n
Definition mate_util.h:88
char o
Definition mate_util.h:90
char * v
Definition mate_util.h:89
AVPL transformation rule: a named match/replace operation applied to AVP lists.
Definition mate_util.h:149
avpl_match_mode match_mode
Definition mate_util.h:155
AVPL_Transf * next
Definition mate_util.h:159
AVPL * replace
Definition mate_util.h:153
AVPL * match
Definition mate_util.h:152
char * name
Definition mate_util.h:150
avpl_replace_mode replace_mode
Definition mate_util.h:156
GHashTable * map
Definition mate_util.h:158
Doubly-linked list node wrapping a single AVPL, used in a LoAL.
Definition mate_util.h:166
struct _loal_node * prev
Definition mate_util.h:169
AVPL * avpl
Definition mate_util.h:167
struct _loal_node * next
Definition mate_util.h:168
List of AVP Lists (LoAL): a named, doubly-linked collection of AVPLs.
Definition mate_util.h:179
LoALnode null
Definition mate_util.h:182
unsigned len
Definition mate_util.h:181
char * name
Definition mate_util.h:180
Definition mate_util.c:71