1. Download libnl
Http://www.infradead.org /~ Tgr/libnl/
Libnl DOC: http://www.infradead.org /~ Tgr/libnl/doc/core.html
Some userful DOC: http://www.gridmpi.org/pspacer-2.1/libnl-1.0-pre6/group__link.html
Https://blogs.oracle.com/linuxnstuff/entry/adventures_in_netlink
2. Run "linux_network.c"
GCC linux_network.c-lnl-I/usr/local/include
3. Check reference of the New-installed Library
# PKG-config -- cflags -- libs libnl-route-3.0
-I/usr/local/include/libnl3-L/usr/local/lib-lnl-route-3-lnl-3
Then I shoshould run the following command to execute "Netlink. c"
# GCC Netlink. C $ (PKG-config -- cflags -- libs libnl-route-3.0)
Or
# GCC Netlink. C-I/usr/local/include/libnl3-L/usr/local/lib-lnl-route-3-lnl-3
4. In eclipse include header files in "GCC complier already des", and add "nl-3" and "nl-route-3", then it will run.
--------------------------------------------
Nm/usr/local/lib/libnl. So> J
Grep alloc J