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
71#define FB_SSL_ERR_BUFSIZ 512
72
73#if HAVE_SPREAD
74
78 typedef struct sp_groupname_st
79{
80 char name[MAX_GROUP_NAME];
81} sp_groupname_t;
82
84#define FB_SPREAD_NUM_GROUPS 16
85
87#define FB_SPREAD_MTU 8192
88
92 typedef struct fbSpreadSpec_st {
95 fbSession_t *session;
98 char * daemon;
101 sp_groupname_t *groups;
103 int num_groups;
105 sp_groupname_t *groups_to_send;
106 int num_groups_to_send;
108 mailbox mbox;
110 char privgroup[MAX_GROUP_NAME + 2];
112 pthread_mutex_t write_lock;
114 pthread_t recv_thread;
116 mailbox recv_mbox;
118 char recv_privgroup[MAX_GROUP_NAME + 2];
120 GError *recv_err;
122 int recv_exit;
124 int recv_max_groups;
126 int recv_num_groups;
128 sp_groupname_t *recv_groups;
130 int recv_max;
132 char *recv_mess;
133} fbSpreadSpec_t;
134
135#endif /* HAVE_SPREAD */
136
143 typedef struct fbUDPConnSpec_st {
145 fbSession_t *session;
147 void *ctx;
149 union {
150 struct sockaddr so;
151 struct sockaddr_in ip4;
152 struct sockaddr_in6 ip6;
153 } peer;
155 size_t peerlen;
157 struct fbUDPConnSpec_st *next;
159 struct fbUDPConnSpec_st *prev;
161 time_t last_seen;
163 uint32_t obdomain;
165 gboolean reject;
166} fbUDPConnSpec_t;
167
168
169#ifdef DEFINE_TEMPLATE_METADATA_SPEC
170/* Template metadata template */
171 static fbInfoElementSpec_t template_metadata_spec[] = {
172 {"templateId", 2, 0 },
173 {"paddingOctets", 6, 1 },
174 {"templateName", FB_IE_VARLEN, 0 },
175 {"templateDescription", FB_IE_VARLEN, 0 },
176 /* {"templateInformationElementList", FB_IE_VARLEN, 0 }, */
177 FB_IESPEC_NULL
178};
179#endif
180
185 typedef struct fbTemplateOptRec_st {
187 uint16_t template_id;
188 uint8_t template_padding[6];
190 fbVarfield_t template_name;
192 fbVarfield_t template_description;
194 /* fbSubTemplateList_t info_element_list; */
195} fbTemplateOptRec_t;
196
202 struct fbTemplate_st {
204 fbInfoModel_t *model;
206 int ref_count;
208 uint16_t ie_count;
213 uint16_t scope_count;
220 uint16_t ie_len;
226 uint16_t ie_internal_len;
231 uint16_t tmpl_len;
233 gboolean is_varlen;
235 fbInfoElement_t **ie_ary;
237 GHashTable *indices;
239 uint16_t *off_cache;
241 gboolean active;
246 gboolean default_length;
247
248 fbTemplateOptRec_t *metadata_rec;
253 void *tmpl_ctx;
257 fbTemplateCtxFree_fn ctx_free;
261 void *app_ctx;
262};
263
270 void fBufRewind(
271 fBuf_t *fbuf);
272
284gboolean fBufAppendTemplate(
285 fBuf_t *fbuf,
286 uint16_t tmpl_id,
287 fbTemplate_t *tmpl,
288 gboolean revoked,
289 GError **err);
290
291#if HAVE_SPREAD
298 void fBufSetExportGroups(
299 fBuf_t *fbuf,
300 char **groups,
301 int num_groups,
302 GError **err);
303
304
305#endif
306
312 void fBufRemoveTemplateTcplan(
313 fBuf_t *fbuf,
314 fbTemplate_t *tmpl);
315
320 void fBufSetSession(
321 fBuf_t *fbuf,
322 fbSession_t *session);
323
328uint16_t fBufGetExportTemplate(
329 fBuf_t *fbuf);
330
331
336uint16_t fBufGetInternalTemplate(
337 fBuf_t *fbuf);
338
346uint32_t fbInfoElementHash(
347 fbInfoElement_t *ie);
348
357gboolean fbInfoElementEqual(
358 const fbInfoElement_t *a,
359 const fbInfoElement_t *b);
360
368 void fbInfoElementDebug(
369 gboolean tmpl,
370 fbInfoElement_t *ie);
371
379 const fbInfoElement_t *fbInfoModelGetElement(
380 fbInfoModel_t *model,
381 fbInfoElement_t *ex_ie);
382
392gboolean fbInfoElementCopyToTemplate(
393 fbInfoModel_t *model,
394 fbInfoElement_t *ex_ie,
395 fbInfoElement_t *tmpl_ie,
396 GError **err);
397
409gboolean fbInfoElementCopyToTemplateByName(
410 fbInfoModel_t *model,
411 const char *name,
412 uint16_t len_override,
413 fbInfoElement_t *tmpl_ie,
414 GError **err);
415
424 const fbInfoElement_t *fbInfoModelAddAlienElement(
425 fbInfoModel_t *model,
426 fbInfoElement_t *ex_ie);
427
436 fbTemplate_t *fbInfoElementAllocTypeTemplate2(
437 fbInfoModel_t *model,
438 gboolean internal,
439 GError **err);
440
448 void fbTemplateRetain(
449 fbTemplate_t *tmpl);
450
458 void fbTemplateRelease(
459 fbTemplate_t *tmpl);
460
468 void fbTemplateFree(
469 fbTemplate_t *tmpl);
470
479 void fbTemplateDebug(
480 const char *label,
481 uint16_t tid,
482 fbTemplate_t *tmpl);
483
495 fbTemplate_t *fbTemplateAllocTemplateMetadataTmpl(
496 fbInfoModel_t *model,
497 gboolean internal,
498 GError **err);
499
512 void fbTemplateAddMetadataRecord(
513 fbTemplate_t *tmpl,
514 uint16_t tid,
515 const char *name,
516 const char *description);
517
524 fbNewTemplateCallback_fn fbSessionNewTemplateCallback(
525 fbSession_t *session);
526
534 void *fbSessionNewTemplateCallbackAppCtx(
535 fbSession_t *session);
536
543 fbSession_t *fbSessionClone(
544 fbSession_t *base);
545
553uint32_t fbSessionGetSequence(
554 fbSession_t *session);
555
563 void fbSessionSetSequence(
564 fbSession_t *session,
565 uint32_t sequence);
566
574 void fbSessionSetTemplateBuffer(
575 fbSession_t *session,
576 fBuf_t *fbuf);
577
585 void fbSessionSetCollector(
586 fbSession_t *session,
587 fbCollector_t *collector);
588
589#if HAVE_SPREAD
594 void fbSessionSetGroupParams(
595 fbSession_t *session,
596 sp_groupname_t *groups,
597 unsigned int num_groups);
598
604 void fbSessionSetPrivateGroup(
605 fbSession_t *session,
606 char *group,
607 char *privgroup);
608
613 void fbSessionSetGroup(
614 fbSession_t *session,
615 char *group);
616
621 unsigned int fbSessionGetGroupOffset(
622 fbSession_t *session,
623 char *group);
624
631 unsigned int fbSessionGetGroup(
632 fbSession_t *session);
633#endif
634
641 void fbSessionClearIntTmplTableFlag(
642 fbSession_t *session);
643
650 void fbSessionClearExtTmplTableFlag(
651 fbSession_t *session);
652
659 int fbSessionIntTmplTableFlagIsSet(
660 fbSession_t *session);
661
668 int fbSessionExtTmplTableFlagIsSet(
669 fbSession_t *session);
670
679gboolean fbConnSpecLookupAI(
680 fbConnSpec_t *spec,
681 gboolean passive,
682 GError **err);
683
692gboolean fbConnSpecInitTLS(
693 fbConnSpec_t *spec,
694 gboolean passive,
695 GError **err);
696
704 fbConnSpec_t *fbConnSpecCopy(
705 fbConnSpec_t *spec);
706
714 void fbConnSpecFree(
715 fbConnSpec_t *spec);
716
717#if HAVE_SPREAD
725 fbSpreadSpec_t *fbConnSpreadCopy(
726 fbSpreadParams_t *spec);
727
735 void fbConnSpreadFree(
736 fbSpreadSpec_t *spec);
737
746 const char * fbConnSpreadError(
747 int err );
748
749
759 void fbExporterSetGroupsToSend(
760 fbExporter_t *exporter,
761 char **groups,
762 int num_groups);
763
764
774gboolean fbExporterCheckGroups(
775 fbExporter_t *exporter,
776 char **groups,
777 int num_groups);
778
779
780#endif /* HAVE_SPREAD */
781
789uint16_t fbExporterGetMTU(
790 fbExporter_t *exporter);
791
801gboolean fbExportMessage(
802 fbExporter_t *exporter,
803 uint8_t *msgbase,
804 size_t msglen,
805 GError **err);
806
814 void fbExporterFree(
815 fbExporter_t *exporter);
816
824 void fbCollectorRemoveListenerLastBuf(
825 fBuf_t *fbuf,
826 fbCollector_t *collector);
827
839 fbCollector_t *fbCollectorAllocSocket(
840 fbListener_t *listener,
841 void *ctx,
842 int fd,
843 struct sockaddr *peer,
844 size_t peerlen,
845 GError **err);
846
858 fbCollector_t *fbCollectorAllocTLS(
859 fbListener_t *listener,
860 void *ctx,
861 int fd,
862 struct sockaddr *peer,
863 size_t peerlen,
864 GError **err);
865
875gboolean fbCollectMessage(
876 fbCollector_t *collector,
877 uint8_t *msgbase,
878 size_t *msglen,
879 GError **err);
880
888 int fbCollectorGetFD(
889 fbCollector_t *collector);
890
897 void fbCollectorSetFD(
898 fbCollector_t *collector,
899 int fd);
900
908 void fbCollectorFree(
909 fbCollector_t *collector);
910
918gboolean fbCollectorHasTranslator(
919 fbCollector_t *collector);
920
921
935gboolean fbCollectMessageBuffer(
936 uint8_t *hdr,
937 size_t b_len,
938 size_t *m_len,
939 GError **err);
940
941
942#if HAVE_SPREAD
950gboolean fbCollectorTestGroupMembership(
951 fbCollector_t *collector,
952 int group_offset);
953
954#endif
955
963 void fbListenerAppFree(
964 fbListener_t *listener,
965 void *ctx);
966
974 void fbListenerRemoveLastBuf(
975 fBuf_t *fbuf,
976 fbListener_t *listener);
977
985 void fbListenerRemove(
986 fbListener_t *listener,
987 int fd);
988
996 fbConnSpec_t *fbListenerGetConnSpec(
997 fbListener_t *listener);
998
1005 void fbCollectorInterruptSocket(
1006 fbCollector_t *collector);
1007
1012gboolean fbListenerCallAppInit(
1013 fbListener_t *listener,
1014 fbUDPConnSpec_t *spec,
1015 GError **err);
1016
1022 fbSession_t *fbListenerSetPeerSession(
1023 fbListener_t *listener,
1024 fbSession_t *session);
1025
1026#endif
fbTemplate_st::tmpl_ctx
void * tmpl_ctx
Template context.
Definition private.h:253
fbSessionNewTemplateCallback
fbNewTemplateCallback_fn fbSessionNewTemplateCallback(fbSession_t *session)
Returns the callback function for a given session.
fbSessionSetCollector
void fbSessionSetCollector(fbSession_t *session, fbCollector_t *collector)
fbSessionSetCollector
fbSessionGetGroup
unsigned int fbSessionGetGroup(fbSession_t *session)
fbSessionGetGroup
fbListenerGetConnSpec
fbConnSpec_t * fbListenerGetConnSpec(fbListener_t *listener)
fbListenerGetConnSpec
fbSessionGetSequence
uint32_t fbSessionGetSequence(fbSession_t *session)
fbSessionGetSequence
fbUDPConnSpec_st::next
struct fbUDPConnSpec_st * next
link to next one in list
Definition private.h:157
fbSpreadSpec_st::recv_thread
pthread_t recv_thread
the receiver thread
Definition private.h:114
fbCollectorGetFD
int fbCollectorGetFD(fbCollector_t *collector)
fbCollectorGetFD
fbUDPConnSpec_st::ctx
void * ctx
application context.
Definition private.h:147
fbSpreadSpec_st::daemon
char * daemon
pointer to the daemon host address, in Spread format.
Definition private.h:98
fbSessionClearIntTmplTableFlag
void fbSessionClearIntTmplTableFlag(fbSession_t *session)
fbSessionClearIntTmplTableFlag
fbSessionSetGroup
void fbSessionSetGroup(fbSession_t *session, char *group)
fbSessionSetGroup
fBufRewind
void fBufRewind(fBuf_t *fbuf)
fBufRewind
fbTemplateOptRec_st::template_description
fbVarfield_t template_description
Template description (optional)
Definition private.h:192
fbExporterCheckGroups
gboolean fbExporterCheckGroups(fbExporter_t *exporter, char **groups, int num_groups)
fbExporterCheckGroups
fbCollectorAllocSocket
fbCollector_t * fbCollectorAllocSocket(fbListener_t *listener, void *ctx, int fd, struct sockaddr *peer, size_t peerlen, GError **err)
fbCollectorAllocSocket
fbInfoElementEqual
gboolean fbInfoElementEqual(const fbInfoElement_t *a, const fbInfoElement_t *b)
fbInfoElementEqual
fbSessionExtTmplTableFlagIsSet
int fbSessionExtTmplTableFlagIsSet(fbSession_t *session)
fbSessionExtTmplTableFlagIsSet
fbTemplateRelease
void fbTemplateRelease(fbTemplate_t *tmpl)
fbTemplateRelease
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::reject
gboolean reject
reject flag
Definition private.h:165
fbSpreadSpec_st::privgroup
char privgroup[MAX_GROUP_NAME+2]
the connection private name
Definition private.h:110
fbSpreadSpec_st::recv_max_groups
int recv_max_groups
max size of group name array
Definition private.h:124
fbTemplateFree
void fbTemplateFree(fbTemplate_t *tmpl)
fbTemplateFree
fbSessionSetPrivateGroup
void fbSessionSetPrivateGroup(fbSession_t *session, char *group, char *privgroup)
fbSessionSetPrivateGroup
fbUDPConnSpec_st::peerlen
size_t peerlen
size of peer
Definition private.h:155
fbSpreadSpec_st::mbox
mailbox mbox
the mailbox for the connection
Definition private.h:108
fbTemplate_st::indices
GHashTable * indices
Map of information element to index in ie_ary.
Definition private.h:237
fbTemplateOptRec_st::template_id
uint16_t template_id
Template ID.
Definition private.h:187
fbListenerRemoveLastBuf
void fbListenerRemoveLastBuf(fBuf_t *fbuf, fbListener_t *listener)
fbListenerRemoveLastBuf
fbTemplate_st::off_cache
uint16_t * off_cache
Field offset cache.
Definition private.h:239
fBufSetSession
void fBufSetSession(fBuf_t *fbuf, fbSession_t *session)
fBufSetSession
fbConnSpreadFree
void fbConnSpreadFree(fbSpreadSpec_t *spec)
fbConnSpreadFree
fbExporterSetGroupsToSend
void fbExporterSetGroupsToSend(fbExporter_t *exporter, char **groups, int num_groups)
fbExporterSetGroupToSend
fbInfoModelGetElement
const fbInfoElement_t * fbInfoModelGetElement(fbInfoModel_t *model, fbInfoElement_t *ex_ie)
fbInfoModelGetElement
fbConnSpecInitTLS
gboolean fbConnSpecInitTLS(fbConnSpec_t *spec, gboolean passive, GError **err)
fbConnSpecInitTLS
fbUDPConnSpec_st::prev
struct fbUDPConnSpec_st * prev
doubly linked to timeout faster
Definition private.h:159
fbSessionClearExtTmplTableFlag
void fbSessionClearExtTmplTableFlag(fbSession_t *session)
fbSessionClearExtTmplTableFlag
fbCollectorInterruptSocket
void fbCollectorInterruptSocket(fbCollector_t *collector)
Interrupt the socket for a given collector to stop it from reading more data.
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...
fbTemplate_st::tmpl_len
uint16_t tmpl_len
Total length of the template record or options template record defining this template.
Definition private.h:231
fbSpreadSpec_st::recv_privgroup
char recv_privgroup[MAX_GROUP_NAME+2]
the connection private name for the receiver
Definition private.h:118
fbConnSpecLookupAI
gboolean fbConnSpecLookupAI(fbConnSpec_t *spec, gboolean passive, GError **err)
fbConnSpecLookupAI
fbTemplate_st::default_length
gboolean default_length
TRUE if any field was created using an fbInfoElementSpec_t with a defaulted length.
Definition private.h:246
fbTemplate_st::ie_ary
fbInfoElement_t ** ie_ary
Ordered array of pointers to information elements in this template.
Definition private.h:235
fbConnSpreadError
const char * fbConnSpreadError(int err)
fbConnSpreadError
fbInfoElementAllocTypeTemplate2
fbTemplate_t * fbInfoElementAllocTypeTemplate2(fbInfoModel_t *model, gboolean internal, GError **err)
fbInfoElementAllocTypeTemplate2
fbTemplateRetain
void fbTemplateRetain(fbTemplate_t *tmpl)
fbTemplateRetain
sp_groupname_t
struct sp_groupname_st sp_groupname_t
sp_groupname_t
fbTemplate_st::app_ctx
void * app_ctx
The application's Context pointer for the ctx_free function.
Definition private.h:261
fbCollectMessageBuffer
gboolean fbCollectMessageBuffer(uint8_t *hdr, size_t b_len, size_t *m_len, GError **err)
fbCollectMessageBuffer
fbTemplate_st::ie_count
uint16_t ie_count
Count of information elements in template.
Definition private.h:208
fbUDPConnSpec_t
struct fbUDPConnSpec_st fbUDPConnSpec_t
An UDP Connection specifier.
fbSessionGetGroupOffset
unsigned int fbSessionGetGroupOffset(fbSession_t *session, char *group)
fbSessionGetGroupOffset
fbCollectMessage
gboolean fbCollectMessage(fbCollector_t *collector, uint8_t *msgbase, size_t *msglen, GError **err)
fbCollectMessage
fbTemplate_st::is_varlen
gboolean is_varlen
Set to TRUE if this template contains any variable length IEs.
Definition private.h:233
fbSpreadSpec_st::recv_err
GError * recv_err
GError for thread errors, set by receiver, read by main.
Definition private.h:120
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:95
fbCollectorAllocTLS
fbCollector_t * fbCollectorAllocTLS(fbListener_t *listener, void *ctx, int fd, struct sockaddr *peer, size_t peerlen, GError **err)
fbCollectorAllocTLS
fbCollectorHasTranslator
gboolean fbCollectorHasTranslator(fbCollector_t *collector)
fbCollectorHasTranslator
fbSessionIntTmplTableFlagIsSet
int fbSessionIntTmplTableFlagIsSet(fbSession_t *session)
fbSessionIntTmplTableFlagIsSet
fbUDPConnSpec_st::peer
union fbUDPConnSpec_st::@0 peer
key to this conn spec
fBufSetExportGroups
void fBufSetExportGroups(fBuf_t *fbuf, char **groups, int num_groups, GError **err)
fBufSetExportGroups
fbTemplate_st::ref_count
int ref_count
Reference count.
Definition private.h:206
fbUDPConnSpec_st::obdomain
uint32_t obdomain
with peer address this is the key
Definition private.h:163
fbTemplateOptRec_t
struct fbTemplateOptRec_st fbTemplateOptRec_t
Template metadata options record structure.
fbSpreadSpec_st::groups_to_send
sp_groupname_t * groups_to_send
groups to send to
Definition private.h:105
fbInfoElementCopyToTemplateByName
gboolean fbInfoElementCopyToTemplateByName(fbInfoModel_t *model, const char *name, uint16_t len_override, fbInfoElement_t *tmpl_ie, GError **err)
fbInfoElementCopyToTemplateByName
fbTemplate_st::ie_internal_len
uint16_t ie_internal_len
Total length required to store this template in memory.
Definition private.h:226
fbSpreadSpec_st::recv_exit
int recv_exit
flag to tell the thread to exit
Definition private.h:122
fbTemplate_st::active
gboolean active
TRUE if this template has been activated (is no longer mutable)
Definition private.h:241
fbTemplate_st::ie_len
uint16_t ie_len
Total length of information elements in records described by this template.
Definition private.h:220
fbSessionSetSequence
void fbSessionSetSequence(fbSession_t *session, uint32_t sequence)
fbSessionSetSequence
fbCollectorSetFD
void fbCollectorSetFD(fbCollector_t *collector, int fd)
fbCollectorSetFD
fBufAppendTemplate
gboolean fBufAppendTemplate(fBuf_t *fbuf, uint16_t tmpl_id, fbTemplate_t *tmpl, gboolean revoked, GError **err)
fBufAppendTemplate
fbInfoElementCopyToTemplate
gboolean fbInfoElementCopyToTemplate(fbInfoModel_t *model, fbInfoElement_t *ex_ie, fbInfoElement_t *tmpl_ie, GError **err)
fbInfoElementCopyToTemplate
fbListenerAppFree
void fbListenerAppFree(fbListener_t *listener, void *ctx)
fbListenerAppFree
fbListenerSetPeerSession
fbSession_t * fbListenerSetPeerSession(fbListener_t *listener, fbSession_t *session)
Set the session on the fbuf and listener.
fbTemplate_st::model
fbInfoModel_t * model
Information model (for looking up information elements by spec)
Definition private.h:204
fbExportMessage
gboolean fbExportMessage(fbExporter_t *exporter, uint8_t *msgbase, size_t msglen, GError **err)
fbExportMessage
fbTemplate_st::scope_count
uint16_t scope_count
Count of scope information elements in template.
Definition private.h:213
fbSpreadSpec_st::recv_groups
sp_groupname_t * recv_groups
groups array for SP_receive
Definition private.h:128
fbSessionSetGroupParams
void fbSessionSetGroupParams(fbSession_t *session, sp_groupname_t *groups, unsigned int num_groups)
fbSessionSetGroupParams
fbSpreadSpec_st::recv_mbox
mailbox recv_mbox
the receiver's mailbox
Definition private.h:116
fbSpreadSpec_st::recv_mess
char * recv_mess
message buffer for receive
Definition private.h:132
fbInfoElementDebug
void fbInfoElementDebug(gboolean tmpl, fbInfoElement_t *ie)
fbInfoElementDebug
fbSpreadSpec_st::recv_max
int recv_max
length of message buffer
Definition private.h:130
fbInfoModelAddAlienElement
const fbInfoElement_t * fbInfoModelAddAlienElement(fbInfoModel_t *model, fbInfoElement_t *ex_ie)
fbInfoModelAddAlienElement
fbCollectorRemoveListenerLastBuf
void fbCollectorRemoveListenerLastBuf(fBuf_t *fbuf, fbCollector_t *collector)
fbCollectorRemoveListenerLastBuf
fbSpreadSpec_st::recv_num_groups
int recv_num_groups
actual size of group name array
Definition private.h:126
fbSpreadSpec_t
struct fbSpreadSpec_st fbSpreadSpec_t
fbSpreadSpec_t
fbListenerCallAppInit
gboolean fbListenerCallAppInit(fbListener_t *listener, fbUDPConnSpec_t *spec, GError **err)
call appinit from UDP
fbTemplateDebug
void fbTemplateDebug(const char *label, uint16_t tid, fbTemplate_t *tmpl)
fbTemplateDebug
fbExporterFree
void fbExporterFree(fbExporter_t *exporter)
fbExporterFree
fBufGetExportTemplate
uint16_t fBufGetExportTemplate(fBuf_t *fbuf)
fBufGetExportTemplate
fBufGetInternalTemplate
uint16_t fBufGetInternalTemplate(fBuf_t *fbuf)
fBufGetInternalTemplate
fbSessionClone
fbSession_t * fbSessionClone(fbSession_t *base)
fbSessionClone
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:101
fbSpreadSpec_st::num_groups
int num_groups
number of groups in groups
Definition private.h:103
fbTemplate_st::ctx_free
fbTemplateCtxFree_fn ctx_free
Callback to free the ctx pointer when template is freed.
Definition private.h:257
fbCollectorFree
void fbCollectorFree(fbCollector_t *collector)
fbCollectorFree
fbUDPConnSpec_st::last_seen
time_t last_seen
last seen time
Definition private.h:161
fbSessionNewTemplateCallbackAppCtx
void * fbSessionNewTemplateCallbackAppCtx(fbSession_t *session)
Return the callback function's application context for a given session.
fbConnSpecCopy
fbConnSpec_t * fbConnSpecCopy(fbConnSpec_t *spec)
fbConnSpecCopy
fbCollectorTestGroupMembership
gboolean fbCollectorTestGroupMembership(fbCollector_t *collector, int group_offset)
fbCollectorTestGroupMembership
fbUDPConnSpec_st::session
fbSession_t * session
pointer to the session for this peer address
Definition private.h:145
fbSessionSetTemplateBuffer
void fbSessionSetTemplateBuffer(fbSession_t *session, fBuf_t *fbuf)
fbSessionSetTemplateBuffer
fBufRemoveTemplateTcplan
void fBufRemoveTemplateTcplan(fBuf_t *fbuf, fbTemplate_t *tmpl)
fBufRemoveTemplateTcplan
fbTemplateOptRec_st::template_name
fbVarfield_t template_name
Template name.
Definition private.h:190
fbExporterGetMTU
uint16_t fbExporterGetMTU(fbExporter_t *exporter)
fbExporterGetMTU
fbListenerRemove
void fbListenerRemove(fbListener_t *listener, int fd)
fbListenerRemove
fbConnSpecFree
void fbConnSpecFree(fbConnSpec_t *spec)
fbConnSpecFree
fbSpreadSpec_st::write_lock
pthread_mutex_t write_lock
Spread write lock.
Definition private.h:112
fbInfoElementHash
uint32_t fbInfoElementHash(fbInfoElement_t *ie)
fbInfoElementHash
fbConnSpreadCopy
fbSpreadSpec_t * fbConnSpreadCopy(fbSpreadParams_t *spec)
fbConnSpreadCopy
fbSpreadSpec_st
fbSpreadSpec_t
Definition private.h:92
fbTemplate_st
An IPFIX template or options template structure.
Definition private.h:202
fbTemplateOptRec_st
Template metadata options record structure.
Definition private.h:185
fbUDPConnSpec_st
An UDP Connection specifier.
Definition private.h:143
sp_groupname_st
sp_groupname_t
Definition private.h:79
public.h
Fixbuf IPFIX protocol library public interface.
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:2005
fbExporter_t
struct fbExporter_st fbExporter_t
IPFIX Exporting Process endpoint.
Definition public.h:1941
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:2031
fbListener_t
struct fbListener_st fbListener_t
IPFIX Collecting Process session listener.
Definition public.h:1958
fbInfoModel_t
struct fbInfoModel_st fbInfoModel_t
An IPFIX information model.
Definition public.h:1253
fbSession_t
struct fbSession_st fbSession_t
An IPFIX Transport Session state container.
Definition public.h:1840
fBuf_t
struct fBuf_st fBuf_t
An IPFIX message buffer.
Definition public.h:1228
fbCollector_t
struct fbCollector_st fbCollector_t
IPFIX Collecting Process endpoint.
Definition public.h:1950
FB_IE_VARLEN
#define FB_IE_VARLEN
Information element length constant for variable-length IE.
Definition public.h:1494
FB_IESPEC_NULL
#define FB_IESPEC_NULL
Convenience macro defining a null information element specification initializer (fbInfoElementSpec_t)...
Definition public.h:1802
fbConnSpec_st
Connection specifier.
Definition public.h:1876
fbInfoElement_st
A single IPFIX Information Element definition.
Definition public.h:1668
fbInfoElementSpec_st
A single IPFIX Information Element specification.
Definition public.h:1810
fbSpreadParams_st
Spread connection parameters.
Definition public.h:1922
fbVarfield_st
A variable-length field value.
Definition public.h:1236