public.h
Go to the documentation of this file.
1/*
2 * Copyright 2006-2023 Carnegie Mellon University
3 * See license information in LICENSE.txt.
4 */
9/*
10 * ------------------------------------------------------------------------
11 * Authors: Brian Trammell, Dan Ruef
12 * ------------------------------------------------------------------------
13 */
14
15#ifndef _FB_PUBLIC_H_
16#define _FB_PUBLIC_H_
17
18#include <fixbuf/autoinc.h>
19#include <fixbuf/version.h>
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25
39#define FIXBUF_CHECK_VERSION(major, minor, release) \
40 (FIXBUF_VERSION_MAJOR > (major) || \
41 (FIXBUF_VERSION_MAJOR == (major) && FIXBUF_VERSION_MINOR > (minor)) || \
42 (FIXBUF_VERSION_MAJOR == (major) && FIXBUF_VERSION_MINOR == (minor) && \
43 FIXBUF_VERSION_RELEASE >= (release)))
44
45/*
46 * Error Handling Definitions
47 */
48
52#define FB_ERROR_DOMAIN g_quark_from_string("fixbufError")
58#define FB_ERROR_TMPL 1
63#define FB_ERROR_EOM 2
69#define FB_ERROR_EOF 3
74#define FB_ERROR_IPFIX 4
80#define FB_ERROR_BUFSZ 5
84#define FB_ERROR_IMPL 6
88#define FB_ERROR_IO 7
93#define FB_ERROR_NLREAD 8
99#define FB_ERROR_NLWRITE 9
103#define FB_ERROR_NOELEMENT 10
107#define FB_ERROR_CONN 11
112#define FB_ERROR_NETFLOWV9 12
116#define FB_ERROR_TRANSMISC 13
120#define FB_ERROR_SFLOW 14
124#define FB_ERROR_SETUP 15
129#define FB_ERROR_LAXSIZE 16
130
131/*
132 * Public Datatypes and Constants
133 */
134
139typedef struct fBuf_st fBuf_t;
140
147typedef struct fbVarfield_st {
149 size_t len;
156 uint8_t *buf;
158
159
164typedef struct fbInfoModel_st fbInfoModel_t;
165
169typedef GHashTableIter fbInfoModelIter_t;
170
176#define FB_IE_INIT_FULL(_name_, _ent_, _num_, _len_, _flags_, \
177 _min_, _max_, _type_, _desc_) \
178 { _ent_, _num_, _len_, _flags_, _type_, _min_, _max_, _name_, _desc_ }
179
191#define FB_IE_INIT_FULL_SPLIT(_name_, _ent_, _num_, _len_, \
192 _rev_, _endian_, _semantics_, _units_, \
193 _min_, _max_, _type_, _desc_) \
194 FB_IE_INIT_FULL(_name_, _ent_, _num_, _len_, \
195 (((_rev_) ? FB_IE_F_REVERSIBLE : 0) | \
196 ((_endian_) ? FB_IE_F_ENDIAN : 0) | \
197 (((_semantic) & 0xFF) << 8) | \
198 (((_units_) & 0xFFFF) << 16)), \
199 _min_, _max_, _type_, _desc_)
200
206#define FB_IE_INIT(_name_, _ent_, _num_, _len_, _flags_) \
207 FB_IE_INIT_FULL(_name_, _ent_, _num_, _len_, _flags_, 0, 0, 0, (char *)NULL)
208
209
215#define FB_IE_NULL FB_IE_INIT(NULL, 0, 0, 0, 0)
216
226#define FB_IE_SEMANTIC(flags) ((flags & 0x0000ff00) >> 8)
227
236#define FB_IE_UNITS(flags) ((flags & 0xFFFF0000) >> 16)
237
243#define FB_IE_F_NONE 0x00000000
244
252#define FB_IE_F_ENDIAN 0x00000001
253
269#define FB_IE_F_REVERSIBLE 0x00000040
270
281#define FB_IE_F_ALIEN 0x00000080
282
298#define FB_IE_QUANTITY 0x00000100
299
307#define FB_IE_TOTALCOUNTER 0x00000200
308
316#define FB_IE_DELTACOUNTER 0x00000300
317
325#define FB_IE_IDENTIFIER 0x00000400
326
334#define FB_IE_FLAGS 0x00000500
335
343#define FB_IE_LIST 0x00000600
344
353#define FB_IE_SNMPCOUNTER 0x00000700
354
363#define FB_IE_SNMPGAUGE 0x00000800
364
373#define FB_IE_DEFAULT 0x00000000
374
375
425
426
440#define FB_UNITS_BITS 0x00010000
448#define FB_UNITS_OCTETS 0x00020000
456#define FB_UNITS_PACKETS 0x00030000
464#define FB_UNITS_FLOWS 0x00040000
472#define FB_UNITS_SECONDS 0x00050000
481#define FB_UNITS_MILLISECONDS 0x00060000
490#define FB_UNITS_MICROSECONDS 0x00070000
499#define FB_UNITS_NANOSECONDS 0x00080000
508#define FB_UNITS_WORDS 0x00090000
516#define FB_UNITS_MESSAGES 0x000A0000
524#define FB_UNITS_HOPS 0x000B0000
532#define FB_UNITS_ENTRIES 0x000C0000
540#define FB_UNITS_FRAMES 0x000D0000
549#define FB_UNITS_PORTS 0x000E0000
559#define FB_UNITS_INFERRED 0x000F0000
560
643
647#define FB_IE_VARLEN 65535
648
658#define FB_IE_PEN_REVERSE 29305
659
670#define FB_IE_VENDOR_BIT_REVERSE 0x4000
671
677#define FB_IE_REVERSE_STR "reverse"
678
680#define FB_IE_REVERSE_STRLEN 7
681
685#define FB_CISCO_GENERIC 9999
692#define FB_CISCO_ASA_EVENT_ID 9998
702#define FB_CISCO_ASA_EVENT_XTRA 9997
703
704
790
798
809typedef struct fbInfoElement_st {
813 uint32_t ent;
818 uint16_t num;
823 uint16_t len;
826 uint32_t flags;
828 uint8_t type;
830 uint64_t min;
832 uint64_t max;
837 const char *name;
839 const char *description;
841
842
849#define fbInfoElementCheckIdent(_ie, _enterpriseNumber, _elementId) \
850 ((_elementId) == (_ie)->num && (_enterpriseNumber) == (_ie)->ent)
851
857#define fbInfoElementGetDescription(_ie) ((_ie)->description)
858
866#define fbInfoElementGetId(_ie) ((_ie)->num)
867
873#define fbInfoElementGetLen(_ie) ((_ie)->len)
874
881#define fbInfoElementGetMax(_ie) ((_ie)->max)
882
888#define fbInfoElementGetMin(_ie) ((_ie)->min)
889
895#define fbInfoElementGetName(_ie) ((_ie)->name)
896
903#define fbInfoElementGetPEN(_ie) ((_ie)->ent)
904
911#define fbInfoElementGetSemantics(_ie) \
912 ((fbInfoElementSemantics_t)(FB_IE_SEMANTIC((_ie)->flags)))
913
920#define fbInfoElementGetType(_ie) \
921 ((fbInfoElementDataType_t)((_ie)->type))
922
929#define fbInfoElementGetUnits(_ie) \
930 ((fbInfoElementUnits_t)(FB_IE_UNITS((_ie)->units)))
931
938#define fbInfoElementIsAlien(_ie) (!!((_ie)->flags & FB_IE_F_ALIEN))
939
946#define fbInfoElementIsEndian(_ie) (!!((_ie)->flags & FB_IE_F_ENDIAN))
947
954#define fbInfoElementIsReversible(_ie) (!!((_ie)->flags & FB_IE_F_REVERSIBLE))
955
964#define fbInfoElementIsUnsigned(_ie) \
965 ((_ie)->type >= FB_UINT_8 && (_ie)->type <= FB_UINT_64)
966
975#define fbInfoElementIsSigned(_ie) \
976 ((_ie)->type >= FB_INT_8 && (_ie)->type <= FB_INT_64)
977
985#define fbInfoElementIsInteger(_ie) \
986 ((_ie)->type >= FB_UINT_8 && (_ie)->type <= FB_INT_64)
987
995#define fbInfoElementIsFloat(_ie) \
996 ((_ie)->type >= FB_FLOAT_32 && (_ie)->type <= FB_FLOAT_64)
997
1008#define fbInfoElementIsNumber(_ie) \
1009 ((_ie)->type >= FB_UINT_8 && (_ie)->type <= FB_FLOAT_64)
1010
1017#define fbInfoElementIsIPAddress(_ie) \
1018 ((_ie)->type >= FB_IP4_ADDR && (_ie)->type <= FB_IP6_ADDR)
1019
1028#define fbInfoElementIsDatetime(_ie) \
1029 ((_ie)->type >= FB_DT_SEC && (_ie)->type <= FB_DT_NANOSEC)
1030
1038#define fbInfoElementIsList(_ie) \
1039 ((_ie)->type >= FB_BASIC_LIST && (_ie)->type <= FB_SUB_TMPL_MULTI_LIST)
1040
1047#define fbInfoElementIsPadding(_ie) (210 == (_ie)->num && 0 == (_ie)->ent)
1048
1049
1056typedef struct fbTemplateField_st {
1063 uint16_t midx;
1067 uint16_t len;
1071 uint16_t offset;
1075 /*uint16_t memsize; */
1079 /*uint16_t position; */
1085
1086
1092#define FB_TEMPLATEFIELD_INIT {NULL, 0, 0, 0, NULL}
1093
1094
1101#define fbTemplateFieldCheckIdent(_field, _enterpriseNumber, _elementId) \
1102 ((_elementId) == (_field)->canon->num && \
1103 (_enterpriseNumber) == (_field)->canon->ent)
1104
1110#define fbTemplateFieldGetIE(_field) ((_field)->canon)
1111
1118#define fbTemplateFieldGetId(_field) ((_field)->canon->num)
1119
1130#define fbTemplateFieldGetLen(_field) ((_field)->len)
1131
1140#define fbTemplateFieldGetMemsize(_field) \
1141 ((FB_IE_VARLEN != (_field)->len) \
1142 ? (_field)->len \
1143 : ((FB_BASIC_LIST == (_field)->canon->type) \
1144 ? sizeof(fbBasicList_t) \
1145 : ((FB_SUB_TMPL_LIST == (_field)->canon->type) \
1146 ? sizeof(fbSubTemplateList_t) \
1147 : ((FB_SUB_TMPL_MULTI_LIST == (_field)->canon->type) \
1148 ? sizeof(fbSubTemplateMultiList_t) \
1149 : sizeof(fbVarfield_t)))))
1150
1157#define fbTemplateFieldGetName(_field) ((_field)->canon->name)
1158
1166#define fbTemplateFieldGetOffset(_field) ((_field)->offset)
1167
1174#define fbTemplateFieldGetPEN(_field) ((_field)->canon->ent)
1175
1182#define fbTemplateFieldGetType(_field) \
1183 ((fbInfoElementDataType_t)((_field)->canon->type))
1184
1200#define fbTemplateFieldGetRepeat(_field) ((_field)->midx)
1201
1213typedef struct fbTemplateIter_st {
1214 const fbTemplate_t *tmpl;
1215 uint16_t pos;
1217
1223#define FB_TEMPLATE_ITER_NULL {NULL, UINT16_MAX}
1224
1234void
1236 fbTemplateIter_t *iter,
1237 const fbTemplate_t *tmpl);
1238
1251const fbTemplateField_t *
1253 const fbTemplateIter_t *iter);
1254
1265uint16_t
1267 const fbTemplateIter_t *iter);
1268
1275const fbTemplate_t *
1277 const fbTemplateIter_t *iter);
1278
1291const fbTemplateField_t *
1293 fbTemplateIter_t *iter);
1294
1295
1320
1346
1381
1382
1401typedef struct fbRecord_st {
1405 uint8_t *rec;
1409 size_t recsize;
1411 uint16_t tid;
1413
1414
1420#define FB_RECORD_INIT {NULL, NULL, 0, 0, 0}
1421
1422
1437typedef struct fbRecordValue_st {
1441 GString *stringbuf;
1443 union v_un {
1447 uint8_t ip6[16];
1473 struct timespec dt;
1477 uint32_t ip4;
1482 uint64_t u64;
1487 int64_t s64;
1491 double dbl;
1495 uint8_t mac[6];
1496 } v;
1498
1499
1505#define FB_RECORD_VALUE_INIT \
1506 { NULL, NULL, { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} } }
1507
1508
1539 uint32_t ie_pen;
1541 uint16_t ie_id;
1543 uint8_t ie_type;
1547 uint16_t ie_units;
1549 uint8_t padding[6];
1559
1560
1574#define FB_TID_AUTO 0
1575
1579#define FB_TID_TS 2
1580
1584#define FB_TID_OTS 3
1585
1589#define FB_TID_MIN_DATA 256
1590
1596#define FB_IESPEC_NULL { NULL, 0, 0 }
1597
1606typedef struct fbInfoElementSpec_st {
1610 const char *name;
1638 uint32_t flags;
1640
1649#define FB_IESPECID_NULL { {0, 0}, 0, 0 }
1650
1673 uint16_t element_id;
1674 } ident;
1701 uint32_t flags;
1703
1711typedef struct fbSession_st fbSession_t;
1712
1714typedef enum fbTransport_en {
1742
1747typedef struct fbConnSpec_st {
1751 char *host;
1753 char *svc;
1766 void *vai;
1773
1774
1782typedef struct fbTemplateInfo_st fbTemplateInfo_t;
1783
1792typedef struct fbBasicListInfo_st fbBasicListInfo_t;
1793
1803 void);
1804
1811void
1813 fbTemplateInfo_t *tmplInfo);
1814
1825 const fbTemplateInfo_t *tmplInfo);
1826
1840gboolean
1842 fbTemplateInfo_t *tmplInfo,
1843 const char *name,
1844 const char *description,
1845 uint16_t appLabel,
1846 uint16_t parentTid);
1847
1855#define FB_TMPL_MD_LEVEL_0 0
1862#define FB_TMPL_MD_LEVEL_1 1
1869#define FB_TMPL_MD_LEVEL_NA 0xFF
1870
1887void
1889 fbTemplateInfo_t *tmplInfo,
1890 uint32_t blEnt,
1891 uint16_t blNum,
1892 uint32_t contentEnt,
1893 uint16_t contentNum);
1894
1900uint16_t
1902 const fbTemplateInfo_t *tmplInfo);
1903
1909uint16_t
1911 const fbTemplateInfo_t *tmplInfo);
1912
1918const char *
1920 const fbTemplateInfo_t *tmplInfo);
1921
1927const char *
1929 const fbTemplateInfo_t *tmplInfo);
1930
1936uint16_t
1938 const fbTemplateInfo_t *tmplInfo);
1939
1955const fbBasicListInfo_t *
1957 const fbTemplateInfo_t *tmplInfo,
1958 const fbBasicListInfo_t *blInfo);
1959
1978uint16_t
1980 const fbBasicListInfo_t *blInfo,
1981 uint32_t *pen);
1982
1998uint16_t
2000 const fbBasicListInfo_t *blInfo,
2001 uint32_t *pen);
2002
2003
2013const fbTemplateInfo_t *
2015 const fbSession_t *session,
2016 uint16_t tid);
2017
2018
2057uint16_t
2059 const fbSession_t *session,
2060 const fbTemplateInfo_t *tmplInfo,
2061 uint16_t path[],
2062 uint16_t path_size,
2063 GError **err);
2064
2065
2069#define FB_CONNSPEC_INIT \
2070 { FB_SCTP, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }
2071
2077typedef struct fbExporter_st fbExporter_t;
2078
2086typedef struct fbCollector_st fbCollector_t;
2087
2094typedef struct fbListener_st fbListener_t;
2095
2096/*
2097 * ListenerGroup and associated data type definitions
2098 */
2099
2103typedef struct fbListenerGroup_st fbListenerGroup_t;
2104
2108typedef struct fbListenerEntry_st {
2116
2130
2142typedef void (*fbTemplateCtxFree_fn)(
2143 void *tmpl_ctx,
2144 void *app_ctx);
2145
2171 fbSession_t *session,
2172 uint16_t tid,
2173 fbTemplate_t *tmpl,
2174 void *app_ctx,
2175 void **tmpl_ctx,
2176 fbTemplateCtxFree_fn *tmpl_ctx_free_fn);
2177
2178
2217
2229gboolean
2231 uint8_t semantic);
2232
2233
2234/****** BASICLIST FUNCTIONS AND STRUCTS *******/
2235
2243/* typedef struct fbBasicList_st fbBasicList_t; */
2248 uint8_t *dataPtr;
2257 uint16_t numElements;
2261 uint16_t dataLength;
2266 uint8_t semantic;
2267};
2268
2269
2281 void);
2282
2297void *
2299 fbBasicList_t *basicList,
2300 uint8_t semantic,
2301 const fbInfoElement_t *infoElement,
2302 uint16_t numElements);
2303
2304
2329void *
2331 fbBasicList_t *basicList,
2332 uint8_t semantic,
2333 const fbInfoElement_t *infoElement,
2334 uint16_t elementLength,
2335 uint16_t numElements);
2336
2350void
2352 fbBasicList_t *basicList);
2353
2363uint16_t
2365 const fbBasicList_t *basicList);
2366
2377uint16_t
2379 const fbBasicList_t *basicList);
2380
2387uint8_t
2389 const fbBasicList_t *basicList);
2390
2398void
2400 fbBasicList_t *basicList,
2401 uint8_t semantic);
2402
2410const fbInfoElement_t *
2412 const fbBasicList_t *basicList);
2413
2424uint16_t
2426 const fbBasicList_t *basicList,
2427 uint32_t *pen);
2428
2438const fbTemplateField_t *
2440 const fbBasicList_t *basicList);
2441
2448void *
2450 const fbBasicList_t *basicList);
2451
2463void *
2465 const fbBasicList_t *basicList,
2466 uint16_t index);
2467
2480gboolean
2482 const fbBasicList_t *basicList,
2483 uint16_t index,
2484 fbRecordValue_t *value);
2485
2499void *
2501 const fbBasicList_t *basicList,
2502 const void *currentPtr);
2503
2512#define fbBLNext(type, basicList, current) \
2513 ((type *)(fbBasicListGetNextPtr((basicList), (current))))
2514
2531void *
2533 fbBasicList_t *basicList,
2534 uint16_t newCount);
2535
2547void *
2549 fbBasicList_t *basicList,
2550 uint16_t additional);
2551
2564void
2566 fbBasicList_t *basicList);
2567
2576void
2578 fbBasicList_t *basicList);
2579
2587void
2589 fbBasicList_t *basicList);
2590
2591
2592/******* END OF BASICLIST ********/
2593
2594
2595
2596/******* SUBTEMPLATELIST FUNCTIONS ****/
2597
2598
2611 uint8_t *dataPtr;
2617 uint32_t dataLength;
2626 uint16_t numElements;
2630 uint16_t tmplID;
2635 uint8_t semantic;
2636};
2637
2650 void);
2651
2680void *
2683 uint8_t semantic,
2684 uint16_t tmplID,
2685 const fbTemplate_t *tmpl,
2686 uint16_t numElements);
2687
2705void
2707 fbSubTemplateList_t *subTemplateList);
2708
2715void *
2717 const fbSubTemplateList_t *subTemplateList);
2718
2728void *
2730 const fbSubTemplateList_t *subTemplateList,
2731 uint16_t index);
2732
2746void *
2748 const fbSubTemplateList_t *subTemplateList,
2749 const void *currentPtr);
2750
2751
2760#define fbSTLNext(type, subTemplateList, current) \
2761 ((type *)(fbSubTemplateListGetNextPtr((subTemplateList), (current))))
2762
2771uint16_t
2773 const fbSubTemplateList_t *subTemplateList);
2774
2782void
2784 fbSubTemplateList_t *subTemplateList,
2785 uint8_t semantic);
2786
2794uint8_t
2796 const fbSubTemplateList_t *subTemplateList);
2797
2804const fbTemplate_t *
2806 const fbSubTemplateList_t *subTemplateList);
2807
2814uint16_t
2816 const fbSubTemplateList_t *subTemplateList);
2817
2835void *
2837 fbSubTemplateList_t *subTemplateList,
2838 uint16_t newCount);
2839
2851void *
2853 fbSubTemplateList_t *subTemplateList,
2854 uint16_t additional);
2855
2880void
2882 fbSubTemplateList_t *subTemplateList);
2883
2892void
2894 fbSubTemplateList_t *subTemplateList);
2895
2903void
2905 fbSubTemplateList_t *subTemplateList);
2906
2907/********* END OF SUBTEMPLATELIST **********/
2908
2909
2910
2911/******* SUBTEMPLATEMULTILIST FUNCTIONS ****/
2912
2935
2936
2942/* typedef struct fbSubTemplateMultiList_st fbSubTemplateMultiList_t; */
2951 uint16_t numElements;
2956 uint8_t semantic;
2957};
2958
2959
2973 uint8_t *dataPtr;
2977 uint32_t dataLength;
2986 uint16_t numElements;
2990 uint16_t tmplID;
2991};
2992
2993
3006 void);
3007
3008
3029 uint8_t semantic,
3030 uint16_t numElements);
3031
3040uint16_t
3042 const fbSubTemplateMultiList_t *STML);
3043
3050void
3053 uint8_t semantic);
3054
3062uint8_t
3064 const fbSubTemplateMultiList_t *STML);
3065
3086void
3089
3108void
3111
3120void
3123
3144 uint16_t newCount);
3145
3162 uint16_t additional);
3163
3172 const fbSubTemplateMultiList_t *STML);
3173
3185 const fbSubTemplateMultiList_t *STML,
3186 uint16_t index);
3187
3203 const fbSubTemplateMultiList_t *STML,
3204 const fbSubTemplateMultiListEntry_t *currentEntry);
3205
3214#define fbSTMLNext(subTemplateMultiList, current) \
3215 fbSubTemplateMultiListGetNextEntry((subTemplateMultiList), (current))
3216
3239void *
3242 uint16_t tmplID,
3243 const fbTemplate_t *tmpl,
3244 uint16_t numElements);
3245
3264void *
3267 uint16_t newCount);
3268
3283void *
3286 uint16_t additional);
3287
3306void
3309
3316void *
3318 const fbSubTemplateMultiListEntry_t *entry);
3319
3333void *
3335 const fbSubTemplateMultiListEntry_t *entry,
3336 const void *currentPtr);
3337
3338
3347#define fbSTMLEntryNext(type, subTemplateMultiListEntry, current) \
3348 ((type *)(fbSubTemplateMultiListEntryNextDataPtr( \
3349 (subTemplateMultiListEntry), (current))))
3350
3361void *
3363 const fbSubTemplateMultiListEntry_t *entry,
3364 uint16_t index);
3365
3374uint16_t
3376 const fbSubTemplateMultiListEntry_t *entry);
3377
3384const fbTemplate_t *
3386 const fbSubTemplateMultiListEntry_t *entry);
3387
3394uint16_t
3396 const fbSubTemplateMultiListEntry_t *entry);
3397
3398/************** END OF STML FUNCTIONS *********** */
3399
3420void
3422 const fbTemplate_t *tmpl,
3423 uint8_t *record);
3424
3425
3438 void);
3439
3445void
3447 fbListenerGroup_t *group);
3448
3458int
3460 fbListenerGroup_t *group,
3461 const fbListener_t *listener);
3462
3472int
3474 fbListenerGroup_t *group,
3475 const fbListener_t *listener);
3476
3492 fbListenerGroup_t *group,
3493 GError **err);
3494
3500void
3502 fbListenerGroupResult_t *result);
3503
3516fBuf_t *
3518 fbListener_t *listener,
3519 int sock,
3520 GError **err);
3521
3531fBuf_t *
3533 fbListener_t *listener,
3534 int sock,
3535 GError **err);
3536
3542void
3544 fBuf_t *fbuf);
3545
3546
3575typedef gboolean (*fbListenerAppInit_fn)(
3576 fbListener_t *listener,
3577 void **ctx,
3578 int fd,
3579 struct sockaddr *peer,
3580 size_t peerlen,
3581 GError **err);
3582
3594typedef void (*fbListenerAppFree_fn)(
3595 void *ctx);
3596
3612gboolean
3614 fBuf_t *fbuf,
3615 uint16_t int_tid,
3616 GError **err);
3617
3634gboolean
3636 fBuf_t *fbuf,
3637 uint16_t ext_tid,
3638 GError **err);
3639
3652gboolean
3654 fBuf_t *fbuf,
3655 uint16_t tid,
3656 GError **err);
3657
3682void
3684 fBuf_t *fbuf,
3685 gboolean automatic);
3686
3687
3691void
3693 fBuf_t *fbuf,
3694 gboolean automatic);
3695
3696
3723gboolean
3725 fBuf_t *fbuf,
3726 GError **err);
3727
3737gboolean
3739 fBuf_t *fbuf,
3740 GError **err);
3741
3768gboolean
3770 fBuf_t *fbuf,
3771 GError **err);
3772
3773
3782 const fBuf_t *fbuf);
3783
3791void
3793 fBuf_t *fbuf);
3794
3809fBuf_t *
3811 fbSession_t *session,
3812 fbExporter_t *exporter);
3813
3824 const fBuf_t *fbuf);
3825
3835void
3837 fBuf_t *fbuf,
3838 fbExporter_t *exporter);
3839
3840
3852size_t
3854 fBuf_t *fbuf);
3855
3856
3872void
3874 fBuf_t *fbuf,
3875 uint8_t *buf,
3876 size_t buflen);
3877
3878
3902gboolean
3904 fBuf_t *fbuf,
3905 uint8_t *recbase,
3906 size_t recsize,
3907 GError **err);
3908
3917gboolean
3919 fBuf_t *fbuf,
3920 GError **err);
3921
3932void
3934 fBuf_t *fbuf,
3935 uint32_t extime);
3936
3954fBuf_t *
3956 fbSession_t *session,
3957 fbCollector_t *collector);
3958
3969 const fBuf_t *fbuf);
3970
3980void
3982 fBuf_t *fbuf,
3983 fbCollector_t *collector);
3984
4031gboolean
4033 fBuf_t *fbuf,
4034 uint8_t *recbase,
4035 size_t *recsize,
4036 GError **err);
4037
4062gboolean
4064 fBuf_t *fbuf,
4065 fbRecord_t *record,
4066 GError **err);
4067
4079gboolean
4081 fBuf_t *fbuf,
4082 GError **err);
4083
4090uint32_t
4092 const fBuf_t *fbuf);
4093
4114 const fBuf_t *fbuf,
4115 uint16_t *ext_tid);
4116
4136 fBuf_t *fbuf,
4137 uint16_t *ext_tid,
4138 GError **err);
4139
4157 void);
4158
4166void
4168 fbInfoModel_t *model);
4169
4183void
4185 fbInfoModel_t *model,
4186 const fbInfoElement_t *ie);
4187
4205void
4207 fbInfoModel_t *model,
4208 const fbInfoElement_t *ie);
4209
4241gboolean
4243 fbInfoModel_t *model,
4244 const gchar *filename,
4245 GError **err);
4246
4279gboolean
4281 fbInfoModel_t *model,
4282 const gchar *xml_data,
4283 gssize xml_data_len,
4284 GError **err);
4285
4297const fbInfoElement_t *
4299 const fbInfoModel_t *model,
4300 const char *name);
4301
4314const fbInfoElement_t *
4316 const fbInfoModel_t *model,
4317 uint16_t id,
4318 uint32_t ent);
4319
4329gboolean
4331 const fbInfoModel_t *model,
4332 const fbInfoElement_t *element);
4333
4334
4342guint
4344 const fbInfoModel_t *model);
4345
4354void
4356 fbInfoModelIter_t *iter,
4357 const fbInfoModel_t *model);
4358
4368const fbInfoElement_t *
4370 fbInfoModelIter_t *iter);
4371
4388 fbInfoModel_t *model,
4389 GError **err);
4390
4408gboolean
4410 fBuf_t *fbuf,
4411 const fbInfoElement_t *model_ie,
4412 uint16_t itid,
4413 uint16_t etid,
4414 GError **err);
4415
4428gboolean
4430 fbInfoModel_t *model,
4431 const fbInfoElementOptRec_t *rec);
4432
4473gboolean
4475 const fbTemplate_t *tmpl,
4476 uint32_t tests);
4477
4484#define FB_TMPL_IS_OPTIONS (1u << 0)
4485
4495#define FB_TMPL_IS_META_ELEMENT (1u << 1)
4496
4504#define FB_TMPL_IS_META_TEMPLATE_V1 (1u << 2)
4505
4513#define FB_TMPL_IS_META_TEMPLATE_V3 (1u << 3)
4514
4522#define FB_TMPL_IS_META_BASICLIST (1u << 4)
4523
4530#define FB_TMPL_IS_META_TMPL_ANY \
4531 (FB_TMPL_IS_OPTIONS | \
4532 FB_TMPL_IS_META_TEMPLATE_V1 | \
4533 FB_TMPL_IS_META_BASICLIST)
4534
4541#define FB_TMPL_IS_META_ANY \
4542 (FB_TMPL_IS_OPTIONS | \
4543 FB_TMPL_IS_META_TMPL_ANY | \
4544 FB_TMPL_IS_META_ELEMENT)
4545
4568 fbInfoModel_t *model);
4569
4598gboolean
4600 fbTemplate_t *tmpl,
4601 const fbInfoElement_t *ex_ie,
4602 GError **err);
4603
4633gboolean
4635 fbTemplate_t *tmpl,
4636 const fbInfoElementSpec_t *spec,
4637 uint32_t wantedFlags,
4638 GError **err);
4639
4652gboolean
4654 fbTemplate_t *tmpl,
4655 const fbInfoElementSpec_t *spec,
4656 uint32_t wantedFlags,
4657 GError **err);
4658
4689gboolean
4691 fbTemplate_t *tmpl,
4692 const fbInfoElementSpecId_t *spec,
4693 uint32_t wantedFlags,
4694 GError **err);
4695
4709gboolean
4711 fbTemplate_t *tmpl,
4712 const fbInfoElementSpecId_t *spec,
4713 uint32_t wantedFlags,
4714 GError **err);
4715
4716
4724#define FB_TMPL_COPY_REMOVE_PADDING 0x01u
4725
4733#define FB_TMPL_COPY_IGNORE_SCOPE 0x04u
4734
4735
4762 const fbTemplate_t *tmpl,
4763 uint32_t flags);
4764
4765
4772uint16_t
4774 const fbTemplate_t *tmpl);
4775
4794gboolean
4796 fbTemplate_t *tmpl,
4797 uint16_t scope_count);
4798
4806uint16_t
4808 const fbTemplate_t *tmpl);
4809
4821gboolean
4823 const fbTemplate_t *tmpl,
4824 const fbInfoElement_t *element);
4825
4852const fbTemplateField_t *
4854 const fbTemplate_t *tmpl,
4855 const fbInfoElement_t *ie,
4856 uint16_t *position,
4857 uint16_t skip);
4858
4859
4887const fbTemplateField_t *
4889 const fbTemplate_t *tmpl,
4890 uint32_t ent,
4891 uint16_t num,
4892 uint16_t *position,
4893 uint16_t skip);
4894
4895
4920const fbTemplateField_t *
4922 const fbTemplate_t *tmpl,
4923 fbInfoElementDataType_t datatype,
4924 uint16_t *position,
4925 uint16_t skip);
4926
4927
4942gboolean
4944 const fbTemplate_t *tmpl,
4945 const fbInfoElementSpec_t *spec);
4946
4968gboolean
4970 const fbTemplate_t *tmpl,
4971 const fbInfoElementSpec_t *spec);
4972
4998gboolean
5000 const fbTemplate_t *tmpl,
5001 const fbInfoElementSpec_t *spec,
5002 uint32_t wantedFlags);
5003
5020gboolean
5022 const fbTemplate_t *tmpl,
5023 const fbInfoElementSpecId_t *spec);
5024
5046gboolean
5048 const fbTemplate_t *tmpl,
5049 const fbInfoElementSpecId_t *spec);
5050
5077gboolean
5079 const fbTemplate_t *tmpl,
5080 const fbInfoElementSpecId_t *spec,
5081 uint32_t wantedFlags);
5082
5094const fbTemplateField_t *
5096 const fbTemplate_t *tmpl,
5097 uint16_t position);
5098
5109const fbTemplateField_t *
5111 const fbTemplate_t *tmpl,
5112 uint16_t position)
5113__attribute__((__deprecated__));
5114
5124 const fbTemplate_t *tmpl);
5125
5132void
5134 fbTemplate_t *tmpl);
5135
5144void *
5146 const fbTemplate_t *tmpl);
5147
5148
5161void
5163 fbTemplate_t *tmpl,
5164 void *tmpl_ctx,
5165 void *app_ctx,
5166 fbTemplateCtxFree_fn ctx_free);
5167
5177uint16_t
5179 const fbTemplate_t *tmpl);
5180
5193gboolean
5195 const fbTemplate_t *tmpl1,
5196 const fbTemplate_t *tmpl2);
5197
5198
5231int
5233 const fbTemplate_t *tmpl1,
5234 const fbTemplate_t *tmpl2,
5235 unsigned int flags);
5236
5237
5257
5293 const fbTemplate_t *tmpl1,
5294 const fbTemplate_t *tmpl2,
5295 uint16_t *matching_fields,
5296 unsigned int flags);
5297
5304#define FB_TMPL_CMP_IGNORE_PADDING 0x01u
5305
5312#define FB_TMPL_CMP_IGNORE_LENGTHS 0x02u
5313
5320#define FB_TMPL_CMP_IGNORE_SCOPE 0x04u
5321
5322
5329uint16_t
5331 const fbRecord_t *record);
5332
5345void
5347 fbRecord_t *record);
5348
5349
5362void
5364 fbRecordValue_t *value);
5365
5388 fbRecordValue_t *dstValue,
5389 const fbRecordValue_t *srcValue);
5390
5400gchar *
5402 fbRecordValue_t *value);
5403
5404
5433gboolean
5435 const fbRecord_t *record,
5436 const fbTemplateField_t *field,
5437 fbRecordValue_t *value);
5438
5496gboolean
5498 const fbRecord_t *record,
5499 const fbTemplateField_t *field,
5500 void *dest,
5501 size_t destlen);
5502
5503
5519gboolean
5521 const fbRecord_t *record,
5522 const fbInfoElement_t *ie,
5523 fbRecordValue_t *value,
5524 uint16_t *position,
5525 uint16_t skip);
5526
5549const fbBasicList_t *
5551 const fbRecord_t *record,
5552 const fbInfoElement_t *contentsElement,
5553 uint16_t *position,
5554 uint16_t skip);
5555
5556
5577const fbSubTemplateList_t *
5579 const fbRecord_t *record,
5580 const fbTemplate_t *tmpl,
5581 uint16_t *position,
5582 uint16_t skip);
5583
5584
5597 const fbRecord_t *parent_record,
5598 const fbBasicList_t *parent_bl,
5599 const fbInfoElement_t *field,
5600 const fbRecordValue_t *value,
5601 void *ctx);
5602
5629int
5631 const fbRecord_t *record,
5632 const fbInfoElement_t *ie,
5633 unsigned int flags,
5634 fbRecordValueCallback_fn callback,
5635 void *ctx);
5636
5637
5648 const fbRecord_t *record,
5649 void *ctx);
5650
5651
5674int
5676 const fbRecord_t *record,
5677 uint16_t tid,
5678 unsigned int flags,
5680 void *ctx);
5681
5682
5715gboolean
5717 const fbRecord_t *srcRec,
5718 fbRecord_t *dstRec,
5719 const fbTemplate_t *tmpl,
5720 uint16_t tid,
5721 GError **err);
5722
5723
5724
5745 fbInfoModel_t *model);
5746
5747
5774uint16_t
5776 fbSession_t *session,
5777 gboolean enabled,
5778 uint16_t tid,
5779 GError **err);
5780
5812uint16_t
5814 fbSession_t *session,
5815 gboolean enabled,
5816 uint16_t tmplInfoTid,
5817 uint16_t blInfoTid,
5818 GError **err);
5819
5828 const fbSession_t *session);
5829
5859void
5861 fbSession_t *session,
5862 fbNewTemplateCallback_fn callback,
5863 void *app_ctx);
5864
5865
5879void
5881 fbSession_t *incomingSession,
5882 fbSession_t *exportSession);
5883
5884
5906void
5908 fbSession_t *incomingSession,
5909 uint16_t tid,
5910 fbTemplate_t *tmpl,
5911 void *exportSession,
5912 void **tmpl_ctx,
5913 fbTemplateCtxFree_fn *tmpl_ctx_free_fn);
5914
5949void
5951 fbSession_t *session,
5952 uint16_t ext_tid,
5953 uint16_t int_tid);
5954
5965void
5967 fbSession_t *session,
5968 uint16_t ext_tid);
5969
5984uint16_t
5986 const fbSession_t *session,
5987 uint16_t ext_tid);
5988
5997void
5999 fbSession_t *session);
6000
6012void
6014 fbSession_t *session);
6015
6030void
6032 fbSession_t *session,
6033 uint32_t domain);
6034
6041uint32_t
6043 const fbSession_t *session);
6044
6055uint16_t
6057 fbSession_t *session);
6058
6075 const fbSession_t *session);
6076
6093gboolean
6095 fbSession_t *session,
6096 uint16_t tid,
6097 GError **err);
6098
6118gboolean
6120 fbSession_t *session,
6121 GError **err);
6122
6160uint16_t
6162 fbSession_t *session,
6163 gboolean internal,
6164 uint16_t tid,
6165 fbTemplate_t *tmpl,
6166 fbTemplateInfo_t *tmplInfo,
6167 GError **err);
6168
6169
6196uint16_t
6198 fbSession_t *session,
6199 uint16_t tid,
6200 fbTemplate_t *tmpl,
6201 fbTemplateInfo_t *tmplInfo,
6202 GError **err);
6203
6204
6216gboolean
6218 fbSession_t *session,
6219 gboolean internal,
6220 uint16_t tid,
6221 GError **err);
6222
6235 const fbSession_t *session,
6236 gboolean internal,
6237 uint16_t tid,
6238 GError **err);
6239
6256 const fbConnSpec_t *spec);
6257
6272 const char *path);
6273
6288 uint8_t *buf,
6289 uint16_t bufsize);
6290
6291
6303 FILE *fp);
6304
6305
6317void
6319 fbExporter_t *exporter,
6320 int sctp_stream);
6321
6333void
6335 fbExporter_t *exporter);
6336
6344void
6346 fbExporter_t *exporter);
6347
6354size_t
6356 const fbExporter_t *exporter);
6357
6371size_t
6373 const fbExporter_t *exporter);
6374
6384size_t
6386 fbExporter_t *exporter);
6387
6396void
6398 fbExporter_t *exporter);
6399
6415 void *ctx,
6416 const char *path,
6417 GError **err);
6418
6432 void *ctx,
6433 FILE *fp);
6434
6435
6446void *
6448 const fbCollector_t *collector);
6449
6459void
6461 fbCollector_t *collector);
6462
6463
6475void
6477 fbCollector_t *collector,
6478 struct sockaddr *address,
6479 size_t address_length);
6480
6513 const fbConnSpec_t *spec,
6514 fbSession_t *session,
6515 fbListenerAppInit_fn appinit,
6516 fbListenerAppFree_fn appfree,
6517 GError **err);
6518
6525void
6527 fbListener_t *listener);
6528
6553fBuf_t *
6555 fbListener_t *listener,
6556 GError **err);
6557
6568fBuf_t *
6570 fbListener_t *listener,
6571 GError **err);
6572
6580void
6582 fbListener_t *listener);
6583
6584
6595gboolean
6597 const fbListener_t *listener,
6598 fbCollector_t **collector,
6599 GError **err);
6600
6601
6602
6614gboolean
6616 fbCollector_t *collector,
6617 GError **err);
6618
6619
6631gboolean
6633 fbCollector_t *collector,
6634 GError **err);
6635
6636
6648gboolean
6650 fbCollector_t *collector,
6651 GError **err);
6652
6671uint32_t
6673 const fbCollector_t *collector,
6674 const struct sockaddr *peer,
6675 size_t peerlen,
6676 uint32_t obdomain);
6677
6692uint32_t
6694 const fbCollector_t *collector,
6695 const struct sockaddr *peer,
6696 size_t peerlen,
6697 uint32_t obdomain);
6698
6705const struct sockaddr *
6707 const fbCollector_t *collector);
6708
6718uint32_t
6720 const fbCollector_t *collector);
6721
6744void
6746 fbCollector_t *collector,
6747 gboolean multi_session);
6748
6749
6750#ifdef __cplusplus
6751} /* extern "C" */
6752#endif
6753
6754#endif /* _FB_PUBLIC_H_ */
6755
6756/*
6757 * @DISTRIBUTION_STATEMENT_BEGIN@
6758 * @DISTRIBUTION_STATEMENT_END@
6759 */
An IPFIX template or options template structure.
Definition: private.h:108
fbCollector_t * fbSessionGetCollector(const fbSession_t *session)
Retrieves the Collector that was associated with session by an explicit call to fBufAllocForCollectio...
void * fbBasicListAddNewElements(fbBasicList_t *basicList, uint16_t additional)
Increases the size of the list's internal data buffer to hold additional more elements.
void(* fbTemplateCtxFree_fn)(void *tmpl_ctx, void *app_ctx)
A callback function that is called when a template is freed.
Definition: public.h:2142
uint8_t ie_semantic
ie semantic (fbInfoElementSemantics_t)
Definition: public.h:1545
struct fbListenerGroupResult_st * next
Pointer to the next listener group result.
Definition: public.h:2124
struct fbExporter_st fbExporter_t
IPFIX Exporting Process endpoint.
Definition: public.h:2077
const char * description
Element description.
Definition: public.h:839
void fBufFree(fBuf_t *fbuf)
Frees a buffer.
const fbTemplateField_t * fbTemplateFindFieldByIdent(const fbTemplate_t *tmpl, uint32_t ent, uint16_t num, uint16_t *position, uint16_t skip)
Searches a Template for a TemplateField by an fbInfoElement_t's private enterprise number and element...
void * fbBasicListGetNextPtr(const fbBasicList_t *basicList, const void *currentPtr)
Retrieves a pointer to the data element in the basicList that follows the one at currentPtr.
void fbBasicListCollectorInit(fbBasicList_t *basicList)
Initializes a BasicList for collection, setting all properties of the list to 0 or NULL.
void fbTemplateFreeUnused(fbTemplate_t *tmpl)
Frees a template if it is not currently in use by any Session.
uint16_t fbBasicListInfoGetContentIdent(const fbBasicListInfo_t *blInfo, uint32_t *pen)
Gets from blInfo the element numbers for the fbInfoElement_t that the BasicList contains.
struct fbBasicListInfo_st fbBasicListInfo_t
fbBasicListInfo_t describes a basicList and is used by fbTemplateInfo_t.
Definition: public.h:1792
fbTemplate_t * fBufGetCollectionTemplate(const fBuf_t *fbuf, uint16_t *ext_tid)
Retrieves the external template used to read the last record from the buffer.
uint8_t type
Data Type, an fbInfoElementDataType_t.
Definition: public.h:828
struct timespec dt
Used when ie is FB_DT_SEC, FB_DT_MILSEC, FB_DT_MICROSEC, or FB_DT_NANOSEC.
Definition: public.h:1473
gboolean fbTemplateAppendSpecId(fbTemplate_t *tmpl, const fbInfoElementSpecId_t *spec, uint32_t wantedFlags, GError **err)
Potentially appends an information element described by the specifier to a template.
uint16_t fbBasicListCountElements(const fbBasicList_t *basicList)
Returns the number of elements the basic list is capable of holding.
void fbTemplateIterInit(fbTemplateIter_t *iter, const fbTemplate_t *tmpl)
Initializes a TemplateIter to visit the fbTemplateField_t objects in a Template.
uint8_t fbBasicListGetSemantic(const fbBasicList_t *basicList)
Returns the list semantics value (fbListSemantics_t) for a BasicList.
gboolean fbTemplateContainsElementByName(const fbTemplate_t *tmpl, const fbInfoElementSpec_t *spec)
Determines if a template contains at least one instance of a given information element (fbInfoElement...
struct fbRecord_st fbRecord_t
fbRecord_t maintains a buffer holding an IPFIX record's data, the fbTemplate_t that describes that da...
enum fbInfoElementDataType_en fbInfoElementDataType_t
From RFC 5610: A description of the abstract data type of an IPFIX information element as registered ...
gboolean fbTemplateInfoInit(fbTemplateInfo_t *tmplInfo, const char *name, const char *description, uint16_t appLabel, uint16_t parentTid)
Initializes a template metadata structure.
gboolean fBufNext(fBuf_t *fbuf, uint8_t *recbase, size_t *recsize, GError **err)
Retrieves a record from a Buffer associated with a collecting process.
void(* fbNewTemplateCallback_fn)(fbSession_t *session, uint16_t tid, fbTemplate_t *tmpl, void *app_ctx, void **tmpl_ctx, fbTemplateCtxFree_fn *tmpl_ctx_free_fn)
A callback function that will be called when the session receives a new external template.
Definition: public.h:2170
fBuf_t * fbListenerOwnSocketCollectorTLS(fbListener_t *listener, int sock, GError **err)
Same as fbListenerOwnSocketCollectorTCP() but for TLS (not tested)
struct fbTemplateField_st fbTemplateField_t
fbTemplateField_t represents an fbInfoElement_t that has been added to an fbTemplate_t.
void * fbBasicListGetDataPtr(const fbBasicList_t *basicList)
Gets a pointer to the data buffer for the basic list.
const fbInfoElement_t * fbInfoModelIterNext(fbInfoModelIter_t *iter)
Returns a pointer to the next information element in the information model.
gboolean fbRecordFindValueForInfoElement(const fbRecord_t *record, const fbInfoElement_t *ie, fbRecordValue_t *value, uint16_t *position, uint16_t skip)
Searches a Record for an Element and gets its Value.
const fbInfoElement_t * canon
Pointer to canonical IE.
Definition: public.h:1058
void fbSubTemplateListSetSemantic(fbSubTemplateList_t *subTemplateList, uint8_t semantic)
Sets the list semantics value (fbListSemantics_t) of a SubTemplateList.
fbSession_t * fbSessionAlloc(fbInfoModel_t *model)
Allocates an empty transport session state container.
void fbCollectorSetUDPMultiSession(fbCollector_t *collector, gboolean multi_session)
Enables or disables multi-session mode for a fbCollector_t associated with a UDP fbListener_t.
uint16_t len_override
The size of the information element in bytes.
Definition: public.h:1630
fbBasicList_t * fbBasicListAlloc(void)
Allocates and returns an empty BasicList.
enum fbListSemantics_en fbListSemantics_t
fbListSemantics_t defines the possible values for the semantics of the structured Data Types: basicLi...
uint16_t tmplID
The ID of the template used to structure the data.
Definition: public.h:2630
uint8_t padding[6]
padding to align within the template
Definition: public.h:1549
gboolean fbTemplateContainsAllArraySpecId(const fbTemplate_t *tmpl, const fbInfoElementSpecId_t *spec)
Determines if a template contains at least one instance of each fbInfoElement_t in a specifier array.
fbInfoModel_t * fbInfoModelAlloc(void)
Allocates a new information model.
size_t fbExporterGetMsgLen(const fbExporter_t *exporter)
Gets the (transcoded) message length that was copied to the exporting buffer upon fBufEmit() when usi...
gboolean fbSessionRemoveTemplate(fbSession_t *session, gboolean internal, uint16_t tid, GError **err)
Removes a template from a session.
void * fbBasicListResize(fbBasicList_t *basicList, uint16_t newCount)
Resizes and zeroes the list's internal buffer for elements.
gboolean fBufSetInternalTemplate(fBuf_t *fbuf, uint16_t int_tid, GError **err)
Sets the internal template on a buffer to the given template ID.
void fBufSetBuffer(fBuf_t *fbuf, uint8_t *buf, size_t buflen)
Sets an octet array on an fBuf for collection.
guint fbInfoModelCountElements(const fbInfoModel_t *model)
Returns the number of information elements in the information model.
uint16_t fbTemplateGetOptionsScope(const fbTemplate_t *tmpl)
Determines number of scope information elements in a template.
gboolean fbInfoModelReadXMLData(fbInfoModel_t *model, const gchar *xml_data, gssize xml_data_len, GError **err)
Adds information specified in the given XML data to the information model.
void fbSubTemplateListClear(fbSubTemplateList_t *subTemplateList)
Frees the data array of subTemplateList and sets all parameters of subTemplateList to 0 or NULL.
fbSubTemplateMultiList_t * fbSubTemplateMultiListAlloc(void)
Allocates and returns an empty subTemplateMultiList structure.
struct fbTemplateIter_st fbTemplateIter_t
fbTemplateIter_t iterates over the fbTemplateField_t objects in an fbTemplate_t.
uint16_t fbSessionSetMetadataExportElements(fbSession_t *session, gboolean enabled, uint16_t tid, GError **err)
Configures a session to export type information for enterprise-specific information elements as optio...
void(* fbListenerAppFree_fn)(void *ctx)
Application context free function type for fbListener_t.
Definition: public.h:3594
uint8_t * dataPtr
The pointer to the buffer used to hold the data in this list.
Definition: public.h:2611
uint16_t offset
Octet-offset of this field in a record.
Definition: public.h:1071
void fbSubTemplateMultiListClear(fbSubTemplateMultiList_t *STML)
Calls fbSubTemplateMultiListEntryClear() for each Entry in STML then frees the STML's data array and ...
struct fbInfoElementSpec_st fbInfoElementSpec_t
A single IPFIX Information Element specification.
uint16_t tid
The template ID for tmpl.
Definition: public.h:1411
fbInfoElementSemantics_en
fbInfoElementSemantics_t defines the possible semantics of an fbInfoElement_t.
Definition: public.h:387
@ FB_IE_SEM_FLAGS
Describes an information element as a flags element.
Definition: public.h:411
@ FB_IE_SEM_QUANTITY
Describes an information element as a quantity.
Definition: public.h:395
@ FB_IE_SEM_DELTACOUNTER
Describes an information element as a deltaCounter.
Definition: public.h:403
@ FB_IE_SEM_IDENTIFIER
Describes an information element as an identifier.
Definition: public.h:407
@ FB_IE_SEM_LIST
Describes an information element as a list element.
Definition: public.h:415
@ FB_IE_SEM_SNMPCOUNTER
Describes an information element as an SNMP counter.
Definition: public.h:419
@ FB_IE_SEM_DEFAULT
Describes an information element as having no specific semantics.
Definition: public.h:391
@ FB_IE_SEM_TOTALCOUNTER
Describes an information element as a totalCounter.
Definition: public.h:399
@ FB_IE_SEM_SNMPGAUGE
Describes an information element as a SNMP gauge.
Definition: public.h:423
const char * name
Information element name.
Definition: public.h:1610
uint16_t numElements
The number of elements (sub-records) in the list.
Definition: public.h:2626
fbTemplateInfo_t * fbTemplateInfoCopy(const fbTemplateInfo_t *tmplInfo)
Makes a copy of TemplateInfo.
fbListener_t * listener
pointer to the listener that received a new connection
Definition: public.h:2126
const fbTemplateField_t * fbTemplateGetIndexedIE(const fbTemplate_t *tmpl, uint16_t position) __attribute__((__deprecated__))
Deprecated alias for fbTemplateGetFieldByPosition.
struct fbConnSpec_st fbConnSpec_t
Connection specifier.
gboolean fbTemplateContainsAllFlaggedElementsByName(const fbTemplate_t *tmpl, const fbInfoElementSpec_t *spec, uint32_t wantedFlags)
Determines if a template contains at least one instance of each information element in a given inform...
uint16_t ie_id
information element id
Definition: public.h:1541
enum fbInfoElementUnits_en fbInfoElementUnits_t
fbInfoElementUnits_t defines the possible units on an fbInfoElement_t.
gboolean fBufEmit(fBuf_t *fbuf, GError **err)
Emits the message currently in a buffer using the associated exporting process endpoint.
uint8_t * dataPtr
Pointer to the memory that stores the elements in the list.
Definition: public.h:2248
enum fbInfoElementSemantics_en fbInfoElementSemantics_t
fbInfoElementSemantics_t defines the possible semantics of an fbInfoElement_t.
const fbInfoElement_t * fbInfoModelGetElementByID(const fbInfoModel_t *model, uint16_t id, uint32_t ent)
Returns a pointer to the canonical information element within an information model given the informat...
void * vai
Pointer to address info cache.
Definition: public.h:1766
uint16_t element_id
The numeric identifier of the element within its PEN.
Definition: public.h:1673
const fbTemplate_t * fbSubTemplateListGetTemplate(const fbSubTemplateList_t *subTemplateList)
Gets the template pointer from the list structure.
void fbInfoModelAddElement(fbInfoModel_t *model, const fbInfoElement_t *ie)
Adds a single information element to an information model.
struct fbListener_st fbListener_t
IPFIX Collecting Process session listener.
Definition: public.h:2094
gboolean fbTemplateContainsAllFlaggedArraySpecId(const fbTemplate_t *tmpl, const fbInfoElementSpecId_t *spec, uint32_t wantedFlags)
Determines if a template contains at least one instance of each fbInfoElement_t in a specifier array ...
fbTransport_en
Transport protocol for connection specifier.
Definition: public.h:1714
@ FB_DTLS_SCTP
Secure, partially reliable datagram transport via DTLS over SCTP.
Definition: public.h:1729
@ FB_DTLS_UDP
Secure, unreliable datagram transport via DTLS over UDP.
Definition: public.h:1740
@ FB_TLS_TCP
Secure, reliable stream transport via TLS over TCP.
Definition: public.h:1734
@ FB_TCP
Reliable stream transport via TCP.
Definition: public.h:1721
@ FB_SCTP
Partially reliable datagram transport via SCTP.
Definition: public.h:1719
@ FB_UDP
Unreliable datagram transport via UDP.
Definition: public.h:1723
gboolean(* fbListenerAppInit_fn)(fbListener_t *listener, void **ctx, int fd, struct sockaddr *peer, size_t peerlen, GError **err)
Application context initialization function type for fbListener_t.
Definition: public.h:3575
fbListenerGroupResult_t * fbListenerGroupWait(fbListenerGroup_t *group, GError **err)
Accepts connections for multiple listeners.
void fBufSetAutomaticNextMessage(fBuf_t *fbuf, gboolean automatic)
Sets the automatic next-message mode flag on a Buffer.
uint16_t fbBasicListGetElementLength(const fbBasicList_t *basicList)
Returns the octet length of an individual element in the BasicList.
const fbTemplate_t * tmpl
The pointer to the template used to structure the data in this list.
Definition: public.h:2607
gboolean fbTemplateContainsAllElementsByName(const fbTemplate_t *tmpl, const fbInfoElementSpec_t *spec)
Determines if a template contains at least one instance of each fbInfoElement_t in a given informatio...
gboolean fBufNextRecord(fBuf_t *fbuf, fbRecord_t *record, GError **err)
Sets the internal template on a Buffer and gets its next record.
gboolean fbTemplateSetOptionsScope(fbTemplate_t *tmpl, uint16_t scope_count)
Sets the number of information elements in a template that are scope.
uint16_t numElements
The number of elements in the list.
Definition: public.h:2257
struct fbInfoElementOptRec_st fbInfoElementOptRec_t
The corresponding C struct for a record whose template is the RFC 5610 Information Element Type Optio...
size_t recsize
The number of bytes used by the record current in rec.
Definition: public.h:1409
const char * name
Information element name.
Definition: public.h:837
size_t reccapacity
The number of bytes allocated for the rec buffer.
Definition: public.h:1407
fbSubTemplateMultiListEntry_t * fbSubTemplateMultiListAddNewEntries(fbSubTemplateMultiList_t *STML, uint16_t additional)
Increases the size of the list's internal buffer to hold additional more entries.
void * fbSubTemplateListInit(fbSubTemplateList_t *stl, uint8_t semantic, uint16_t tmplID, const fbTemplate_t *tmpl, uint16_t numElements)
Initializes stl with the given parameters and allocates the internal data array to a size capable of ...
void fbSubTemplateMultiListSetSemantic(fbSubTemplateMultiList_t *STML, uint8_t semantic)
Sets the list semantics value (fbListSemantics_t) for the multi list.
const fbBasicList_t * fbRecordFindBasicListOfIE(const fbRecord_t *record, const fbInfoElement_t *contentsElement, uint16_t *position, uint16_t skip)
Searches record for a basicList of contentsElement values.
void fbSessionFree(fbSession_t *session)
Frees a transport session state container.
fBuf_t * fBufAllocForCollection(fbSession_t *session, fbCollector_t *collector)
Allocates a new buffer for collection.
gboolean fbSessionExportTemplates(fbSession_t *session, GError **err)
Exports all external templates in the current domain of a given session.
void fbSubTemplateListCollectorInit(fbSubTemplateList_t *subTemplateList)
Initializes a SubTemplateList for collection, setting all properties of the list to 0 or NULL.
gboolean fbListSemanticsIsValid(uint8_t semantic)
Validates the value of a structured data types semantic field, as defined in RFC 6313 and listed at I...
uint16_t fbSessionAddTemplatesForExport(fbSession_t *session, uint16_t tid, fbTemplate_t *tmpl, fbTemplateInfo_t *tmplInfo, GError **err)
Adds a Template to a Session being used for export as both an internal template and an external templ...
uint16_t ie_units
ie units (fbInfoElementUnits_t)
Definition: public.h:1547
gboolean fbCollectorClearTranslator(fbCollector_t *collector, GError **err)
Removes an input translator from a given collector such that it will operate on IPFIX protocol again.
fbRecordValue_t * fbRecordValueCopy(fbRecordValue_t *dstValue, const fbRecordValue_t *srcValue)
Copies srcValue to dstValue and returns dstValue.
struct fbInfoElementSpecId_st fbInfoElementSpecId_t
A single IPFIX Information Element specification using the element's numeric identifier and private e...
GHashTableIter fbInfoModelIter_t
An iterator over the information elements in an information model.
Definition: public.h:169
gboolean fbInfoElementAddOptRecElement(fbInfoModel_t *model, const fbInfoElementOptRec_t *rec)
Adds an element that we received via an RFC 5610 Options Record to the given info model.
fbInfoElementDataType_en
From RFC 5610: A description of the abstract data type of an IPFIX information element as registered ...
Definition: public.h:715
@ FB_DT_MICROSEC
The "dateTimeMicroseconds" data type: Two 32-bit fields where the first is the number seconds since t...
Definition: public.h:770
@ FB_STRING
The "string" data type: A finite-length string of valid characters from the Unicode character encodin...
Definition: public.h:757
@ FB_DT_SEC
The "dateTimeSeconds" data type: An unsigned 32-bit integer containing the number of seconds since th...
Definition: public.h:761
@ FB_INT_8
The "signed8" data type: An integer value in the range of -128 to 127.
Definition: public.h:734
@ FB_UINT_16
The "unsigned16" data type: A non-negative integer value in the range of 0 to 65535 (0xFFFF).
Definition: public.h:724
@ FB_UINT_64
The "unsigned64" data type: A non-negative integer value in the range of 0 to 18_446_744_073_709_551_...
Definition: public.h:731
@ FB_FLOAT_64
The "float64" data type: An IEEE double-precision 64-bit floating point type.
Definition: public.h:749
@ FB_SUB_TMPL_MULTI_LIST
The "subTemplateMultiList" data type: A structured data element as described in RFC6313,...
Definition: public.h:788
@ FB_SUB_TMPL_LIST
The "subTemplateList" data type: A structured data element as described in RFC6313,...
Definition: public.h:785
@ FB_BOOL
The "boolean" data type: A binary value: "true" or "false".
Definition: public.h:751
@ FB_UINT_32
The "unsigned32" data type: A non-negative integer value in the range of 0 to 4_294_967_295 (0xFFFFFF...
Definition: public.h:727
@ FB_IP6_ADDR
The "ipv6Address" data type: A value of an IPv6 address.
Definition: public.h:779
@ FB_INT_32
The "signed32" data type: An integer value in the range of -2_147_483_648 to 2_147_483_647.
Definition: public.h:740
@ FB_UINT_8
The "unsigned8" data type: A non-negative integer value in the range of 0 to 255 (0xFF).
Definition: public.h:721
@ FB_INT_64
The "signed64" data type: An integer value in the range of -9_223_372_036_854_775_808 to 9_223_372_03...
Definition: public.h:743
@ FB_OCTET_ARRAY
The "octetArray" data type: A finite-length string of octets.
Definition: public.h:718
@ FB_DT_NANOSEC
The "dateTimeMicroseconds" data type: Two 32-bit fields where the first is the number seconds since t...
Definition: public.h:775
@ FB_FLOAT_32
The "float32" data type: An IEEE single-precision 32-bit floating point type.
Definition: public.h:746
@ FB_BASIC_LIST
The "basicList" data type: A structured data element as described in RFC6313, Section 4....
Definition: public.h:782
@ FB_MAC_ADDR
The "macAddress" data type: A MAC-48 address as a string of 6 octets.
Definition: public.h:754
@ FB_INT_16
The "signed16" data type: An integer value in the range of -32768 to 32767.
Definition: public.h:737
@ FB_DT_MILSEC
The "dateTimeMilliseconds" data type: An unsigned 64-bit integer containing the number of millisecond...
Definition: public.h:765
@ FB_IP4_ADDR
The "ipv4Address" data type: A value of an IPv4 address.
Definition: public.h:777
uint16_t fbSubTemplateMultiListEntryGetTemplateID(const fbSubTemplateMultiListEntry_t *entry)
Retrieves the template ID for the template used to structure the data.
fbSubTemplateList_t * fbSubTemplateListAlloc(void)
Allocates and returns an empty subTemplateList structure.
size_t fbExporterGetOctetCountAndReset(fbExporter_t *exporter)
Gets the number of octets that have been written to the exporter's file, socket, or buffer since the ...
const fbTemplate_t * tmpl
The pointer to the template used to structure the data in this entry.
Definition: public.h:2969
void fbBasicListSetSemantic(fbBasicList_t *basicList, uint8_t semantic)
Sets the list semantics value (fbListSemantics_t) for describing a basic list.
const fbInfoElement_t * fbInfoModelGetElementByName(const fbInfoModel_t *model, const char *name)
Returns a pointer to the canonical information element within an information model given the informat...
uint32_t flags
Application flags word.
Definition: public.h:1638
uint16_t fbSessionAddTemplate(fbSession_t *session, gboolean internal, uint16_t tid, fbTemplate_t *tmpl, fbTemplateInfo_t *tmplInfo, GError **err)
Adds a Template to a Session.
int fbListenerGroupAddListener(fbListenerGroup_t *group, const fbListener_t *listener)
Adds a previously allocated listener to the previously allocated group.
fBuf_t * fbuf
pointer to the fbuf created for that new connection
Definition: public.h:2128
fbTemplatesSetCompareStatus_t fbTemplatesSetCompare(const fbTemplate_t *tmpl1, const fbTemplate_t *tmpl2, uint16_t *matching_fields, unsigned int flags)
Compares two Templates to determine if one is a subset of the other.
void fbListenerFreeGroupResult(fbListenerGroupResult_t *result)
Frees the listener group result returned from fbListenerGroupWait().
gboolean fBufSetAutomaticElementInsert(fBuf_t *fbuf, GError **err)
Enables automatic insertion of RFC 5610 elements read from a Buffer.
fbTemplate_t * fBufNextCollectionTemplate(fBuf_t *fbuf, uint16_t *ext_tid, GError **err)
Retrieves the external template that will be used to read the next record from the buffer.
void * fbBasicListInit(fbBasicList_t *basicList, uint8_t semantic, const fbInfoElement_t *infoElement, uint16_t numElements)
Initializes a BasicList for export.
void fBufSetAutomaticMode(fBuf_t *fbuf, gboolean automatic)
Deprecated.
fbExporter_t * fbExporterAllocFile(const char *path)
Allocates an exporting process endpoint for a named file.
void * fbSubTemplateListGetIndexedDataPtr(const fbSubTemplateList_t *subTemplateList, uint16_t index)
Returns the data for the record at position index in the sub template list, or returns NULL if index ...
fBuf_t * fbListenerWait(fbListener_t *listener, GError **err)
Waits on a listener.
void fbSessionAddTemplatePair(fbSession_t *session, uint16_t ext_tid, uint16_t int_tid)
Adds an external-internal fbTemplate_t mapping pair for list elements in a Session.
const fbInfoElement_t * fbBasicListGetInfoElement(const fbBasicList_t *basicList)
Returns a pointer to the information element used in the basic list.
uint16_t fbSessionGetTemplatePath(const fbSession_t *session, const fbTemplateInfo_t *tmplInfo, uint16_t path[], uint16_t path_size, GError **err)
Finds the template path of the fbTemplate_t described by tmplInfo.
gchar * fbRecordValueTakeVarfieldBuf(fbRecordValue_t *value)
Returns a pointer to the string buffer used by value to store fbVarfield_t values and transfers owner...
uint8_t semantic
The semantic value to describe the contents of the list, a value defined in fbListSemantics_t.
Definition: public.h:2266
void * fbBasicListInitWithLength(fbBasicList_t *basicList, uint8_t semantic, const fbInfoElement_t *infoElement, uint16_t elementLength, uint16_t numElements)
Initializes a BasicList for export using a user-specified element length.
uint16_t fbSubTemplateListGetTemplateID(const fbSubTemplateList_t *subTemplateList)
Gets the template ID for the template used by the list.
void * fbBasicListGetIndexedDataPtr(const fbBasicList_t *basicList, uint16_t index)
Retrieves the element at position index in the basic list or returns NULL if index is out of range.
enum fbTemplateSetCompareStatus_en fbTemplatesSetCompareStatus_t
Defines the values returned by fbTemplatesSetCompare() when checking whether one fbTemplate_t is a su...
gboolean fbTemplateAppend(fbTemplate_t *tmpl, const fbInfoElement_t *ex_ie, GError **err)
Appends an information element to a template.
fBuf_t * fbListenerWaitNoCollectors(fbListener_t *listener, GError **err)
Waits for an incoming connection, just like fbListenerWait(), except that this function does not moni...
void * fbSubTemplateMultiListEntryAddNewElements(fbSubTemplateMultiListEntry_t *entry, uint16_t additional)
Increases the size of the entry's internal buffer to hold additional more elements (sub-records).
struct fbInfoModel_st fbInfoModel_t
An IPFIX information model.
Definition: public.h:164
gboolean fbInfoElementWriteOptionsRecord(fBuf_t *fbuf, const fbInfoElement_t *model_ie, uint16_t itid, uint16_t etid, GError **err)
Exports an options record to the given fbuf with information element type information about the given...
fbExporter_t * fbExporterAllocNet(const fbConnSpec_t *spec)
Allocates an exporting process endpoint for a network connection.
uint16_t dataLength
The length of the buffer used to store the elements in the list.
Definition: public.h:2261
const char * fbTemplateInfoGetDescription(const fbTemplateInfo_t *tmplInfo)
Returns the description value specified in fbTemplateInfoInit().
fbExporter_t * fbExporterAllocBuffer(uint8_t *buf, uint16_t bufsize)
Allocates an exporting process to use the existing buffer buf having the specified size.
fbInfoElementUnits_en
fbInfoElementUnits_t defines the possible units on an fbInfoElement_t.
Definition: public.h:572
@ FB_IE_UNITS_MICROSECONDS
Describes an information element as counting microseconds.
Definition: public.h:604
@ FB_IE_UNITS_FLOWS
Describes an information element as counting flows.
Definition: public.h:592
@ FB_IE_UNITS_WORDS
Describes an information element as counting 4-octet words, as for IPv4-header length.
Definition: public.h:613
@ FB_IE_UNITS_SECONDS
Describes an information element as counting seconds.
Definition: public.h:596
@ FB_IE_UNITS_PORTS
Describes an information element as counting ports.
Definition: public.h:635
@ FB_IE_UNITS_MILLISECONDS
Describes an information element as counting milliseconds.
Definition: public.h:600
@ FB_IE_UNITS_MESSAGES
Describes an information element as counting messages.
Definition: public.h:617
@ FB_IE_UNITS_NONE
Describes an information element as having no units.
Definition: public.h:576
@ FB_IE_UNITS_FRAMES
Describes an information element as counting frames, as for Layer 2 frames.
Definition: public.h:631
@ FB_IE_UNITS_OCTETS
Describes an information element as counting octets.
Definition: public.h:584
@ FB_IE_UNITS_NANOSECONDS
Describes an information element as counting nanoseconds.
Definition: public.h:608
@ FB_IE_UNITS_INFERRED
Describes an information element as having units inferred from some other element.
Definition: public.h:641
@ FB_IE_UNITS_PACKETS
Describes an information element as counting packets.
Definition: public.h:588
@ FB_IE_UNITS_HOPS
Describes an information element as counting hops, as for TTL.
Definition: public.h:621
@ FB_IE_UNITS_ENTRIES
Describes an information element as counting entries, as for MPLS label stack.
Definition: public.h:626
@ FB_IE_UNITS_BITS
Describes an information element as counting bits.
Definition: public.h:580
void * fbSubTemplateListResize(fbSubTemplateList_t *subTemplateList, uint16_t newCount)
Resizes and zeroes the list's internal buffer for elements (sub-records).
void fbListenerGroupFree(fbListenerGroup_t *group)
Frees a listener group.
struct fbListenerEntry_st fbListenerEntry_t
ListenerEntry's make up an fbListenerGroup_t as a linked list.
void fbTemplateInfoAddBasicList(fbTemplateInfo_t *tmplInfo, uint32_t blEnt, uint16_t blNum, uint32_t contentEnt, uint16_t contentNum)
Adds a description for an fbBasicList_t that is used by the fbTemplate_t described by tmplInfo.
gboolean fBufNextMessage(fBuf_t *fbuf, GError **err)
Reads a new message into a buffer using the associated collecting process endpoint.
uint16_t fbSubTemplateListCountElements(const fbSubTemplateList_t *subTemplateList)
Returns the number of elements (sub-records) the sub template list is capable of holding.
struct fbTemplateInfo_st fbTemplateInfo_t
fbTemplateInfo_t describes an fbTemplate_t.
Definition: public.h:1782
void fbBasicListFree(fbBasicList_t *basicList)
Frees the data array of basicList (fbBasicListClear()), then frees basicList itself.
void fbListenerInterrupt(fbListener_t *listener)
Causes the current or next call to fbListenerWait() to unblock and return.
fbVarfield_t varfield
Used when ie is FB_STRING or FB_OCTET_ARRAY.
Definition: public.h:1466
uint16_t fbSessionLookupTemplatePair(const fbSession_t *session, uint16_t ext_tid)
Finds the internal template ID to use for sub-records in a list that use the external template ext_ti...
void fbExporterAutoStream(fbExporter_t *exporter)
Enables automatic SCTP stream selection for the next message exported.
void fbSessionSetDomain(fbSession_t *session, uint32_t domain)
Sets the current observation domain on a session.
const fbTemplateField_t * fbTemplateFindFieldByElement(const fbTemplate_t *tmpl, const fbInfoElement_t *ie, uint16_t *position, uint16_t skip)
Searches a Template for an Information Element and returns a TemplateField if found.
char * ssl_ca_file
Path to certificate authority file.
Definition: public.h:1755
uint16_t fbTemplateInfoGetTemplateId(const fbTemplateInfo_t *tmplInfo)
Returns the Template ID value associated with this TemplateInfo.
gboolean fbRecordCopyToTemplate(const fbRecord_t *srcRec, fbRecord_t *dstRec, const fbTemplate_t *tmpl, uint16_t tid, GError **err)
Copies a Record to a destination Record that uses a different Template.
struct fbSession_st fbSession_t
An IPFIX Transport Session state container.
Definition: public.h:1711
fbTransport_t transport
Transport protocol to use.
Definition: public.h:1749
gboolean fBufSetTemplatesForExport(fBuf_t *fbuf, uint16_t tid, GError **err)
Sets the internal and external templates on a Buffer to the given template ID.
struct fbListenerEntry_st * next
pointer to the next listener entry in the linked list
Definition: public.h:2110
void * fbSubTemplateMultiListEntryInit(fbSubTemplateMultiListEntry_t *entry, uint16_t tmplID, const fbTemplate_t *tmpl, uint16_t numElements)
Initializes entry with the given parameters and allocates the internal data array to a size capable o...
void fbInfoModelFree(fbInfoModel_t *model)
Frees an information model.
const fbTemplateField_t * fbTemplateFindFieldByDataType(const fbTemplate_t *tmpl, fbInfoElementDataType_t datatype, uint16_t *position, uint16_t skip)
Searches a Template for a TemplateField by an fbInfoElement_t's datatype.
fbTemplate_t * fbInfoElementAllocTypeTemplate(fbInfoModel_t *model, GError **err)
Allocates and returns the Options Template that will be used to define Information Element Type Recor...
fbSubTemplateMultiListEntry_t * fbSubTemplateMultiListInit(fbSubTemplateMultiList_t *STML, uint8_t semantic, uint16_t numElements)
Initializes the multi list with the list semantic and allocates a data array to store numElements ent...
uint16_t tmplID
The ID of the template used to structure the data in this entry.
Definition: public.h:2990
void * vssl_ctx
Pointer to SSL context cache.
Definition: public.h:1771
const fbBasicList_t * bl
Used when ie is FB_BASIC_LIST.
Definition: public.h:1451
struct fbInfoElement_st fbInfoElement_t
A single IPFIX Information Element definition.
fbSubTemplateMultiListEntry_t * fbSubTemplateMultiListResize(fbSubTemplateMultiList_t *STML, uint16_t newCount)
Resizes and zeroes the list's internal buffer for entries (fbSubTemplateMultiListEntry_t).
const fbTemplate_t * fbTemplateIterGetTemplate(const fbTemplateIter_t *iter)
Returns the Template to which the TemplateIter is bound.
uint64_t u64
Used when ie is FB_UINT_8, FB_UINT_16, FB_UINT_32, FB_UINT_64, or FB_BOOL (0 == false,...
Definition: public.h:1482
const fbSubTemplateMultiList_t * stml
Used when ie is FB_SUB_TMPL_MULTI_LIST.
Definition: public.h:1459
void fbSubTemplateListFree(fbSubTemplateList_t *subTemplateList)
Frees the data array of subTemplateList (fbSubTemplateListClear()), then frees subTemplateList itself...
void fbBasicListClearWithoutFree(fbBasicList_t *basicList)
Sets all parameters of basicList to 0 or NULL except for the internal data array and its allocated le...
void fbExporterSetStream(fbExporter_t *exporter, int sctp_stream)
Sets the SCTP stream for the next message exported.
GString * stringbuf
An internal buffer used to store the varfield value.
Definition: public.h:1441
uint16_t fbTemplateCountElements(const fbTemplate_t *tmpl)
Determines number of information elements in a template.
fbTemplateField_t field
The description of one element in the list.
Definition: public.h:2253
fbInfoModel_t * fbSessionGetInfoModel(const fbSession_t *session)
Gets the info model for the session.
const fbSubTemplateList_t * fbRecordFindStlOfTemplate(const fbRecord_t *record, const fbTemplate_t *tmpl, uint16_t *position, uint16_t skip)
Searches record for a subTemplateList that uses tmpl.
fbExporter_t * fBufGetExporter(const fBuf_t *fbuf)
Retrieves the exporting process endpoint associated with a buffer.
gboolean fbCollectorSetSFlowTranslator(fbCollector_t *collector, GError **err)
Sets the collector input translator to convert SFlow into IPFIX for the given collector.
gboolean fbSessionExportTemplate(fbSession_t *session, uint16_t tid, GError **err)
Exports a single external fbTemplate_t in the current domain of a given Session.
uint8_t * buf
Content buffer.
Definition: public.h:156
gboolean fbTemplateAppendArraySpecId(fbTemplate_t *tmpl, const fbInfoElementSpecId_t *spec, uint32_t wantedFlags, GError **err)
Appends information elements described by a specifier array to a template.
fBuf_t * fBufAllocForExport(fbSession_t *session, fbExporter_t *exporter)
Allocates a new buffer for export.
void * fbSubTemplateListGetNextPtr(const fbSubTemplateList_t *subTemplateList, const void *currentPtr)
Retrieves a pointer to the data record in the sub template list that follows the one at currentPtr.
void fbInfoModelIterInit(fbInfoModelIter_t *iter, const fbInfoModel_t *model)
Initializes an information model iterator for iteration over the information elements (fbInfoElement_...
void fbTemplateSetContext(fbTemplate_t *tmpl, void *tmpl_ctx, void *app_ctx, fbTemplateCtxFree_fn ctx_free)
Sets the context pointers on a Template.
int(* fbRecordValueCallback_fn)(const fbRecord_t *parent_record, const fbBasicList_t *parent_bl, const fbInfoElement_t *field, const fbRecordValue_t *value, void *ctx)
Signature of the callback function required by fbRecordFindAllElementValues().
Definition: public.h:5596
uint8_t semantic
The semantic value to describe the contents of the list, a value defined in fbListSemantics_t.
Definition: public.h:2635
const fbBasicListInfo_t * fbTemplateInfoGetNextBasicList(const fbTemplateInfo_t *tmplInfo, const fbBasicListInfo_t *blInfo)
Returns a description of the next fbBasicList_t that is used by the fbTemplate_t described by tmplInf...
const fbTemplateField_t * fbTemplateIterGetField(const fbTemplateIter_t *iter)
Returns the same TemplateField returned by the most recent call to fbTemplateIterNext().
fbListSemantics_en
fbListSemantics_t defines the possible values for the semantics of the structured Data Types: basicLi...
Definition: public.h:2191
@ FB_LIST_SEM_EXACTLY_ONE_OF
Semantic field for exactly-one-of value defined in RFC 6313.
Definition: public.h:2203
@ FB_LIST_SEM_ORDERED
Semantic field for the ordered value defined in RFC 6313.
Definition: public.h:2215
@ FB_LIST_SEM_ONE_OR_MORE_OF
Semantic field for the one-or-more-of value defined in RFC 6313.
Definition: public.h:2207
@ FB_LIST_SEM_ALL_OF
Semantic field for the all-of value defined in RFC 6313.
Definition: public.h:2211
@ FB_LIST_SEM_NONE_OF
Semantic field for none-of value defined in RFC 6313.
Definition: public.h:2199
@ FB_LIST_SEM_UNDEFINED
Semantic field for indicating the value has not been set.
Definition: public.h:2195
uint8_t fbSubTemplateMultiListGetSemantic(const fbSubTemplateMultiList_t *STML)
Gets the list semantics value (fbListSemantics_t) from the multi list.
uint32_t ip4
Used when ie is FB_IP4_ADDR.
Definition: public.h:1477
fbTemplate_t * tmpl
Octet-length of this IE in memory.
Definition: public.h:1083
const fbTemplateField_t * fbTemplateIterNext(fbTemplateIter_t *iter)
Returns the next TemplateField in the fbTemplate_t.
uint32_t dataLength
The octet length of the allocated buffer used to hold the data.
Definition: public.h:2617
uint32_t enterprise_id
The private enterprise number (PEN) of the element or 0 for an IANA-defined element.
Definition: public.h:1669
uint64_t max
range max
Definition: public.h:832
char * svc
Service name or port number to connect/listen to.
Definition: public.h:1753
void * fbSubTemplateMultiListEntryGetIndexedPtr(const fbSubTemplateMultiListEntry_t *entry, uint16_t index)
Retrieves a pointer to the data element in the entry at position index, or returns NULL when index is...
uint16_t numElements
The number of sub template lists in the multi list.
Definition: public.h:2951
void fbExporterResetOctetCount(fbExporter_t *exporter)
Resets the counter that holds the number of octets written to the exporter's file,...
fbSubTemplateMultiListEntry_t * fbSubTemplateMultiListGetIndexedEntry(const fbSubTemplateMultiList_t *STML, uint16_t index)
Retrieves a pointer to the entry at a specific index, or returns NULL if index is out of range.
void * fbTemplateGetContext(const fbTemplate_t *tmpl)
Gets the context pointer associated with a Template.
uint16_t len_override
The size of the information element in bytes.
Definition: public.h:1694
char * ssl_cert_file
Path to certificate file.
Definition: public.h:1757
struct fbListenerGroup_st fbListenerGroup_t
Structure that represents a group of listeners.
Definition: public.h:2103
void * fbSubTemplateListGetDataPtr(const fbSubTemplateList_t *subTemplateList)
Returns the pointer to the sub-record data array for the subTemplateList.
void fbSubTemplateMultiListClearEntries(fbSubTemplateMultiList_t *STML)
Calls fbSubTemplateMultiListEntryClear() for each Entry in STML.
char * ssl_key_file
Path to private key file.
Definition: public.h:1759
uint16_t numElements
The number of elements (sub-records) in this entry.
Definition: public.h:2986
gboolean fbTemplateAppendSpec(fbTemplate_t *tmpl, const fbInfoElementSpec_t *spec, uint32_t wantedFlags, GError **err)
Potentially appends an information element described by the specifier to a template.
uint32_t fbCollectorGetObservationDomain(const fbCollector_t *collector)
Retrieves the observation domain of the node connected to the UDP collector.
fbCollector_t * fBufGetCollector(const fBuf_t *fbuf)
Retrieves the collecting process endpoint associated with a buffer.
uint16_t fbTemplateInfoGetApplabel(const fbTemplateInfo_t *tmplInfo)
Returns the applabel value specified in fbTemplateInfoInit().
struct fbListenerEntry_st * prev
pointer to the previous listener entry in the linked list
Definition: public.h:2112
size_t fbExporterGetOctetCount(const fbExporter_t *exporter)
Gets the number of octets that have been written to the exporter's file, socket, or buffer since the ...
uint32_t recordLength
The octet length of a record (in memory) described by the template.
Definition: public.h:2622
void * fbSubTemplateMultiListEntryNextDataPtr(const fbSubTemplateMultiListEntry_t *entry, const void *currentPtr)
Retrieves a pointer to the data record in this entry that follows the one at currentPtr.
gboolean fbCollectorSetNetflowV9Translator(fbCollector_t *collector, GError **err)
Sets the collector input translator to convert NetFlowV9 into IPFIX for the given collector.
uint8_t fbSubTemplateListGetSemantic(const fbSubTemplateList_t *subTemplateList)
Gets the list semantics value (fbListSemantics_t) from a SubTemplateList.
void fBufListFree(const fbTemplate_t *tmpl, uint8_t *record)
Frees all of the memory that fixbuf allocated during transcode of this record.
void fBufInterruptSocket(fBuf_t *fbuf)
Interrupts the select call of a specific collector by way of its fBuf.
void fbSubTemplateMultiListEntryClear(fbSubTemplateMultiListEntry_t *entry)
Frees the data array that holds the sub-records of entry and sets all parameters of entry to 0 or NUL...
const fbInfoElement_t * ie
The element that describes this data.
Definition: public.h:1439
uint16_t fbSessionGetLargestInternalTemplateSize(fbSession_t *session)
Gets the largest decoded size of an internal template in the session.
gboolean fbListenerGetCollector(const fbListener_t *listener, fbCollector_t **collector, GError **err)
If a collector is associated with the listener class, this will return a handle to the collector stat...
struct fbListenerGroupResult_st fbListenerGroupResult_t
A ListenerGroupResult contains the fbListener whose listening socket got a new connection (cf.
const char * fbTemplateInfoGetName(const fbTemplateInfo_t *tmplInfo)
Returns the name value specified in fbTemplateInfoInit().
struct fBuf_st fBuf_t
An IPFIX message buffer.
Definition: public.h:139
const fbTemplate_t * fbSubTemplateMultiListEntryGetTemplate(const fbSubTemplateMultiListEntry_t *entry)
Retrieves the template pointer used to structure the data elements.
fbExporter_t * fbExporterAllocFP(FILE *fp)
Allocates an exporting process endpoint for an opened ANSI C file pointer.
uint32_t fbCollectorGetNetflowMissed(const fbCollector_t *collector, const struct sockaddr *peer, size_t peerlen, uint32_t obdomain)
Returns the number of potential missed export packets of the Netflow v9 session that is currently set...
uint32_t flags
Flags.
Definition: public.h:826
void * fbSubTemplateListAddNewElements(fbSubTemplateList_t *subTemplateList, uint16_t additional)
Increases the size of the list's internal buffer to hold additional more elements (sub-records).
uint32_t fbSessionGetDomain(const fbSession_t *session)
Retrieves the current domain on a session.
fbSubTemplateMultiListEntry_t * fbSubTemplateMultiListGetNextEntry(const fbSubTemplateMultiList_t *STML, const fbSubTemplateMultiListEntry_t *currentEntry)
Retrieves a pointer to the entry in the multi list that follows the one at currentEntry.
void fbSubTemplateMultiListFree(fbSubTemplateMultiList_t *STML)
Frees the data arrays of each Entry and of STML (fbSubTemplateMultiListClear()), then frees STML itse...
gboolean fbBasicListGetIndexedRecordValue(const fbBasicList_t *basicList, uint16_t index, fbRecordValue_t *value)
Fills a RecordValue from the data for the indexth element in basicList.
void fbSubTemplateListClearWithoutFree(fbSubTemplateList_t *subTemplateList)
Sets all parameters of subTemplateList to 0 or NULL except for the internal data array and its alloca...
uint16_t fbSessionSetMetadataExportTemplates(fbSession_t *session, gboolean enabled, uint16_t tmplInfoTid, uint16_t blInfoTid, GError **err)
Configures a Session to export template metadata (fbTemplateInfo_t) as options records.
uint32_t recordLength
The octet length of a record (in memory) described by the template.
Definition: public.h:2982
fbInfoModel_t * fbTemplateGetInfoModel(const fbTemplate_t *tmpl)
Returns the information model, as understood by the template.
fbSession_t * fBufGetSession(const fBuf_t *fbuf)
Retrieves the session associated with a buffer.
uint32_t ie_pen
private enterprise number
Definition: public.h:1539
int fbRecordFindAllSubRecords(const fbRecord_t *record, uint16_t tid, unsigned int flags, fbRecordSubRecordCallback_fn callback, void *ctx)
Recursively searches a Record for uses of a fbTemplate_t having a particular ID.
uint8_t ie_type
ie data type (fbInfoElementDataType_t)
Definition: public.h:1543
size_t len
Length of content in buffer.
Definition: public.h:149
uint64_t ie_range_begin
ie range min
Definition: public.h:1551
char * host
Hostname to connect/listen to.
Definition: public.h:1751
uint16_t len
Standard information element length in octets; FB_IE_VARLEN for strings, octetArrays,...
Definition: public.h:823
void fbInfoModelAddElementArray(fbInfoModel_t *model, const fbInfoElement_t *ie)
Adds multiple information elements in an array to an information model.
struct fbRecordValue_st fbRecordValue_t
fbRecordValue_t is used to access the value of a single Element (or Field) in an fbRecord_t.
void fbCollectorSetAcceptOnly(fbCollector_t *collector, struct sockaddr *address, size_t address_length)
Sets the collector to only receive from the given IP address over UDP.
fbVarfield_t ie_desc
information element description
Definition: public.h:1557
char * ssl_key_pass
Private key decryption password.
Definition: public.h:1761
fbCollector_t * fbCollectorAllocFile(void *ctx, const char *path, GError **err)
Allocates a collecting process endpoint for a named file.
enum fbTransport_en fbTransport_t
Transport protocol for connection specifier.
fbCollector_t * fbCollectorAllocFP(void *ctx, FILE *fp)
Allocates a collecting process endpoint for an open file.
gboolean fBufSetAutomaticMetadataAttach(fBuf_t *fbuf, GError **err)
Instructes a collection Buffer to process Template Metadata records.
void fbSessionResetExternal(fbSession_t *session)
Resets the external state (sequence numbers and templates) in a session state container.
uint16_t midx
Multiple IE index.
Definition: public.h:1063
void fbExporterClose(fbExporter_t *exporter)
Forces the file or socket underlying an exporting process endpoint to close.
uint16_t fbRecordGetFieldCount(const fbRecord_t *record)
Returns the number of fields in a record.
fBuf_t * fbListenerOwnSocketCollectorTCP(fbListener_t *listener, int sock, GError **err)
Returns an fBuf wrapped around an independently managed socket and a properly created listener for TC...
const fbTemplateInfo_t * fbSessionGetTemplateInfo(const fbSession_t *session, uint16_t tid)
Returns the metadata for template whose ID is tid in the current domain or NULL if no metadata is ava...
int fbListenerGroupDeleteListener(fbListenerGroup_t *group, const fbListener_t *listener)
Removes the listener from the group.
uint16_t len
Octet-length of this field as specified by the template specification.
Definition: public.h:1067
void fbBasicListClear(fbBasicList_t *basicList)
Frees the data array of basicList and sets all parameters of basicList to 0 or NULL.
uint8_t * rec
The buffer holding the data for a record.
Definition: public.h:1405
double dbl
Used when ie is FB_FLOAT_64 or FB_FLOAT_32.
Definition: public.h:1491
fbTemplateInfo_t * fbTemplateInfoAlloc(void)
Allocates and returns an empty template metadata information structure.
gboolean fbRecordGetValueForField(const fbRecord_t *record, const fbTemplateField_t *field, fbRecordValue_t *value)
Gets the value from a Record given a Field used by the Record's fbTemplate_t.
void fbListenerFree(fbListener_t *listener)
Frees a listener.
uint64_t min
range min
Definition: public.h:830
void fbTemplateInfoFree(fbTemplateInfo_t *tmplInfo)
Frees a template metadata structure.
void fbRecordFreeLists(fbRecord_t *record)
Releases all of the memory allocated during transcode of this record, freeing the list structures,...
int fbRecordFindAllElementValues(const fbRecord_t *record, const fbInfoElement_t *ie, unsigned int flags, fbRecordValueCallback_fn callback, void *ctx)
Recursively searches a Record and all its sub-records for an Info Element.
fbTemplate_t * fbSessionGetTemplate(const fbSession_t *session, gboolean internal, uint16_t tid, GError **err)
Retrieves a template from a session by ID.
fbTemplate_t * fbTemplateAlloc(fbInfoModel_t *model)
Allocates a new empty template.
gboolean fbInfoModelContainsElement(const fbInfoModel_t *model, const fbInfoElement_t *element)
Returns TRUE if element is present in the information model either by name or by element and enterpri...
const fbTemplateField_t * fbTemplateGetFieldByPosition(const fbTemplate_t *tmpl, uint16_t position)
Returns a field in a template at a specific position.
gboolean fBufAppend(fBuf_t *fbuf, uint8_t *recbase, size_t recsize, GError **err)
Appends a record to a buffer.
gboolean fBufSetAutomaticInsert(fBuf_t *fbuf, GError **err)
A deprecated alias for fBufSetAutomaticElementInsert().
int fbTemplatesCompare(const fbTemplate_t *tmpl1, const fbTemplate_t *tmpl2, unsigned int flags)
Compares templates tmpl1 and tmpl2 according to flags and returns 0 if the are the same and non-zero ...
fbVarfield_t ie_name
information element name
Definition: public.h:1555
uint8_t semantic
The semantic value to describe the contents of the list, a value defined in fbListSemantics_t.
Definition: public.h:2956
fbSubTemplateMultiListEntry_t * fbSubTemplateMultiListGetFirstEntry(const fbSubTemplateMultiList_t *STML)
Retrieves the first entry in the multi list.
fbSubTemplateMultiListEntry_t * firstEntry
The pointer to the first entry in the multi list.
Definition: public.h:2947
uint16_t fbTemplateIterGetPosition(const fbTemplateIter_t *iter)
Returns the position of the fbTemplateField_t returned by the most recent call to fbTemplateIterNext(...
fbListener_t * listener
pointer to the listener to add to the list
Definition: public.h:2114
fbListener_t * fbListenerAlloc(const fbConnSpec_t *spec, fbSession_t *session, fbListenerAppInit_fn appinit, fbListenerAppFree_fn appfree, GError **err)
Allocates a listener.
struct fbCollector_st fbCollector_t
IPFIX Collecting Process endpoint.
Definition: public.h:2086
void * fbCollectorGetContext(const fbCollector_t *collector)
Retrieves the application context associated with a collector.
uint16_t fbTemplateGetIELenOfMemBuffer(const fbTemplate_t *tmpl)
Returns the number of octets required for a data buffer (an octet array) to store a data record descr...
int64_t s64
Used when ie is FB_INT_8, FB_INT_16, FB_INT_32, or FB_INT_64.
Definition: public.h:1487
uint16_t num
Information Element number.
Definition: public.h:818
uint32_t fBufGetExportTime(const fBuf_t *fbuf)
Retrieves the export time on the message currently in a buffer.
fbTemplateSetCompareStatus_en
Defines the values returned by fbTemplatesSetCompare() when checking whether one fbTemplate_t is a su...
Definition: public.h:5244
@ FB_TMPL_SETCMP_DISJOINT
Indicates the templates contain no common elements.
Definition: public.h:5255
@ FB_TMPL_SETCMP_EQUAL
Indicates the two templates contain the same elements.
Definition: public.h:5248
@ FB_TMPL_SETCMP_SUPERSET
Indicates the first template is a strict superset of the second.
Definition: public.h:5250
@ FB_TMPL_SETCMP_SUBSET
Indicates the first template is a strict subset of the second.
Definition: public.h:5246
@ FB_TMPL_SETCMP_COMMON
Indicates the templates contain common elements but each has elements that the other does not.
Definition: public.h:5253
void fbSessionRemoveTemplatePair(fbSession_t *session, uint16_t ext_tid)
Removes a template mapping pair for list sub-records from the Session.
void * fbSubTemplateMultiListEntryResize(fbSubTemplateMultiListEntry_t *entry, uint16_t newCount)
Resizes and zeroes the entry's internal buffer for elements (sub-records).
gboolean fbTemplateIsMetadata(const fbTemplate_t *tmpl, uint32_t tests)
Checks to see if a template describes a meta-data record according to the bit-field value in tests.
void fBufSetCollector(fBuf_t *fbuf, fbCollector_t *collector)
Associates an collecting process endpoint with a buffer.
gboolean fbRecordCopyFieldValue(const fbRecord_t *record, const fbTemplateField_t *field, void *dest, size_t destlen)
Copies the value from a Record given a Field used by the Record's fbTemplate_t.
void fbSessionAddNewTemplateCallback(fbSession_t *session, fbNewTemplateCallback_fn callback, void *app_ctx)
This function sets the callback that allows the application to set its own context variable with a ne...
fbTemplate_t * fbTemplateCopy(const fbTemplate_t *tmpl, uint32_t flags)
Creates a new template that is a copy of tmpl perhaps modified by the values specified in flags.
uint64_t ie_range_end
ie range max
Definition: public.h:1553
uint8_t ip6[16]
Used when ie is FB_IP6_ADDR.
Definition: public.h:1447
void fbRecordValueClear(fbRecordValue_t *value)
Releases any memory used by the string buffer on value (that is used to store the fbVarfield_t) and r...
uint32_t dataLength
The octet length of the buffer used to hold the data in this entry.
Definition: public.h:2977
size_t fBufRemaining(fBuf_t *fbuf)
When using fBufSetBuffer(), returns the number of unprocessed octets in the octet array.
gboolean fbTemplatesAreEqual(const fbTemplate_t *tmpl1, const fbTemplate_t *tmpl2)
Returns TRUE when templates tmpl1 and tmpl2 are equal.
void fbCollectorClose(fbCollector_t *collector)
Closes the file or socket underlying a collecting process endpoint.
uint32_t flags
Application flags word.
Definition: public.h:1701
uint16_t fbTemplateInfoGetParentTid(const fbTemplateInfo_t *tmplInfo)
Returns the parentTid value specified in fbTemplateInfoInit().
void fbSessionSetCallbackCopyTemplates(fbSession_t *incomingSession, fbSession_t *exportSession)
Arranges for templates read by incomingSession to be copied to exportSession by setting the new templ...
uint16_t fbBasicListGetElementIdent(const fbBasicList_t *basicList, uint32_t *pen)
Gets the element ID and enterprise number for the fbInfoElement_t used by a BasicList.
uint8_t * dataPtr
The pointer to the buffer used to hold the data in this entry.
Definition: public.h:2973
const fbSubTemplateList_t * stl
Used when ie is FB_SUB_TMPL_LIST.
Definition: public.h:1455
uint8_t mac[6]
Used when ie is FB_MAC_ADDR.
Definition: public.h:1495
void * fbSubTemplateMultiListEntryGetDataPtr(const fbSubTemplateMultiListEntry_t *entry)
Retrieves the data pointer for this entry.
struct fbVarfield_st fbVarfield_t
A variable-length field value.
gboolean fBufSetExportTemplate(fBuf_t *fbuf, uint16_t ext_tid, GError **err)
Sets the external template for export on a buffer to the given template ID.
gboolean fbInfoModelReadXMLFile(fbInfoModel_t *model, const gchar *filename, GError **err)
Adds information specified in the given XML file to the information model.
const struct sockaddr * fbCollectorGetPeer(const fbCollector_t *collector)
Retrieves information about the node connected to this collector.
const fbTemplateField_t * fbBasicListGetTemplateField(const fbBasicList_t *basicList)
Returns a simulated TemplateField that describes the data within a basicList.
uint32_t ent
Private Enterprise Number.
Definition: public.h:813
const fbTemplate_t * tmpl
The template that describes the bytes in rec.
Definition: public.h:1403
fbListenerGroup_t * fbListenerGroupAlloc(void)
Allocates and returns an empty ListenerGroup.
gboolean fbTemplateContainsElement(const fbTemplate_t *tmpl, const fbInfoElement_t *element)
Determines if a template contains a given information element.
uint32_t fbCollectorGetSFlowMissed(const fbCollector_t *collector, const struct sockaddr *peer, size_t peerlen, uint32_t obdomain)
Returns the number of potential missed export packets of the SFlow session that is identified with th...
void fBufSetExporter(fBuf_t *fbuf, fbExporter_t *exporter)
Associates an exporting process endpoint with a buffer.
void fbSessionCopyIncomingTemplatesCallback(fbSession_t *incomingSession, uint16_t tid, fbTemplate_t *tmpl, void *exportSession, void **tmpl_ctx, fbTemplateCtxFree_fn *tmpl_ctx_free_fn)
Arranges for templates read by incomingSession to be copied to exportSession.
int(* fbRecordSubRecordCallback_fn)(const fbRecord_t *record, void *ctx)
Signature of the callback function required by fbRecordFindAllSubRecords().
Definition: public.h:5647
uint16_t fbSubTemplateMultiListEntryCountElements(const fbSubTemplateMultiListEntry_t *entry)
Returns the number of entries the sub template multi list entry is capable of holding.
gboolean fbTemplateAppendSpecArray(fbTemplate_t *tmpl, const fbInfoElementSpec_t *spec, uint32_t wantedFlags, GError **err)
Appends information elements described by a specifier array to a template.
uint16_t fbBasicListInfoGetListIdent(const fbBasicListInfo_t *blInfo, uint32_t *pen)
Gets from blInfo the element numbers for the fbInfoElement_t used by the BasicList element itself.
uint16_t fbSubTemplateMultiListCountElements(const fbSubTemplateMultiList_t *STML)
Returns the number of entries the sub template multi list is capable of holding.
void fBufSetExportTime(fBuf_t *fbuf, uint32_t extime)
Sets the export time on the message currently in a buffer.
gboolean fbTemplateContainsSpecId(const fbTemplate_t *tmpl, const fbInfoElementSpecId_t *spec)
Determines if a template contains at least one instance of a given information element (fbInfoElement...
fbBasicList_t provides the internal representation of an fbInfoElement_t of type basicList (FB_BASIC_...
Definition: public.h:2244
Connection specifier.
Definition: public.h:1747
A single IPFIX Information Element definition.
Definition: public.h:809
The corresponding C struct for a record whose template is the RFC 5610 Information Element Type Optio...
Definition: public.h:1537
A single IPFIX Information Element specification.
Definition: public.h:1606
A single IPFIX Information Element specification using the element's numeric identifier and private e...
Definition: public.h:1660
The numeric pair to identify the element.
Definition: public.h:1664
ListenerEntry's make up an fbListenerGroup_t as a linked list.
Definition: public.h:2108
A ListenerGroupResult contains the fbListener whose listening socket got a new connection (cf.
Definition: public.h:2122
fbRecord_t maintains a buffer holding an IPFIX record's data, the fbTemplate_t that describes that da...
Definition: public.h:1401
fbRecordValue_t is used to access the value of a single Element (or Field) in an fbRecord_t.
Definition: public.h:1437
fbSubTemplateList_t provides the internal representation of an fbInfoElement_t of type subTemplateLis...
Definition: public.h:2603
fbSubTemplateMultiList_t provides the internal representation of an fbInfoElement_t of type subTempla...
Definition: public.h:2943
fbSubTemplateMultiListEntry_t represents structured data instances within a fbSubTemplateMultiList_t ...
Definition: public.h:2965
fbTemplateField_t represents an fbInfoElement_t that has been added to an fbTemplate_t.
Definition: public.h:1056
fbTemplateIter_t iterates over the fbTemplateField_t objects in an fbTemplate_t.
Definition: public.h:1213
A variable-length field value.
Definition: public.h:147
The value depending on the type of ie.
Definition: public.h:1443
Fixbuf's version information.