| 1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| 2 |
<html> |
| 3 |
<head> |
| 4 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| 5 |
<title>idmef-path: libprelude Reference Manual</title> |
| 6 |
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> |
| 7 |
<link rel="home" href="index.html" title="libprelude Reference Manual"> |
| 8 |
<link rel="up" href="ch01.html" title="[Insert title here]"> |
| 9 |
<link rel="prev" href="libprelude-idmef-criterion-value.html" title="idmef-criterion-value"> |
| 10 |
<link rel="next" href="libprelude-idmef-additional-data.html" title="idmef-additional-data"> |
| 11 |
<meta name="generator" content="GTK-Doc V1.28 (XML mode)"> |
| 12 |
<link rel="stylesheet" href="style.css" type="text/css"> |
| 13 |
</head> |
| 14 |
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
| 15 |
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle"> |
| 16 |
<td width="100%" align="left" class="shortcuts"> |
| 17 |
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> |
| 18 |
<a href="#libprelude-idmef-path.description" class="shortcut">Description</a></span> |
| 19 |
</td> |
| 20 |
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> |
| 21 |
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> |
| 22 |
<td><a accesskey="p" href="libprelude-idmef-criterion-value.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> |
| 23 |
<td><a accesskey="n" href="libprelude-idmef-additional-data.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> |
| 24 |
</tr></table> |
| 25 |
<div class="refentry"> |
| 26 |
<a name="libprelude-idmef-path"></a><div class="titlepage"></div> |
| 27 |
<div class="refnamediv"><table width="100%"><tr> |
| 28 |
<td valign="top"> |
| 29 |
<h2><span class="refentrytitle"><a name="libprelude-idmef-path.top_of_page"></a>idmef-path</span></h2> |
| 30 |
<p>idmef-path</p> |
| 31 |
</td> |
| 32 |
<td class="gallery_image" valign="top" align="right"></td> |
| 33 |
</tr></table></div> |
| 34 |
<div class="refsect1"> |
| 35 |
<a name="libprelude-idmef-path.functions"></a><h2>Functions</h2> |
| 36 |
<div class="informaltable"><table width="100%" border="0"> |
| 37 |
<colgroup> |
| 38 |
<col width="150px" class="functions_return"> |
| 39 |
<col class="functions_name"> |
| 40 |
</colgroup> |
| 41 |
<tbody> |
| 42 |
<tr> |
| 43 |
<td class="function_type"> |
| 44 |
<span class="returnvalue">int</span> |
| 45 |
</td> |
| 46 |
<td class="function_name"> |
| 47 |
<a class="link" href="libprelude-idmef-path.html#idmef-path-get" title="idmef_path_get ()">idmef_path_get</a> <span class="c_punctuation">()</span> |
| 48 |
</td> |
| 49 |
</tr> |
| 50 |
<tr> |
| 51 |
<td class="function_type"> |
| 52 |
<span class="returnvalue">int</span> |
| 53 |
</td> |
| 54 |
<td class="function_name"> |
| 55 |
<a class="link" href="libprelude-idmef-path.html#idmef-path-set" title="idmef_path_set ()">idmef_path_set</a> <span class="c_punctuation">()</span> |
| 56 |
</td> |
| 57 |
</tr> |
| 58 |
<tr> |
| 59 |
<td class="function_type"> |
| 60 |
<span class="returnvalue">int</span> |
| 61 |
</td> |
| 62 |
<td class="function_name"> |
| 63 |
<a class="link" href="libprelude-idmef-path.html#idmef-path-new" title="idmef_path_new ()">idmef_path_new</a> <span class="c_punctuation">()</span> |
| 64 |
</td> |
| 65 |
</tr> |
| 66 |
<tr> |
| 67 |
<td class="function_type"> |
| 68 |
<span class="returnvalue">int</span> |
| 69 |
</td> |
| 70 |
<td class="function_name"> |
| 71 |
<a class="link" href="libprelude-idmef-path.html#idmef-path-new-v" title="idmef_path_new_v ()">idmef_path_new_v</a> <span class="c_punctuation">()</span> |
| 72 |
</td> |
| 73 |
</tr> |
| 74 |
<tr> |
| 75 |
<td class="function_type"> |
| 76 |
<span class="returnvalue">int</span> |
| 77 |
</td> |
| 78 |
<td class="function_name"> |
| 79 |
<a class="link" href="libprelude-idmef-path.html#idmef-path-new-fast" title="idmef_path_new_fast ()">idmef_path_new_fast</a> <span class="c_punctuation">()</span> |
| 80 |
</td> |
| 81 |
</tr> |
| 82 |
<tr> |
| 83 |
<td class="function_type"> |
| 84 |
<span class="returnvalue">idmef_class_id_t</span> |
| 85 |
</td> |
| 86 |
<td class="function_name"> |
| 87 |
<a class="link" href="libprelude-idmef-path.html#idmef-path-get-class" title="idmef_path_get_class ()">idmef_path_get_class</a> <span class="c_punctuation">()</span> |
| 88 |
</td> |
| 89 |
</tr> |
| 90 |
<tr> |
| 91 |
<td class="function_type"> |
| 92 |
<span class="returnvalue">idmef_value_type_id_t</span> |
| 93 |
</td> |
| 94 |
<td class="function_name"> |
| 95 |
<a class="link" href="libprelude-idmef-path.html#idmef-path-get-value-type" title="idmef_path_get_value_type ()">idmef_path_get_value_type</a> <span class="c_punctuation">()</span> |
| 96 |
</td> |
| 97 |
</tr> |
| 98 |
<tr> |
| 99 |
<td class="function_type"> |
| 100 |
<span class="returnvalue">int</span> |
| 101 |
</td> |
| 102 |
<td class="function_name"> |
| 103 |
<a class="link" href="libprelude-idmef-path.html#idmef-path-set-index" title="idmef_path_set_index ()">idmef_path_set_index</a> <span class="c_punctuation">()</span> |
| 104 |
</td> |
| 105 |
</tr> |
| 106 |
<tr> |
| 107 |
<td class="function_type"> |
| 108 |
<span class="returnvalue">int</span> |
| 109 |
</td> |
| 110 |
<td class="function_name"> |
| 111 |
<a class="link" href="libprelude-idmef-path.html#idmef-path-undefine-index" title="idmef_path_undefine_index ()">idmef_path_undefine_index</a> <span class="c_punctuation">()</span> |
| 112 |
</td> |
| 113 |
</tr> |
| 114 |
<tr> |
| 115 |
<td class="function_type"> |
| 116 |
<span class="returnvalue">int</span> |
| 117 |
</td> |
| 118 |
<td class="function_name"> |
| 119 |
<a class="link" href="libprelude-idmef-path.html#idmef-path-get-index" title="idmef_path_get_index ()">idmef_path_get_index</a> <span class="c_punctuation">()</span> |
| 120 |
</td> |
| 121 |
</tr> |
| 122 |
<tr> |
| 123 |
<td class="function_type"> |
| 124 |
<span class="returnvalue">int</span> |
| 125 |
</td> |
| 126 |
<td class="function_name"> |
| 127 |
<a class="link" href="libprelude-idmef-path.html#idmef-path-make-child" title="idmef_path_make_child ()">idmef_path_make_child</a> <span class="c_punctuation">()</span> |
| 128 |
</td> |
| 129 |
</tr> |
| 130 |
<tr> |
| 131 |
<td class="function_type"> |
| 132 |
<span class="returnvalue">int</span> |
| 133 |
</td> |
| 134 |
<td class="function_name"> |
| 135 |
<a class="link" href="libprelude-idmef-path.html#idmef-path-make-parent" title="idmef_path_make_parent ()">idmef_path_make_parent</a> <span class="c_punctuation">()</span> |
| 136 |
</td> |
| 137 |
</tr> |
| 138 |
<tr> |
| 139 |
<td class="function_type"> |
| 140 |
<span class="returnvalue">void</span> |
| 141 |
</td> |
| 142 |
<td class="function_name"> |
| 143 |
<a class="link" href="libprelude-idmef-path.html#idmef-path-destroy" title="idmef_path_destroy ()">idmef_path_destroy</a> <span class="c_punctuation">()</span> |
| 144 |
</td> |
| 145 |
</tr> |
| 146 |
<tr> |
| 147 |
<td class="function_type"> |
| 148 |
<span class="returnvalue">int</span> |
| 149 |
</td> |
| 150 |
<td class="function_name"> |
| 151 |
<a class="link" href="libprelude-idmef-path.html#idmef-path-ncompare" title="idmef_path_ncompare ()">idmef_path_ncompare</a> <span class="c_punctuation">()</span> |
| 152 |
</td> |
| 153 |
</tr> |
| 154 |
<tr> |
| 155 |
<td class="function_type"> |
| 156 |
<span class="returnvalue">int</span> |
| 157 |
</td> |
| 158 |
<td class="function_name"> |
| 159 |
<a class="link" href="libprelude-idmef-path.html#idmef-path-compare" title="idmef_path_compare ()">idmef_path_compare</a> <span class="c_punctuation">()</span> |
| 160 |
</td> |
| 161 |
</tr> |
| 162 |
<tr> |
| 163 |
<td class="function_type"> |
| 164 |
<span class="returnvalue">int</span> |
| 165 |
</td> |
| 166 |
<td class="function_name"> |
| 167 |
<a class="link" href="libprelude-idmef-path.html#idmef-path-clone" title="idmef_path_clone ()">idmef_path_clone</a> <span class="c_punctuation">()</span> |
| 168 |
</td> |
| 169 |
</tr> |
| 170 |
<tr> |
| 171 |
<td class="function_type"> |
| 172 |
<a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="returnvalue">idmef_path_t</span></a> * |
| 173 |
</td> |
| 174 |
<td class="function_name"> |
| 175 |
<a class="link" href="libprelude-idmef-path.html#idmef-path-ref" title="idmef_path_ref ()">idmef_path_ref</a> <span class="c_punctuation">()</span> |
| 176 |
</td> |
| 177 |
</tr> |
| 178 |
<tr> |
| 179 |
<td class="function_type">const <span class="returnvalue">char</span> * |
| 180 |
</td> |
| 181 |
<td class="function_name"> |
| 182 |
<a class="link" href="libprelude-idmef-path.html#idmef-path-get-name" title="idmef_path_get_name ()">idmef_path_get_name</a> <span class="c_punctuation">()</span> |
| 183 |
</td> |
| 184 |
</tr> |
| 185 |
<tr> |
| 186 |
<td class="function_type"> |
| 187 |
<a class="link" href="libprelude-prelude-inttypes.html#prelude-bool-t" title="enum prelude_bool_t"><span class="returnvalue">prelude_bool_t</span></a> |
| 188 |
</td> |
| 189 |
<td class="function_name"> |
| 190 |
<a class="link" href="libprelude-idmef-path.html#idmef-path-is-ambiguous" title="idmef_path_is_ambiguous ()">idmef_path_is_ambiguous</a> <span class="c_punctuation">()</span> |
| 191 |
</td> |
| 192 |
</tr> |
| 193 |
<tr> |
| 194 |
<td class="function_type"> |
| 195 |
<span class="returnvalue">int</span> |
| 196 |
</td> |
| 197 |
<td class="function_name"> |
| 198 |
<a class="link" href="libprelude-idmef-path.html#idmef-path-has-lists" title="idmef_path_has_lists ()">idmef_path_has_lists</a> <span class="c_punctuation">()</span> |
| 199 |
</td> |
| 200 |
</tr> |
| 201 |
<tr> |
| 202 |
<td class="function_type"> |
| 203 |
<a class="link" href="libprelude-prelude-inttypes.html#prelude-bool-t" title="enum prelude_bool_t"><span class="returnvalue">prelude_bool_t</span></a> |
| 204 |
</td> |
| 205 |
<td class="function_name"> |
| 206 |
<a class="link" href="libprelude-idmef-path.html#idmef-path-is-list" title="idmef_path_is_list ()">idmef_path_is_list</a> <span class="c_punctuation">()</span> |
| 207 |
</td> |
| 208 |
</tr> |
| 209 |
<tr> |
| 210 |
<td class="function_type">unsigned <span class="returnvalue">int</span> |
| 211 |
</td> |
| 212 |
<td class="function_name"> |
| 213 |
<a class="link" href="libprelude-idmef-path.html#idmef-path-get-depth" title="idmef_path_get_depth ()">idmef_path_get_depth</a> <span class="c_punctuation">()</span> |
| 214 |
</td> |
| 215 |
</tr> |
| 216 |
<tr> |
| 217 |
<td class="function_type"> |
| 218 |
<span class="returnvalue">int</span> |
| 219 |
</td> |
| 220 |
<td class="function_name"> |
| 221 |
<a class="link" href="libprelude-idmef-path.html#idmef-path-check-operator" title="idmef_path_check_operator ()">idmef_path_check_operator</a> <span class="c_punctuation">()</span> |
| 222 |
</td> |
| 223 |
</tr> |
| 224 |
<tr> |
| 225 |
<td class="function_type"> |
| 226 |
<span class="returnvalue">int</span> |
| 227 |
</td> |
| 228 |
<td class="function_name"> |
| 229 |
<a class="link" href="libprelude-idmef-path.html#idmef-path-get-applicable-operators" title="idmef_path_get_applicable_operators ()">idmef_path_get_applicable_operators</a> <span class="c_punctuation">()</span> |
| 230 |
</td> |
| 231 |
</tr> |
| 232 |
</tbody> |
| 233 |
</table></div> |
| 234 |
</div> |
| 235 |
<div class="refsect1"> |
| 236 |
<a name="libprelude-idmef-path.other"></a><h2>Types and Values</h2> |
| 237 |
<div class="informaltable"><table width="100%" border="0"> |
| 238 |
<colgroup> |
| 239 |
<col width="150px" class="name"> |
| 240 |
<col class="description"> |
| 241 |
</colgroup> |
| 242 |
<tbody><tr> |
| 243 |
<td class="typedef_keyword">typedef</td> |
| 244 |
<td class="function_name"><a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t">idmef_path_t</a></td> |
| 245 |
</tr></tbody> |
| 246 |
</table></div> |
| 247 |
</div> |
| 248 |
<div class="refsect1"> |
| 249 |
<a name="libprelude-idmef-path.description"></a><h2>Description</h2> |
| 250 |
</div> |
| 251 |
<div class="refsect1"> |
| 252 |
<a name="libprelude-idmef-path.functions_details"></a><h2>Functions</h2> |
| 253 |
<div class="refsect2"> |
| 254 |
<a name="idmef-path-get"></a><h3>idmef_path_get ()</h3> |
| 255 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 256 |
idmef_path_get (<em class="parameter"><code>const <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> *path</code></em>, |
| 257 |
<em class="parameter"><code><span class="type">void</span> *object</code></em>, |
| 258 |
<em class="parameter"><code><a class="link" href="libprelude-idmef-value.html#idmef-value-t" title="idmef_value_t"><span class="type">idmef_value_t</span></a> **ret</code></em>);</pre> |
| 259 |
<p>This function retrieves the value for <em class="parameter"><code>path</code></em> |
| 260 |
within <em class="parameter"><code>message</code></em> |
| 261 |
, |
| 262 |
and stores it into the provided <em class="parameter"><code>ret</code></em> |
| 263 |
address of type <a class="link" href="libprelude-idmef-value.html#idmef-value-t" title="idmef_value_t"><span class="type">idmef_value_t</span></a>.</p> |
| 264 |
<div class="refsect3"> |
| 265 |
<a name="idmef-path-get.parameters"></a><h4>Parameters</h4> |
| 266 |
<div class="informaltable"><table width="100%" border="0"> |
| 267 |
<colgroup> |
| 268 |
<col width="150px" class="parameters_name"> |
| 269 |
<col class="parameters_description"> |
| 270 |
<col width="200px" class="parameters_annotations"> |
| 271 |
</colgroup> |
| 272 |
<tbody> |
| 273 |
<tr> |
| 274 |
<td class="parameter_name"><p>path</p></td> |
| 275 |
<td class="parameter_description"><p>Pointer to a <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> object.</p></td> |
| 276 |
<td class="parameter_annotations"> </td> |
| 277 |
</tr> |
| 278 |
<tr> |
| 279 |
<td class="parameter_name"><p>obj</p></td> |
| 280 |
<td class="parameter_description"><p>Pointer to a <span class="type">idmef_object_t</span> object.</p></td> |
| 281 |
<td class="parameter_annotations"> </td> |
| 282 |
</tr> |
| 283 |
<tr> |
| 284 |
<td class="parameter_name"><p>ret</p></td> |
| 285 |
<td class="parameter_description"><p>Address where to store the retrieved <a class="link" href="libprelude-idmef-value.html#idmef-value-t" title="idmef_value_t"><span class="type">idmef_value_t</span></a>.</p></td> |
| 286 |
<td class="parameter_annotations"> </td> |
| 287 |
</tr> |
| 288 |
</tbody> |
| 289 |
</table></div> |
| 290 |
</div> |
| 291 |
<div class="refsect3"> |
| 292 |
<a name="idmef-path-get.returns"></a><h4>Returns</h4> |
| 293 |
<p> The number of element retrieved, or a negative value if an error occured.</p> |
| 294 |
</div> |
| 295 |
</div> |
| 296 |
<hr> |
| 297 |
<div class="refsect2"> |
| 298 |
<a name="idmef-path-set"></a><h3>idmef_path_set ()</h3> |
| 299 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 300 |
idmef_path_set (<em class="parameter"><code>const <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> *path</code></em>, |
| 301 |
<em class="parameter"><code><span class="type">void</span> *object</code></em>, |
| 302 |
<em class="parameter"><code><a class="link" href="libprelude-idmef-value.html#idmef-value-t" title="idmef_value_t"><span class="type">idmef_value_t</span></a> *value</code></em>);</pre> |
| 303 |
<p>This function sets the provided <em class="parameter"><code>value</code></em> |
| 304 |
for <em class="parameter"><code>path</code></em> |
| 305 |
within <em class="parameter"><code>message</code></em> |
| 306 |
.</p> |
| 307 |
<div class="refsect3"> |
| 308 |
<a name="idmef-path-set.parameters"></a><h4>Parameters</h4> |
| 309 |
<div class="informaltable"><table width="100%" border="0"> |
| 310 |
<colgroup> |
| 311 |
<col width="150px" class="parameters_name"> |
| 312 |
<col class="parameters_description"> |
| 313 |
<col width="200px" class="parameters_annotations"> |
| 314 |
</colgroup> |
| 315 |
<tbody> |
| 316 |
<tr> |
| 317 |
<td class="parameter_name"><p>path</p></td> |
| 318 |
<td class="parameter_description"><p>Pointer to a <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> object.</p></td> |
| 319 |
<td class="parameter_annotations"> </td> |
| 320 |
</tr> |
| 321 |
<tr> |
| 322 |
<td class="parameter_name"><p>obj</p></td> |
| 323 |
<td class="parameter_description"><p>Pointer to a <span class="type">idmef_object_t</span> object.</p></td> |
| 324 |
<td class="parameter_annotations"> </td> |
| 325 |
</tr> |
| 326 |
<tr> |
| 327 |
<td class="parameter_name"><p>value</p></td> |
| 328 |
<td class="parameter_description"><p>Pointer to a <a class="link" href="libprelude-idmef-value.html#idmef-value-t" title="idmef_value_t"><span class="type">idmef_value_t</span></a> object.</p></td> |
| 329 |
<td class="parameter_annotations"> </td> |
| 330 |
</tr> |
| 331 |
</tbody> |
| 332 |
</table></div> |
| 333 |
</div> |
| 334 |
<div class="refsect3"> |
| 335 |
<a name="idmef-path-set.returns"></a><h4>Returns</h4> |
| 336 |
<p> 0 on success, a negative value if an error occured.</p> |
| 337 |
</div> |
| 338 |
</div> |
| 339 |
<hr> |
| 340 |
<div class="refsect2"> |
| 341 |
<a name="idmef-path-new"></a><h3>idmef_path_new ()</h3> |
| 342 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 343 |
idmef_path_new (<em class="parameter"><code><a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> **path</code></em>, |
| 344 |
<em class="parameter"><code>const <span class="type">char</span> *format</code></em>);</pre> |
| 345 |
<p>Creates an <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> object pointing to the provided format |
| 346 |
string <em class="parameter"><code>format</code></em> |
| 347 |
and @..., and stores it within <em class="parameter"><code>path</code></em> |
| 348 |
.</p> |
| 349 |
<div class="refsect3"> |
| 350 |
<a name="idmef-path-new.parameters"></a><h4>Parameters</h4> |
| 351 |
<div class="informaltable"><table width="100%" border="0"> |
| 352 |
<colgroup> |
| 353 |
<col width="150px" class="parameters_name"> |
| 354 |
<col class="parameters_description"> |
| 355 |
<col width="200px" class="parameters_annotations"> |
| 356 |
</colgroup> |
| 357 |
<tbody> |
| 358 |
<tr> |
| 359 |
<td class="parameter_name"><p>path</p></td> |
| 360 |
<td class="parameter_description"><p>Address where to store the created <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> object.</p></td> |
| 361 |
<td class="parameter_annotations"> </td> |
| 362 |
</tr> |
| 363 |
<tr> |
| 364 |
<td class="parameter_name"><p>format</p></td> |
| 365 |
<td class="parameter_description"><p>Format string.</p></td> |
| 366 |
<td class="parameter_annotations"> </td> |
| 367 |
</tr> |
| 368 |
<tr> |
| 369 |
<td class="parameter_name"><p>...</p></td> |
| 370 |
<td class="parameter_description"><p>Arguments list.</p></td> |
| 371 |
<td class="parameter_annotations"> </td> |
| 372 |
</tr> |
| 373 |
</tbody> |
| 374 |
</table></div> |
| 375 |
</div> |
| 376 |
<div class="refsect3"> |
| 377 |
<a name="idmef-path-new.returns"></a><h4>Returns</h4> |
| 378 |
<p> 0 on success, or a negative value if an error occured.</p> |
| 379 |
</div> |
| 380 |
</div> |
| 381 |
<hr> |
| 382 |
<div class="refsect2"> |
| 383 |
<a name="idmef-path-new-v"></a><h3>idmef_path_new_v ()</h3> |
| 384 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 385 |
idmef_path_new_v (<em class="parameter"><code><a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> **path</code></em>, |
| 386 |
<em class="parameter"><code>const <span class="type">char</span> *format</code></em>);</pre> |
| 387 |
<p>Creates an <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> object pointing to the provided format |
| 388 |
string <em class="parameter"><code>format</code></em> |
| 389 |
and <em class="parameter"><code>args</code></em> |
| 390 |
, and stores it within <em class="parameter"><code>path</code></em> |
| 391 |
.</p> |
| 392 |
<div class="refsect3"> |
| 393 |
<a name="idmef-path-new-v.parameters"></a><h4>Parameters</h4> |
| 394 |
<div class="informaltable"><table width="100%" border="0"> |
| 395 |
<colgroup> |
| 396 |
<col width="150px" class="parameters_name"> |
| 397 |
<col class="parameters_description"> |
| 398 |
<col width="200px" class="parameters_annotations"> |
| 399 |
</colgroup> |
| 400 |
<tbody> |
| 401 |
<tr> |
| 402 |
<td class="parameter_name"><p>path</p></td> |
| 403 |
<td class="parameter_description"><p>Address where to store the created <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> object.</p></td> |
| 404 |
<td class="parameter_annotations"> </td> |
| 405 |
</tr> |
| 406 |
<tr> |
| 407 |
<td class="parameter_name"><p>format</p></td> |
| 408 |
<td class="parameter_description"><p>Format string.</p></td> |
| 409 |
<td class="parameter_annotations"> </td> |
| 410 |
</tr> |
| 411 |
<tr> |
| 412 |
<td class="parameter_name"><p>args</p></td> |
| 413 |
<td class="parameter_description"><p>Pointer to a variable argument list.</p></td> |
| 414 |
<td class="parameter_annotations"> </td> |
| 415 |
</tr> |
| 416 |
</tbody> |
| 417 |
</table></div> |
| 418 |
</div> |
| 419 |
<div class="refsect3"> |
| 420 |
<a name="idmef-path-new-v.returns"></a><h4>Returns</h4> |
| 421 |
<p> 0 on success, or a negative value if an error occured.</p> |
| 422 |
</div> |
| 423 |
</div> |
| 424 |
<hr> |
| 425 |
<div class="refsect2"> |
| 426 |
<a name="idmef-path-new-fast"></a><h3>idmef_path_new_fast ()</h3> |
| 427 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 428 |
idmef_path_new_fast (<em class="parameter"><code><a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> **path</code></em>, |
| 429 |
<em class="parameter"><code>const <span class="type">char</span> *buffer</code></em>);</pre> |
| 430 |
<p>Creates a <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> object pointing to <em class="parameter"><code>buffer</code></em> |
| 431 |
, and stores it within <em class="parameter"><code>path</code></em> |
| 432 |
.</p> |
| 433 |
<div class="refsect3"> |
| 434 |
<a name="idmef-path-new-fast.parameters"></a><h4>Parameters</h4> |
| 435 |
<div class="informaltable"><table width="100%" border="0"> |
| 436 |
<colgroup> |
| 437 |
<col width="150px" class="parameters_name"> |
| 438 |
<col class="parameters_description"> |
| 439 |
<col width="200px" class="parameters_annotations"> |
| 440 |
</colgroup> |
| 441 |
<tbody> |
| 442 |
<tr> |
| 443 |
<td class="parameter_name"><p>path</p></td> |
| 444 |
<td class="parameter_description"><p>Address where to store the created <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> object.</p></td> |
| 445 |
<td class="parameter_annotations"> </td> |
| 446 |
</tr> |
| 447 |
<tr> |
| 448 |
<td class="parameter_name"><p>buffer</p></td> |
| 449 |
<td class="parameter_description"><p>Name of the path to create.</p></td> |
| 450 |
<td class="parameter_annotations"> </td> |
| 451 |
</tr> |
| 452 |
</tbody> |
| 453 |
</table></div> |
| 454 |
</div> |
| 455 |
<div class="refsect3"> |
| 456 |
<a name="idmef-path-new-fast.returns"></a><h4>Returns</h4> |
| 457 |
<p> 0 on success, or a negative value if an error occured.</p> |
| 458 |
</div> |
| 459 |
</div> |
| 460 |
<hr> |
| 461 |
<div class="refsect2"> |
| 462 |
<a name="idmef-path-get-class"></a><h3>idmef_path_get_class ()</h3> |
| 463 |
<pre class="programlisting"><span class="returnvalue">idmef_class_id_t</span> |
| 464 |
idmef_path_get_class (<em class="parameter"><code>const <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> *path</code></em>, |
| 465 |
<em class="parameter"><code><span class="type">int</span> depth</code></em>);</pre> |
| 466 |
<p>Retrieves the <span class="type">idmef_class_id_t</span> value for the element of <em class="parameter"><code>path</code></em> |
| 467 |
|
| 468 |
located at <em class="parameter"><code>depth</code></em> |
| 469 |
. If depth is -1, the last element depth is addressed.</p> |
| 470 |
<div class="refsect3"> |
| 471 |
<a name="idmef-path-get-class.parameters"></a><h4>Parameters</h4> |
| 472 |
<div class="informaltable"><table width="100%" border="0"> |
| 473 |
<colgroup> |
| 474 |
<col width="150px" class="parameters_name"> |
| 475 |
<col class="parameters_description"> |
| 476 |
<col width="200px" class="parameters_annotations"> |
| 477 |
</colgroup> |
| 478 |
<tbody> |
| 479 |
<tr> |
| 480 |
<td class="parameter_name"><p>path</p></td> |
| 481 |
<td class="parameter_description"><p>Pointer to an <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> object.</p></td> |
| 482 |
<td class="parameter_annotations"> </td> |
| 483 |
</tr> |
| 484 |
<tr> |
| 485 |
<td class="parameter_name"><p>depth</p></td> |
| 486 |
<td class="parameter_description"><p>Depth of <em class="parameter"><code>path</code></em> |
| 487 |
to retrieve the <span class="type">idmef_class_id_t</span> from.</p></td> |
| 488 |
<td class="parameter_annotations"> </td> |
| 489 |
</tr> |
| 490 |
</tbody> |
| 491 |
</table></div> |
| 492 |
</div> |
| 493 |
<div class="refsect3"> |
| 494 |
<a name="idmef-path-get-class.returns"></a><h4>Returns</h4> |
| 495 |
<p> The <span class="type">idmef_class_id_t</span> for the elemnt, or a negative value if an error occured.</p> |
| 496 |
</div> |
| 497 |
</div> |
| 498 |
<hr> |
| 499 |
<div class="refsect2"> |
| 500 |
<a name="idmef-path-get-value-type"></a><h3>idmef_path_get_value_type ()</h3> |
| 501 |
<pre class="programlisting"><span class="returnvalue">idmef_value_type_id_t</span> |
| 502 |
idmef_path_get_value_type (<em class="parameter"><code>const <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> *path</code></em>, |
| 503 |
<em class="parameter"><code><span class="type">int</span> depth</code></em>);</pre> |
| 504 |
<p>Retrieves the <span class="type">idmef_value_type_id_t</span> identifying the type of value |
| 505 |
acceptable for this path element, for the <em class="parameter"><code>path</code></em> |
| 506 |
element located at |
| 507 |
<em class="parameter"><code>depth</code></em> |
| 508 |
. If depth is -1, the last element depth is addressed.</p> |
| 509 |
<div class="refsect3"> |
| 510 |
<a name="idmef-path-get-value-type.parameters"></a><h4>Parameters</h4> |
| 511 |
<div class="informaltable"><table width="100%" border="0"> |
| 512 |
<colgroup> |
| 513 |
<col width="150px" class="parameters_name"> |
| 514 |
<col class="parameters_description"> |
| 515 |
<col width="200px" class="parameters_annotations"> |
| 516 |
</colgroup> |
| 517 |
<tbody> |
| 518 |
<tr> |
| 519 |
<td class="parameter_name"><p>path</p></td> |
| 520 |
<td class="parameter_description"><p>Pointer to an <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> object.</p></td> |
| 521 |
<td class="parameter_annotations"> </td> |
| 522 |
</tr> |
| 523 |
<tr> |
| 524 |
<td class="parameter_name"><p>depth</p></td> |
| 525 |
<td class="parameter_description"><p>Depth of <em class="parameter"><code>path</code></em> |
| 526 |
to retrieve the <span class="type">idmef_value_type_id_t</span> from.</p></td> |
| 527 |
<td class="parameter_annotations"> </td> |
| 528 |
</tr> |
| 529 |
</tbody> |
| 530 |
</table></div> |
| 531 |
</div> |
| 532 |
<div class="refsect3"> |
| 533 |
<a name="idmef-path-get-value-type.returns"></a><h4>Returns</h4> |
| 534 |
<p> The <span class="type">idmef_value_type_id_t</span> for the element, or a negative value if an error occured.</p> |
| 535 |
</div> |
| 536 |
</div> |
| 537 |
<hr> |
| 538 |
<div class="refsect2"> |
| 539 |
<a name="idmef-path-set-index"></a><h3>idmef_path_set_index ()</h3> |
| 540 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 541 |
idmef_path_set_index (<em class="parameter"><code><a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> *path</code></em>, |
| 542 |
<em class="parameter"><code>unsigned <span class="type">int</span> depth</code></em>, |
| 543 |
<em class="parameter"><code><span class="type">int</span> index</code></em>);</pre> |
| 544 |
<p>Modifies <em class="parameter"><code>index</code></em> |
| 545 |
for the element located at <em class="parameter"><code>depth</code></em> |
| 546 |
of provided <em class="parameter"><code>path</code></em> |
| 547 |
. |
| 548 |
This function is only applicable for element that accept listed value.</p> |
| 549 |
<div class="refsect3"> |
| 550 |
<a name="idmef-path-set-index.parameters"></a><h4>Parameters</h4> |
| 551 |
<div class="informaltable"><table width="100%" border="0"> |
| 552 |
<colgroup> |
| 553 |
<col width="150px" class="parameters_name"> |
| 554 |
<col class="parameters_description"> |
| 555 |
<col width="200px" class="parameters_annotations"> |
| 556 |
</colgroup> |
| 557 |
<tbody> |
| 558 |
<tr> |
| 559 |
<td class="parameter_name"><p>path</p></td> |
| 560 |
<td class="parameter_description"><p>Pointer to an <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> object.</p></td> |
| 561 |
<td class="parameter_annotations"> </td> |
| 562 |
</tr> |
| 563 |
<tr> |
| 564 |
<td class="parameter_name"><p>depth</p></td> |
| 565 |
<td class="parameter_description"><p>Depth of <em class="parameter"><code>path</code></em> |
| 566 |
to set <em class="parameter"><code>index</code></em> |
| 567 |
for.</p></td> |
| 568 |
<td class="parameter_annotations"> </td> |
| 569 |
</tr> |
| 570 |
<tr> |
| 571 |
<td class="parameter_name"><p>index</p></td> |
| 572 |
<td class="parameter_description"><p>Index for the provided element <em class="parameter"><code>depth</code></em> |
| 573 |
.</p></td> |
| 574 |
<td class="parameter_annotations"> </td> |
| 575 |
</tr> |
| 576 |
</tbody> |
| 577 |
</table></div> |
| 578 |
</div> |
| 579 |
<div class="refsect3"> |
| 580 |
<a name="idmef-path-set-index.returns"></a><h4>Returns</h4> |
| 581 |
<p> 0 on success, a negative value if an error occured.</p> |
| 582 |
</div> |
| 583 |
</div> |
| 584 |
<hr> |
| 585 |
<div class="refsect2"> |
| 586 |
<a name="idmef-path-undefine-index"></a><h3>idmef_path_undefine_index ()</h3> |
| 587 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 588 |
idmef_path_undefine_index (<em class="parameter"><code><a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> *path</code></em>, |
| 589 |
<em class="parameter"><code>unsigned <span class="type">int</span> depth</code></em>);</pre> |
| 590 |
<p>Modifies the element located at <em class="parameter"><code>depth</code></em> |
| 591 |
of provided <em class="parameter"><code>path</code></em> |
| 592 |
so that it's |
| 593 |
index is undefined.</p> |
| 594 |
<p>This function is only applicable for element that accept listed value.</p> |
| 595 |
<div class="refsect3"> |
| 596 |
<a name="idmef-path-undefine-index.parameters"></a><h4>Parameters</h4> |
| 597 |
<div class="informaltable"><table width="100%" border="0"> |
| 598 |
<colgroup> |
| 599 |
<col width="150px" class="parameters_name"> |
| 600 |
<col class="parameters_description"> |
| 601 |
<col width="200px" class="parameters_annotations"> |
| 602 |
</colgroup> |
| 603 |
<tbody> |
| 604 |
<tr> |
| 605 |
<td class="parameter_name"><p>path</p></td> |
| 606 |
<td class="parameter_description"><p>Pointer to an <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> object.</p></td> |
| 607 |
<td class="parameter_annotations"> </td> |
| 608 |
</tr> |
| 609 |
<tr> |
| 610 |
<td class="parameter_name"><p>depth</p></td> |
| 611 |
<td class="parameter_description"><p>Depth of <em class="parameter"><code>path</code></em> |
| 612 |
to undefine the index for.</p></td> |
| 613 |
<td class="parameter_annotations"> </td> |
| 614 |
</tr> |
| 615 |
</tbody> |
| 616 |
</table></div> |
| 617 |
</div> |
| 618 |
<div class="refsect3"> |
| 619 |
<a name="idmef-path-undefine-index.returns"></a><h4>Returns</h4> |
| 620 |
<p> 0 on success, a negative value if an error occured.</p> |
| 621 |
</div> |
| 622 |
</div> |
| 623 |
<hr> |
| 624 |
<div class="refsect2"> |
| 625 |
<a name="idmef-path-get-index"></a><h3>idmef_path_get_index ()</h3> |
| 626 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 627 |
idmef_path_get_index (<em class="parameter"><code>const <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> *path</code></em>, |
| 628 |
<em class="parameter"><code>unsigned <span class="type">int</span> depth</code></em>);</pre> |
| 629 |
<p>Gets the current index for element located at <em class="parameter"><code>depth</code></em> |
| 630 |
of <em class="parameter"><code>path</code></em> |
| 631 |
. |
| 632 |
This function is only applicable for element that accepts listed value.</p> |
| 633 |
<div class="refsect3"> |
| 634 |
<a name="idmef-path-get-index.parameters"></a><h4>Parameters</h4> |
| 635 |
<div class="informaltable"><table width="100%" border="0"> |
| 636 |
<colgroup> |
| 637 |
<col width="150px" class="parameters_name"> |
| 638 |
<col class="parameters_description"> |
| 639 |
<col width="200px" class="parameters_annotations"> |
| 640 |
</colgroup> |
| 641 |
<tbody> |
| 642 |
<tr> |
| 643 |
<td class="parameter_name"><p>path</p></td> |
| 644 |
<td class="parameter_description"><p>Pointer to an <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> object.</p></td> |
| 645 |
<td class="parameter_annotations"> </td> |
| 646 |
</tr> |
| 647 |
<tr> |
| 648 |
<td class="parameter_name"><p>depth</p></td> |
| 649 |
<td class="parameter_description"><p>Depth of <em class="parameter"><code>path</code></em> |
| 650 |
to retrieve the index from.</p></td> |
| 651 |
<td class="parameter_annotations"> </td> |
| 652 |
</tr> |
| 653 |
</tbody> |
| 654 |
</table></div> |
| 655 |
</div> |
| 656 |
<div class="refsect3"> |
| 657 |
<a name="idmef-path-get-index.returns"></a><h4>Returns</h4> |
| 658 |
<p> The element index, or a negative value if an error occured.</p> |
| 659 |
</div> |
| 660 |
</div> |
| 661 |
<hr> |
| 662 |
<div class="refsect2"> |
| 663 |
<a name="idmef-path-make-child"></a><h3>idmef_path_make_child ()</h3> |
| 664 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 665 |
idmef_path_make_child (<em class="parameter"><code><a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> *path</code></em>, |
| 666 |
<em class="parameter"><code>const <span class="type">char</span> *child_name</code></em>, |
| 667 |
<em class="parameter"><code><span class="type">int</span> index</code></em>);</pre> |
| 668 |
<p>Modifies <em class="parameter"><code>path</code></em> |
| 669 |
so that it points to the child node identified by <em class="parameter"><code>child_name</code></em> |
| 670 |
, |
| 671 |
children of the current path. That is if the path is currently pointing to |
| 672 |
alert.classification, and <em class="parameter"><code>child_name</code></em> |
| 673 |
is set to "text", <em class="parameter"><code>path</code></em> |
| 674 |
will be |
| 675 |
modified to point to alert.classification.text.</p> |
| 676 |
<div class="refsect3"> |
| 677 |
<a name="idmef-path-make-child.parameters"></a><h4>Parameters</h4> |
| 678 |
<div class="informaltable"><table width="100%" border="0"> |
| 679 |
<colgroup> |
| 680 |
<col width="150px" class="parameters_name"> |
| 681 |
<col class="parameters_description"> |
| 682 |
<col width="200px" class="parameters_annotations"> |
| 683 |
</colgroup> |
| 684 |
<tbody> |
| 685 |
<tr> |
| 686 |
<td class="parameter_name"><p>path</p></td> |
| 687 |
<td class="parameter_description"><p>Pointer to an <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> object.</p></td> |
| 688 |
<td class="parameter_annotations"> </td> |
| 689 |
</tr> |
| 690 |
<tr> |
| 691 |
<td class="parameter_name"><p>child_name</p></td> |
| 692 |
<td class="parameter_description"><p>Name of the child element to create.</p></td> |
| 693 |
<td class="parameter_annotations"> </td> |
| 694 |
</tr> |
| 695 |
<tr> |
| 696 |
<td class="parameter_name"><p>index</p></td> |
| 697 |
<td class="parameter_description"><p>Index for <em class="parameter"><code>child_name</code></em> |
| 698 |
, if applicable.</p></td> |
| 699 |
<td class="parameter_annotations"> </td> |
| 700 |
</tr> |
| 701 |
</tbody> |
| 702 |
</table></div> |
| 703 |
</div> |
| 704 |
<div class="refsect3"> |
| 705 |
<a name="idmef-path-make-child.returns"></a><h4>Returns</h4> |
| 706 |
<p> 0 on success, or a negative value if an error occured.</p> |
| 707 |
</div> |
| 708 |
</div> |
| 709 |
<hr> |
| 710 |
<div class="refsect2"> |
| 711 |
<a name="idmef-path-make-parent"></a><h3>idmef_path_make_parent ()</h3> |
| 712 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 713 |
idmef_path_make_parent (<em class="parameter"><code><a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> *path</code></em>);</pre> |
| 714 |
<p>Removes the last element of the path. That is, if <em class="parameter"><code>path</code></em> |
| 715 |
is currently pointing to |
| 716 |
alert.classification, <em class="parameter"><code>path</code></em> |
| 717 |
will be modified to point to alert.</p> |
| 718 |
<div class="refsect3"> |
| 719 |
<a name="idmef-path-make-parent.parameters"></a><h4>Parameters</h4> |
| 720 |
<div class="informaltable"><table width="100%" border="0"> |
| 721 |
<colgroup> |
| 722 |
<col width="150px" class="parameters_name"> |
| 723 |
<col class="parameters_description"> |
| 724 |
<col width="200px" class="parameters_annotations"> |
| 725 |
</colgroup> |
| 726 |
<tbody><tr> |
| 727 |
<td class="parameter_name"><p>path</p></td> |
| 728 |
<td class="parameter_description"><p>Pointer to an <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> object.</p></td> |
| 729 |
<td class="parameter_annotations"> </td> |
| 730 |
</tr></tbody> |
| 731 |
</table></div> |
| 732 |
</div> |
| 733 |
<div class="refsect3"> |
| 734 |
<a name="idmef-path-make-parent.returns"></a><h4>Returns</h4> |
| 735 |
<p> 0 on success, or a negative value if an error occured.</p> |
| 736 |
</div> |
| 737 |
</div> |
| 738 |
<hr> |
| 739 |
<div class="refsect2"> |
| 740 |
<a name="idmef-path-destroy"></a><h3>idmef_path_destroy ()</h3> |
| 741 |
<pre class="programlisting"><span class="returnvalue">void</span> |
| 742 |
idmef_path_destroy (<em class="parameter"><code><a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> *path</code></em>);</pre> |
| 743 |
<p>Destroys the provided <em class="parameter"><code>path</code></em> |
| 744 |
object.</p> |
| 745 |
<div class="refsect3"> |
| 746 |
<a name="idmef-path-destroy.parameters"></a><h4>Parameters</h4> |
| 747 |
<div class="informaltable"><table width="100%" border="0"> |
| 748 |
<colgroup> |
| 749 |
<col width="150px" class="parameters_name"> |
| 750 |
<col class="parameters_description"> |
| 751 |
<col width="200px" class="parameters_annotations"> |
| 752 |
</colgroup> |
| 753 |
<tbody><tr> |
| 754 |
<td class="parameter_name"><p>path</p></td> |
| 755 |
<td class="parameter_description"><p>Pointer to an <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> object.</p></td> |
| 756 |
<td class="parameter_annotations"> </td> |
| 757 |
</tr></tbody> |
| 758 |
</table></div> |
| 759 |
</div> |
| 760 |
</div> |
| 761 |
<hr> |
| 762 |
<div class="refsect2"> |
| 763 |
<a name="idmef-path-ncompare"></a><h3>idmef_path_ncompare ()</h3> |
| 764 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 765 |
idmef_path_ncompare (<em class="parameter"><code>const <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> *p1</code></em>, |
| 766 |
<em class="parameter"><code>const <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> *p2</code></em>, |
| 767 |
<em class="parameter"><code>unsigned <span class="type">int</span> depth</code></em>);</pre> |
| 768 |
<p>Compares <em class="parameter"><code>p1</code></em> |
| 769 |
and <em class="parameter"><code>p2</code></em> |
| 770 |
elements up to <em class="parameter"><code>depth</code></em> |
| 771 |
.</p> |
| 772 |
<div class="refsect3"> |
| 773 |
<a name="idmef-path-ncompare.parameters"></a><h4>Parameters</h4> |
| 774 |
<div class="informaltable"><table width="100%" border="0"> |
| 775 |
<colgroup> |
| 776 |
<col width="150px" class="parameters_name"> |
| 777 |
<col class="parameters_description"> |
| 778 |
<col width="200px" class="parameters_annotations"> |
| 779 |
</colgroup> |
| 780 |
<tbody> |
| 781 |
<tr> |
| 782 |
<td class="parameter_name"><p>p1</p></td> |
| 783 |
<td class="parameter_description"><p>Pointer to an <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> object.</p></td> |
| 784 |
<td class="parameter_annotations"> </td> |
| 785 |
</tr> |
| 786 |
<tr> |
| 787 |
<td class="parameter_name"><p>p2</p></td> |
| 788 |
<td class="parameter_description"><p>Pointer to another <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> object.</p></td> |
| 789 |
<td class="parameter_annotations"> </td> |
| 790 |
</tr> |
| 791 |
<tr> |
| 792 |
<td class="parameter_name"><p>depth</p></td> |
| 793 |
<td class="parameter_description"><p>Maximum depth to use for path comparison.</p></td> |
| 794 |
<td class="parameter_annotations"> </td> |
| 795 |
</tr> |
| 796 |
</tbody> |
| 797 |
</table></div> |
| 798 |
</div> |
| 799 |
<div class="refsect3"> |
| 800 |
<a name="idmef-path-ncompare.returns"></a><h4>Returns</h4> |
| 801 |
<p> 0 if both element match, a negative value otherwise.</p> |
| 802 |
</div> |
| 803 |
</div> |
| 804 |
<hr> |
| 805 |
<div class="refsect2"> |
| 806 |
<a name="idmef-path-compare"></a><h3>idmef_path_compare ()</h3> |
| 807 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 808 |
idmef_path_compare (<em class="parameter"><code>const <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> *p1</code></em>, |
| 809 |
<em class="parameter"><code>const <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> *p2</code></em>);</pre> |
| 810 |
<p>Compares <em class="parameter"><code>p1</code></em> |
| 811 |
and <em class="parameter"><code>p2</code></em> |
| 812 |
elements.</p> |
| 813 |
<div class="refsect3"> |
| 814 |
<a name="idmef-path-compare.parameters"></a><h4>Parameters</h4> |
| 815 |
<div class="informaltable"><table width="100%" border="0"> |
| 816 |
<colgroup> |
| 817 |
<col width="150px" class="parameters_name"> |
| 818 |
<col class="parameters_description"> |
| 819 |
<col width="200px" class="parameters_annotations"> |
| 820 |
</colgroup> |
| 821 |
<tbody> |
| 822 |
<tr> |
| 823 |
<td class="parameter_name"><p>p1</p></td> |
| 824 |
<td class="parameter_description"><p>Pointer to an <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> object.</p></td> |
| 825 |
<td class="parameter_annotations"> </td> |
| 826 |
</tr> |
| 827 |
<tr> |
| 828 |
<td class="parameter_name"><p>p2</p></td> |
| 829 |
<td class="parameter_description"><p>Pointer to another <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> object.</p></td> |
| 830 |
<td class="parameter_annotations"> </td> |
| 831 |
</tr> |
| 832 |
</tbody> |
| 833 |
</table></div> |
| 834 |
</div> |
| 835 |
<div class="refsect3"> |
| 836 |
<a name="idmef-path-compare.returns"></a><h4>Returns</h4> |
| 837 |
<p> 0 if both element match, a negative value otherwise.</p> |
| 838 |
</div> |
| 839 |
</div> |
| 840 |
<hr> |
| 841 |
<div class="refsect2"> |
| 842 |
<a name="idmef-path-clone"></a><h3>idmef_path_clone ()</h3> |
| 843 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 844 |
idmef_path_clone (<em class="parameter"><code>const <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> *src</code></em>, |
| 845 |
<em class="parameter"><code><a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> **dst</code></em>);</pre> |
| 846 |
<p>Clones <em class="parameter"><code>src</code></em> |
| 847 |
and stores the result in the provided <em class="parameter"><code>dst</code></em> |
| 848 |
address.</p> |
| 849 |
<div class="refsect3"> |
| 850 |
<a name="idmef-path-clone.parameters"></a><h4>Parameters</h4> |
| 851 |
<div class="informaltable"><table width="100%" border="0"> |
| 852 |
<colgroup> |
| 853 |
<col width="150px" class="parameters_name"> |
| 854 |
<col class="parameters_description"> |
| 855 |
<col width="200px" class="parameters_annotations"> |
| 856 |
</colgroup> |
| 857 |
<tbody> |
| 858 |
<tr> |
| 859 |
<td class="parameter_name"><p>src</p></td> |
| 860 |
<td class="parameter_description"><p>Pointer to an <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> object.</p></td> |
| 861 |
<td class="parameter_annotations"> </td> |
| 862 |
</tr> |
| 863 |
<tr> |
| 864 |
<td class="parameter_name"><p>dst</p></td> |
| 865 |
<td class="parameter_description"><p>Address where to store the copy of <em class="parameter"><code>src</code></em> |
| 866 |
.</p></td> |
| 867 |
<td class="parameter_annotations"> </td> |
| 868 |
</tr> |
| 869 |
</tbody> |
| 870 |
</table></div> |
| 871 |
</div> |
| 872 |
<div class="refsect3"> |
| 873 |
<a name="idmef-path-clone.returns"></a><h4>Returns</h4> |
| 874 |
<p> 0 on success, a negative value otherwise.</p> |
| 875 |
</div> |
| 876 |
</div> |
| 877 |
<hr> |
| 878 |
<div class="refsect2"> |
| 879 |
<a name="idmef-path-ref"></a><h3>idmef_path_ref ()</h3> |
| 880 |
<pre class="programlisting"><a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="returnvalue">idmef_path_t</span></a> * |
| 881 |
idmef_path_ref (<em class="parameter"><code><a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> *path</code></em>);</pre> |
| 882 |
<p>Increases <em class="parameter"><code>path</code></em> |
| 883 |
reference count.</p> |
| 884 |
<p>idmef_path_destroy() will destroy the refcount until it reaches 0, |
| 885 |
at which point the path will be destroyed.</p> |
| 886 |
<div class="refsect3"> |
| 887 |
<a name="idmef-path-ref.parameters"></a><h4>Parameters</h4> |
| 888 |
<div class="informaltable"><table width="100%" border="0"> |
| 889 |
<colgroup> |
| 890 |
<col width="150px" class="parameters_name"> |
| 891 |
<col class="parameters_description"> |
| 892 |
<col width="200px" class="parameters_annotations"> |
| 893 |
</colgroup> |
| 894 |
<tbody><tr> |
| 895 |
<td class="parameter_name"><p>path</p></td> |
| 896 |
<td class="parameter_description"><p>Pointer to an <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> object.</p></td> |
| 897 |
<td class="parameter_annotations"> </td> |
| 898 |
</tr></tbody> |
| 899 |
</table></div> |
| 900 |
</div> |
| 901 |
<div class="refsect3"> |
| 902 |
<a name="idmef-path-ref.returns"></a><h4>Returns</h4> |
| 903 |
<p> The provided <em class="parameter"><code>path</code></em> |
| 904 |
is returned.</p> |
| 905 |
</div> |
| 906 |
</div> |
| 907 |
<hr> |
| 908 |
<div class="refsect2"> |
| 909 |
<a name="idmef-path-get-name"></a><h3>idmef_path_get_name ()</h3> |
| 910 |
<pre class="programlisting">const <span class="returnvalue">char</span> * |
| 911 |
idmef_path_get_name (<em class="parameter"><code>const <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> *path</code></em>, |
| 912 |
<em class="parameter"><code><span class="type">int</span> depth</code></em>);</pre> |
| 913 |
<p>Returns the full path name if the provided <em class="parameter"><code>depth</code></em> |
| 914 |
is -1, or the specific |
| 915 |
element name if depth is set. That is, for a <em class="parameter"><code>path</code></em> |
| 916 |
pointing to |
| 917 |
"alert.classification.text": A depth of -1 would return "alert.classification.text"; |
| 918 |
a depth of 0 would return "alert"; a depth of 1 would return "classification"; and |
| 919 |
a depth of 2 would return "text".</p> |
| 920 |
<div class="refsect3"> |
| 921 |
<a name="idmef-path-get-name.parameters"></a><h4>Parameters</h4> |
| 922 |
<div class="informaltable"><table width="100%" border="0"> |
| 923 |
<colgroup> |
| 924 |
<col width="150px" class="parameters_name"> |
| 925 |
<col class="parameters_description"> |
| 926 |
<col width="200px" class="parameters_annotations"> |
| 927 |
</colgroup> |
| 928 |
<tbody> |
| 929 |
<tr> |
| 930 |
<td class="parameter_name"><p>path</p></td> |
| 931 |
<td class="parameter_description"><p>Pointer to an <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> object.</p></td> |
| 932 |
<td class="parameter_annotations"> </td> |
| 933 |
</tr> |
| 934 |
<tr> |
| 935 |
<td class="parameter_name"><p>depth</p></td> |
| 936 |
<td class="parameter_description"><p>Depth of the <em class="parameter"><code>path</code></em> |
| 937 |
element to get the name from.</p></td> |
| 938 |
<td class="parameter_annotations"> </td> |
| 939 |
</tr> |
| 940 |
</tbody> |
| 941 |
</table></div> |
| 942 |
</div> |
| 943 |
<div class="refsect3"> |
| 944 |
<a name="idmef-path-get-name.returns"></a><h4>Returns</h4> |
| 945 |
<p> <em class="parameter"><code>path</code></em> |
| 946 |
name relative to the provided <em class="parameter"><code>dept</code></em> |
| 947 |
.</p> |
| 948 |
</div> |
| 949 |
</div> |
| 950 |
<hr> |
| 951 |
<div class="refsect2"> |
| 952 |
<a name="idmef-path-is-ambiguous"></a><h3>idmef_path_is_ambiguous ()</h3> |
| 953 |
<pre class="programlisting"><a class="link" href="libprelude-prelude-inttypes.html#prelude-bool-t" title="enum prelude_bool_t"><span class="returnvalue">prelude_bool_t</span></a> |
| 954 |
idmef_path_is_ambiguous (<em class="parameter"><code>const <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> *path</code></em>);</pre> |
| 955 |
<p>Returns TRUE if <em class="parameter"><code>path</code></em> |
| 956 |
contain elements that are supposed |
| 957 |
to be listed, but for which no index were provided.</p> |
| 958 |
<div class="refsect3"> |
| 959 |
<a name="idmef-path-is-ambiguous.parameters"></a><h4>Parameters</h4> |
| 960 |
<div class="informaltable"><table width="100%" border="0"> |
| 961 |
<colgroup> |
| 962 |
<col width="150px" class="parameters_name"> |
| 963 |
<col class="parameters_description"> |
| 964 |
<col width="200px" class="parameters_annotations"> |
| 965 |
</colgroup> |
| 966 |
<tbody><tr> |
| 967 |
<td class="parameter_name"><p>path</p></td> |
| 968 |
<td class="parameter_description"><p>Pointer to an <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> object.</p></td> |
| 969 |
<td class="parameter_annotations"> </td> |
| 970 |
</tr></tbody> |
| 971 |
</table></div> |
| 972 |
</div> |
| 973 |
<div class="refsect3"> |
| 974 |
<a name="idmef-path-is-ambiguous.returns"></a><h4>Returns</h4> |
| 975 |
<p> TRUE if the object is ambiguous, FALSE otherwise.</p> |
| 976 |
</div> |
| 977 |
</div> |
| 978 |
<hr> |
| 979 |
<div class="refsect2"> |
| 980 |
<a name="idmef-path-has-lists"></a><h3>idmef_path_has_lists ()</h3> |
| 981 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 982 |
idmef_path_has_lists (<em class="parameter"><code>const <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> *path</code></em>);</pre> |
| 983 |
<div class="refsect3"> |
| 984 |
<a name="idmef-path-has-lists.parameters"></a><h4>Parameters</h4> |
| 985 |
<div class="informaltable"><table width="100%" border="0"> |
| 986 |
<colgroup> |
| 987 |
<col width="150px" class="parameters_name"> |
| 988 |
<col class="parameters_description"> |
| 989 |
<col width="200px" class="parameters_annotations"> |
| 990 |
</colgroup> |
| 991 |
<tbody><tr> |
| 992 |
<td class="parameter_name"><p>path</p></td> |
| 993 |
<td class="parameter_description"><p>Pointer to an <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> object.</p></td> |
| 994 |
<td class="parameter_annotations"> </td> |
| 995 |
</tr></tbody> |
| 996 |
</table></div> |
| 997 |
</div> |
| 998 |
<div class="refsect3"> |
| 999 |
<a name="idmef-path-has-lists.returns"></a><h4>Returns</h4> |
| 1000 |
<p> the number of listed element within <em class="parameter"><code>path</code></em> |
| 1001 |
.</p> |
| 1002 |
</div> |
| 1003 |
</div> |
| 1004 |
<hr> |
| 1005 |
<div class="refsect2"> |
| 1006 |
<a name="idmef-path-is-list"></a><h3>idmef_path_is_list ()</h3> |
| 1007 |
<pre class="programlisting"><a class="link" href="libprelude-prelude-inttypes.html#prelude-bool-t" title="enum prelude_bool_t"><span class="returnvalue">prelude_bool_t</span></a> |
| 1008 |
idmef_path_is_list (<em class="parameter"><code>const <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> *path</code></em>, |
| 1009 |
<em class="parameter"><code><span class="type">int</span> depth</code></em>);</pre> |
| 1010 |
</div> |
| 1011 |
<hr> |
| 1012 |
<div class="refsect2"> |
| 1013 |
<a name="idmef-path-get-depth"></a><h3>idmef_path_get_depth ()</h3> |
| 1014 |
<pre class="programlisting">unsigned <span class="returnvalue">int</span> |
| 1015 |
idmef_path_get_depth (<em class="parameter"><code>const <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> *path</code></em>);</pre> |
| 1016 |
<div class="refsect3"> |
| 1017 |
<a name="idmef-path-get-depth.parameters"></a><h4>Parameters</h4> |
| 1018 |
<div class="informaltable"><table width="100%" border="0"> |
| 1019 |
<colgroup> |
| 1020 |
<col width="150px" class="parameters_name"> |
| 1021 |
<col class="parameters_description"> |
| 1022 |
<col width="200px" class="parameters_annotations"> |
| 1023 |
</colgroup> |
| 1024 |
<tbody><tr> |
| 1025 |
<td class="parameter_name"><p>path</p></td> |
| 1026 |
<td class="parameter_description"><p>Pointer to an <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> object.</p></td> |
| 1027 |
<td class="parameter_annotations"> </td> |
| 1028 |
</tr></tbody> |
| 1029 |
</table></div> |
| 1030 |
</div> |
| 1031 |
<div class="refsect3"> |
| 1032 |
<a name="idmef-path-get-depth.returns"></a><h4>Returns</h4> |
| 1033 |
<p> <em class="parameter"><code>depth</code></em> |
| 1034 |
number of elements.</p> |
| 1035 |
</div> |
| 1036 |
</div> |
| 1037 |
<hr> |
| 1038 |
<div class="refsect2"> |
| 1039 |
<a name="idmef-path-check-operator"></a><h3>idmef_path_check_operator ()</h3> |
| 1040 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 1041 |
idmef_path_check_operator (<em class="parameter"><code>const <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> *path</code></em>, |
| 1042 |
<em class="parameter"><code><a class="link" href="libprelude-idmef-criteria.html#idmef-criterion-operator-t" title="enum idmef_criterion_operator_t"><span class="type">idmef_criterion_operator_t</span></a> op</code></em>);</pre> |
| 1043 |
<p>Check whether <em class="parameter"><code>op</code></em> |
| 1044 |
can apply to value pointed to by <em class="parameter"><code>path</code></em> |
| 1045 |
.</p> |
| 1046 |
<div class="refsect3"> |
| 1047 |
<a name="idmef-path-check-operator.parameters"></a><h4>Parameters</h4> |
| 1048 |
<div class="informaltable"><table width="100%" border="0"> |
| 1049 |
<colgroup> |
| 1050 |
<col width="150px" class="parameters_name"> |
| 1051 |
<col class="parameters_description"> |
| 1052 |
<col width="200px" class="parameters_annotations"> |
| 1053 |
</colgroup> |
| 1054 |
<tbody> |
| 1055 |
<tr> |
| 1056 |
<td class="parameter_name"><p>path</p></td> |
| 1057 |
<td class="parameter_description"><p>Pointer to a <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> object.</p></td> |
| 1058 |
<td class="parameter_annotations"> </td> |
| 1059 |
</tr> |
| 1060 |
<tr> |
| 1061 |
<td class="parameter_name"><p>op</p></td> |
| 1062 |
<td class="parameter_description"><p>Operator to check compatibility with.</p></td> |
| 1063 |
<td class="parameter_annotations"> </td> |
| 1064 |
</tr> |
| 1065 |
</tbody> |
| 1066 |
</table></div> |
| 1067 |
</div> |
| 1068 |
<div class="refsect3"> |
| 1069 |
<a name="idmef-path-check-operator.returns"></a><h4>Returns</h4> |
| 1070 |
<p> 0 on success, a negative value if an error occured.</p> |
| 1071 |
</div> |
| 1072 |
</div> |
| 1073 |
<hr> |
| 1074 |
<div class="refsect2"> |
| 1075 |
<a name="idmef-path-get-applicable-operators"></a><h3>idmef_path_get_applicable_operators ()</h3> |
| 1076 |
<pre class="programlisting"><span class="returnvalue">int</span> |
| 1077 |
idmef_path_get_applicable_operators (<em class="parameter"><code>const <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> *path</code></em>, |
| 1078 |
<em class="parameter"><code><a class="link" href="libprelude-idmef-criteria.html#idmef-criterion-operator-t" title="enum idmef_criterion_operator_t"><span class="type">idmef_criterion_operator_t</span></a> *result</code></em>);</pre> |
| 1079 |
<p>Retrieve all applicable operator that might be used by the type of |
| 1080 |
value pointed to by <em class="parameter"><code>path</code></em> |
| 1081 |
.</p> |
| 1082 |
<div class="refsect3"> |
| 1083 |
<a name="idmef-path-get-applicable-operators.parameters"></a><h4>Parameters</h4> |
| 1084 |
<div class="informaltable"><table width="100%" border="0"> |
| 1085 |
<colgroup> |
| 1086 |
<col width="150px" class="parameters_name"> |
| 1087 |
<col class="parameters_description"> |
| 1088 |
<col width="200px" class="parameters_annotations"> |
| 1089 |
</colgroup> |
| 1090 |
<tbody> |
| 1091 |
<tr> |
| 1092 |
<td class="parameter_name"><p>path</p></td> |
| 1093 |
<td class="parameter_description"><p>Pointer to a <a class="link" href="libprelude-idmef-path.html#idmef-path-t" title="idmef_path_t"><span class="type">idmef_path_t</span></a> object.</p></td> |
| 1094 |
<td class="parameter_annotations"> </td> |
| 1095 |
</tr> |
| 1096 |
<tr> |
| 1097 |
<td class="parameter_name"><p>result</p></td> |
| 1098 |
<td class="parameter_description"><p>Pointer to storage for applicable operator.</p></td> |
| 1099 |
<td class="parameter_annotations"> </td> |
| 1100 |
</tr> |
| 1101 |
</tbody> |
| 1102 |
</table></div> |
| 1103 |
</div> |
| 1104 |
<div class="refsect3"> |
| 1105 |
<a name="idmef-path-get-applicable-operators.returns"></a><h4>Returns</h4> |
| 1106 |
<p> 0 on success, a negative value if an error occured.</p> |
| 1107 |
</div> |
| 1108 |
</div> |
| 1109 |
</div> |
| 1110 |
<div class="refsect1"> |
| 1111 |
<a name="libprelude-idmef-path.other_details"></a><h2>Types and Values</h2> |
| 1112 |
<div class="refsect2"> |
| 1113 |
<a name="idmef-path-t"></a><h3>idmef_path_t</h3> |
| 1114 |
<pre class="programlisting">typedef struct idmef_path idmef_path_t; |
| 1115 |
</pre> |
| 1116 |
</div> |
| 1117 |
</div> |
| 1118 |
</div> |
| 1119 |
<div class="footer"> |
| 1120 |
<hr>Generated by GTK-Doc V1.28</div> |
| 1121 |
</body> |
| 1122 |
</html> |