Skip to content

Commit d54deb8

Browse files
committed
+++ xxx
1 parent c14e5d4 commit d54deb8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+175
-930
lines changed

CMakeLists.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,13 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
3434

3535
option(ENABLE_RPMBUILD "Enable support for building RPM packages" ON)
3636

37-
option(ENABLE_INPUT_PCAP "Enable build of input PCAP plugin" ON)
38-
option(ENABLE_INPUT_DPDK "Enable build of input DPDK plugin" ON)
39-
option(ENABLE_INPUT_NFB "Enable build of input NFB plugin" ON)
40-
37+
option(ENABLE_INPUT_PCAP "Enable build of input PCAP plugin" ON)
38+
option(ENABLE_INPUT_DPDK "Enable build of input DPDK plugin" ON)
39+
option(ENABLE_INPUT_NFB "Enable build of input NFB plugin" ON)
40+
option(ENABLE_RPMBUILD "RPM build" ON)
41+
option(ENABLE_PROCESS_NETTISA "Enable build of nettisa process plugin" ON)
42+
option(ENABLE_PROCESS_EXPERIMENTAL "Enable build of additional process plugins" ON)
43+
option(ENABLE_OUTPUT_UNIREC "Enable build of unirec output plugin" ON)
4144

4245
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g")
4346
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -g -O3")

cmake/dependencies.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
find_package(PkgConfig REQUIRED)
22

3+
#pkg_check_modules(pthread REQUIRED libpthread)
4+
pkg_check_modules(unwind REQUIRED libunwind)
5+
#pkg_check_modules(atomic REQUIRED libatomic)
6+
pkg_check_modules(xxhash REQUIRED xxhash-devel)
7+
38
if (ENABLE_INPUT_PCAP)
49
pkg_check_modules(PCAP REQUIRED libpcap)
510
endif()

pkg/rpm/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@ if (ENABLE_INPUT_NFB)
3030
list(APPEND RPMBUILD_ARGS "--with" "input_nfb")
3131
endif()
3232

33+
if (ENABLE_PROCESS_NETTISA)
34+
list(APPEND RPMBUILD_ARGS "--with" "process_nettisa")
35+
endif()
36+
37+
if (ENABLE_PROCESS_EXPERIMENTAL)
38+
list(APPEND RPMBUILD_ARGS "--with" "process_experimental")
39+
endif()
40+
3341
configure_file("${SPEC_FILE_IN}" "${SPEC_FILE}" @ONLY)
3442

3543
add_custom_target(rpm

src/plugins/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
add_subdirectory(input)
22
add_subdirectory(output)
3-
#add_subdirectory(process)
4-
#add_subdirectory(storage)
3+
add_subdirectory(process)
4+
add_subdirectory(storage)

src/plugins/input/nfb/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ add_library(ipfixprobe-input-nfb MODULE
99
src/ndpreader.hpp
1010
)
1111

12-
target_include_directories(ipfixprobe-input-nfb PRIVATE ${CMAKE_SOURCE_DIR}/include/)
13-
target_include_directories(ipfixprobe-input-nfb PRIVATE ${CMAKE_SOURCE_DIR}/src/plugins/input/common)
12+
target_include_directories(ipfixprobe-input-nfb PRIVATE
13+
${CMAKE_SOURCE_DIR}/include/
14+
${CMAKE_SOURCE_DIR}/src/plugins/input/common
15+
)
1416

1517
target_link_libraries(ipfixprobe-input-nfb PRIVATE ipfixprobe-parser)
1618
target_link_libraries(ipfixprobe-input-nfb PRIVATE nfb::nfb)

src/plugins/process/CMakeLists.txt

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
add_subdirectory(common)
2-
add_subdirectory(bstats)
32
add_subdirectory(basicplus)
3+
add_subdirectory(bstats)
4+
#add_subdirectory(dns)
5+
#add_subdirectory(dnssd)
6+
add_subdirectory(flow_hash)
47
add_subdirectory(http)
58
add_subdirectory(icmp)
69
add_subdirectory(pstats)
710
add_subdirectory(mpls)
8-
add_subdirectory(nettisa)
911
add_subdirectory(phists)
1012
add_subdirectory(ovpn)
1113
add_subdirectory(ntp)
@@ -16,4 +18,12 @@ add_subdirectory(tls)
1618
add_subdirectory(wg)
1719
add_subdirectory(rtsp)
1820
add_subdirectory(smtp)
19-
add_subdirectory(quic)
21+
add_subdirectory(quic)
22+
23+
if (ENABLE_PROCESS_NETTISA)
24+
add_subdirectory(nettisa)
25+
endif ()
26+
27+
if (ENABLE_PROCESS_EXPERIMENTAL)
28+
#add_subdirectory(sip)
29+
endif ()
Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include <iostream>
3333
#include <sstream>
3434
#include <arpa/inet.h>
35+
#include <ipfixprobe.hpp>
3536

3637
#ifdef WITH_NEMEA
3738
#include <unirec/unirec.h>
@@ -41,14 +42,14 @@
4142

4243
namespace ipxp {
4344

44-
int RecordExtDNS::REGISTERED_ID = -1;
45+
int RecordExtDNS::REGISTERED_ID = register_extension();
4546

46-
__attribute__((constructor)) static void register_this_plugin()
47-
{
48-
static PluginRecord rec = PluginRecord("dns", [](){return new DNSPlugin();});
49-
register_plugin(&rec);
50-
RecordExtDNS::REGISTERED_ID = register_extension();
51-
}
47+
static const PluginManifest dnsPluginManifest = {
48+
.name = "dns",
49+
.description = "",
50+
.pluginVersion = "1.0.0",
51+
.apiVersion = "1.0.0",
52+
};
5253

5354
//#define DEBUG_DNS
5455

@@ -675,4 +676,6 @@ int DNSPlugin::add_ext_dns(const char *data, unsigned int payload_len, bool tcp,
675676
return FLOW_FLUSH;
676677
}
677678

679+
static const PluginRegistrar<DNSPlugin, PluginFactory<ProcessPlugin>> dnsRegistrar(dnsPluginManifest);
680+
678681
}
Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@
4343

4444
namespace ipxp {
4545

46-
int RecordExtDNSSD::REGISTERED_ID = -1;
46+
int RecordExtDNSSD::REGISTERED_ID = register_extension();
4747

48-
__attribute__((constructor)) static void register_this_plugin()
49-
{
50-
static PluginRecord rec = PluginRecord("dnssd", [](){return new DNSSDPlugin();});
51-
register_plugin(&rec);
52-
RecordExtDNSSD::REGISTERED_ID = register_extension();
53-
}
48+
static const PluginManifest dnssdPluginManifest = {
49+
.name = "dnssd",
50+
.description = "",
51+
.pluginVersion = "1.0.0",
52+
.apiVersion = "1.0.0",
53+
};
5454

5555
// #define DEBUG_DNSSD
5656

@@ -691,4 +691,6 @@ int DNSSDPlugin::add_ext_dnssd(const char *data, unsigned int payload_len, bool
691691
return 0;
692692
}
693693

694+
static const PluginRegistrar<DNSSDPlugin, PluginFactory<ProcessPlugin>> dnssdRegistrar(dnssdPluginManifest);
695+
694696
}

0 commit comments

Comments
 (0)