genl_ctrl_resolve failure

Ali Ranjbar ali.ranjbar at ieee.org
Fri Apr 20 13:51:02 EDT 2012


Thomas;

Interesting, I had to cross compile the libnl using a compiler for mips
provided by Broadcom, I don't know if that could be an issue. I had
integrate this library within an existing code base which has 1000 of
Makefile and all. One more thing. As you see below, I only linked nl and
genl not the route or nf portions of the library? Could this be a problem?
I thought, I can do this, since you have divided the library to 4 different
portion (so final execution won't get too big), so I only link portions of
the library I need. The way I determined which library I need was to start
with all and build, then start commenting out specific libraries and see if
linker complains. This is how i determined that I only need lnl-3 and
lnl-genl-3.

Thanks for your help.

#LDFLAGS   += -lnl-nf-3
LDFLAGS   += -lpthread -lsqlite3 -liniparser -lcrypt -lnl-3 -lnl-genl-3
#LDFLAGS   += -lcrypt -lnl-route-3


On Fri, Apr 20, 2012 at 4:17 AM, Thomas Graf <tgraf at infradead.org> wrote:

> On Thu, Apr 19, 2012 at 02:46:33PM -0700, Ali Ranjbar wrote:
> > Thomas;
> >
> > aranjbar at aranjbar-desktop
> :~/p4ws/alranjba/lego/branches/e2xxx_dev_ctf/bentley/output/debug/libnl-3.2.7/src$
> > ./genl-ctrl-list
> > ./genl-ctrl-list: line 117:
> >
> /home/aranjbar/p4ws/alranjba/lego/branches/e2xxx_dev_ctf/bentley/output/debug/libnl-3.2.7/src/.libs/lt-genl-ctrl-list:
> > cannot execute binary file
> > ./genl-ctrl-list: line 117:
> >
> /home/aranjbar/p4ws/alranjba/lego/branches/e2xxx_dev_ctf/bentley/output/debug/libnl-3.2.7/src/.libs/lt-genl-ctrl-list:
> > Success
> > aranjbar at aranjbar-desktop
> :~/p4ws/alranjba/lego/branches/e2xxx_dev_ctf/bentley/output/debug/libnl-3.2.7/src$
> >
> >
> >
> > I hope this is what you were asking for. Sorry, I am new to using libnl.
> If
> > this isn't the right info, please send me more detailed instructions.
> > Thanks for your help in advance.
>
> Something seems to have screwed up your build. The output should be
> something like this:
>
> [tgraf at lsx libnl]$ src/genl-ctrl-list
> 0x0010 nlctrl version 2
> 0x0011 NLBL_MGMT version 3
> 0x0012 NLBL_CIPSOv4 version 3
> 0x0013 NLBL_UNLBL version 3
> 0x0014 acpi_event version 1
> 0x0015 thermal_event version 1
> 0x0016 VFS_DQUOT version 1
> 0x0017 TASKSTATS version 1
> 0x0018 NET_DM version 2
> [tgraf at lsx libnl]$
>
> This allows you to verify whether your kernel side generic netlink
> family was successfully registered.
>
> It even allows you to list the operations that you have registered:
>
> [tgraf at lsx libnl]$ src/genl-ctrl-list -f details
> 0x0010 nlctrl version 2
>    hdrsize 0 maxattr 7
>      op GETFAMILY (0x03) <has-doit,has-dump,has-policy>
>      grp notify (0x10)
> 0x0011 NLBL_MGMT version 3
>    hdrsize 0 maxattr 10
>      op unknown (0x01) <admin-perm,has-doit,has-policy>
>      op unknown (0x02) <admin-perm,has-doit,has-policy>
>      op unknown (0x03) <has-dump,has-policy>
>      op unknown (0x04) <admin-perm,has-doit,has-policy>
>      op unknown (0x05) <admin-perm,has-doit,has-policy>
>      op unknown (0x06) <has-doit,has-policy>
>      op unknown (0x07) <has-dump,has-policy>
>      op unknown (0x08) <has-doit,has-policy>
> 0x0012 NLBL_CIPSOv4 version 3
>    hdrsize 0 maxattr 12
>      op unknown (0x01) <admin-perm,has-doit,has-policy>
>      op unknown (0x02) <admin-perm,has-doit,has-policy>
>      op unknown (0x03) <has-doit,has-policy>
>      op unknown (0x04) <has-dump,has-policy>
> 0x0013 NLBL_UNLBL version 3
>    hdrsize 0 maxattr 7
>      op unknown (0x03) <admin-perm,has-doit,has-policy>
>      op unknown (0x04) <admin-perm,has-doit,has-policy>
>      op unknown (0x05) <has-dump,has-policy>
>      op unknown (0x06) <admin-perm,has-doit,has-policy>
>      op unknown (0x07) <admin-perm,has-doit,has-policy>
>      op unknown (0x08) <has-dump,has-policy>
>      op unknown (0x01) <admin-perm,has-doit,has-policy>
>      op unknown (0x02) <has-doit,has-policy>
> 0x0014 acpi_event version 1
>    hdrsize 0 maxattr 1
>      grp acpi_mc_group (0x01)
> 0x0015 thermal_event version 1
>    hdrsize 0 maxattr 1
>      grp thermal_mc_grou (0x02)
> 0x0016 VFS_DQUOT version 1
>    hdrsize 0 maxattr 6
> 0x0017 TASKSTATS version 1
>    hdrsize 0 maxattr 4
>      op unknown (0x01) <admin-perm,has-doit,has-policy>
>      op unknown (0x04) <has-doit,has-policy>
> 0x0018 NET_DM version 2
>    hdrsize 0 maxattr 4
>      op unknown (0x02) <has-doit>
>      op unknown (0x03) <has-doit>
>      op unknown (0x04) <has-doit>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/libnl/attachments/20120420/b2828949/attachment.html>


More information about the libnl mailing list