]> git.corax.cc Git - toolbox/commit
include/ssh: Simplify SSH module API
authorMatthias Kruk <m@m10k.eu>
Fri, 9 Apr 2021 23:34:26 +0000 (08:34 +0900)
committerMatthias Kruk <m@m10k.eu>
Fri, 9 Apr 2021 23:34:26 +0000 (08:34 +0900)
commitcd464d8e223ca2137e9d985a52eb7d8ba4a15180
tree8c73c6a9e65fd044555d65a3548b7a0e56ffad6d
parent15cb828162605ed1a1623804d7189dda1b70f86b
include/ssh: Simplify SSH module API

The ssh_tunnel_close() and ssh_proxy_close() functions do essentially
the same thing, so they should be merged into one. Further, both of
the functions require the user to remember multiple values from the
ssh_*_open() call in order to close the connection. This seems
unnecessarily complicated.
This commit adds the ssh_close() function as a replacement for
ssh_tunnel_close() and ssh_proxy_close(). Further, the ssh_*_open()
functions now return a handle that can be passed to ssh_close() to
close the respective connection.
include/ssh.sh