britram / libfc Goto Github PK
View Code? Open in Web Editor NEWIPFIX implementation in C++
IPFIX implementation in C++
Since fcold::SwitchImp will carry forward some information from the V9 observation domain analogue, we'll need a call in PlacementExporter that ensures a particular observation domain (and if the present message is not empty and the observation domain is different, flushes the present message to create a new one with the new observation domain)
Add support for (read-only) access Netflow V9 data in both compressed (.bz2) and uncompressed files. This will require tweaks to Transcoder.cpp to read V9-specific structures, as well as to Mbuf.cpp for deframing and decoding.
Review the codebase to make sure the exception classes in exceptions/ get used properly; logic errors that are really programming bugs should get assert()
ed instead.
All logging of 5101 SHOULD LOG events should be replaced with a callback model, where client code can log or otherwise react to events (new session, end session, out of sequence, etc.); look at how this is done in ripfix.
This involves new collectors, exporters, a stream-selection interface, and addition of stream selection to sequence number tracking in Session.cpp.
Template withdrawal as in section 8.1 and retransmission/expiry as in section 8.4 for RFC5101bis are not supported; add these both to export as well as collection interfaces. It is acceptable to require UDP exporters to make periodic calls to a retransmission check process, as well as for UDP collectors to an expiry check process.
Hi,
I am using libfc implementation in my project. I am facing an issue "free(): invalid pointer" error while running the code. I am doing
int main()
{
InfoModel& model = InfoModel::instance();
PlacementTemplate* my_flow_template = new PlacementTemplate();
u_int32_t inOctets = 0, outOctets = 0;
model.default5103();
model.add("inOctets(x/y1)[4]");
model.add("outOctets(x/y2)[4]");
FileExportDestination des(sockFd);
PlacementExporter exp(des, 0x1623);
my_flow_template->register_placement(model.lookupIE("inOctets"),
&inOctets, 4);
my_flow_template->register_placement(model.lookupIE("outOctets"),
&outOctets, 4);
exp.place_values(my_flow_template);
inOctets = 4;
outOctets = 5;
exp.place_values(my_flow_template);//multiple data records in a single template
exp.flush();
delete my_flow_template; // crashes here
return 0;
}
While debugging with gdb, the backtrace is pointing to the line "PlacementTemplate::~PlacementTemplate() {" and not in "delete[] buf;"
Can someone help to resolve this?
UDPCollector does not presently separate sessions by remote sender; fix this with a per-NetAddress session table.
Placement collectors should provide their inheritors with start and end message events. This is probably doable by merging PlacementContentHandler with PlacementCollector.
Add a generic IPFIX reader/printer (a la ripcollect); this will also allow reader testing on platforms not supporting the Boost unit testing framework.
TCPSingleCollector needs to do proper error handling and return checking on setup, and proper detection and teardown of connection reset by peer.
Add TLS / DTLS support (for interop testing); this will likely require new Collector and Exporter subclasses.
Put these into a message:
interfaceName 'eth'
ingressInterface 0x12345678
octetDeltaCount 0x1020304050607080
and libfc will die:
[tik40x:build]$ LD_LIBRARY_PATH=/lib:/lib64 ./fctest --run_test=Messages/Regressions
Running 1 test case...
unknown location(0): fatal error in "Message265": std::exception: CursorError: end of buffer caching offsets: input data not IPFIX?
/home/neuhaust/libfc/test/TestMessages.cpp(8708): last checkpoint
*** 1 failure detected in test suite "FC Test"
This test is run as part of the Messages/Regressions test suite.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.