Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
npm install ipfix_node
var IpfixDeserializer = require('ipfix_node')();
IpfixDeserializer.deserialize(data)
.then(function(deserializedData) {
// Do something with deserialized data (JSON format)
})
.catch(function(err) {
// Catch errors ...
});
"data" parameter is the Buffer data collected from a netflow exporting software.
The library is using internal Maps for storing Template Records and Option Template Records. Take a look at the options below to disable the internal storage so you can use your own storing mechanism.
Should the library not use the default internal storage strategy then set this to false. Default: true.
When setting this field to false you must provide a function via templateProvider option.
If you dont want to switch to your own storage strategy then you can access the internal storage at any time by using the Storage property.
var IpfixDeserializer = require('ipfix_node')();
var storage = IpfixDeserializer.Storage;
Callback function to provide the decoder with the required template which is needed to deserialize the Data Record portion found inside the binary buffer. Used together with useInternalStorage:false option.
You should always return the templates inside this function in the same format they are given to you in the onNewTemplate callback function.
Function arguments: templateId (the id of the template which is needed by the deserializer)
Callback function which gets called whenever there are new Templates (Template Records/Option Template Records) found in the binary buffer.
!!! Its important that you define a custom callback function for this option and store the new templates found if you are using useInternalStorage:false option, since they are going to be needed in the following flow exports for deserializing the DataRecords and the deserializer will expect you to provide them inside templateProvider callback.
Function arguments: template, templateType
{
"templateId": 1024,
"numberFields": 16,
"setId": 2,
"sizeInBytes": 72,
"FieldSpecifiers":
[
{ "fieldId": 8, "fieldLength": 4 },
{ "fieldId": 12, "fieldLength": 4 },
{ "fieldId": 1, "fieldLength": 4 },
{ "fieldId": 2, "fieldLength": 4 },
{ "fieldId": 10, "fieldLength": 4 },
{ "fieldId": 14, "fieldLength": 4 },
{ "fieldId": 7, "fieldLength": 2 },
{ "fieldId": 11, "fieldLength": 2 },
{ "fieldId": 4, "fieldLength": 1 },
{ "fieldId": 6, "fieldLength": 1 },
{ "fieldId": 60, "fieldLength": 1 },
{ "fieldId": 5, "fieldLength": 1 },
{ "fieldId": 32, "fieldLength": 2 },
{ "fieldId": 58, "fieldLength": 2 },
{ "fieldId": 22, "fieldLength": 4 },
{ "fieldId": 21, "fieldLength": 4 }
]
}
Boolean option which tells the deserializer whether it should detect and parse values inside Data Records automatically or it should return raw UINT data instead.
Default: true
FAQs
Ipfix flow deserializer in Node.JS
The npm package ipfix_node receives a total of 3 weekly downloads. As such, ipfix_node popularity was classified as not popular.
We found that ipfix_node demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.