Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
br_netfilter.c File Reference
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/ip.h>
#include <linux/netdevice.h>
#include <linux/skbuff.h>
#include <linux/if_arp.h>
#include <linux/if_ether.h>
#include <linux/if_vlan.h>
#include <linux/if_pppox.h>
#include <linux/ppp_defs.h>
#include <linux/netfilter_bridge.h>
#include <linux/netfilter_ipv4.h>
#include <linux/netfilter_ipv6.h>
#include <linux/netfilter_arp.h>
#include <linux/in_route.h>
#include <linux/inetdevice.h>
#include <net/ip.h>
#include <net/ipv6.h>
#include <net/route.h>
#include <asm/uaccess.h>
#include "br_private.h"

Go to the source code of this file.

Macros

#define skb_origaddr(skb)
 
#define store_orig_dstaddr(skb)   (skb_origaddr(skb) = ip_hdr(skb)->daddr)
 
#define dnat_took_place(skb)   (skb_origaddr(skb) != ip_hdr(skb)->daddr)
 
#define brnf_call_iptables   1
 
#define brnf_call_ip6tables   1
 
#define brnf_call_arptables   1
 
#define brnf_filter_vlan_tagged   0
 
#define brnf_filter_pppoe_tagged   0
 
#define brnf_pass_vlan_indev   0
 
#define IS_IP(skb)   (!vlan_tx_tag_present(skb) && skb->protocol == htons(ETH_P_IP))
 
#define IS_IPV6(skb)   (!vlan_tx_tag_present(skb) && skb->protocol == htons(ETH_P_IPV6))
 
#define IS_ARP(skb)   (!vlan_tx_tag_present(skb) && skb->protocol == htons(ETH_P_ARP))
 
#define IS_VLAN_IP(skb)
 
#define IS_VLAN_IPV6(skb)
 
#define IS_VLAN_ARP(skb)
 
#define IS_PPPOE_IP(skb)
 
#define IS_PPPOE_IPV6(skb)
 

Functions

void br_netfilter_rtable_init (struct net_bridge *br)
 
int nf_bridge_copy_header (struct sk_buff *skb)
 
int __init br_netfilter_init (void)
 
void br_netfilter_fini (void)
 

Macro Definition Documentation

#define brnf_call_arptables   1

Definition at line 61 of file br_netfilter.c.

#define brnf_call_ip6tables   1

Definition at line 60 of file br_netfilter.c.

#define brnf_call_iptables   1

Definition at line 59 of file br_netfilter.c.

#define brnf_filter_pppoe_tagged   0

Definition at line 63 of file br_netfilter.c.

#define brnf_filter_vlan_tagged   0

Definition at line 62 of file br_netfilter.c.

#define brnf_pass_vlan_indev   0

Definition at line 64 of file br_netfilter.c.

#define dnat_took_place (   skb)    (skb_origaddr(skb) != ip_hdr(skb)->daddr)

Definition at line 48 of file br_netfilter.c.

#define IS_ARP (   skb)    (!vlan_tx_tag_present(skb) && skb->protocol == htons(ETH_P_ARP))

Definition at line 73 of file br_netfilter.c.

#define IS_IP (   skb)    (!vlan_tx_tag_present(skb) && skb->protocol == htons(ETH_P_IP))

Definition at line 67 of file br_netfilter.c.

#define IS_IPV6 (   skb)    (!vlan_tx_tag_present(skb) && skb->protocol == htons(ETH_P_IPV6))

Definition at line 70 of file br_netfilter.c.

#define IS_PPPOE_IP (   skb)
Value:
(skb->protocol == htons(ETH_P_PPP_SES) && \
pppoe_proto(skb) == htons(PPP_IP) && \
brnf_filter_pppoe_tagged)

Definition at line 104 of file br_netfilter.c.

#define IS_PPPOE_IPV6 (   skb)
Value:
(skb->protocol == htons(ETH_P_PPP_SES) && \
pppoe_proto(skb) == htons(PPP_IPV6) && \
brnf_filter_pppoe_tagged)

Definition at line 109 of file br_netfilter.c.

#define IS_VLAN_ARP (   skb)
Value:
(vlan_proto(skb) == htons(ETH_P_ARP) && \
brnf_filter_vlan_tagged)

Definition at line 94 of file br_netfilter.c.

#define IS_VLAN_IP (   skb)
Value:
(vlan_proto(skb) == htons(ETH_P_IP) && \
brnf_filter_vlan_tagged)

Definition at line 86 of file br_netfilter.c.

#define IS_VLAN_IPV6 (   skb)
Value:
(vlan_proto(skb) == htons(ETH_P_IPV6) && \
brnf_filter_vlan_tagged)

Definition at line 90 of file br_netfilter.c.

#define skb_origaddr (   skb)
Value:
(((struct bridge_skb_cb *) \
(skb->nf_bridge->data))->daddr.ipv4)

Definition at line 45 of file br_netfilter.c.

#define store_orig_dstaddr (   skb)    (skb_origaddr(skb) = ip_hdr(skb)->daddr)

Definition at line 47 of file br_netfilter.c.

Function Documentation

void br_netfilter_fini ( void  )

Definition at line 1080 of file br_netfilter.c.

int __init br_netfilter_init ( void  )

Definition at line 1053 of file br_netfilter.c.

void br_netfilter_rtable_init ( struct net_bridge br)

Definition at line 162 of file br_netfilter.c.

int nf_bridge_copy_header ( struct sk_buff skb)

Definition at line 326 of file br_netfilter.c.