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

Update IPFIXLIB to fix correct byte ordering for sent data and template sets, havard.mork@gmail.com

git-svn-id: file:///home/svn/mapi/branches/haavardm-mapi@75 8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent 545ca383
......@@ -286,7 +286,7 @@ printStats(np_ctxt_t *npctxt)
}
if(npctxt->notsent_flows > 0ull) {
traceEvent(npctxt, TRACE_INFO, "Total non-exported flows due to congestion: %ull", npctxt->notsent_flows);
traceEvent(npctxt, TRACE_INFO, "Total non-exported flows due to congestion: %llu", npctxt->notsent_flows);
}
npctxt->maxBucketSearch = 0; /* reset */
......@@ -807,8 +807,8 @@ sendNetFlowIPFIX(np_ctxt_t *npctxt, u_char lastFlow)
flowSet.templateId = htons(259);
flowSet.flowsetLen = htons(npctxt->bufferLen+4);
npctxt->ipfixHeader.length = sizeof(IPFIXFlowHeader) + sizeof(flowSet) + npctxt->bufferLen;
npctxt->ipfixHeader.exportTime = time(NULL);
npctxt->ipfixHeader.length = htons(sizeof(IPFIXFlowHeader) + sizeof(flowSet) + npctxt->bufferLen);
npctxt->ipfixHeader.exportTime = htonl(time(NULL));
memcpy(&flowBuffer[bufLen], &npctxt->ipfixHeader, sizeof npctxt->ipfixHeader);
bufLen += sizeof(npctxt->ipfixHeader);
memcpy(&flowBuffer[bufLen], &flowSet, sizeof(flowSet));
......@@ -1078,7 +1078,7 @@ npInitContext(void)
npctxt->hashSize = HASH_SIZE;
npctxt->minFlowSize = 0;
npctxt->traceMode = 0;
npctxt->flowExportDelay = 100;
npctxt->flowExportDelay = 0;
npctxt->idleTimeout = DUMP_TIMEOUT;
npctxt->lifetimeTimeout = 8*DUMP_TIMEOUT;
npctxt->sendTimeout = 5;
......
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