Skip to content

Commit 0a80649

Browse files
committed
++ yyy
1 parent f5af3e8 commit 0a80649

File tree

13 files changed

+168
-8
lines changed

13 files changed

+168
-8
lines changed

cmake/dependencies.cmake

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
find_package(PkgConfig REQUIRED)
22

33
find_package(unwind REQUIRED)
4-
find_package(Threads REQUIRED)
5-
#find_package(Atomic REQUIRED)
6-
find_library(ATOMIC_LIBRARY NAMES atomic)
7-
find_library(DL_LIBRARY NAMES dl)
4+
find_package(atomic REQUIRED)
85
find_package(lz4 REQUIRED)
96

10-
if(NOT DL_LIBRARY)
11-
message(FATAL_ERROR "dl library not found!")
7+
find_package(Threads REQUIRED)
8+
if(NOT CMAKE_USE_PTHREADS_INIT)
9+
message(FATAL_ERROR "pthreads not found!")
1210
endif()
1311

1412
if (ENABLE_INPUT_PCAP)

cmake/modules/Findatomic.cmake

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Try to find libatomic
2+
# Once done, this will define
3+
#
4+
# ATOMIC_FOUND - system has libatomic
5+
# ATOMIC_LIBRARIES - libraries needed to use libatomic
6+
#
7+
8+
find_library(ATOMIC_LIBRARY
9+
NAMES atomic
10+
HINTS ${ATOMIC_ROOT}
11+
PATH_SUFFIXES ${CMAKE_INSTALL_LIBDIR})
12+
13+
include(FindPackageHandleStandardArgs)
14+
find_package_handle_standard_args (atomic
15+
REQUIRED_VARS ATOMIC_LIBRARY
16+
)
17+
18+
if (ATOMIC_FOUND AND NOT TARGET atomic::atomic)
19+
add_library(atomic::atomic STATIC IMPORTED)
20+
set_target_properties(atomic::atomic PROPERTIES
21+
IMPORTED_LOCATION "${ATOMIC_LIBRARY}"
22+
INTERFACE_INCLUDE_DIRECTORIES "${ATOMIC_INCLUDE_DIR}")
23+
target_compile_definitions(atomic::atomic INTERFACE UNWIND_FOUND)
24+
else()
25+
message(CRITICAL "Notice: atomic not found")
26+
add_library(atomic::atomic INTERFACE IMPORTED)
27+
endif()
28+
29+
unset(ATOMIC_LIBRARY)

src/plugins/input/dpdk/src/dpdk-ring.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,13 @@ class DpdkRingReader : public InputPlugin {
139139
struct NfbTimestamp {
140140
uint32_t timestamp_ns;
141141
uint32_t timestamp_s;
142-
} __rte_packed;
142+
} __attribute__((packed));
143143

144144
struct NfbMetadata {
145145
NfbTimestamp timestamp;
146146
uint16_t matched;
147147
uint32_t hash;
148-
} __rte_packed;
148+
} __attribute__((packed));
149149

150150
telemetry::Content get_queue_telemetry();
151151
void getDynfieldInfo();
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
project(ipfixprobe-process-dns VERSION 1.0.0 DESCRIPTION "ipfixprobe-process-dns plugin")
2+
3+
add_library(ipfixprobe-process-dns SHARED
4+
src/dns.cpp
5+
src/dns.hpp
6+
)
7+
8+
target_include_directories(ipfixprobe-process-dns PRIVATE
9+
${CMAKE_SOURCE_DIR}/include/
10+
${CMAKE_SOURCE_DIR}/src/plugins/process/common
11+
)
12+
13+
install(
14+
TARGETS ipfixprobe-process-dns
15+
LIBRARY DESTINATION "${INSTALL_DIR_LIB}/ipfixprobe/process/"
16+
)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
project(ipfixprobe-process-dnssd VERSION 1.0.0 DESCRIPTION "ipfixprobe-process-dnssd plugin")
2+
3+
add_library(ipfixprobe-process-dnssd SHARED
4+
src/dnssd.cpp
5+
src/dnssd.hpp
6+
)
7+
8+
target_include_directories(ipfixprobe-process-dnssd PRIVATE ${CMAKE_SOURCE_DIR}/include/)
9+
10+
install(
11+
TARGETS ipfixprobe-process-dnssd
12+
LIBRARY DESTINATION "${INSTALL_DIR_LIB}/ipfixprobe/process/"
13+
)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
project(ipfixprobe-process-flowhash VERSION 1.0.0 DESCRIPTION "ipfixprobe-process-flowhash plugin")
2+
3+
add_library(ipfixprobe-process-flowhash SHARED
4+
src/flow_hash.cpp
5+
src/flow_hash.hpp
6+
)
7+
8+
target_include_directories(ipfixprobe-process-flowhash PRIVATE ${CMAKE_SOURCE_DIR}/include/)
9+
10+
install(
11+
TARGETS ipfixprobe-process-flowhash
12+
LIBRARY DESTINATION "${INSTALL_DIR_LIB}/ipfixprobe/process/"
13+
)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
project(ipfixprobe-process-idpcontent VERSION 1.0.0 DESCRIPTION "ipfixprobe-process-idpcontent plugin")
2+
3+
add_library(ipfixprobe-process-idpcontent SHARED
4+
src/idpcontent.cpp
5+
src/idpcontent.hpp
6+
)
7+
8+
target_include_directories(ipfixprobe-process-idpcontent PRIVATE ${CMAKE_SOURCE_DIR}/include/)
9+
10+
install(
11+
TARGETS ipfixprobe-process-idpcontent
12+
LIBRARY DESTINATION "${INSTALL_DIR_LIB}/ipfixprobe/process/"
13+
)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
project(ipfixprobe-process-mqtt VERSION 1.0.0 DESCRIPTION "ipfixprobe-process-mqtt plugin")
2+
3+
add_library(ipfixprobe-process-mqtt SHARED
4+
src/mqtt.cpp
5+
src/mqtt.hpp
6+
)
7+
8+
target_include_directories(ipfixprobe-process-mqtt PRIVATE ${CMAKE_SOURCE_DIR}/include/)
9+
10+
install(
11+
TARGETS ipfixprobe-process-mqtt
12+
LIBRARY DESTINATION "${INSTALL_DIR_LIB}/ipfixprobe/process/"
13+
)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
project(ipfixprobe-process-passivedns VERSION 1.0.0 DESCRIPTION "ipfixprobe-process-passivedns plugin")
2+
3+
add_library(ipfixprobe-process-passivedns SHARED
4+
src/passivedns.cpp
5+
src/passivedns.hpp
6+
)
7+
8+
target_include_directories(ipfixprobe-process-bstats PRIVATE ${CMAKE_SOURCE_DIR}/include/)
9+
10+
install(
11+
TARGETS ipfixprobe-process-passivedns
12+
LIBRARY DESTINATION "${INSTALL_DIR_LIB}/ipfixprobe/process/"
13+
)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
project(ipfixprobe-process-sip VERSION 1.0.0 DESCRIPTION "ipfixprobe-process-sip plugin")
2+
3+
add_library(ipfixprobe-process-sip SHARED
4+
src/sip.cpp
5+
src/sip.hpp
6+
)
7+
8+
target_include_directories(ipfixprobe-process-sip PRIVATE ${CMAKE_SOURCE_DIR}/include/)
9+
10+
install(
11+
TARGETS ipfixprobe-process-sip
12+
LIBRARY DESTINATION "${INSTALL_DIR_LIB}/ipfixprobe/process/"
13+
)

0 commit comments

Comments
 (0)