CERT NetSA Security Suite
Monitoring for Large-Scale Networks

# fixbuf

Documentation
private.h
Go to the documentation of this file.
1
42 #ifndef _FB_PRIVATE_H_
43 #define _FB_PRIVATE_H_
44 #include <fixbuf/public.h>
45
46 #if HAVE_SPREAD
47 #include <sp.h>
48 #include <pthread.h>
49 #endif
50
51
64 #define IPFIX_ENTERPRISE_BIT 0x8000
65
68 #define FB_MSGLEN_MAX 65535
69
70 #if HAVE_SPREAD
71
75 typedef struct sp_groupname_st
76 {
77 char name[MAX_GROUP_NAME];
78 } sp_groupname_t;
79
81 #define FB_SPREAD_NUM_GROUPS 16
82
84 #define FB_SPREAD_MTU 8192
85
89 typedef struct fbSpreadSpec_st {
92 fbSession_t *session;
95 char * daemon;
98 sp_groupname_t *groups;
100 int num_groups;
102 sp_groupname_t *groups_to_send;
103 int num_groups_to_send;
105 mailbox mbox;
107 char privgroup[MAX_GROUP_NAME + 2];
109 pthread_mutex_t write_lock;
111 pthread_t recv_thread;
113 mailbox recv_mbox;
115 char recv_privgroup[MAX_GROUP_NAME + 2];
117 GError *recv_err;
119 int recv_exit;
121 int recv_max_groups;
123 int recv_num_groups;
125 sp_groupname_t *recv_groups;
127 int recv_max;
129 char *recv_mess;
130 } fbSpreadSpec_t;
131
132 #endif /* HAVE_SPREAD */
133
140 typedef struct fbUDPConnSpec_st {
142 fbSession_t *session;
144 void *ctx;
146 union {
147 struct sockaddr so;
148 struct sockaddr_in ip4;
149 struct sockaddr_in6 ip6;
150 } peer;
152 size_t peerlen;
154 struct fbUDPConnSpec_st *next;
156 struct fbUDPConnSpec_st *prev;
158 time_t last_seen;
160 uint32_t obdomain;
162 gboolean reject;
163 } fbUDPConnSpec_t;
164
165
166 #ifdef DEFINE_TEMPLATE_METADATA_SPEC
167 /* Template metadata template */
168 static fbInfoElementSpec_t template_metadata_spec[] = {
169 {"templateId", 2, 0 },
170 {"paddingOctets", 6, 1 },
171 {"templateName", FB_IE_VARLEN, 0 },
172 {"templateDescription", FB_IE_VARLEN, 0 },
173 /* {"templateInformationElementList", FB_IE_VARLEN, 0 }, */
174 FB_IESPEC_NULL
175 };
176 #endif
177
182 typedef struct fbTemplateOptRec_st {
184 uint16_t template_id;
185 uint8_t template_padding[6];
187 fbVarfield_t template_name;
189 fbVarfield_t template_description;
191 /* fbSubTemplateList_t info_element_list; */
192 } fbTemplateOptRec_t;
193
199 struct fbTemplate_st {
201 fbInfoModel_t *model;
203 int ref_count;
205 uint16_t ie_count;
210 uint16_t scope_count;
217 uint16_t ie_len;
223 uint16_t ie_internal_len;
228 uint16_t tmpl_len;
230 gboolean is_varlen;
232 fbInfoElement_t **ie_ary;
234 GHashTable *indices;
236 uint16_t *off_cache;
238 gboolean active;
243 gboolean default_length;
244
245 fbTemplateOptRec_t *metadata_rec;
250 void *tmpl_ctx;
254 fbTemplateCtxFree_fn ctx_free;
258 void *app_ctx;
259 };
260
267 void fBufRewind(
268 fBuf_t *fbuf);
269
281 gboolean fBufAppendTemplate(
282 fBuf_t *fbuf,
283 uint16_t tmpl_id,
284 fbTemplate_t *tmpl,
285 gboolean revoked,
286 GError **err);
287
288 #if HAVE_SPREAD
289
295 void fBufSetExportGroups(
296 fBuf_t *fbuf,
297 char **groups,
298 int num_groups,
299 GError **err);
300
301
302 #endif
303
309 void fBufRemoveTemplateTcplan(
310 fBuf_t *fbuf,
311 fbTemplate_t *tmpl);
312
317 void fBufSetSession(
318 fBuf_t *fbuf,
319 fbSession_t *session);
320
325 uint16_t fBufGetExportTemplate(
326 fBuf_t *fbuf);
327
328
333 uint16_t fBufGetInternalTemplate(
334 fBuf_t *fbuf);
335
343 uint32_t fbInfoElementHash(
344 fbInfoElement_t *ie);
345
354 gboolean fbInfoElementEqual(
355 const fbInfoElement_t *a,
356 const fbInfoElement_t *b);
357
365 void fbInfoElementDebug(
366 gboolean tmpl,
367 fbInfoElement_t *ie);
368
376 const fbInfoElement_t *fbInfoModelGetElement(
377 fbInfoModel_t *model,
378 fbInfoElement_t *ex_ie);
379
389 gboolean fbInfoElementCopyToTemplate(
390 fbInfoModel_t *model,
391 fbInfoElement_t *ex_ie,
392 fbInfoElement_t *tmpl_ie,
393 GError **err);
394
406 gboolean fbInfoElementCopyToTemplateByName(
407 fbInfoModel_t *model,
408 const char *name,
409 uint16_t len_override,
410 fbInfoElement_t *tmpl_ie,
411 GError **err);
412
421 const fbInfoElement_t *fbInfoModelAddAlienElement(
422 fbInfoModel_t *model,
423 fbInfoElement_t *ex_ie);
424
433 fbTemplate_t *fbInfoElementAllocTypeTemplate2(
434 fbInfoModel_t *model,
435 gboolean internal,
436 GError **err);
437
445 void fbTemplateRetain(
446 fbTemplate_t *tmpl);
447
455 void fbTemplateRelease(
456 fbTemplate_t *tmpl);
457
465 void fbTemplateFree(
466 fbTemplate_t *tmpl);
467
476 void fbTemplateDebug(
477 const char *label,
478 uint16_t tid,
479 fbTemplate_t *tmpl);
480
492 fbTemplate_t *fbTemplateAllocTemplateMetadataTmpl(
493 fbInfoModel_t *model,
494 gboolean internal,
495 GError **err);
496
509 void fbTemplateAddMetadataRecord(
510 fbTemplate_t *tmpl,
511 uint16_t tid,
512 const char *name,
513 const char *description);
514
521 fbNewTemplateCallback_fn fbSessionNewTemplateCallback(
522 fbSession_t *session);
523
531 void *fbSessionNewTemplateCallbackAppCtx(
532 fbSession_t *session);
533
540 fbSession_t *fbSessionClone(
541 fbSession_t *base);
542
550 uint32_t fbSessionGetSequence(
551 fbSession_t *session);
552
560 void fbSessionSetSequence(
561 fbSession_t *session,
562 uint32_t sequence);
563
571 void fbSessionSetTemplateBuffer(
572 fbSession_t *session,
573 fBuf_t *fbuf);
574
582 void fbSessionSetCollector(
583 fbSession_t *session,
584 fbCollector_t *collector);
585
586 #if HAVE_SPREAD
587
591 void fbSessionSetGroupParams(
592 fbSession_t *session,
593 sp_groupname_t *groups,
594 unsigned int num_groups);
595
601 void fbSessionSetPrivateGroup(
602 fbSession_t *session,
603 char *group,
604 char *privgroup);
605
610 void fbSessionSetGroup(
611 fbSession_t *session,
612 char *group);
613
618 unsigned int fbSessionGetGroupOffset(
619 fbSession_t *session,
620 char *group);
621
628 unsigned int fbSessionGetGroup(
629 fbSession_t *session);
630 #endif
631
638 void fbSessionClearIntTmplTableFlag(
639 fbSession_t *session);
640
647 void fbSessionClearExtTmplTableFlag(
648 fbSession_t *session);
649
656 int fbSessionIntTmplTableFlagIsSet(
657 fbSession_t *session);
658
665 int fbSessionExtTmplTableFlagIsSet(
666 fbSession_t *session);
667
676 gboolean fbConnSpecLookupAI(
677 fbConnSpec_t *spec,
678 gboolean passive,
679 GError **err);
680
689 gboolean fbConnSpecInitTLS(
690 fbConnSpec_t *spec,
691 gboolean passive,
692 GError **err);
693
701 fbConnSpec_t *fbConnSpecCopy(
702 fbConnSpec_t *spec);
703
711 void fbConnSpecFree(
712 fbConnSpec_t *spec);
713
714 #if HAVE_SPREAD
715
722 fbSpreadSpec_t *fbConnSpreadCopy(
723 fbSpreadParams_t *spec);
724
732 void fbConnSpreadFree(
733 fbSpreadSpec_t *spec);
734
743 const char * fbConnSpreadError(
744 int err );
745
746
756 void fbExporterSetGroupsToSend(
757 fbExporter_t *exporter,
758 char **groups,
759 int num_groups);
760
761
771 gboolean fbExporterCheckGroups(
772 fbExporter_t *exporter,
773 char **groups,
774 int num_groups);
775
776
777 #endif /* HAVE_SPREAD */
778
786 uint16_t fbExporterGetMTU(
787 fbExporter_t *exporter);
788
798 gboolean fbExportMessage(
799 fbExporter_t *exporter,
800 uint8_t *msgbase,
801 size_t msglen,
802 GError **err);
803
811 void fbExporterFree(
812 fbExporter_t *exporter);
813
821 void fbCollectorRemoveListenerLastBuf(
822 fBuf_t *fbuf,
823 fbCollector_t *collector);
824
836 fbCollector_t *fbCollectorAllocSocket(
837 fbListener_t *listener,
838 void *ctx,
839 int fd,
840 struct sockaddr *peer,
841 size_t peerlen,
842 GError **err);
843
855 fbCollector_t *fbCollectorAllocTLS(
856 fbListener_t *listener,
857 void *ctx,
858 int fd,
859 struct sockaddr *peer,
860 size_t peerlen,
861 GError **err);
862
872 gboolean fbCollectMessage(
873 fbCollector_t *collector,
874 uint8_t *msgbase,
875 size_t *msglen,
876 GError **err);
877
885 int fbCollectorGetFD(
886 fbCollector_t *collector);
887
894 void fbCollectorSetFD(
895 fbCollector_t *collector,
896 int fd);
897
905 void fbCollectorFree(
906 fbCollector_t *collector);
907
915 gboolean fbCollectorHasTranslator(
916 fbCollector_t *collector);
917
918
932 gboolean fbCollectMessageBuffer(
933 uint8_t *hdr,
934 size_t b_len,
935 size_t *m_len,
936 GError **err);
937
938
939 #if HAVE_SPREAD
940
947 gboolean fbCollectorTestGroupMembership(
948 fbCollector_t *collector,
949 int group_offset);
950
951 #endif
952
960 void fbListenerAppFree(
961 fbListener_t *listener,
962 void *ctx);
963
971 void fbListenerRemoveLastBuf(
972 fBuf_t *fbuf,
973 fbListener_t *listener);
974
982 void fbListenerRemove(
983 fbListener_t *listener,
984 int fd);
985
993 fbConnSpec_t *fbListenerGetConnSpec(
994 fbListener_t *listener);
995
1002 void fbCollectorInterruptSocket(
1003 fbCollector_t *collector);
1004
1009 gboolean fbListenerCallAppInit(
1010 fbListener_t *listener,
1011 fbUDPConnSpec_t *spec,
1012 GError **err);
1013
1019 fbSession_t *fbListenerSetPeerSession(
1020 fbListener_t *listener,
1021 fbSession_t *session);
1022
1023 #endif
fbCollectMessage
gboolean fbCollectMessage(fbCollector_t *collector, uint8_t *msgbase, size_t *msglen, GError **err)
fbCollectMessage
fbTemplateRelease
void fbTemplateRelease(fbTemplate_t *tmpl)
fbTemplateRelease
fbListenerSetPeerSession
fbSession_t * fbListenerSetPeerSession(fbListener_t *listener, fbSession_t *session)
Set the session on the fbuf and listener.
fbConnSpreadError
const char * fbConnSpreadError(int err)
fbConnSpreadError
fbUDPConnSpec_st::peerlen
size_t peerlen
size of peer
Definition: private.h:152
fbCollectorInterruptSocket
void fbCollectorInterruptSocket(fbCollector_t *collector)
Interrupt the socket for a given collector to stop it from reading more data.
fbInfoElementAllocTypeTemplate2
fbTemplate_t * fbInfoElementAllocTypeTemplate2(fbInfoModel_t *model, gboolean internal, GError **err)
fbInfoElementAllocTypeTemplate2
fbTemplate_st::ie_count
uint16_t ie_count
Count of information elements in template.
Definition: private.h:205
FB_IESPEC_NULL
#define FB_IESPEC_NULL
Convenience macro defining a null information element specification initializer (fbInfoElementSpec_t)...
Definition: public.h:1746
fbTemplateOptRec_t
struct fbTemplateOptRec_st fbTemplateOptRec_t
Template metadata options record structure.
fbUDPConnSpec_st::last_seen
time_t last_seen
last seen time
Definition: private.h:158
fbSessionIntTmplTableFlagIsSet
int fbSessionIntTmplTableFlagIsSet(fbSession_t *session)
fbSessionIntTmplTableFlagIsSet
fbInfoModelGetElement
const fbInfoElement_t * fbInfoModelGetElement(fbInfoModel_t *model, fbInfoElement_t *ex_ie)
fbInfoModelGetElement
fbTemplateOptRec_st::template_name
fbVarfield_t template_name
Template name.
Definition: private.h:187
fbTemplate_st
An IPFIX template or options template structure.
Definition: private.h:199
fbCollector_t
struct fbCollector_st fbCollector_t
IPFIX Collecting Process endpoint.
Definition: public.h:1894
fbExporter_t
struct fbExporter_st fbExporter_t
IPFIX Exporting Process endpoint.
Definition: public.h:1885
fbCollectorGetFD
int fbCollectorGetFD(fbCollector_t *collector)
fbCollectorGetFD
fbSession_t
struct fbSession_st fbSession_t
An IPFIX Transport Session state container.
Definition: public.h:1784
fbTemplate_st::off_cache
uint16_t * off_cache
Field offset cache.
Definition: private.h:236
fbListener_t
struct fbListener_st fbListener_t
IPFIX Collecting Process session listener.
Definition: public.h:1902
fbTemplate_st::ref_count
int ref_count
Reference count.
Definition: private.h:203
fBufSetExportGroups
void fBufSetExportGroups(fBuf_t *fbuf, char **groups, int num_groups, GError **err)
fBufSetExportGroups
fbSessionExtTmplTableFlagIsSet
int fbSessionExtTmplTableFlagIsSet(fbSession_t *session)
fbSessionExtTmplTableFlagIsSet
fbInfoElementHash
uint32_t fbInfoElementHash(fbInfoElement_t *ie)
fbInfoElementHash
fbUDPConnSpec_st::next
struct fbUDPConnSpec_st * next
link to next one in list
Definition: private.h:154
fbListenerCallAppInit
gboolean fbListenerCallAppInit(fbListener_t *listener, fbUDPConnSpec_t *spec, GError **err)
call appinit from UDP
fbTemplate_st::active
gboolean active
TRUE if this template has been activated (is no longer mutable)
Definition: private.h:238
fbSpreadSpec_st::write_lock
pthread_mutex_t write_lock
Spread write lock.
Definition: private.h:109
fBufAppendTemplate
gboolean fBufAppendTemplate(fBuf_t *fbuf, uint16_t tmpl_id, fbTemplate_t *tmpl, gboolean revoked, GError **err)
fBufAppendTemplate
fBufGetExportTemplate
uint16_t fBufGetExportTemplate(fBuf_t *fbuf)
fBufGetExportTemplate
fbInfoElementCopyToTemplateByName
gboolean fbInfoElementCopyToTemplateByName(fbInfoModel_t *model, const char *name, uint16_t len_override, fbInfoElement_t *tmpl_ie, GError **err)
fbInfoElementCopyToTemplateByName
fbCollectorRemoveListenerLastBuf
void fbCollectorRemoveListenerLastBuf(fBuf_t *fbuf, fbCollector_t *collector)
fbCollectorRemoveListenerLastBuf
fbConnSpecInitTLS
gboolean fbConnSpecInitTLS(fbConnSpec_t *spec, gboolean passive, GError **err)
fbConnSpecInitTLS
fbConnSpec_st
Connection specifier.
Definition: public.h:1820
fbTemplateCtxFree_fn
void(* fbTemplateCtxFree_fn)(void *tmpl_ctx, void *app_ctx)
A callback function that is called when a template is freed.
Definition: public.h:1950
fbTemplate_st::ie_ary
fbInfoElement_t ** ie_ary
Ordered array of pointers to information elements in this template.
Definition: private.h:232
fbInfoElementCopyToTemplate
gboolean fbInfoElementCopyToTemplate(fbInfoModel_t *model, fbInfoElement_t *ex_ie, fbInfoElement_t *tmpl_ie, GError **err)
fbInfoElementCopyToTemplate
fbSessionGetGroupOffset
unsigned int fbSessionGetGroupOffset(fbSession_t *session, char *group)
fbSessionGetGroupOffset
public.h
Fixbuf IPFIX protocol library public interface.
fbTemplateRetain
void fbTemplateRetain(fbTemplate_t *tmpl)
fbTemplateRetain
fbCollectorTestGroupMembership
gboolean fbCollectorTestGroupMembership(fbCollector_t *collector, int group_offset)
fbCollectorTestGroupMembership
fbTemplate_st::ie_internal_len
uint16_t ie_internal_len
Total length required to store this template in memory.
Definition: private.h:223
fbListenerRemove
void fbListenerRemove(fbListener_t *listener, int fd)
fbListenerRemove
fbTemplate_st::is_varlen
gboolean is_varlen
Set to TRUE if this template contains any variable length IEs.
Definition: private.h:230
fbSpreadParams_st
Spread connection parameters.
Definition: public.h:1866
fbConnSpecLookupAI
gboolean fbConnSpecLookupAI(fbConnSpec_t *spec, gboolean passive, GError **err)
fbConnSpecLookupAI
fbExportMessage
gboolean fbExportMessage(fbExporter_t *exporter, uint8_t *msgbase, size_t msglen, GError **err)
fbExportMessage
fbTemplate_st::ie_len
uint16_t ie_len
Total length of information elements in records described by this template.
Definition: private.h:217
fbSpreadSpec_st::session
fbSession_t * session
pointer to the session, this MUST be set to a valid session before the spec is passed to fbExporterAl...
Definition: private.h:92
FB_IE_VARLEN
#define FB_IE_VARLEN
Information element length constant for variable-length IE.
Definition: public.h:1438
fbTemplate_st::tmpl_ctx
void * tmpl_ctx
Template context.
Definition: private.h:250
fbSpreadSpec_st::recv_max_groups
int recv_max_groups
max size of group name array
Definition: private.h:121
fbSpreadSpec_st::mbox
mailbox mbox
the mailbox for the connection
Definition: private.h:105
fbUDPConnSpec_st
An UDP Connection specifier.
Definition: private.h:140
fbTemplateDebug
void fbTemplateDebug(const char *label, uint16_t tid, fbTemplate_t *tmpl)
fbTemplateDebug
fbUDPConnSpec_st::prev
struct fbUDPConnSpec_st * prev
doubly linked to timeout faster
Definition: private.h:156
fbCollectorFree
void fbCollectorFree(fbCollector_t *collector)
fbCollectorFree
fbSpreadSpec_st::num_groups
int num_groups
number of groups in groups
Definition: private.h:100
fbVarfield_st
A variable-length field value.
Definition: public.h:1180
fbInfoElement_st
A single IPFIX Information Element definition.
Definition: public.h:1612
fbSessionClone
fbSession_t * fbSessionClone(fbSession_t *base)
fbSessionClone
fbSpreadSpec_st::daemon
char * daemon
pointer to the daemon host address, in Spread format.
Definition: private.h:95
fbSessionNewTemplateCallbackAppCtx
void * fbSessionNewTemplateCallbackAppCtx(fbSession_t *session)
Return the callback function&#39;s application context for a given session.
fbUDPConnSpec_st::obdomain
uint32_t obdomain
with peer address this is the key
Definition: private.h:160
fbInfoModel_t
struct fbInfoModel_st fbInfoModel_t
An IPFIX information model.
Definition: public.h:1197
fbSpreadSpec_st::recv_err
GError * recv_err
GError for thread errors, set by receiver, read by main.
Definition: private.h:117
fbCollectorHasTranslator
gboolean fbCollectorHasTranslator(fbCollector_t *collector)
fbCollectorHasTranslator
fbSessionSetGroup
void fbSessionSetGroup(fbSession_t *session, char *group)
fbSessionSetGroup
fbListenerAppFree
void fbListenerAppFree(fbListener_t *listener, void *ctx)
fbListenerAppFree
fbSessionClearIntTmplTableFlag
void fbSessionClearIntTmplTableFlag(fbSession_t *session)
fbSessionClearIntTmplTableFlag
fbConnSpecFree
void fbConnSpecFree(fbConnSpec_t *spec)
fbConnSpecFree
fbUDPConnSpec_st::ctx
void * ctx
application context.
Definition: private.h:144
fBufRewind
void fBufRewind(fBuf_t *fbuf)
fBufRewind
fbConnSpreadFree
void fbConnSpreadFree(fbSpreadSpec_t *spec)
fbConnSpreadFree
fbTemplate_st::model
fbInfoModel_t * model
Information model (for looking up information elements by spec)
Definition: private.h:201
fbListenerRemoveLastBuf
void fbListenerRemoveLastBuf(fBuf_t *fbuf, fbListener_t *listener)
fbListenerRemoveLastBuf
fbTemplate_st::indices
GHashTable * indices
Map of information element to index in ie_ary.
Definition: private.h:234
fbTemplateAddMetadataRecord
void fbTemplateAddMetadataRecord(fbTemplate_t *tmpl, uint16_t tid, const char *name, const char *description)
Sets the metadata_rec member of tmpl to a newly allocated fbTemplateOptRec_t, and sets its template I...
fbSpreadSpec_st::recv_mbox
mailbox recv_mbox
the receiver&#39;s mailbox
Definition: private.h:113
fbSessionSetGroupParams
void fbSessionSetGroupParams(fbSession_t *session, sp_groupname_t *groups, unsigned int num_groups)
fbSessionSetGroupParams
fbSessionSetTemplateBuffer
void fbSessionSetTemplateBuffer(fbSession_t *session, fBuf_t *fbuf)
fbSessionSetTemplateBuffer
fbSpreadSpec_st::recv_groups
sp_groupname_t * recv_groups
groups array for SP_receive
Definition: private.h:125
fbUDPConnSpec_st::reject
gboolean reject
reject flag
Definition: private.h:162
fbExporterFree
void fbExporterFree(fbExporter_t *exporter)
fbExporterFree
fbTemplateOptRec_st
Template metadata options record structure.
Definition: private.h:182
fbCollectMessageBuffer
gboolean fbCollectMessageBuffer(uint8_t *hdr, size_t b_len, size_t *m_len, GError **err)
fbCollectMessageBuffer
fbInfoElementEqual
gboolean fbInfoElementEqual(const fbInfoElement_t *a, const fbInfoElement_t *b)
fbInfoElementEqual
fbExporterCheckGroups
gboolean fbExporterCheckGroups(fbExporter_t *exporter, char **groups, int num_groups)
fbExporterCheckGroups
fbCollectorSetFD
void fbCollectorSetFD(fbCollector_t *collector, int fd)
fbCollectorSetFD
fbSpreadSpec_st::recv_exit
int recv_exit
flag to tell the thread to exit
Definition: private.h:119
fbSpreadSpec_st::recv_mess
char * recv_mess
message buffer for receive
Definition: private.h:129
fbSpreadSpec_st::groups_to_send
sp_groupname_t * groups_to_send
groups to send to
Definition: private.h:102
fbTemplate_st::tmpl_len
uint16_t tmpl_len
Total length of the template record or options template record defining this template.
Definition: private.h:228
fbSessionGetSequence
uint32_t fbSessionGetSequence(fbSession_t *session)
fbSessionGetSequence
fbTemplate_st::ctx_free
fbTemplateCtxFree_fn ctx_free
Callback to free the ctx pointer when template is freed.
Definition: private.h:254
fbExporterGetMTU
uint16_t fbExporterGetMTU(fbExporter_t *exporter)
fbExporterGetMTU
fbSessionNewTemplateCallback
fbNewTemplateCallback_fn fbSessionNewTemplateCallback(fbSession_t *session)
Returns the callback function for a given session.
fbSpreadSpec_st::groups
sp_groupname_t * groups
pointer to array of group names, must have at least one, and must be null term array ...
Definition: private.h:98
fbConnSpecCopy
fbConnSpec_t * fbConnSpecCopy(fbConnSpec_t *spec)
fbConnSpecCopy
fbTemplateAllocTemplateMetadataTmpl
fbTemplate_t * fbTemplateAllocTemplateMetadataTmpl(fbInfoModel_t *model, gboolean internal, GError **err)
Allocates a new Template to describe a record that holds Template Metadata.
fbUDPConnSpec_st::session
fbSession_t * session
pointer to the session for this peer address
Definition: private.h:142
fbSessionClearExtTmplTableFlag
void fbSessionClearExtTmplTableFlag(fbSession_t *session)
fbSessionClearExtTmplTableFlag
fbCollectorAllocSocket
fbCollector_t * fbCollectorAllocSocket(fbListener_t *listener, void *ctx, int fd, struct sockaddr *peer, size_t peerlen, GError **err)
fbCollectorAllocSocket
fbTemplateOptRec_st::template_description
fbVarfield_t template_description
Template description (optional)
Definition: private.h:189
fbInfoElementDebug
void fbInfoElementDebug(gboolean tmpl, fbInfoElement_t *ie)
fbInfoElementDebug
sp_groupname_t
struct sp_groupname_st sp_groupname_t
sp_groupname_t
fbTemplateOptRec_st::template_id
uint16_t template_id
Template ID.
Definition: private.h:184
fbTemplate_st::app_ctx
void * app_ctx
The application&#39;s Context pointer for the ctx_free function.
Definition: private.h:258
fbCollectorAllocTLS
fbCollector_t * fbCollectorAllocTLS(fbListener_t *listener, void *ctx, int fd, struct sockaddr *peer, size_t peerlen, GError **err)
fbCollectorAllocTLS
fbSessionSetCollector
void fbSessionSetCollector(fbSession_t *session, fbCollector_t *collector)
fbSessionSetCollector
fbSpreadSpec_st::recv_num_groups
int recv_num_groups
actual size of group name array
Definition: private.h:123
fBuf_t
struct fBuf_st fBuf_t
An IPFIX message buffer.
Definition: public.h:1172
fbSpreadSpec_st::recv_thread
pthread_t recv_thread
the receiver thread
Definition: private.h:111
fbNewTemplateCallback_fn
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:1977
fbTemplateFree
void fbTemplateFree(fbTemplate_t *tmpl)
fbTemplateFree
fbSpreadSpec_st
fbSpreadSpec_t
Definition: private.h:89
fbInfoElementSpec_st
A single IPFIX Information Element specification.
Definition: public.h:1754
fbExporterSetGroupsToSend
void fbExporterSetGroupsToSend(fbExporter_t *exporter, char **groups, int num_groups)
fbExporterSetGroupToSend
fbInfoModelAddAlienElement
const fbInfoElement_t * fbInfoModelAddAlienElement(fbInfoModel_t *model, fbInfoElement_t *ex_ie)
fbInfoModelAddAlienElement
fBufGetInternalTemplate
uint16_t fBufGetInternalTemplate(fBuf_t *fbuf)
fBufGetInternalTemplate
fbConnSpreadCopy
fbSpreadSpec_t * fbConnSpreadCopy(fbSpreadParams_t *spec)
fbConnSpreadCopy
fbTemplate_st::default_length
gboolean default_length
TRUE if any field was created using an fbInfoElementSpec_t with a defaulted length.
Definition: private.h:243
fbSessionSetPrivateGroup
void fbSessionSetPrivateGroup(fbSession_t *session, char *group, char *privgroup)
fbSessionSetPrivateGroup
fbSpreadSpec_st::recv_max
int recv_max
length of message buffer
Definition: private.h:127
fbListenerGetConnSpec
fbConnSpec_t * fbListenerGetConnSpec(fbListener_t *listener)
fbListenerGetConnSpec
fbSpreadSpec_t
struct fbSpreadSpec_st fbSpreadSpec_t
fbSpreadSpec_t
fBufSetSession
void fBufSetSession(fBuf_t *fbuf, fbSession_t *session)
fBufSetSession
fbTemplate_st::scope_count
uint16_t scope_count
Count of scope information elements in template.
Definition: private.h:210
sp_groupname_st
sp_groupname_t
Definition: private.h:75
fbUDPConnSpec_t
struct fbUDPConnSpec_st fbUDPConnSpec_t
An UDP Connection specifier.
fbSessionSetSequence
void fbSessionSetSequence(fbSession_t *session, uint32_t sequence)
fbSessionSetSequence
fBufRemoveTemplateTcplan
void fBufRemoveTemplateTcplan(fBuf_t *fbuf, fbTemplate_t *tmpl)
fBufRemoveTemplateTcplan
fbSessionGetGroup
unsigned int fbSessionGetGroup(fbSession_t *session)
fbSessionGetGroup