How to install net link to use in a C program?
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
1
down vote
favorite
I want to install libnl
package so I can use its APIs to communicate with wireless driver of my computer. I have checked the package status with dpkg -s libnl-3-200
. The result is:
Package: libnl-3-200
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 168
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Multi-Arch: same
Source: libnl3
Version: 3.2.27-1ubuntu0.16.04.1
Depends: libc6 (>= 2.14)
Conffiles:
/etc/libnl-3/classid 3e07259e58674631830b152e983ca995
/etc/libnl-3/pktloc 7613dbc41b2dc3258195b6b6abd0f179
Description: library for dealing with netlink sockets
This is a library for applications dealing with netlink sockets.
The library provides an interface for raw netlink messaging and various
netlink family specific interfaces.
Homepage: http://www.infradead.org/~tgr/libnl/
Original-Maintainer: Heiko Stuebner <mmind@debian.org>
In order to write program, I need to include files like:
#include <netlink/netlink.h>
#include <netlink/cache.h>
#include <netlink/route/link.h>
But the make
cannot find these header files and my /usr/include/
does not have netlink
folder. My /usr/lib/
does not have anything with libnl
in it. Should I install another package?
wireless libraries
add a comment |Â
up vote
1
down vote
favorite
I want to install libnl
package so I can use its APIs to communicate with wireless driver of my computer. I have checked the package status with dpkg -s libnl-3-200
. The result is:
Package: libnl-3-200
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 168
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Multi-Arch: same
Source: libnl3
Version: 3.2.27-1ubuntu0.16.04.1
Depends: libc6 (>= 2.14)
Conffiles:
/etc/libnl-3/classid 3e07259e58674631830b152e983ca995
/etc/libnl-3/pktloc 7613dbc41b2dc3258195b6b6abd0f179
Description: library for dealing with netlink sockets
This is a library for applications dealing with netlink sockets.
The library provides an interface for raw netlink messaging and various
netlink family specific interfaces.
Homepage: http://www.infradead.org/~tgr/libnl/
Original-Maintainer: Heiko Stuebner <mmind@debian.org>
In order to write program, I need to include files like:
#include <netlink/netlink.h>
#include <netlink/cache.h>
#include <netlink/route/link.h>
But the make
cannot find these header files and my /usr/include/
does not have netlink
folder. My /usr/lib/
does not have anything with libnl
in it. Should I install another package?
wireless libraries
2
Yes:libnl-3-dev
â steeldriver
Apr 18 at 16:00
Thanks! I installed it. For some reason the includes are installed in/usr/include/libnl3/netlink
folder. This causesmake
to give me errors since other includes in included files assumenetlink
folder is in/usr/include/
and not in/usr/include/libnl3/
. Can I movenetlink
folder from/usr/include/libnl3/
to/usr/include/
without causing any problems?
â Masoud
Apr 18 at 16:23
1
NO! don't mess with location of system files. Instead usepkg-config --cflags
or add an appropriate-I
directive
â steeldriver
Apr 18 at 16:57
I did define an-I
directive and it solved the problem. Now I need to providemake
with a library name. What is that name? I am looking for a library in/usr/lib/
folder but I cannot find any folder or file withlibnl
in its name.
â Masoud
Apr 18 at 20:07
According topkg-config --libs libnl-3.0
the appropriate library directive is-lnl-3
(corresponding to library namelibnl-3
)
â steeldriver
Apr 18 at 21:32
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I want to install libnl
package so I can use its APIs to communicate with wireless driver of my computer. I have checked the package status with dpkg -s libnl-3-200
. The result is:
Package: libnl-3-200
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 168
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Multi-Arch: same
Source: libnl3
Version: 3.2.27-1ubuntu0.16.04.1
Depends: libc6 (>= 2.14)
Conffiles:
/etc/libnl-3/classid 3e07259e58674631830b152e983ca995
/etc/libnl-3/pktloc 7613dbc41b2dc3258195b6b6abd0f179
Description: library for dealing with netlink sockets
This is a library for applications dealing with netlink sockets.
The library provides an interface for raw netlink messaging and various
netlink family specific interfaces.
Homepage: http://www.infradead.org/~tgr/libnl/
Original-Maintainer: Heiko Stuebner <mmind@debian.org>
In order to write program, I need to include files like:
#include <netlink/netlink.h>
#include <netlink/cache.h>
#include <netlink/route/link.h>
But the make
cannot find these header files and my /usr/include/
does not have netlink
folder. My /usr/lib/
does not have anything with libnl
in it. Should I install another package?
wireless libraries
I want to install libnl
package so I can use its APIs to communicate with wireless driver of my computer. I have checked the package status with dpkg -s libnl-3-200
. The result is:
Package: libnl-3-200
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 168
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Multi-Arch: same
Source: libnl3
Version: 3.2.27-1ubuntu0.16.04.1
Depends: libc6 (>= 2.14)
Conffiles:
/etc/libnl-3/classid 3e07259e58674631830b152e983ca995
/etc/libnl-3/pktloc 7613dbc41b2dc3258195b6b6abd0f179
Description: library for dealing with netlink sockets
This is a library for applications dealing with netlink sockets.
The library provides an interface for raw netlink messaging and various
netlink family specific interfaces.
Homepage: http://www.infradead.org/~tgr/libnl/
Original-Maintainer: Heiko Stuebner <mmind@debian.org>
In order to write program, I need to include files like:
#include <netlink/netlink.h>
#include <netlink/cache.h>
#include <netlink/route/link.h>
But the make
cannot find these header files and my /usr/include/
does not have netlink
folder. My /usr/lib/
does not have anything with libnl
in it. Should I install another package?
wireless libraries
wireless libraries
asked Apr 18 at 15:55
Masoud
134
134
2
Yes:libnl-3-dev
â steeldriver
Apr 18 at 16:00
Thanks! I installed it. For some reason the includes are installed in/usr/include/libnl3/netlink
folder. This causesmake
to give me errors since other includes in included files assumenetlink
folder is in/usr/include/
and not in/usr/include/libnl3/
. Can I movenetlink
folder from/usr/include/libnl3/
to/usr/include/
without causing any problems?
â Masoud
Apr 18 at 16:23
1
NO! don't mess with location of system files. Instead usepkg-config --cflags
or add an appropriate-I
directive
â steeldriver
Apr 18 at 16:57
I did define an-I
directive and it solved the problem. Now I need to providemake
with a library name. What is that name? I am looking for a library in/usr/lib/
folder but I cannot find any folder or file withlibnl
in its name.
â Masoud
Apr 18 at 20:07
According topkg-config --libs libnl-3.0
the appropriate library directive is-lnl-3
(corresponding to library namelibnl-3
)
â steeldriver
Apr 18 at 21:32
add a comment |Â
2
Yes:libnl-3-dev
â steeldriver
Apr 18 at 16:00
Thanks! I installed it. For some reason the includes are installed in/usr/include/libnl3/netlink
folder. This causesmake
to give me errors since other includes in included files assumenetlink
folder is in/usr/include/
and not in/usr/include/libnl3/
. Can I movenetlink
folder from/usr/include/libnl3/
to/usr/include/
without causing any problems?
â Masoud
Apr 18 at 16:23
1
NO! don't mess with location of system files. Instead usepkg-config --cflags
or add an appropriate-I
directive
â steeldriver
Apr 18 at 16:57
I did define an-I
directive and it solved the problem. Now I need to providemake
with a library name. What is that name? I am looking for a library in/usr/lib/
folder but I cannot find any folder or file withlibnl
in its name.
â Masoud
Apr 18 at 20:07
According topkg-config --libs libnl-3.0
the appropriate library directive is-lnl-3
(corresponding to library namelibnl-3
)
â steeldriver
Apr 18 at 21:32
2
2
Yes:
libnl-3-dev
â steeldriver
Apr 18 at 16:00
Yes:
libnl-3-dev
â steeldriver
Apr 18 at 16:00
Thanks! I installed it. For some reason the includes are installed in
/usr/include/libnl3/netlink
folder. This causes make
to give me errors since other includes in included files assume netlink
folder is in /usr/include/
and not in /usr/include/libnl3/
. Can I move netlink
folder from /usr/include/libnl3/
to /usr/include/
without causing any problems?â Masoud
Apr 18 at 16:23
Thanks! I installed it. For some reason the includes are installed in
/usr/include/libnl3/netlink
folder. This causes make
to give me errors since other includes in included files assume netlink
folder is in /usr/include/
and not in /usr/include/libnl3/
. Can I move netlink
folder from /usr/include/libnl3/
to /usr/include/
without causing any problems?â Masoud
Apr 18 at 16:23
1
1
NO! don't mess with location of system files. Instead use
pkg-config --cflags
or add an appropriate -I
directiveâ steeldriver
Apr 18 at 16:57
NO! don't mess with location of system files. Instead use
pkg-config --cflags
or add an appropriate -I
directiveâ steeldriver
Apr 18 at 16:57
I did define an
-I
directive and it solved the problem. Now I need to provide make
with a library name. What is that name? I am looking for a library in /usr/lib/
folder but I cannot find any folder or file with libnl
in its name.â Masoud
Apr 18 at 20:07
I did define an
-I
directive and it solved the problem. Now I need to provide make
with a library name. What is that name? I am looking for a library in /usr/lib/
folder but I cannot find any folder or file with libnl
in its name.â Masoud
Apr 18 at 20:07
According to
pkg-config --libs libnl-3.0
the appropriate library directive is -lnl-3
(corresponding to library name libnl-3
)â steeldriver
Apr 18 at 21:32
According to
pkg-config --libs libnl-3.0
the appropriate library directive is -lnl-3
(corresponding to library name libnl-3
)â steeldriver
Apr 18 at 21:32
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1026150%2fhow-to-install-net-link-to-use-in-a-c-program%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
2
Yes:
libnl-3-dev
â steeldriver
Apr 18 at 16:00
Thanks! I installed it. For some reason the includes are installed in
/usr/include/libnl3/netlink
folder. This causesmake
to give me errors since other includes in included files assumenetlink
folder is in/usr/include/
and not in/usr/include/libnl3/
. Can I movenetlink
folder from/usr/include/libnl3/
to/usr/include/
without causing any problems?â Masoud
Apr 18 at 16:23
1
NO! don't mess with location of system files. Instead use
pkg-config --cflags
or add an appropriate-I
directiveâ steeldriver
Apr 18 at 16:57
I did define an
-I
directive and it solved the problem. Now I need to providemake
with a library name. What is that name? I am looking for a library in/usr/lib/
folder but I cannot find any folder or file withlibnl
in its name.â Masoud
Apr 18 at 20:07
According to
pkg-config --libs libnl-3.0
the appropriate library directive is-lnl-3
(corresponding to library namelibnl-3
)â steeldriver
Apr 18 at 21:32