summaryrefslogtreecommitdiffstats
path: root/usr.bin/systat/pf.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* pf: Merge NOTES column into NAME columnkn2020-09-141-29/+14
| | | | | | | | | | | | 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
* pf(4): use CLOCK_BOOTTIME to get time_uptime(9) in userspacecheloha2020-05-151-2/+2
| | | | | | | | | | | | | | | | 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@
* When system calls indicate an error they return -1, not some arbitraryderaadt2019-06-281-2/+2
| | | | | | 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.
* Use the new sysctl to print systat pf 1. This now works even for unprivedclaudio2019-05-091-8/+6
| | | | | users. OK deraadt@, sashan@
* Return time_uptime as value for when pf was enabled instead ofpatrick2017-06-011-3/+5
| | | | | | | | | 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@
* make sure debug will be initialized, choose "unknown" (because pfctlbenno2016-01-021-1/+4
| | | | | loglevel_to_string() uses "unknown" as well) ok kettenis@ florian@
* first batch of programs adapting to the namespace cleanupderaadt2015-01-161-1/+2
| | | | | (pfvar.h nameser.h proc.h ucred.h) ok guenther millert, and some review from doug as well.
* No need for <netinet/in_systm.h> nor <netinet/tcpip.h>.mpi2014-08-141-2/+1
|
* remove some unnecessary sys/param.h inclusionsderaadt2012-12-041-2/+1
|
* - use a common FIELD_ADDR macro, instead of rolling 78 identical copies.jasper2011-03-021-8/+6
| | | | ok canacar@
* Add prototype and remove unnecessary includes.lum2010-07-191-10/+2
| | | | ok canacar@
* Unbreak tree - I missed systat's use of the old pf debug levels.mcbride2010-01-191-9/+22
| | | | pointed out by toby
* New display engine for systat, based on pftop. Adds new views for pfcanacar2008-06-121-0/+326
(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@