SIP-router core :: PV API specificationModule: SIP-router core.
More...
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include "mem/mem.h"
#include "mem/shm_mem.h"
#include "ut.h"
#include "dprint.h"
#include "hashes.h"
#include "route.h"
#include "pvapi.h"
#include "pvar.h"
Go to the source code of this file.
Defines
Functions
- static int is_pv_valid_char (char c)
- Check if a char is valid according to the PV syntax.
- void pv_destroy_api (void)
- destroy pv api.
- int pv_get_avp_name (struct sip_msg *msg, pv_param_p ip, int_str *avp_name, unsigned short *name_type)
- fill avp name details (id and type)
-
int pv_get_intstrval (struct sip_msg *msg, pv_param_t *param, pv_value_t *res, int ival, str *sval)
- convert int-str to pv_value_t (type is int)
-
int pv_get_null (struct sip_msg *msg, pv_param_t *param, pv_value_t *res)
- PV helper functions.
-
int pv_get_sintval (struct sip_msg *msg, pv_param_t *param, pv_value_t *res, int sival)
- convert signed int to pv_value_t
-
int pv_get_strintval (struct sip_msg *msg, pv_param_t *param, pv_value_t *res, str *sval, int ival)
- convert str-int to pv_value_t (type is str)
-
int pv_get_strval (struct sip_msg *msg, pv_param_t *param, pv_value_t *res, str *sval)
- convert str to pv_value_t
-
int pv_get_uintval (struct sip_msg *msg, pv_param_t *param, pv_value_t *res, unsigned int uival)
- convert unsigned int to pv_value_t
- int pv_init_api (void)
- init pv api (optional).
- int pv_parse_avp_name (pv_spec_p sp, str *in)
- parse AVP name
-
void pv_spec_destroy (pv_spec_t *spec)
- destroy the content of pv_spec_t structure.
-
void pv_spec_free (pv_spec_t *spec)
- free the pv_spec_t structure.
- void tr_destroy (trans_t *t)
- Destroy transformation including eventual parameter.
- int tr_exec (struct sip_msg *msg, trans_t *t, pv_value_t *v)
- Exec transformation on a pseudo-variable value.
- void tr_free (trans_t *t)
- Free allocated memory of transformation list.
- void tr_param_free (tr_param_t *tp)
- Free transformation parameter list.
Variables
Detailed Description
Definition in file pvapi.c.
Function Documentation
| static int is_pv_valid_char |
( |
char |
c |
) |
[static] |
- Parameters:
-
- Returns:
- 1 if char is valid, 0 if not valid
Definition at line 96 of file pvapi.c.
| void pv_destroy_api |
( |
void |
|
) |
|
| int pv_get_avp_name |
( |
struct sip_msg * |
msg, |
|
|
pv_param_p |
ip, |
|
|
int_str * |
avp_name, |
|
|
unsigned short * |
name_type | |
|
) |
| | |
- Returns:
- 0 on success, -1 on error
Definition at line 1776 of file pvapi.c.
| int pv_parse_avp_name |
( |
pv_spec_p |
sp, |
|
|
str * |
in | |
|
) |
| | |
| void tr_destroy |
( |
trans_t * |
t |
) |
|
| int tr_exec |
( |
struct sip_msg * |
msg, |
|
|
trans_t * |
t, |
|
|
pv_value_t * |
v | |
|
) |
| | |
- Parameters:
-
| msg | SIP message |
| t | one or more transformations |
| v | pseudo-variable value |
- Returns:
- 0 on success, -1 on error
Definition at line 1539 of file pvapi.c.
| void tr_free |
( |
trans_t * |
t |
) |
|
| void tr_param_free |
( |
tr_param_t * |
tp |
) |
|