Deleted Added
full compact
pflog.4 (148011) pflog.4 (171172)
1.\" $OpenBSD: pflog.4,v 1.7 2004/03/21 19:47:59 miod Exp $
1.\" $OpenBSD: pflog.4,v 1.9 2006/10/25 12:51:31 jmc Exp $
2.\"
3.\" Copyright (c) 2001 Tobias Weingartner
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright

--- 8 unchanged lines hidden (view full) ---

18.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25.\"
2.\"
3.\" Copyright (c) 2001 Tobias Weingartner
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright

--- 8 unchanged lines hidden (view full) ---

18.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25.\"
26.\" $FreeBSD: head/contrib/pf/man/pflog.4 148011 2005-07-14 20:29:08Z brueffer $
26.\" $FreeBSD: head/contrib/pf/man/pflog.4 171172 2007-07-03 12:30:03Z mlaier $
27.\"
28.Dd December 10, 2001
29.Dt PFLOG 4
30.Os
31.Sh NAME
32.Nm pflog
33.Nd packet filter logging interface
34.Sh SYNOPSIS

--- 7 unchanged lines hidden (view full) ---

42Logged packets can easily be monitored in real
43time by invoking
44.Xr tcpdump 1
45on the
46.Nm
47interface, or stored to disk using
48.Xr pflogd 8 .
49.Pp
27.\"
28.Dd December 10, 2001
29.Dt PFLOG 4
30.Os
31.Sh NAME
32.Nm pflog
33.Nd packet filter logging interface
34.Sh SYNOPSIS

--- 7 unchanged lines hidden (view full) ---

42Logged packets can easily be monitored in real
43time by invoking
44.Xr tcpdump 1
45on the
46.Nm
47interface, or stored to disk using
48.Xr pflogd 8 .
49.Pp
50The pflog0 interface is created automatically at boot if both
51.Xr pf 4
52and
53.Xr pflogd 8
54are enabled;
55further instances can be created using
56.Xr ifconfig 8 .
57.Pp
50Each packet retrieved on this interface has a header associated
51with it of length
52.Dv PFLOG_HDRLEN .
53This header documents the address family, interface name, rule
54number, reason, action, and direction of the packet that was logged.
55This structure, defined in
56.Aq Pa net/if_pflog.h
57looks like
58.Bd -literal -offset indent
59struct pfloghdr {
60 u_int8_t length;
61 sa_family_t af;
62 u_int8_t action;
63 u_int8_t reason;
64 char ifname[IFNAMSIZ];
65 char ruleset[PF_RULESET_NAME_SIZE];
66 u_int32_t rulenr;
67 u_int32_t subrulenr;
58Each packet retrieved on this interface has a header associated
59with it of length
60.Dv PFLOG_HDRLEN .
61This header documents the address family, interface name, rule
62number, reason, action, and direction of the packet that was logged.
63This structure, defined in
64.Aq Pa net/if_pflog.h
65looks like
66.Bd -literal -offset indent
67struct pfloghdr {
68 u_int8_t length;
69 sa_family_t af;
70 u_int8_t action;
71 u_int8_t reason;
72 char ifname[IFNAMSIZ];
73 char ruleset[PF_RULESET_NAME_SIZE];
74 u_int32_t rulenr;
75 u_int32_t subrulenr;
76 uid_t uid;
77 pid_t pid;
78 uid_t rule_uid;
79 pid_t rule_pid;
68 u_int8_t dir;
69 u_int8_t pad[3];
70};
71.Ed
72.Sh EXAMPLES
80 u_int8_t dir;
81 u_int8_t pad[3];
82};
83.Ed
84.Sh EXAMPLES
85Create a
86.Nm
87interface
88and monitor all packets logged on it:
73.Bd -literal -offset indent
89.Bd -literal -offset indent
74# ifconfig pflog0 up
75# tcpdump -n -e -ttt -i pflog0
90# ifconfig pflog1 up
91# tcpdump -n -e -ttt -i pflog1
76.Ed
77.Sh SEE ALSO
78.Xr tcpdump 1
79.Xr inet 4 ,
80.Xr inet6 4 ,
81.Xr netintro 4 ,
82.Xr pf 4 ,
83.Xr ifconfig 8 ,
84.Xr pflogd 8
85.Sh HISTORY
86The
87.Nm
88device first appeared in
89.Ox 3.0 .
90.\" .Sh BUGS
91.\" Anything here?
92.Ed
93.Sh SEE ALSO
94.Xr tcpdump 1
95.Xr inet 4 ,
96.Xr inet6 4 ,
97.Xr netintro 4 ,
98.Xr pf 4 ,
99.Xr ifconfig 8 ,
100.Xr pflogd 8
101.Sh HISTORY
102The
103.Nm
104device first appeared in
105.Ox 3.0 .
106.\" .Sh BUGS
107.\" Anything here?