我在 linux 机器上运行 OSPF 协议,“ip neighbor show”列出了以下连接到它的主机。
10.11.15.185 dev eth0 lladdr 52:54:00:48:d1:89 STALE
172.31.2.100 dev veth5 lladdr 00:02:00:00:00:01 STALE
10.11.0.1 dev eth0 lladdr c0:ea:e4:e3:ed:52 DELAY
10.0.0.1 dev veth6 lladdr b6:ca:96:99:bb:b7 STALE
10.11.1.141 dev eth0 lladdr 08:00:27:0e:10:54 REACHABLE
问题:我的应用程序使用如下的 libnl neighor 缓存 API 来列出邻居。问题是它也被称为“224.0.0.5/224.0.0.22/224.0.0.251”之类的多播地址,即使没有邻居条目。不知道这是为什么?有什么办法可以避免,请指教。
___code snippet______
======creation========
err = rtnl_neigh_alloc_cache(sock, &ht_cache);
if (err < 0) {
throw "problem with the neigh cache!";
}
err = nl_cache_mngr_add_cache(mngr, ht_cache, &HTCb, this);
if (err < 0) {
throw "problem adding neigh cache!";
}
=========================
=============read individual entry=====
nl_cache_foreach(ht_cache, &HTIterCb, this);
=========================