/src/freeradius-server/src/freeradius-devel/util/tlist.h
Line | Count | Source (jump to first uncovered line) |
1 | | #pragma once |
2 | | /* |
3 | | * This program is free software; you can redistribute it and/or modify |
4 | | * it under the terms of the GNU General Public License as published by |
5 | | * the Free Software Foundation; either version 2 of the License, or |
6 | | * (at your option) any later version. |
7 | | * |
8 | | * This program is distributed in the hope that it will be useful, |
9 | | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
11 | | * GNU General Public License for more details. |
12 | | * |
13 | | * You should have received a copy of the GNU General Public License |
14 | | * along with this program; if not, write to the Free Software |
15 | | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA |
16 | | */ |
17 | | |
18 | | /** Tree list implementation |
19 | | * |
20 | | * @file src/lib/util/tlist.h |
21 | | * |
22 | | * @copyright 2022 Network RADIUS SAS (legal@networkradius.com) |
23 | | */ |
24 | | RCSIDH(tlist_h, "$Id: 5d6d3918a13b36a43049c5a0d32f9a3c2c3cbfea $") |
25 | | |
26 | | #ifdef __cplusplus |
27 | | extern "C" { |
28 | | #endif |
29 | | |
30 | | #include <freeradius-devel/util/dlist.h> |
31 | | |
32 | | typedef struct fr_tlist_head_s fr_tlist_head_t; |
33 | | typedef struct fr_tlist_s fr_tlist_t; |
34 | | |
35 | | struct fr_tlist_head_s { |
36 | | fr_tlist_t *parent; //!< the parent entry which holds this list. May be NULL. |
37 | | |
38 | | fr_dlist_head_t dlist_head; |
39 | | }; |
40 | | |
41 | | #define tlist_type(_list) ((_list)->dlist_head.type) |
42 | | |
43 | | struct fr_tlist_s { |
44 | | fr_tlist_head_t *list_head; //!< the list which holds this entry |
45 | | fr_tlist_head_t *children; //!< any child list |
46 | | fr_dlist_t dlist_entry; //!< the doubly linked list of entries. |
47 | | }; |
48 | | |
49 | | |
50 | | /** Find the tlist pointers within a list item |
51 | | * |
52 | | */ |
53 | | static inline fr_tlist_t *fr_tlist_item_to_entry(fr_tlist_head_t const *list_head, void const *item) |
54 | 7.36M | { |
55 | 7.36M | return (fr_tlist_t *)(((uintptr_t) item) + list_head->dlist_head.offset - offsetof(fr_tlist_t, dlist_entry)); |
56 | 7.36M | } Unexecuted instantiation: fuzzer.c:fr_tlist_item_to_entry Unexecuted instantiation: decode.c:fr_tlist_item_to_entry Unexecuted instantiation: dl.c:fr_tlist_item_to_entry Unexecuted instantiation: edit.c:fr_tlist_item_to_entry Unexecuted instantiation: encode.c:fr_tlist_item_to_entry Unexecuted instantiation: packet.c:fr_tlist_item_to_entry pair.c:fr_tlist_item_to_entry Line | Count | Source | 54 | 5.40M | { | 55 | 5.40M | return (fr_tlist_t *)(((uintptr_t) item) + list_head->dlist_head.offset - offsetof(fr_tlist_t, dlist_entry)); | 56 | 5.40M | } |
pair_inline.c:fr_tlist_item_to_entry Line | Count | Source | 54 | 1.96M | { | 55 | 1.96M | return (fr_tlist_t *)(((uintptr_t) item) + list_head->dlist_head.offset - offsetof(fr_tlist_t, dlist_entry)); | 56 | 1.96M | } |
Unexecuted instantiation: pair_legacy.c:fr_tlist_item_to_entry Unexecuted instantiation: pair_print.c:fr_tlist_item_to_entry Unexecuted instantiation: pair_tokenize.c:fr_tlist_item_to_entry Unexecuted instantiation: print.c:fr_tlist_item_to_entry Unexecuted instantiation: proto.c:fr_tlist_item_to_entry Unexecuted instantiation: stats.c:fr_tlist_item_to_entry Unexecuted instantiation: struct.c:fr_tlist_item_to_entry Unexecuted instantiation: base.c:fr_tlist_item_to_entry Unexecuted instantiation: list.c:fr_tlist_item_to_entry Unexecuted instantiation: tcp.c:fr_tlist_item_to_entry Unexecuted instantiation: abinary.c:fr_tlist_item_to_entry Unexecuted instantiation: vmps.c:fr_tlist_item_to_entry Unexecuted instantiation: raw.c:fr_tlist_item_to_entry Unexecuted instantiation: udp.c:fr_tlist_item_to_entry |
57 | | |
58 | | /** Get the item from a fr_tlist_t |
59 | | * |
60 | | */ |
61 | | static inline void *fr_tlist_entry_to_item(fr_tlist_head_t const *list_head, fr_tlist_t const *entry) |
62 | 0 | { |
63 | 0 | return (void *)(((uintptr_t) entry) - list_head->dlist_head.offset + offsetof(fr_tlist_t, dlist_entry)); |
64 | 0 | } Unexecuted instantiation: fuzzer.c:fr_tlist_entry_to_item Unexecuted instantiation: decode.c:fr_tlist_entry_to_item Unexecuted instantiation: dl.c:fr_tlist_entry_to_item Unexecuted instantiation: edit.c:fr_tlist_entry_to_item Unexecuted instantiation: encode.c:fr_tlist_entry_to_item Unexecuted instantiation: packet.c:fr_tlist_entry_to_item Unexecuted instantiation: pair.c:fr_tlist_entry_to_item Unexecuted instantiation: pair_inline.c:fr_tlist_entry_to_item Unexecuted instantiation: pair_legacy.c:fr_tlist_entry_to_item Unexecuted instantiation: pair_print.c:fr_tlist_entry_to_item Unexecuted instantiation: pair_tokenize.c:fr_tlist_entry_to_item Unexecuted instantiation: print.c:fr_tlist_entry_to_item Unexecuted instantiation: proto.c:fr_tlist_entry_to_item Unexecuted instantiation: stats.c:fr_tlist_entry_to_item Unexecuted instantiation: struct.c:fr_tlist_entry_to_item Unexecuted instantiation: base.c:fr_tlist_entry_to_item Unexecuted instantiation: list.c:fr_tlist_entry_to_item Unexecuted instantiation: tcp.c:fr_tlist_entry_to_item Unexecuted instantiation: abinary.c:fr_tlist_entry_to_item Unexecuted instantiation: vmps.c:fr_tlist_entry_to_item Unexecuted instantiation: raw.c:fr_tlist_entry_to_item Unexecuted instantiation: udp.c:fr_tlist_entry_to_item |
65 | | |
66 | | /** Get a fr_tlist_head_t from a fr_dlist_head_t |
67 | | * |
68 | | */ |
69 | | static inline fr_tlist_head_t *fr_tlist_head_from_dlist(fr_dlist_head_t *dlist_head) |
70 | 0 | { |
71 | 0 | return (fr_tlist_head_t *)(((uintptr_t) dlist_head) - offsetof(fr_tlist_head_t, dlist_head)); |
72 | 0 | } Unexecuted instantiation: fuzzer.c:fr_tlist_head_from_dlist Unexecuted instantiation: decode.c:fr_tlist_head_from_dlist Unexecuted instantiation: dl.c:fr_tlist_head_from_dlist Unexecuted instantiation: edit.c:fr_tlist_head_from_dlist Unexecuted instantiation: encode.c:fr_tlist_head_from_dlist Unexecuted instantiation: packet.c:fr_tlist_head_from_dlist Unexecuted instantiation: pair.c:fr_tlist_head_from_dlist Unexecuted instantiation: pair_inline.c:fr_tlist_head_from_dlist Unexecuted instantiation: pair_legacy.c:fr_tlist_head_from_dlist Unexecuted instantiation: pair_print.c:fr_tlist_head_from_dlist Unexecuted instantiation: pair_tokenize.c:fr_tlist_head_from_dlist Unexecuted instantiation: print.c:fr_tlist_head_from_dlist Unexecuted instantiation: proto.c:fr_tlist_head_from_dlist Unexecuted instantiation: stats.c:fr_tlist_head_from_dlist Unexecuted instantiation: struct.c:fr_tlist_head_from_dlist Unexecuted instantiation: base.c:fr_tlist_head_from_dlist Unexecuted instantiation: list.c:fr_tlist_head_from_dlist Unexecuted instantiation: tcp.c:fr_tlist_head_from_dlist Unexecuted instantiation: abinary.c:fr_tlist_head_from_dlist Unexecuted instantiation: vmps.c:fr_tlist_head_from_dlist Unexecuted instantiation: raw.c:fr_tlist_head_from_dlist Unexecuted instantiation: udp.c:fr_tlist_head_from_dlist |
73 | | |
74 | | /** Initialise a linked list without metadata |
75 | | * |
76 | | */ |
77 | | static inline void fr_tlist_entry_init(fr_tlist_t *entry) |
78 | 3.71M | { |
79 | 3.71M | fr_dlist_entry_init(&entry->dlist_entry); |
80 | 3.71M | entry->list_head = NULL; |
81 | 3.71M | } Unexecuted instantiation: fuzzer.c:fr_tlist_entry_init Unexecuted instantiation: decode.c:fr_tlist_entry_init Unexecuted instantiation: dl.c:fr_tlist_entry_init Unexecuted instantiation: edit.c:fr_tlist_entry_init Unexecuted instantiation: encode.c:fr_tlist_entry_init Unexecuted instantiation: packet.c:fr_tlist_entry_init pair.c:fr_tlist_entry_init Line | Count | Source | 78 | 3.71M | { | 79 | 3.71M | fr_dlist_entry_init(&entry->dlist_entry); | 80 | 3.71M | entry->list_head = NULL; | 81 | 3.71M | } |
Unexecuted instantiation: pair_inline.c:fr_tlist_entry_init Unexecuted instantiation: pair_legacy.c:fr_tlist_entry_init Unexecuted instantiation: pair_print.c:fr_tlist_entry_init Unexecuted instantiation: pair_tokenize.c:fr_tlist_entry_init Unexecuted instantiation: print.c:fr_tlist_entry_init Unexecuted instantiation: proto.c:fr_tlist_entry_init Unexecuted instantiation: stats.c:fr_tlist_entry_init Unexecuted instantiation: struct.c:fr_tlist_entry_init Unexecuted instantiation: base.c:fr_tlist_entry_init Unexecuted instantiation: list.c:fr_tlist_entry_init Unexecuted instantiation: tcp.c:fr_tlist_entry_init Unexecuted instantiation: abinary.c:fr_tlist_entry_init Unexecuted instantiation: vmps.c:fr_tlist_entry_init Unexecuted instantiation: raw.c:fr_tlist_entry_init Unexecuted instantiation: udp.c:fr_tlist_entry_init |
82 | | |
83 | | static inline CC_HINT(nonnull) void fr_tlist_entry_unlink(fr_tlist_t *entry) |
84 | 0 | { |
85 | 0 | fr_dlist_entry_unlink(&entry->dlist_entry); |
86 | 0 | entry->list_head = NULL; |
87 | 0 | } Unexecuted instantiation: fuzzer.c:fr_tlist_entry_unlink Unexecuted instantiation: decode.c:fr_tlist_entry_unlink Unexecuted instantiation: dl.c:fr_tlist_entry_unlink Unexecuted instantiation: edit.c:fr_tlist_entry_unlink Unexecuted instantiation: encode.c:fr_tlist_entry_unlink Unexecuted instantiation: packet.c:fr_tlist_entry_unlink Unexecuted instantiation: pair.c:fr_tlist_entry_unlink Unexecuted instantiation: pair_inline.c:fr_tlist_entry_unlink Unexecuted instantiation: pair_legacy.c:fr_tlist_entry_unlink Unexecuted instantiation: pair_print.c:fr_tlist_entry_unlink Unexecuted instantiation: pair_tokenize.c:fr_tlist_entry_unlink Unexecuted instantiation: print.c:fr_tlist_entry_unlink Unexecuted instantiation: proto.c:fr_tlist_entry_unlink Unexecuted instantiation: stats.c:fr_tlist_entry_unlink Unexecuted instantiation: struct.c:fr_tlist_entry_unlink Unexecuted instantiation: base.c:fr_tlist_entry_unlink Unexecuted instantiation: list.c:fr_tlist_entry_unlink Unexecuted instantiation: tcp.c:fr_tlist_entry_unlink Unexecuted instantiation: abinary.c:fr_tlist_entry_unlink Unexecuted instantiation: vmps.c:fr_tlist_entry_unlink Unexecuted instantiation: raw.c:fr_tlist_entry_unlink Unexecuted instantiation: udp.c:fr_tlist_entry_unlink |
88 | | |
89 | | /** Check if a list entry is part of a list |
90 | | * |
91 | | * This works because the fr_tlist_head_t has an entry in the list. |
92 | | * So if next and prev both point to the entry for the object being |
93 | | * passed in, then it can't be part of a list with a fr_tlist_head_t. |
94 | | * |
95 | | * @return |
96 | | * - True if in a list. |
97 | | * - False otherwise. |
98 | | */ |
99 | | static inline CC_HINT(nonnull) bool fr_tlist_entry_in_a_list(fr_tlist_t const *entry) |
100 | 7.30M | { |
101 | 7.30M | return (entry->list_head != NULL); |
102 | 7.30M | } Unexecuted instantiation: fuzzer.c:fr_tlist_entry_in_a_list Unexecuted instantiation: decode.c:fr_tlist_entry_in_a_list Unexecuted instantiation: dl.c:fr_tlist_entry_in_a_list Unexecuted instantiation: edit.c:fr_tlist_entry_in_a_list Unexecuted instantiation: encode.c:fr_tlist_entry_in_a_list Unexecuted instantiation: packet.c:fr_tlist_entry_in_a_list pair.c:fr_tlist_entry_in_a_list Line | Count | Source | 100 | 7.30M | { | 101 | 7.30M | return (entry->list_head != NULL); | 102 | 7.30M | } |
Unexecuted instantiation: pair_inline.c:fr_tlist_entry_in_a_list Unexecuted instantiation: pair_legacy.c:fr_tlist_entry_in_a_list Unexecuted instantiation: pair_print.c:fr_tlist_entry_in_a_list Unexecuted instantiation: pair_tokenize.c:fr_tlist_entry_in_a_list Unexecuted instantiation: print.c:fr_tlist_entry_in_a_list Unexecuted instantiation: proto.c:fr_tlist_entry_in_a_list Unexecuted instantiation: stats.c:fr_tlist_entry_in_a_list Unexecuted instantiation: struct.c:fr_tlist_entry_in_a_list Unexecuted instantiation: base.c:fr_tlist_entry_in_a_list Unexecuted instantiation: list.c:fr_tlist_entry_in_a_list Unexecuted instantiation: tcp.c:fr_tlist_entry_in_a_list Unexecuted instantiation: abinary.c:fr_tlist_entry_in_a_list Unexecuted instantiation: vmps.c:fr_tlist_entry_in_a_list Unexecuted instantiation: raw.c:fr_tlist_entry_in_a_list Unexecuted instantiation: udp.c:fr_tlist_entry_in_a_list |
103 | | |
104 | | |
105 | | // no fr_tlist_entry_link_after(), fr_tlist_entry_link_before(), fr_tlist_entry_move(), fr_tlist_entry_replace() |
106 | | |
107 | | /** Initialise the head structure of a tlist |
108 | | * |
109 | | * @note This variant does not perform talloc validation. |
110 | | * |
111 | | * This function should only be called for the top level of the list. |
112 | | * Please call fr_tlist_add_child() when adding a child list to an |
113 | | * existing entry. |
114 | | * |
115 | | @code{.c} |
116 | | typedef struct { |
117 | | fr_tlist_t tlist; |
118 | | char const *field_a; |
119 | | int *field_b; |
120 | | ... |
121 | | } my_struct_t; |
122 | | |
123 | | int my_func(my_struct_t *a, my_struct_t *b) |
124 | | { |
125 | | fr_tlist_head_t head; |
126 | | |
127 | | fr_tlist_init(&head, my_struct_t, tlist); |
128 | | fr_tlist_insert_head(&head, a); |
129 | | fr_tlist_insert_head(&head, b); |
130 | | } |
131 | | @endcode |
132 | | * |
133 | | * @param[in] _head structure to initialise. |
134 | | * @param[in] _type of item being stored in the list, e.g. fr_value_box_t, |
135 | | * fr_dict_attr_t etc... |
136 | | * @param[in] _field Containing the #fr_tlist_t within item being stored. |
137 | | */ |
138 | | #define fr_tlist_init(_head, _type, _field) \ |
139 | | _Generic((((_type *)0)->_field), fr_tlist_t: _fr_tlist_init(_head, offsetof(_type, _field), NULL)) |
140 | | |
141 | | /** Initialise the head structure of a tlist |
142 | | * |
143 | | * @note This variant *DOES* perform talloc validation. All items inserted |
144 | | * into the list must be allocated with talloc. |
145 | | * |
146 | | * @copybrief fr_tlist_init |
147 | | * |
148 | | * @param[in] _head structure to initialise. |
149 | | * @param[in] _type of item being stored in the list, e.g. fr_value_box_t, |
150 | | * fr_dict_attr_t etc... |
151 | | * @param[in] _field Containing the #fr_tlist_t within item being stored. |
152 | | */ |
153 | | #define fr_tlist_talloc_init(_head, _type, _field) \ |
154 | | _Generic((((_type *)0)->_field), fr_tlist_t: _fr_tlist_init(_head, offsetof(_type, _field), #_type)) |
155 | | |
156 | | /** Initialise common fields in a tlist |
157 | | * |
158 | | * The dlist entries point to the tlist structure, which then points to the real structure. |
159 | | */ |
160 | | static inline void _fr_tlist_init(fr_tlist_head_t *list_head, size_t offset, char const *type) |
161 | 1.41M | { |
162 | 1.41M | list_head->parent = NULL; |
163 | | |
164 | | /* |
165 | | * Initialize the dlist, but point to the ENCLOSING data |
166 | | * structure and type, not to the #fr_tlist_t. |
167 | | */ |
168 | 1.41M | fr_dlist_init(&list_head->dlist_head, fr_tlist_t, dlist_entry); |
169 | 1.41M | list_head->dlist_head.offset += offset; |
170 | 1.41M | list_head->dlist_head.type = type; |
171 | 1.41M | } Unexecuted instantiation: fuzzer.c:_fr_tlist_init Unexecuted instantiation: decode.c:_fr_tlist_init Unexecuted instantiation: dl.c:_fr_tlist_init Unexecuted instantiation: edit.c:_fr_tlist_init Unexecuted instantiation: encode.c:_fr_tlist_init Unexecuted instantiation: packet.c:_fr_tlist_init Line | Count | Source | 161 | 1.41M | { | 162 | 1.41M | list_head->parent = NULL; | 163 | | | 164 | | /* | 165 | | * Initialize the dlist, but point to the ENCLOSING data | 166 | | * structure and type, not to the #fr_tlist_t. | 167 | | */ | 168 | 1.41M | fr_dlist_init(&list_head->dlist_head, fr_tlist_t, dlist_entry); | 169 | 1.41M | list_head->dlist_head.offset += offset; | 170 | 1.41M | list_head->dlist_head.type = type; | 171 | 1.41M | } |
Unexecuted instantiation: pair_inline.c:_fr_tlist_init Unexecuted instantiation: pair_legacy.c:_fr_tlist_init Unexecuted instantiation: pair_print.c:_fr_tlist_init Unexecuted instantiation: pair_tokenize.c:_fr_tlist_init Unexecuted instantiation: print.c:_fr_tlist_init Unexecuted instantiation: proto.c:_fr_tlist_init Unexecuted instantiation: stats.c:_fr_tlist_init Unexecuted instantiation: struct.c:_fr_tlist_init Unexecuted instantiation: base.c:_fr_tlist_init Unexecuted instantiation: list.c:_fr_tlist_init Unexecuted instantiation: tcp.c:_fr_tlist_init Unexecuted instantiation: abinary.c:_fr_tlist_init Unexecuted instantiation: vmps.c:_fr_tlist_init Unexecuted instantiation: raw.c:_fr_tlist_init Unexecuted instantiation: udp.c:_fr_tlist_init |
172 | | |
173 | | /** Iterate over the contents of a list, only one level |
174 | | * |
175 | | * @param[in] _list_head to iterate over. |
176 | | * @param[in] _iter Name of iteration variable. |
177 | | * Will be declared in the scope of the loop. |
178 | | */ |
179 | | #define fr_tlist_foreach_entry(_list_head, _iter) \ |
180 | | for (void *_iter = fr_dlist_head(&_list_head->dlist_head); _iter; _iter = fr_dlist_next(&_list_head->dlist_head, _iter)) |
181 | | |
182 | | /** Remove all elements in a tlist |
183 | | * |
184 | | * @param[in] list_head to clear. |
185 | | */ |
186 | | static inline void fr_tlist_clear(fr_tlist_head_t *list_head) |
187 | 0 | { |
188 | 0 | fr_tlist_foreach_entry(list_head, item) { |
189 | 0 | fr_tlist_t *entry = fr_tlist_item_to_entry(list_head, item); |
190 | 0 |
|
191 | 0 | entry->list_head = NULL; |
192 | 0 | } |
193 | 0 | fr_dlist_clear(&list_head->dlist_head); |
194 | 0 | } Unexecuted instantiation: fuzzer.c:fr_tlist_clear Unexecuted instantiation: decode.c:fr_tlist_clear Unexecuted instantiation: dl.c:fr_tlist_clear Unexecuted instantiation: edit.c:fr_tlist_clear Unexecuted instantiation: encode.c:fr_tlist_clear Unexecuted instantiation: packet.c:fr_tlist_clear Unexecuted instantiation: pair.c:fr_tlist_clear Unexecuted instantiation: pair_inline.c:fr_tlist_clear Unexecuted instantiation: pair_legacy.c:fr_tlist_clear Unexecuted instantiation: pair_print.c:fr_tlist_clear Unexecuted instantiation: pair_tokenize.c:fr_tlist_clear Unexecuted instantiation: print.c:fr_tlist_clear Unexecuted instantiation: proto.c:fr_tlist_clear Unexecuted instantiation: stats.c:fr_tlist_clear Unexecuted instantiation: struct.c:fr_tlist_clear Unexecuted instantiation: base.c:fr_tlist_clear Unexecuted instantiation: list.c:fr_tlist_clear Unexecuted instantiation: tcp.c:fr_tlist_clear Unexecuted instantiation: abinary.c:fr_tlist_clear Unexecuted instantiation: vmps.c:fr_tlist_clear Unexecuted instantiation: raw.c:fr_tlist_clear Unexecuted instantiation: udp.c:fr_tlist_clear |
195 | | |
196 | | /** Check if a list entry is part of a tlist |
197 | | * |
198 | | * This works because the fr_tlist_head_t has an entry in the list. |
199 | | * So if next and prev both point to the entry for the object being |
200 | | * passed in, then it can't be part of a list with a fr_tlist_head_t. |
201 | | * |
202 | | * @return |
203 | | * - True if in a list. |
204 | | * - False otherwise. |
205 | | */ |
206 | | static inline CC_HINT(nonnull) bool fr_tlist_in_list(fr_tlist_head_t *list_head, void *ptr) |
207 | 0 | { |
208 | 0 | fr_tlist_t *entry = fr_tlist_item_to_entry(list_head, ptr); |
209 | |
|
210 | 0 | return (entry->list_head == list_head); |
211 | 0 | } Unexecuted instantiation: fuzzer.c:fr_tlist_in_list Unexecuted instantiation: decode.c:fr_tlist_in_list Unexecuted instantiation: dl.c:fr_tlist_in_list Unexecuted instantiation: edit.c:fr_tlist_in_list Unexecuted instantiation: encode.c:fr_tlist_in_list Unexecuted instantiation: packet.c:fr_tlist_in_list Unexecuted instantiation: pair.c:fr_tlist_in_list Unexecuted instantiation: pair_inline.c:fr_tlist_in_list Unexecuted instantiation: pair_legacy.c:fr_tlist_in_list Unexecuted instantiation: pair_print.c:fr_tlist_in_list Unexecuted instantiation: pair_tokenize.c:fr_tlist_in_list Unexecuted instantiation: print.c:fr_tlist_in_list Unexecuted instantiation: proto.c:fr_tlist_in_list Unexecuted instantiation: stats.c:fr_tlist_in_list Unexecuted instantiation: struct.c:fr_tlist_in_list Unexecuted instantiation: base.c:fr_tlist_in_list Unexecuted instantiation: list.c:fr_tlist_in_list Unexecuted instantiation: tcp.c:fr_tlist_in_list Unexecuted instantiation: abinary.c:fr_tlist_in_list Unexecuted instantiation: vmps.c:fr_tlist_in_list Unexecuted instantiation: raw.c:fr_tlist_in_list Unexecuted instantiation: udp.c:fr_tlist_in_list |
212 | | |
213 | | /** Insert an item into the head of a list |
214 | | * |
215 | | * @note If #fr_tlist_talloc_init was used to initialise #fr_tlist_head_t |
216 | | * ptr must be a talloced chunk of the type passed to #fr_tlist_talloc_init. |
217 | | * |
218 | | * @param[in] list_head to insert ptr into. |
219 | | * @param[in] ptr to insert. |
220 | | * @return |
221 | | * - 0 on success. |
222 | | * - -1 on failure. |
223 | | */ |
224 | | static inline CC_HINT(nonnull) int fr_tlist_insert_head(fr_tlist_head_t *list_head, void *ptr) |
225 | 0 | { |
226 | 0 | fr_tlist_t *entry = fr_tlist_item_to_entry(list_head, ptr); |
227 | |
|
228 | 0 | if (fr_dlist_insert_head(&list_head->dlist_head, ptr) < 0) return -1; |
229 | | |
230 | 0 | entry->list_head = list_head; |
231 | 0 | return 0; |
232 | 0 | } Unexecuted instantiation: fuzzer.c:fr_tlist_insert_head Unexecuted instantiation: decode.c:fr_tlist_insert_head Unexecuted instantiation: dl.c:fr_tlist_insert_head Unexecuted instantiation: edit.c:fr_tlist_insert_head Unexecuted instantiation: encode.c:fr_tlist_insert_head Unexecuted instantiation: packet.c:fr_tlist_insert_head Unexecuted instantiation: pair.c:fr_tlist_insert_head Unexecuted instantiation: pair_inline.c:fr_tlist_insert_head Unexecuted instantiation: pair_legacy.c:fr_tlist_insert_head Unexecuted instantiation: pair_print.c:fr_tlist_insert_head Unexecuted instantiation: pair_tokenize.c:fr_tlist_insert_head Unexecuted instantiation: print.c:fr_tlist_insert_head Unexecuted instantiation: proto.c:fr_tlist_insert_head Unexecuted instantiation: stats.c:fr_tlist_insert_head Unexecuted instantiation: struct.c:fr_tlist_insert_head Unexecuted instantiation: base.c:fr_tlist_insert_head Unexecuted instantiation: list.c:fr_tlist_insert_head Unexecuted instantiation: tcp.c:fr_tlist_insert_head Unexecuted instantiation: abinary.c:fr_tlist_insert_head Unexecuted instantiation: vmps.c:fr_tlist_insert_head Unexecuted instantiation: raw.c:fr_tlist_insert_head Unexecuted instantiation: udp.c:fr_tlist_insert_head |
233 | | |
234 | | /** Insert an item into the tail of a list |
235 | | * |
236 | | * @note If #fr_tlist_talloc_init was used to initialise #fr_tlist_head_t |
237 | | * ptr must be a talloced chunk of the type passed to #fr_tlist_talloc_init. |
238 | | * |
239 | | * @param[in] list_head to insert ptr into. |
240 | | * @param[in] ptr to insert. |
241 | | * @return |
242 | | * - 0 on success. |
243 | | * - -1 on failure. |
244 | | */ |
245 | | static inline CC_HINT(nonnull) int fr_tlist_insert_tail(fr_tlist_head_t *list_head, void *ptr) |
246 | 3.65M | { |
247 | 3.65M | fr_tlist_t *entry = fr_tlist_item_to_entry(list_head, ptr); |
248 | | |
249 | 3.65M | if (fr_dlist_insert_tail(&list_head->dlist_head, ptr) < 0) return -1; |
250 | | |
251 | 3.65M | entry->list_head = list_head; |
252 | 3.65M | return 0; |
253 | 3.65M | } Unexecuted instantiation: fuzzer.c:fr_tlist_insert_tail Unexecuted instantiation: decode.c:fr_tlist_insert_tail Unexecuted instantiation: dl.c:fr_tlist_insert_tail Unexecuted instantiation: edit.c:fr_tlist_insert_tail Unexecuted instantiation: encode.c:fr_tlist_insert_tail Unexecuted instantiation: packet.c:fr_tlist_insert_tail pair.c:fr_tlist_insert_tail Line | Count | Source | 246 | 3.65M | { | 247 | 3.65M | fr_tlist_t *entry = fr_tlist_item_to_entry(list_head, ptr); | 248 | | | 249 | 3.65M | if (fr_dlist_insert_tail(&list_head->dlist_head, ptr) < 0) return -1; | 250 | | | 251 | 3.65M | entry->list_head = list_head; | 252 | 3.65M | return 0; | 253 | 3.65M | } |
Unexecuted instantiation: pair_inline.c:fr_tlist_insert_tail Unexecuted instantiation: pair_legacy.c:fr_tlist_insert_tail Unexecuted instantiation: pair_print.c:fr_tlist_insert_tail Unexecuted instantiation: pair_tokenize.c:fr_tlist_insert_tail Unexecuted instantiation: print.c:fr_tlist_insert_tail Unexecuted instantiation: proto.c:fr_tlist_insert_tail Unexecuted instantiation: stats.c:fr_tlist_insert_tail Unexecuted instantiation: struct.c:fr_tlist_insert_tail Unexecuted instantiation: base.c:fr_tlist_insert_tail Unexecuted instantiation: list.c:fr_tlist_insert_tail Unexecuted instantiation: tcp.c:fr_tlist_insert_tail Unexecuted instantiation: abinary.c:fr_tlist_insert_tail Unexecuted instantiation: vmps.c:fr_tlist_insert_tail Unexecuted instantiation: raw.c:fr_tlist_insert_tail Unexecuted instantiation: udp.c:fr_tlist_insert_tail |
254 | | |
255 | | /** Insert an item after an item already in the list |
256 | | * |
257 | | * @note If #fr_tlist_talloc_init was used to initialise #fr_tlist_head_t |
258 | | * ptr must be a talloced chunk of the type passed to #fr_tlist_talloc_init. |
259 | | * |
260 | | * @param[in] list_head to insert ptr into. |
261 | | * @param[in] pos to insert ptr after. |
262 | | * @param[in] ptr to insert. |
263 | | * @return |
264 | | * - 0 on success. |
265 | | * - -1 on failure. |
266 | | */ |
267 | | static inline CC_HINT(nonnull(1,3)) int fr_tlist_insert_after(fr_tlist_head_t *list_head, void *pos, void *ptr) |
268 | 0 | { |
269 | 0 | fr_tlist_t *entry = fr_tlist_item_to_entry(list_head, ptr); |
270 | |
|
271 | 0 | if (fr_dlist_insert_after(&list_head->dlist_head, pos, ptr) < 0) return -1; |
272 | | |
273 | 0 | entry->list_head = list_head; |
274 | 0 | return 0; |
275 | 0 | } Unexecuted instantiation: fuzzer.c:fr_tlist_insert_after Unexecuted instantiation: decode.c:fr_tlist_insert_after Unexecuted instantiation: dl.c:fr_tlist_insert_after Unexecuted instantiation: edit.c:fr_tlist_insert_after Unexecuted instantiation: encode.c:fr_tlist_insert_after Unexecuted instantiation: packet.c:fr_tlist_insert_after Unexecuted instantiation: pair.c:fr_tlist_insert_after Unexecuted instantiation: pair_inline.c:fr_tlist_insert_after Unexecuted instantiation: pair_legacy.c:fr_tlist_insert_after Unexecuted instantiation: pair_print.c:fr_tlist_insert_after Unexecuted instantiation: pair_tokenize.c:fr_tlist_insert_after Unexecuted instantiation: print.c:fr_tlist_insert_after Unexecuted instantiation: proto.c:fr_tlist_insert_after Unexecuted instantiation: stats.c:fr_tlist_insert_after Unexecuted instantiation: struct.c:fr_tlist_insert_after Unexecuted instantiation: base.c:fr_tlist_insert_after Unexecuted instantiation: list.c:fr_tlist_insert_after Unexecuted instantiation: tcp.c:fr_tlist_insert_after Unexecuted instantiation: abinary.c:fr_tlist_insert_after Unexecuted instantiation: vmps.c:fr_tlist_insert_after Unexecuted instantiation: raw.c:fr_tlist_insert_after Unexecuted instantiation: udp.c:fr_tlist_insert_after |
276 | | |
277 | | /** Insert an item after an item already in the list |
278 | | * |
279 | | * @note If #fr_tlist_talloc_init was used to initialise #fr_tlist_head_t |
280 | | * ptr must be a talloced chunk of the type passed to #fr_tlist_talloc_init. |
281 | | * |
282 | | * @param[in] list_head to insert ptr into. |
283 | | * @param[in] pos to insert ptr before. |
284 | | * @param[in] ptr to insert. |
285 | | * @return |
286 | | * - 0 on success. |
287 | | * - -1 on failure. |
288 | | */ |
289 | | static inline CC_HINT(nonnull(1,3)) int fr_tlist_insert_before(fr_tlist_head_t *list_head, void *pos, void *ptr) |
290 | 0 | { |
291 | 0 | fr_tlist_t *entry = fr_tlist_item_to_entry(list_head, ptr); |
292 | |
|
293 | 0 | if (fr_dlist_insert_before(&list_head->dlist_head, pos, ptr) < 0) return -1; |
294 | | |
295 | 0 | entry->list_head = list_head; |
296 | 0 | return 0; |
297 | 0 | } Unexecuted instantiation: fuzzer.c:fr_tlist_insert_before Unexecuted instantiation: decode.c:fr_tlist_insert_before Unexecuted instantiation: dl.c:fr_tlist_insert_before Unexecuted instantiation: edit.c:fr_tlist_insert_before Unexecuted instantiation: encode.c:fr_tlist_insert_before Unexecuted instantiation: packet.c:fr_tlist_insert_before Unexecuted instantiation: pair.c:fr_tlist_insert_before Unexecuted instantiation: pair_inline.c:fr_tlist_insert_before Unexecuted instantiation: pair_legacy.c:fr_tlist_insert_before Unexecuted instantiation: pair_print.c:fr_tlist_insert_before Unexecuted instantiation: pair_tokenize.c:fr_tlist_insert_before Unexecuted instantiation: print.c:fr_tlist_insert_before Unexecuted instantiation: proto.c:fr_tlist_insert_before Unexecuted instantiation: stats.c:fr_tlist_insert_before Unexecuted instantiation: struct.c:fr_tlist_insert_before Unexecuted instantiation: base.c:fr_tlist_insert_before Unexecuted instantiation: list.c:fr_tlist_insert_before Unexecuted instantiation: tcp.c:fr_tlist_insert_before Unexecuted instantiation: abinary.c:fr_tlist_insert_before Unexecuted instantiation: vmps.c:fr_tlist_insert_before Unexecuted instantiation: raw.c:fr_tlist_insert_before Unexecuted instantiation: udp.c:fr_tlist_insert_before |
298 | | |
299 | | /** Return the HEAD item of a list or NULL if the list is empty |
300 | | * |
301 | | * @param[in] list_head to return the HEAD item from. |
302 | | * @return |
303 | | * - The HEAD item. |
304 | | * - NULL if no items exist in the list. |
305 | | */ |
306 | | static inline CC_HINT(nonnull) void *fr_tlist_head(fr_tlist_head_t const *list_head) |
307 | 206k | { |
308 | 206k | return fr_dlist_head(&list_head->dlist_head); |
309 | 206k | } Unexecuted instantiation: fuzzer.c:fr_tlist_head Unexecuted instantiation: decode.c:fr_tlist_head Unexecuted instantiation: dl.c:fr_tlist_head Unexecuted instantiation: edit.c:fr_tlist_head Unexecuted instantiation: encode.c:fr_tlist_head Unexecuted instantiation: packet.c:fr_tlist_head Line | Count | Source | 307 | 206k | { | 308 | 206k | return fr_dlist_head(&list_head->dlist_head); | 309 | 206k | } |
Unexecuted instantiation: pair_inline.c:fr_tlist_head Unexecuted instantiation: pair_legacy.c:fr_tlist_head Unexecuted instantiation: pair_print.c:fr_tlist_head Unexecuted instantiation: pair_tokenize.c:fr_tlist_head Unexecuted instantiation: print.c:fr_tlist_head Unexecuted instantiation: proto.c:fr_tlist_head Unexecuted instantiation: stats.c:fr_tlist_head Unexecuted instantiation: struct.c:fr_tlist_head Unexecuted instantiation: base.c:fr_tlist_head Unexecuted instantiation: list.c:fr_tlist_head Unexecuted instantiation: tcp.c:fr_tlist_head Unexecuted instantiation: abinary.c:fr_tlist_head Unexecuted instantiation: vmps.c:fr_tlist_head Unexecuted instantiation: raw.c:fr_tlist_head Unexecuted instantiation: udp.c:fr_tlist_head |
310 | | |
311 | | /** Check whether a list has any items. |
312 | | * |
313 | | * @return |
314 | | * - True if it does not. |
315 | | * - False if it does. |
316 | | */ |
317 | | static inline bool fr_tlist_empty(fr_tlist_head_t const *list_head) |
318 | 280k | { |
319 | 280k | if (!list_head) return true; |
320 | | |
321 | 280k | return fr_dlist_empty(&list_head->dlist_head); |
322 | 280k | } Unexecuted instantiation: fuzzer.c:fr_tlist_empty Unexecuted instantiation: decode.c:fr_tlist_empty Unexecuted instantiation: dl.c:fr_tlist_empty Unexecuted instantiation: edit.c:fr_tlist_empty Unexecuted instantiation: encode.c:fr_tlist_empty Unexecuted instantiation: packet.c:fr_tlist_empty Line | Count | Source | 318 | 280k | { | 319 | 280k | if (!list_head) return true; | 320 | | | 321 | 280k | return fr_dlist_empty(&list_head->dlist_head); | 322 | 280k | } |
Unexecuted instantiation: pair_inline.c:fr_tlist_empty Unexecuted instantiation: pair_legacy.c:fr_tlist_empty Unexecuted instantiation: pair_print.c:fr_tlist_empty Unexecuted instantiation: pair_tokenize.c:fr_tlist_empty Unexecuted instantiation: print.c:fr_tlist_empty Unexecuted instantiation: proto.c:fr_tlist_empty Unexecuted instantiation: stats.c:fr_tlist_empty Unexecuted instantiation: struct.c:fr_tlist_empty Unexecuted instantiation: base.c:fr_tlist_empty Unexecuted instantiation: list.c:fr_tlist_empty Unexecuted instantiation: tcp.c:fr_tlist_empty Unexecuted instantiation: abinary.c:fr_tlist_empty Unexecuted instantiation: vmps.c:fr_tlist_empty Unexecuted instantiation: raw.c:fr_tlist_empty Unexecuted instantiation: udp.c:fr_tlist_empty |
323 | | |
324 | | /** Check if the list head is initialised |
325 | | * |
326 | | * Memory must be zeroed out or initialised. |
327 | | * |
328 | | * @return |
329 | | * - True if tlist initialised. |
330 | | * - False if tlist not initialised |
331 | | */ |
332 | | static inline CC_HINT(nonnull) bool fr_tlist_initialised(fr_tlist_head_t const *list_head) |
333 | 0 | { |
334 | 0 | return fr_dlist_initialised(&list_head->dlist_head); |
335 | 0 | } Unexecuted instantiation: fuzzer.c:fr_tlist_initialised Unexecuted instantiation: decode.c:fr_tlist_initialised Unexecuted instantiation: dl.c:fr_tlist_initialised Unexecuted instantiation: edit.c:fr_tlist_initialised Unexecuted instantiation: encode.c:fr_tlist_initialised Unexecuted instantiation: packet.c:fr_tlist_initialised Unexecuted instantiation: pair.c:fr_tlist_initialised Unexecuted instantiation: pair_inline.c:fr_tlist_initialised Unexecuted instantiation: pair_legacy.c:fr_tlist_initialised Unexecuted instantiation: pair_print.c:fr_tlist_initialised Unexecuted instantiation: pair_tokenize.c:fr_tlist_initialised Unexecuted instantiation: print.c:fr_tlist_initialised Unexecuted instantiation: proto.c:fr_tlist_initialised Unexecuted instantiation: stats.c:fr_tlist_initialised Unexecuted instantiation: struct.c:fr_tlist_initialised Unexecuted instantiation: base.c:fr_tlist_initialised Unexecuted instantiation: list.c:fr_tlist_initialised Unexecuted instantiation: tcp.c:fr_tlist_initialised Unexecuted instantiation: abinary.c:fr_tlist_initialised Unexecuted instantiation: vmps.c:fr_tlist_initialised Unexecuted instantiation: raw.c:fr_tlist_initialised Unexecuted instantiation: udp.c:fr_tlist_initialised |
336 | | |
337 | | /** Return the TAIL item of a list or NULL if the list is empty |
338 | | * |
339 | | * @param[in] list_head to return the TAIL item from. |
340 | | * @return |
341 | | * - The TAIL item. |
342 | | * - NULL if no items exist in the list. |
343 | | */ |
344 | | static inline CC_HINT(nonnull) void *fr_tlist_tail(fr_tlist_head_t const *list_head) |
345 | 21.1k | { |
346 | 21.1k | return fr_dlist_tail(&list_head->dlist_head); |
347 | 21.1k | } Unexecuted instantiation: fuzzer.c:fr_tlist_tail Unexecuted instantiation: decode.c:fr_tlist_tail Unexecuted instantiation: dl.c:fr_tlist_tail Unexecuted instantiation: edit.c:fr_tlist_tail Unexecuted instantiation: encode.c:fr_tlist_tail Unexecuted instantiation: packet.c:fr_tlist_tail Unexecuted instantiation: pair.c:fr_tlist_tail pair_inline.c:fr_tlist_tail Line | Count | Source | 345 | 21.1k | { | 346 | 21.1k | return fr_dlist_tail(&list_head->dlist_head); | 347 | 21.1k | } |
Unexecuted instantiation: pair_legacy.c:fr_tlist_tail Unexecuted instantiation: pair_print.c:fr_tlist_tail Unexecuted instantiation: pair_tokenize.c:fr_tlist_tail Unexecuted instantiation: print.c:fr_tlist_tail Unexecuted instantiation: proto.c:fr_tlist_tail Unexecuted instantiation: stats.c:fr_tlist_tail Unexecuted instantiation: struct.c:fr_tlist_tail Unexecuted instantiation: base.c:fr_tlist_tail Unexecuted instantiation: list.c:fr_tlist_tail Unexecuted instantiation: tcp.c:fr_tlist_tail Unexecuted instantiation: abinary.c:fr_tlist_tail Unexecuted instantiation: vmps.c:fr_tlist_tail Unexecuted instantiation: raw.c:fr_tlist_tail Unexecuted instantiation: udp.c:fr_tlist_tail |
348 | | |
349 | | /** Get the next item in a list |
350 | | * |
351 | | * @note If #fr_dlist_talloc_init was used to initialise #fr_dlist_head_t |
352 | | * ptr must be a talloced chunk of the type passed to #fr_tlist_talloc_init. |
353 | | * |
354 | | * @param[in] list_head containing ptr. |
355 | | * @param[in] ptr to retrieve the next item from. |
356 | | * If ptr is NULL, the HEAD of the list will be returned. |
357 | | * @return |
358 | | * - The next item in the list if ptr is not NULL. |
359 | | * - The head of the list if ptr is NULL. |
360 | | * - NULL if ptr is the tail of the list (no more items). |
361 | | */ |
362 | | static inline CC_HINT(nonnull(1)) void *fr_tlist_next(fr_tlist_head_t const *list_head, void const *ptr) |
363 | 5.32M | { |
364 | 5.32M | return fr_dlist_next(&list_head->dlist_head, ptr); |
365 | 5.32M | } Unexecuted instantiation: fuzzer.c:fr_tlist_next Unexecuted instantiation: decode.c:fr_tlist_next Unexecuted instantiation: dl.c:fr_tlist_next Unexecuted instantiation: edit.c:fr_tlist_next Unexecuted instantiation: encode.c:fr_tlist_next Unexecuted instantiation: packet.c:fr_tlist_next Line | Count | Source | 363 | 5.29M | { | 364 | 5.29M | return fr_dlist_next(&list_head->dlist_head, ptr); | 365 | 5.29M | } |
pair_inline.c:fr_tlist_next Line | Count | Source | 363 | 32.3k | { | 364 | 32.3k | return fr_dlist_next(&list_head->dlist_head, ptr); | 365 | 32.3k | } |
Unexecuted instantiation: pair_legacy.c:fr_tlist_next Unexecuted instantiation: pair_print.c:fr_tlist_next Unexecuted instantiation: pair_tokenize.c:fr_tlist_next Unexecuted instantiation: print.c:fr_tlist_next Unexecuted instantiation: proto.c:fr_tlist_next Unexecuted instantiation: stats.c:fr_tlist_next Unexecuted instantiation: struct.c:fr_tlist_next Unexecuted instantiation: base.c:fr_tlist_next Unexecuted instantiation: list.c:fr_tlist_next Unexecuted instantiation: tcp.c:fr_tlist_next Unexecuted instantiation: abinary.c:fr_tlist_next Unexecuted instantiation: vmps.c:fr_tlist_next Unexecuted instantiation: raw.c:fr_tlist_next Unexecuted instantiation: udp.c:fr_tlist_next |
366 | | |
367 | | /** Get the previous item in a list |
368 | | * |
369 | | * @note If #fr_dlist_talloc_init was used to initialise #fr_dlist_head_t |
370 | | * ptr must be a talloced chunk of the type passed to #fr_tlist_talloc_init. |
371 | | * |
372 | | * @param[in] list_head containing ptr. |
373 | | * @param[in] ptr to retrieve the prev item from. |
374 | | * If ptr is NULL, the HEAD of the list will be returned. |
375 | | * @return |
376 | | * - The prev item in the list if ptr is not NULL. |
377 | | * - The head of the list if ptr is NULL. |
378 | | * - NULL if ptr is the tail of the list (no more items). |
379 | | */ |
380 | | static inline CC_HINT(nonnull(1)) void *fr_tlist_prev(fr_tlist_head_t const *list_head, void const *ptr) |
381 | 0 | { |
382 | 0 | return fr_dlist_prev(&list_head->dlist_head, ptr); |
383 | 0 | } Unexecuted instantiation: fuzzer.c:fr_tlist_prev Unexecuted instantiation: decode.c:fr_tlist_prev Unexecuted instantiation: dl.c:fr_tlist_prev Unexecuted instantiation: edit.c:fr_tlist_prev Unexecuted instantiation: encode.c:fr_tlist_prev Unexecuted instantiation: packet.c:fr_tlist_prev Unexecuted instantiation: pair.c:fr_tlist_prev Unexecuted instantiation: pair_inline.c:fr_tlist_prev Unexecuted instantiation: pair_legacy.c:fr_tlist_prev Unexecuted instantiation: pair_print.c:fr_tlist_prev Unexecuted instantiation: pair_tokenize.c:fr_tlist_prev Unexecuted instantiation: print.c:fr_tlist_prev Unexecuted instantiation: proto.c:fr_tlist_prev Unexecuted instantiation: stats.c:fr_tlist_prev Unexecuted instantiation: struct.c:fr_tlist_prev Unexecuted instantiation: base.c:fr_tlist_prev Unexecuted instantiation: list.c:fr_tlist_prev Unexecuted instantiation: tcp.c:fr_tlist_prev Unexecuted instantiation: abinary.c:fr_tlist_prev Unexecuted instantiation: vmps.c:fr_tlist_prev Unexecuted instantiation: raw.c:fr_tlist_prev Unexecuted instantiation: udp.c:fr_tlist_prev |
384 | | |
385 | | /** Remove an item from the list |
386 | | * |
387 | | * @note If #fr_tlist_talloc_init was used to initialise #fr_tlist_head_t |
388 | | * ptr must be a talloced chunk of the type passed to #fr_tlist_talloc_init. |
389 | | * |
390 | | * When removing items in an iteration loop, the iterator variable must be |
391 | | * assigned the item returned by this function. |
392 | | * |
393 | | * If the iterator variable is not updated, the item removed will be the last item |
394 | | * iterated over, as its prev/prev pointers are set to point to itself. |
395 | | @code{.c} |
396 | | my_item_t *item = NULL; |
397 | | |
398 | | while ((item = fr_tlist_prev(&head, item))) { |
399 | | if (item->should_be_removed) { |
400 | | ...do things with item |
401 | | item = fr_tlist_remove(&head, item); |
402 | | continue; |
403 | | } |
404 | | } |
405 | | @endcode |
406 | | * |
407 | | * @param[in] list_head to remove ptr from. |
408 | | * @param[in] ptr to remove. |
409 | | * @return |
410 | | * - The previous item in the list (makes iteration easier). |
411 | | * - NULL if we just removed the head of the list. |
412 | | */ |
413 | | static inline CC_HINT(nonnull(1)) void *fr_tlist_remove(fr_tlist_head_t *list_head, void *ptr) |
414 | 1.77M | { |
415 | 1.77M | fr_tlist_t *entry = fr_tlist_item_to_entry(list_head, ptr); |
416 | | |
417 | 1.77M | entry->list_head = NULL; |
418 | | |
419 | 1.77M | return fr_dlist_remove(&list_head->dlist_head, ptr); |
420 | 1.77M | } Unexecuted instantiation: fuzzer.c:fr_tlist_remove Unexecuted instantiation: decode.c:fr_tlist_remove Unexecuted instantiation: dl.c:fr_tlist_remove Unexecuted instantiation: edit.c:fr_tlist_remove Unexecuted instantiation: encode.c:fr_tlist_remove Unexecuted instantiation: packet.c:fr_tlist_remove Line | Count | Source | 414 | 1.75M | { | 415 | 1.75M | fr_tlist_t *entry = fr_tlist_item_to_entry(list_head, ptr); | 416 | | | 417 | 1.75M | entry->list_head = NULL; | 418 | | | 419 | 1.75M | return fr_dlist_remove(&list_head->dlist_head, ptr); | 420 | 1.75M | } |
pair_inline.c:fr_tlist_remove Line | Count | Source | 414 | 26.6k | { | 415 | 26.6k | fr_tlist_t *entry = fr_tlist_item_to_entry(list_head, ptr); | 416 | | | 417 | 26.6k | entry->list_head = NULL; | 418 | | | 419 | 26.6k | return fr_dlist_remove(&list_head->dlist_head, ptr); | 420 | 26.6k | } |
Unexecuted instantiation: pair_legacy.c:fr_tlist_remove Unexecuted instantiation: pair_print.c:fr_tlist_remove Unexecuted instantiation: pair_tokenize.c:fr_tlist_remove Unexecuted instantiation: print.c:fr_tlist_remove Unexecuted instantiation: proto.c:fr_tlist_remove Unexecuted instantiation: stats.c:fr_tlist_remove Unexecuted instantiation: struct.c:fr_tlist_remove Unexecuted instantiation: base.c:fr_tlist_remove Unexecuted instantiation: list.c:fr_tlist_remove Unexecuted instantiation: tcp.c:fr_tlist_remove Unexecuted instantiation: abinary.c:fr_tlist_remove Unexecuted instantiation: vmps.c:fr_tlist_remove Unexecuted instantiation: raw.c:fr_tlist_remove Unexecuted instantiation: udp.c:fr_tlist_remove |
421 | | |
422 | | /** Remove the head item in a list |
423 | | * |
424 | | * @param[in] list_head to remove head item from. |
425 | | * @return |
426 | | * - The item removed. |
427 | | * - NULL if not items in tlist. |
428 | | */ |
429 | | static inline CC_HINT(nonnull(1)) void *fr_tlist_pop_head(fr_tlist_head_t *list_head) |
430 | 0 | { |
431 | 0 | void *item = fr_tlist_head(list_head); |
432 | 0 |
|
433 | 0 | (void) fr_tlist_remove(list_head, item); |
434 | 0 |
|
435 | 0 | return item; |
436 | 0 | } Unexecuted instantiation: fuzzer.c:fr_tlist_pop_head Unexecuted instantiation: decode.c:fr_tlist_pop_head Unexecuted instantiation: dl.c:fr_tlist_pop_head Unexecuted instantiation: edit.c:fr_tlist_pop_head Unexecuted instantiation: encode.c:fr_tlist_pop_head Unexecuted instantiation: packet.c:fr_tlist_pop_head Unexecuted instantiation: pair.c:fr_tlist_pop_head Unexecuted instantiation: pair_inline.c:fr_tlist_pop_head Unexecuted instantiation: pair_legacy.c:fr_tlist_pop_head Unexecuted instantiation: pair_print.c:fr_tlist_pop_head Unexecuted instantiation: pair_tokenize.c:fr_tlist_pop_head Unexecuted instantiation: print.c:fr_tlist_pop_head Unexecuted instantiation: proto.c:fr_tlist_pop_head Unexecuted instantiation: stats.c:fr_tlist_pop_head Unexecuted instantiation: struct.c:fr_tlist_pop_head Unexecuted instantiation: base.c:fr_tlist_pop_head Unexecuted instantiation: list.c:fr_tlist_pop_head Unexecuted instantiation: tcp.c:fr_tlist_pop_head Unexecuted instantiation: abinary.c:fr_tlist_pop_head Unexecuted instantiation: vmps.c:fr_tlist_pop_head Unexecuted instantiation: raw.c:fr_tlist_pop_head Unexecuted instantiation: udp.c:fr_tlist_pop_head |
437 | | |
438 | | /** Remove the tail item in a list |
439 | | * |
440 | | * @param[in] list_head to remove tail item from. |
441 | | * @return |
442 | | * - The item removed. |
443 | | * - NULL if not items in tlist. |
444 | | */ |
445 | | static inline CC_HINT(nonnull(1)) void *fr_tlist_pop_tail(fr_tlist_head_t *list_head) |
446 | 0 | { |
447 | 0 | void *item = fr_dlist_tail(&list_head->dlist_head); |
448 | |
|
449 | 0 | (void) fr_dlist_remove(&list_head->dlist_head, item); |
450 | |
|
451 | 0 | return item; |
452 | 0 | } Unexecuted instantiation: fuzzer.c:fr_tlist_pop_tail Unexecuted instantiation: decode.c:fr_tlist_pop_tail Unexecuted instantiation: dl.c:fr_tlist_pop_tail Unexecuted instantiation: edit.c:fr_tlist_pop_tail Unexecuted instantiation: encode.c:fr_tlist_pop_tail Unexecuted instantiation: packet.c:fr_tlist_pop_tail Unexecuted instantiation: pair.c:fr_tlist_pop_tail Unexecuted instantiation: pair_inline.c:fr_tlist_pop_tail Unexecuted instantiation: pair_legacy.c:fr_tlist_pop_tail Unexecuted instantiation: pair_print.c:fr_tlist_pop_tail Unexecuted instantiation: pair_tokenize.c:fr_tlist_pop_tail Unexecuted instantiation: print.c:fr_tlist_pop_tail Unexecuted instantiation: proto.c:fr_tlist_pop_tail Unexecuted instantiation: stats.c:fr_tlist_pop_tail Unexecuted instantiation: struct.c:fr_tlist_pop_tail Unexecuted instantiation: base.c:fr_tlist_pop_tail Unexecuted instantiation: list.c:fr_tlist_pop_tail Unexecuted instantiation: tcp.c:fr_tlist_pop_tail Unexecuted instantiation: abinary.c:fr_tlist_pop_tail Unexecuted instantiation: vmps.c:fr_tlist_pop_tail Unexecuted instantiation: raw.c:fr_tlist_pop_tail Unexecuted instantiation: udp.c:fr_tlist_pop_tail |
453 | | |
454 | | /** Replace an item in a dlist |
455 | | * |
456 | | * @param list_head in which the original item is. |
457 | | * @param item to replace. |
458 | | * @param ptr replacement item. |
459 | | * @return |
460 | | * - The item replaced |
461 | | * - NULL if nothing replaced |
462 | | */ |
463 | | static inline CC_HINT(nonnull) void *fr_tlist_replace(fr_tlist_head_t *list_head, void *item, void *ptr) |
464 | 0 | { |
465 | 0 | fr_tlist_t *item_entry; |
466 | 0 | fr_tlist_t *ptr_entry; |
467 | 0 |
|
468 | 0 | if (!fr_tlist_in_list(list_head, item)) return NULL; |
469 | 0 |
|
470 | 0 | ptr_entry = fr_tlist_item_to_entry(list_head, ptr); |
471 | 0 | fr_dlist_replace(&list_head->dlist_head, item, ptr); |
472 | 0 | ptr_entry->list_head = list_head; |
473 | 0 |
|
474 | 0 | item_entry = fr_tlist_item_to_entry(list_head, item); |
475 | 0 | item_entry->list_head = NULL; |
476 | 0 |
|
477 | 0 | return item; |
478 | 0 | } Unexecuted instantiation: fuzzer.c:fr_tlist_replace Unexecuted instantiation: decode.c:fr_tlist_replace Unexecuted instantiation: dl.c:fr_tlist_replace Unexecuted instantiation: edit.c:fr_tlist_replace Unexecuted instantiation: encode.c:fr_tlist_replace Unexecuted instantiation: packet.c:fr_tlist_replace Unexecuted instantiation: pair.c:fr_tlist_replace Unexecuted instantiation: pair_inline.c:fr_tlist_replace Unexecuted instantiation: pair_legacy.c:fr_tlist_replace Unexecuted instantiation: pair_print.c:fr_tlist_replace Unexecuted instantiation: pair_tokenize.c:fr_tlist_replace Unexecuted instantiation: print.c:fr_tlist_replace Unexecuted instantiation: proto.c:fr_tlist_replace Unexecuted instantiation: stats.c:fr_tlist_replace Unexecuted instantiation: struct.c:fr_tlist_replace Unexecuted instantiation: base.c:fr_tlist_replace Unexecuted instantiation: list.c:fr_tlist_replace Unexecuted instantiation: tcp.c:fr_tlist_replace Unexecuted instantiation: abinary.c:fr_tlist_replace Unexecuted instantiation: vmps.c:fr_tlist_replace Unexecuted instantiation: raw.c:fr_tlist_replace Unexecuted instantiation: udp.c:fr_tlist_replace |
479 | | |
480 | | |
481 | | /** Check all items in the list are valid |
482 | | * |
483 | | * Checks item talloc headers and types to ensure they're consistent |
484 | | * with what we expect. |
485 | | * |
486 | | * Does nothing if the list was not initialised with #fr_tlist_talloc_init. |
487 | | */ |
488 | | #ifndef TALLOC_GET_TYPE_ABORT_NOOP |
489 | | static inline CC_HINT(nonnull) void fr_tlist_verify(char const *file, int line, fr_tlist_head_t const *list_head) |
490 | 0 | { |
491 | 0 | void *item; |
492 | 0 |
|
493 | 0 | if (!tlist_type(list_head)) return; |
494 | 0 |
|
495 | 0 | fr_assert_msg(fr_tlist_initialised(list_head), "CONSISTENCY CHECK FAILED %s[%i]: tlist not initialised", |
496 | 0 | file, line); |
497 | 0 |
|
498 | 0 | for (item = fr_tlist_head(list_head); |
499 | 0 | item; |
500 | 0 | item = fr_tlist_next(list_head, item)) { |
501 | 0 | fr_tlist_t *entry = fr_tlist_item_to_entry(list_head, item); |
502 | 0 |
|
503 | 0 | fr_assert_msg(entry->list_head == list_head, "CONSISTENCY CHECK FAILED %s[%i]: tlist entry %p has wrong parent", |
504 | 0 | file, line, entry); |
505 | 0 |
|
506 | 0 | item = _talloc_get_type_abort(item, tlist_type(list_head), __location__); |
507 | 0 |
|
508 | 0 | if (entry->children) { |
509 | 0 | fr_assert_msg(tlist_type(entry->children) != NULL, "CONSISTENCY CHECK FAILED %s[%i]: tlist entry %p has non-talloc'd child list", |
510 | 0 | file, line, entry); |
511 | 0 |
|
512 | 0 | fr_assert_msg(strcmp(tlist_type(entry->children), tlist_type(list_head)) == 0, |
513 | 0 | "CONSISTENCY CHECK FAILED %s[%i]: tlist entry %p has different child type from parent", |
514 | 0 | file, line, entry); |
515 | 0 |
|
516 | 0 | fr_tlist_verify(file, line, entry->children); |
517 | 0 | } |
518 | 0 | } |
519 | 0 | } Unexecuted instantiation: fuzzer.c:fr_tlist_verify Unexecuted instantiation: decode.c:fr_tlist_verify Unexecuted instantiation: dl.c:fr_tlist_verify Unexecuted instantiation: edit.c:fr_tlist_verify Unexecuted instantiation: encode.c:fr_tlist_verify Unexecuted instantiation: packet.c:fr_tlist_verify Unexecuted instantiation: pair.c:fr_tlist_verify Unexecuted instantiation: pair_inline.c:fr_tlist_verify Unexecuted instantiation: pair_legacy.c:fr_tlist_verify Unexecuted instantiation: pair_print.c:fr_tlist_verify Unexecuted instantiation: pair_tokenize.c:fr_tlist_verify Unexecuted instantiation: print.c:fr_tlist_verify Unexecuted instantiation: proto.c:fr_tlist_verify Unexecuted instantiation: stats.c:fr_tlist_verify Unexecuted instantiation: struct.c:fr_tlist_verify Unexecuted instantiation: base.c:fr_tlist_verify Unexecuted instantiation: list.c:fr_tlist_verify Unexecuted instantiation: tcp.c:fr_tlist_verify Unexecuted instantiation: abinary.c:fr_tlist_verify Unexecuted instantiation: vmps.c:fr_tlist_verify Unexecuted instantiation: raw.c:fr_tlist_verify Unexecuted instantiation: udp.c:fr_tlist_verify |
520 | | # define FR_TLIST_VERIFY(_head) fr_tlist_verify(__FILE__, __LINE__, _head) |
521 | | #elif !defined(NDEBUG) |
522 | | # define FR_TLIST_VERIFY(_head) fr_assert(_head) |
523 | | #else |
524 | | # define FR_TLIST_VERIFY(_head) |
525 | | #endif |
526 | | |
527 | | |
528 | | /** Merge two lists, inserting the source at the tail of the destination |
529 | | * |
530 | | * @return |
531 | | * - 0 on success. |
532 | | * - -1 on failure. |
533 | | */ |
534 | | static inline CC_HINT(nonnull) int fr_tlist_move(fr_tlist_head_t *list_dst, fr_tlist_head_t *list_src) |
535 | 1.04M | { |
536 | 1.04M | void *item; |
537 | | |
538 | 1.04M | #ifdef WITH_VERIFY_PTR |
539 | | /* |
540 | | * Must be both talloced or both not |
541 | | */ |
542 | 1.04M | if (!fr_cond_assert((tlist_type(list_dst) && tlist_type(list_src)) || (!tlist_type(list_dst) && !tlist_type(list_src)))) return -1; |
543 | | |
544 | | /* |
545 | | * Must be of the same type |
546 | | */ |
547 | 1.04M | if (!fr_cond_assert(!tlist_type(list_dst) || (strcmp(tlist_type(list_dst), tlist_type(list_src)) == 0))) return -1; |
548 | 1.04M | #endif |
549 | | |
550 | 1.04M | item = fr_dlist_head(&list_src->dlist_head); |
551 | 1.04M | if (!item) return 0; |
552 | | |
553 | 1.04M | if (fr_dlist_move(&list_dst->dlist_head, &list_src->dlist_head) < 0) return -1; |
554 | | |
555 | | /* |
556 | | * Update new parent from the middle of the list to the end. |
557 | | */ |
558 | 1.93M | do { |
559 | 1.93M | fr_tlist_t *entry = fr_tlist_item_to_entry(list_src, item); |
560 | 1.93M | entry->list_head = list_dst; |
561 | 1.93M | } while ((item = fr_dlist_next(&list_dst->dlist_head, item)) != NULL); |
562 | | |
563 | 1.04M | return 0; |
564 | 1.04M | } Unexecuted instantiation: fuzzer.c:fr_tlist_move Unexecuted instantiation: decode.c:fr_tlist_move Unexecuted instantiation: dl.c:fr_tlist_move Unexecuted instantiation: edit.c:fr_tlist_move Unexecuted instantiation: encode.c:fr_tlist_move Unexecuted instantiation: packet.c:fr_tlist_move Unexecuted instantiation: pair.c:fr_tlist_move pair_inline.c:fr_tlist_move Line | Count | Source | 535 | 1.04M | { | 536 | 1.04M | void *item; | 537 | | | 538 | 1.04M | #ifdef WITH_VERIFY_PTR | 539 | | /* | 540 | | * Must be both talloced or both not | 541 | | */ | 542 | 1.04M | if (!fr_cond_assert((tlist_type(list_dst) && tlist_type(list_src)) || (!tlist_type(list_dst) && !tlist_type(list_src)))) return -1; | 543 | | | 544 | | /* | 545 | | * Must be of the same type | 546 | | */ | 547 | 1.04M | if (!fr_cond_assert(!tlist_type(list_dst) || (strcmp(tlist_type(list_dst), tlist_type(list_src)) == 0))) return -1; | 548 | 1.04M | #endif | 549 | | | 550 | 1.04M | item = fr_dlist_head(&list_src->dlist_head); | 551 | 1.04M | if (!item) return 0; | 552 | | | 553 | 1.04M | if (fr_dlist_move(&list_dst->dlist_head, &list_src->dlist_head) < 0) return -1; | 554 | | | 555 | | /* | 556 | | * Update new parent from the middle of the list to the end. | 557 | | */ | 558 | 1.93M | do { | 559 | 1.93M | fr_tlist_t *entry = fr_tlist_item_to_entry(list_src, item); | 560 | 1.93M | entry->list_head = list_dst; | 561 | 1.93M | } while ((item = fr_dlist_next(&list_dst->dlist_head, item)) != NULL); | 562 | | | 563 | 1.04M | return 0; | 564 | 1.04M | } |
Unexecuted instantiation: pair_legacy.c:fr_tlist_move Unexecuted instantiation: pair_print.c:fr_tlist_move Unexecuted instantiation: pair_tokenize.c:fr_tlist_move Unexecuted instantiation: print.c:fr_tlist_move Unexecuted instantiation: proto.c:fr_tlist_move Unexecuted instantiation: stats.c:fr_tlist_move Unexecuted instantiation: struct.c:fr_tlist_move Unexecuted instantiation: base.c:fr_tlist_move Unexecuted instantiation: list.c:fr_tlist_move Unexecuted instantiation: tcp.c:fr_tlist_move Unexecuted instantiation: abinary.c:fr_tlist_move Unexecuted instantiation: vmps.c:fr_tlist_move Unexecuted instantiation: raw.c:fr_tlist_move Unexecuted instantiation: udp.c:fr_tlist_move |
565 | | |
566 | | /** Merge two lists, inserting the source at the head of the destination |
567 | | * |
568 | | * @return |
569 | | * - 0 on success. |
570 | | * - -1 on failure. |
571 | | */ |
572 | | static inline CC_HINT(nonnull) int fr_tlist_move_head(fr_tlist_head_t *list_dst, fr_tlist_head_t *list_src) |
573 | 0 | { |
574 | 0 | void *item, *middle; |
575 | |
|
576 | 0 | #ifdef WITH_VERIFY_PTR |
577 | | /* |
578 | | * Must be both talloced or both not |
579 | | */ |
580 | 0 | if (!fr_cond_assert((tlist_type(list_dst) && tlist_type(list_src)) || (!tlist_type(list_dst) && !tlist_type(list_src)))) return -1; |
581 | | |
582 | | /* |
583 | | * Must be of the same type |
584 | | */ |
585 | 0 | if (!fr_cond_assert(!tlist_type(list_dst) || (strcmp(tlist_type(list_dst), tlist_type(list_src)) == 0))) return -1; |
586 | 0 | #endif |
587 | | |
588 | 0 | middle = fr_dlist_head(&list_dst->dlist_head); |
589 | |
|
590 | 0 | if (fr_dlist_move_head(&list_dst->dlist_head, &list_src->dlist_head) < 0) return -1; |
591 | | |
592 | | /* |
593 | | * Update new parent from the start of the list to the middle. |
594 | | */ |
595 | 0 | for (item = fr_tlist_head(list_dst); |
596 | 0 | item && (item != middle); |
597 | 0 | item = fr_tlist_next(list_dst, item)) { |
598 | 0 | fr_tlist_t *entry = fr_tlist_item_to_entry(list_src, item); |
599 | 0 | entry->list_head = list_dst; |
600 | 0 | } |
601 | |
|
602 | 0 | return 0; |
603 | 0 | } Unexecuted instantiation: fuzzer.c:fr_tlist_move_head Unexecuted instantiation: decode.c:fr_tlist_move_head Unexecuted instantiation: dl.c:fr_tlist_move_head Unexecuted instantiation: edit.c:fr_tlist_move_head Unexecuted instantiation: encode.c:fr_tlist_move_head Unexecuted instantiation: packet.c:fr_tlist_move_head Unexecuted instantiation: pair.c:fr_tlist_move_head Unexecuted instantiation: pair_inline.c:fr_tlist_move_head Unexecuted instantiation: pair_legacy.c:fr_tlist_move_head Unexecuted instantiation: pair_print.c:fr_tlist_move_head Unexecuted instantiation: pair_tokenize.c:fr_tlist_move_head Unexecuted instantiation: print.c:fr_tlist_move_head Unexecuted instantiation: proto.c:fr_tlist_move_head Unexecuted instantiation: stats.c:fr_tlist_move_head Unexecuted instantiation: struct.c:fr_tlist_move_head Unexecuted instantiation: base.c:fr_tlist_move_head Unexecuted instantiation: list.c:fr_tlist_move_head Unexecuted instantiation: tcp.c:fr_tlist_move_head Unexecuted instantiation: abinary.c:fr_tlist_move_head Unexecuted instantiation: vmps.c:fr_tlist_move_head Unexecuted instantiation: raw.c:fr_tlist_move_head Unexecuted instantiation: udp.c:fr_tlist_move_head |
604 | | |
605 | | /** Free the first item in the list |
606 | | * |
607 | | * @param[in] list_head to free head item in. |
608 | | */ |
609 | | static inline void fr_tlist_talloc_free_head(fr_tlist_head_t *list_head) |
610 | 0 | { |
611 | 0 | talloc_free(fr_tlist_pop_head(list_head)); |
612 | 0 | } Unexecuted instantiation: fuzzer.c:fr_tlist_talloc_free_head Unexecuted instantiation: decode.c:fr_tlist_talloc_free_head Unexecuted instantiation: dl.c:fr_tlist_talloc_free_head Unexecuted instantiation: edit.c:fr_tlist_talloc_free_head Unexecuted instantiation: encode.c:fr_tlist_talloc_free_head Unexecuted instantiation: packet.c:fr_tlist_talloc_free_head Unexecuted instantiation: pair.c:fr_tlist_talloc_free_head Unexecuted instantiation: pair_inline.c:fr_tlist_talloc_free_head Unexecuted instantiation: pair_legacy.c:fr_tlist_talloc_free_head Unexecuted instantiation: pair_print.c:fr_tlist_talloc_free_head Unexecuted instantiation: pair_tokenize.c:fr_tlist_talloc_free_head Unexecuted instantiation: print.c:fr_tlist_talloc_free_head Unexecuted instantiation: proto.c:fr_tlist_talloc_free_head Unexecuted instantiation: stats.c:fr_tlist_talloc_free_head Unexecuted instantiation: struct.c:fr_tlist_talloc_free_head Unexecuted instantiation: base.c:fr_tlist_talloc_free_head Unexecuted instantiation: list.c:fr_tlist_talloc_free_head Unexecuted instantiation: tcp.c:fr_tlist_talloc_free_head Unexecuted instantiation: abinary.c:fr_tlist_talloc_free_head Unexecuted instantiation: vmps.c:fr_tlist_talloc_free_head Unexecuted instantiation: raw.c:fr_tlist_talloc_free_head Unexecuted instantiation: udp.c:fr_tlist_talloc_free_head |
613 | | |
614 | | /** Free the last item in the list |
615 | | * |
616 | | * @param[in] list_head to free tail item in. |
617 | | */ |
618 | | static inline void fr_tlist_talloc_free_tail(fr_tlist_head_t *list_head) |
619 | 0 | { |
620 | 0 | talloc_free(fr_tlist_pop_head(list_head)); |
621 | 0 | } Unexecuted instantiation: fuzzer.c:fr_tlist_talloc_free_tail Unexecuted instantiation: decode.c:fr_tlist_talloc_free_tail Unexecuted instantiation: dl.c:fr_tlist_talloc_free_tail Unexecuted instantiation: edit.c:fr_tlist_talloc_free_tail Unexecuted instantiation: encode.c:fr_tlist_talloc_free_tail Unexecuted instantiation: packet.c:fr_tlist_talloc_free_tail Unexecuted instantiation: pair.c:fr_tlist_talloc_free_tail Unexecuted instantiation: pair_inline.c:fr_tlist_talloc_free_tail Unexecuted instantiation: pair_legacy.c:fr_tlist_talloc_free_tail Unexecuted instantiation: pair_print.c:fr_tlist_talloc_free_tail Unexecuted instantiation: pair_tokenize.c:fr_tlist_talloc_free_tail Unexecuted instantiation: print.c:fr_tlist_talloc_free_tail Unexecuted instantiation: proto.c:fr_tlist_talloc_free_tail Unexecuted instantiation: stats.c:fr_tlist_talloc_free_tail Unexecuted instantiation: struct.c:fr_tlist_talloc_free_tail Unexecuted instantiation: base.c:fr_tlist_talloc_free_tail Unexecuted instantiation: list.c:fr_tlist_talloc_free_tail Unexecuted instantiation: tcp.c:fr_tlist_talloc_free_tail Unexecuted instantiation: abinary.c:fr_tlist_talloc_free_tail Unexecuted instantiation: vmps.c:fr_tlist_talloc_free_tail Unexecuted instantiation: raw.c:fr_tlist_talloc_free_tail Unexecuted instantiation: udp.c:fr_tlist_talloc_free_tail |
622 | | |
623 | | /** Free the item specified |
624 | | * |
625 | | * @param[in] list_head to free item in. |
626 | | * @param[in] ptr to remove and free. |
627 | | * @return |
628 | | * - NULL if no more items in the list. |
629 | | * - Previous item in the list |
630 | | */ |
631 | | static inline void *fr_tlist_talloc_free_item(fr_tlist_head_t *list_head, void *ptr) |
632 | 0 | { |
633 | 0 | void *prev; |
634 | 0 |
|
635 | 0 | prev = fr_tlist_remove(list_head, ptr); |
636 | 0 | talloc_free(ptr); |
637 | 0 | return prev; |
638 | 0 | } Unexecuted instantiation: fuzzer.c:fr_tlist_talloc_free_item Unexecuted instantiation: decode.c:fr_tlist_talloc_free_item Unexecuted instantiation: dl.c:fr_tlist_talloc_free_item Unexecuted instantiation: edit.c:fr_tlist_talloc_free_item Unexecuted instantiation: encode.c:fr_tlist_talloc_free_item Unexecuted instantiation: packet.c:fr_tlist_talloc_free_item Unexecuted instantiation: pair.c:fr_tlist_talloc_free_item Unexecuted instantiation: pair_inline.c:fr_tlist_talloc_free_item Unexecuted instantiation: pair_legacy.c:fr_tlist_talloc_free_item Unexecuted instantiation: pair_print.c:fr_tlist_talloc_free_item Unexecuted instantiation: pair_tokenize.c:fr_tlist_talloc_free_item Unexecuted instantiation: print.c:fr_tlist_talloc_free_item Unexecuted instantiation: proto.c:fr_tlist_talloc_free_item Unexecuted instantiation: stats.c:fr_tlist_talloc_free_item Unexecuted instantiation: struct.c:fr_tlist_talloc_free_item Unexecuted instantiation: base.c:fr_tlist_talloc_free_item Unexecuted instantiation: list.c:fr_tlist_talloc_free_item Unexecuted instantiation: tcp.c:fr_tlist_talloc_free_item Unexecuted instantiation: abinary.c:fr_tlist_talloc_free_item Unexecuted instantiation: vmps.c:fr_tlist_talloc_free_item Unexecuted instantiation: raw.c:fr_tlist_talloc_free_item Unexecuted instantiation: udp.c:fr_tlist_talloc_free_item |
639 | | |
640 | | /** Free items in a doubly linked list (with talloc) |
641 | | * |
642 | | * @param[in] head of list to free. |
643 | | * @param[in] ptr remove and free from this to the tail. |
644 | | */ |
645 | | static inline void fr_tlist_talloc_free_to_tail(fr_tlist_head_t *head, void *ptr) |
646 | 0 | { |
647 | 0 | void *e = ptr, *p; |
648 | |
|
649 | 0 | if (!ptr) return; /* uninitialized means don't do anything */ |
650 | | |
651 | 0 | while (e) { |
652 | 0 | p = fr_tlist_next(head, e); |
653 | 0 | (void) fr_tlist_remove(head, e); |
654 | 0 | talloc_free(e); |
655 | 0 | e = p; |
656 | 0 | } |
657 | 0 | } Unexecuted instantiation: fuzzer.c:fr_tlist_talloc_free_to_tail Unexecuted instantiation: decode.c:fr_tlist_talloc_free_to_tail Unexecuted instantiation: dl.c:fr_tlist_talloc_free_to_tail Unexecuted instantiation: edit.c:fr_tlist_talloc_free_to_tail Unexecuted instantiation: encode.c:fr_tlist_talloc_free_to_tail Unexecuted instantiation: packet.c:fr_tlist_talloc_free_to_tail Unexecuted instantiation: pair.c:fr_tlist_talloc_free_to_tail Unexecuted instantiation: pair_inline.c:fr_tlist_talloc_free_to_tail Unexecuted instantiation: pair_legacy.c:fr_tlist_talloc_free_to_tail Unexecuted instantiation: pair_print.c:fr_tlist_talloc_free_to_tail Unexecuted instantiation: pair_tokenize.c:fr_tlist_talloc_free_to_tail Unexecuted instantiation: print.c:fr_tlist_talloc_free_to_tail Unexecuted instantiation: proto.c:fr_tlist_talloc_free_to_tail Unexecuted instantiation: stats.c:fr_tlist_talloc_free_to_tail Unexecuted instantiation: struct.c:fr_tlist_talloc_free_to_tail Unexecuted instantiation: base.c:fr_tlist_talloc_free_to_tail Unexecuted instantiation: list.c:fr_tlist_talloc_free_to_tail Unexecuted instantiation: tcp.c:fr_tlist_talloc_free_to_tail Unexecuted instantiation: abinary.c:fr_tlist_talloc_free_to_tail Unexecuted instantiation: vmps.c:fr_tlist_talloc_free_to_tail Unexecuted instantiation: raw.c:fr_tlist_talloc_free_to_tail Unexecuted instantiation: udp.c:fr_tlist_talloc_free_to_tail |
658 | | |
659 | | /** Free all items in a doubly linked list (with talloc) |
660 | | * |
661 | | * @param[in] head of list to free. |
662 | | */ |
663 | | static inline void fr_tlist_talloc_free(fr_tlist_head_t *head) |
664 | 122k | { |
665 | 122k | void *e = NULL, *p; |
666 | | |
667 | 1.89M | while ((e = fr_tlist_next(head, e))) { |
668 | 1.77M | p = fr_tlist_remove(head, e); |
669 | 1.77M | talloc_free(e); |
670 | 1.77M | e = p; |
671 | 1.77M | } |
672 | 122k | } Unexecuted instantiation: fuzzer.c:fr_tlist_talloc_free Unexecuted instantiation: decode.c:fr_tlist_talloc_free Unexecuted instantiation: dl.c:fr_tlist_talloc_free Unexecuted instantiation: edit.c:fr_tlist_talloc_free Unexecuted instantiation: encode.c:fr_tlist_talloc_free Unexecuted instantiation: packet.c:fr_tlist_talloc_free pair.c:fr_tlist_talloc_free Line | Count | Source | 664 | 117k | { | 665 | 117k | void *e = NULL, *p; | 666 | | | 667 | 1.86M | while ((e = fr_tlist_next(head, e))) { | 668 | 1.74M | p = fr_tlist_remove(head, e); | 669 | 1.74M | talloc_free(e); | 670 | 1.74M | e = p; | 671 | 1.74M | } | 672 | 117k | } |
pair_inline.c:fr_tlist_talloc_free Line | Count | Source | 664 | 5.70k | { | 665 | 5.70k | void *e = NULL, *p; | 666 | | | 667 | 32.3k | while ((e = fr_tlist_next(head, e))) { | 668 | 26.6k | p = fr_tlist_remove(head, e); | 669 | 26.6k | talloc_free(e); | 670 | 26.6k | e = p; | 671 | 26.6k | } | 672 | 5.70k | } |
Unexecuted instantiation: pair_legacy.c:fr_tlist_talloc_free Unexecuted instantiation: pair_print.c:fr_tlist_talloc_free Unexecuted instantiation: pair_tokenize.c:fr_tlist_talloc_free Unexecuted instantiation: print.c:fr_tlist_talloc_free Unexecuted instantiation: proto.c:fr_tlist_talloc_free Unexecuted instantiation: stats.c:fr_tlist_talloc_free Unexecuted instantiation: struct.c:fr_tlist_talloc_free Unexecuted instantiation: base.c:fr_tlist_talloc_free Unexecuted instantiation: list.c:fr_tlist_talloc_free Unexecuted instantiation: tcp.c:fr_tlist_talloc_free Unexecuted instantiation: abinary.c:fr_tlist_talloc_free Unexecuted instantiation: vmps.c:fr_tlist_talloc_free Unexecuted instantiation: raw.c:fr_tlist_talloc_free Unexecuted instantiation: udp.c:fr_tlist_talloc_free |
673 | | |
674 | | /** Free all items in a doubly linked list from the tail backwards |
675 | | * |
676 | | * @param[in] head of list to free. |
677 | | */ |
678 | | static inline void fr_tlist_talloc_reverse_free(fr_tlist_head_t *head) |
679 | 0 | { |
680 | 0 | void *e = NULL, *p; |
681 | 0 |
|
682 | 0 | e = fr_tlist_tail(head); |
683 | 0 | do { |
684 | 0 | p = fr_tlist_remove(head, e); |
685 | 0 | talloc_free(e); |
686 | 0 | e = p; |
687 | 0 | } while (e); |
688 | 0 | } Unexecuted instantiation: fuzzer.c:fr_tlist_talloc_reverse_free Unexecuted instantiation: decode.c:fr_tlist_talloc_reverse_free Unexecuted instantiation: dl.c:fr_tlist_talloc_reverse_free Unexecuted instantiation: edit.c:fr_tlist_talloc_reverse_free Unexecuted instantiation: encode.c:fr_tlist_talloc_reverse_free Unexecuted instantiation: packet.c:fr_tlist_talloc_reverse_free Unexecuted instantiation: pair.c:fr_tlist_talloc_reverse_free Unexecuted instantiation: pair_inline.c:fr_tlist_talloc_reverse_free Unexecuted instantiation: pair_legacy.c:fr_tlist_talloc_reverse_free Unexecuted instantiation: pair_print.c:fr_tlist_talloc_reverse_free Unexecuted instantiation: pair_tokenize.c:fr_tlist_talloc_reverse_free Unexecuted instantiation: print.c:fr_tlist_talloc_reverse_free Unexecuted instantiation: proto.c:fr_tlist_talloc_reverse_free Unexecuted instantiation: stats.c:fr_tlist_talloc_reverse_free Unexecuted instantiation: struct.c:fr_tlist_talloc_reverse_free Unexecuted instantiation: base.c:fr_tlist_talloc_reverse_free Unexecuted instantiation: list.c:fr_tlist_talloc_reverse_free Unexecuted instantiation: tcp.c:fr_tlist_talloc_reverse_free Unexecuted instantiation: abinary.c:fr_tlist_talloc_reverse_free Unexecuted instantiation: vmps.c:fr_tlist_talloc_reverse_free Unexecuted instantiation: raw.c:fr_tlist_talloc_reverse_free Unexecuted instantiation: udp.c:fr_tlist_talloc_reverse_free |
689 | | |
690 | | /** Return the number of elements in the tlist |
691 | | * |
692 | | * @param[in] list_head of list to count elements for. |
693 | | */ |
694 | | static inline unsigned int fr_tlist_num_elements(fr_tlist_head_t const *list_head) |
695 | 6.35k | { |
696 | 6.35k | return fr_dlist_num_elements(&list_head->dlist_head); |
697 | 6.35k | } Unexecuted instantiation: fuzzer.c:fr_tlist_num_elements Unexecuted instantiation: decode.c:fr_tlist_num_elements Unexecuted instantiation: dl.c:fr_tlist_num_elements Unexecuted instantiation: edit.c:fr_tlist_num_elements Unexecuted instantiation: encode.c:fr_tlist_num_elements Unexecuted instantiation: packet.c:fr_tlist_num_elements Unexecuted instantiation: pair.c:fr_tlist_num_elements pair_inline.c:fr_tlist_num_elements Line | Count | Source | 695 | 6.35k | { | 696 | 6.35k | return fr_dlist_num_elements(&list_head->dlist_head); | 697 | 6.35k | } |
Unexecuted instantiation: pair_legacy.c:fr_tlist_num_elements Unexecuted instantiation: pair_print.c:fr_tlist_num_elements Unexecuted instantiation: pair_tokenize.c:fr_tlist_num_elements Unexecuted instantiation: print.c:fr_tlist_num_elements Unexecuted instantiation: proto.c:fr_tlist_num_elements Unexecuted instantiation: stats.c:fr_tlist_num_elements Unexecuted instantiation: struct.c:fr_tlist_num_elements Unexecuted instantiation: base.c:fr_tlist_num_elements Unexecuted instantiation: list.c:fr_tlist_num_elements Unexecuted instantiation: tcp.c:fr_tlist_num_elements Unexecuted instantiation: abinary.c:fr_tlist_num_elements Unexecuted instantiation: vmps.c:fr_tlist_num_elements Unexecuted instantiation: raw.c:fr_tlist_num_elements Unexecuted instantiation: udp.c:fr_tlist_num_elements |
698 | | |
699 | | /** Split phase of a merge sort of a dlist |
700 | | * |
701 | | * @note Only to be used within a merge sort |
702 | | * |
703 | | * @param[in] head of the original list being sorted |
704 | | * @param[in] source first item in the section of the list to split |
705 | | * @param[out] front first item of the first half of the split list |
706 | | * @param[out] back first item of the second half of the split list |
707 | | */ |
708 | | static inline void fr_tlist_sort_split(fr_tlist_head_t *head, void **source, void **front, void **back) |
709 | 0 | { |
710 | 0 | fr_dlist_sort_split(&head->dlist_head, source, front, back); |
711 | 0 | } Unexecuted instantiation: fuzzer.c:fr_tlist_sort_split Unexecuted instantiation: decode.c:fr_tlist_sort_split Unexecuted instantiation: dl.c:fr_tlist_sort_split Unexecuted instantiation: edit.c:fr_tlist_sort_split Unexecuted instantiation: encode.c:fr_tlist_sort_split Unexecuted instantiation: packet.c:fr_tlist_sort_split Unexecuted instantiation: pair.c:fr_tlist_sort_split Unexecuted instantiation: pair_inline.c:fr_tlist_sort_split Unexecuted instantiation: pair_legacy.c:fr_tlist_sort_split Unexecuted instantiation: pair_print.c:fr_tlist_sort_split Unexecuted instantiation: pair_tokenize.c:fr_tlist_sort_split Unexecuted instantiation: print.c:fr_tlist_sort_split Unexecuted instantiation: proto.c:fr_tlist_sort_split Unexecuted instantiation: stats.c:fr_tlist_sort_split Unexecuted instantiation: struct.c:fr_tlist_sort_split Unexecuted instantiation: base.c:fr_tlist_sort_split Unexecuted instantiation: list.c:fr_tlist_sort_split Unexecuted instantiation: tcp.c:fr_tlist_sort_split Unexecuted instantiation: abinary.c:fr_tlist_sort_split Unexecuted instantiation: vmps.c:fr_tlist_sort_split Unexecuted instantiation: raw.c:fr_tlist_sort_split Unexecuted instantiation: udp.c:fr_tlist_sort_split |
712 | | |
713 | | /** Merge phase of a merge sort of a dlist |
714 | | * |
715 | | * @note Only to be used within a merge sort |
716 | | * |
717 | | * @param[in] head of the original list being sorted |
718 | | * @param[in] a first element of first list being merged |
719 | | * @param[in] b first element of second list being merged |
720 | | * @param[in] cmp comparison function for the sort |
721 | | * @returns pointer to first item in merged list |
722 | | */ |
723 | | static inline void *fr_tlist_sort_merge(fr_tlist_head_t *head, void **a, void **b, fr_cmp_t cmp) |
724 | 0 | { |
725 | 0 | return fr_dlist_sort_merge(&head->dlist_head, a, b, cmp); |
726 | 0 | } Unexecuted instantiation: fuzzer.c:fr_tlist_sort_merge Unexecuted instantiation: decode.c:fr_tlist_sort_merge Unexecuted instantiation: dl.c:fr_tlist_sort_merge Unexecuted instantiation: edit.c:fr_tlist_sort_merge Unexecuted instantiation: encode.c:fr_tlist_sort_merge Unexecuted instantiation: packet.c:fr_tlist_sort_merge Unexecuted instantiation: pair.c:fr_tlist_sort_merge Unexecuted instantiation: pair_inline.c:fr_tlist_sort_merge Unexecuted instantiation: pair_legacy.c:fr_tlist_sort_merge Unexecuted instantiation: pair_print.c:fr_tlist_sort_merge Unexecuted instantiation: pair_tokenize.c:fr_tlist_sort_merge Unexecuted instantiation: print.c:fr_tlist_sort_merge Unexecuted instantiation: proto.c:fr_tlist_sort_merge Unexecuted instantiation: stats.c:fr_tlist_sort_merge Unexecuted instantiation: struct.c:fr_tlist_sort_merge Unexecuted instantiation: base.c:fr_tlist_sort_merge Unexecuted instantiation: list.c:fr_tlist_sort_merge Unexecuted instantiation: tcp.c:fr_tlist_sort_merge Unexecuted instantiation: abinary.c:fr_tlist_sort_merge Unexecuted instantiation: vmps.c:fr_tlist_sort_merge Unexecuted instantiation: raw.c:fr_tlist_sort_merge Unexecuted instantiation: udp.c:fr_tlist_sort_merge |
727 | | |
728 | | /** Recursive sort routine for tlist |
729 | | * |
730 | | * @param[in] head of the list being sorted |
731 | | * @param[in,out] ptr to the first item in the current section of the list being sorted. |
732 | | * @param[in] cmp comparison function to sort with |
733 | | */ |
734 | | static inline void fr_tlist_recursive_sort(fr_tlist_head_t *head, void **ptr, fr_cmp_t cmp) |
735 | 0 | { |
736 | 0 | fr_dlist_recursive_sort(&head->dlist_head, ptr, cmp); |
737 | 0 | } Unexecuted instantiation: fuzzer.c:fr_tlist_recursive_sort Unexecuted instantiation: decode.c:fr_tlist_recursive_sort Unexecuted instantiation: dl.c:fr_tlist_recursive_sort Unexecuted instantiation: edit.c:fr_tlist_recursive_sort Unexecuted instantiation: encode.c:fr_tlist_recursive_sort Unexecuted instantiation: packet.c:fr_tlist_recursive_sort Unexecuted instantiation: pair.c:fr_tlist_recursive_sort Unexecuted instantiation: pair_inline.c:fr_tlist_recursive_sort Unexecuted instantiation: pair_legacy.c:fr_tlist_recursive_sort Unexecuted instantiation: pair_print.c:fr_tlist_recursive_sort Unexecuted instantiation: pair_tokenize.c:fr_tlist_recursive_sort Unexecuted instantiation: print.c:fr_tlist_recursive_sort Unexecuted instantiation: proto.c:fr_tlist_recursive_sort Unexecuted instantiation: stats.c:fr_tlist_recursive_sort Unexecuted instantiation: struct.c:fr_tlist_recursive_sort Unexecuted instantiation: base.c:fr_tlist_recursive_sort Unexecuted instantiation: list.c:fr_tlist_recursive_sort Unexecuted instantiation: tcp.c:fr_tlist_recursive_sort Unexecuted instantiation: abinary.c:fr_tlist_recursive_sort Unexecuted instantiation: vmps.c:fr_tlist_recursive_sort Unexecuted instantiation: raw.c:fr_tlist_recursive_sort Unexecuted instantiation: udp.c:fr_tlist_recursive_sort |
738 | | |
739 | | /** Sort a tlist using merge sort |
740 | | * |
741 | | * @note This routine temporarily breaks the doubly linked nature of the list |
742 | | * |
743 | | * @param[in,out] list to sort |
744 | | * @param[in] cmp comparison function to sort with |
745 | | */ |
746 | | static inline void fr_tlist_sort(fr_tlist_head_t *list, fr_cmp_t cmp) |
747 | 0 | { |
748 | 0 | fr_dlist_sort(&list->dlist_head, cmp); |
749 | 0 | } Unexecuted instantiation: fuzzer.c:fr_tlist_sort Unexecuted instantiation: decode.c:fr_tlist_sort Unexecuted instantiation: dl.c:fr_tlist_sort Unexecuted instantiation: edit.c:fr_tlist_sort Unexecuted instantiation: encode.c:fr_tlist_sort Unexecuted instantiation: packet.c:fr_tlist_sort Unexecuted instantiation: pair.c:fr_tlist_sort Unexecuted instantiation: pair_inline.c:fr_tlist_sort Unexecuted instantiation: pair_legacy.c:fr_tlist_sort Unexecuted instantiation: pair_print.c:fr_tlist_sort Unexecuted instantiation: pair_tokenize.c:fr_tlist_sort Unexecuted instantiation: print.c:fr_tlist_sort Unexecuted instantiation: proto.c:fr_tlist_sort Unexecuted instantiation: stats.c:fr_tlist_sort Unexecuted instantiation: struct.c:fr_tlist_sort Unexecuted instantiation: base.c:fr_tlist_sort Unexecuted instantiation: list.c:fr_tlist_sort Unexecuted instantiation: tcp.c:fr_tlist_sort Unexecuted instantiation: abinary.c:fr_tlist_sort Unexecuted instantiation: vmps.c:fr_tlist_sort Unexecuted instantiation: raw.c:fr_tlist_sort Unexecuted instantiation: udp.c:fr_tlist_sort |
750 | | |
751 | | static inline void fr_tlist_noop(void) |
752 | 0 | { |
753 | 0 | return; |
754 | 0 | } Unexecuted instantiation: fuzzer.c:fr_tlist_noop Unexecuted instantiation: decode.c:fr_tlist_noop Unexecuted instantiation: dl.c:fr_tlist_noop Unexecuted instantiation: edit.c:fr_tlist_noop Unexecuted instantiation: encode.c:fr_tlist_noop Unexecuted instantiation: packet.c:fr_tlist_noop Unexecuted instantiation: pair.c:fr_tlist_noop Unexecuted instantiation: pair_inline.c:fr_tlist_noop Unexecuted instantiation: pair_legacy.c:fr_tlist_noop Unexecuted instantiation: pair_print.c:fr_tlist_noop Unexecuted instantiation: pair_tokenize.c:fr_tlist_noop Unexecuted instantiation: print.c:fr_tlist_noop Unexecuted instantiation: proto.c:fr_tlist_noop Unexecuted instantiation: stats.c:fr_tlist_noop Unexecuted instantiation: struct.c:fr_tlist_noop Unexecuted instantiation: base.c:fr_tlist_noop Unexecuted instantiation: list.c:fr_tlist_noop Unexecuted instantiation: tcp.c:fr_tlist_noop Unexecuted instantiation: abinary.c:fr_tlist_noop Unexecuted instantiation: vmps.c:fr_tlist_noop Unexecuted instantiation: raw.c:fr_tlist_noop Unexecuted instantiation: udp.c:fr_tlist_noop |
755 | | |
756 | | |
757 | | /** Expands to the type name used for the entry wrapper structure |
758 | | * |
759 | | * @param[in] _name Prefix we add to type-specific structures. |
760 | | * @return fr_tlist_<name>_entry_t |
761 | | */ |
762 | | #define FR_TLIST_ENTRY(_name) _name ## _entry_t |
763 | | |
764 | | /** Expands to the type name used for the head wrapper structure |
765 | | * |
766 | | * @param[in] _name Prefix we add to type-specific structures. |
767 | | * @return fr_tlist_<name>_head_t |
768 | | */ |
769 | 4.78M | #define FR_TLIST_HEAD(_name) _name ## _head_t |
770 | | |
771 | | /** Define type specific wrapper structs for tlists |
772 | | * |
773 | | * @note This macro should be used inside the header for the area of code |
774 | | * which will use type specific functions. |
775 | | */ |
776 | | #define FR_TLIST_TYPES(_name) \ |
777 | | typedef struct { fr_tlist_t entry; } FR_TLIST_ENTRY(_name); \ |
778 | | typedef struct { fr_tlist_head_t head; } FR_TLIST_HEAD(_name); \ |
779 | | |
780 | | |
781 | | /** Define type specific wrapper functions for tlists |
782 | | * |
783 | | * @note This macro should be used inside the source file that will use |
784 | | * the type specific functions. |
785 | | * |
786 | | * @param[in] _name Prefix we add to type-specific tlist functions. |
787 | | * @param[in] _element_type Type of structure that'll be inserted into the tlist. |
788 | | * @param[in] _element_entry Field in the _element_type that holds the tlist entry information. |
789 | | */ |
790 | | #define FR_TLIST_FUNCS(_name, _element_type, _element_entry) \ |
791 | | DIAG_OFF(unused-function) \ |
792 | | _Static_assert(IS_FIELD_COMPATIBLE(_element_type, _element_entry, FR_TLIST_ENTRY(_name)) == 1, "Bad tlist entry field type");\ |
793 | | static inline fr_tlist_head_t *_name ## _list_head(FR_TLIST_HEAD(_name) const *list) \ |
794 | 0 | { return UNCONST(fr_tlist_head_t *, &list->head); } \ Unexecuted instantiation: pair.c:fr_pair_order_list_list_head Unexecuted instantiation: pair_inline.c:fr_pair_order_list_list_head |
795 | | \ |
796 | | static inline fr_dlist_head_t *_name ## _dlist_head(FR_TLIST_HEAD(_name) const *list) \ |
797 | 0 | { return UNCONST(fr_dlist_head_t *, &list->head.dlist_head); } \ Unexecuted instantiation: pair.c:fr_pair_order_list_dlist_head Unexecuted instantiation: pair_inline.c:fr_pair_order_list_dlist_head |
798 | | \ |
799 | | static inline void _name ## _entry_init(_element_type *entry) \ |
800 | 3.71M | { \ |
801 | 3.71M | _Generic((&entry->_element_entry), \ |
802 | 3.71M | FR_TLIST_ENTRY(_name) *: fr_tlist_entry_init(UNCONST(fr_tlist_t *, &entry->_element_entry.entry)), \ |
803 | 3.71M | FR_TLIST_ENTRY(_name) const *: fr_tlist_noop()\ |
804 | 3.71M | ); \ |
805 | 3.71M | } \ pair.c:fr_pair_order_list_entry_init Line | Count | Source | 800 | 3.71M | { \ | 801 | 3.71M | _Generic((&entry->_element_entry), \ | 802 | 3.71M | FR_TLIST_ENTRY(_name) *: fr_tlist_entry_init(UNCONST(fr_tlist_t *, &entry->_element_entry.entry)), \ | 803 | 3.71M | FR_TLIST_ENTRY(_name) const *: fr_tlist_noop()\ | 804 | 3.71M | ); \ | 805 | 3.71M | } \ |
Unexecuted instantiation: pair_inline.c:fr_pair_order_list_entry_init |
806 | | \ |
807 | | static inline void _name ## _init(FR_TLIST_HEAD(_name) *list) \ |
808 | 0 | { _fr_tlist_init(&list->head, offsetof(_element_type, _element_entry), NULL); } \ Unexecuted instantiation: pair.c:fr_pair_order_list_init Unexecuted instantiation: pair_inline.c:fr_pair_order_list_init |
809 | | \ |
810 | | static inline void _name ## _talloc_init(FR_TLIST_HEAD(_name) *list) \ |
811 | 1.41M | { _fr_tlist_init(&list->head, offsetof(_element_type, _element_entry), #_element_type); } \ pair.c:fr_pair_order_list_talloc_init Line | Count | Source | 811 | 1.41M | { _fr_tlist_init(&list->head, offsetof(_element_type, _element_entry), #_element_type); } \ |
Unexecuted instantiation: pair_inline.c:fr_pair_order_list_talloc_init |
812 | | \ |
813 | | static inline void _name ## _clear(FR_TLIST_HEAD(_name) *list) \ |
814 | 0 | { fr_tlist_clear(&list->head); } \ Unexecuted instantiation: pair.c:fr_pair_order_list_clear Unexecuted instantiation: pair_inline.c:fr_pair_order_list_clear |
815 | | \ |
816 | | static inline bool _name ## _in_list(FR_TLIST_HEAD(_name) *list, _element_type *ptr) \ |
817 | 0 | { return fr_tlist_in_list(&list->head, ptr); } \ Unexecuted instantiation: pair.c:fr_pair_order_list_in_list Unexecuted instantiation: pair_inline.c:fr_pair_order_list_in_list |
818 | | \ |
819 | | static inline bool _name ## _in_a_list(_element_type *ptr) \ |
820 | 7.30M | { return fr_tlist_entry_in_a_list(&ptr->_element_entry.entry); } \ pair.c:fr_pair_order_list_in_a_list Line | Count | Source | 820 | 7.30M | { return fr_tlist_entry_in_a_list(&ptr->_element_entry.entry); } \ |
Unexecuted instantiation: pair_inline.c:fr_pair_order_list_in_a_list |
821 | | \ |
822 | | static inline int _name ## _insert_head(FR_TLIST_HEAD(_name) *list, _element_type *ptr) \ |
823 | 0 | { return fr_tlist_insert_head(&list->head, ptr); } \ Unexecuted instantiation: pair.c:fr_pair_order_list_insert_head Unexecuted instantiation: pair_inline.c:fr_pair_order_list_insert_head |
824 | | \ |
825 | | static inline int _name ## _insert_tail(FR_TLIST_HEAD(_name) *list, _element_type *ptr) \ |
826 | 3.65M | { return fr_tlist_insert_tail(&list->head, ptr); } \ pair.c:fr_pair_order_list_insert_tail Line | Count | Source | 826 | 3.65M | { return fr_tlist_insert_tail(&list->head, ptr); } \ |
Unexecuted instantiation: pair_inline.c:fr_pair_order_list_insert_tail |
827 | | \ |
828 | | static inline int _name ## _insert_after(FR_TLIST_HEAD(_name) *list, _element_type *pos, _element_type *ptr) \ |
829 | 0 | { return fr_tlist_insert_after(&list->head, pos, ptr); } \ Unexecuted instantiation: pair.c:fr_pair_order_list_insert_after Unexecuted instantiation: pair_inline.c:fr_pair_order_list_insert_after |
830 | | \ |
831 | | static inline int _name ## _insert_before(FR_TLIST_HEAD(_name) *list, _element_type *pos, _element_type *ptr) \ |
832 | 0 | { return fr_tlist_insert_before(&list->head, pos, ptr); } \ Unexecuted instantiation: pair.c:fr_pair_order_list_insert_before Unexecuted instantiation: pair_inline.c:fr_pair_order_list_insert_before |
833 | | \ |
834 | | static inline _element_type *_name ## _head(FR_TLIST_HEAD(_name) const *list) \ |
835 | 206k | { return fr_tlist_head(&list->head); } \ pair.c:fr_pair_order_list_head Line | Count | Source | 835 | 206k | { return fr_tlist_head(&list->head); } \ |
Unexecuted instantiation: pair_inline.c:fr_pair_order_list_head |
836 | | \ |
837 | | static inline bool _name ## _empty(FR_TLIST_HEAD(_name) const *list) \ |
838 | 280k | { return fr_tlist_empty(&list->head); } \ pair.c:fr_pair_order_list_empty Line | Count | Source | 838 | 280k | { return fr_tlist_empty(&list->head); } \ |
Unexecuted instantiation: pair_inline.c:fr_pair_order_list_empty |
839 | | \ |
840 | | static inline bool _name ## _initialised(FR_TLIST_HEAD(_name) const *list) \ |
841 | 0 | { return fr_tlist_initialised(&list->head); } \ Unexecuted instantiation: pair.c:fr_pair_order_list_initialised Unexecuted instantiation: pair_inline.c:fr_pair_order_list_initialised |
842 | | \ |
843 | | static inline _element_type *_name ## _tail(FR_TLIST_HEAD(_name) const *list) \ |
844 | 21.1k | { return fr_tlist_tail(&list->head); } \ Unexecuted instantiation: pair.c:fr_pair_order_list_tail pair_inline.c:fr_pair_order_list_tail Line | Count | Source | 844 | 21.1k | { return fr_tlist_tail(&list->head); } \ |
|
845 | | \ |
846 | | static inline _element_type *_name ## _next(FR_TLIST_HEAD(_name) const *list, _element_type const *ptr) \ |
847 | 3.42M | { return fr_tlist_next(&list->head, ptr); } \ pair.c:fr_pair_order_list_next Line | Count | Source | 847 | 3.42M | { return fr_tlist_next(&list->head, ptr); } \ |
Unexecuted instantiation: pair_inline.c:fr_pair_order_list_next |
848 | | \ |
849 | | static inline _element_type *_name ## _prev(FR_TLIST_HEAD(_name) const *list, _element_type const *ptr) \ |
850 | 0 | { return fr_tlist_prev(&list->head, ptr); } \ Unexecuted instantiation: pair.c:fr_pair_order_list_prev Unexecuted instantiation: pair_inline.c:fr_pair_order_list_prev |
851 | | \ |
852 | | static inline _element_type *_name ## _remove(FR_TLIST_HEAD(_name) *list, _element_type *ptr) \ |
853 | 1.61k | { return fr_tlist_remove(&list->head, ptr); } \ pair.c:fr_pair_order_list_remove Line | Count | Source | 853 | 1.61k | { return fr_tlist_remove(&list->head, ptr); } \ |
Unexecuted instantiation: pair_inline.c:fr_pair_order_list_remove |
854 | | \ |
855 | | static inline _element_type *_name ## _pop_head(FR_TLIST_HEAD(_name) *list) \ |
856 | 0 | { return fr_tlist_pop_head(&list->head); } \ Unexecuted instantiation: pair.c:fr_pair_order_list_pop_head Unexecuted instantiation: pair_inline.c:fr_pair_order_list_pop_head |
857 | | \ |
858 | | static inline _element_type *_name ## _pop_tail(FR_TLIST_HEAD(_name) *list) \ |
859 | 0 | { return fr_tlist_pop_tail(&list->head); } \ Unexecuted instantiation: pair.c:fr_pair_order_list_pop_tail Unexecuted instantiation: pair_inline.c:fr_pair_order_list_pop_tail |
860 | | \ |
861 | | static inline _element_type *_name ## _replace(FR_TLIST_HEAD(_name) *list, _element_type *item, _element_type *ptr) \ |
862 | 0 | { return fr_tlist_replace(&list->head, item, ptr); } \ Unexecuted instantiation: pair.c:fr_pair_order_list_replace Unexecuted instantiation: pair_inline.c:fr_pair_order_list_replace |
863 | | \ |
864 | | static inline int _name ## _move(FR_TLIST_HEAD(_name) *dst, FR_TLIST_HEAD(_name) *src) \ |
865 | 1.04M | { return fr_tlist_move(&dst->head, &src->head); } \ Unexecuted instantiation: pair.c:fr_pair_order_list_move pair_inline.c:fr_pair_order_list_move Line | Count | Source | 865 | 1.04M | { return fr_tlist_move(&dst->head, &src->head); } \ |
|
866 | | \ |
867 | | static inline int _name ## _move_head(FR_TLIST_HEAD(_name) *dst, FR_TLIST_HEAD(_name) *src) \ |
868 | 0 | { return fr_tlist_move_head(&dst->head, &src->head); } \ Unexecuted instantiation: pair.c:fr_pair_order_list_move_head Unexecuted instantiation: pair_inline.c:fr_pair_order_list_move_head |
869 | | \ |
870 | | static inline void _name ## _talloc_free_head(FR_TLIST_HEAD(_name) *list) \ |
871 | 0 | { fr_tlist_talloc_free_head(&list->head); } \ Unexecuted instantiation: pair.c:fr_pair_order_list_talloc_free_head Unexecuted instantiation: pair_inline.c:fr_pair_order_list_talloc_free_head |
872 | | \ |
873 | | static inline void _name ## _talloc_free_tail(FR_TLIST_HEAD(_name) *list) \ |
874 | 0 | { fr_tlist_talloc_free_tail(&list->head); } \ Unexecuted instantiation: pair.c:fr_pair_order_list_talloc_free_tail Unexecuted instantiation: pair_inline.c:fr_pair_order_list_talloc_free_tail |
875 | | \ |
876 | | static inline void _name ## _talloc_free_item(FR_TLIST_HEAD(_name) *list, _element_type *ptr) \ |
877 | 0 | { fr_tlist_talloc_free_item(&list->head, ptr); } \ Unexecuted instantiation: pair.c:fr_pair_order_list_talloc_free_item Unexecuted instantiation: pair_inline.c:fr_pair_order_list_talloc_free_item |
878 | | \ |
879 | | static inline void _name ## _talloc_free(FR_TLIST_HEAD(_name) *list) \ |
880 | 122k | { fr_tlist_talloc_free(&list->head); } \ pair.c:fr_pair_order_list_talloc_free Line | Count | Source | 880 | 117k | { fr_tlist_talloc_free(&list->head); } \ |
pair_inline.c:fr_pair_order_list_talloc_free Line | Count | Source | 880 | 5.70k | { fr_tlist_talloc_free(&list->head); } \ |
|
881 | | \ |
882 | | static inline void _name ## _talloc_free_to_tail(FR_TLIST_HEAD(_name) *list, _element_type *ptr) \ |
883 | 0 | { fr_tlist_talloc_free_to_tail(&list->head, ptr); } \ Unexecuted instantiation: pair.c:fr_pair_order_list_talloc_free_to_tail Unexecuted instantiation: pair_inline.c:fr_pair_order_list_talloc_free_to_tail |
884 | | \ |
885 | | static inline void _name ## _talloc_reverse_free(FR_TLIST_HEAD(_name) *list) \ |
886 | 0 | { fr_tlist_talloc_reverse_free(&list->head); } \ Unexecuted instantiation: pair.c:fr_pair_order_list_talloc_reverse_free Unexecuted instantiation: pair_inline.c:fr_pair_order_list_talloc_reverse_free |
887 | | \ |
888 | | static inline unsigned int _name ## _num_elements(FR_TLIST_HEAD(_name) const *list) \ |
889 | 6.35k | { return fr_tlist_num_elements(&list->head); } \ Unexecuted instantiation: pair.c:fr_pair_order_list_num_elements pair_inline.c:fr_pair_order_list_num_elements Line | Count | Source | 889 | 6.35k | { return fr_tlist_num_elements(&list->head); } \ |
|
890 | | \ |
891 | | static inline void _name ## _sort(FR_TLIST_HEAD(_name) *list, fr_cmp_t cmp) \ |
892 | 0 | { fr_tlist_sort(&list->head, cmp); } \ Unexecuted instantiation: pair.c:fr_pair_order_list_sort Unexecuted instantiation: pair_inline.c:fr_pair_order_list_sort |
893 | | \ |
894 | | static inline FR_TLIST_HEAD(_name) *_name ## _parent(const _element_type *ptr) \ |
895 | 5.84M | { return (FR_TLIST_HEAD(_name) *) (ptr->_element_entry.entry.list_head); } \ pair.c:fr_pair_order_list_parent Line | Count | Source | 895 | 5.84M | { return (FR_TLIST_HEAD(_name) *) (ptr->_element_entry.entry.list_head); } \ |
Unexecuted instantiation: pair_inline.c:fr_pair_order_list_parent |
896 | | \ |
897 | | static inline FR_TLIST_HEAD(_name) *_name ## _children(_element_type *ptr) \ |
898 | 0 | { return (FR_TLIST_HEAD(_name) *) (ptr->_element_entry.entry.children); } \ Unexecuted instantiation: pair.c:fr_pair_order_list_children Unexecuted instantiation: pair_inline.c:fr_pair_order_list_children |
899 | | \ |
900 | | static inline void _name ## _talloc_init_children(_element_type *ptr, FR_TLIST_HEAD(_name) *children) \ |
901 | 117k | { _name ## _talloc_init(children); ptr->_element_entry.entry.children = &children->head; } \ pair.c:fr_pair_order_list_talloc_init_children Line | Count | Source | 901 | 117k | { _name ## _talloc_init(children); ptr->_element_entry.entry.children = &children->head; } \ |
Unexecuted instantiation: pair_inline.c:fr_pair_order_list_talloc_init_children |
902 | | \ |
903 | | static inline void _name ## _add_children(_element_type *ptr, FR_TLIST_HEAD(_name) *children) \ |
904 | 0 | { fr_tlist_add_children(&ptr->_element_entry.entry, &children->head); } \ Unexecuted instantiation: pair.c:fr_pair_order_list_add_children Unexecuted instantiation: pair_inline.c:fr_pair_order_list_add_children |
905 | | \ |
906 | | static inline FR_TLIST_HEAD(_name) * _name ## _remove_children(_element_type *ptr) \ |
907 | 0 | { return (FR_TLIST_HEAD(_name) *) fr_tlist_remove_children(&ptr->_element_entry.entry); } \ Unexecuted instantiation: pair.c:fr_pair_order_list_remove_children Unexecuted instantiation: pair_inline.c:fr_pair_order_list_remove_children |
908 | | \ |
909 | | static inline void _name ## _set_head(fr_tlist_head_t *list, _element_type *ptr) \ |
910 | 0 | { ptr->_element_entry.entry.list_head = list; } Unexecuted instantiation: pair.c:fr_pair_order_list_set_head Unexecuted instantiation: pair_inline.c:fr_pair_order_list_set_head |
911 | | DIAG_ON(unused-function) |
912 | | |
913 | | static inline void *fr_tlist_parent(fr_tlist_head_t *list_head, void const *ptr) |
914 | 0 | { |
915 | 0 | fr_tlist_t *entry; |
916 | 0 |
|
917 | 0 | if (!ptr || !list_head) return NULL; |
918 | 0 |
|
919 | 0 | entry = fr_tlist_item_to_entry(list_head, ptr); |
920 | 0 | if (!entry->list_head) return NULL; |
921 | 0 |
|
922 | 0 | if (!entry->list_head->parent) return NULL; |
923 | 0 |
|
924 | 0 | return fr_tlist_entry_to_item(entry->list_head, entry->list_head->parent); |
925 | 0 | } Unexecuted instantiation: fuzzer.c:fr_tlist_parent Unexecuted instantiation: decode.c:fr_tlist_parent Unexecuted instantiation: dl.c:fr_tlist_parent Unexecuted instantiation: edit.c:fr_tlist_parent Unexecuted instantiation: encode.c:fr_tlist_parent Unexecuted instantiation: packet.c:fr_tlist_parent Unexecuted instantiation: pair.c:fr_tlist_parent Unexecuted instantiation: pair_inline.c:fr_tlist_parent Unexecuted instantiation: pair_legacy.c:fr_tlist_parent Unexecuted instantiation: pair_print.c:fr_tlist_parent Unexecuted instantiation: pair_tokenize.c:fr_tlist_parent Unexecuted instantiation: print.c:fr_tlist_parent Unexecuted instantiation: proto.c:fr_tlist_parent Unexecuted instantiation: stats.c:fr_tlist_parent Unexecuted instantiation: struct.c:fr_tlist_parent Unexecuted instantiation: base.c:fr_tlist_parent Unexecuted instantiation: list.c:fr_tlist_parent Unexecuted instantiation: tcp.c:fr_tlist_parent Unexecuted instantiation: abinary.c:fr_tlist_parent Unexecuted instantiation: vmps.c:fr_tlist_parent Unexecuted instantiation: raw.c:fr_tlist_parent Unexecuted instantiation: udp.c:fr_tlist_parent |
926 | | |
927 | | /** Initialize a child tlist based on a parent entry |
928 | | * |
929 | | * @param[in] entry the entry which will be the parent of the children |
930 | | * @param[in] children structure to initialise. Usually in the same parent structure as "entry" |
931 | | */ |
932 | | static inline void fr_tlist_init_children(fr_tlist_t *entry, fr_tlist_head_t *children) |
933 | 0 | { |
934 | 0 | fr_tlist_head_t *list_head; |
935 | 0 |
|
936 | 0 | fr_assert(entry->children == NULL); |
937 | 0 | fr_assert(entry->list_head != NULL); |
938 | 0 |
|
939 | 0 | list_head = entry->list_head; |
940 | 0 |
|
941 | 0 | /* |
942 | 0 | * Manually re-do fr_tlist_init() here, as we copy offset/type from the parent list. |
943 | 0 | */ |
944 | 0 | fr_dlist_init(&children->dlist_head, fr_tlist_t, dlist_entry); |
945 | 0 | children->dlist_head.offset = list_head->dlist_head.offset; |
946 | 0 | children->dlist_head.type = list_head->dlist_head.type; |
947 | 0 |
|
948 | 0 | children->parent = NULL; |
949 | 0 |
|
950 | 0 | entry->children = children; |
951 | 0 | } Unexecuted instantiation: fuzzer.c:fr_tlist_init_children Unexecuted instantiation: decode.c:fr_tlist_init_children Unexecuted instantiation: dl.c:fr_tlist_init_children Unexecuted instantiation: edit.c:fr_tlist_init_children Unexecuted instantiation: encode.c:fr_tlist_init_children Unexecuted instantiation: packet.c:fr_tlist_init_children Unexecuted instantiation: pair.c:fr_tlist_init_children Unexecuted instantiation: pair_inline.c:fr_tlist_init_children Unexecuted instantiation: pair_legacy.c:fr_tlist_init_children Unexecuted instantiation: pair_print.c:fr_tlist_init_children Unexecuted instantiation: pair_tokenize.c:fr_tlist_init_children Unexecuted instantiation: print.c:fr_tlist_init_children Unexecuted instantiation: proto.c:fr_tlist_init_children Unexecuted instantiation: stats.c:fr_tlist_init_children Unexecuted instantiation: struct.c:fr_tlist_init_children Unexecuted instantiation: base.c:fr_tlist_init_children Unexecuted instantiation: list.c:fr_tlist_init_children Unexecuted instantiation: tcp.c:fr_tlist_init_children Unexecuted instantiation: abinary.c:fr_tlist_init_children Unexecuted instantiation: vmps.c:fr_tlist_init_children Unexecuted instantiation: raw.c:fr_tlist_init_children Unexecuted instantiation: udp.c:fr_tlist_init_children |
952 | | |
953 | | /** Add a pre-initialized child tlist to a parent entry. |
954 | | * |
955 | | * @param[in] entry the entry which will be the parent of the children |
956 | | * @param[in] children structure to initialise. Usually in the same parent structure as "entry" |
957 | | */ |
958 | | static inline int fr_tlist_add_children(fr_tlist_t *entry, fr_tlist_head_t *children) |
959 | 0 | { |
960 | 0 | if (entry->children) return -1; |
961 | 0 |
|
962 | 0 | children->parent = entry; |
963 | 0 |
|
964 | 0 | entry->children = children; |
965 | 0 |
|
966 | 0 | return 0; |
967 | 0 | } Unexecuted instantiation: fuzzer.c:fr_tlist_add_children Unexecuted instantiation: decode.c:fr_tlist_add_children Unexecuted instantiation: dl.c:fr_tlist_add_children Unexecuted instantiation: edit.c:fr_tlist_add_children Unexecuted instantiation: encode.c:fr_tlist_add_children Unexecuted instantiation: packet.c:fr_tlist_add_children Unexecuted instantiation: pair.c:fr_tlist_add_children Unexecuted instantiation: pair_inline.c:fr_tlist_add_children Unexecuted instantiation: pair_legacy.c:fr_tlist_add_children Unexecuted instantiation: pair_print.c:fr_tlist_add_children Unexecuted instantiation: pair_tokenize.c:fr_tlist_add_children Unexecuted instantiation: print.c:fr_tlist_add_children Unexecuted instantiation: proto.c:fr_tlist_add_children Unexecuted instantiation: stats.c:fr_tlist_add_children Unexecuted instantiation: struct.c:fr_tlist_add_children Unexecuted instantiation: base.c:fr_tlist_add_children Unexecuted instantiation: list.c:fr_tlist_add_children Unexecuted instantiation: tcp.c:fr_tlist_add_children Unexecuted instantiation: abinary.c:fr_tlist_add_children Unexecuted instantiation: vmps.c:fr_tlist_add_children Unexecuted instantiation: raw.c:fr_tlist_add_children Unexecuted instantiation: udp.c:fr_tlist_add_children |
968 | | |
969 | | |
970 | | /** Remove a child tlist from a parent entry |
971 | | * |
972 | | * @param[in] entry the entry which will have the children removed |
973 | | */ |
974 | | static inline fr_tlist_head_t *fr_tlist_remove_children(fr_tlist_t *entry) |
975 | 0 | { |
976 | 0 | fr_tlist_head_t *children = entry->children; |
977 | 0 |
|
978 | 0 | if (!entry->children) return NULL; |
979 | 0 |
|
980 | 0 | entry->children->parent = NULL; |
981 | 0 | entry->children = NULL; |
982 | 0 |
|
983 | 0 | return children; |
984 | 0 | } Unexecuted instantiation: fuzzer.c:fr_tlist_remove_children Unexecuted instantiation: decode.c:fr_tlist_remove_children Unexecuted instantiation: dl.c:fr_tlist_remove_children Unexecuted instantiation: edit.c:fr_tlist_remove_children Unexecuted instantiation: encode.c:fr_tlist_remove_children Unexecuted instantiation: packet.c:fr_tlist_remove_children Unexecuted instantiation: pair.c:fr_tlist_remove_children Unexecuted instantiation: pair_inline.c:fr_tlist_remove_children Unexecuted instantiation: pair_legacy.c:fr_tlist_remove_children Unexecuted instantiation: pair_print.c:fr_tlist_remove_children Unexecuted instantiation: pair_tokenize.c:fr_tlist_remove_children Unexecuted instantiation: print.c:fr_tlist_remove_children Unexecuted instantiation: proto.c:fr_tlist_remove_children Unexecuted instantiation: stats.c:fr_tlist_remove_children Unexecuted instantiation: struct.c:fr_tlist_remove_children Unexecuted instantiation: base.c:fr_tlist_remove_children Unexecuted instantiation: list.c:fr_tlist_remove_children Unexecuted instantiation: tcp.c:fr_tlist_remove_children Unexecuted instantiation: abinary.c:fr_tlist_remove_children Unexecuted instantiation: vmps.c:fr_tlist_remove_children Unexecuted instantiation: raw.c:fr_tlist_remove_children Unexecuted instantiation: udp.c:fr_tlist_remove_children |
985 | | |
986 | | #ifdef __cplusplus |
987 | | } |
988 | | #endif |