gpt4 book ai didi

linux - rtnetlink (Linux) 中的 IFA_LOCAL 和 IFA_ADDRESS 有什么区别

转载 作者:IT王子 更新时间:2023-10-29 00:00:09 41 4
gpt4 key购买 nike

我尝试了解 IFA_LOCAL 和 IFA_ADDRESS 之间的区别。

这是来自男人:

IFA_ADDRESS  raw protocol address  interface address
IFA_LOCAL raw protocol address local address

而且我不明白本地地址和接口(interface)地址之间的区别。

有人可以解释一下吗?或者给我建议在哪里可以找到答案?

谢谢。

最佳答案

if_addr.h 的注释应该说清楚了;

/*
* Important comment:
* IFA_ADDRESS is prefix address, rather than local interface address.
* It makes no difference for normally configured broadcast interfaces,
* but for point-to-point IFA_ADDRESS is DESTINATION address,
* local address is supplied in IFA_LOCAL attribute.
*/

关于linux - rtnetlink (Linux) 中的 IFA_LOCAL 和 IFA_ADDRESS 有什么区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4678637/

41 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com