]> git.ipfire.org Git - thirdparty/openvpn.git/commit
networking: add net_iface_type API
authorAntonio Quartulli <a@unstable.cc>
Wed, 13 Jul 2022 12:43:32 +0000 (14:43 +0200)
committerGert Doering <gert@greenie.muc.de>
Wed, 13 Jul 2022 12:47:49 +0000 (14:47 +0200)
commit26b6b6f0673fa1f3806c447a18bb0f705b231b35
tree4be1ff9e903c66c7b16909bfe83a3e7f7dfd0d30
parentdab9343a0530ee2468304823181372393d365675
networking: add net_iface_type API

This new API can be used to retrieve the type of a specific interface.
It's mostly platform dependant, but right now expected values are
"ovpn-dco", "tun" or "tap".

Other values are possible too, but they are not of interest to us.

This commit also extends the networking unit-test by using the newly
introduced API in conjunction with iface_new and iface_del.

The t_net.sh script has been slightly adapted to allow running these
tests in standalone (as they don't require any iproute2 counterpart).

Signed-off-by: Antonio Quartulli <a@unstable.cc>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20220713124332.16147-1-a@unstable.cc>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg24688.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/networking.h
src/openvpn/networking_iproute2.c
src/openvpn/networking_sitnl.c
tests/t_net.sh
tests/unit_tests/openvpn/test_networking.c