libnl version #define LIBNL_VERSION

Jouni Malinen j at
Mon Feb 21 16:36:30 EST 2011

Would it be possible to add a bit more helpful define in
netlink/version.h to allow C preprocessor to be used to select
conditional code based on the libnl version that is installed on the
system? Since the libnl API seems to be changing between versions in
ways that require changes in programs using it, it would be convenient
to be able to do this without having to use manual configuration or

Something like #define LIBNL_VERSION_NUM 0x0201 would make this easier.
I think I can actually use #ifdef LIBNL_VERSION to distinguish 1.1 from
2.0, but I did not see any clear way of doing this between 2.0 and
current git tree (2.1? 3.0?).

Jouni Malinen                                            PGP id EFC895FA

More information about the libnl mailing list