Cache the interfaces and do a foreach in result

Adrian Ban adrian.ban at mantech.ro
Thu Dec 15 12:57:36 EST 2011


Thanks!

On 12/15/2011 2:12 PM, Thomas Graf wrote:
> On Wed, Dec 14, 2011 at 05:12:32PM +0200, Adrian Ban wrote:
>> Hi,
>>
>> I want do a "foreach" through the cached interface list and return
>> some information. I've took a look into nl-link-list.c source, but
>> that file uses a function nl_cache_dump_filter defined in library.
>> The nl_list_for_each_entry I can't use it because it tries to access
>> some struct fields from nl_cache for example. In libnl it uses the
>> netlink-types.h and netlink-local.h headers which are not added in
>> headers on machine.
>>
>> There is another way to do a such "foreach" ?
> nl_cache_foreach() and nl_cache_foreach_filter()
>
> http://www.infradead.org/~tgr/libnl/doc/api/group__cache.html#ga3a0cdf3c64b41a601ee693abea8b9a17



More information about the libnl mailing list