struct nl_addr definition on Ubuntu
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?
> 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
While indeed the code
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
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 :)
More information about the libnl