diff options
author | Toni <matzeton@googlemail.com> | 2024-08-19 18:33:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-19 18:33:18 +0200 |
commit | 5e4005162b804c5501fccf4d066c5b1b99c38b89 (patch) | |
tree | 73a090e6c0fd79de4a2d5fc950be8d52185bf905 /packages | |
parent | a230eaf061e4c570acfa3e2d494baa6c604acc22 (diff) |
Add PF_RING support. (#38)
Diffstat (limited to 'packages')
-rw-r--r-- | packages/openwrt/net/nDPId-testing/Makefile | 23 | ||||
-rw-r--r-- | packages/openwrt/net/nDPId-testing/nDPId-testing.init | 2 |
2 files changed, 22 insertions, 3 deletions
diff --git a/packages/openwrt/net/nDPId-testing/Makefile b/packages/openwrt/net/nDPId-testing/Makefile index 3c53a4b5c..0d21edd3d 100644 --- a/packages/openwrt/net/nDPId-testing/Makefile +++ b/packages/openwrt/net/nDPId-testing/Makefile @@ -18,6 +18,7 @@ PKG_LICENSE_FILES:=COPYING CMAKE_INSTALL:=1 +include $(INCLUDE_DIR)/kernel.mk include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk @@ -25,7 +26,7 @@ define Package/nDPId-testing TITLE:=nDPId is a tiny nDPI based daemons / toolkit (nDPId source repository) SECTION:=net CATEGORY:=Network - DEPENDS:=@!SMALL_FLASH @!LOW_MEMORY_FOOTPRINT +libpcap +zlib +LIBNDPI_GCRYPT:libgcrypt + DEPENDS:=@!SMALL_FLASH @!LOW_MEMORY_FOOTPRINT +libpcap +zlib +LIBNDPI_GCRYPT:libgcrypt +NDPID_TESTING_INFLUXDB:libcurl +NDPID_TESTING_PFRING:libpfring URL:=http://github.com/lnslbrty/nDPId endef @@ -52,13 +53,21 @@ config NDPID_TESTING_LIBNDPI_COMMIT_HASH Leave empty to use the dev branch. Disabled by default. -config NDPI_TESTING_INFLUXDB +config NDPID_TESTING_INFLUXDB bool "nDPIsrvd-influxdb" depends on PACKAGE_nDPId-testing && PACKAGE_libcurl default n help An InfluxDB push daemon. It aggregates various statistics gathered from nDPId. The results are sent to a specified InfluxDB endpoint. + +config NDPID_TESTING_PFRING + bool "PF_RING support" + select PACKAGE_libpfring + select PACKAGE_kmod-pf-ring + default n + help + bla endef CMAKE_OPTIONS += -DBUILD_EXAMPLES=ON @@ -73,7 +82,15 @@ CMAKE_OPTIONS += -DSTATIC_LIBNDPI_INSTALLDIR="$(PKG_BUILD_DIR)/libnDPI/install" TARGET_CFLAGS += -DLIBNDPI_STATIC=1 TARGET_CFLAGS += -Werror -ifneq ($(CONFIG_NDPI_TESTING_INFLUXDB),) +ifneq ($(CONFIG_NDPID_TESTING_PFRING),) +# FIXME: PFRING kernel include directory is hardcoded (not installed to linux header directory). +CMAKE_OPTIONS += -DENABLE_PFRING=ON \ + -DPFRING_KERNEL_INC="$(KERNEL_BUILD_DIR)/PF_RING-8.4.0/kernel" \ + -DPFRING_INSTALLDIR="$(STAGING_DIR)/usr" \ + -DPFRING_LINK_STATIC=OFF +endif + +ifneq ($(CONFIG_NDPID_TESTING_INFLUXDB),) CMAKE_OPTIONS += -DENABLE_CURL=ON endif diff --git a/packages/openwrt/net/nDPId-testing/nDPId-testing.init b/packages/openwrt/net/nDPId-testing/nDPId-testing.init index 230b75d01..850ec47a8 100644 --- a/packages/openwrt/net/nDPId-testing/nDPId-testing.init +++ b/packages/openwrt/net/nDPId-testing/nDPId-testing.init @@ -64,9 +64,11 @@ start_ndpid_instance() { fi args="$(print_arg_str "$cfg" 'interface' '-i')" + args="$args$(print_arg_bool "$cfg" 'use_pfring' '-r')" args="$args$(print_arg_bool "$cfg" 'internal_only' '-I')" args="$args$(print_arg_bool "$cfg" 'external_only' '-E')" args="$args$(print_arg_str "$cfg" 'bpf_filter' '-B')" + args="$args$(print_arg_bool "$cfg" 'use_poll' '-e')" args="$args$(print_arg_str "$cfg" 'proto_file' '-P')" args="$args$(print_arg_str "$cfg" 'cat_file' '-C')" args="$args$(print_arg_str "$cfg" 'ja3_file' '-J')" |