]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/pf/man/pflog.4
This commit was generated by cvs2svn to compensate for changes in r128212,
[FreeBSD/FreeBSD.git] / contrib / pf / man / pflog.4
1 .\"     $OpenBSD: pflog.4,v 1.4 2003/09/22 04:53:15 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
10 .\"    notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\"    notice, this list of conditions and the following disclaimer in the
13 .\"    documentation and/or other materials provided with the distribution.
14 .\"
15 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
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 .Dd December 10, 2001
27 .Dt PFLOG 4
28 .Os
29 .Sh NAME
30 .Nm pflog
31 .Nd packet filter logging interface
32 .Sh SYNOPSIS
33 .Sy pseudo-device Nm pflog Em <number>
34 .Sh DESCRIPTION
35 The
36 .Nm pflog
37 interface is the interface the packet filter,
38 .Xr pf 4 ,
39 copies all the packets to which it has been configured to log.
40 In this way, all logged packets can easily be monitored in real
41 time by invoking
42 .Xr tcpdump 8
43 on the
44 .Nm
45 interface.
46 .Pp
47 Each packet retrieved on this interface has a header associated
48 with it of length
49 .Dv PFLOG_HDRLEN .
50 This header documents the address family, interface name, rule
51 number, reason, action, and direction of the packet that was logged.
52 This structure, defined in
53 .Aq Pa net/if_pflog.h
54 looks like
55 .Bd -literal -offset indent
56 struct pfloghdr {
57         u_int8_t        length;
58         sa_family_t     af;
59         u_int8_t        action;
60         u_int8_t        reason;
61         char            ifname[IFNAMSIZ];
62         char            ruleset[PF_RULESET_NAME_SIZE];
63         u_int32_t       rulenr;
64         u_int32_t       subrulenr;
65         u_int8_t        dir;
66         u_int8_t        pad[3];
67 };
68 .Ed
69 .Sh EXAMPLES
70 .Bd -literal -offset indent
71 # ifconfig pflog0 up
72 # tcpdump -n -e -ttt -i pflog0
73 .Ed
74 .Sh SEE ALSO
75 .Xr inet 4 ,
76 .Xr inet6 4 ,
77 .Xr netintro 4 ,
78 .Xr pf 4 ,
79 .Xr ifconfig 8 ,
80 .Xr pflogd 8 ,
81 .Xr tcpdump 8
82 .Sh HISTORY
83 The
84 .Nm
85 device first appeared in
86 .Ox 3.0 .
87 .\" .Sh BUGS
88 .\" Anything here?