Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
pkgs.fuse3
pkgs.rpm
pkgs.clang-tools
pkgs.editorconfig-checker
pkgs.doxygen
pkgs.libmaxminddb
netmonpkgs.packages.x86_64-linux.nemea-modules-meta
netmonpkgs.packages.x86_64-linux.nemea-framework
Expand Down
11 changes: 6 additions & 5 deletions modules/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# add_subdirectory(listDetector)
# add_subdirectory(sampler)
# add_subdirectory(telemetry)
# add_subdirectory(deduplicator)
# add_subdirectory(clickhouse)
add_subdirectory(listDetector)
add_subdirectory(sampler)
add_subdirectory(telemetry)
add_subdirectory(deduplicator)
add_subdirectory(clickhouse)
add_subdirectory(flowScatter)
add_subdirectory(fieldClassifier)
1 change: 1 addition & 0 deletions modules/flowScatter/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
add_subdirectory(src)
31 changes: 31 additions & 0 deletions modules/flowScatter/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# flowScatter module - README

## Description
The module performs distributing of 1 unirec interface data to `n` trap outputs

## Interfaces
- Input: 1
- Output: `n`

## Parameters
### Common TRAP parameters
- `-h [trap,1]` Print help message for this module / for libtrap specific parameters.
- `-i IFC_SPEC` Specification of interface types and their parameters.
- `-v` Be verbose.
- `-vv` Be more verbose.
- `-vvv` Be even more verbose.

### Module specific parameters
- `-m, --appfs-mountpoint <path>` Path where the appFs directory will be mounted
- `-r, --rule <string>` Decide, what fields are used to create a hash. Might be in form of rule.
- `-c, --count <int>` Number of output interfaces.

## Usage Examples
```
$ flowscatter -i u:trap_in,u:trap_out -r "SRC_IP,SRC_PORT" # according SRC_IP+SRC_PORT

$ 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

$ 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

```
17 changes: 17 additions & 0 deletions modules/flowScatter/src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
add_executable(flowscatter
main.cpp
flowScatter.cpp
)

target_link_libraries(flowscatter PRIVATE
telemetry::telemetry
telemetry::appFs
common
unirec::unirec++
unirec::unirec
trap::trap
argparse
xxhash
)

install(TARGETS flowscatter DESTINATION ${INSTALL_DIR_BIN})
Loading
Loading