struct net_bridge
struct hlist_head hash[BR_HASH_SIZE];

struct net_bridge_fdb_entry
struct hlist_node hlist;
struct net_bridge_port *dst;
mac_addr addr;

Linux桥mac地址表(Hash表)结构

进行地址学习时调用
br_fdb_update(br, p, eth_hdr(skb)->h_source, vid);
将源mac地址传入,更新转发表。

查找转发表时调用
const unsigned char *dest = eth_hdr(skb)->h_dest
dst = __br_fdb_get(br, dest, vid)
判断目的mac地址表项是否存在。

相关文章:

  • 2021-06-11
  • 2022-02-18
  • 2021-10-06
  • 2022-12-23
  • 2022-12-23
  • 2021-07-12
猜你喜欢
  • 2021-12-26
  • 2022-02-08
  • 2021-10-19
  • 2022-12-23
  • 2021-10-14
  • 2021-10-20
相关资源
相似解决方案