summaryrefslogtreecommitdiff
path: root/net-analyzer/ippl
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-06-04 05:48:38 -0500
committerroot <root@alpha.trunkmasters.com>2026-06-04 05:48:38 -0500
commitbfd9c39e4712ebdb442d4ca0673061faed1e70e1 (patch)
tree0d7a74b4463ee387f9cf9368ceb1b757f694f72a /net-analyzer/ippl
parentf716a9fe6455d39eef01e718aae68dae61c19704 (diff)
downloadbaldeagleos-repo-bfd9c39e4712ebdb442d4ca0673061faed1e70e1.tar.gz
baldeagleos-repo-bfd9c39e4712ebdb442d4ca0673061faed1e70e1.tar.xz
baldeagleos-repo-bfd9c39e4712ebdb442d4ca0673061faed1e70e1.zip
Revert "Adding metadata"
This reverts commit f716a9fe6455d39eef01e718aae68dae61c19704.
Diffstat (limited to 'net-analyzer/ippl')
-rw-r--r--net-analyzer/ippl/Manifest1
-rw-r--r--net-analyzer/ippl/files/ippl-1.4.14-fix-build-system.patch44
-rw-r--r--net-analyzer/ippl/files/ippl-1.4.14-format-warnings.patch20
-rw-r--r--net-analyzer/ippl/files/ippl-1.4.14-includes.patch20
-rw-r--r--net-analyzer/ippl/files/ippl-1.4.14-lto.patch31
-rw-r--r--net-analyzer/ippl/files/ippl-1.4.14-manpage.patch15
-rw-r--r--net-analyzer/ippl/files/ippl-1.4.14-musl.patch301
-rw-r--r--net-analyzer/ippl/files/ippl-1.4.14-noportresolve.patch347
-rw-r--r--net-analyzer/ippl/files/ippl-1.4.14-privilege-drop.patch140
-rw-r--r--net-analyzer/ippl/files/ippl.rc30
-rw-r--r--net-analyzer/ippl/ippl-1.4.14-r7.ebuild55
-rw-r--r--net-analyzer/ippl/metadata.xml8
12 files changed, 1012 insertions, 0 deletions
diff --git a/net-analyzer/ippl/Manifest b/net-analyzer/ippl/Manifest
new file mode 100644
index 000000000000..31f32a3c1b9d
--- /dev/null
+++ b/net-analyzer/ippl/Manifest
@@ -0,0 +1 @@
+DIST ippl-1.4.14.tar.gz 54030 BLAKE2B 384747ea50e55e52695606538850958320afe53dbe3c71e42c90302dff0b535d2167d18a40f0b2953f941cda1aa238490bfe7b7fde8f675071668ea5f561af74 SHA512 3d71afc3ec7a0420cc9b269bf67dc008a777464c68d233dfbad4ee7a2dd2b960e114500e42866977e31b9dbeee26bbefea937fef8a09aa41cf87f96361ba0088
diff --git a/net-analyzer/ippl/files/ippl-1.4.14-fix-build-system.patch b/net-analyzer/ippl/files/ippl-1.4.14-fix-build-system.patch
new file mode 100644
index 000000000000..c6c65cb14d50
--- /dev/null
+++ b/net-analyzer/ippl/files/ippl-1.4.14-fix-build-system.patch
@@ -0,0 +1,44 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -11,10 +11,10 @@
+ all: binary docs
+
+ binary: Makefile Source/Makefile
+- @cd Source && make && cd ..
++ @cd Source && $(MAKE) && cd ..
+
+ docs:
+- @cd Docs && make && cd ..
++ @cd Docs && $(MAKE) && cd ..
+
+ install: all
+ $(INSTALL) -d -m 755 $(SBINDIR)
+@@ -29,7 +29,7 @@
+ $(INSTALL) -m 644 Docs/ippl.conf.5 $(MANDIR)/man5/ippl.conf.5
+
+ clean:
+- @cd Source && make clean && cd .. && cd Docs && make clean && cd ..
++ @cd Source && $(MAKE) clean && cd .. && cd Docs && $(MAKE) clean && cd ..
+
+ distclean: clean
+ $(RM) *~ Makefile.common Makefile Source/Makefile Docs/Makefile build-stamp install-stamp
+--- a/Source/Makefile.in
++++ b/Source/Makefile.in
+@@ -10,7 +10,7 @@
+ CC=@CC@
+ CFLAGS=@CFLAGS@
+ WARNINGS=-Wall@PEDANTIC@
+-LDFLAGS=
++LDFLAGS=@LDFLAGS@
+
+ SRCS= main.c \
+ configuration.c \
+@@ -49,7 +49,7 @@
+ y.tab.c: ippl.y Makefile ../Makefile.common
+ $(YACC) -d $<
+
+-lex.yy.c: ippl.l Makefile ../Makefile.common
++lex.yy.c: ippl.l y.tab.c Makefile ../Makefile.common
+ $(LEX) $<
+
+ clean:
diff --git a/net-analyzer/ippl/files/ippl-1.4.14-format-warnings.patch b/net-analyzer/ippl/files/ippl-1.4.14-format-warnings.patch
new file mode 100644
index 000000000000..db6cfcd7e1d0
--- /dev/null
+++ b/net-analyzer/ippl/files/ippl-1.4.14-format-warnings.patch
@@ -0,0 +1,20 @@
+--- a/Source/log.c
++++ b/Source/log.c
+@@ -147,7 +147,7 @@
+ }
+
+ if (repeats > 0) {
+- snprintf(date, 27, asctime(localtime(&last_repeat)));
++ snprintf(date, 27, "%s", asctime(localtime(&last_repeat)));
+ snprintf(repeat_message, 40, "last message repeated %d time(s)\n", repeats);
+ write(fd, date+4, strlen(date)-10);
+ write(fd, " ", 1);
+@@ -155,7 +155,7 @@
+ repeats = 0;
+ }
+
+- snprintf(date, 27, asctime(localtime(&current)));
++ snprintf(date, 27, "%s", asctime(localtime(&current)));
+ write(fd, date+4, strlen(date)-10);
+ write(fd, " ", 1);
+ write(fd, entry, (strlen(entry) < 1023) ? strlen(entry) : 1023 );
diff --git a/net-analyzer/ippl/files/ippl-1.4.14-includes.patch b/net-analyzer/ippl/files/ippl-1.4.14-includes.patch
new file mode 100644
index 000000000000..12b2832fa342
--- /dev/null
+++ b/net-analyzer/ippl/files/ippl-1.4.14-includes.patch
@@ -0,0 +1,20 @@
+--- a/Source/filter.c
++++ b/Source/filter.c
+@@ -22,6 +22,7 @@
+
+ #include <stdlib.h>
+ #include <ctype.h>
++#include <string.h> /* memcpy() */
+
+ #include <fnmatch.h>
+
+--- a/Source/main.c
++++ b/Source/main.c
+@@ -37,6 +37,7 @@
+ #include <pwd.h>
+ #include <stdlib.h>
+ #include <getopt.h>
++#include <grp.h> /* initgroups() */
+
+ #include "defines.h"
+ #include "configuration.h"
diff --git a/net-analyzer/ippl/files/ippl-1.4.14-lto.patch b/net-analyzer/ippl/files/ippl-1.4.14-lto.patch
new file mode 100644
index 000000000000..2e26b6dbd9cf
--- /dev/null
+++ b/net-analyzer/ippl/files/ippl-1.4.14-lto.patch
@@ -0,0 +1,31 @@
+Holger Hoffstätte 2025-02-12 14:33:04 UTC
+As mentioned on IRC:
+
+The only uses of last_message in configuration.c are
+to initialize the buffer with a terminating null. It
+seems much easier to move the initialization to log.c
+and just remove the declaration/initialization from
+configuration.c.
+
+As there is already an initialisation of the buffer
+in log.c all that's needed is to zap the two unnecessary
+lines:
+
+--- a/Source/configuration.c
++++ b/Source/configuration.c
+@@ -67,7 +67,6 @@ void set_default_values() {
+ extern unsigned short log_closing;
+ extern unsigned short use_ident;
+ extern unsigned int repeats;
+- extern char *last_message;
+
+ dns_expire = DNS_EXPIRE;
+ log_protocols = NONE;
+@@ -79,7 +78,6 @@ void set_default_values() {
+ log_closing = FALSE;
+ use_ident = FALSE;
+ repeats = 0;
+- last_message = '\0';
+ }
+
+ void parse_config_file(char *filename) {
diff --git a/net-analyzer/ippl/files/ippl-1.4.14-manpage.patch b/net-analyzer/ippl/files/ippl-1.4.14-manpage.patch
new file mode 100644
index 000000000000..d17e5939cdee
--- /dev/null
+++ b/net-analyzer/ippl/files/ippl-1.4.14-manpage.patch
@@ -0,0 +1,15 @@
+patch by Marc Haber <mh+debian-packages@zugschlus.de>
+
+--- a/Docs/ippl.conf.man
++++ b/Docs/ippl.conf.man
+@@ -222,9 +222,7 @@
+ .SS Protocol
+ .PP
+ protocol is one of the supported protocols (see the protocols
+-section), except the
+-.I all
+-keyword, which is not supported.
++section).
+
+ .SS Description
+ .PP
diff --git a/net-analyzer/ippl/files/ippl-1.4.14-musl.patch b/net-analyzer/ippl/files/ippl-1.4.14-musl.patch
new file mode 100644
index 000000000000..44596aac3b4a
--- /dev/null
+++ b/net-analyzer/ippl/files/ippl-1.4.14-musl.patch
@@ -0,0 +1,301 @@
+Add missing includes. For some non-POSIX integer types and open()
+Rename global logging facility so it won't try to shadow musl-provided symbol
+and cause build failures
+udphdr union has two variants - RFC and BSD flavors, glibc uses union,
+musl uses BSD flavor in netinet/udp.h with linux/udp.h for RFC flavor.
+Switched header to linux.
+https://bugs.gentoo.org/716916
+https://bugs.gentoo.org/731184
+--- a/Source/defines.h
++++ b/Source/defines.h
+@@ -62,6 +62,7 @@
+
+ /* Useful types */
+ #ifndef _I386_TYPES_H
++#include <sys/types.h>
+ typedef u_int32_t __u32;
+ typedef u_int16_t __u16;
+ typedef u_int8_t __u8;
+--- a/Source/pidfile.c
++++ b/Source/pidfile.c
+@@ -31,6 +31,7 @@
+ #include <string.h>
+ #include <errno.h>
+ #include <signal.h>
++#include <fcntl.h>
+
+ /* read_pid
+ *
+--- a/Source/configuration.c
++++ b/Source/configuration.c
+@@ -39,11 +39,11 @@
+
+ FILE *open_configuration(char *name) {
+ FILE *configfile;
+- extern struct loginfo log;
++ extern struct loginfo local_log;
+
+ configfile = fopen(name, "r");
+ if (configfile == NULL) {
+- log.log(log.level_or_fd, "Cannot open configuration file %s.\n", name);
++ local_log.log(local_log.level_or_fd, "Cannot open configuration file %s.\n", name);
+ exit(1);
+ }
+ return configfile;
+--- a/Source/icmp.c
++++ b/Source/icmp.c
+@@ -46,7 +46,7 @@
+ int icmp_socket;
+
+ struct loginfo icmp_log;
+-extern struct loginfo log;
++extern struct loginfo local_log;
+ extern unsigned short resolve_protocols;
+
+ /*
+@@ -299,7 +299,7 @@
+ icmp_socket = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP);
+ if (icmp_socket <= 0) {
+ int error = errno;
+- log.log(log.level_or_fd, "FATAL: Unable to open icmp raw socket\nERROR No: %d\nERROR : %s", error, strerror(error));
++ local_log.log(local_log.level_or_fd, "FATAL: Unable to open icmp raw socket\nERROR No: %d\nERROR : %s", error, strerror(error));
+ exit(1);
+ }
+
+@@ -311,7 +311,7 @@
+
+ for(;;) {
+ if (read(icmp_socket, (__u8 *) &pkt, ICMP_CAPTURE_LENGTH) == -1) {
+- log.log(log.level_or_fd, "FATAL: Unable to read icmp raw socket");
++ local_log.log(local_log.level_or_fd, "FATAL: Unable to read icmp raw socket");
+ exit(1);
+ }
+
+--- a/Source/log.c
++++ b/Source/log.c
+@@ -32,7 +32,7 @@
+
+ #include "log.h"
+
+-extern struct loginfo log;
++extern struct loginfo local_log;
+
+ /* Mutex either for stdout or for a file */
+ pthread_mutex_t log_mutex = PTHREAD_MUTEX_INITIALIZER;
+@@ -193,7 +193,7 @@
+
+ *fd = open((const char *) filename, O_WRONLY | O_APPEND | O_CREAT, 0640);
+ if (*fd == 0) {
+- log.log(log.level_or_fd, "Can't open log file %s.", filename);
++ local_log.log(local_log.level_or_fd, "Can't open log file %s.", filename);
+ }
+ }
+
+--- a/Source/main.c
++++ b/Source/main.c
+@@ -54,7 +54,7 @@
+ #endif
+
+ /* Logging mechanism */
+-struct loginfo log;
++struct loginfo local_log;
+
+ /* Do we have to run as a daemon? */
+ int run_as_daemon = TRUE;
+@@ -127,17 +127,17 @@
+
+ account = getpwnam(used_user);
+ if (!account) {
+- log.log(log.level_or_fd, "WARNING: I cannot find the \"%s\" account. Not spawning threads.", used_user);
++ local_log.log(local_log.level_or_fd, "WARNING: I cannot find the \"%s\" account. Not spawning threads.", used_user);
+ log_protocols = NONE;
+ return;
+ }
+
+ if (!strcmp(used_user, "root")) {
+- log.log(log.level_or_fd, "WARNING: Using root account to run threads!");
++ local_log.log(local_log.level_or_fd, "WARNING: Using root account to run threads!");
+ }
+
+ if (log_protocols == NONE) {
+- log.log(log.level_or_fd, "WARNING: Nothing to log.");
++ local_log.log(local_log.level_or_fd, "WARNING: Nothing to log.");
+ return;
+ }
+
+@@ -309,7 +309,7 @@
+
+ /* Check PID */
+ if (check_pid(PID_FILE)) {
+- log.log(log.level_or_fd, "Already running. Exiting...");
++ local_log.log(local_log.level_or_fd, "Already running. Exiting...");
+ exit(1);
+ }
+
+@@ -323,7 +323,7 @@
+
+ /* Write PID file */
+ if (!write_pid(PID_FILE)) {
+- log.log(log.level_or_fd, "Can't write pid.\n");
++ local_log.log(local_log.level_or_fd, "Can't write pid.\n");
+ exit(1);
+ }
+
+@@ -360,7 +360,7 @@
+ (void) remove_pid(PID_FILE);
+ }
+
+- log.log(log.level_or_fd, "IP Protocols Logger: stopped (signal %d).", sig);
++ local_log.log(local_log.level_or_fd, "IP Protocols Logger: stopped (signal %d).", sig);
+
+ exit(0);
+ }
+@@ -372,8 +372,8 @@
+ */
+ void sighup(int sig) {
+ // DEPRECATED - reload_configuration();
+- // log.log(log.level_or_fd, "IP Protocols Logger: reloaded configuration.");
+- log.log(log.level_or_fd, "IP Protocols Logger: reload configuration is unsupported.");
++ // local_log.log(local_log.level_or_fd, "IP Protocols Logger: reloaded configuration.");
++ local_log.log(local_log.level_or_fd, "IP Protocols Logger: reload configuration is unsupported.");
+ die(sig);
+ signal(SIGHUP, sighup);
+ }
+@@ -412,15 +412,15 @@
+ if (configuration_file == NULL)
+ configuration_file = strdup(CONFIGURATION_FILE);
+
+- init_loginfo(&log);
+- log.open(&log.level_or_fd, log.file);
++ init_loginfo(&local_log);
++ local_log.open(&local_log.level_or_fd, local_log.file);
+
+ if (run_as_daemon) {
+ go_background();
+ }
+
+ start_all_threads();
+- log.log(log.level_or_fd, "IP Protocols Logger: started.");
++ local_log.log(local_log.level_or_fd, "IP Protocols Logger: started.");
+
+ for(;;) {
+ sleep(dns_expire);
+--- a/Source/netutils.c
++++ b/Source/netutils.c
+@@ -34,7 +34,7 @@
+ #include "netutils.h"
+ #include "log.h"
+
+-extern struct loginfo log;
++extern struct loginfo local_log;
+
+ /* Mutexes */
+ pthread_mutex_t service_mutex = PTHREAD_MUTEX_INITIALIZER;
+@@ -96,7 +96,7 @@
+ pthread_mutex_unlock(&dns_mutex);
+
+ #ifdef CACHE_DEBUG
+- log.log(log.level_or_fd, "DEBUG cache: cleared %d entries", dbg_freed);
++ local_log.log(local_log.level_or_fd, "DEBUG cache: cleared %d entries", dbg_freed);
+ #endif
+ }
+
+@@ -121,7 +121,7 @@
+
+ #ifdef CACHE_DEBUG
+ if (dbg_calls % DUMP_EVERY == 0)
+- log.log(log.level_or_fd, "DEBUG cache: %d calls - %d misses", dbg_calls, dbg_missed);
++ local_log.log(local_log.level_or_fd, "DEBUG cache: %d calls - %d misses", dbg_calls, dbg_missed);
+
+ dbg_calls++;
+ #endif
+@@ -165,8 +165,8 @@
+ #endif
+ res = perform_lookup(host, in);
+ #ifdef CACHE_DEBUG
+- log.log(log.level_or_fd, "DEBUG cache: result of lookup - %s", host);
+- log.log(log.level_or_fd, "DEBUG cache: replacing (%d; %d; %d; %s)", key, table[key].ip, table[key].dirty, table[key].name);
++ local_log.log(local_log.level_or_fd, "DEBUG cache: result of lookup - %s", host);
++ local_log.log(local_log.level_or_fd, "DEBUG cache: replacing (%d; %d; %d; %s)", key, table[key].ip, table[key].dirty, table[key].name);
+ #endif
+ /* Now host contains the correct value; store it in the table */
+ table[key].ip = in;
+--- a/Source/tcp.c
++++ b/Source/tcp.c
+@@ -51,7 +51,7 @@
+ int tcp_socket;
+
+ struct loginfo tcp_log;
+-extern struct loginfo log;
++extern struct loginfo local_log;
+ extern unsigned short resolve_protocols;
+ extern unsigned short portresolve_protocols;
+
+@@ -262,7 +262,7 @@
+ tcp_socket = socket(AF_INET, SOCK_RAW, IPPROTO_TCP);
+ if (tcp_socket <= 0) {
+ int error = errno;
+- log.log(log.level_or_fd, "FATAL: Unable to open tcp raw socket\nERROR No: %d\nERROR : %s", error, strerror(error));
++ local_log.log(local_log.level_or_fd, "FATAL: Unable to open tcp raw socket\nERROR No: %d\nERROR : %s", error, strerror(error));
+ exit(1);
+ }
+
+@@ -274,7 +274,7 @@
+
+ for(;;) {
+ if (read(tcp_socket, (__u8 *) &pkt, TCP_CAPTURE_LENGTH) == -1) {
+- log.log(log.level_or_fd, "FATAL: Unable to read tcp raw socket");
++ local_log.log(local_log.level_or_fd, "FATAL: Unable to read tcp raw socket");
+ exit(1);
+ }
+
+--- a/Source/ippl.y
++++ b/Source/ippl.y
+@@ -535,7 +535,7 @@
+ */
+
+ void print_error(char *s, int l) {
+- extern struct loginfo log;
++ extern struct loginfo local_log;
+
+- log.log(log.level_or_fd, "CFG: Parse error line %d: %s",l,s);
++ local_log.log(local_log.level_or_fd, "CFG: Parse error line %d: %s",l,s);
+ }
+--- a/Source/udp.c
++++ b/Source/udp.c
+@@ -21,7 +21,7 @@
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+ #include <netinet/ip.h>
+-#include <netinet/udp.h>
++#include <linux/udp.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netdb.h>
+@@ -48,7 +48,7 @@
+ extern unsigned short resolve_protocols;
+
+ struct loginfo udp_log;
+-extern struct loginfo log;
++extern struct loginfo local_log;
+
+ /*
+ * Structure of a UDP packet
+@@ -141,7 +141,7 @@
+ udp_socket = socket(AF_INET, SOCK_RAW, IPPROTO_UDP);
+ if (udp_socket <= 0) {
+ int error = errno;
+- log.log(log.level_or_fd, "FATAL: Unable to open udp raw socket\nERROR No: %d\nERROR : %s", error, strerror(error));
++ local_log.log(local_log.level_or_fd, "FATAL: Unable to open udp raw socket\nERROR No: %d\nERROR : %s", error, strerror(error));
+ exit(1);
+ }
+
+@@ -153,7 +153,7 @@
+
+ for(;;) {
+ if (read(udp_socket, (__u8 *) &pkt, UDP_CAPTURE_LENGTH) == -1) {
+- log.log(log.level_or_fd, "FATAL: Unable to read udp raw socket");
++ local_log.log(local_log.level_or_fd, "FATAL: Unable to read udp raw socket");
+ exit(1);
+ }
+
diff --git a/net-analyzer/ippl/files/ippl-1.4.14-noportresolve.patch b/net-analyzer/ippl/files/ippl-1.4.14-noportresolve.patch
new file mode 100644
index 000000000000..919623040f7f
--- /dev/null
+++ b/net-analyzer/ippl/files/ippl-1.4.14-noportresolve.patch
@@ -0,0 +1,347 @@
+patch by Marc Haber <mh+debian-packages@zugschlus.de>
+
+--- a/Docs/ippl.conf.man
++++ b/Docs/ippl.conf.man
+@@ -92,6 +92,13 @@
+ .PP
+ By default, IP address resolution is disabled for all the protocols.
+
++Ippl by default resolves tcp/udp port numbers to their respective
++service names. If you pass a protocol to the noportresolve option,
++ippl logs the port number instead. This is a Debian specific extension.
++
++By default service resolving is enabled, since this is the behaviour
++of the upstream program.
++
+ .SH LOGGING FORMAT
+
+ .BR ippl
+@@ -198,6 +205,12 @@
+ .I noresolve
+ disable IP address resolution.
+ .PP
++.I portresolve
++enable IP service resolution.
++.PP
++.I noportresolve
++disable IP service resolution.
++.PP
+ .I ident
+ use ident logging (only for TCP).
+ .PP
+
+--- a/Source/configuration.c
++++ b/Source/configuration.c
+@@ -60,6 +60,7 @@
+ extern unsigned int dns_expire;
+ extern unsigned short log_protocols;
+ extern unsigned short resolve_protocols;
++ extern unsigned short portresolve_protocols;
+ extern unsigned short icmp_format;
+ extern unsigned short tcp_format;
+ extern unsigned short udp_format;
+@@ -71,6 +72,7 @@
+ dns_expire = DNS_EXPIRE;
+ log_protocols = NONE;
+ resolve_protocols = 0; /* Do not resolve by default */
++ portresolve_protocols = RUN_TCP | RUN_UDP | RUN_ICMP; /* Resolve by default */
+ icmp_format = LOGFORMAT_NORMAL;
+ tcp_format = LOGFORMAT_NORMAL;
+ udp_format = LOGFORMAT_NORMAL;
+
+--- a/Source/filter.c
++++ b/Source/filter.c
+@@ -46,6 +46,7 @@
+
+ extern unsigned short use_ident;
+ extern unsigned short resolve_protocols;
++extern unsigned short portresolve_protocols;
+ extern unsigned short icmp_format;
+ extern unsigned short tcp_format;
+ extern unsigned short udp_format;
+@@ -66,7 +67,7 @@
+ #ifdef FILTER_DEBUG
+ void display_info(struct log_info *info, int entries) {
+
+- log.log(log.level_or_fd, "DBG: (e:%d) log:%d ident:%d resolve:%d closing:%d format:%d", entries, info->log, info->ident, info->resolve, info->logclosing, info->logformat);
++ log.log(log.level_or_fd, "DBG: (e:%d) log:%d ident:%d resolve:%d portresolve: %d, closing:%d format:%d", entries, info->log, info->ident, info->resolve, info->portresolve, info->logclosing, info->logformat);
+ }
+ #endif
+
+@@ -200,6 +201,19 @@
+ break;
+ }
+ }
++ if (info->portresolve == -1) {
++ switch (protocol) {
++ case IPPROTO_ICMP:
++ info->portresolve = portresolve_protocols & RUN_ICMP;
++ break;
++ case IPPROTO_TCP:
++ info->portresolve = portresolve_protocols & RUN_TCP;
++ break;
++ case IPPROTO_UDP:
++ info->portresolve = portresolve_protocols & RUN_UDP;
++ break;
++ }
++ }
+ }
+
+ struct log_info do_log(const __u32 from, const __u32 to, const __u16 type, const __u16 srctype, const short protocol) {
+@@ -244,6 +258,7 @@
+ info.log = p->log;
+ info.ident = p->ident;
+ info.resolve = p->resolve;
++ info.portresolve = p->portresolve;
+ info.logformat = p->logformat;
+ info.logclosing = p->logclosing;
+ set_defaults(protocol, &info);
+@@ -265,6 +280,7 @@
+ info.log = p->log;
+ info.ident = p->ident;
+ info.resolve = p->resolve;
++ info.portresolve = p->portresolve;
+ info.logformat = p->logformat;
+ set_defaults(protocol, &info);
+ #ifdef FILTER_DEBUG
+@@ -280,7 +296,7 @@
+ info.log = TRUE;
+ info.ident = use_ident;
+ info.logclosing = log_closing;
+- info.logformat = info.resolve = -1;
++ info.logformat = info.resolve = info.portresolve = -1;
+ set_defaults(protocol, &info);
+
+ #ifdef FILTER_DEBUG
+
+--- a/Source/filter.h
++++ b/Source/filter.h
+@@ -53,6 +53,7 @@
+ struct filter_entry {
+ short log; /* TRUE for "log", FALSE for "ignore" */
+ short ident; /* TRUE if we should use ident */
++ short portresolve; /* TRUE if we should resolve TCP/UDP services */
+ short resolve; /* TRUE if we should resolve IP addresses */
+ short logformat; /* format used to log */
+ short logclosing; /* TRUE to log closing TCP connections */
+@@ -72,6 +73,7 @@
+ short log;
+ short ident;
+ short resolve;
++ short portresolve;
+ short logclosing;
+ short logformat;
+ };
+
+--- a/Source/ippl.l
++++ b/Source/ippl.l
+@@ -75,6 +75,9 @@
+ [lL][oO][gG][cC][lL][oO][sS][iI][nN][gG] return LOGCLOSING;
+ [nN][oO][lL][oO][gG][cC][lL][oO][sS][iI][nN][gG] return NOLOGCLOSING;
+
++[nN][oO][pP][oO][rR][tT][rR][eE][sS][oO][lL][vV][eE] return NOPORTRESOLVE;
++[pP][oO][rR][tT][rR][eE][sS][oO][lL][vV][eE] return PORTRESOLVE;
++
+ [nN][oO][rR][eE][sS][oO][lL][vV][eE] return NORESOLVE;
+ [rR][eE][sS][oO][lL][vV][eE] return RESOLVE;
+
+
+--- a/Source/ippl.y
++++ b/Source/ippl.y
+@@ -61,6 +61,7 @@
+
+ /* Should name resolving be done? */
+ unsigned short resolve_protocols;
++unsigned short portresolve_protocols;
+
+ /* Logging format for each protocol */
+ unsigned short icmp_format;
+@@ -100,7 +101,7 @@
+ %token<stringval> IP HOSTMASK IDENTIFIER FILENAME
+ %token<longval> NUMBER
+
+-%token LOGFORMAT DETAILED SHORT NORMAL RESOLVE NORESOLVE IDENT NOIDENT LOGCLOSING NOLOGCLOSING
++%token LOGFORMAT DETAILED SHORT NORMAL RESOLVE NORESOLVE IDENT NOIDENT LOGCLOSING NOLOGCLOSING PORTRESOLVE NOPORTRESOLVE
+ %token RUN RUNAS EXPIRE LOG_IN LOG IGNORE FROM TO TYPE PORT SRCPORT OPTION COMMA
+ %token ICMP TCP UDP ALL
+
+@@ -138,6 +139,11 @@
+ | NORESOLVE ProtoList EOL
+ { resolve_protocols &= ~$2; }
+
++ | PORTRESOLVE ProtoList EOL
++ { portresolve_protocols |= $2; }
++ | NOPORTRESOLVE ProtoList EOL
++ { portresolve_protocols &= ~$2; }
++
+ | LOGCLOSING EOL
+ { log_closing = TRUE; }
+ | NOLOGCLOSING EOL
+@@ -249,6 +255,7 @@
+ switches.log = -1;
+ switches.ident = use_ident;
+ switches.resolve = -1;
++ switches.portresolve = -1;
+ switches.logformat = -1;
+ switches.logclosing = log_closing;
+ }
+@@ -259,6 +266,7 @@
+ $$->ident = switches.ident;
+ $$->logclosing = switches.logclosing;
+ $$->resolve = switches.resolve;
++ $$->portresolve = switches.portresolve;
+ $$->logformat = switches.logformat;
+ $$->protocol = $4.protocol;
+ $$->loginfo = $4.loginfoval;
+@@ -287,6 +295,8 @@
+ | NOIDENT { switches.ident = FALSE; }
+ | RESOLVE { switches.resolve = RUN_ICMP | RUN_TCP | RUN_UDP; }
+ | NORESOLVE { switches.resolve = 0; }
++ | PORTRESOLVE { switches.portresolve = RUN_ICMP | RUN_TCP | RUN_UDP; }
++ | NOPORTRESOLVE { switches.portresolve = 0; }
+ | SHORT { switches.logformat = LOGFORMAT_SHORT; }
+ | NORMAL { switches.logformat = LOGFORMAT_NORMAL; }
+ | DETAILED { switches.logformat = LOGFORMAT_DETAILED; }
+
+--- a/Source/main.c
++++ b/Source/main.c
+@@ -48,6 +48,10 @@
+ #include "filter.h"
+ #include "pidfile.h"
+
++#ifndef PATH_MAX
++#define PATH_MAX 4096
++#endif
++
+ /* Logging mechanism */
+ struct loginfo log;
+
+
+--- a/Source/netutils.c
++++ b/Source/netutils.c
+@@ -237,15 +237,21 @@
+ * Get a service name for a specified protocol
+ */
+
+-void service_lookup(char *proto, char *service, __u16 port) {
++void service_lookup(char *proto, char *service, __u16 port, int portresolve) {
+ struct servent *se;
+
+ pthread_mutex_lock(&service_mutex);
+- se = getservbyport(port, proto);
+- if (se == NULL)
++ if (portresolve)
++ {
++ se = getservbyport(port, proto);
++ if (se == NULL)
++ snprintf(service, SERVICE_LENGTH, "port %d", ntohs(port));
++ else {
++ snprintf(service, SERVICE_LENGTH, "%s", se->s_name);
++ }
++ }
++ else {
+ snprintf(service, SERVICE_LENGTH, "port %d", ntohs(port));
+- else {
+- snprintf(service, SERVICE_LENGTH, "%s", se->s_name);
+ }
+ pthread_mutex_unlock(&service_mutex);
+ }
+
+--- a/Source/netutils.h
++++ b/Source/netutils.h
+@@ -53,6 +53,6 @@
+ const __u32 src_addr, const __u16 src_port,
+ const __u32 dst_addr, const __u16 dst_port);
+
+-void service_lookup(char *proto, char *service, __u16 port);
++void service_lookup(char *proto, char *service, __u16 port, int portresolve);
+
+ #endif
+
+--- a/Source/tcp.c
++++ b/Source/tcp.c
+@@ -51,6 +51,7 @@
+ struct loginfo tcp_log;
+ extern struct loginfo log;
+ extern unsigned short resolve_protocols;
++extern unsigned short portresolve_protocols;
+
+ /*
+ * Structure of a TCP packet
+@@ -88,7 +89,7 @@
+ *details ='\0';
+ host_print(remote_host, IPHDR.saddr,
+ info.resolve);
+- service_lookup("tcp", service, TCPHDR.dest);
++ service_lookup("tcp", service, TCPHDR.dest, info.portresolve);
+ if (info.logformat == LOGFORMAT_DETAILED) {
+ get_details(details,
+ IPHDR.saddr,
+@@ -186,7 +187,7 @@
+ *details ='\0';
+ host_print(remote_host, IPHDR.saddr,
+ info.resolve);
+- service_lookup("tcp", service, TCPHDR.dest);
++ service_lookup("tcp", service, TCPHDR.dest, info.portresolve);
+ if (info.logformat == LOGFORMAT_DETAILED) {
+ get_details(details,
+ IPHDR.saddr,
+
+--- a/Source/udp.c
++++ b/Source/udp.c
+@@ -81,7 +81,7 @@
+ *details ='\0';
+ host_print(remote_host, IPHDR.saddr,
+ info.resolve);
+- service_lookup("udp", service, UDPHDR.dest);
++ service_lookup("udp", service, UDPHDR.dest, info.portresolve);
+ if (info.logformat == LOGFORMAT_DETAILED) {
+ get_details(details,
+ IPHDR.saddr,
+
+--- a/ippl.conf
++++ b/ippl.conf
+@@ -4,13 +4,15 @@
+ # User used
+ # ---------
+ # Specify the user (declared in /etc/passwd) used to run the
+-# logging threads.
+-#runas nobody
++# logging threads. The ippl process visible in the process table
++# is still running as root! Look in /proc/pid/task to see the threads
++# running as ippl
++runas ippl
+
+ # Resolve hostnames?
+ # ------------------
+-# Uncomment the line below to disable DNS lookups
+-#noresolve all
++# Uncomment the line below to enable DNS lookups
++#resolve all
+
+ # Use ident?
+ # ----------
+@@ -38,9 +40,14 @@
+ # ----------------
+ run icmp tcp
+ # Uncomment the line below to log UDP traffic.
+-# See ippl.conf(5) for recommandations.
++# See ippl.conf(5) for recommendations.
+ #run udp
+
++# Resolve tcp/udp port to service name?
++# -------------------------------------
++# portresolve icmp tcp udp
++# Set noportresolve <protocol-list> to log port numbers instead
++
+ # Logging format
+ # ----------------
+ # If you want to see the destination address, the ports, etc
+@@ -63,6 +70,3 @@
+ # Do not log DNS queries
+ #ignore udp port domain
+ #ignore udp srcport domain
+-
+-# End of configuration
+-# Copyright (C) 1998-1999 Hugo Haas - Etienne Bernard
+
diff --git a/net-analyzer/ippl/files/ippl-1.4.14-privilege-drop.patch b/net-analyzer/ippl/files/ippl-1.4.14-privilege-drop.patch
new file mode 100644
index 000000000000..0f6d03684a93
--- /dev/null
+++ b/net-analyzer/ippl/files/ippl-1.4.14-privilege-drop.patch
@@ -0,0 +1,140 @@
+privilege-drop by Marc Haber <mh+debian-packages@zugschlus.de>
+
+--- a/Source/icmp.c
++++ b/Source/icmp.c
+@@ -39,6 +39,8 @@
+ #include "log.h"
+ #include "filter.h"
+ #include "configuration.h"
++#include <string.h>
++#include <errno.h>
+
+ /* Socket */
+ int icmp_socket;
+@@ -296,14 +298,16 @@
+
+ icmp_socket = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP);
+ if (icmp_socket <= 0) {
+- log.log(log.level_or_fd, "FATAL: Unable to open icmp raw socket");
++ int error = errno;
++ log.log(log.level_or_fd, "FATAL: Unable to open icmp raw socket\nERROR No: %d\nERROR : %s", error, strerror(error));
+ exit(1);
+ }
+
+- setgid(((struct passwd *)nobody)->pw_gid);
++ /* Don't do this here - race conditions will arise */
++ /* setgid(((struct passwd *)nobody)->pw_gid);
+ initgroups(((struct passwd *)nobody)->pw_name,
+ ((struct passwd *)nobody)->pw_gid);
+- setuid(((struct passwd *)nobody)->pw_uid);
++ setuid(((struct passwd *)nobody)->pw_uid); */
+
+ for(;;) {
+ if (read(icmp_socket, (__u8 *) &pkt, ICMP_CAPTURE_LENGTH) == -1) {
+--- a/Source/main.c
++++ b/Source/main.c
+@@ -153,6 +153,17 @@
+ run_thread(&udp_t, log_udp, (void *)account);
+ }
+
++ /* Sleep 1 sec to allow the other threads to catchup */
++ /* Not the best way to solve the issue but it works */
++ sleep(1);
++
++ /* Drop privileges */
++
++ setgid(((struct passwd *)account)->pw_gid);
++ initgroups(((struct passwd *)account)->pw_name,
++ ((struct passwd *)account)->pw_gid);
++ setuid(((struct passwd *)account)->pw_uid);
++
+ }
+
+
+@@ -160,8 +171,10 @@
+ * reload_configuration
+ *
+ * Stops the threads and reloads the configuration
++ *
++ * -- DEPRECATED (due to privilege drop cannot reload - needs a restart!)
+ */
+-void reload_configuration() {
++void reload_configuration_DEPRECATED() {
+ extern pthread_mutex_t log_mutex, service_mutex, dns_mutex, r_mux, w_mux;
+ extern pthread_cond_t w_cond;
+ extern int readers;
+@@ -353,8 +366,10 @@
+ * Function executed when we receive a SIHUP signal
+ */
+ void sighup(int sig) {
+- reload_configuration();
+- log.log(log.level_or_fd, "IP Protocols Logger: reloaded configuration.");
++ // DEPRECATED - reload_configuration();
++ // log.log(log.level_or_fd, "IP Protocols Logger: reloaded configuration.");
++ log.log(log.level_or_fd, "IP Protocols Logger: reload configuration is unsupported.");
++ die(sig);
+ signal(SIGHUP, sighup);
+ }
+
+--- a/Source/tcp.c
++++ b/Source/tcp.c
+@@ -44,6 +44,8 @@
+ #include "filter.h"
+ #include "configuration.h"
+ #include "ident.h"
++#include <errno.h>
++#include <string.h>
+
+ /* Socket */
+ int tcp_socket;
+@@ -258,14 +260,16 @@
+
+ tcp_socket = socket(AF_INET, SOCK_RAW, IPPROTO_TCP);
+ if (tcp_socket <= 0) {
+- log.log(log.level_or_fd, "FATAL: Unable to open tcp raw socket");
++ int error = errno;
++ log.log(log.level_or_fd, "FATAL: Unable to open tcp raw socket\nERROR No: %d\nERROR : %s", error, strerror(error));
+ exit(1);
+ }
+
+- setgid(((struct passwd *)nobody)->pw_gid);
++ /* Don't do this here - race conditions will arise */
++ /* setgid(((struct passwd *)nobody)->pw_gid);
+ initgroups(((struct passwd *)nobody)->pw_name,
+ ((struct passwd *)nobody)->pw_gid);
+- setuid(((struct passwd *)nobody)->pw_uid);
++ setuid(((struct passwd *)nobody)->pw_uid); */
+
+ for(;;) {
+ if (read(tcp_socket, (__u8 *) &pkt, TCP_CAPTURE_LENGTH) == -1) {
+--- a/Source/udp.c
++++ b/Source/udp.c
+@@ -39,6 +39,8 @@
+ #include "filter.h"
+ #include "configuration.h"
+ #include "ident.h"
++#include <errno.h>
++#include <string.h>
+
+ /* Socket */
+ int udp_socket;
+@@ -138,14 +140,16 @@
+
+ udp_socket = socket(AF_INET, SOCK_RAW, IPPROTO_UDP);
+ if (udp_socket <= 0) {
+- log.log(log.level_or_fd, "FATAL: Unable to open udp raw socket");
++ int error = errno;
++ log.log(log.level_or_fd, "FATAL: Unable to open udp raw socket\nERROR No: %d\nERROR : %s", error, strerror(error));
+ exit(1);
+ }
+
+- setgid(((struct passwd *)nobody)->pw_gid);
++ /* Don't do this here - race conditions will arise */
++ /* setgid(((struct passwd *)nobody)->pw_gid);
+ initgroups(((struct passwd *)nobody)->pw_name,
+ ((struct passwd *)nobody)->pw_gid);
+- setuid(((struct passwd *)nobody)->pw_uid);
++ setuid(((struct passwd *)nobody)->pw_uid); */
+
+ for(;;) {
+ if (read(udp_socket, (__u8 *) &pkt, UDP_CAPTURE_LENGTH) == -1) {
diff --git a/net-analyzer/ippl/files/ippl.rc b/net-analyzer/ippl/files/ippl.rc
new file mode 100644
index 000000000000..e16ccfc6c4e3
--- /dev/null
+++ b/net-analyzer/ippl/files/ippl.rc
@@ -0,0 +1,30 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -f /etc/ippl.conf ]
+ then
+ eerror "Please create /etc/ippl.conf"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+ ebegin "Starting ippl"
+ start-stop-daemon --start --quiet --pidfile /run/ippl.pid \
+ --exec /usr/sbin/ippl
+ eend $? "Failed to start ippl"
+}
+
+stop() {
+ ebegin "Stopping ippl"
+ start-stop-daemon --stop --quiet --pidfile /run/ippl.pid
+ eend $? "Failed to stop ippl"
+}
diff --git a/net-analyzer/ippl/ippl-1.4.14-r7.ebuild b/net-analyzer/ippl/ippl-1.4.14-r7.ebuild
new file mode 100644
index 000000000000..e8fc3b4aee3b
--- /dev/null
+++ b/net-analyzer/ippl/ippl-1.4.14-r7.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs autotools
+
+DESCRIPTION="A daemon which logs TCP/UDP/ICMP packets"
+HOMEPAGE="http://pltplp.net/ippl/"
+SRC_URI="http://pltplp.net/ippl/archive/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+
+BDEPEND="
+ app-alternatives/yacc
+ app-alternatives/lex"
+RDEPEND="acct-user/ippl"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.4.14-noportresolve.patch
+ "${FILESDIR}"/${PN}-1.4.14-manpage.patch
+ "${FILESDIR}"/${PN}-1.4.14-privilege-drop.patch
+ "${FILESDIR}"/${PN}-1.4.14-includes.patch
+ "${FILESDIR}"/${PN}-1.4.14-format-warnings.patch
+ # bug #351287
+ "${FILESDIR}"/${PN}-1.4.14-fix-build-system.patch
+ "${FILESDIR}"/${PN}-1.4.14-musl.patch
+ "${FILESDIR}"/${PN}-1.4.14-lto.patch
+)
+
+src_prepare() {
+ default
+ # bug #875665
+ mv configure.in configure.ac || die
+ eautoreconf
+}
+
+src_configure() {
+ tc-export CC
+ default
+}
+
+src_install() {
+ dosbin Source/ippl
+
+ insinto /etc
+ doins ippl.conf
+
+ doman Docs/{ippl.8,ippl.conf.5}
+ dodoc BUGS CREDITS HISTORY README TODO
+
+ newinitd "${FILESDIR}"/ippl.rc ippl
+}
diff --git a/net-analyzer/ippl/metadata.xml b/net-analyzer/ippl/metadata.xml
new file mode 100644
index 000000000000..dce3f3be66c0
--- /dev/null
+++ b/net-analyzer/ippl/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>netmon@gentoo.org</email>
+ <name>Gentoo network monitoring and analysis project</name>
+</maintainer>
+</pkgmetadata>