head 1.4; access; symbols pkgsrc-2026Q1:1.4.0.122 pkgsrc-2026Q1-base:1.4 pkgsrc-2025Q4:1.4.0.120 pkgsrc-2025Q4-base:1.4 pkgsrc-2025Q3:1.4.0.118 pkgsrc-2025Q3-base:1.4 pkgsrc-2025Q2:1.4.0.116 pkgsrc-2025Q2-base:1.4 pkgsrc-2025Q1:1.4.0.114 pkgsrc-2025Q1-base:1.4 pkgsrc-2024Q4:1.4.0.112 pkgsrc-2024Q4-base:1.4 pkgsrc-2024Q3:1.4.0.110 pkgsrc-2024Q3-base:1.4 pkgsrc-2024Q2:1.4.0.108 pkgsrc-2024Q2-base:1.4 pkgsrc-2024Q1:1.4.0.106 pkgsrc-2024Q1-base:1.4 pkgsrc-2023Q4:1.4.0.104 pkgsrc-2023Q4-base:1.4 pkgsrc-2023Q3:1.4.0.102 pkgsrc-2023Q3-base:1.4 pkgsrc-2023Q2:1.4.0.100 pkgsrc-2023Q2-base:1.4 pkgsrc-2023Q1:1.4.0.98 pkgsrc-2023Q1-base:1.4 pkgsrc-2022Q4:1.4.0.96 pkgsrc-2022Q4-base:1.4 pkgsrc-2022Q3:1.4.0.94 pkgsrc-2022Q3-base:1.4 pkgsrc-2022Q2:1.4.0.92 pkgsrc-2022Q2-base:1.4 pkgsrc-2022Q1:1.4.0.90 pkgsrc-2022Q1-base:1.4 pkgsrc-2021Q4:1.4.0.88 pkgsrc-2021Q4-base:1.4 pkgsrc-2021Q3:1.4.0.86 pkgsrc-2021Q3-base:1.4 pkgsrc-2021Q2:1.4.0.84 pkgsrc-2021Q2-base:1.4 pkgsrc-2021Q1:1.4.0.82 pkgsrc-2021Q1-base:1.4 pkgsrc-2020Q4:1.4.0.80 pkgsrc-2020Q4-base:1.4 pkgsrc-2020Q3:1.4.0.78 pkgsrc-2020Q3-base:1.4 pkgsrc-2020Q2:1.4.0.74 pkgsrc-2020Q2-base:1.4 pkgsrc-2020Q1:1.4.0.54 pkgsrc-2020Q1-base:1.4 pkgsrc-2019Q4:1.4.0.76 pkgsrc-2019Q4-base:1.4 pkgsrc-2019Q3:1.4.0.72 pkgsrc-2019Q3-base:1.4 pkgsrc-2019Q2:1.4.0.70 pkgsrc-2019Q2-base:1.4 pkgsrc-2019Q1:1.4.0.68 pkgsrc-2019Q1-base:1.4 pkgsrc-2018Q4:1.4.0.66 pkgsrc-2018Q4-base:1.4 pkgsrc-2018Q3:1.4.0.64 pkgsrc-2018Q3-base:1.4 pkgsrc-2018Q2:1.4.0.62 pkgsrc-2018Q2-base:1.4 pkgsrc-2018Q1:1.4.0.60 pkgsrc-2018Q1-base:1.4 pkgsrc-2017Q4:1.4.0.58 pkgsrc-2017Q4-base:1.4 pkgsrc-2017Q3:1.4.0.56 pkgsrc-2017Q3-base:1.4 pkgsrc-2017Q2:1.4.0.52 pkgsrc-2017Q2-base:1.4 pkgsrc-2017Q1:1.4.0.50 pkgsrc-2017Q1-base:1.4 pkgsrc-2016Q4:1.4.0.48 pkgsrc-2016Q4-base:1.4 pkgsrc-2016Q3:1.4.0.46 pkgsrc-2016Q3-base:1.4 pkgsrc-2016Q2:1.4.0.44 pkgsrc-2016Q2-base:1.4 pkgsrc-2016Q1:1.4.0.42 pkgsrc-2016Q1-base:1.4 pkgsrc-2015Q4:1.4.0.40 pkgsrc-2015Q4-base:1.4 pkgsrc-2015Q3:1.4.0.38 pkgsrc-2015Q3-base:1.4 pkgsrc-2015Q2:1.4.0.36 pkgsrc-2015Q2-base:1.4 pkgsrc-2015Q1:1.4.0.34 pkgsrc-2015Q1-base:1.4 pkgsrc-2014Q4:1.4.0.32 pkgsrc-2014Q4-base:1.4 pkgsrc-2014Q3:1.4.0.30 pkgsrc-2014Q3-base:1.4 pkgsrc-2014Q2:1.4.0.28 pkgsrc-2014Q2-base:1.4 pkgsrc-2014Q1:1.4.0.26 pkgsrc-2014Q1-base:1.4 pkgsrc-2013Q4:1.4.0.24 pkgsrc-2013Q4-base:1.4 pkgsrc-2013Q3:1.4.0.22 pkgsrc-2013Q3-base:1.4 pkgsrc-2013Q2:1.4.0.20 pkgsrc-2013Q2-base:1.4 pkgsrc-2013Q1:1.4.0.18 pkgsrc-2013Q1-base:1.4 pkgsrc-2012Q4:1.4.0.16 pkgsrc-2012Q4-base:1.4 pkgsrc-2012Q3:1.4.0.14 pkgsrc-2012Q3-base:1.4 pkgsrc-2012Q2:1.4.0.12 pkgsrc-2012Q2-base:1.4 pkgsrc-2012Q1:1.4.0.10 pkgsrc-2012Q1-base:1.4 pkgsrc-2011Q4:1.4.0.8 pkgsrc-2011Q4-base:1.4 pkgsrc-2011Q3:1.4.0.6 pkgsrc-2011Q3-base:1.4 pkgsrc-2011Q2:1.4.0.4 pkgsrc-2011Q2-base:1.4 pkgsrc-2011Q1:1.4.0.2 pkgsrc-2011Q1-base:1.4 pkgsrc-2010Q4:1.3.0.26 pkgsrc-2010Q4-base:1.3 pkgsrc-2010Q3:1.3.0.24 pkgsrc-2010Q3-base:1.3 pkgsrc-2010Q2:1.3.0.22 pkgsrc-2010Q2-base:1.3 pkgsrc-2010Q1:1.3.0.20 pkgsrc-2010Q1-base:1.3 pkgsrc-2009Q4:1.3.0.18 pkgsrc-2009Q4-base:1.3 pkgsrc-2009Q3:1.3.0.16 pkgsrc-2009Q3-base:1.3 pkgsrc-2009Q2:1.3.0.14 pkgsrc-2009Q2-base:1.3 pkgsrc-2009Q1:1.3.0.12 pkgsrc-2009Q1-base:1.3 pkgsrc-2008Q4:1.3.0.10 pkgsrc-2008Q4-base:1.3 pkgsrc-2008Q3:1.3.0.8 pkgsrc-2008Q3-base:1.3 cube-native-xorg:1.3.0.6 cube-native-xorg-base:1.3 pkgsrc-2008Q2:1.3.0.4 pkgsrc-2008Q2-base:1.3 cwrapper:1.3.0.2 pkgsrc-2008Q1:1.2.0.18 pkgsrc-2008Q1-base:1.2 pkgsrc-2007Q4:1.2.0.16 pkgsrc-2007Q4-base:1.2 pkgsrc-2007Q3:1.2.0.14 pkgsrc-2007Q3-base:1.2 pkgsrc-2007Q2:1.2.0.12 pkgsrc-2007Q2-base:1.2 pkgsrc-2007Q1:1.2.0.10 pkgsrc-2007Q1-base:1.2 pkgsrc-2006Q4:1.2.0.8 pkgsrc-2006Q4-base:1.2 pkgsrc-2006Q3:1.2.0.6 pkgsrc-2006Q3-base:1.2 pkgsrc-2006Q2:1.2.0.4 pkgsrc-2006Q2-base:1.2 pkgsrc-2006Q1:1.2.0.2 pkgsrc-2006Q1-base:1.2 pkgsrc-2005Q4:1.1.0.2 pkgsrc-2005Q4-base:1.1; locks; strict; comment @# @; 1.4 date 2011.02.09.22.51.38; author rumko; state Exp; branches; next 1.3; 1.3 date 2008.06.15.14.09.03; author peter; state Exp; branches; next 1.2; 1.2 date 2006.03.06.23.02.08; author peter; state Exp; branches; next 1.1; 1.1 date 2005.12.07.14.32.07; author joerg; state Exp; branches; next ; desc @@ 1.4 log @sysutils/pftop: support newer PF and depend on osabi * In order for pftop to be built successfully with newer PF versions (> 4.1), additional patches are necessary which were taken from OpenBSD's ports as seen in PR pkg/44339 * Pftop compiled for another PF version will not work (properly), so to avoid any problems we must depend on the OS version ok@@ wiz @ text @$NetBSD: patch-ac,v 1.3 2008/06/15 14:09:03 peter Exp $ $OpenBSD: patch-config_h,v 1.5 2009/11/30 09:56:39 sthen Exp $ Patches to support PF > 4.1 taken from OpenBSD's ports. --- config.h.old 2008-06-15 01:19:59.000000000 +0200 +++ config.h 2008-06-15 12:16:51.000000000 +0200 @@@@ -74,11 +74,24 @@@@ #define HAVE_PFSYNC_STATE #endif +#if OS_LEVEL > 43 +#define HAVE_PFSYNC_KEY +#define HAVE_NETWORK_ORDER +#endif + +/* #if OS_LEVEL > 46 */ +#undef HAVE_RULE_NATPASS +/* #endif */ + #ifdef HAVE_PFSYNC_STATE typedef struct pfsync_state pf_state_t; typedef struct pfsync_state_host pf_state_host_t; typedef struct pfsync_state_peer pf_state_peer_t; +#ifdef HAVE_NETWORK_ORDER +#define COUNTER(c) ((((u_int64_t) ntohl(c[0]))<<32) + ntohl(c[1])) +#else #define COUNTER(c) ((((u_int64_t) c[0])<<32) + c[1]) +#endif #define pfs_ifname ifname #else typedef struct pf_state pf_state_t; @ 1.3 log @Update pftop to version 0.7. Tested on NetBSD 3.1, 4.0 and yamt-pf42. Changes in version 0.7: This version adds state filtering, which is funded by backcountry.com, many thanks. It is now possible to select which states are displayed using a tcpdump(8) like filtering language. The filter can be specified on the command line, using the '-f' switch. It is also possible to change the filter interactively using the 'f' command key. Some sample, not necessarily practical, filters are given below: - Do not show pfsync or carp traffic: not (pfsync or carp) not pfsync and not carp - DNS traffic not going to or coming from the DNS servers: port 53 and not host (10.0.0.10 or 10.0.0.11) - States with input bytes greater than 1M: inb > 1000000 - Traffic with very small average packet size: ((inb / inp) + (outb / outp))/2 < 100 inb / inp + outb / outp < 200 Changes in version 0.6: No functional changes. It now compiles and runs on OpenBSD 4.1-current after pf interface changes. This version also contains separated pf and display code. This should make adding new views easier. Changes in version 0.5: This version displays all active pf rules by traversing the ruleset tree. In addition HFSC queues are now displayed correctly thanks to Jared Spiegel. This version also incorporates other patches and comments I have received since the previous release. Many thanks to all who have contributed. - New command-line switch 'S' to start the display at a given state. - Display HFCS statistics in the queue page. - Fixed state and rule byte and packet counters - Fixed state sorting by packets and bytes - Fixed some minor display problems - The rule view now traverses all rulesets, and displays all active rules, together with anchor (ruleset) names. - Anchor and Label fields dynamically resize themselves @ text @d1 4 a4 1 $NetBSD$ d8 2 a9 18 @@@@ -42,7 +42,9 @@@@ #if OS_LEVEL > 32 #define HAVE_ADDR_MASK #define HAVE_ADDR_TYPE +#ifndef __NetBSD__ #define HAVE_ALTQ +#endif /* !__NetBSD__ */ #define HAVE_RULE_TOS #define HAVE_OP_RRG #endif @@@@ -64,6 +66,10 @@@@ #if OS_LEVEL > 37 #define HAVE_INOUT_COUNT_RULES +#ifdef __NetBSD__ +/* NetBSD has pf/ALTQ since 4.0, which shipped with pf 3.7 */ +#define HAVE_ALTQ +#endif /* __NetBSD__ */ d12 21 a32 1 #if OS_LEVEL > 38 @ 1.2 log @The previous commit to fix the include path didn't worked so well on NetBSD 2 + pflkm, because the path was substituted by "__nonexistent__". So to fix this properly, add a patch with CPP conditional which fixes the path for __DragonFly__. @ text @d3 13 a15 4 --- cache.c.orig 2003-08-05 03:20:29.000000000 +0200 +++ cache.c 2006-03-06 23:52:42.000000000 +0100 @@@@ -37,7 +37,11 @@@@ #include d17 7 a23 16 #include +#ifdef __DragonFly__ +#include +#else #include +#endif #include #include @@@@ -54,6 +58,7 @@@@ /* initialize the tree and queue */ RB_HEAD(sc_tree, sc_ent) sctree; +RB_PROTOTYPE(sc_tree, sc_ent, tlink, sc_cmp); TAILQ_HEAD(sc_queue, sc_ent) scq1, scq2, scq_free; RB_GENERATE(sc_tree, sc_ent, tlink, sc_cmp); d25 1 @ 1.1 log @Fix compilation on DragonFly: MIN is not defined, UID_MAX / GID_MAX can be obtained from limits.h and RB_PROTOTYPE is needed before RB_GENERATE. @ text @d3 15 a17 3 --- cache.c.orig 2005-12-07 14:21:26.000000000 +0000 +++ cache.c @@@@ -54,6 +54,7 @@@@ static __inline int sc_cmp(struct sc_ent @