2 * Copyright (c) 2001 Daniel Hartmeier
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
9 * - Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * - Redistributions in binary form must reproduce the above
12 * copyright notice, this list of conditions and the following
13 * disclaimer in the documentation and/or other materials provided
14 * with the distribution.
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
19 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
20 * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
22 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
26 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27 * POSSIBILITY OF SUCH DAMAGE.
29 * @(#) $Header: /tcpdump/master/tcpdump/pf.h,v 1.1.2.1 2004/03/28 21:25:03 fenner Exp $ (LBL)
32 /* from $OpenBSD: pfvar.h,v 1.170 2003/08/22 21:50:34 david Exp $ */
34 enum { PF_INOUT
=0, PF_IN
=1, PF_OUT
=2 };
35 enum { PF_PASS
=0, PF_DROP
=1, PF_SCRUB
=2, PF_NAT
=3, PF_NONAT
=4,
36 PF_BINAT
=5, PF_NOBINAT
=6, PF_RDR
=7, PF_NORDR
=8, PF_SYNPROXY_DROP
=9 };
38 /* Reasons code for passing/dropping a packet */
39 #define PFRES_MATCH 0 /* Explicit match of a rule */
40 #define PFRES_BADOFF 1 /* Bad offset for pull_hdr */
41 #define PFRES_FRAG 2 /* Dropping following fragment */
42 #define PFRES_SHORT 3 /* Dropping short packet */
43 #define PFRES_NORM 4 /* Dropping by normalizer */
44 #define PFRES_MEMORY 5 /* Dropped due to lacking mem */
45 #define PFRES_MAX 6 /* total+1 */
47 #define PFRES_NAMES { \
57 #define PF_RULESET_NAME_SIZE 16
59 /* from $OpenBSD: if_pflog.h,v 1.9 2003/07/15 20:27:27 dhartmei Exp $ */
70 char ifname
[IFNAMSIZ
];
71 char ruleset
[PF_RULESET_NAME_SIZE
];
77 #define PFLOG_HDRLEN sizeof(struct pfloghdr)