Getting an IPv6 address scope id from rtnl_addr
Itai Fiat Gecht
itaifg at infinidat.com
Wed Mar 9 01:58:06 PST 2016
>> 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().)
>
> isn't the sin6_scope_id value simply the ifindex of the link?
> rtnl_link_get_ifindex()
It is, but I was hoping for something more explicit (in case the
method of determining scope ids changes at some point in the
future).
More information about the libnl
mailing list