Le Wed, May 20, 2026 at 12:22:09AM +0100, Tom Smyth a écrit : > sorry folks > > for some reason I only ran sysupgrade on my fastnet mon box tonight ( from > 7.7 to 7.8) so only seeing this thread now (that I searched for > fasnetmon on the ports list > > I think fastnetmon is an amazing piece of software although running it on > OpenBSD does require a re-animation script to check if it is still running > and restart the service... > > I can try to "help" maintain the port I have messaged Pavel Otinsov the > author of fastnetmon to see if we can work on it ... > > I dont know how much use I can be ... but Ill try to get it working ... > I have very little experience with boost libraries and would appreciate a > steer from someone ...
here's what i had last year when the port was removed, and i think i quickly gave up when i saw that it wanted to build many bundled libs. i don't plan more work on it at all, but feel free to start from that. Landry
Index: Makefile =================================================================== RCS file: /cvs/ports/net/fastnetmon/Attic/Makefile,v diff -u -r1.17 Makefile --- Makefile 8 Nov 2022 11:14:54 -0000 1.17 +++ Makefile 20 May 2026 07:15:59 -0000 @@ -2,8 +2,7 @@ GH_ACCOUNT = pavel-odintsov GH_PROJECT = fastnetmon -GH_TAGNAME = v1.1.7 -REVISION = 2 +GH_TAGNAME = v1.2.8 HOMEPAGE = https://fastnetmon.com/guides/ @@ -51,7 +50,8 @@ -e 's,/etc,${SYSCONFDIR}/fastnetmon,g' \ -e 's,/usr/local,${PREFIX},g' \ ${WRKSRC}/fast_platform.h.template \ - ${WRKSRC}/fastnetmon.conf ${WRKSRC}/scripts/* + ${WRKSRC}/fastnetmon.conf ${WRKSRC}/scripts/*pl \ + ${WRKSRC}/scripts/*py ${WRKSRC}/scripts/*sh post-install: ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/fastnetmon/ Index: distinfo =================================================================== RCS file: /cvs/ports/net/fastnetmon/Attic/distinfo,v diff -u -r1.5 distinfo --- distinfo 13 Sep 2020 07:59:58 -0000 1.5 +++ distinfo 20 May 2026 07:15:59 -0000 @@ -1,2 +1,2 @@ -SHA256 (fastnetmon-1.1.7.tar.gz) = qlPCT+OSfSsLY/iInq4TSwKsu6G+5SRI3sgTz9DpR5E= -SIZE (fastnetmon-1.1.7.tar.gz) = 871242 +SHA256 (fastnetmon-1.2.8.tar.gz) = 0WkBsAlj85UkHIGNAq0nUfFOM/0y7TyzARZBq2gODQE= +SIZE (fastnetmon-1.2.8.tar.gz) = 1476794 Index: patches/patch-src_CMakeLists_txt =================================================================== RCS file: /cvs/ports/net/fastnetmon/patches/Attic/patch-src_CMakeLists_txt,v diff -u -r1.6 patch-src_CMakeLists_txt --- patches/patch-src_CMakeLists_txt 11 Mar 2022 19:45:58 -0000 1.6 +++ patches/patch-src_CMakeLists_txt 20 May 2026 07:15:59 -0000 @@ -1,59 +1,50 @@ Index: src/CMakeLists.txt --- src/CMakeLists.txt.orig +++ src/CMakeLists.txt -@@ -472,7 +472,7 @@ endif() - find_path(HIREDIS_INCLUDES_FOLDER NAMES hiredis/hiredis.h PATHS "${HIREDIS_CUSTOM_INSTALL_PATH}/include" NO_DEFAULT_PATH) +@@ -871,7 +871,7 @@ endif() + find_path(HIREDIS_INCLUDES_FOLDER NAMES hiredis/hiredis.h PATHS "${HIREDIS_CUSTOM_INSTALL_PATH}/include" ${DISABLE_DEFAULT_PATH_SEARCH_VAR}) # Try to find hiredis library path --find_library(HIREDIS_LIBRARY_PATH NAMES hiredis PATHS "${HIREDIS_CUSTOM_INSTALL_PATH}/lib" NO_DEFAULT_PATH) +-find_library(HIREDIS_LIBRARY_PATH NAMES hiredis PATHS "${HIREDIS_CUSTOM_INSTALL_PATH}/lib" ${DISABLE_DEFAULT_PATH_SEARCH_VAR}) +find_library(HIREDIS_LIBRARY_PATH NAMES hiredis) if (HIREDIS_INCLUDES_FOLDER AND HIREDIS_LIBRARY_PATH) - message(STATUS "We found hiredis library and will build Redis support ${HIREDIS_INCLUDES_FOLDER} ${HIREDIS_LIBRARY_PATH}") -@@ -525,7 +525,7 @@ endif() - find_path(LOG4CPP_INCLUDES_FOLDER NAMES log4cpp/Appender.hh PATHS "${LOG4CPP_CUSTOM_INSTALL_PATH}/include" NO_DEFAULT_PATH) + message(STATUS "We found hiredis library ${HIREDIS_INCLUDES_FOLDER} ${HIREDIS_LIBRARY_PATH}") +@@ -964,7 +964,7 @@ endif() + find_path(LOG4CPP_INCLUDES_FOLDER NAMES log4cpp/Appender.hh PATHS "${LOG4CPP_CUSTOM_INSTALL_PATH}/include" ${DISABLE_DEFAULT_PATH_SEARCH_VAR}) # Try to find log4cpp library path --find_library(LOG4CPP_LIBRARY_PATH NAMES log4cpp PATHS "${LOG4CPP_CUSTOM_INSTALL_PATH}/lib" NO_DEFAULT_PATH) +-find_library(LOG4CPP_LIBRARY_PATH NAMES log4cpp PATHS "${LOG4CPP_CUSTOM_INSTALL_PATH}/lib" ${DISABLE_DEFAULT_PATH_SEARCH_VAR}) +find_library(LOG4CPP_LIBRARY_PATH NAMES log4cpp) if (LOG4CPP_INCLUDES_FOLDER AND LOG4CPP_LIBRARY_PATH) include_directories(${LOG4CPP_INCLUDES_FOLDER}) -@@ -537,7 +537,7 @@ endif() - ### Look for jsonc - - find_path(JSONC_INCLUDES_FOLDER NAMES json-c/json.h PATHS "${JSONC_CUSTOM_INSTALL_PATH}/include" NO_DEFAULT_PATH) --find_library(JSONC_LIBRARY_PATH NAMES json-c PATHS "${JSONC_CUSTOM_INSTALL_PATH}/lib" NO_DEFAULT_PATH) -+find_library(JSONC_LIBRARY_PATH NAMES json-c) - - if (JSONC_INCLUDES_FOLDER AND JSONC_LIBRARY_PATH) - include_directories(${JSONC_INCLUDES_FOLDER}) -@@ -665,9 +665,9 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" OR ${CMAKE - set(CMAKE_INSTALL_SBINDIR "bin") - set(CMAKE_INSTALL_SYSCONFDIR "etc") - else() -- set(CMAKE_INSTALL_BINDIR "/usr/bin") -- set(CMAKE_INSTALL_SBINDIR "/usr/sbin") -- set(CMAKE_INSTALL_SYSCONFDIR "/etc") +@@ -1147,6 +1147,10 @@ elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + endif() + elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") + message(STATUS "We run on Apple platform") ++elseif(${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD") + set(CMAKE_INSTALL_BINDIR "${PREFIX}/bin") + set(CMAKE_INSTALL_SBINDIR "${PREFIX}/sbin") + set(CMAKE_INSTALL_SYSCONFDIR "${PREFIX}/share/examples/fastnetmon") - endif() - - install(TARGETS fastnetmon DESTINATION "${CMAKE_INSTALL_SBINDIR}") -@@ -675,13 +675,9 @@ install(TARGETS fastnetmon_client DESTINATION "${CMAKE + else() + message(STATUS "We run on platform ${CMAKE_SYSTEM_NAME} and we do not touch install paths") + # Do not touch these variables and use default values +@@ -1157,10 +1161,6 @@ install(TARGETS fastnetmon_client DESTINATION "${CMAKE + install(TARGETS fastnetmon_api_client DESTINATION "${CMAKE_INSTALL_BINDIR}") install(FILES fastnetmon.conf DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}") - +- -# Install blank files for networks list and whitelist -install(FILES networks_list DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}") -install(FILES networks_whitelist DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}") -- - # man pages --install(FILES man/fastnetmon.1 DESTINATION /usr/share/man/man1) --install(FILES man/fastnetmon_client.1 DESTINATION /usr/share/man/man1) -+install(FILES man/fastnetmon.1 DESTINATION ${PREFIX}/man/man1) -+install(FILES man/fastnetmon_client.1 DESTINATION ${PREFIX}/man/man1) - # service files - if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + # man pages + install(FILES man/fastnetmon.8 DESTINATION ${CMAKE_INSTALL_MANDIR}/man8) +@@ -1216,4 +1216,4 @@ if (ENABLE_FUZZ_TEST_DESOCK) + target_link_libraries(fastnetmon desock) + endif() + +- +\ No newline at end of file ++ Index: patches/patch-src_fast_endianless_hpp =================================================================== RCS file: /cvs/ports/net/fastnetmon/patches/Attic/patch-src_fast_endianless_hpp,v diff -u -r1.2 patch-src_fast_endianless_hpp --- patches/patch-src_fast_endianless_hpp 11 Mar 2022 19:45:58 -0000 1.2 +++ patches/patch-src_fast_endianless_hpp 20 May 2026 07:15:59 -0000 @@ -1,11 +1,12 @@ Index: src/fast_endianless.hpp --- src/fast_endianless.hpp.orig +++ src/fast_endianless.hpp -@@ -1,5 +1,7 @@ - #pragma once - +@@ -5,6 +5,8 @@ + #ifdef _WIN32 + #include <winsock2.h> + #else +// For int32_t +#include <sys/types.h> #include <arpa/inet.h> + #endif - // Linux standard functions for endian conversions are ugly because there are no checks about arguments length Index: patches/patch-src_fast_library_cpp =================================================================== RCS file: /cvs/ports/net/fastnetmon/patches/Attic/patch-src_fast_library_cpp,v diff -u -r1.5 patch-src_fast_library_cpp --- patches/patch-src_fast_library_cpp 11 Mar 2022 19:45:58 -0000 1.5 +++ patches/patch-src_fast_library_cpp 20 May 2026 07:15:59 -0000 @@ -1,9 +1,11 @@ +https://github.com/freebsd/freebsd-ports/blob/f009564d752e90a9070d32d97b901964044134c4/net-mgmt/fastnetmon/files/patch-fast__library.cpp + Index: src/fast_library.cpp --- src/fast_library.cpp.orig +++ src/fast_library.cpp -@@ -29,6 +29,11 @@ - #include <sys/endian.h> - #endif +@@ -36,6 +36,11 @@ + + #include "iana_ip_protocols.hpp" +// For pthread_set_name_np +#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__OpenBSD__) @@ -13,7 +15,28 @@ boost::regex regular_expression_cidr_pattern("^\\d+\\.\\d+\\.\\d+\\.\\d+\\/\\d+$"); boost::regex regular_expression_host_pattern("^\\d+\\.\\d+\\.\\d+\\.\\d+$"); -@@ -1246,12 +1251,16 @@ bool set_boost_process_name(boost::thread* thread, std +@@ -1094,15 +1099,13 @@ std::string serialize_network_load_to_text(subnet_coun + + std::string dns_lookup(std::string domain_name) { + try { +- boost::asio::io_service io_service; +- boost::asio::ip::tcp::resolver resolver(io_service); ++ boost::asio::io_context io_context; ++ boost::asio::ip::tcp::resolver resolver(io_context); + +- boost::asio::ip::tcp::resolver::query query(domain_name, ""); ++ auto results = resolver.resolve(domain_name, ""); + +- for (boost::asio::ip::tcp::resolver::iterator i = resolver.resolve(query); +- i != boost::asio::ip::tcp::resolver::iterator(); ++i) { +- boost::asio::ip::tcp::endpoint end = *i; +- return end.address().to_string(); ++ for (const auto& entry : results) { ++ return entry.endpoint().address().to_string(); + } + } catch (std::exception& e) { + return ""; +@@ -1204,12 +1207,16 @@ bool set_boost_process_name(boost::thread* thread, con char new_process_name[16]; strcpy(new_process_name, process_name.c_str()); @@ -30,3 +53,35 @@ return true; } +@@ -1428,7 +1435,7 @@ bool validate_ipv6_or_ipv4_host(const std::string host + boost::system::error_code ec; + + // Try to build it from string representation +- boost::asio::ip::address::from_string(host, ec); ++ boost::asio::ip::make_address(host, ec); + + // If we failed to parse it + if (ec) { +@@ -1535,7 +1542,7 @@ bool execute_web_request_secure(std::string address, + return false; + } + +- auto end_point = resolver.resolve(boost::asio::ip::tcp::resolver::query{ host, port }, ec); ++ auto end_point = resolver.resolve( host, port, ec); + + if (ec) { + logger << log4cpp::Priority::ERROR << "Could not resolve peer address in execute_web_request " << ec; +@@ -1699,11 +1706,11 @@ bool execute_web_request(std::string address, + + // Normal boost::asio setup + // std::string const host = "178.62.227.110"; +- boost::asio::io_service ios; ++ boost::asio::io_context ios; + boost::asio::ip::tcp::resolver r(ios); + boost::asio::ip::tcp::socket sock(ios); + +- auto end_point = r.resolve(boost::asio::ip::tcp::resolver::query{ host, port }, ec); ++ auto end_point = r.resolve(host, port, ec); + + if (ec) { + error_text = "Could not resolve peer address in execute_web_request " + ec.message();
