1/*
2 * Network configuration layer (Linux)
3 *
4 * Copyright (C) 2010, Broadcom Corporation. All Rights Reserved.
5 *
6 * Permission to use, copy, modify, and/or distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
9 *
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
13 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
15 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
16 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 *
18 * $Id: netconf_linux.h,v 1.13 2008/10/02 02:38:56 Exp $
19 */
20
21#ifndef _netconf_linux_h_
22#define _netconf_linux_h_
23#include <linux/version.h>
24
25/* Debug malloc() */
26#ifdef DMALLOC
27#include <dmalloc.h>
28#endif /* DMALLOC */
29
30/* iptables definitions */
31#include <libiptc/libiptc.h>
32#include <iptables.h>
33#include <linux/netfilter_ipv4/ip_tables.h>
34
35#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) )
36#include <linux/netfilter_ipv4/ip_nat_rule.h>
37#else
38#include <linux/netfilter/nf_nat.h>
39#include <linux/netfilter/nf_conntrack_common.h>
40#endif
41#define ETH_ALEN ETHER_ADDR_LEN
42#include <linux/netfilter_ipv4/ipt_mac.h>
43#include <linux/netfilter_ipv4/ipt_state.h>
44#include <linux/netfilter_ipv4/ipt_time.h>
45#include <linux/netfilter_ipv4/ipt_TCPMSS.h>
46#include <linux/netfilter_ipv4/ipt_LOG.h>
47#include <linux/netfilter_ipv4/ip_autofw.h>
48
49/* ipt_entry alignment attribute */
50#define IPT_ALIGNED ((aligned (__alignof__ (struct ipt_entry))))
51
52/* TCP flags */
53#define	TH_FIN	0x01
54#define	TH_SYN	0x02
55#define	TH_RST	0x04
56#define	TH_PUSH	0x08
57#define	TH_ACK	0x10
58#define	TH_URG	0x20
59
60#endif /* _netconf_linux_h_ */
61