Skip to content

Commit 5d5e89f

Browse files
Merge pull request #52 from CESNET/flowscatter-ng
Module flowscatter
2 parents c5d0167 + f13d3f2 commit 5d5e89f

8 files changed

Lines changed: 843 additions & 5 deletions

File tree

flake.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
pkgs.fuse3
2929
pkgs.rpm
3030
pkgs.clang-tools
31+
pkgs.editorconfig-checker
32+
pkgs.doxygen
3133
pkgs.libmaxminddb
3234
netmonpkgs.packages.x86_64-linux.nemea-modules-meta
3335
netmonpkgs.packages.x86_64-linux.nemea-framework

modules/CMakeLists.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
# add_subdirectory(listDetector)
2-
# add_subdirectory(sampler)
3-
# add_subdirectory(telemetry)
4-
# add_subdirectory(deduplicator)
5-
# add_subdirectory(clickhouse)
1+
add_subdirectory(listDetector)
2+
add_subdirectory(sampler)
3+
add_subdirectory(telemetry)
4+
add_subdirectory(deduplicator)
5+
add_subdirectory(clickhouse)
6+
add_subdirectory(flowScatter)
67
add_subdirectory(fieldClassifier)

modules/flowScatter/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
add_subdirectory(src)

modules/flowScatter/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# flowScatter module - README
2+
3+
## Description
4+
The module performs distributing of 1 unirec interface data to `n` trap outputs
5+
6+
## Interfaces
7+
- Input: 1
8+
- Output: `n`
9+
10+
## Parameters
11+
### Common TRAP parameters
12+
- `-h [trap,1]` Print help message for this module / for libtrap specific parameters.
13+
- `-i IFC_SPEC` Specification of interface types and their parameters.
14+
- `-v` Be verbose.
15+
- `-vv` Be more verbose.
16+
- `-vvv` Be even more verbose.
17+
18+
### Module specific parameters
19+
- `-m, --appfs-mountpoint <path>` Path where the appFs directory will be mounted
20+
- `-r, --rule <string>` Decide, what fields are used to create a hash. Might be in form of rule.
21+
- `-c, --count <int>` Number of output interfaces.
22+
23+
## Usage Examples
24+
```
25+
$ flowscatter -i u:trap_in,u:trap_out -r "SRC_IP,SRC_PORT" # according SRC_IP+SRC_PORT
26+
27+
$ flowscatter -i u:trap_in,u:trap_out -r "TAG_SRC_IP:(SRC_IP)|TAG_DST_IP:(DST_IP)" # if TAG_SRC_IP is not 0, then SRC_IP else if TAG_DST_IP is no 0, then DST_IP
28+
29+
$ flowscatter -i u:trap_in,u:trap_out -r "TAG_SRC_IP:(SRC_IP,SRC_PORT)|TAG_DST_IP:(DST_IP,DST_PORT)" # if TAG_SRC_IP is not 0, then SRC_IP+SRC_PORT, else if TAG_DST_IP is not 0, then DST_IP+DST_PORT
30+
31+
```
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
add_executable(flowscatter
2+
main.cpp
3+
flowScatter.cpp
4+
)
5+
6+
target_link_libraries(flowscatter PRIVATE
7+
telemetry::telemetry
8+
telemetry::appFs
9+
common
10+
unirec::unirec++
11+
unirec::unirec
12+
trap::trap
13+
argparse
14+
xxhash
15+
)
16+
17+
install(TARGETS flowscatter DESTINATION ${INSTALL_DIR_BIN})

0 commit comments

Comments
 (0)