OpenBSD CVS

CVS log for src/usr.bin/systat/pf.c


[BACK] Up to [local] / src / usr.bin / systat

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.14 / (download) - annotate - [select for diffs], Mon Apr 22 13:30:22 2024 UTC (3 weeks, 6 days ago) by bluhm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.13: +15 -2 lines
Diff to previous 1.13 (colored)

Show pf fragment reassembly counters.

Framgent count and statistics are stored in struct pf_status.  From
there pfctl(8) and systat(1) collect and show them.  Note that pfctl
-s info needs the -v switch to show fragments.  As fragment reassembly
has its own mutex, also grab this in pf ipctl(2) and sysctl(2) code.

input claudio@; OK henning@

Revision 1.13 / (download) - annotate - [select for diffs], Mon Sep 14 11:15:30 2020 UTC (3 years, 8 months ago) by kn
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.12: +14 -29 lines
Diff to previous 1.12 (colored)

pf: Merge NOTES column into NAME column

NOTES stays unused unless pf.conf(5) contains "set loginterface ..." in
which case it merely amends what can otherwise be part of the NAME column.

Merge the constant NOTES values for conditional counters into their NAME
values to make the "pf" view look a little nicer and less empty by default;
this also saves screen estate for possible future changes, e.g. we could
increase column widths.

OK tobhe

Revision 1.12 / (download) - annotate - [select for diffs], Fri May 15 00:56:03 2020 UTC (4 years ago) by cheloha
Branch: MAIN
Changes since 1.11: +2 -2 lines
Diff to previous 1.11 (colored)

pf(4): use CLOCK_BOOTTIME to get time_uptime(9) in userspace

In pf(4), the pf_status.since timestamp is set with time_uptime(9).
This is a low-res snapshot of nanouptime(9).  nanouptime(9) is used to
implement CLOCK_BOOTTIME for clock_gettime(2).  It is not used to
implement CLOCK_UPTIME, though.  The names are misleading.

Switch to CLOCK_BOOTTIME in places in userspace where we use
pf_status.since so we are working with the right clock.

Technically CLOCK_MONOTONIC is equivalent, but we shouldn't use that
here.  CLOCK_MONOTONIC is not necessarily the "time since boot": the
standard says its absolute value is meaningless.

ok patrick@ bluhm@

Revision 1.11 / (download) - annotate - [select for diffs], Fri Jun 28 13:35:04 2019 UTC (4 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.10: +2 -2 lines
Diff to previous 1.10 (colored)

When system calls indicate an error they return -1, not some arbitrary
value < 0.  errno is only updated in this case.  Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.

Revision 1.10 / (download) - annotate - [select for diffs], Thu May 9 15:01:09 2019 UTC (5 years ago) by claudio
Branch: MAIN
Changes since 1.9: +6 -8 lines
Diff to previous 1.9 (colored)

Use the new sysctl to print systat pf 1. This now works even for unprived
users.
OK deraadt@, sashan@

Revision 1.9 / (download) - annotate - [select for diffs], Thu Jun 1 14:38:28 2017 UTC (6 years, 11 months ago) by patrick
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.8: +5 -3 lines
Diff to previous 1.8 (colored)

Return time_uptime as value for when pf was enabled instead of
time_second.  Since time_second changes depending on the wall-
clock time, time_second is not a reliable source for the status.
We can even end up with a negative time delta.  Thus, use the
monotonically growing time_uptime and export it to userland.

ok bluhm@ mikeb@

Revision 1.8 / (download) - annotate - [select for diffs], Sat Jan 2 20:03:28 2016 UTC (8 years, 4 months ago) by benno
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.7: +4 -1 lines
Diff to previous 1.7 (colored)

make sure debug will be initialized, choose "unknown" (because pfctl
loglevel_to_string() uses "unknown" as well)
ok kettenis@ florian@

Revision 1.7 / (download) - annotate - [select for diffs], Fri Jan 16 00:03:37 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.6: +2 -1 lines
Diff to previous 1.6 (colored)

first batch of programs adapting to the namespace cleanup
(pfvar.h nameser.h proc.h ucred.h)
ok guenther millert, and some review from doug as well.

Revision 1.6 / (download) - annotate - [select for diffs], Thu Aug 14 12:55:50 2014 UTC (9 years, 9 months ago) by mpi
Branch: MAIN
Changes since 1.5: +1 -2 lines
Diff to previous 1.5 (colored)

No need for <netinet/in_systm.h> nor <netinet/tcpip.h>.

Revision 1.5 / (download) - annotate - [select for diffs], Tue Dec 4 02:24:47 2012 UTC (11 years, 5 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.4: +1 -2 lines
Diff to previous 1.4 (colored)

remove some unnecessary sys/param.h inclusions

Revision 1.4 / (download) - annotate - [select for diffs], Wed Mar 2 06:48:17 2011 UTC (13 years, 2 months ago) by jasper
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.3: +6 -8 lines
Diff to previous 1.3 (colored)

- use a common FIELD_ADDR macro, instead of rolling 78 identical copies.

ok canacar@

Revision 1.3 / (download) - annotate - [select for diffs], Mon Jul 19 18:57:32 2010 UTC (13 years, 10 months ago) by lum
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.2: +2 -10 lines
Diff to previous 1.2 (colored)

Add prototype and remove unnecessary includes.
ok canacar@

Revision 1.2 / (download) - annotate - [select for diffs], Tue Jan 19 05:59:20 2010 UTC (14 years, 4 months ago) by mcbride
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.1: +22 -9 lines
Diff to previous 1.1 (colored)

Unbreak tree - I missed systat's use of the old pf debug levels.
pointed out by toby

Revision 1.1 / (download) - annotate - [select for diffs], Thu Jun 12 22:26:01 2008 UTC (15 years, 11 months ago) by canacar
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4

New display engine for systat, based on pftop. Adds new views for pf
(status, state, rule, queue). While all displays work, some keyboard
comands are not implemented yet. Other features include better handling
of display resize and scrolling for long views. Committing now to fix
the remaining issues in the tree.
Testing and comments by otto@ and harding@, ok deraadt@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.