File: libprelude-prelude-client.html

package info (click to toggle)
libprelude 5.2.0-3%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 22,672 kB
  • sloc: ansic: 106,364; cpp: 65,981; sh: 13,078; perl: 683; makefile: 670; awk: 343; yacc: 319; lex: 177; xml: 61; python: 41
file content (1068 lines) | stat: -rw-r--r-- 56,808 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>prelude-client: libprelude Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="libprelude Reference Manual">
<link rel="up" href="ch01.html" title="[Insert title here]">
<link rel="prev" href="libprelude-prelude-ident.html" title="prelude-ident">
<link rel="next" href="libprelude-prelude-client-profile.html" title="prelude-client-profile">
<meta name="generator" content="GTK-Doc V1.28 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#libprelude-prelude-client.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="libprelude-prelude-ident.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="libprelude-prelude-client-profile.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="libprelude-prelude-client"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libprelude-prelude-client.top_of_page"></a>prelude-client</span></h2>
<p>prelude-client</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="libprelude-prelude-client.functions"></a><h2>Functions</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="libprelude-prelude-ident.html#prelude-ident-t" title="prelude_ident_t"><span class="returnvalue">prelude_ident_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="libprelude-prelude-client.html#prelude-client-get-unique-ident" title="prelude_client_get_unique_ident ()">prelude_client_get_unique_ident</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libprelude-prelude-client.html#prelude-client-set-connection-pool" title="prelude_client_set_connection_pool ()">prelude_client_set_connection_pool</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="returnvalue">prelude_connection_pool_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="libprelude-prelude-client.html#prelude-client-get-connection-pool" title="prelude_client_get_connection_pool ()">prelude_client_get_connection_pool</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="libprelude-prelude-client.html#prelude-client-start" title="prelude_client_start ()">prelude_client_start</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="libprelude-prelude-client.html#prelude-client-init" title="prelude_client_init ()">prelude_client_init</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="libprelude-prelude-client.html#prelude-client-new" title="prelude_client_new ()">prelude_client_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t"><span class="returnvalue">prelude_client_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="libprelude-prelude-client.html#prelude-client-ref" title="prelude_client_ref ()">prelude_client_ref</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libprelude-idmef-tree-wrap.html#idmef-analyzer-t" title="idmef_analyzer_t"><span class="returnvalue">idmef_analyzer_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="libprelude-prelude-client.html#prelude-client-get-analyzer" title="prelude_client_get_analyzer ()">prelude_client_get_analyzer</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libprelude-prelude-client.html#prelude-client-flags-t" title="enum prelude_client_flags_t"><span class="returnvalue">prelude_client_flags_t</span></a>
</td>
<td class="function_name">
<a class="link" href="libprelude-prelude-client.html#prelude-client-get-flags" title="prelude_client_get_flags ()">prelude_client_get_flags</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libprelude-prelude-client.html#prelude-client-set-required-permission" title="prelude_client_set_required_permission ()">prelude_client_set_required_permission</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libprelude-prelude-connection.html#prelude-connection-permission-t" title="enum prelude_connection_permission_t"><span class="returnvalue">prelude_connection_permission_t</span></a>
</td>
<td class="function_name">
<a class="link" href="libprelude-prelude-client.html#prelude-client-get-required-permission" title="prelude_client_get_required_permission ()">prelude_client_get_required_permission</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libprelude-prelude-client.html#prelude-client-send-msg" title="prelude_client_send_msg ()">prelude_client_send_msg</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="libprelude-prelude-client.html#prelude-client-recv-msg" title="prelude_client_recv_msg ()">prelude_client_recv_msg</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libprelude-prelude-client.html#prelude-client-set-heartbeat-cb" title="prelude_client_set_heartbeat_cb ()">prelude_client_set_heartbeat_cb</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libprelude-prelude-client.html#prelude-client-send-idmef" title="prelude_client_send_idmef ()">prelude_client_send_idmef</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="libprelude-prelude-client.html#prelude-client-recv-idmef" title="prelude_client_recv_idmef ()">prelude_client_recv_idmef</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libprelude-prelude-client.html#prelude-client-destroy" title="prelude_client_destroy ()">prelude_client_destroy</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="libprelude-prelude-client.html#prelude-client-set-flags" title="prelude_client_set_flags ()">prelude_client_set_flags</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="libprelude-prelude-client.html#prelude-client-set-config-filename" title="prelude_client_set_config_filename ()">prelude_client_set_config_filename</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="libprelude-prelude-client.html#prelude-client-get-config-filename" title="prelude_client_get_config_filename ()">prelude_client_get_config_filename</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libprelude-prelude-inttypes.html#prelude-bool-t" title="enum prelude_bool_t"><span class="returnvalue">prelude_bool_t</span></a>
</td>
<td class="function_name">
<a class="link" href="libprelude-prelude-client.html#prelude-client-is-setup-needed" title="prelude_client_is_setup_needed ()">prelude_client_is_setup_needed</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libprelude-prelude-client-profile.html#prelude-client-profile-t" title="prelude_client_profile_t"><span class="returnvalue">prelude_client_profile_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="libprelude-prelude-client.html#prelude-client-get-profile" title="prelude_client_get_profile ()">prelude_client_get_profile</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="libprelude-prelude-client.html#prelude-client-new-msgbuf" title="prelude_client_new_msgbuf ()">prelude_client_new_msgbuf</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="libprelude-prelude-client.html#prelude-client-handle-msg-default" title="prelude_client_handle_msg_default ()">prelude_client_handle_msg_default</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="libprelude-prelude-client.html#prelude-client-get-setup-error" title="prelude_client_get_setup_error ()">prelude_client_get_setup_error</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libprelude-prelude-client.html#prelude-client-print-setup-error" title="prelude_client_print_setup_error ()">prelude_client_print_setup_error</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libprelude-prelude-client.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="libprelude-prelude-client.html#prelude-client-exit-status-t" title="enum prelude_client_exit_status_t">prelude_client_exit_status_t</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="libprelude-prelude-client.html#prelude-client-flags-t" title="enum prelude_client_flags_t">prelude_client_flags_t</a></td>
</tr>
<tr>
<td class="typedef_keyword">typedef</td>
<td class="function_name"><a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t">prelude_client_t</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libprelude-prelude-client.description"></a><h2>Description</h2>
</div>
<div class="refsect1">
<a name="libprelude-prelude-client.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="prelude-client-get-unique-ident"></a><h3>prelude_client_get_unique_ident ()</h3>
<pre class="programlisting"><a class="link" href="libprelude-prelude-ident.html#prelude-ident-t" title="prelude_ident_t"><span class="returnvalue">prelude_ident_t</span></a> *
prelude_client_get_unique_ident (<em class="parameter"><code><a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t"><span class="type">prelude_client_t</span></a> *client</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="prelude-client-set-connection-pool"></a><h3>prelude_client_set_connection_pool ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
prelude_client_set_connection_pool (<em class="parameter"><code><a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t"><span class="type">prelude_client_t</span></a> *client</code></em>,
                                    <em class="parameter"><code><a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> *pool</code></em>);</pre>
<p>Use this function in order to set your own list of peer that <em class="parameter"><code>client</code></em>

should send message too. This might be usefull in case you don't want
this to be automated by <a class="link" href="libprelude-prelude-client.html#prelude-client-init" title="prelude_client_init ()"><code class="function">prelude_client_init()</code></a>.</p>
<div class="refsect3">
<a name="prelude-client-set-connection-pool.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>client</p></td>
<td class="parameter_description"><p>pointer to a <a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t"><span class="type">prelude_client_t</span></a> object.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>pool</p></td>
<td class="parameter_description"><p>pointer to a <span class="type">prelude_client_pool_t</span> object.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="prelude-client-get-connection-pool"></a><h3>prelude_client_get_connection_pool ()</h3>
<pre class="programlisting"><a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="returnvalue">prelude_connection_pool_t</span></a> *
prelude_client_get_connection_pool (<em class="parameter"><code><a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t"><span class="type">prelude_client_t</span></a> *client</code></em>);</pre>
<p>Return a pointer to the <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object used by <em class="parameter"><code>client</code></em>

to send messages.</p>
<div class="refsect3">
<a name="prelude-client-get-connection-pool.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>client</p></td>
<td class="parameter_description"><p>pointer to a <a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t"><span class="type">prelude_client_t</span></a> object.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="prelude-client-get-connection-pool.returns"></a><h4>Returns</h4>
<p> a pointer to a <a class="link" href="libprelude-prelude-connection-pool.html#prelude-connection-pool-t" title="prelude_connection_pool_t"><span class="type">prelude_connection_pool_t</span></a> object.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="prelude-client-start"></a><h3>prelude_client_start ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
prelude_client_start (<em class="parameter"><code><a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t"><span class="type">prelude_client_t</span></a> *client</code></em>);</pre>
<p>This function start the <em class="parameter"><code>client</code></em>
 object, triggering
a connection from the client to it's server if any were
specified, and sending the initial <em class="parameter"><code>client</code></em>
 heartbeat.</p>
<p>If <em class="parameter"><code>client</code></em>
 was not initialized, then <a class="link" href="libprelude-prelude-client.html#prelude-client-init" title="prelude_client_init ()"><code class="function">prelude_client_init()</code></a>
will be called and thus this function might fail if the
client was not registered.</p>
<div class="refsect3">
<a name="prelude-client-start.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>client</p></td>
<td class="parameter_description"><p>Pointer to a client object to initialize.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="prelude-client-start.returns"></a><h4>Returns</h4>
<p> 0 on success, -1 if an error occured.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="prelude-client-init"></a><h3>prelude_client_init ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
prelude_client_init (<em class="parameter"><code><a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t"><span class="type">prelude_client_t</span></a> *client</code></em>);</pre>
<p>This function initialize the <em class="parameter"><code>client</code></em>
 object, meaning reading generic
options from the <a class="link" href="libprelude-prelude-client.html#prelude-client-new" title="prelude_client_new ()"><code class="function">prelude_client_new()</code></a> provided configuration file
and the array of arguments specified through <a class="link" href="libprelude-prelude.html#prelude-init" title="prelude_init ()"><code class="function">prelude_init()</code></a>.</p>
<p>Calling this function is optional and should be done only if you need more
granularity between <a class="link" href="libprelude-prelude-client.html#prelude-client-new" title="prelude_client_new ()"><code class="function">prelude_client_new()</code></a> and <a class="link" href="libprelude-prelude-client.html#prelude-client-start" title="prelude_client_start ()"><code class="function">prelude_client_start()</code></a>:</p>
<p>prelude_client_start() will call <a class="link" href="libprelude-prelude-client.html#prelude-client-init" title="prelude_client_init ()"><code class="function">prelude_client_init()</code></a> for you if needed.</p>
<div class="refsect3">
<a name="prelude-client-init.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>client</p></td>
<td class="parameter_description"><p>Pointer to a <a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t"><span class="type">prelude_client_t</span></a> object to initialize.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="prelude-client-init.returns"></a><h4>Returns</h4>
<p> 0 on success, -1 if an error occured.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="prelude-client-new"></a><h3>prelude_client_new ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
prelude_client_new (<em class="parameter"><code><a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t"><span class="type">prelude_client_t</span></a> **client</code></em>,
                    <em class="parameter"><code>const <span class="type">char</span> *profile</code></em>);</pre>
<p>This function initialize the <em class="parameter"><code>client</code></em>
 object.</p>
<div class="refsect3">
<a name="prelude-client-new.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>client</p></td>
<td class="parameter_description"><p>Pointer to a client object to initialize.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>profile</p></td>
<td class="parameter_description"><p>Default profile name for this analyzer.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="prelude-client-new.returns"></a><h4>Returns</h4>
<p> 0 on success or a negative value if an error occur.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="prelude-client-ref"></a><h3>prelude_client_ref ()</h3>
<pre class="programlisting"><a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t"><span class="returnvalue">prelude_client_t</span></a> *
prelude_client_ref (<em class="parameter"><code><a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t"><span class="type">prelude_client_t</span></a> *client</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="prelude-client-get-analyzer"></a><h3>prelude_client_get_analyzer ()</h3>
<pre class="programlisting"><a class="link" href="libprelude-idmef-tree-wrap.html#idmef-analyzer-t" title="idmef_analyzer_t"><span class="returnvalue">idmef_analyzer_t</span></a> *
prelude_client_get_analyzer (<em class="parameter"><code><a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t"><span class="type">prelude_client_t</span></a> *client</code></em>);</pre>
<p>Provide access to the <a class="link" href="libprelude-idmef-tree-wrap.html#idmef-analyzer-t" title="idmef_analyzer_t"><span class="type">idmef_analyzer_t</span></a> object associated to <em class="parameter"><code>client</code></em>
.
This analyzer object is sent along with every alerts and heartbeats emited
by this client. The analyzer object is created by <a class="link" href="libprelude-prelude-client.html#prelude-client-init" title="prelude_client_init ()"><code class="function">prelude_client_init()</code></a>.</p>
<div class="refsect3">
<a name="prelude-client-get-analyzer.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>client</p></td>
<td class="parameter_description"><p>Pointer to a <a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t"><span class="type">prelude_client_t</span></a> object.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="prelude-client-get-analyzer.returns"></a><h4>Returns</h4>
<p> the <a class="link" href="libprelude-idmef-tree-wrap.html#idmef-analyzer-t" title="idmef_analyzer_t"><span class="type">idmef_analyzer_t</span></a> object associated with <em class="parameter"><code>client</code></em>
.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="prelude-client-get-flags"></a><h3>prelude_client_get_flags ()</h3>
<pre class="programlisting"><a class="link" href="libprelude-prelude-client.html#prelude-client-flags-t" title="enum prelude_client_flags_t"><span class="returnvalue">prelude_client_flags_t</span></a>
prelude_client_get_flags (<em class="parameter"><code><a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t"><span class="type">prelude_client_t</span></a> *client</code></em>);</pre>
<p>Get flags set through <a class="link" href="libprelude-prelude-client.html#prelude-client-set-flags" title="prelude_client_set_flags ()"><code class="function">prelude_client_set_flags()</code></a>.</p>
<div class="refsect3">
<a name="prelude-client-get-flags.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>client</p></td>
<td class="parameter_description"><p>Pointer on a <a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t"><span class="type">prelude_client_t</span></a> object.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="prelude-client-get-flags.returns"></a><h4>Returns</h4>
<p> an or'ed list of <a class="link" href="libprelude-prelude-client.html#prelude-client-flags-t" title="enum prelude_client_flags_t"><span class="type">prelude_client_flags_t</span></a>.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="prelude-client-set-required-permission"></a><h3>prelude_client_set_required_permission ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
prelude_client_set_required_permission
                               (<em class="parameter"><code><a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t"><span class="type">prelude_client_t</span></a> *client</code></em>,
                                <em class="parameter"><code><a class="link" href="libprelude-prelude-connection.html#prelude-connection-permission-t" title="enum prelude_connection_permission_t"><span class="type">prelude_connection_permission_t</span></a> permission</code></em>);</pre>
<p>Set the required <em class="parameter"><code>permission</code></em>
 for <em class="parameter"><code>client</code></em>
.
The default is <a class="link" href="libprelude-prelude-connection.html#PRELUDE-CONNECTION-PERMISSION-IDMEF-WRITE:CAPS"><span class="type">PRELUDE_CONNECTION_PERMISSION_IDMEF_WRITE</span></a> | <a class="link" href="libprelude-prelude-connection.html#PRELUDE-CONNECTION-PERMISSION-ADMIN-READ:CAPS"><span class="type">PRELUDE_CONNECTION_PERMISSION_ADMIN_READ</span></a>.
Value set through this function should be set before <a class="link" href="libprelude-prelude-client.html#prelude-client-start" title="prelude_client_start ()"><code class="function">prelude_client_start()</code></a>.</p>
<p>If the client certificate for connecting to one of the specified manager doesn't have theses permission
the client will reject the certificate and ask for registration.</p>
<div class="refsect3">
<a name="prelude-client-set-required-permission.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>client</p></td>
<td class="parameter_description"><p>Pointer on a <a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t"><span class="type">prelude_client_t</span></a> object.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>permission</p></td>
<td class="parameter_description"><p>Required permission for <em class="parameter"><code>client</code></em>
.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="prelude-client-get-required-permission"></a><h3>prelude_client_get_required_permission ()</h3>
<pre class="programlisting"><a class="link" href="libprelude-prelude-connection.html#prelude-connection-permission-t" title="enum prelude_connection_permission_t"><span class="returnvalue">prelude_connection_permission_t</span></a>
prelude_client_get_required_permission
                               (<em class="parameter"><code><a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t"><span class="type">prelude_client_t</span></a> *client</code></em>);</pre>
<div class="refsect3">
<a name="prelude-client-get-required-permission.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>client</p></td>
<td class="parameter_description"><p>Pointer on a <a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t"><span class="type">prelude_client_t</span></a> object.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="prelude-client-get-required-permission.returns"></a><h4>Returns</h4>
<p> <em class="parameter"><code>client</code></em>
permission as set with <a class="link" href="libprelude-prelude-client.html#prelude-client-set-required-permission" title="prelude_client_set_required_permission ()"><code class="function">prelude_client_set_required_permission()</code></a></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="prelude-client-send-msg"></a><h3>prelude_client_send_msg ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
prelude_client_send_msg (<em class="parameter"><code><a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t"><span class="type">prelude_client_t</span></a> *client</code></em>,
                         <em class="parameter"><code><a class="link" href="libprelude-prelude-msg.html#prelude-msg-t" title="prelude_msg_t"><span class="type">prelude_msg_t</span></a> *msg</code></em>);</pre>
<p>Send <em class="parameter"><code>msg</code></em>
 to the peers <em class="parameter"><code>client</code></em>
 is communicating with.</p>
<p>The message will be sent asynchronously if <em class="parameter"><code>PRELUDE_CLIENT_FLAGS_ASYNC_SEND</code></em>

was set using <a class="link" href="libprelude-prelude-client.html#prelude-client-set-flags" title="prelude_client_set_flags ()"><code class="function">prelude_client_set_flags()</code></a> in which case the caller should
not call <a class="link" href="libprelude-prelude-msg.html#prelude-msg-destroy" title="prelude_msg_destroy ()"><code class="function">prelude_msg_destroy()</code></a> on <em class="parameter"><code>msg</code></em>
.</p>
<div class="refsect3">
<a name="prelude-client-send-msg.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>client</p></td>
<td class="parameter_description"><p>Pointer to a <a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t"><span class="type">prelude_client_t</span></a> object.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>msg</p></td>
<td class="parameter_description"><p>pointer to a message that <em class="parameter"><code>client</code></em>
should send.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="prelude-client-recv-msg"></a><h3>prelude_client_recv_msg ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
prelude_client_recv_msg (<em class="parameter"><code><a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t"><span class="type">prelude_client_t</span></a> *client</code></em>,
                         <em class="parameter"><code><span class="type">int</span> timeout</code></em>,
                         <em class="parameter"><code><a class="link" href="libprelude-prelude-msg.html#prelude-msg-t" title="prelude_msg_t"><span class="type">prelude_msg_t</span></a> **msg</code></em>);</pre>
<p>Wait <em class="parameter"><code>timeout</code></em>
 second for a message on <em class="parameter"><code>client</code></em>
 connection pool.</p>
<p>A <em class="parameter"><code>timeout</code></em>
 of -1, mean <a class="link" href="libprelude-prelude-client.html#prelude-client-recv-msg" title="prelude_client_recv_msg ()"><code class="function">prelude_client_recv_msg()</code></a> will block until
a message is received. A <em class="parameter"><code>timeout</code></em>
 of 0 mean that it will return
immediatly.</p>
<div class="refsect3">
<a name="prelude-client-recv-msg.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>client</p></td>
<td class="parameter_description"><p>Pointer to a <a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t"><span class="type">prelude_client_t</span></a> object.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>timeout</p></td>
<td class="parameter_description"><p>Number of millisecond to wait for a message.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>msg</p></td>
<td class="parameter_description"><p>Pointer where the received <a class="link" href="libprelude-prelude-msg.html#prelude-msg-t" title="prelude_msg_t"><span class="type">prelude_msg_t</span></a> should be stored.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="prelude-client-recv-msg.returns"></a><h4>Returns</h4>
<p> 0 on timeout, a negative value on error, 1 on success.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="prelude-client-set-heartbeat-cb"></a><h3>prelude_client_set_heartbeat_cb ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
prelude_client_set_heartbeat_cb (<em class="parameter"><code><a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t"><span class="type">prelude_client_t</span></a> *client</code></em>,
                                 <em class="parameter"><code><span class="type">void</span> (*cb) (prelude_client_t *client, idmef_message_t *hb)</code></em>);</pre>
<p>Use if you want to override the default function used to
automatically send heartbeat to <em class="parameter"><code>client</code></em>
 peers.</p>
<div class="refsect3">
<a name="prelude-client-set-heartbeat-cb.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>client</p></td>
<td class="parameter_description"><p>pointer to a <a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t"><span class="type">prelude_client_t</span></a> object.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cb</p></td>
<td class="parameter_description"><p>pointer to a function handling heartbeat sending.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="prelude-client-send-idmef"></a><h3>prelude_client_send_idmef ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
prelude_client_send_idmef (<em class="parameter"><code><a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t"><span class="type">prelude_client_t</span></a> *client</code></em>,
                           <em class="parameter"><code><a class="link" href="libprelude-idmef-tree-wrap.html#idmef-message-t" title="idmef_message_t"><span class="type">idmef_message_t</span></a> *msg</code></em>);</pre>
<p>Send <em class="parameter"><code>msg</code></em>
 to the peers <em class="parameter"><code>client</code></em>
 is communicating with.</p>
<p>The message will be sent asynchronously if <em class="parameter"><code>PRELUDE_CLIENT_FLAGS_ASYNC_SEND</code></em>

was set using <a class="link" href="libprelude-prelude-client.html#prelude-client-set-flags" title="prelude_client_set_flags ()"><code class="function">prelude_client_set_flags()</code></a>.</p>
<div class="refsect3">
<a name="prelude-client-send-idmef.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>client</p></td>
<td class="parameter_description"><p>Pointer to a <a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t"><span class="type">prelude_client_t</span></a> object.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>msg</p></td>
<td class="parameter_description"><p>pointer to an IDMEF message to be sent to <em class="parameter"><code>client</code></em>
peers.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="prelude-client-recv-idmef"></a><h3>prelude_client_recv_idmef ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
prelude_client_recv_idmef (<em class="parameter"><code><a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t"><span class="type">prelude_client_t</span></a> *client</code></em>,
                           <em class="parameter"><code><span class="type">int</span> timeout</code></em>,
                           <em class="parameter"><code><a class="link" href="libprelude-idmef-tree-wrap.html#idmef-message-t" title="idmef_message_t"><span class="type">idmef_message_t</span></a> **idmef</code></em>);</pre>
<p>Wait <em class="parameter"><code>timeout</code></em>
 second for a message on <em class="parameter"><code>client</code></em>
 connection pool.</p>
<p>A <em class="parameter"><code>timeout</code></em>
 of -1, mean <a class="link" href="libprelude-prelude-client.html#prelude-client-recv-idmef" title="prelude_client_recv_idmef ()"><code class="function">prelude_client_recv_idmef()</code></a> will block until
a message is received. A <em class="parameter"><code>timeout</code></em>
 of 0 mean that it will return
immediatly.</p>
<div class="refsect3">
<a name="prelude-client-recv-idmef.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>client</p></td>
<td class="parameter_description"><p>Pointer to a <a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t"><span class="type">prelude_client_t</span></a> object.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>timeout</p></td>
<td class="parameter_description"><p>Number of second to wait for a message.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>idmef</p></td>
<td class="parameter_description"><p>Pointer where the received <a class="link" href="libprelude-idmef-tree-wrap.html#idmef-message-t" title="idmef_message_t"><span class="type">idmef_message_t</span></a> should be stored.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="prelude-client-recv-idmef.returns"></a><h4>Returns</h4>
<p> 0 on timeout, a negative value on error, 1 on success.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="prelude-client-destroy"></a><h3>prelude_client_destroy ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
prelude_client_destroy (<em class="parameter"><code><a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t"><span class="type">prelude_client_t</span></a> *client</code></em>,
                        <em class="parameter"><code><a class="link" href="libprelude-prelude-client.html#prelude-client-exit-status-t" title="enum prelude_client_exit_status_t"><span class="type">prelude_client_exit_status_t</span></a> status</code></em>);</pre>
<p>Destroy <em class="parameter"><code>client</code></em>
, and send an heartbeat containing the 'exiting'
status in case <em class="parameter"><code>status</code></em>
 is PRELUDE_CLIENT_EXIT_STATUS_SUCCESS.</p>
<p>This is useful for analyzer expected to be running periodically,
and that shouldn't be treated as behaving anormaly in case no
heartbeat is sent.</p>
<p>Please note that your are not supposed to run this function
from a signal handler.</p>
<div class="refsect3">
<a name="prelude-client-destroy.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>client</p></td>
<td class="parameter_description"><p>Pointer on a client object.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>status</p></td>
<td class="parameter_description"><p>Exit status for the client.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="prelude-client-set-flags"></a><h3>prelude_client_set_flags ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
prelude_client_set_flags (<em class="parameter"><code><a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t"><span class="type">prelude_client_t</span></a> *client</code></em>,
                          <em class="parameter"><code><a class="link" href="libprelude-prelude-client.html#prelude-client-flags-t" title="enum prelude_client_flags_t"><span class="type">prelude_client_flags_t</span></a> flags</code></em>);</pre>
<p>Set specific flags in the <em class="parameter"><code>client</code></em>
 structure.
This function can be called anytime after the creation of the
<em class="parameter"><code>client</code></em>
 object.</p>
<p>When settings asynchronous flags such as <a class="link" href="libprelude-prelude-client.html#PRELUDE-CLIENT-FLAGS-ASYNC-SEND:CAPS"><span class="type">PRELUDE_CLIENT_FLAGS_ASYNC_SEND</span></a>
or <a class="link" href="libprelude-prelude-client.html#PRELUDE-CLIENT-FLAGS-ASYNC-TIMER:CAPS"><span class="type">PRELUDE_CLIENT_FLAGS_ASYNC_TIMER</span></a>, be carefull to call
<a class="link" href="libprelude-prelude-client.html#prelude-client-set-flags" title="prelude_client_set_flags ()"><code class="function">prelude_client_set_flags()</code></a> in the same process you want to use the
asynchronous API from. Threads aren't copied accross <code class="function">fork()</code>.</p>
<div class="refsect3">
<a name="prelude-client-set-flags.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>client</p></td>
<td class="parameter_description"><p>Pointer on a <a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t"><span class="type">prelude_client_t</span></a> object.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>Or'd list of flags used by <em class="parameter"><code>client</code></em>
.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="prelude-client-set-flags.returns"></a><h4>Returns</h4>
<p> 0 if setting <em class="parameter"><code>flags</code></em>
succeed, -1 otherwise.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="prelude-client-set-config-filename"></a><h3>prelude_client_set_config_filename ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
prelude_client_set_config_filename (<em class="parameter"><code><a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t"><span class="type">prelude_client_t</span></a> *client</code></em>,
                                    <em class="parameter"><code>const <span class="type">char</span> *filename</code></em>);</pre>
<p>The default for a client is to use a template configuration file (idmef-client.conf).
By using this function you might override the default and provide your own
configuration file to use for <em class="parameter"><code>client</code></em>
. The format of the configuration file need
to be compatible with the Prelude format.</p>
<div class="refsect3">
<a name="prelude-client-set-config-filename.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>client</p></td>
<td class="parameter_description"><p>pointer on a <a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t"><span class="type">prelude_client_t</span></a> object.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>filename</p></td>
<td class="parameter_description"><p>Configuration file to use for this client.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="prelude-client-set-config-filename.returns"></a><h4>Returns</h4>
<p> 0 on success, -1 if an error occured.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="prelude-client-get-config-filename"></a><h3>prelude_client_get_config_filename ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
prelude_client_get_config_filename (<em class="parameter"><code><a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t"><span class="type">prelude_client_t</span></a> *client</code></em>);</pre>
<p>Return the filename where <em class="parameter"><code>client</code></em>
 configuration is stored.
This filename is originally set by the <a class="link" href="libprelude-prelude-client.html#prelude-client-new" title="prelude_client_new ()"><code class="function">prelude_client_new()</code></a> function.</p>
<div class="refsect3">
<a name="prelude-client-get-config-filename.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>client</p></td>
<td class="parameter_description"><p>pointer on a <a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t"><span class="type">prelude_client_t</span></a> object.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="prelude-client-get-config-filename.returns"></a><h4>Returns</h4>
<p> a pointer to <em class="parameter"><code>client</code></em>
configuration filename.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="prelude-client-is-setup-needed"></a><h3>prelude_client_is_setup_needed ()</h3>
<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>
prelude_client_is_setup_needed (<em class="parameter"><code><span class="type">int</span> error</code></em>);</pre>
<div class="warning">
<p><code class="literal">prelude_client_is_setup_needed</code> is deprecated and should not be used in newly-written code.</p>
<p>use standard error API.</p>
</div>
<p>This function should be called as a result of an error by
the <a class="link" href="libprelude-prelude-client.html#prelude-client-start" title="prelude_client_start ()"><code class="function">prelude_client_start()</code></a> function, to know if the analyzer
need to be registered.</p>
<div class="refsect3">
<a name="prelude-client-is-setup-needed.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>Error returned by <a class="link" href="libprelude-prelude-client.html#prelude-client-start" title="prelude_client_start ()"><code class="function">prelude_client_start()</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="prelude-client-is-setup-needed.returns"></a><h4>Returns</h4>
<p> TRUE if setup is needed, FALSE otherwise.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="prelude-client-get-profile"></a><h3>prelude_client_get_profile ()</h3>
<pre class="programlisting"><a class="link" href="libprelude-prelude-client-profile.html#prelude-client-profile-t" title="prelude_client_profile_t"><span class="returnvalue">prelude_client_profile_t</span></a> *
prelude_client_get_profile (<em class="parameter"><code><a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t"><span class="type">prelude_client_t</span></a> *client</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="prelude-client-new-msgbuf"></a><h3>prelude_client_new_msgbuf ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
prelude_client_new_msgbuf (<em class="parameter"><code><a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t"><span class="type">prelude_client_t</span></a> *client</code></em>,
                           <em class="parameter"><code><a class="link" href="libprelude-prelude-msgbuf.html#prelude-msgbuf-t" title="prelude_msgbuf_t"><span class="type">prelude_msgbuf_t</span></a> **msgbuf</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="prelude-client-handle-msg-default"></a><h3>prelude_client_handle_msg_default ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
prelude_client_handle_msg_default (<em class="parameter"><code><a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t"><span class="type">prelude_client_t</span></a> *client</code></em>,
                                   <em class="parameter"><code><a class="link" href="libprelude-prelude-msg.html#prelude-msg-t" title="prelude_msg_t"><span class="type">prelude_msg_t</span></a> *msg</code></em>,
                                   <em class="parameter"><code><a class="link" href="libprelude-prelude-msgbuf.html#prelude-msgbuf-t" title="prelude_msgbuf_t"><span class="type">prelude_msgbuf_t</span></a> *msgbuf</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="prelude-client-get-setup-error"></a><h3>prelude_client_get_setup_error ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
prelude_client_get_setup_error (<em class="parameter"><code><a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t"><span class="type">prelude_client_t</span></a> *client</code></em>);</pre>
<div class="warning"><p><code class="literal">prelude_client_get_setup_error</code> is deprecated and should not be used in newly-written code.</p></div>
</div>
<hr>
<div class="refsect2">
<a name="prelude-client-print-setup-error"></a><h3>prelude_client_print_setup_error ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
prelude_client_print_setup_error (<em class="parameter"><code><a class="link" href="libprelude-prelude-client.html#prelude-client-t" title="prelude_client_t"><span class="type">prelude_client_t</span></a> *client</code></em>);</pre>
</div>
</div>
<div class="refsect1">
<a name="libprelude-prelude-client.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="prelude-client-exit-status-t"></a><h3>enum prelude_client_exit_status_t</h3>
<div class="refsect3">
<a name="prelude-client-exit-status-t.members"></a><h4>Members</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="PRELUDE-CLIENT-EXIT-STATUS-SUCCESS:CAPS"></a>PRELUDE_CLIENT_EXIT_STATUS_SUCCESS</p></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="PRELUDE-CLIENT-EXIT-STATUS-FAILURE:CAPS"></a>PRELUDE_CLIENT_EXIT_STATUS_FAILURE</p></td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="prelude-client-flags-t"></a><h3>enum prelude_client_flags_t</h3>
<div class="refsect3">
<a name="prelude-client-flags-t.members"></a><h4>Members</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="PRELUDE-CLIENT-FLAGS-ASYNC-SEND:CAPS"></a>PRELUDE_CLIENT_FLAGS_ASYNC_SEND</p></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="PRELUDE-CLIENT-FLAGS-ASYNC-TIMER:CAPS"></a>PRELUDE_CLIENT_FLAGS_ASYNC_TIMER</p></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="PRELUDE-CLIENT-FLAGS-HEARTBEAT:CAPS"></a>PRELUDE_CLIENT_FLAGS_HEARTBEAT</p></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="PRELUDE-CLIENT-FLAGS-CONNECT:CAPS"></a>PRELUDE_CLIENT_FLAGS_CONNECT</p></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="PRELUDE-CLIENT-FLAGS-AUTOCONFIG:CAPS"></a>PRELUDE_CLIENT_FLAGS_AUTOCONFIG</p></td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="prelude-client-t"></a><h3>prelude_client_t</h3>
<pre class="programlisting">typedef struct prelude_client prelude_client_t;
</pre>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.28</div>
</body>
</html>