diff options
author | Dario Lombardo <lomato@gmail.com> | 2016-03-01 14:13:41 +0100 |
---|---|---|
committer | Roland Knall <rknall@gmail.com> | 2016-03-04 07:14:09 +0000 |
commit | d8f541c89b94ae0fe6233bd93dbd0d910a65ccdd (patch) | |
tree | 29f1d6b486240c321848ddae964a1145f82d1e0b /extcap/ssh-base.h | |
parent | 68d4ba212c839631c639974b36fc283a9e90bc5e (diff) | |
download | wireshark-d8f541c89b94ae0fe6233bd93dbd0d910a65ccdd.tar.gz |
extcap: move ssh common functions to ssh-base.
Change-Id: Ic06882a4f914b4f89d936d5d942b50552ae4abb3
Reviewed-on: https://code.wireshark.org/review/14264
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
Diffstat (limited to 'extcap/ssh-base.h')
-rw-r--r-- | extcap/ssh-base.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/extcap/ssh-base.h b/extcap/ssh-base.h new file mode 100644 index 0000000000..07c3e3305a --- /dev/null +++ b/extcap/ssh-base.h @@ -0,0 +1,50 @@ +/* ssh-base.h + * ssh-base has base utility functions to connect to hosts via ssh + * + * Copyright 2016, Dario Lombardo + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1998 Gerald Combs + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#ifndef __SSHBASE_H__ +#define __SSHBASE_H__ + +#include <libssh/libssh.h> + +/* Create a ssh connection using all the possible authentication menthods */ +ssh_session create_ssh_connection(const char* hostname, const unsigned int port, const char* username, + const char* password, const char* sshkey_path, const char* sshkey_passphrase, char** err_info); + +/* Clean the current ssh session and channel. */ +void ssh_cleanup(ssh_session* sshs, ssh_channel* channel); + +#endif + +/* + * Editor modelines - https://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */
\ No newline at end of file |