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