SIP-router core ::Module: SIP-router core.
More...
#include <assert.h>
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "sr_module.h"
#include "dprint.h"
#include "str.h"
#include "ut.h"
#include "mem/shm_mem.h"
#include "mem/mem.h"
#include "usr_avp.h"
Go to the source code of this file.
Functions
Detailed Description
Definition in file usr_avp.c.
Function Documentation
| int parse_avp_ident |
( |
str * |
name, |
|
|
avp_ident_t * |
attr | |
|
) |
| | |
Parses the following avp indentifier forms:
- "i:<number>" - old form, deprecated (e.g. i:42)
- "s:<string>" - old form, deprecated (e.g. s:foo)
- "<track>.<name>" (e.g.: f.bar)
- "<track>.<name>[<index>]" (e.g.: f.bar[1])
- "<track><class>.<name>" (e.g: tu.bar)
- "<track><class>.<name>[<index>]" (e.g: fd.bar[2])
- "<string>" (e.g.: foo) Where: <string> = ascii string <id> = ascii string w/o '[', ']', '.' and '/' <name> = <id> | '/' regex '/' (Note: regex use is deprecated) <track> = 'f' | 't' (from or to) <class> = 'r' | 'u' | 'd' | 'g' (uri, user, domain or global) <index> = <number> | '-' <number> | '' (the avp index, if missing it means AVP_INDEX_ALL, but it's use is deprecated) More examples: "fr.bar[1]" - from track, uri class, avp "bar", the value 1. "tu./^foo/" - to track, user class, all avps for which the name starts with foo (note RE in avp names are deprecated). "t.did" - to track, "did" avp
- Parameters:
-
| name | - avp identifier |
| *attr | - the result will be stored here |
- Returns:
- 0 on success, -1 on error
Definition at line 882 of file usr_avp.c.
References _str::len, and _str::s.
Referenced by fix_param().