struct nl_addr definition on Ubuntu

Pedro Francisco pedrogfrancisco at gmail.com
Sat Mar 27 12:10:28 EDT 2010


A Quarta 17 Março 2010 15:38:03 Pavel Roskin escreveu:
> On Tue, 2010-03-16 at 21:57 +0000, Pedro Francisco wrote:
> > Hi!
> > I can't find the definition of `struct nl_addr' anywhere on /usr/include
> > on my Ubuntu 9.10 system. In the git tree it is in
> > include/netlink-types.h .
> >
> >
> > My question is: is it a packaging mistake? Or is there a good reason for
> > it not being there?
-snip
> 
-snip 
> struct nl_addr has been in the git repository from the beginning, that
> is from the commit 44d362409d5469aed47d19e7908d19bd194493a4.  That
> includes commit 2e6ded94f453ed725381b1fae5dcaa6c7fcfb9b8 that is called
> "1.1 release".
> 

Ok, found out the proper way to use the address.

I was attempting to interact with libnl based on code from 
http://lists.openwall.net/netdev/2007/12/11/87 .

While indeed the code
inet_ntop(rtnl_addr_get_family(addr),
		     rtnl_addr_get_local(addr)->a_addr, buf, sizeof(buf))

does work, I'm assuming one is supposed to use
nl_addr2str(rtnl_addr_get_local(addr), buf, sizeof(buf))

as to avoid accessing struct nl_addr and thus its definition not being needed 
to be known to the library user.

Thus, it appears the Debian/Ubuntu packager was right in not including the 
file.

If no reply is done to this I will add this information to the Ubuntu bug I 
opened earlier and mark it as invalid.


I will be back though ;) (another mail will follow [to the ML] shortly since 
I'm having trouble using nl_cache_subset() )

Thank you for your help :)
-- 
Pedro



More information about the libnl mailing list