diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/netfilter_bridge/Kbuild | 18 | ||||
| -rw-r--r-- | include/linux/netfilter_bridge/ebt_802_3.h | 61 | ||||
| -rw-r--r-- | include/linux/netfilter_bridge/ebtables.h | 255 | ||||
| -rw-r--r-- | include/uapi/linux/netfilter_bridge/Kbuild | 18 | ||||
| -rw-r--r-- | include/uapi/linux/netfilter_bridge/ebt_802_3.h | 62 | ||||
| -rw-r--r-- | include/uapi/linux/netfilter_bridge/ebt_among.h (renamed from include/linux/netfilter_bridge/ebt_among.h) | 0 | ||||
| -rw-r--r-- | include/uapi/linux/netfilter_bridge/ebt_arp.h (renamed from include/linux/netfilter_bridge/ebt_arp.h) | 0 | ||||
| -rw-r--r-- | include/uapi/linux/netfilter_bridge/ebt_arpreply.h (renamed from include/linux/netfilter_bridge/ebt_arpreply.h) | 0 | ||||
| -rw-r--r-- | include/uapi/linux/netfilter_bridge/ebt_ip.h (renamed from include/linux/netfilter_bridge/ebt_ip.h) | 0 | ||||
| -rw-r--r-- | include/uapi/linux/netfilter_bridge/ebt_ip6.h (renamed from include/linux/netfilter_bridge/ebt_ip6.h) | 0 | ||||
| -rw-r--r-- | include/uapi/linux/netfilter_bridge/ebt_limit.h (renamed from include/linux/netfilter_bridge/ebt_limit.h) | 0 | ||||
| -rw-r--r-- | include/uapi/linux/netfilter_bridge/ebt_log.h (renamed from include/linux/netfilter_bridge/ebt_log.h) | 0 | ||||
| -rw-r--r-- | include/uapi/linux/netfilter_bridge/ebt_mark_m.h (renamed from include/linux/netfilter_bridge/ebt_mark_m.h) | 0 | ||||
| -rw-r--r-- | include/uapi/linux/netfilter_bridge/ebt_mark_t.h (renamed from include/linux/netfilter_bridge/ebt_mark_t.h) | 0 | ||||
| -rw-r--r-- | include/uapi/linux/netfilter_bridge/ebt_nat.h (renamed from include/linux/netfilter_bridge/ebt_nat.h) | 0 | ||||
| -rw-r--r-- | include/uapi/linux/netfilter_bridge/ebt_nflog.h (renamed from include/linux/netfilter_bridge/ebt_nflog.h) | 0 | ||||
| -rw-r--r-- | include/uapi/linux/netfilter_bridge/ebt_pkttype.h (renamed from include/linux/netfilter_bridge/ebt_pkttype.h) | 0 | ||||
| -rw-r--r-- | include/uapi/linux/netfilter_bridge/ebt_redirect.h (renamed from include/linux/netfilter_bridge/ebt_redirect.h) | 0 | ||||
| -rw-r--r-- | include/uapi/linux/netfilter_bridge/ebt_stp.h (renamed from include/linux/netfilter_bridge/ebt_stp.h) | 0 | ||||
| -rw-r--r-- | include/uapi/linux/netfilter_bridge/ebt_ulog.h (renamed from include/linux/netfilter_bridge/ebt_ulog.h) | 0 | ||||
| -rw-r--r-- | include/uapi/linux/netfilter_bridge/ebt_vlan.h (renamed from include/linux/netfilter_bridge/ebt_vlan.h) | 0 | ||||
| -rw-r--r-- | include/uapi/linux/netfilter_bridge/ebtables.h | 268 |
22 files changed, 350 insertions, 332 deletions
diff --git a/include/linux/netfilter_bridge/Kbuild b/include/linux/netfilter_bridge/Kbuild index e48f1a3f5a4a..e69de29bb2d1 100644 --- a/include/linux/netfilter_bridge/Kbuild +++ b/include/linux/netfilter_bridge/Kbuild | |||
| @@ -1,18 +0,0 @@ | |||
| 1 | header-y += ebt_802_3.h | ||
| 2 | header-y += ebt_among.h | ||
| 3 | header-y += ebt_arp.h | ||
| 4 | header-y += ebt_arpreply.h | ||
| 5 | header-y += ebt_ip.h | ||
| 6 | header-y += ebt_ip6.h | ||
| 7 | header-y += ebt_limit.h | ||
| 8 | header-y += ebt_log.h | ||
| 9 | header-y += ebt_mark_m.h | ||
| 10 | header-y += ebt_mark_t.h | ||
| 11 | header-y += ebt_nat.h | ||
| 12 | header-y += ebt_nflog.h | ||
| 13 | header-y += ebt_pkttype.h | ||
| 14 | header-y += ebt_redirect.h | ||
| 15 | header-y += ebt_stp.h | ||
| 16 | header-y += ebt_ulog.h | ||
| 17 | header-y += ebt_vlan.h | ||
| 18 | header-y += ebtables.h | ||
diff --git a/include/linux/netfilter_bridge/ebt_802_3.h b/include/linux/netfilter_bridge/ebt_802_3.h index be5be1577a56..e17e8bfb4e8b 100644 --- a/include/linux/netfilter_bridge/ebt_802_3.h +++ b/include/linux/netfilter_bridge/ebt_802_3.h | |||
| @@ -1,70 +1,11 @@ | |||
| 1 | #ifndef __LINUX_BRIDGE_EBT_802_3_H | 1 | #ifndef __LINUX_BRIDGE_EBT_802_3_H |
| 2 | #define __LINUX_BRIDGE_EBT_802_3_H | 2 | #define __LINUX_BRIDGE_EBT_802_3_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 6 | #define EBT_802_3_SAP 0x01 | ||
| 7 | #define EBT_802_3_TYPE 0x02 | ||
| 8 | |||
| 9 | #define EBT_802_3_MATCH "802_3" | ||
| 10 | |||
| 11 | /* | ||
| 12 | * If frame has DSAP/SSAP value 0xaa you must check the SNAP type | ||
| 13 | * to discover what kind of packet we're carrying. | ||
| 14 | */ | ||
| 15 | #define CHECK_TYPE 0xaa | ||
| 16 | |||
| 17 | /* | ||
| 18 | * Control field may be one or two bytes. If the first byte has | ||
| 19 | * the value 0x03 then the entire length is one byte, otherwise it is two. | ||
| 20 | * One byte controls are used in Unnumbered Information frames. | ||
| 21 | * Two byte controls are used in Numbered Information frames. | ||
| 22 | */ | ||
| 23 | #define IS_UI 0x03 | ||
| 24 | |||
| 25 | #define EBT_802_3_MASK (EBT_802_3_SAP | EBT_802_3_TYPE | EBT_802_3) | ||
| 26 | |||
| 27 | /* ui has one byte ctrl, ni has two */ | ||
| 28 | struct hdr_ui { | ||
| 29 | __u8 dsap; | ||
| 30 | __u8 ssap; | ||
| 31 | __u8 ctrl; | ||
| 32 | __u8 orig[3]; | ||
| 33 | __be16 type; | ||
| 34 | }; | ||
| 35 | |||
| 36 | struct hdr_ni { | ||
| 37 | __u8 dsap; | ||
| 38 | __u8 ssap; | ||
| 39 | __be16 ctrl; | ||
| 40 | __u8 orig[3]; | ||
| 41 | __be16 type; | ||
| 42 | }; | ||
| 43 | |||
| 44 | struct ebt_802_3_hdr { | ||
| 45 | __u8 daddr[6]; | ||
| 46 | __u8 saddr[6]; | ||
| 47 | __be16 len; | ||
| 48 | union { | ||
| 49 | struct hdr_ui ui; | ||
| 50 | struct hdr_ni ni; | ||
| 51 | } llc; | ||
| 52 | }; | ||
| 53 | |||
| 54 | #ifdef __KERNEL__ | ||
| 55 | #include <linux/skbuff.h> | 4 | #include <linux/skbuff.h> |
| 5 | #include <uapi/linux/netfilter_bridge/ebt_802_3.h> | ||
| 56 | 6 | ||
| 57 | static inline struct ebt_802_3_hdr *ebt_802_3_hdr(const struct sk_buff *skb) | 7 | static inline struct ebt_802_3_hdr *ebt_802_3_hdr(const struct sk_buff *skb) |
| 58 | { | 8 | { |
| 59 | return (struct ebt_802_3_hdr *)skb_mac_header(skb); | 9 | return (struct ebt_802_3_hdr *)skb_mac_header(skb); |
| 60 | } | 10 | } |
| 61 | #endif | 11 | #endif |
| 62 | |||
| 63 | struct ebt_802_3_info { | ||
| 64 | __u8 sap; | ||
| 65 | __be16 type; | ||
| 66 | __u8 bitmask; | ||
| 67 | __u8 invflags; | ||
| 68 | }; | ||
| 69 | |||
| 70 | #endif | ||
diff --git a/include/linux/netfilter_bridge/ebtables.h b/include/linux/netfilter_bridge/ebtables.h index 4dd5bd6994a8..34e7a2b7f867 100644 --- a/include/linux/netfilter_bridge/ebtables.h +++ b/include/linux/netfilter_bridge/ebtables.h | |||
| @@ -9,191 +9,11 @@ | |||
| 9 | * This code is stongly inspired on the iptables code which is | 9 | * This code is stongly inspired on the iptables code which is |
| 10 | * Copyright (C) 1999 Paul `Rusty' Russell & Michael J. Neuling | 10 | * Copyright (C) 1999 Paul `Rusty' Russell & Michael J. Neuling |
| 11 | */ | 11 | */ |
| 12 | |||
| 13 | #ifndef __LINUX_BRIDGE_EFF_H | 12 | #ifndef __LINUX_BRIDGE_EFF_H |
| 14 | #define __LINUX_BRIDGE_EFF_H | 13 | #define __LINUX_BRIDGE_EFF_H |
| 15 | #include <linux/if.h> | ||
| 16 | #include <linux/netfilter_bridge.h> | ||
| 17 | #include <linux/if_ether.h> | ||
| 18 | |||
| 19 | #define EBT_TABLE_MAXNAMELEN 32 | ||
| 20 | #define EBT_CHAIN_MAXNAMELEN EBT_TABLE_MAXNAMELEN | ||
| 21 | #define EBT_FUNCTION_MAXNAMELEN EBT_TABLE_MAXNAMELEN | ||
| 22 | |||
| 23 | /* verdicts >0 are "branches" */ | ||
| 24 | #define EBT_ACCEPT -1 | ||
| 25 | #define EBT_DROP -2 | ||
| 26 | #define EBT_CONTINUE -3 | ||
| 27 | #define EBT_RETURN -4 | ||
| 28 | #define NUM_STANDARD_TARGETS 4 | ||
| 29 | /* ebtables target modules store the verdict inside an int. We can | ||
| 30 | * reclaim a part of this int for backwards compatible extensions. | ||
| 31 | * The 4 lsb are more than enough to store the verdict. */ | ||
| 32 | #define EBT_VERDICT_BITS 0x0000000F | ||
| 33 | |||
| 34 | struct xt_match; | ||
| 35 | struct xt_target; | ||
| 36 | |||
| 37 | struct ebt_counter { | ||
| 38 | uint64_t pcnt; | ||
| 39 | uint64_t bcnt; | ||
| 40 | }; | ||
| 41 | 14 | ||
| 42 | struct ebt_replace { | 15 | #include <uapi/linux/netfilter_bridge/ebtables.h> |
| 43 | char name[EBT_TABLE_MAXNAMELEN]; | ||
| 44 | unsigned int valid_hooks; | ||
| 45 | /* nr of rules in the table */ | ||
| 46 | unsigned int nentries; | ||
| 47 | /* total size of the entries */ | ||
| 48 | unsigned int entries_size; | ||
| 49 | /* start of the chains */ | ||
| 50 | struct ebt_entries __user *hook_entry[NF_BR_NUMHOOKS]; | ||
| 51 | /* nr of counters userspace expects back */ | ||
| 52 | unsigned int num_counters; | ||
| 53 | /* where the kernel will put the old counters */ | ||
| 54 | struct ebt_counter __user *counters; | ||
| 55 | char __user *entries; | ||
| 56 | }; | ||
| 57 | 16 | ||
| 58 | struct ebt_replace_kernel { | ||
| 59 | char name[EBT_TABLE_MAXNAMELEN]; | ||
| 60 | unsigned int valid_hooks; | ||
