Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is difference between IFA_LOCAL and IFA_ADDRESS in rtnetlink (Linux)

Tags:

linux

I try understand what is difference between IFA_LOCAL and IFA_ADDRESS.

this is from man:

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

And I don't understand diff between local address and interface address.

Can some one to explain me? Or give me advice where I can find answer?

Thx.

like image 908
Hedgehog Avatar asked Jan 13 '11 09:01

Hedgehog


1 Answers

This comment from if_addr.h should make it clear;

/*
 * 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.
*/
like image 81
ismail Avatar answered Nov 15 '22 14:11

ismail