Skip to content

batctl: Use libnl(-tiny) for netlink communication

Sven Eckelmann batman 1 version Applied

Status from this message: Applied in revision f8eb19d.

Get series with b4
b4 am 6312194.LhI8hzXjyH@bentobox

Versions newest first

  1. v1 Latest3 patches 6 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/3batctl: Avoid name clash "rtnl_open" with libnlfunctions.c+4 -41 reply
2/3batctl: Use libnl to implement mac resolverMakefile functions.c+149 -1811 reply
3/3batctl: Use libnl to implement vlan parent device resolverfunctions.c+110 -1641 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [B.A.T.M.A.N.] [PATCH 0/3] batctl: Use libnl(-tiny) for netlink communication

Hi,

the current release 2014.0.0 made some problems for me because Debian the new function "rtnl_open" conflicted with libnl-3.0. libnl-3.0 was used in the Debian package to follow the Debian policy chapter 4 about duplicated code.

Using libnl should not be a problem for any linux system because everyone uses it when wireless configuration is done. For example libnl-tiny is already used by the normal OpenWrt system in base system packages:

* netifd
* swconfig
* authsae
* hostapd
* iproute2
* iw
* iwinfo

So it is nearly impossible to not have installed ;)

An additional benefit is the already tested code, better type checks and more linear code instead of lot of loops to parse the data.

The Makefile is written in such a way that it:

* tries to find pkg-config (can be overwritten by setting PKG_CONFIG as environment variable/make parameter)
* tries to find the libnl CFLAGS + LDLIBS (can be avoided by setting LIBNL_CFLAGS/LIBNL_LDLIBS as environment variable/make parameter)
** the search for the CFLAGS + LDLIBS is done using pkg-config using the
library name libnl-3.0 (this can be changed by setting LIBNL_NAME as environment variable/make parameter)

Kind regards,
Sven