Skip to content

Conversation

@awelzel
Copy link

@awelzel awelzel commented Nov 28, 2023

@stachdude - could you see if these changes work for you? I do not have a Napatech card readily available, but downloading/installing the SDK compiles and loads it at least for me against the latest Zeek master branch:

$ ./configure --with-napatech=$(pwd)/vendor/napatech3
$ make
$ LD_LIBRARY_PATH=$(pwd)/vendor/napatech3/lib/ ZEEK_PLUGIN_PATH=./build zeek -NN Zeek::Napatech
Zeek::Napatech - Packet acquisition via Napatech NTAPI (dynamic, version 1.0.0)
    [Packet Source] NapatechReader (interface prefix "napatech"; supports live input)

Hope you can figure out the rest :-)


Main part are the include paths, but I updated some of the configure/build infrastructure. See the individual commits.

This is the version taken straight from the zeek-aux repository.
This is needed for Zeek 6.1 and later.
This has been the suggested way for plugins to do since Zeek 3.2.

Closes napatech#1
Generally, using `zeek-config` from an installation tree should be
preferred if possible.
Squelches the following warning:

CMake Warning (dev) at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (NAPATECH)
  does not match the name of the calling package (Napatech).  This can lead
  to problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake/FindNapatech.cmake:31 (find_package_handle_standard_args)
  CMakeLists.txt:7 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.
@awelzel
Copy link
Author

awelzel commented Nov 28, 2023

@ralpheastwood @pjyoung1

@stachdude
Copy link

Hi @awelzel,

Thanks for taking your time to work on this, and yes it does work now. The only issue still is that you cant use zkg to install the package as for whatever reason, it still configures the package with old --bro-dist option. However this is not related to this project but rather zkg itself.

Zeek::Napatech - Packet acquisition via Napatech NTAPI (dynamic, version 1.0.0)
    [Packet Source] NapatechReader (interface prefix "napatech"; supports live input)

Thank you for this !

@awelzel awelzel force-pushed the topic/awelzel/1-include-path-fixes branch from 94afd9f to ed9d578 Compare November 30, 2023 08:31
Do not use --bro-dist (or --zeek-dist), but do allow the user to
configure the Napatech installation directory.
@awelzel awelzel force-pushed the topic/awelzel/1-include-path-fixes branch from ed9d578 to 30805b3 Compare November 30, 2023 08:40
@awelzel
Copy link
Author

awelzel commented Nov 30, 2023

he only issue still is that you cant use zkg to install the package as for whatever reason, it still configures the package with old --bro-dist option.

I've pushed a follow-up to remove the --bro-dist usage and added --with-naptech.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants