]> git.ipfire.org Git - thirdparty/openvpn.git/commit
tun: remove tun_finalize()
authorLev Stipakov <lev@openvpn.net>
Mon, 17 Jan 2022 09:49:17 +0000 (11:49 +0200)
committerGert Doering <gert@greenie.muc.de>
Fri, 21 Jan 2022 12:18:40 +0000 (13:18 +0100)
commitbcf04b0b8e3c0f142ab0ec97627ea140c80c7962
tree6ce70086dc09f909ce8d2e709eb0f446d37ff586
parent544330fefedc87a74b4e17e105ad9151b8ad1dc9
tun: remove tun_finalize()

tun_finalize() is essentially subset of socket_finalize() apart from:

 - using WSAFoo() functions instead of Foo()

 - "from" address is not returned

There is no clear official statement that one can use non-WSA
API on handles, so let's be on a safe side and use both.

Introduce sockethandle_t abstraction, which represents
socket and handle. Add SocketHandle* routines which call
proper API depends on underlying type in abstraction.

Rename socket_finalize() to sockethandle_finalize(), take
sockethandle_t and new routines into use and kick tun_finalize().

Signed-off-by: Lev Stipakov <lev@openvpn.net>
Acked-by: Selva Nair <selva.nair@gmail.com>
Message-Id: <20220117094917.178-1-lstipakov@gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg23555.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/forward.c
src/openvpn/socket.c
src/openvpn/socket.h
src/openvpn/tun.c
src/openvpn/tun.h