]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/pf/man/pflog.4
This commit was generated by cvs2svn to compensate for changes in r130365,
[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 .\" $FreeBSD$
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
35 .Sy device pflog
36 .Sh DESCRIPTION
37 The
38 .Nm pflog
39 interface is the interface the packet filter,
40 .Xr pf 4 ,
41 copies all the packets to which it has been configured to log.
42 In this way, all logged packets can easily be monitored in real
43 time by invoking
44 .Xr tcpdump 8
45 on the
46 .Nm
47 interface.
48 .Pp
49 Each packet retrieved on this interface has a header associated
50 with it of length
51 .Dv PFLOG_HDRLEN .
52 This header documents the address family, interface name, rule
53 number, reason, action, and direction of the packet that was logged.
54 This structure, defined in
55 .Aq Pa net/if_pflog.h
56 looks like
57 .Bd -literal -offset indent
58 struct pfloghdr {
59         u_int8_t        length;
60         sa_family_t     af;
61         u_int8_t        action;
62         u_int8_t        reason;
63         char            ifname[IFNAMSIZ];
64         char            ruleset[PF_RULESET_NAME_SIZE];
65         u_int32_t       rulenr;
66         u_int32_t       subrulenr;
67         u_int8_t        dir;
68         u_int8_t        pad[3];
69 };
70 .Ed
71 .Sh EXAMPLES
72 .Bd -literal -offset indent
73 # ifconfig pflog0 up
74 # tcpdump -n -e -ttt -i pflog0
75 .Ed
76 .Sh SEE ALSO
77 .Xr inet 4 ,
78 .Xr inet6 4 ,
79 .Xr netintro 4 ,
80 .Xr pf 4 ,
81 .Xr ifconfig 8 ,
82 .Xr pflogd 8 ,
83 .Xr tcpdump 8
84 .Sh HISTORY
85 The
86 .Nm
87 device first appeared in
88 .Ox 3.0 .
89 .\" .Sh BUGS
90 .\" Anything here?