Parser :: Route & Record-Route header field parser.
More...
#include <string.h>
#include "parse_rr.h"
#include "../mem/mem.h"
#include "../mem/shm_mem.h"
#include "../dprint.h"
#include "../trim.h"
#include "../ut.h"
Go to the source code of this file.
Functions
-
static int do_duplicate_rr (rr_t **_new, rr_t *_r, int _shm)
- Duplicate a single rr_t structure using pkg_malloc or shm_malloc.
-
static void do_free_rr (rr_t **_r, int _shm)
- Free list of rrs _r is head of the list.
- static int do_parse_rr_body (char *buf, int len, rr_t **head)
- History: -------- 2003-10-07 parse_rr() split and added parse_rr_body() 2003-10-21 duplicate_rr() duplicate the whole linked list of RR.
-
int duplicate_rr (rr_t **_new, rr_t *_r)
- Duplicate a single rr_t structure using pkg_malloc.
-
void free_rr (rr_t **_r)
- Free list of rrs _r is head of the list.
- int get_path_dst_uri (str *_p, str *_dst)
- Path must be available.
-
int parse_rr (struct hdr_field *_h)
- Parse Route and Record-Route header fields.
-
int parse_rr_body (char *buf, int len, rr_t **head)
- Wrapper to do_parse_rr_body() for external calls.
-
void print_rr (FILE *_o, rr_t *_r)
- Print list of RRs, just for debugging.
-
int print_rr_body (struct hdr_field *iroute, str *oroute, int order, unsigned int *nb_recs)
- get first RR header and print comma separated bodies in oroute
- order = 0 normal; order = 1 reverse
- nb_recs - input=skip number of rr; output=number of printed rrs
-
int shm_duplicate_rr (rr_t **_new, rr_t *_r)
- Duplicate a single rr_t structure using pkg_malloc.
-
void shm_free_rr (rr_t **_r)
- Free list of rrs _r is head of the list.
-
static void xlate_pointers (rr_t *_orig, rr_t *_r)
- Translate all pointers in the structure and also in all parameters in the list.
Detailed Description
Definition in file parse_rr.c.
Function Documentation
| static int do_parse_rr_body |
( |
char * |
buf, |
|
|
int |
len, |
|
|
rr_t ** |
head | |
|
) |
| | [inline, static] |
Parse Route or Record-Route body
Definition at line 53 of file parse_rr.c.
References CLASS_ANY, free_rr(), param::len, name_addr::len, rr::len, _str::len, param::name, name_addr::name, rr::nameaddr, rr::next, rr::params, parse_nameaddr(), parse_params(), and _str::s.
Referenced by parse_rr(), and parse_rr_body().
| int get_path_dst_uri |
( |
str * |
_p, |
|
|
str * |
_dst | |
|
) |
| | |