我尝试了解IFA_LOCAL和IFA_ADDRESS之间的区别.
这是来自男人:
IFA_ADDRESS raw protocol address interface address
IFA_LOCAL raw protocol address local address
Run Code Online (Sandbox Code Playgroud)
我不明白本地地址和接口地址之间的区别.
有人可以解释一下吗?或者在我能找到答案的地方给我建议?
谢谢.
ism*_*ail 13
这个评论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.
*/
Run Code Online (Sandbox Code Playgroud)