libssh 0.5.4
|
00001 /* 00002 * This file is part of the SSH Library 00003 * 00004 * Copyright (c) 2003-2009 by Aris Adamantiadis 00005 * 00006 * The SSH Library is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU Lesser General Public License as published by 00008 * the Free Software Foundation; either version 2.1 of the License, or (at your 00009 * option) any later version. 00010 * 00011 * The SSH Library is distributed in the hope that it will be useful, but 00012 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 00013 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 00014 * License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public License 00017 * along with the SSH Library; see the file COPYING. If not, write to 00018 * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, 00019 * MA 02111-1307, USA. 00020 */ 00021 00022 #ifndef _LIBSSH_H 00023 #define _LIBSSH_H 00024 00025 #if defined _WIN32 || defined __CYGWIN__ 00026 #ifdef LIBSSH_STATIC 00027 #define LIBSSH_API 00028 #else 00029 #ifdef LIBSSH_EXPORTS 00030 #ifdef __GNUC__ 00031 #define LIBSSH_API __attribute__((dllexport)) 00032 #else 00033 #define LIBSSH_API __declspec(dllexport) 00034 #endif 00035 #else 00036 #ifdef __GNUC__ 00037 #define LIBSSH_API __attribute__((dllimport)) 00038 #else 00039 #define LIBSSH_API __declspec(dllimport) 00040 #endif 00041 #endif 00042 #endif 00043 #else 00044 #if __GNUC__ >= 4 && !defined(__OS2__) 00045 #define LIBSSH_API __attribute__((visibility("default"))) 00046 #else 00047 #define LIBSSH_API 00048 #endif 00049 #endif 00050 00051 #ifdef _MSC_VER 00052 /* Visual Studio hasn't inttypes.h so it doesn't know uint32_t */ 00053 typedef int int32_t; 00054 typedef unsigned int uint32_t; 00055 typedef unsigned short uint16_t; 00056 typedef unsigned char uint8_t; 00057 typedef unsigned long long uint64_t; 00058 typedef int mode_t; 00059 #else /* _MSC_VER */ 00060 #include <unistd.h> 00061 #include <inttypes.h> 00062 #endif /* _MSC_VER */ 00063 00064 #ifdef _WIN32 00065 #include <winsock2.h> 00066 #else /* _WIN32 */ 00067 #include <sys/select.h> /* for fd_set * */ 00068 #include <netdb.h> 00069 #endif /* _WIN32 */ 00070 00071 #define SSH_STRINGIFY(s) SSH_TOSTRING(s) 00072 #define SSH_TOSTRING(s) #s 00073 00074 /* libssh version macros */ 00075 #define SSH_VERSION_INT(a, b, c) ((a) << 16 | (b) << 8 | (c)) 00076 #define SSH_VERSION_DOT(a, b, c) a ##.## b ##.## c 00077 #define SSH_VERSION(a, b, c) SSH_VERSION_DOT(a, b, c) 00078 00079 /* libssh version */ 00080 #define LIBSSH_VERSION_MAJOR 0 00081 #define LIBSSH_VERSION_MINOR 5 00082 #define LIBSSH_VERSION_MICRO 2 00083 00084 #define LIBSSH_VERSION_INT SSH_VERSION_INT(LIBSSH_VERSION_MAJOR, \ 00085 LIBSSH_VERSION_MINOR, \ 00086 LIBSSH_VERSION_MICRO) 00087 #define LIBSSH_VERSION SSH_VERSION(LIBSSH_VERSION_MAJOR, \ 00088 LIBSSH_VERSION_MINOR, \ 00089 LIBSSH_VERSION_MICRO) 00090 00091 /* GCC have printf type attribute check. */ 00092 #ifdef __GNUC__ 00093 #define PRINTF_ATTRIBUTE(a,b) __attribute__ ((__format__ (__printf__, a, b))) 00094 #else 00095 #define PRINTF_ATTRIBUTE(a,b) 00096 #endif /* __GNUC__ */ 00097 00098 #ifdef __GNUC__ 00099 #define SSH_DEPRECATED __attribute__ ((deprecated)) 00100 #else 00101 #define SSH_DEPRECATED 00102 #endif 00103 00104 #ifdef __cplusplus 00105 extern "C" { 00106 #endif 00107 00108 00109 typedef struct ssh_agent_struct* ssh_agent; 00110 typedef struct ssh_buffer_struct* ssh_buffer; 00111 typedef struct ssh_channel_struct* ssh_channel; 00112 typedef struct ssh_message_struct* ssh_message; 00113 typedef struct ssh_pcap_file_struct* ssh_pcap_file; 00114 typedef struct ssh_private_key_struct* ssh_private_key; 00115 typedef struct ssh_public_key_struct* ssh_public_key; 00116 typedef struct ssh_key_struct* ssh_key; 00117 typedef struct ssh_scp_struct* ssh_scp; 00118 typedef struct ssh_session_struct* ssh_session; 00119 typedef struct ssh_string_struct* ssh_string; 00120 00121 /* Socket type */ 00122 #ifdef _WIN32 00123 #ifndef socket_t 00124 typedef SOCKET socket_t; 00125 #endif /* socket_t */ 00126 #else /* _WIN32 */ 00127 #ifndef socket_t 00128 typedef int socket_t; 00129 #endif 00130 #endif /* _WIN32 */ 00131 00132 #define SSH_INVALID_SOCKET ((socket_t) -1) 00133 00134 /* the offsets of methods */ 00135 enum ssh_kex_types_e { 00136 SSH_KEX=0, 00137 SSH_HOSTKEYS, 00138 SSH_CRYPT_C_S, 00139 SSH_CRYPT_S_C, 00140 SSH_MAC_C_S, 00141 SSH_MAC_S_C, 00142 SSH_COMP_C_S, 00143 SSH_COMP_S_C, 00144 SSH_LANG_C_S, 00145 SSH_LANG_S_C 00146 }; 00147 00148 #define SSH_CRYPT 2 00149 #define SSH_MAC 3 00150 #define SSH_COMP 4 00151 #define SSH_LANG 5 00152 00153 enum ssh_auth_e { 00154 SSH_AUTH_SUCCESS=0, 00155 SSH_AUTH_DENIED, 00156 SSH_AUTH_PARTIAL, 00157 SSH_AUTH_INFO, 00158 SSH_AUTH_AGAIN, 00159 SSH_AUTH_ERROR=-1 00160 }; 00161 00162 /* auth flags */ 00163 #define SSH_AUTH_METHOD_UNKNOWN 0 00164 #define SSH_AUTH_METHOD_NONE 0x0001 00165 #define SSH_AUTH_METHOD_PASSWORD 0x0002 00166 #define SSH_AUTH_METHOD_PUBLICKEY 0x0004 00167 #define SSH_AUTH_METHOD_HOSTBASED 0x0008 00168 #define SSH_AUTH_METHOD_INTERACTIVE 0x0010 00169 00170 /* messages */ 00171 enum ssh_requests_e { 00172 SSH_REQUEST_AUTH=1, 00173 SSH_REQUEST_CHANNEL_OPEN, 00174 SSH_REQUEST_CHANNEL, 00175 SSH_REQUEST_SERVICE, 00176 SSH_REQUEST_GLOBAL 00177 }; 00178 00179 enum ssh_channel_type_e { 00180 SSH_CHANNEL_UNKNOWN=0, 00181 SSH_CHANNEL_SESSION, 00182 SSH_CHANNEL_DIRECT_TCPIP, 00183 SSH_CHANNEL_FORWARDED_TCPIP, 00184 SSH_CHANNEL_X11 00185 }; 00186 00187 enum ssh_channel_requests_e { 00188 SSH_CHANNEL_REQUEST_UNKNOWN=0, 00189 SSH_CHANNEL_REQUEST_PTY, 00190 SSH_CHANNEL_REQUEST_EXEC, 00191 SSH_CHANNEL_REQUEST_SHELL, 00192 SSH_CHANNEL_REQUEST_ENV, 00193 SSH_CHANNEL_REQUEST_SUBSYSTEM, 00194 SSH_CHANNEL_REQUEST_WINDOW_CHANGE 00195 }; 00196 00197 enum ssh_global_requests_e { 00198 SSH_GLOBAL_REQUEST_UNKNOWN=0, 00199 SSH_GLOBAL_REQUEST_TCPIP_FORWARD, 00200 SSH_GLOBAL_REQUEST_CANCEL_TCPIP_FORWARD, 00201 }; 00202 00203 enum ssh_publickey_state_e { 00204 SSH_PUBLICKEY_STATE_ERROR=-1, 00205 SSH_PUBLICKEY_STATE_NONE=0, 00206 SSH_PUBLICKEY_STATE_VALID=1, 00207 SSH_PUBLICKEY_STATE_WRONG=2 00208 }; 00209 00210 /* status flags */ 00211 #define SSH_CLOSED 0x01 00212 #define SSH_READ_PENDING 0x02 00213 #define SSH_CLOSED_ERROR 0x04 00214 00215 enum ssh_server_known_e { 00216 SSH_SERVER_ERROR=-1, 00217 SSH_SERVER_NOT_KNOWN=0, 00218 SSH_SERVER_KNOWN_OK, 00219 SSH_SERVER_KNOWN_CHANGED, 00220 SSH_SERVER_FOUND_OTHER, 00221 SSH_SERVER_FILE_NOT_FOUND 00222 }; 00223 00224 #ifndef MD5_DIGEST_LEN 00225 #define MD5_DIGEST_LEN 16 00226 #endif 00227 /* errors */ 00228 00229 enum ssh_error_types_e { 00230 SSH_NO_ERROR=0, 00231 SSH_REQUEST_DENIED, 00232 SSH_FATAL, 00233 SSH_EINTR 00234 }; 00235 00236 /* some types for keys */ 00237 enum ssh_keytypes_e{ 00238 SSH_KEYTYPE_UNKNOWN=0, 00239 SSH_KEYTYPE_DSS=1, 00240 SSH_KEYTYPE_RSA, 00241 SSH_KEYTYPE_RSA1 00242 }; 00243 00244 /* Error return codes */ 00245 #define SSH_OK 0 /* No error */ 00246 #define SSH_ERROR -1 /* Error of some kind */ 00247 #define SSH_AGAIN -2 /* The nonblocking call must be repeated */ 00248 #define SSH_EOF -127 /* We have already a eof */ 00249 00259 enum { 00262 SSH_LOG_NOLOG=0, 00265 SSH_LOG_RARE, 00268 SSH_LOG_PROTOCOL, 00271 SSH_LOG_PACKET, 00274 SSH_LOG_FUNCTIONS 00275 }; 00278 enum ssh_options_e { 00279 SSH_OPTIONS_HOST, 00280 SSH_OPTIONS_PORT, 00281 SSH_OPTIONS_PORT_STR, 00282 SSH_OPTIONS_FD, 00283 SSH_OPTIONS_USER, 00284 SSH_OPTIONS_SSH_DIR, 00285 SSH_OPTIONS_IDENTITY, 00286 SSH_OPTIONS_ADD_IDENTITY, 00287 SSH_OPTIONS_KNOWNHOSTS, 00288 SSH_OPTIONS_TIMEOUT, 00289 SSH_OPTIONS_TIMEOUT_USEC, 00290 SSH_OPTIONS_SSH1, 00291 SSH_OPTIONS_SSH2, 00292 SSH_OPTIONS_LOG_VERBOSITY, 00293 SSH_OPTIONS_LOG_VERBOSITY_STR, 00294 SSH_OPTIONS_CIPHERS_C_S, 00295 SSH_OPTIONS_CIPHERS_S_C, 00296 SSH_OPTIONS_COMPRESSION_C_S, 00297 SSH_OPTIONS_COMPRESSION_S_C, 00298 SSH_OPTIONS_PROXYCOMMAND, 00299 SSH_OPTIONS_BINDADDR, 00300 SSH_OPTIONS_STRICTHOSTKEYCHECK, 00301 SSH_OPTIONS_COMPRESSION, 00302 SSH_OPTIONS_COMPRESSION_LEVEL 00303 }; 00304 00305 enum { 00307 SSH_SCP_WRITE, 00309 SSH_SCP_READ, 00310 SSH_SCP_RECURSIVE=0x10 00311 }; 00312 00313 enum ssh_scp_request_types { 00315 SSH_SCP_REQUEST_NEWDIR=1, 00317 SSH_SCP_REQUEST_NEWFILE, 00319 SSH_SCP_REQUEST_EOF, 00321 SSH_SCP_REQUEST_ENDDIR, 00323 SSH_SCP_REQUEST_WARNING 00324 }; 00325 00326 LIBSSH_API int ssh_blocking_flush(ssh_session session, int timeout); 00327 LIBSSH_API ssh_channel ssh_channel_accept_x11(ssh_channel channel, int timeout_ms); 00328 LIBSSH_API int ssh_channel_change_pty_size(ssh_channel channel,int cols,int rows); 00329 LIBSSH_API int ssh_channel_close(ssh_channel channel); 00330 LIBSSH_API void ssh_channel_free(ssh_channel channel); 00331 LIBSSH_API int ssh_channel_get_exit_status(ssh_channel channel); 00332 LIBSSH_API ssh_session ssh_channel_get_session(ssh_channel channel); 00333 LIBSSH_API int ssh_channel_is_closed(ssh_channel channel); 00334 LIBSSH_API int ssh_channel_is_eof(ssh_channel channel); 00335 LIBSSH_API int ssh_channel_is_open(ssh_channel channel); 00336 LIBSSH_API ssh_channel ssh_channel_new(ssh_session session); 00337 LIBSSH_API int ssh_channel_open_forward(ssh_channel channel, const char *remotehost, 00338 int remoteport, const char *sourcehost, int localport); 00339 LIBSSH_API int ssh_channel_open_session(ssh_channel channel); 00340 LIBSSH_API int ssh_channel_poll(ssh_channel channel, int is_stderr); 00341 LIBSSH_API int ssh_channel_read(ssh_channel channel, void *dest, uint32_t count, int is_stderr); 00342 LIBSSH_API int ssh_channel_read_nonblocking(ssh_channel channel, void *dest, uint32_t count, 00343 int is_stderr); 00344 LIBSSH_API int ssh_channel_request_env(ssh_channel channel, const char *name, const char *value); 00345 LIBSSH_API int ssh_channel_request_exec(ssh_channel channel, const char *cmd); 00346 LIBSSH_API int ssh_channel_request_pty(ssh_channel channel); 00347 LIBSSH_API int ssh_channel_request_pty_size(ssh_channel channel, const char *term, 00348 int cols, int rows); 00349 LIBSSH_API int ssh_channel_request_shell(ssh_channel channel); 00350 LIBSSH_API int ssh_channel_request_send_signal(ssh_channel channel, const char *signum); 00351 LIBSSH_API int ssh_channel_request_sftp(ssh_channel channel); 00352 LIBSSH_API int ssh_channel_request_subsystem(ssh_channel channel, const char *subsystem); 00353 LIBSSH_API int ssh_channel_request_x11(ssh_channel channel, int single_connection, const char *protocol, 00354 const char *cookie, int screen_number); 00355 LIBSSH_API int ssh_channel_send_eof(ssh_channel channel); 00356 LIBSSH_API int ssh_channel_select(ssh_channel *readchans, ssh_channel *writechans, ssh_channel *exceptchans, struct 00357 timeval * timeout); 00358 LIBSSH_API void ssh_channel_set_blocking(ssh_channel channel, int blocking); 00359 LIBSSH_API int ssh_channel_write(ssh_channel channel, const void *data, uint32_t len); 00360 LIBSSH_API uint32_t ssh_channel_window_size(ssh_channel channel); 00361 00362 LIBSSH_API int ssh_try_publickey_from_file(ssh_session session, const char *keyfile, 00363 ssh_string *publickey, int *type); 00364 00365 LIBSSH_API int ssh_auth_list(ssh_session session); 00366 LIBSSH_API char *ssh_basename (const char *path); 00367 LIBSSH_API void ssh_clean_pubkey_hash(unsigned char **hash); 00368 LIBSSH_API int ssh_connect(ssh_session session); 00369 LIBSSH_API const char *ssh_copyright(void); 00370 LIBSSH_API void ssh_disconnect(ssh_session session); 00371 LIBSSH_API char *ssh_dirname (const char *path); 00372 LIBSSH_API int ssh_finalize(void); 00373 LIBSSH_API ssh_channel ssh_forward_accept(ssh_session session, int timeout_ms); 00374 LIBSSH_API int ssh_forward_cancel(ssh_session session, const char *address, int port); 00375 LIBSSH_API int ssh_forward_listen(ssh_session session, const char *address, int port, int *bound_port); 00376 LIBSSH_API void ssh_free(ssh_session session); 00377 LIBSSH_API const char *ssh_get_disconnect_message(ssh_session session); 00378 LIBSSH_API const char *ssh_get_error(void *error); 00379 LIBSSH_API int ssh_get_error_code(void *error); 00380 LIBSSH_API socket_t ssh_get_fd(ssh_session session); 00381 LIBSSH_API char *ssh_get_hexa(const unsigned char *what, size_t len); 00382 LIBSSH_API char *ssh_get_issue_banner(ssh_session session); 00383 LIBSSH_API int ssh_get_openssh_version(ssh_session session); 00384 LIBSSH_API ssh_string ssh_get_pubkey(ssh_session session); 00385 LIBSSH_API int ssh_get_pubkey_hash(ssh_session session, unsigned char **hash); 00386 LIBSSH_API int ssh_get_random(void *where,int len,int strong); 00387 LIBSSH_API int ssh_get_version(ssh_session session); 00388 LIBSSH_API int ssh_get_status(ssh_session session); 00389 LIBSSH_API int ssh_init(void); 00390 LIBSSH_API int ssh_is_blocking(ssh_session session); 00391 LIBSSH_API int ssh_is_connected(ssh_session session); 00392 LIBSSH_API int ssh_is_server_known(ssh_session session); 00393 LIBSSH_API void ssh_log(ssh_session session, int prioriry, const char *format, ...) PRINTF_ATTRIBUTE(3, 4); 00394 LIBSSH_API ssh_channel ssh_message_channel_request_open_reply_accept(ssh_message msg); 00395 LIBSSH_API int ssh_message_channel_request_reply_success(ssh_message msg); 00396 LIBSSH_API void ssh_message_free(ssh_message msg); 00397 LIBSSH_API ssh_message ssh_message_get(ssh_session session); 00398 LIBSSH_API int ssh_message_subtype(ssh_message msg); 00399 LIBSSH_API int ssh_message_type(ssh_message msg); 00400 LIBSSH_API int ssh_mkdir (const char *pathname, mode_t mode); 00401 LIBSSH_API ssh_session ssh_new(void); 00402 00403 LIBSSH_API int ssh_options_copy(ssh_session src, ssh_session *dest); 00404 LIBSSH_API int ssh_options_getopt(ssh_session session, int *argcptr, char **argv); 00405 LIBSSH_API int ssh_options_parse_config(ssh_session session, const char *filename); 00406 LIBSSH_API int ssh_options_set(ssh_session session, enum ssh_options_e type, 00407 const void *value); 00408 LIBSSH_API int ssh_pcap_file_close(ssh_pcap_file pcap); 00409 LIBSSH_API void ssh_pcap_file_free(ssh_pcap_file pcap); 00410 LIBSSH_API ssh_pcap_file ssh_pcap_file_new(void); 00411 LIBSSH_API int ssh_pcap_file_open(ssh_pcap_file pcap, const char *filename); 00412 00413 LIBSSH_API enum ssh_keytypes_e ssh_privatekey_type(ssh_private_key privatekey); 00414 00415 LIBSSH_API void ssh_print_hexa(const char *descr, const unsigned char *what, size_t len); 00416 LIBSSH_API int ssh_scp_accept_request(ssh_scp scp); 00417 LIBSSH_API int ssh_scp_close(ssh_scp scp); 00418 LIBSSH_API int ssh_scp_deny_request(ssh_scp scp, const char *reason); 00419 LIBSSH_API void ssh_scp_free(ssh_scp scp); 00420 LIBSSH_API int ssh_scp_init(ssh_scp scp); 00421 LIBSSH_API int ssh_scp_leave_directory(ssh_scp scp); 00422 LIBSSH_API ssh_scp ssh_scp_new(ssh_session session, int mode, const char *location); 00423 LIBSSH_API int ssh_scp_pull_request(ssh_scp scp); 00424 LIBSSH_API int ssh_scp_push_directory(ssh_scp scp, const char *dirname, int mode); 00425 LIBSSH_API int ssh_scp_push_file(ssh_scp scp, const char *filename, size_t size, int perms); 00426 LIBSSH_API int ssh_scp_read(ssh_scp scp, void *buffer, size_t size); 00427 LIBSSH_API const char *ssh_scp_request_get_filename(ssh_scp scp); 00428 LIBSSH_API int ssh_scp_request_get_permissions(ssh_scp scp); 00429 LIBSSH_API size_t ssh_scp_request_get_size(ssh_scp scp); 00430 LIBSSH_API const char *ssh_scp_request_get_warning(ssh_scp scp); 00431 LIBSSH_API int ssh_scp_write(ssh_scp scp, const void *buffer, size_t len); 00432 LIBSSH_API int ssh_select(ssh_channel *channels, ssh_channel *outchannels, socket_t maxfd, 00433 fd_set *readfds, struct timeval *timeout); 00434 LIBSSH_API int ssh_service_request(ssh_session session, const char *service); 00435 LIBSSH_API void ssh_set_blocking(ssh_session session, int blocking); 00436 LIBSSH_API void ssh_set_fd_except(ssh_session session); 00437 LIBSSH_API void ssh_set_fd_toread(ssh_session session); 00438 LIBSSH_API void ssh_set_fd_towrite(ssh_session session); 00439 LIBSSH_API void ssh_silent_disconnect(ssh_session session); 00440 LIBSSH_API int ssh_set_pcap_file(ssh_session session, ssh_pcap_file pcapfile); 00441 #ifndef _WIN32 00442 LIBSSH_API int ssh_userauth_agent_pubkey(ssh_session session, const char *username, 00443 ssh_public_key publickey); 00444 #endif 00445 LIBSSH_API int ssh_userauth_autopubkey(ssh_session session, const char *passphrase); 00446 LIBSSH_API int ssh_userauth_kbdint(ssh_session session, const char *user, const char *submethods); 00447 LIBSSH_API const char *ssh_userauth_kbdint_getinstruction(ssh_session session); 00448 LIBSSH_API const char *ssh_userauth_kbdint_getname(ssh_session session); 00449 LIBSSH_API int ssh_userauth_kbdint_getnprompts(ssh_session session); 00450 LIBSSH_API const char *ssh_userauth_kbdint_getprompt(ssh_session session, unsigned int i, char *echo); 00451 LIBSSH_API int ssh_userauth_kbdint_setanswer(ssh_session session, unsigned int i, 00452 const char *answer); 00453 LIBSSH_API int ssh_userauth_list(ssh_session session, const char *username); 00454 LIBSSH_API int ssh_userauth_none(ssh_session session, const char *username); 00455 LIBSSH_API int ssh_userauth_offer_pubkey(ssh_session session, const char *username, int type, ssh_string publickey); 00456 LIBSSH_API int ssh_userauth_password(ssh_session session, const char *username, const char *password); 00457 LIBSSH_API int ssh_userauth_pubkey(ssh_session session, const char *username, ssh_string publickey, ssh_private_key privatekey); 00458 LIBSSH_API int ssh_userauth_privatekey_file(ssh_session session, const char *username, 00459 const char *filename, const char *passphrase); 00460 LIBSSH_API const char *ssh_version(int req_version); 00461 LIBSSH_API int ssh_write_knownhost(ssh_session session); 00462 00463 LIBSSH_API void ssh_string_burn(ssh_string str); 00464 LIBSSH_API ssh_string ssh_string_copy(ssh_string str); 00465 LIBSSH_API void *ssh_string_data(ssh_string str); 00466 LIBSSH_API int ssh_string_fill(ssh_string str, const void *data, size_t len); 00467 LIBSSH_API void ssh_string_free(ssh_string str); 00468 LIBSSH_API ssh_string ssh_string_from_char(const char *what); 00469 LIBSSH_API size_t ssh_string_len(ssh_string str); 00470 LIBSSH_API ssh_string ssh_string_new(size_t size); 00471 LIBSSH_API char *ssh_string_to_char(ssh_string str); 00472 LIBSSH_API void ssh_string_free_char(char *s); 00473 00474 LIBSSH_API int ssh_getpass(const char *prompt, char *buf, size_t len, int echo, 00475 int verify); 00476 00477 #ifndef LIBSSH_LEGACY_0_4 00478 #include "libssh/legacy.h" 00479 #endif 00480 00481 #ifdef __cplusplus 00482 } 00483 #endif 00484 #endif /* _LIBSSH_H */ 00485 /* vim: set ts=2 sw=2 et cindent: */