Browse code

core: xavp - helper function to shift xavps to left with rotation

Daniel-Constantin Mierla authored on 10/05/2022 17:35:02
Showing 1 changed files
... ...
@@ -98,6 +98,7 @@ struct str_list *xavp_get_list_key_names(sr_xavp_t *xavp);
98 98
 
99 99
 int xavp_insert(sr_xavp_t *xavp, int idx, sr_xavp_t **list);
100 100
 sr_xavp_t *xavp_extract(str *name, sr_xavp_t **list);
101
+int xavp_lshift(str *name, sr_xavp_t **head, int idx);
101 102
 
102 103
 void xavp_print_list(sr_xavp_t **head);
103 104
 
Browse code

core: $xavu() helper functions to get child values

- like for xavp and xavi

Daniel-Constantin Mierla authored on 01/04/2021 05:56:30
Showing 1 changed files
... ...
@@ -131,6 +131,10 @@ sr_xavp_t *xavu_set_sval(str *rname, str *sval);
131 131
 sr_xavp_t *xavu_set_child_xval(str *rname, str *cname, sr_xval_t *xval);
132 132
 sr_xavp_t *xavu_set_child_ival(str *rname, str *cname, int ival);
133 133
 sr_xavp_t *xavu_set_child_sval(str *rname, str *cname, str *sval);
134
+sr_xavp_t* xavu_get_child(str *rname, str *cname);
135
+sr_xavp_t* xavu_get_child_with_ival(str *rname, str *cname);
136
+sr_xavp_t* xavu_get_child_with_sval(str *rname, str *cname);
137
+
134 138
 int xavu_serialize_fields(str *rname, char *obuf, int olen);
135 139
 
136 140
 /** xavi api */
Browse code

core: added xavu_serialize_fields function (#2603)

* core: added xavu_serialize_fields function

Also added a function called by the three "*_serialize_fields" to reduce code duplication.

The interface is not modified.

* Revert refactoring

We can add xavu_serialize_fields, but do not change the other functions.

Nicolas C authored on 18/01/2021 16:36:12 • GitHub committed on 18/01/2021 16:36:12
Showing 1 changed files
... ...
@@ -131,6 +131,7 @@ sr_xavp_t *xavu_set_sval(str *rname, str *sval);
131 131
 sr_xavp_t *xavu_set_child_xval(str *rname, str *cname, sr_xval_t *xval);
132 132
 sr_xavp_t *xavu_set_child_ival(str *rname, str *cname, int ival);
133 133
 sr_xavp_t *xavu_set_child_sval(str *rname, str *cname, str *sval);
134
+int xavu_serialize_fields(str *rname, char *obuf, int olen);
134 135
 
135 136
 /** xavi api */
136 137
 int xavi_init_head(void);
Browse code

core: xavi api - like xavp but with insensitive case names

$xavi(WhatEver=>FOo) == $xavi(whatever=>foO)

Victor Seva authored on 26/05/2020 09:24:53
Showing 1 changed files
... ...
@@ -132,4 +132,47 @@ sr_xavp_t *xavu_set_child_xval(str *rname, str *cname, sr_xval_t *xval);
132 132
 sr_xavp_t *xavu_set_child_ival(str *rname, str *cname, int ival);
133 133
 sr_xavp_t *xavu_set_child_sval(str *rname, str *cname, str *sval);
134 134
 
135
+/** xavi api */
136
+int xavi_init_head(void);
137
+#define xavi_free xavp_free
138
+
139
+int xavi_add(sr_xavp_t *xavp, sr_xavp_t **list);
140
+int xavi_add_last(sr_xavp_t *xavp, sr_xavp_t **list);
141
+int xavi_add_after(sr_xavp_t *nxavp, sr_xavp_t *pxavp);
142
+sr_xavp_t *xavi_add_value(str *name, sr_xval_t *val, sr_xavp_t **list);
143
+sr_xavp_t *xavi_add_value_after(str *name, sr_xval_t *val, sr_xavp_t *pxavp);
144
+sr_xavp_t *xavi_add_xavi_value(str *rname, str *name, sr_xval_t *val, sr_xavp_t **list);
145
+sr_xavp_t *xavi_set_value(str *name, int idx, sr_xval_t *val, sr_xavp_t **list);
146
+sr_xavp_t *xavi_get(str *name, sr_xavp_t *start);
147
+sr_xavp_t *xavi_get_by_index(str *name, int idx, sr_xavp_t **start);
148
+sr_xavp_t *xavi_get_next(sr_xavp_t *start);
149
+sr_xavp_t *xavi_get_last(str *xname, sr_xavp_t **list);
150
+int xavi_rm_by_name(str *name, int all, sr_xavp_t **head);
151
+int xavi_rm_by_index(str *name, int idx, sr_xavp_t **head);
152
+int xavi_rm(sr_xavp_t *xa, sr_xavp_t **head);
153
+int xavi_rm_child_by_index(str *rname, str *cname, int idx);
154
+int xavi_count(str *name, sr_xavp_t **start);
155
+#define xavi_destroy_list_unsafe xavp_destroy_list_unsafe
156
+#define xavi_destroy_list xavp_destroy_list
157
+void xavi_reset_list(void);
158
+sr_xavp_t **xavi_set_list(sr_xavp_t **head);
159
+sr_xavp_t **xavi_get_crt_list(void);
160
+struct str_list *xavi_get_list_key_names(sr_xavp_t *xavp);
161
+
162
+int xavi_insert(sr_xavp_t *xavp, int idx, sr_xavp_t **list);
163
+sr_xavp_t *xavi_extract(str *name, sr_xavp_t **list);
164
+
165
+void xavi_print_list(sr_xavp_t **head);
166
+
167
+sr_xavp_t *xavi_clone_level_nodata(sr_xavp_t *xold);
168
+sr_xavp_t *xavi_clone_level_nodata_with_new_name(sr_xavp_t *xold, str *dst_name);
169
+
170
+sr_xavp_t* xavi_get_child(str *rname, str *cname);
171
+sr_xavp_t* xavi_get_child_with_ival(str *rname, str *cname);
172
+sr_xavp_t* xavi_get_child_with_sval(str *rname, str *cname);
173
+int xavi_serialize_fields(str *rname, char *obuf, int olen);
174
+
175
+int xavi_set_child_ival(str *rname, str *cname, int ival);
176
+int xavi_set_child_sval(str *rname, str *cname, str *sval);
177
+
135 178
 #endif
Browse code

core: function to remove an xavu child value

Daniel-Constantin Mierla authored on 02/04/2020 09:26:52
Showing 1 changed files
... ...
@@ -124,6 +124,7 @@ sr_xavp_t *xavu_get(str *name, sr_xavp_t *start);
124 124
 sr_xavp_t *xavu_lookup(str *name, sr_xavp_t **start);
125 125
 int xavu_rm(sr_xavp_t *xa, sr_xavp_t **head);
126 126
 int xavu_rm_by_name(str *name, sr_xavp_t **head);
127
+int xavu_rm_child_by_name(str *rname, str *cname);
127 128
 sr_xavp_t *xavu_set_xval(str *name, sr_xval_t *val, sr_xavp_t **list);
128 129
 sr_xavp_t *xavu_set_ival(str *rname, int ival);
129 130
 sr_xavp_t *xavu_set_sval(str *rname, str *sval);
Browse code

core: exposed xavu_print_list() function

Daniel-Constantin Mierla authored on 01/04/2020 11:43:55
Showing 1 changed files
... ...
@@ -114,6 +114,7 @@ int xavp_set_child_sval(str *rname, str *cname, str *sval);
114 114
 
115 115
 /** xavu api */
116 116
 void xavu_print_list_content(sr_xavp_t **head, int level);
117
+void xavu_print_list(sr_xavp_t **head);
117 118
 #define xavu_destroy_list_unsafe xavp_destroy_list_unsafe
118 119
 #define xavu_destroy_list xavp_destroy_list
119 120
 void xavu_reset_list(void);
Browse code

core: function to print xavus for debugging

Daniel-Constantin Mierla authored on 01/04/2020 11:36:24
Showing 1 changed files
... ...
@@ -113,6 +113,7 @@ int xavp_set_child_ival(str *rname, str *cname, int ival);
113 113
 int xavp_set_child_sval(str *rname, str *cname, str *sval);
114 114
 
115 115
 /** xavu api */
116
+void xavu_print_list_content(sr_xavp_t **head, int level);
116 117
 #define xavu_destroy_list_unsafe xavp_destroy_list_unsafe
117 118
 #define xavu_destroy_list xavp_destroy_list
118 119
 void xavu_reset_list(void);
Browse code

core: xavu api - like xavp but with single value items

- simplified version without indexes

Daniel-Constantin Mierla authored on 01/04/2020 08:39:24
Showing 1 changed files
... ...
@@ -112,4 +112,21 @@ int xavp_serialize_fields(str *rname, char *obuf, int olen);
112 112
 int xavp_set_child_ival(str *rname, str *cname, int ival);
113 113
 int xavp_set_child_sval(str *rname, str *cname, str *sval);
114 114
 
115
+/** xavu api */
116
+#define xavu_destroy_list_unsafe xavp_destroy_list_unsafe
117
+#define xavu_destroy_list xavp_destroy_list
118
+void xavu_reset_list(void);
119
+sr_xavp_t **xavu_set_list(sr_xavp_t **head);
120
+sr_xavp_t **xavu_get_crt_list(void);
121
+sr_xavp_t *xavu_get(str *name, sr_xavp_t *start);
122
+sr_xavp_t *xavu_lookup(str *name, sr_xavp_t **start);
123
+int xavu_rm(sr_xavp_t *xa, sr_xavp_t **head);
124
+int xavu_rm_by_name(str *name, sr_xavp_t **head);
125
+sr_xavp_t *xavu_set_xval(str *name, sr_xval_t *val, sr_xavp_t **list);
126
+sr_xavp_t *xavu_set_ival(str *rname, int ival);
127
+sr_xavp_t *xavu_set_sval(str *rname, str *sval);
128
+sr_xavp_t *xavu_set_child_xval(str *rname, str *cname, sr_xval_t *xval);
129
+sr_xavp_t *xavu_set_child_ival(str *rname, str *cname, int ival);
130
+sr_xavp_t *xavu_set_child_sval(str *rname, str *cname, str *sval);
131
+
115 132
 #endif
Browse code

core: adding xavp_clone_level_nodata_with_new_name

Julien Chavanton authored on 21/09/2019 04:57:46
Showing 1 changed files
... ...
@@ -102,6 +102,7 @@ sr_xavp_t *xavp_extract(str *name, sr_xavp_t **list);
102 102
 void xavp_print_list(sr_xavp_t **head);
103 103
 
104 104
 sr_xavp_t *xavp_clone_level_nodata(sr_xavp_t *xold);
105
+sr_xavp_t *xavp_clone_level_nodata_with_new_name(sr_xavp_t *xold, str *dst_name);
105 106
 
106 107
 sr_xavp_t* xavp_get_child(str *rname, str *cname);
107 108
 sr_xavp_t* xavp_get_child_with_ival(str *rname, str *cname);
Browse code

core: xavp - updated comments about vptr filed

Daniel-Constantin Mierla authored on 23/05/2019 08:01:14
Showing 1 changed files
... ...
@@ -57,7 +57,7 @@ typedef struct _sr_xval {
57 57
 		long l;
58 58
 		long long ll;
59 59
 		struct _sr_xavp *xavp; /* must be given in shm (not cloned) */
60
-		void *vptr;            /* void pointer - address copied, not freed */
60
+		void *vptr;            /* void pointer - see SR_XTYPE_VPTR, SR_XTYPE_SPTR */
61 61
 		sr_data_t *data;       /* must be given in shm (not cloned) */
62 62
 	} v;
63 63
 } sr_xval_t;
Browse code

core: xvavp - new data type SR_XTYPE_SPTR

- store a shm pointer that has to be freed at destroy with shm_free()

Daniel-Constantin Mierla authored on 23/05/2019 07:30:51
Showing 1 changed files
... ...
@@ -33,7 +33,8 @@ typedef enum {
33 33
 	SR_XTYPE_LONG,    /* long value */
34 34
 	SR_XTYPE_LLONG,   /* long long value */
35 35
 	SR_XTYPE_XAVP,    /* xavp value */
36
-	SR_XTYPE_VPTR,    /* void pointer value */
36
+	SR_XTYPE_VPTR,    /* void pointer value (no free on destroy) */
37
+	SR_XTYPE_SPTR,    /* void pointer value (shm free on destroy) */
37 38
 	SR_XTYPE_DATA     /* custom data value */
38 39
 } sr_xtype_t;
39 40
 
Browse code

core: removed ifdefs for WITH_XAVP

- xavps are enabled for about 10 years and used extensively

Daniel-Constantin Mierla authored on 18/04/2019 11:49:35
Showing 1 changed files
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * Copyright (C) 2009 Daniel-Constantin Mierla (asipto.com) 
2
+ * Copyright (C) 2009 Daniel-Constantin Mierla (asipto.com)
3 3
  *
4 4
  * Permission to use, copy, modify, and distribute this software for any
5 5
  * purpose with or without fee is hereby granted, provided that the above
... ...
@@ -18,8 +18,6 @@
18 18
 #ifndef _SR_XAVP_H_
19 19
 #define _SR_XAVP_H_
20 20
 
21
-#ifdef WITH_XAVP
22
-
23 21
 #include <time.h>
24 22
 #include "str.h"
25 23
 #include "str_list.h"
... ...
@@ -111,6 +109,5 @@ int xavp_serialize_fields(str *rname, char *obuf, int olen);
111 109
 
112 110
 int xavp_set_child_ival(str *rname, str *cname, int ival);
113 111
 int xavp_set_child_sval(str *rname, str *cname, str *sval);
114
-#endif
115 112
 
116 113
 #endif
Browse code

core: xavp - helper function to remove child value

Daniel-Constantin Mierla authored on 18/04/2019 07:37:36
Showing 1 changed files
... ...
@@ -88,6 +88,7 @@ sr_xavp_t *xavp_get_last(str *xname, sr_xavp_t **list);
88 88
 int xavp_rm_by_name(str *name, int all, sr_xavp_t **head);
89 89
 int xavp_rm_by_index(str *name, int idx, sr_xavp_t **head);
90 90
 int xavp_rm(sr_xavp_t *xa, sr_xavp_t **head);
91
+int xavp_rm_child_by_index(str *rname, str *cname, int idx);
91 92
 int xavp_count(str *name, sr_xavp_t **start);
92 93
 void xavp_destroy_list_unsafe(sr_xavp_t **head);
93 94
 void xavp_destroy_list(sr_xavp_t **head);
Browse code

core: xavp - added functions to set first xavp with first child to int or str

- similar to $xavp(x=>y) = v; - if that xavp doesn not exist, or
$xavp(x[0]=>y[0]) = v; - if that xavp exists

Daniel-Constantin Mierla authored on 16/04/2019 07:00:37
Showing 1 changed files
... ...
@@ -108,6 +108,8 @@ sr_xavp_t* xavp_get_child_with_ival(str *rname, str *cname);
108 108
 sr_xavp_t* xavp_get_child_with_sval(str *rname, str *cname);
109 109
 int xavp_serialize_fields(str *rname, char *obuf, int olen);
110 110
 
111
+int xavp_set_child_ival(str *rname, str *cname, int ival);
112
+int xavp_set_child_sval(str *rname, str *cname, str *sval);
111 113
 #endif
112 114
 
113 115
 #endif
Browse code

core: xavp - new helper function xavp_add_value_after()

Daniel-Constantin Mierla authored on 12/06/2018 08:14:26
Showing 1 changed files
... ...
@@ -78,6 +78,7 @@ int xavp_add(sr_xavp_t *xavp, sr_xavp_t **list);
78 78
 int xavp_add_last(sr_xavp_t *xavp, sr_xavp_t **list);
79 79
 int xavp_add_after(sr_xavp_t *nxavp, sr_xavp_t *pxavp);
80 80
 sr_xavp_t *xavp_add_value(str *name, sr_xval_t *val, sr_xavp_t **list);
81
+sr_xavp_t *xavp_add_value_after(str *name, sr_xval_t *val, sr_xavp_t *pxavp);
81 82
 sr_xavp_t *xavp_add_xavp_value(str *rname, str *name, sr_xval_t *val, sr_xavp_t **list);
82 83
 sr_xavp_t *xavp_set_value(str *name, int idx, sr_xval_t *val, sr_xavp_t **list);
83 84
 sr_xavp_t *xavp_get(str *name, sr_xavp_t *start);
Browse code

core: xavp - helper functions to get last by name and add after an item

Daniel-Constantin Mierla authored on 12/06/2018 07:49:38
Showing 1 changed files
... ...
@@ -76,12 +76,14 @@ void xavp_free(sr_xavp_t *xa);
76 76
 
77 77
 int xavp_add(sr_xavp_t *xavp, sr_xavp_t **list);
78 78
 int xavp_add_last(sr_xavp_t *xavp, sr_xavp_t **list);
79
+int xavp_add_after(sr_xavp_t *nxavp, sr_xavp_t *pxavp);
79 80
 sr_xavp_t *xavp_add_value(str *name, sr_xval_t *val, sr_xavp_t **list);
80 81
 sr_xavp_t *xavp_add_xavp_value(str *rname, str *name, sr_xval_t *val, sr_xavp_t **list);
81 82
 sr_xavp_t *xavp_set_value(str *name, int idx, sr_xval_t *val, sr_xavp_t **list);
82 83
 sr_xavp_t *xavp_get(str *name, sr_xavp_t *start);
83 84
 sr_xavp_t *xavp_get_by_index(str *name, int idx, sr_xavp_t **start);
84 85
 sr_xavp_t *xavp_get_next(sr_xavp_t *start);
86
+sr_xavp_t *xavp_get_last(str *xname, sr_xavp_t **list);
85 87
 int xavp_rm_by_name(str *name, int all, sr_xavp_t **head);
86 88
 int xavp_rm_by_index(str *name, int idx, sr_xavp_t **head);
87 89
 int xavp_rm(sr_xavp_t *xa, sr_xavp_t **head);
Browse code

core: xavp - extended to hold a bare void pointer value

- useful to link data that doesn't need cloning or freeing

Daniel-Constantin Mierla authored on 12/06/2018 07:23:59
Showing 1 changed files
... ...
@@ -35,6 +35,7 @@ typedef enum {
35 35
 	SR_XTYPE_LONG,    /* long value */
36 36
 	SR_XTYPE_LLONG,   /* long long value */
37 37
 	SR_XTYPE_XAVP,    /* xavp value */
38
+	SR_XTYPE_VPTR,    /* void pointer value */
38 39
 	SR_XTYPE_DATA     /* custom data value */
39 40
 } sr_xtype_t;
40 41
 
... ...
@@ -57,6 +58,7 @@ typedef struct _sr_xval {
57 58
 		long l;
58 59
 		long long ll;
59 60
 		struct _sr_xavp *xavp; /* must be given in shm (not cloned) */
61
+		void *vptr;            /* void pointer - address copied, not freed */
60 62
 		sr_data_t *data;       /* must be given in shm (not cloned) */
61 63
 	} v;
62 64
 } sr_xval_t;
Browse code

core: xavp - helper function to serialize subfields in a params list

Daniel-Constantin Mierla authored on 20/04/2018 09:58:20
Showing 1 changed files
... ...
@@ -101,6 +101,8 @@ sr_xavp_t *xavp_clone_level_nodata(sr_xavp_t *xold);
101 101
 sr_xavp_t* xavp_get_child(str *rname, str *cname);
102 102
 sr_xavp_t* xavp_get_child_with_ival(str *rname, str *cname);
103 103
 sr_xavp_t* xavp_get_child_with_sval(str *rname, str *cname);
104
+int xavp_serialize_fields(str *rname, char *obuf, int olen);
105
+
104 106
 #endif
105 107
 
106 108
 #endif
Browse code

core, lib, modules: restructured source code tree

- new folder src/ to hold the source code for main project applications
- main.c is in src/
- all core files are subfolder are in src/core/
- modules are in src/modules/
- libs are in src/lib/
- application Makefiles are in src/
- application binary is built in src/ (src/kamailio)

Daniel-Constantin Mierla authored on 07/12/2016 11:03:51
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,106 @@
1
+/*
2
+ * Copyright (C) 2009 Daniel-Constantin Mierla (asipto.com) 
3
+ *
4
+ * Permission to use, copy, modify, and distribute this software for any
5
+ * purpose with or without fee is hereby granted, provided that the above
6
+ * copyright notice and this permission notice appear in all copies.
7
+ *
8
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15
+ */
16
+
17
+
18
+#ifndef _SR_XAVP_H_
19
+#define _SR_XAVP_H_
20
+
21
+#ifdef WITH_XAVP
22
+
23
+#include <time.h>
24
+#include "str.h"
25
+#include "str_list.h"
26
+
27
+struct _sr_xavp;
28
+
29
+/* types for xavp values */
30
+typedef enum {
31
+	SR_XTYPE_NULL=0,
32
+	SR_XTYPE_INT,     /* integer value */
33
+	SR_XTYPE_STR,     /* str value */
34
+	SR_XTYPE_TIME,    /* timestamp value */
35
+	SR_XTYPE_LONG,    /* long value */
36
+	SR_XTYPE_LLONG,   /* long long value */
37
+	SR_XTYPE_XAVP,    /* xavp value */
38
+	SR_XTYPE_DATA     /* custom data value */
39
+} sr_xtype_t;
40
+
41
+typedef void (*sr_xavp_sfree_f)(void *d);
42
+typedef void (*sr_data_free_f)(void *d, sr_xavp_sfree_f sfree);
43
+
44
+/* structure custom data value */
45
+typedef struct _sr_data {
46
+	void *p;
47
+	sr_data_free_f pfree;
48
+} sr_data_t;
49
+
50
+/* avp value */
51
+typedef struct _sr_xval {
52
+	sr_xtype_t type;           /* type of the value */
53
+	union {
54
+		int i;
55
+		str s;                 /* cloned in shared memory */
56
+		time_t t;
57
+		long l;
58
+		long long ll;
59
+		struct _sr_xavp *xavp; /* must be given in shm (not cloned) */
60
+		sr_data_t *data;       /* must be given in shm (not cloned) */
61
+	} v;
62
+} sr_xval_t;
63
+
64
+/* structure for extended avp */
65
+typedef struct _sr_xavp {
66
+	unsigned int id;          /* internal hash id */
67
+	str name;                 /* name of the xavp */
68
+	sr_xval_t val;            /* value of the xavp */
69
+	struct _sr_xavp *next;    /* pointer to next xavp in list */
70
+} sr_xavp_t;
71
+
72
+int xavp_init_head(void);
73
+void xavp_free(sr_xavp_t *xa);
74
+
75
+int xavp_add(sr_xavp_t *xavp, sr_xavp_t **list);
76
+int xavp_add_last(sr_xavp_t *xavp, sr_xavp_t **list);
77
+sr_xavp_t *xavp_add_value(str *name, sr_xval_t *val, sr_xavp_t **list);
78
+sr_xavp_t *xavp_add_xavp_value(str *rname, str *name, sr_xval_t *val, sr_xavp_t **list);
79
+sr_xavp_t *xavp_set_value(str *name, int idx, sr_xval_t *val, sr_xavp_t **list);
80
+sr_xavp_t *xavp_get(str *name, sr_xavp_t *start);
81
+sr_xavp_t *xavp_get_by_index(str *name, int idx, sr_xavp_t **start);
82
+sr_xavp_t *xavp_get_next(sr_xavp_t *start);
83
+int xavp_rm_by_name(str *name, int all, sr_xavp_t **head);
84
+int xavp_rm_by_index(str *name, int idx, sr_xavp_t **head);
85
+int xavp_rm(sr_xavp_t *xa, sr_xavp_t **head);
86
+int xavp_count(str *name, sr_xavp_t **start);
87
+void xavp_destroy_list_unsafe(sr_xavp_t **head);
88
+void xavp_destroy_list(sr_xavp_t **head);
89
+void xavp_reset_list(void);
90
+sr_xavp_t **xavp_set_list(sr_xavp_t **head);
91
+sr_xavp_t **xavp_get_crt_list(void);
92
+struct str_list *xavp_get_list_key_names(sr_xavp_t *xavp);
93
+
94
+int xavp_insert(sr_xavp_t *xavp, int idx, sr_xavp_t **list);
95
+sr_xavp_t *xavp_extract(str *name, sr_xavp_t **list);
96
+
97
+void xavp_print_list(sr_xavp_t **head);
98
+
99
+sr_xavp_t *xavp_clone_level_nodata(sr_xavp_t *xold);
100
+
101
+sr_xavp_t* xavp_get_child(str *rname, str *cname);
102
+sr_xavp_t* xavp_get_child_with_ival(str *rname, str *cname);
103
+sr_xavp_t* xavp_get_child_with_sval(str *rname, str *cname);
104
+#endif
105
+
106
+#endif