Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions | Variables
br_private.h File Reference
#include <linux/netdevice.h>
#include <linux/if_bridge.h>
#include <linux/netpoll.h>
#include <linux/u64_stats_sync.h>
#include <net/route.h>

Go to the source code of this file.

Data Structures

struct  bridge_id
 
struct  mac_addr
 
struct  br_ip
 
struct  net_bridge_fdb_entry
 
struct  net_bridge_port_group
 
struct  net_bridge_mdb_entry
 
struct  net_bridge_mdb_htable
 
struct  net_bridge_port
 
struct  br_cpu_netstats
 
struct  net_bridge
 
struct  br_input_skb_cb
 

Macros

#define BR_HASH_BITS   8
 
#define BR_HASH_SIZE   (1 << BR_HASH_BITS)
 
#define BR_HOLD_TIME   (1*HZ)
 
#define BR_PORT_BITS   10
 
#define BR_MAX_PORTS   (1<<BR_PORT_BITS)
 
#define BR_VERSION   "2.3"
 
#define BR_GROUPFWD_DEFAULT   0
 
#define BR_GROUPFWD_RESTRICTED   0x4007u
 
#define BR_STP_PROG   "/sbin/bridge-stp"
 
#define BR_HAIRPIN_MODE   0x00000001
 
#define br_port_exists(dev)   (dev->priv_flags & IFF_BRIDGE_PORT)
 
#define BR_SET_MAC_ADDR   0x00000001
 
#define BR_INPUT_SKB_CB(__skb)   ((struct br_input_skb_cb *)(__skb)->cb)
 
#define BR_INPUT_SKB_CB_MROUTERS_ONLY(__skb)   (0)
 
#define br_printk(level, br, format, args...)   printk(level "%s: " format, (br)->dev->name, ##args)
 
#define br_err(__br, format, args...)   br_printk(KERN_ERR, __br, format, ##args)
 
#define br_warn(__br, format, args...)   br_printk(KERN_WARNING, __br, format, ##args)
 
#define br_notice(__br, format, args...)   br_printk(KERN_NOTICE, __br, format, ##args)
 
#define br_info(__br, format, args...)   br_printk(KERN_INFO, __br, format, ##args)
 
#define br_debug(br, format, args...)   pr_debug("%s: " format, (br)->dev->name, ##args)
 
#define br_netfilter_init()   (0)
 
#define br_netfilter_fini()   do { } while(0)
 
#define br_netfilter_rtable_init(x)
 
#define br_sysfs_addif(p)   (0)
 
#define br_sysfs_renameif(p)   (0)
 
#define br_sysfs_addbr(dev)   (0)
 
#define br_sysfs_delbr(dev)   do { } while(0)
 

Typedefs

typedef struct bridge_id bridge_id
 
typedef struct mac_addr mac_addr
 
typedef __u16 port_id
 

Functions

void br_dev_setup (struct net_device *dev)
 
void br_dev_delete (struct net_device *dev, struct list_head *list)
 
netdev_tx_t br_dev_xmit (struct sk_buff *skb, struct net_device *dev)
 
int br_fdb_init (void)
 
void br_fdb_fini (void)
 
void br_fdb_flush (struct net_bridge *br)
 
void br_fdb_changeaddr (struct net_bridge_port *p, const unsigned char *newaddr)
 
void br_fdb_change_mac_address (struct net_bridge *br, const u8 *newaddr)
 
void br_fdb_cleanup (unsigned long arg)
 
void br_fdb_delete_by_port (struct net_bridge *br, const struct net_bridge_port *p, int do_all)
 
struct net_bridge_fdb_entry__br_fdb_get (struct net_bridge *br, const unsigned char *addr)
 
int br_fdb_test_addr (struct net_device *dev, unsigned char *addr)
 
int br_fdb_fillbuf (struct net_bridge *br, void *buf, unsigned long count, unsigned long off)
 
int br_fdb_insert (struct net_bridge *br, struct net_bridge_port *source, const unsigned char *addr)
 
void br_fdb_update (struct net_bridge *br, struct net_bridge_port *source, const unsigned char *addr)
 
int br_fdb_delete (struct ndmsg *ndm, struct net_device *dev, const unsigned char *addr)
 
int br_fdb_add (struct ndmsg *nlh, struct nlattr *tb[], struct net_device *dev, const unsigned char *addr, u16 nlh_flags)
 
int br_fdb_dump (struct sk_buff *skb, struct netlink_callback *cb, struct net_device *dev, int idx)
 
void br_deliver (const struct net_bridge_port *to, struct sk_buff *skb)
 
int br_dev_queue_push_xmit (struct sk_buff *skb)
 
void br_forward (const struct net_bridge_port *to, struct sk_buff *skb, struct sk_buff *skb0)
 
int br_forward_finish (struct sk_buff *skb)
 
void br_flood_deliver (struct net_bridge *br, struct sk_buff *skb)
 
void br_flood_forward (struct net_bridge *br, struct sk_buff *skb, struct sk_buff *skb2)
 
void br_port_carrier_check (struct net_bridge_port *p)
 
int br_add_bridge (struct net *net, const char *name)
 
int br_del_bridge (struct net *net, const char *name)
 
void br_net_exit (struct net *net)
 
int br_add_if (struct net_bridge *br, struct net_device *dev)
 
int br_del_if (struct net_bridge *br, struct net_device *dev)
 
int br_min_mtu (const struct net_bridge *br)
 
netdev_features_t br_features_recompute (struct net_bridge *br, netdev_features_t features)
 
int br_handle_frame_finish (struct sk_buff *skb)
 
rx_handler_result_t br_handle_frame (struct sk_buff **pskb)
 
int br_dev_ioctl (struct net_device *dev, struct ifreq *rq, int cmd)
 
int br_ioctl_deviceless_stub (struct net *net, unsigned int cmd, void __user *arg)
 
void br_log_state (const struct net_bridge_port *p)
 
struct net_bridge_portbr_get_port (struct net_bridge *br, u16 port_no)
 
void br_init_port (struct net_bridge_port *p)
 
void br_become_designated_port (struct net_bridge_port *p)
 
int br_set_forward_delay (struct net_bridge *br, unsigned long x)
 
int br_set_hello_time (struct net_bridge *br, unsigned long x)
 
int br_set_max_age (struct net_bridge *br, unsigned long x)
 
void br_stp_enable_bridge (struct net_bridge *br)
 
void br_stp_disable_bridge (struct net_bridge *br)
 
void br_stp_set_enabled (struct net_bridge *br, unsigned long val)
 
void br_stp_enable_port (struct net_bridge_port *p)
 
void br_stp_disable_port (struct net_bridge_port *p)
 
bool br_stp_recalculate_bridge_id (struct net_bridge *br)
 
void br_stp_change_bridge_id (struct net_bridge *br, const unsigned char *a)
 
void br_stp_set_bridge_priority (struct net_bridge *br, u16 newprio)
 
int br_stp_set_port_priority (struct net_bridge_port *p, unsigned long newprio)
 
int br_stp_set_path_cost (struct net_bridge_port *p, unsigned long path_cost)
 
ssize_t br_show_bridge_id (char *buf, const struct bridge_id *id)
 
void br_stp_rcv (const struct stp_proto *proto, struct sk_buff *skb, struct net_device *dev)
 
void br_stp_timer_init (struct net_bridge *br)
 
void br_stp_port_timer_init (struct net_bridge_port *p)
 
unsigned long br_timer_value (const struct timer_list *timer)
 
int br_netlink_init (void)
 
void br_netlink_fini (void)
 
void br_ifinfo_notify (int event, struct net_bridge_port *port)
 

Variables

struct notifier_block br_device_notifier
 
const u8 br_group_address [ETH_ALEN]
 
struct rtnl_link_ops br_link_ops
 

Macro Definition Documentation

#define br_debug (   br,
  format,
  args... 
)    pr_debug("%s: " format, (br)->dev->name, ##args)

Definition at line 287 of file br_private.h.

#define br_err (   __br,
  format,
  args... 
)    br_printk(KERN_ERR, __br, format, ##args)

Definition at line 278 of file br_private.h.

#define BR_GROUPFWD_DEFAULT   0

Definition at line 33 of file br_private.h.

#define BR_GROUPFWD_RESTRICTED   0x4007u

Definition at line 35 of file br_private.h.

#define BR_HAIRPIN_MODE   0x00000001

Definition at line 137 of file br_private.h.

#define BR_HASH_BITS   8

Definition at line 22 of file br_private.h.

#define BR_HASH_SIZE   (1 << BR_HASH_BITS)

Definition at line 23 of file br_private.h.

#define BR_HOLD_TIME   (1*HZ)

Definition at line 25 of file br_private.h.

#define br_info (   __br,
  format,
  args... 
)    br_printk(KERN_INFO, __br, format, ##args)

Definition at line 284 of file br_private.h.

#define BR_INPUT_SKB_CB (   __skb)    ((struct br_input_skb_cb *)(__skb)->cb)

Definition at line 267 of file br_private.h.

#define BR_INPUT_SKB_CB_MROUTERS_ONLY (   __skb)    (0)

Definition at line 272 of file br_private.h.

#define BR_MAX_PORTS   (1<<BR_PORT_BITS)

Definition at line 28 of file br_private.h.

#define br_netfilter_fini (   void)    do { } while(0)

Definition at line 504 of file br_private.h.

#define br_netfilter_init (   void)    (0)

Definition at line 503 of file br_private.h.

#define br_netfilter_rtable_init (   x)

Definition at line 505 of file br_private.h.

#define br_notice (   __br,
  format,
  args... 
)    br_printk(KERN_NOTICE, __br, format, ##args)

Definition at line 282 of file br_private.h.

#define BR_PORT_BITS   10

Definition at line 27 of file br_private.h.

#define br_port_exists (   dev)    (dev->priv_flags & IFF_BRIDGE_PORT)

Definition at line 157 of file br_private.h.

#define br_printk (   level,
  br,
  format,
  args... 
)    printk(level "%s: " format, (br)->dev->name, ##args)

Definition at line 275 of file br_private.h.

#define BR_SET_MAC_ADDR   0x00000001

Definition at line 195 of file br_private.h.

#define BR_STP_PROG   "/sbin/bridge-stp"

Definition at line 38 of file br_private.h.

#define br_sysfs_addbr (   dev)    (0)

Definition at line 571 of file br_private.h.

#define br_sysfs_addif (   p)    (0)

Definition at line 569 of file br_private.h.

#define br_sysfs_delbr (   dev)    do { } while(0)

Definition at line 572 of file br_private.h.

#define br_sysfs_renameif (   p)    (0)

Definition at line 570 of file br_private.h.

#define BR_VERSION   "2.3"

Definition at line 30 of file br_private.h.

#define br_warn (   __br,
  format,
  args... 
)    br_printk(KERN_WARNING, __br, format, ##args)

Definition at line 280 of file br_private.h.

Typedef Documentation

Definition at line 40 of file br_private.h.

Definition at line 41 of file br_private.h.

Definition at line 42 of file br_private.h.

Function Documentation

struct net_bridge_fdb_entry* __br_fdb_get ( struct net_bridge br,
const unsigned char addr 
)
read

Definition at line 233 of file br_fdb.c.

int br_add_bridge ( struct net net,
const char name 
)

Definition at line 231 of file br_if.c.

int br_add_if ( struct net_bridge br,
struct net_device dev 
)

Definition at line 321 of file br_if.c.

void br_become_designated_port ( struct net_bridge_port p)

Definition at line 342 of file br_stp.c.

int br_del_bridge ( struct net net,
const char name 
)

Definition at line 251 of file br_if.c.

int br_del_if ( struct net_bridge br,
struct net_device dev 
)

Definition at line 421 of file br_if.c.

void br_deliver ( const struct net_bridge_port to,
struct sk_buff skb 
)

Definition at line 100 of file br_forward.c.

void br_dev_delete ( struct net_device dev,
struct list_head list 
)

Definition at line 164 of file br_if.c.

int br_dev_ioctl ( struct net_device dev,
struct ifreq rq,
int  cmd 
)

Definition at line 379 of file br_ioctl.c.

int br_dev_queue_push_xmit ( struct sk_buff skb)

Definition at line 42 of file br_forward.c.

void br_dev_setup ( struct net_device dev)

Definition at line 330 of file br_device.c.

netdev_tx_t br_dev_xmit ( struct sk_buff skb,
struct net_device dev 
)

Definition at line 26 of file br_device.c.

int br_fdb_add ( struct ndmsg nlh,
struct nlattr tb[],
struct net_device dev,
const unsigned char addr,
u16  nlh_flags 
)

Definition at line 611 of file br_fdb.c.

void br_fdb_change_mac_address ( struct net_bridge br,
const u8 newaddr 
)

Definition at line 130 of file br_fdb.c.

void br_fdb_changeaddr ( struct net_bridge_port p,
const unsigned char newaddr 
)

Definition at line 91 of file br_fdb.c.

void br_fdb_cleanup ( unsigned long  arg)

Definition at line 142 of file br_fdb.c.

int br_fdb_delete ( struct ndmsg ndm,
struct net_device dev,
const unsigned char addr 
)

Definition at line 658 of file br_fdb.c.

void br_fdb_delete_by_port ( struct net_bridge br,
const struct net_bridge_port p,
int  do_all 
)

Definition at line 190 of file br_fdb.c.

int br_fdb_dump ( struct sk_buff skb,
struct netlink_callback cb,
struct net_device dev,
int  idx 
)

Definition at line 538 of file br_fdb.c.

int br_fdb_fillbuf ( struct net_bridge br,
void buf,
unsigned long  count,
unsigned long  off 
)

Definition at line 278 of file br_fdb.c.

void br_fdb_fini ( void  )

Definition at line 49 of file br_fdb.c.

void br_fdb_flush ( struct net_bridge br)

Definition at line 171 of file br_fdb.c.

int br_fdb_init ( void  )

Definition at line 36 of file br_fdb.c.

int br_fdb_insert ( struct net_bridge br,
struct net_bridge_port source,
const unsigned char addr 
)

Definition at line 403 of file br_fdb.c.

int br_fdb_test_addr ( struct net_device dev,
unsigned char addr 
)
void br_fdb_update ( struct net_bridge br,
struct net_bridge_port source,
const unsigned char addr 
)

Definition at line 414 of file br_fdb.c.

netdev_features_t br_features_recompute ( struct net_bridge br,
netdev_features_t  features 
)

Definition at line 300 of file br_if.c.

void br_flood_deliver ( struct net_bridge br,
struct sk_buff skb 
)

Definition at line 197 of file br_forward.c.

void br_flood_forward ( struct net_bridge br,
struct sk_buff skb,
struct sk_buff skb2 
)

Definition at line 203 of file br_forward.c.

void br_forward ( const struct net_bridge_port to,
struct sk_buff skb,
struct sk_buff skb0 
)

Definition at line 111 of file br_forward.c.

int br_forward_finish ( struct sk_buff skb)

Definition at line 57 of file br_forward.c.

struct net_bridge_port* br_get_port ( struct net_bridge br,
u16  port_no 
)
read

Definition at line 40 of file br_stp.c.

rx_handler_result_t br_handle_frame ( struct sk_buff **  pskb)

Definition at line 146 of file br_input.c.

int br_handle_frame_finish ( struct sk_buff skb)

Definition at line 48 of file br_input.c.

void br_ifinfo_notify ( int  event,
struct net_bridge_port port 
)

Definition at line 84 of file br_netlink.c.

void br_init_port ( struct net_bridge_port p)

Definition at line 36 of file br_stp_if.c.

int br_ioctl_deviceless_stub ( struct net net,
unsigned int  cmd,
void __user arg 
)

Definition at line 351 of file br_ioctl.c.

void br_log_state ( const struct net_bridge_port p)

Definition at line 32 of file br_stp.c.

int br_min_mtu ( const struct net_bridge br)

Definition at line 279 of file br_if.c.

void br_net_exit ( struct net net)

Definition at line 448 of file br_if.c.

void br_netlink_fini ( void  )

Definition at line 246 of file br_netlink.c.

int br_netlink_init ( void  )

Definition at line 219 of file br_netlink.c.

void br_port_carrier_check ( struct net_bridge_port p)

Definition at line 64 of file br_if.c.

int br_set_forward_delay ( struct net_bridge br,
unsigned long  x 
)

Definition at line 520 of file br_stp.c.

int br_set_hello_time ( struct net_bridge br,
unsigned long  x 
)

Definition at line 489 of file br_stp.c.

int br_set_max_age ( struct net_bridge br,
unsigned long  x 
)

Definition at line 504 of file br_stp.c.

ssize_t br_show_bridge_id ( char buf,
const struct bridge_id id 
)

Definition at line 297 of file br_stp_if.c.

void br_stp_change_bridge_id ( struct net_bridge br,
const unsigned char a 
)

Definition at line 179 of file br_stp_if.c.

void br_stp_disable_bridge ( struct net_bridge br)

Definition at line 65 of file br_stp_if.c.

void br_stp_disable_port ( struct net_bridge_port p)

Definition at line 96 of file br_stp_if.c.

void br_stp_enable_bridge ( struct net_bridge br)

Definition at line 46 of file br_stp_if.c.

void br_stp_enable_port ( struct net_bridge_port p)

Definition at line 87 of file br_stp_if.c.

void br_stp_port_timer_init ( struct net_bridge_port p)

Definition at line 157 of file br_stp_timer.c.

void br_stp_rcv ( const struct stp_proto proto,
struct sk_buff skb,
struct net_device dev 
)

Definition at line 138 of file br_stp_bpdu.c.

bool br_stp_recalculate_bridge_id ( struct net_bridge br)

Definition at line 211 of file br_stp_if.c.

void br_stp_set_bridge_priority ( struct net_bridge br,
u16  newprio 
)

Definition at line 237 of file br_stp_if.c.

void br_stp_set_enabled ( struct net_bridge br,
unsigned long  val 
)

Definition at line 165 of file br_stp_if.c.

int br_stp_set_path_cost ( struct net_bridge_port p,
unsigned long  path_cost 
)

Definition at line 285 of file br_stp_if.c.

int br_stp_set_port_priority ( struct net_bridge_port p,
unsigned long  newprio 
)

Definition at line 262 of file br_stp_if.c.

void br_stp_timer_init ( struct net_bridge br)

Definition at line 142 of file br_stp_timer.c.

unsigned long br_timer_value ( const struct timer_list timer)

Definition at line 170 of file br_stp_timer.c.

Variable Documentation

struct notifier_block br_device_notifier

Definition at line 22 of file br_notify.c.

const u8 br_group_address[ETH_ALEN]

Definition at line 23 of file br_input.c.

struct rtnl_link_ops br_link_ops