Skip to content

Commit df178b6

Browse files
author
Pavel Siska
committed
main
1 parent c6beba2 commit df178b6

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

new-process-api/main.cpp

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#include "fieldManager.hpp"
2+
#include "flowKey.hpp"
3+
#include "flowRecordBuilder.hpp"
4+
#include "icmp.hpp"
5+
#include "processPluginBuilder.hpp"
6+
#include "textOutputPlugin.hpp"
7+
8+
#include <iostream>
9+
10+
using namespace ipxp;
11+
12+
int main()
13+
{
14+
FieldManager fieldManager;
15+
ProcessPlugins processPlugins(fieldManager);
16+
17+
processPlugins.addProcessPlugin("TestDummy", "Params");
18+
19+
processPlugins.disableProcessPlugin("TestDummy");
20+
processPlugins.enableProcessPlugin("TestDummy");
21+
22+
FlowRecordBuilder builder(processPlugins.getEntries(), VlanFlowKeyLayout);
23+
24+
builder.printLayoutInfo();
25+
26+
auto flowRecord = builder.build();
27+
28+
/**
29+
processPlugins.forEachPlugin(
30+
flowRecord.get(),
31+
[&](FlowRecord* flowRecord, ProcessPlugin* plugin, void* pluginContext) {
32+
plugin->onInit(*flowRecord, pluginContext, Packet(), PacketFeatures());
33+
});
34+
*/
35+
36+
TextOutputPlugin textOutputPlugin(fieldManager, processPlugins.getEntries());
37+
textOutputPlugin.processRecord(flowRecord);
38+
39+
return 0;
40+
}

0 commit comments

Comments
 (0)