forked from CESNET/ipfixcol2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request CESNET#48 from CESNET/devel
Bump version to 2.2.0
- Loading branch information
Showing
123 changed files
with
12,801 additions
and
825 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# LIBRDKAFKA_FOUND - System has librdkafka | ||
# LIBRDKAFKA_INCLUDE_DIRS - The librdkafka include directories | ||
# LIBRDKAFKA_LIBRARIES - The libraries needed to use librdkafka | ||
# LIBRDKAFKA_DEFINITIONS - Compiler switches required for using librdkafka | ||
|
||
# use pkg-config to get the directories and then use these values | ||
# in the find_path() and find_library() calls | ||
find_package(PkgConfig) | ||
if (PKG_CONFIG_FOUND) | ||
pkg_check_modules(PC_RDKAFKA QUIET rdkafka) | ||
set(LIBRDKAFKA_DEFINITIONS ${PC_RDKAFKA_CFLAGS_OTHER}) | ||
endif() | ||
|
||
find_path( | ||
KAFKA_INCLUDE_DIR librdkafka/rdkafka.h | ||
HINTS ${PC_RDKAFKA_INCLUDEDIR} ${PC_RDKAFKA_INCLUDE_DIRS} | ||
PATH_SUFFIXES include | ||
) | ||
|
||
find_library( | ||
KAFKA_LIBRARY NAMES rdkafka librdkafka | ||
HINTS ${PC_RDKAFKA_LIBDIR} ${PC_RDKAFKA_LIBRARY_DIRS} | ||
PATH_SUFFIXES lib lib64 | ||
) | ||
|
||
if (PC_RDKAFKA_VERSION) | ||
# Version extracted from pkg-config | ||
set(KAFKA_VERSION_STRING ${PC_RDKAFKA_VERSION}) | ||
elseif(KAFKA_INCLUDE_DIR AND KAFKA_LIBRARY) | ||
# Try to get the version of the installed library | ||
try_run( | ||
KAFKA_RES_RUN KAFKA_RES_COMP | ||
${CMAKE_CURRENT_BINARY_DIR}/try_run/kafka_version_test/ | ||
${PROJECT_SOURCE_DIR}/CMakeModules/try_run/kafka_version.c | ||
CMAKE_FLAGS | ||
-DLINK_LIBRARIES=${KAFKA_LIBRARY} | ||
-DINCLUDE_DIRECTORIES=${KAFKA_INCLUDE_DIR} | ||
RUN_OUTPUT_VARIABLE KAFKA_VERSION_VAR | ||
) | ||
|
||
if (KAFKA_RES_COMP AND KAFKA_RES_RUN EQUAL 0) | ||
# Successfully compiled and executed with return code 0 | ||
set(KAFKA_VERSION_STRING ${KAFKA_VERSION_VAR}) | ||
endif() | ||
endif() | ||
|
||
# handle the QUIETLY and REQUIRED arguments and set LIBRDKAFKA_FOUND to TRUE | ||
# if all listed variables are TRUE | ||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(LibRDKafka | ||
REQUIRED_VARS KAFKA_LIBRARY KAFKA_INCLUDE_DIR | ||
VERSION_VAR KAFKA_VERSION_STRING | ||
) | ||
|
||
set(LIBRDKAFKA_LIBRARIES ${KAFKA_LIBRARY}) | ||
set(LIBRDKAFKA_INCLUDE_DIRS ${KAFKA_INCLUDE_DIR}) | ||
mark_as_advanced(KAFKA_INCLUDE_DIR KAFKA_LIBRARY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#include <librdkafka/rdkafka.h> | ||
#include <stdio.h> | ||
|
||
int | ||
main(int argc, char *argv[]) | ||
{ | ||
const char *ver_str = rd_kafka_version_str(); | ||
if (!ver_str) { | ||
return 1; | ||
} | ||
|
||
printf("%s", ver_str); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<!-- | ||
Receive flow data over UDP, convert them into JSON and provide them as | ||
a server on local port | ||
--> | ||
<ipfixcol2> | ||
<!-- Input plugins --> | ||
<inputPlugins> | ||
<input> | ||
<name>UDP collector</name> | ||
<plugin>udp</plugin> | ||
<params> | ||
<!-- List on port 4739 --> | ||
<localPort>4739</localPort> | ||
<!-- Bind to all local adresses --> | ||
<localIPAddress></localIPAddress> | ||
</params> | ||
</input> | ||
</inputPlugins> | ||
|
||
<!-- Output plugins --> | ||
<outputPlugins> | ||
<output> | ||
<name>JSON output</name> | ||
<plugin>json-kafka</plugin> | ||
<params> | ||
<!-- JSON format paramters --> | ||
<tcpFlags>formatted</tcpFlags> | ||
<timestamp>formatted</timestamp> | ||
<protocol>formatted</protocol> | ||
<ignoreUnknown>true</ignoreUnknown> | ||
<ignoreOptions>true</ignoreOptions> | ||
<nonPrintableChar>true</nonPrintableChar> | ||
<octetArrayAsUint>true</octetArrayAsUint> | ||
<numericNames>false</numericNames> | ||
<splitBiflow>false</splitBiflow> | ||
<detailedInfo>false</detailedInfo> | ||
<templateInfo>false</templateInfo> | ||
|
||
<!-- Output methods --> | ||
<outputs> | ||
<kafka> | ||
<name>Send to Kafka</name> | ||
<brokers>127.0.0.1</brokers> | ||
<topic>ipfix</topic> | ||
<blocking>false</blocking> | ||
<partition>unassigned</partition> | ||
|
||
<!-- Zero or more additional properties --> | ||
<property> | ||
<key>compression.codec</key> | ||
<value>lz4</value> | ||
</property> | ||
</kafka> | ||
</outputs> | ||
</params> | ||
</output> | ||
</outputPlugins> | ||
</ipfixcol2> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.