如何安装网络链接以供 C 程序使用?

如何安装网络链接以供 C 程序使用?

我想安装libnl包,以便可以使用其 API 与计算机的无线驱动程序进行通信。我已经使用 检查了包状态dpkg -s libnl-3-200。结果是:

Package: libnl-3-200
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 168
Maintainer: Ubuntu Developers <[email protected]>
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 <[email protected]>

为了编写程序,我需要包含如下文件:

#include <netlink/netlink.h>
#include <netlink/cache.h>
#include <netlink/route/link.h>

但是make找不到这些头文件,我的/usr/include/也没有netlink文件夹。我的里面/usr/lib/什么都没有libnl。我应该安装另一个包吗?

相关内容