1. Introduction
The Net_bridge structure is the data structure that represents the network bridge, and its contents are as follows:
struct Net_bridge
{
spinlock_t lock;
struct list_headport_list;
struct Net_device*dev;
struct net_device_statsstatistics;
Spinlock_thash_lock;
struct Hlist_headhash[br_hash_size];
struct list_headage_list;
unsigned longfeature_mask;
* STP * *
Bridge_iddesignated_root;
bridge_idbridge_id;
U32root_path_cost;
unsigned longmax_age;
unsigned longhello_time;
unsigned longforward_delay;
unsigned longbridge_max_age;
unsigned longageing_time;
unsigned longbridge_hello_time;
unsigned longbridge_forward_delay;
U8group_addr[eth_alen];
U16root_port;
enum {
br_no_stp,/* NO Spanning Tree * *
br_kernel_stp,/* old STP in KERNEL * *
br_user_stp,/* new RSTP in userspace *
} stp_enabled;
unsigned chartopology_change;
unsigned chartopology_change_detected;
struct Timer_listhello_timer;
struct Timer_listtcn_timer;
struct Timer_listtopology_change_timer;
struct Timer_listgc_timer;
struct kobjectifobj;
};
References: Linux 2.6 kernel