Commit ea39eb95 authored by Håvard Moås's avatar Håvard Moås
Browse files

Update IPFIXLIB to add support for some more data fields, havard.mork@gmail.com

git-svn-id: file:///home/svn/mapi/branches/haavardm-mapi@41 8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent c619c119
......@@ -767,11 +767,11 @@ void addPktToHash(np_ctxt_t *npctxt,
setPayload(npctxt, bkt, payload, payloadLen, 0);
bkt->src2dstTcpFlags |= flags;
/* Increase num of observed flows */
/* Increase num of observed flows. We don't update the number of flows
* when traffic is discovered in the other direction. */
bkt->flowid = (uint32_t)npctxt->numObservedFlows;
npctxt->numObservedFlows = npctxt->numObservedFlows + 1;
/* Put the bucket on top of the list */
pthread_mutex_lock(&hashMutex[mutexIdx]);
addToList(bkt, &npctxt->hash[idx]);
......
......@@ -142,6 +142,8 @@ typedef struct hashBucket {
u_int32_t optionsIPV6dst2src;
u_int64_t optionsIPV4src2dst;
u_int64_t optionsIPV4dst2src;
u_int32_t flowid; // ID of flow locally unique to _exporter_.
} HashBucket;
......@@ -1199,7 +1199,7 @@ static void handleTemplate(np_ctxt_t *npctxt, V9TemplateId *theTemplate,
copyInt32(0, outBuffer, outBufferBegin, outBufferMax); /* FIX */
break;
case 148:
copyInt32(0, outBuffer, outBufferBegin, outBufferMax); /* FIX */
copyInt32(theFlow->flowid, outBuffer, outBufferBegin, outBufferMax);
break;
case 150: // FLOW_START_SECONDS uint32
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment