linux bridge代码结构,linux net_bridge结构简介

1、简介

net_bridge结构是表示网桥的数据结构,其内容如下:

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;

};

参考文献:linux 2.6内核

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值