Thomas;<br><br>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.<br>
<br>Thanks for your help.<br><br>#LDFLAGS += -lnl-nf-3<br>LDFLAGS += -lpthread -lsqlite3 -liniparser -lcrypt -lnl-3 -lnl-genl-3<br>#LDFLAGS += -lcrypt -lnl-route-3<br><br><br><div class="gmail_quote">On Fri, Apr 20, 2012 at 4:17 AM, Thomas Graf <span dir="ltr"><<a href="mailto:tgraf@infradead.org">tgraf@infradead.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Thu, Apr 19, 2012 at 02:46:33PM -0700, Ali Ranjbar wrote:<br>
> Thomas;<br>
><br>
> aranjbar@aranjbar-desktop:~/p4ws/alranjba/lego/branches/e2xxx_dev_ctf/bentley/output/debug/libnl-3.2.7/src$<br>
> ./genl-ctrl-list<br>
> ./genl-ctrl-list: line 117:<br>
> /home/aranjbar/p4ws/alranjba/lego/branches/e2xxx_dev_ctf/bentley/output/debug/libnl-3.2.7/src/.libs/lt-genl-ctrl-list:<br>
> cannot execute binary file<br>
> ./genl-ctrl-list: line 117:<br>
> /home/aranjbar/p4ws/alranjba/lego/branches/e2xxx_dev_ctf/bentley/output/debug/libnl-3.2.7/src/.libs/lt-genl-ctrl-list:<br>
> Success<br>
> aranjbar@aranjbar-desktop:~/p4ws/alranjba/lego/branches/e2xxx_dev_ctf/bentley/output/debug/libnl-3.2.7/src$<br>
><br>
><br>
><br>
> I hope this is what you were asking for. Sorry, I am new to using libnl. If<br>
> this isn't the right info, please send me more detailed instructions.<br>
> Thanks for your help in advance.<br>
<br>
</div>Something seems to have screwed up your build. The output should be<br>
something like this:<br>
<br>
[tgraf@lsx libnl]$ src/genl-ctrl-list<br>
0x0010 nlctrl version 2<br>
0x0011 NLBL_MGMT version 3<br>
0x0012 NLBL_CIPSOv4 version 3<br>
0x0013 NLBL_UNLBL version 3<br>
0x0014 acpi_event version 1<br>
0x0015 thermal_event version 1<br>
0x0016 VFS_DQUOT version 1<br>
0x0017 TASKSTATS version 1<br>
0x0018 NET_DM version 2<br>
[tgraf@lsx libnl]$<br>
<br>
This allows you to verify whether your kernel side generic netlink<br>
family was successfully registered.<br>
<br>
It even allows you to list the operations that you have registered:<br>
<br>
[tgraf@lsx libnl]$ src/genl-ctrl-list -f details<br>
0x0010 nlctrl version 2<br>
hdrsize 0 maxattr 7<br>
op GETFAMILY (0x03) <has-doit,has-dump,has-policy><br>
grp notify (0x10)<br>
0x0011 NLBL_MGMT version 3<br>
hdrsize 0 maxattr 10<br>
op unknown (0x01) <admin-perm,has-doit,has-policy><br>
op unknown (0x02) <admin-perm,has-doit,has-policy><br>
op unknown (0x03) <has-dump,has-policy><br>
op unknown (0x04) <admin-perm,has-doit,has-policy><br>
op unknown (0x05) <admin-perm,has-doit,has-policy><br>
op unknown (0x06) <has-doit,has-policy><br>
op unknown (0x07) <has-dump,has-policy><br>
op unknown (0x08) <has-doit,has-policy><br>
0x0012 NLBL_CIPSOv4 version 3<br>
hdrsize 0 maxattr 12<br>
op unknown (0x01) <admin-perm,has-doit,has-policy><br>
op unknown (0x02) <admin-perm,has-doit,has-policy><br>
op unknown (0x03) <has-doit,has-policy><br>
op unknown (0x04) <has-dump,has-policy><br>
0x0013 NLBL_UNLBL version 3<br>
hdrsize 0 maxattr 7<br>
op unknown (0x03) <admin-perm,has-doit,has-policy><br>
op unknown (0x04) <admin-perm,has-doit,has-policy><br>
op unknown (0x05) <has-dump,has-policy><br>
op unknown (0x06) <admin-perm,has-doit,has-policy><br>
op unknown (0x07) <admin-perm,has-doit,has-policy><br>
op unknown (0x08) <has-dump,has-policy><br>
op unknown (0x01) <admin-perm,has-doit,has-policy><br>
op unknown (0x02) <has-doit,has-policy><br>
0x0014 acpi_event version 1<br>
hdrsize 0 maxattr 1<br>
grp acpi_mc_group (0x01)<br>
0x0015 thermal_event version 1<br>
hdrsize 0 maxattr 1<br>
grp thermal_mc_grou (0x02)<br>
0x0016 VFS_DQUOT version 1<br>
hdrsize 0 maxattr 6<br>
0x0017 TASKSTATS version 1<br>
hdrsize 0 maxattr 4<br>
op unknown (0x01) <admin-perm,has-doit,has-policy><br>
op unknown (0x04) <has-doit,has-policy><br>
0x0018 NET_DM version 2<br>
hdrsize 0 maxattr 4<br>
op unknown (0x02) <has-doit><br>
op unknown (0x03) <has-doit><br>
op unknown (0x04) <has-doit><br>
<br>
</blockquote></div><br><br><br><br>