OpenBSD CVS

CVS log for src/usr.sbin/tcpdump/print-pflog.c


[BACK] Up to [local] / src / usr.sbin / tcpdump

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.35 / (download) - annotate - [select for diffs], Tue Feb 22 17:35:01 2022 UTC (2 years, 3 months ago) by deraadt
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, HEAD
Changes since 1.34: +2 -2 lines
Diff to previous 1.34 (colored)

MAXCOMLEN is no longer needed in these programs, so remove the annotation
from sys/param.h include lines, or remove the include lines entirely if
it this was the least requirement.
ok millert

Revision 1.34 / (download) - annotate - [select for diffs], Wed Dec 1 18:28:46 2021 UTC (2 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.33: +1 -4 lines
Diff to previous 1.33 (colored)

we do not need 'struct mbuf; struct rtentry;' to satisfy some ancient unix
variant that made a header file mistake.
ok jsg

Revision 1.33 / (download) - annotate - [select for diffs], Wed Jan 20 13:40:15 2021 UTC (3 years, 4 months ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.32: +18 -13 lines
Diff to previous 1.32 (colored)

Print rewritten addresses in tcpdump(8) logged with pflog(4) for
rdr-to, nat-to, af-to rules.  The kernel uses the information from
the packet description and fills it into the fields in the pflog
header.  While doing this, it is trival to figure out whether the
packet has been rewritten.
OK sashan@

Revision 1.32 / (download) - annotate - [select for diffs], Mon Oct 22 16:12:45 2018 UTC (5 years, 7 months ago) by kn
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.31: +1 -5 lines
Diff to previous 1.31 (colored)

Remove #ifdef INET6

There's not reason to build without IPv6 support, `-U INET6' builds were
broken anyway.

Fix an empty redefine for IPPROTO_IPV6 in print-ip.c while here.

No object change on amd64 and sparc64 with clang, gcc compiles differently
but behaviour stays the same.

OK denis deraadt

Revision 1.31 / (download) - annotate - [select for diffs], Wed May 24 16:20:26 2017 UTC (7 years ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (colored)

Sync NO_PID value from kernel header to tcpdump source.  It is
#ifdef _KERNEL, so it does not work automatically.  This prevents
some bogus uid and pid print when dumping from pflog interface.
from Matthias Pitzl; OK deraadt@

Revision 1.30 / (download) - annotate - [select for diffs], Tue Jan 24 22:40:09 2017 UTC (7 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.29: +1 -2 lines
Diff to previous 1.29 (colored)

do not need sys/proc.h

Revision 1.29 / (download) - annotate - [select for diffs], Mon Apr 4 16:26:00 2016 UTC (8 years, 1 month ago) by sthen
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.28: +2 -1 lines
Diff to previous 1.28 (colored)

Add sys/queue.h where it's needed. Unbreak userland following recent
removal from mbuf.h.  ok mpi@

Revision 1.28 / (download) - annotate - [select for diffs], Mon Nov 16 00:16:39 2015 UTC (8 years, 6 months ago) by mmcc
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.27: +2 -2 lines
Diff to previous 1.27 (colored)

Remove remaining instances of the register keyword.

ok deraadt@

Revision 1.27 / (download) - annotate - [select for diffs], Tue Jan 20 18:26:58 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.26: +4 -5 lines
Diff to previous 1.26 (colored)

Adjust <sys/param.h> comments regarding use of use of MSIZE, or
delete <sys/param.h> if now possible
ok guenther

Revision 1.26 / (download) - annotate - [select for diffs], Fri Jan 16 06:40:21 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.25: +2 -3 lines
Diff to previous 1.25 (colored)

Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible.  Annotate <sys/param.h> lines with their current reasons.  Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc.  Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution.  These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)

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

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

Revision 1.24 / (download) - annotate - [select for diffs], Thu Oct 13 18:32:30 2011 UTC (12 years, 7 months ago) by claudio
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, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.23: +2 -2 lines
Diff to previous 1.23 (colored)

Teach some userland tools about NAT64. I think this is mostly from mikeb@
OK mcbride@

Revision 1.23 / (download) - annotate - [select for diffs], Sat Oct 9 08:22:26 2010 UTC (13 years, 7 months ago) by canacar
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.22: +2 -2 lines
Diff to previous 1.22 (colored)

Do not use BPF_WORDALIGN when computing pflog header length as it aligns
to 8-byte boundary on 64-bit architectures. Instead explicitly round up
to a 4-byte boundary. Reported and tested by sthen@

Revision 1.22 / (download) - annotate - [select for diffs], Tue Sep 21 10:46:12 2010 UTC (13 years, 8 months ago) by henning
Branch: MAIN
Changes since 1.21: +20 -1 lines
Diff to previous 1.21 (colored)

when a packet has had addresses and/or ports rewritten, show the original
addresses/ports too. ok ryan dlg

Revision 1.21 / (download) - annotate - [select for diffs], Sat Jun 26 16:47:07 2010 UTC (13 years, 11 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.20: +1 -93 lines
Diff to previous 1.20 (colored)

remove support for the old pflog format, replaced in 2003
ok ryan theo & herr reyksminister

Revision 1.20 / (download) - annotate - [select for diffs], Tue Oct 27 23:59:55 2009 UTC (14 years, 7 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.19: +1 -6 lines
Diff to previous 1.19 (colored)

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable).  these days, people use source.  these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms

Revision 1.19 / (download) - annotate - [select for diffs], Mon Apr 6 12:09:06 2009 UTC (15 years, 1 month ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.18: +8 -2 lines
Diff to previous 1.18 (colored)

teach tcpdump about match rules

Revision 1.18 / (download) - annotate - [select for diffs], Sun Oct 7 16:41:05 2007 UTC (16 years, 7 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored)

trash $Header goo which is just annoying; 5595

Revision 1.17 / (download) - annotate - [select for diffs], Wed Nov 23 22:33:11 2005 UTC (18 years, 6 months ago) by cloder
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.16: +3 -3 lines
Diff to previous 1.16 (colored)

Replace a C++ comment with a C comment. No code changes.

Revision 1.16 / (download) - annotate - [select for diffs], Fri May 27 17:22:41 2005 UTC (19 years ago) by dhartmei
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.15: +13 -2 lines
Diff to previous 1.15 (colored)

log two pairs of uid/pid through pflog: the uid/pid of the process that
inserted the rule which causes the logging. secondly, the uid/pid of the
process in case the logged packet is delivered to/from a local socket.
a lookup of the local socket can be forced for logged packets with a new
option, 'log (user)'. make tcpdump print the additional information when
-e and -v is used. note: this changes the pflog header struct, rebuild all
dependancies. ok bob@, henning@.

Revision 1.15 / (download) - annotate - [select for diffs], Fri Mar 11 15:54:11 2005 UTC (19 years, 2 months ago) by dhartmei
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.14: +18 -14 lines
Diff to previous 1.14 (colored)

clean up printing of rule numbers. omit ruleset name and sub-rule number
when irrelevant. print 'def' for default rule. omit numerical reason if
description is printed. ok henning@, deraadt@

Revision 1.14 / (download) - annotate - [select for diffs], Sat Jun 21 21:01:15 2003 UTC (20 years, 11 months ago) by dhartmei
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5, OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.13: +10 -2 lines
Diff to previous 1.13 (colored)

#ifdef INET6

Revision 1.13 / (download) - annotate - [select for diffs], Wed May 14 08:50:37 2003 UTC (21 years ago) by canacar
Branch: MAIN
Changes since 1.12: +114 -9 lines
Diff to previous 1.12 (colored)

libpcap and tcpdump now understand the new pflog datalink type.
old datalink type is still recognized.

ok henning@ dhartmei@ frantzen@

Revision 1.12 / (download) - annotate - [select for diffs], Tue Jan 28 22:45:19 2003 UTC (21 years, 4 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3
Changes since 1.11: +3 -3 lines
Diff to previous 1.11 (colored)

a lost ntohs() caused tcpdump not to print the action.

debugging session with and ok'd by dhartmei@

Revision 1.11 / (download) - annotate - [select for diffs], Wed Jan 1 16:55:16 2003 UTC (21 years, 5 months ago) by mcbride
Branch: MAIN
Changes since 1.10: +28 -5 lines
Diff to previous 1.10 (colored)

Support all possible rule types ("scrub" rules can log packets being
dropped, others may as well in the future).

ok dhartmei@ henning@

Revision 1.10 / (download) - annotate - [select for diffs], Tue Feb 19 19:39:40 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_2_BASE, OPENBSD_3_2, OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.9: +2 -4 lines
Diff to previous 1.9 (colored)

We live in an ANSI C world.  Remove lots of gratuitous #ifdef __STDC__ cruft.

Revision 1.9 / (download) - annotate - [select for diffs], Tue Sep 18 14:52:53 2001 UTC (22 years, 8 months ago) by jakob
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.8: +19 -8 lines
Diff to previous 1.8 (colored)

handle ipv6; mcbride@countersiege.com

Revision 1.8 / (download) - annotate - [select for diffs], Mon Sep 3 13:27:14 2001 UTC (22 years, 9 months ago) by jakob
Branch: MAIN
Changes since 1.7: +13 -12 lines
Diff to previous 1.7 (colored)

only print pf rules when using -e flag; <canacar@eee.metu.edu.tr>

Revision 1.7 / (download) - annotate - [select for diffs], Tue Jul 17 20:36:00 2001 UTC (22 years, 10 months ago) by provos
Branch: MAIN
Changes since 1.6: +4 -3 lines
Diff to previous 1.6 (colored)

make it compile

Revision 1.6 / (download) - annotate - [select for diffs], Tue Jun 26 22:51:03 2001 UTC (22 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored)

fix PFRES_MAX handling

Revision 1.5 / (download) - annotate - [select for diffs], Tue Jun 26 22:26:14 2001 UTC (22 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.4: +5 -23 lines
Diff to previous 1.4 (colored)

array of counters indexed by reason codes

Revision 1.4 / (download) - annotate - [select for diffs], Tue Jun 26 19:06:16 2001 UTC (22 years, 11 months ago) by provos
Branch: MAIN
Changes since 1.3: +15 -3 lines
Diff to previous 1.3 (colored)

print reason sub codes.

Revision 1.3 / (download) - annotate - [select for diffs], Tue Jun 26 16:08:23 2001 UTC (22 years, 11 months ago) by provos
Branch: MAIN
Changes since 1.2: +11 -7 lines
Diff to previous 1.2 (colored)

print reason nr and text.

Revision 1.2 / (download) - annotate - [select for diffs], Tue Jun 26 15:40:29 2001 UTC (22 years, 11 months ago) by provos
Branch: MAIN
Changes since 1.1: +15 -4 lines
Diff to previous 1.1 (colored)

print out reason code, unless it is just a match

Revision 1.1 / (download) - annotate - [select for diffs], Mon Jun 25 23:05:17 2001 UTC (22 years, 11 months ago) by provos
Branch: MAIN

interpret DLT_PFLOG

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.