Go to the documentation of this file.
21 #ifndef _FB_PRIVATE_H_
22 #define _FB_PRIVATE_H_
27 #define IPFIX_ENTERPRISE_BIT 0x8000
31 #define FB_MSGLEN_MAX 65535
34 #define FB_SSL_ERR_BUFSIZ 512
50 struct sockaddr_in ip4;
51 struct sockaddr_in6 ip6;
348 uint16_t len_override,
375 uint32_t enterprise_id,
377 uint16_t len_override,
468 unsigned int mdRecVersion,
912 struct sockaddr *peer,
932 struct sockaddr *peer,
struct fbCollector_st fbCollector_t
IPFIX Collecting Process endpoint.
Definition: public.h:2036
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:2118
void fbSessionSetCollector(fbSession_t *session, fbCollector_t *collector)
fbSessionSetCollector
uint16_t * positions
The list of positions; resized as needed.
Definition: private.h:100
void fBufSetSession(fBuf_t *fbuf, fbSession_t *session)
fBufSetSession
uint16_t scope_count
Count of scope information elements in template.
Definition: private.h:125
struct fbElementPositions_st fbElementPositions_t
fbElementPositions_t supports a variable-sized array that is used to store the index positions of a p...
A single IPFIX Information Element definition.
Definition: public.h:793
uint16_t fBufGetInternalTemplate(const fBuf_t *fbuf)
fBufGetInternalTemplate
void fbTemplateInfoSetTemplateId(fbTemplateInfo_t *mdInfo, uint16_t tid)
fbTemplateInfoSetTemplateId
void fbCollectorInterruptSocket(fbCollector_t *collector)
Interrupt the socket for a given collector to stop it from reading more data.
gboolean fbInfoElementCopyToTemplateByIdent(const fbInfoModel_t *model, uint32_t enterprise_id, uint16_t element_id, uint16_t len_override, fbTemplateField_t *tmpl_ie, GError **err)
fbInfoElementCopyToTemplateByIdent
int ref_count
Reference count.
Definition: private.h:118
fbConnSpec_t * fbListenerGetConnSpec(const fbListener_t *listener)
fbListenerGetConnSpec
int fbSessionExtTmplTableFlagIsSet(fbSession_t *session)
fbSessionExtTmplTableFlagIsSet
fbElementPositions_t stml
Index positions of the FB_SUB_TMPL_MULTI_LIST elements.
Definition: private.h:186
void fbTemplateDebug(const char *label, uint16_t tid, const fbTemplate_t *tmpl)
fbTemplateDebug
fbElementPositions_t supports a variable-sized array that is used to store the index positions of a p...
Definition: private.h:96
size_t peerlen
size of peer
Definition: private.h:54
void fbCollectorRemoveListenerLastBuf(fBuf_t *fbuf, fbCollector_t *collector)
fbCollectorRemoveListenerLastBuf
gboolean active
TRUE if this template has been activated (is no longer mutable).
Definition: private.h:155
fbTemplateField_t represents an fbInfoElement_t that has been added to an fbTemplate_t.
Definition: public.h:1037
gboolean fBufAppendTemplate(fBuf_t *fbuf, uint16_t tmpl_id, const fbTemplate_t *tmpl, gboolean revoked, GError **err)
fBufAppendTemplate
gboolean fbSessionAddInternalRfc5610Template(fbSession_t *session, GError **err)
fbSessionAddInternalRfc5610Template
int fbSessionIntTmplTableFlagIsSet(fbSession_t *session)
fbSessionIntTmplTableFlagIsSet
fbVarfield_t name
Template name.
Definition: private.h:84
An IPFIX template or options template structure.
Definition: private.h:108
fbElementPositions_t bl
Index positions of the FB_BASIC_LIST elements.
Definition: private.h:178
uint16_t fBufGetExportTemplate(const fBuf_t *fbuf)
fBufGetExportTemplate
An UDP Connection specifier.
Definition: private.h:42
void fbTemplateRetain(fbTemplate_t *tmpl)
fbTemplateRetain
uint16_t * off_cache
Field offset cache.
Definition: private.h:116
struct fBuf_st fBuf_t
An IPFIX message buffer.
Definition: public.h:129
Fixbuf IPFIX protocol library public interface.
void fbSessionSaveTemplateInfo(fbSession_t *session, fbTemplateInfo_t *mdInfo)
fbSessionSaveTemplateInfo
void fbInfoElementDebug(gboolean tmpl, const fbInfoElement_t *ie)
fbInfoElementDebug
gboolean fbSessionAddInternalTemplateInfoTemplate(fbSession_t *session, GError **err)
fbSessionAddInternalTemplateInfoTemplate
gboolean fbSessionGetTemplatePair(const fbSession_t *session, uint16_t ext_tid, uint16_t *int_tid, fbTemplate_t **ext_tmpl, fbTemplate_t **int_tmpl, GError **err)
Checks for a template pair and finds the associated external and internal templates.
fbNewTemplateCallback_fn fbSessionGetNewTemplateCallback(const fbSession_t *session)
Returns the callback function for a given session.
fbConnSpec_t * fbConnSpecCopy(const fbConnSpec_t *spec)
fbConnSpecCopy
gboolean fbListenerCallAppInit(fbListener_t *listener, fbUDPConnSpec_t *spec, GError **err)
call appinit from UDP
fbSession_t * fbSessionClone(const fbSession_t *base)
fbSessionClone
uint16_t ie_internal_len
Total length required to store this template in memory.
Definition: private.h:138
gboolean fbInfoElementCopyToTemplateByName(const fbInfoModel_t *model, const char *name, uint16_t len_override, fbTemplateField_t *tmpl_ie, GError **err)
fbInfoElementCopyToTemplateByName
struct fbInfoModel_st fbInfoModel_t
An IPFIX information model.
Definition: public.h:154
fbTemplate_t * fbSessionGetInternalTemplateInfoTemplate(fbSession_t *session, uint16_t *tid, GError **err)
fbSessionGetInternalTemplateInfoTemplate
union fbUDPConnSpec_st::@0 peer
key to this conn spec
struct fbUDPConnSpec_st * next
link to next one in list
Definition: private.h:56
Connection specifier.
Definition: public.h:1697
gboolean fbExportMessage(fbExporter_t *exporter, uint8_t *msgbase, size_t msglen, GError **err)
fbExportMessage
void fbSessionClearIntTmplTableFlag(fbSession_t *session)
fbSessionClearIntTmplTableFlag
fbSubTemplateList_t blInfoList
List of PEN, IE num pairs.
Definition: private.h:88
void * ctx
application context.
Definition: private.h:46
struct fbUDPConnSpec_st * prev
doubly linked to timeout faster
Definition: private.h:58
int fbCollectorGetFD(const fbCollector_t *collector)
fbCollectorGetFD
void fbConnSpecFree(fbConnSpec_t *spec)
fbConnSpecFree
void fbCollectorFree(fbCollector_t *collector)
fbCollectorFree
fbTemplateField_t ** ie_ary
Ordered array of pointers to information elements in this template.
Definition: private.h:112
void * fbSessionGetNewTemplateCallbackAppCtx(const fbSession_t *session)
Returns the callback function's application context for a given session.
fbSubTemplateList_t provides the internal representation of an fbInfoElement_t of type subTemplateLis...
Definition: public.h:2521
gboolean is_varlen
TRUE if this template contains any variable length IEs.
Definition: private.h:147
fbInfoModel_t * model
Information model (for looking up information elements by spec)
Definition: private.h:110
gboolean fbCollectorHasTranslator(fbCollector_t *collector)
fbCollectorHasTranslator
A variable-length field value.
Definition: public.h:137
fbTemplateInfo_t * fbTemplateInfoCreateFromRecord(const fbTemplateInfoRecord_t *mdRec, unsigned int mdRecVersion, GError **err)
fbTemplateInfoCreateFromRecord
void fbListenerRemoveLastBuf(fBuf_t *fbuf, fbListener_t *listener)
fbListenerRemoveLastBuf
uint16_t ie_len
Total length of information elements in records described by this template.
Definition: private.h:132
struct fbTemplateInfo_st fbTemplateInfo_t
fbTemplateInfo_t describes an fbTemplate_t.
Definition: public.h:1732
gboolean fbInfoElementEqual(const fbInfoElement_t *a, const fbInfoElement_t *b)
fbInfoElementEqual
void fbSessionSetTemplatePairsDisabled(fbSession_t *session, gboolean disabled)
Sets the flag on a Session that says whether the template-pairs lookup table should be ignored.
void fbSessionSetTemplateBuffer(fbSession_t *session, fBuf_t *fbuf)
fbSessionSetTemplateBuffer
gboolean fbConnSpecInitTLS(fbConnSpec_t *spec, gboolean passive, GError **err)
fbConnSpecInitTLS
fbTemplate_t * fbSessionGetInternalRfc5610Template(fbSession_t *session, uint16_t *tid, GError **err)
fbSessionGetInternalRfc5610Template
void fBufRewind(fBuf_t *fbuf)
fBufRewind
void fbListenerRemove(fbListener_t *listener, int fd)
fbListenerRemove
uint32_t fbInfoElementHash(const fbInfoElement_t *ie)
fbInfoElementHash
void fbTemplateInfoFillRecord(const fbTemplateInfo_t *mdInfo, fbTemplateInfoRecord_t *mdRec, const fbTemplate_t *stlTemplate, uint16_t stlTid)
fbTemplateInfoFillRecord
void * tmpl_ctx
Template context.
Definition: private.h:165
TemplateInfo options record structure.
Definition: private.h:77
gboolean fbConnSpecLookupAI(fbConnSpec_t *spec, gboolean passive, GError **err)
fbConnSpecLookupAI
const fbInfoElement_t * fbInfoModelAddAlienElement(fbInfoModel_t *model, const fbInfoElement_t *ex_ie)
fbInfoModelAddAlienElement
void fbCollectorSetFD(fbCollector_t *collector, int fd)
fbCollectorSetFD
gboolean fbInfoModelIsTemplateElementType(const fbTemplate_t *tmpl)
fbInfoModelIsTemplateElementType
fbCollector_t * fbCollectorAllocSocket(fbListener_t *listener, void *ctx, int fd, struct sockaddr *peer, size_t peerlen, GError **err)
fbCollectorAllocSocket
fbVarfield_t description
Template description (optional)
Definition: private.h:86
uint16_t fbExporterGetMTU(const fbExporter_t *exporter)
fbExporterGetMTU
struct fbListener_st fbListener_t
IPFIX Collecting Process session listener.
Definition: public.h:2044
uint32_t obdomain
with peer address this is the key
Definition: private.h:62
GHashTable * indices
Map of information element to index in ie_ary.
Definition: private.h:114
fbCollector_t * fbCollectorAllocTLS(fbListener_t *listener, void *ctx, int fd, struct sockaddr *peer, size_t peerlen, GError **err)
fbCollectorAllocTLS
fbElementPositions_t stl
Index positions of the FB_SUB_TMPL_LIST elements.
Definition: private.h:182
uint16_t tid
Template ID.
Definition: private.h:79
struct fbUDPConnSpec_st fbUDPConnSpec_t
An UDP Connection specifier.
void fbListenerAppFree(fbListener_t *listener, void *ctx)
fbListenerAppFree
gboolean fbTemplateAllocTemplateInfoTemplates(fbInfoModel_t *model, fbTemplate_t **tmplinfo_v3_tmpl, fbTemplate_t **bl_ie_metadata_tmpl, GError **err)
Allocates new Templates to describe records that hold TemplateInfo.
void fbExporterFree(fbExporter_t *exporter)
fbExporterFree
gboolean default_length
TRUE if any field was created using an fbInfoElementSpec_t with a defaulted length.
Definition: private.h:160
uint16_t tmpl_len
Total length of the template record or options template record defining this template.
Definition: private.h:143
gboolean contains_list
TRUE if this template contains any structured data (lists).
Definition: private.h:151
struct fbExporter_st fbExporter_t
IPFIX Exporting Process endpoint.
Definition: public.h:2027
void(* fbTemplateCtxFree_fn)(void *tmpl_ctx, void *app_ctx)
A callback function that is called when a template is freed.
Definition: public.h:2091
gboolean reject
reject flag
Definition: private.h:64
struct fbSession_st fbSession_t
An IPFIX Transport Session state container.
Definition: public.h:1661
void fbTemplateInfoRecordClear(fbTemplateInfoRecord_t *mdRec)
Clears any list data used by a fbTemplateInfoRecord_t.
gboolean fbCollectMessage(fbCollector_t *collector, uint8_t *msgbase, size_t *msglen, GError **err)
fbCollectMessage
void fbSessionClearExtTmplTableFlag(fbSession_t *session)
fbSessionClearExtTmplTableFlag
fbTemplate_t * fbInfoElementAllocTypeTemplate2(fbInfoModel_t *model, gboolean internal, GError **err)
fbInfoElementAllocTypeTemplate2
gboolean fbCollectMessageBuffer(uint8_t *hdr, size_t b_len, size_t *m_len, GError **err)
fbCollectMessageBuffer
uint32_t fbSessionGetSequence(const fbSession_t *session)
fbSessionGetSequence
fbSession_t * session
pointer to the session for this peer address
Definition: private.h:44
fbSession_t * fbListenerSetPeerSession(fbListener_t *listener, fbSession_t *session)
Set the session on the fbuf and listener.
uint16_t ie_count
Count of information elements in template.
Definition: private.h:120
void fBufRemoveTemplateTcplan(fBuf_t *fbuf, const fbTemplate_t *tmpl)
fBufRemoveTemplateTcplan
fbTemplateCtxFree_fn ctx_free
Callback to free the ctx pointer when template is freed.
Definition: private.h:169
void * app_ctx
The application's Context pointer for the ctx_free function.
Definition: private.h:173
const fbInfoElement_t * fbInfoModelGetElement(const fbInfoModel_t *model, const fbInfoElement_t *ex_ie)
fbInfoModelGetElement
void fbTemplateInfoRecordInit(fbTemplateInfoRecord_t *mdRec)
fbTemplateInfoRecordInit
time_t last_seen
last seen time
Definition: private.h:60
void fbSessionSetSequence(fbSession_t *session, uint32_t sequence)
fbSessionSetSequence
struct fbTemplateInfoRecord_st fbTemplateInfoRecord_t
TemplateInfo options record structure.
gboolean fbInfoElementCopyToTemplate(fbInfoModel_t *model, const fbInfoElement_t *ex_ie, fbTemplateField_t *tmpl_ie, GError **err)
fbInfoElementCopyToTemplate
void fbTemplateRelease(fbTemplate_t *tmpl)
fbTemplateRelease
uint16_t count
The length of the array of positions.
Definition: private.h:98