Getting an IPv6 address scope id from rtnl_addr

Thomas Haller thaller at redhat.com
Tue Mar 8 08:07:40 PST 2016


On Mon, 2016-03-07 at 15:56 +0200, Itai Fiat Gecht wrote:
> Hello,
> 
> Is there a way of getting an IPv6 address's scope id from an
> rtnl_addr
> pointer?
> 
> (I'm speaking about the scope id which can be used in the
> sin6_scope_id field
> of sockaddr_in6, not the scope returned by rtnl_addr_get_scope().)
> 

Hi,

isn't the sin6_scope_id value simply the ifindex of the link?
rtnl_link_get_ifindex()

Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/libnl/attachments/20160308/d8579988/attachment.sig>


More information about the libnl mailing list