rtnetlink(Linux)中IFA_LOCAL和IFA_ADDRESS之间有什么区别

时间:2011-01-13 09:47:59

标签: linux

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

这是来自男人:

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

我不明白本地地址和接口地址之间的区别。

有人可以解释一下吗?或者在我能找到答案的地方给我建议?

THX。

1 个答案:

答案 0 :(得分:12)

来自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.
*/