Skip to content

<!DOCTYPE html> <html> <head> <title>Biblioteca</title> </head> <body> <h2>LIBRARY SSH</h2> <strong><h1>libssh 0.8.90</h1></strong><br /> <p> <button><li>La biblioteca SSH</li></button> <button><i>PAGINA PRINCIPAL</li></button> <button><li>PÁGINAS RELACIONADAS</li></button> <button><li>MÓDULOS</li></button> <button><li>ESTRUCTURAS DE DATOS</li><…

License

Notifications You must be signed in to change notification settings

Nenu-doc/-DOCTYPE-html-html-head-title-Biblioteca-title-head-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

-DOCTYPE-html-html-head-title-Biblioteca-title-head-

<!DOCTYPE html> <html> <head> <title>Biblioteca</title> </head> <body> <h2>LIBRARY SSH</h2> <strong><h1>libssh 0.8.90</h1></strong><br /> <p> <button><li>La biblioteca SSH</li></button> <button><i>PAGINA PRINCIPAL</li></button> <button><li>PÁGINAS RELACIONADAS</li></button> <button><li>MÓDULOS</li></button> <button><li>ESTRUCTURAS DE DATOS</li></button> <button><li>ARCHIVOS</li></button> </p> <ul> <button><h3> incluir </h3></button> <button><h3> libssh </h3></button> <button><h3> libssh.h </h3></button> <br /> </ul>   <small>Esta biblioteca es software gratuito; puedes redistribuirlo y / o 7   * modificarlo según los términos del GNU Lesser General Public 8   * Licencia publicada por la Free Software Foundation; ya sea 9   * versión 2.1 de la Licencia, o (a su elección) cualquier versión posterior. 10  * 11  * Esta biblioteca se distribuye con la esperanza de que sea útil, 12  * pero SIN NINGUNA GARANTÍA; sin siquiera la garantía implícita de   21  #ifndef _LIBSSH_H 22  #define _LIBSSH_H 23  24  #si está definido _WIN32 || definido CYGWIN 25   #ifdef LIBSSH_STATIC 26   #define LIBSSH_API 27   #más 28   #ifdef LIBSSH_EXPORTS 29   #ifdef GNUC 30   #define LIBSSH_API __attribute __ ((dllexport)) 31   #más 32   #define LIBSSH_API __declspec (dllexport) 33   #endif 34   #más 35   #ifdef GNUC 36   #define LIBSSH_API attribute __ ((dllimport)) 37   #más 38   #define LIBSSH_API declspec (dllimport) 39   #endif 40   #endif 41   #endif 42  #más 43   #if GNUC> = 4 &&! Definido ( OS2) 44   #define LIBSSH_API __attribute __ ((visibilidad ("predeterminado"))) 45   #más 46   #define LIBSSH_API 47   #endif 48  #endif 49  50  #ifdef _MSC_VER 51   / * Visual Studio no tiene inttypes.h así que no conoce uint32_t * / 52   typedef int int32_t; 53   typedef unsigned int uint32_t; 54   typedef unsigned short uint16_t; 55   typedef unsigned char uint8_t; 56   typedef unsigned long long uint64_t; 57   typedef int mode_t; 58  #else / * _MSC_VER * / 59   #include <unistd.h> 60   #include <inttypes.h> 61   #include <sys / types.h> 62  #endif / * _MSC_VER * / 63  64  #ifdef _WIN32 65   #include <winsock2.h> 66  #else / * _WIN32 * / 67  #include <sys / select.h> / * para fd_set * * / 68  #include <netdb.h> 69  #endif / * _WIN32 * / 70  71  #define SSH_STRINGIFY (s) SSH_TOSTRING (s) 72  #define SSH_TOSTRING (s) #s 73  74  / * macros de versión libssh * / 75  #define SSH_VERSION_INT (a, b, c) ((a) << 16 | (b) << 8 | (c)) 76  #define SSH_VERSION_DOT (a, b, c) a ##. ## b ##. ## c 77  #define SSH_VERSION (a, b, c) SSH_VERSION_DOT (a, b, c) 78  79  / * versión libssh * / 80  #define LIBSSH_VERSION_MAJOR 0 81  #define LIBSSH_VERSION_MINOR 8 82  #define LIBSSH_VERSION_MICRO 90 83  84  #define LIBSSH_VERSION_INT SSH_VERSION_INT (LIBSSH_VERSION_MAJOR, \ 85   LIBSSH_VERSION_MINOR, \ 86   LIBSSH_VERSION_MICRO) 87  #define LIBSSH_VERSION SSH_VERSION (LIBSSH_VERSION_MAJOR, \ 88   LIBSSH_VERSION_MINOR, \ 89   LIBSSH_VERSION_MICRO) 90  91  / * GCC tiene verificación de atributo de tipo printf. * / 92  #ifdef GNUC 93  #define PRINTF_ATTRIBUTE (a, b) attribute ((format (printf, a, b))) 94  #más 95  #define PRINTF_ATTRIBUTE (a, b) 96  #endif / * GNUC * / 97  98  #ifdef GNUC 99  #define SSH_DEPRECATED attribute ((obsoleto)) 100  #más 101  #define SSH_DEPRECATED 102  #endif 103  104  #ifdef __cplusplus 105  externa "C" { 106  #endif 107  108  struct ssh_counter_struct { 109   uint64_t in_bytes; 110   uint64_t out_bytes; 111   uint64_t in_packets; 112   uint64_t out_packets; 113  }; 114  typedef struct ssh_counter_struct * ssh_counter ; 115  116  typedef struct ssh_agent_struct * ssh_agent ; 117  typedef struct ssh_buffer_struct * ssh_buffer ; 118  typedef struct ssh_channel_struct * ssh_channel ; 119  typedef struct ssh_message_struct * ssh_message ; 120  typedef struct ssh_pcap_file_struct * ssh_pcap_file; 121  typedef struct ssh_key_struct * ssh_key ; 122  typedef struct ssh_scp_struct * ssh_scp ; 123  typedef struct ssh_session_struct * ssh_session ; 124  typedef struct ssh_string_struct * ssh_string ; 125  typedef struct ssh_event_struct * ssh_event ; 126  typedef struct ssh_connector_struct * ssh_connector ; 127  typedef void * ssh_gssapi_creds; 128  129  / * Tipo de enchufe * / 130  #ifdef _WIN32 131  #ifndef socket_t 132  typedef SOCKET socket_t; 133  #endif / * socket_t * / 134  #else / * _WIN32 * / 135  #ifndef socket_t 136  typedef int socket_t; 137  #endif 138  #endif / * _WIN32 * / 139  140  #define SSH_INVALID_SOCKET ((socket_t) -1) 141  142  / * las compensaciones de los métodos * / 143  enum ssh_kex_types_e { 144   SSH_KEX = 0, 145   SSH_HOSTKEYS, 146   SSH_CRYPT_C_S, 147   SSH_CRYPT_S_C, 148   SSH_MAC_C_S, 149   SSH_MAC_S_C, 150   SSH_COMP_C_S, 151   SSH_COMP_S_C, 152   SSH_LANG_C_S, 153   SSH_LANG_S_C 154  }; 155  156  #define SSH_CRYPT 2 157  #define SSH_MAC 3 158  #define SSH_COMP 4 159  #define SSH_LANG 5 160  161  enum ssh_auth_e { 162   SSH_AUTH_SUCCESS = 0, 163   SSH_AUTH_DENIED, 164   SSH_AUTH_PARTIAL, 165   SSH_AUTH_INFO, 166   SSH_AUTH_AGAIN, 167   SSH_AUTH_ERROR = -1 168  }; 169  170  / * banderas de autenticación * / 171  #define SSH_AUTH_METHOD_UNKNOWN 0 172  #define SSH_AUTH_METHOD_NONE 0x0001 173  #define SSH_AUTH_METHOD_PASSWORD 0x0002 174  #define SSH_AUTH_METHOD_PUBLICKEY 0x0004 175  #define SSH_AUTH_METHOD_HOSTBASED 0x0008 176  #define SSH_AUTH_METHOD_INTERACTIVE 0x0010 177  #define SSH_AUTH_METHOD_GSSAPI_MIC 0x0020 178  179  / * mensajes * / 180  enum ssh_requests_e { 181   SSH_REQUEST_AUTH = 1, 182   SSH_REQUEST_CHANNEL_OPEN, 183   SSH_REQUEST_CHANNEL, 184   SSH_REQUEST_SERVICE, 185   SSH_REQUEST_GLOBAL 186  }; 187  188  enum ssh_channel_type_e { 189   SSH_CHANNEL_UNKNOWN = 0, 190   SSH_CHANNEL_SESSION, 191   SSH_CHANNEL_DIRECT_TCPIP, 192   SSH_CHANNEL_FORWARDED_TCPIP, 193   SSH_CHANNEL_X11, 194   SSH_CHANNEL_AUTH_AGENT 195  }; 196  197  enum ssh_channel_requests_e { 198   SSH_CHANNEL_REQUEST_UNKNOWN = 0, 199   SSH_CHANNEL_REQUEST_PTY, 200   SSH_CHANNEL_REQUEST_EXEC, 201   SSH_CHANNEL_REQUEST_SHELL, 202   SSH_CHANNEL_REQUEST_ENV, 203   SSH_CHANNEL_REQUEST_SUBSYSTEM, 204   SSH_CHANNEL_REQUEST_WINDOW_CHANGE, 205   SSH_CHANNEL_REQUEST_X11 206  }; 207  208  enum ssh_global_requests_e { 209   SSH_GLOBAL_REQUEST_UNKNOWN = 0, 210   SSH_GLOBAL_REQUEST_TCPIP_FORWARD, 211   SSH_GLOBAL_REQUEST_CANCEL_TCPIP_FORWARD, 212   SSH_GLOBAL_REQUEST_KEEPALIVE 213  }; 214  215  enum ssh_publickey_state_e { 216   SSH_PUBLICKEY_STATE_ERROR = -1, 217   SSH_PUBLICKEY_STATE_NONE = 0, 218   SSH_PUBLICKEY_STATE_VALID = 1, 219   SSH_PUBLICKEY_STATE_WRONG = 2 220  }; 221  222  / * Indicadores de estado * / 224  #define SSH_CLOSED 0x01 225  226  #define SSH_READ_PENDING 0x02 227  228  #define SSH_CLOSED_ERROR 0x04 229  230  #define SSH_WRITE_PENDING 0x08 231  232  enum ssh_server_known_e { 233   SSH_SERVER_ERROR = -1, 234   SSH_SERVER_NOT_KNOWN = 0, 235   SSH_SERVER_KNOWN_OK, 236   SSH_SERVER_KNOWN_CHANGED, 237   SSH_SERVER_FOUND_OTHER, 238   SSH_SERVER_FILE_NOT_FOUND 239  }; 240  241  enum ssh_known_hosts_e { 245   SSH_KNOWN_HOSTS_ERROR = -2, 246  251   SSH_KNOWN_HOSTS_NOT_FOUND = -1, 252  257   SSH_KNOWN_HOSTS_UNKNOWN = 0, 258  262   SSH_KNOWN_HOSTS_OK, 263  269   SSH_KNOWN_HOSTS_CHANGED, 270  275   SSH_KNOWN_HOSTS_OTHER, 276  }; 277  278  #ifndef MD5_DIGEST_LEN 279   #define MD5_DIGEST_LEN 16 280  #endif 281  / * errores * / 282  283  enum ssh_error_types_e { 284   SSH_NO_ERROR = 0, 285   SSH_REQUEST_DENIED, 286   SSH_FATAL, 287   SSH_EINTR 288  }; 289  290  / * algunos tipos de claves * / 291  enum ssh_keytypes_e { 292   SSH_KEYTYPE_UNKNOWN = 0, 293   SSH_KEYTYPE_DSS = 1, 294   SSH_KEYTYPE_RSA, 295   SSH_KEYTYPE_RSA1, 296   SSH_KEYTYPE_ECDSA, 297   SSH_KEYTYPE_ED25519, 298   SSH_KEYTYPE_DSS_CERT01, 299   SSH_KEYTYPE_RSA_CERT01 300  }; 301  302  enum ssh_keycmp_e { 303   SSH_KEY_CMP_PUBLIC = 0, 304   SSH_KEY_CMP_PRIVATE 305  }; 306  307  #define SSH_ADDRSTRLEN 46 308  309  struct ssh_knownhosts_entry { 310   char * nombre de host; 311   char * sin analizar; 312   ssh_key publickey; 313   char * comentario; 314  }; 315  316  317  / * Códigos de retorno de error * / 318  #define SSH_OK 0 / * Sin error * / 319  #define SSH_ERROR -1 / * Error de algún tipo * / 320  #define SSH_AGAIN -2 / * La llamada sin bloqueo debe repetirse * / 321  #define SSH_EOF -127 / * Ya tenemos un eof * / 322  329  enum { 332  SSH_LOG_NOLOG = 0, 335  SSH_LOG_WARNING , 338  SSH_LOG_PROTOCOL , 341  SSH_LOG_PACKET , 344  SSH_LOG_FUNCTIONS 345  }; 347  #define SSH_LOG_RARE SSH_LOG_WARNING 348  357  #define SSH_LOG_NONE 0 358  359  #define SSH_LOG_WARN 1 360  361  #define SSH_LOG_INFO 2 362  363  #define SSH_LOG_DEBUG 3 364  365  #define SSH_LOG_TRACE 4 366  369  enum ssh_options_e { 370   SSH_OPTIONS_HOST, 371   SSH_OPTIONS_PORT, 372   SSH_OPTIONS_PORT_STR, 373   SSH_OPTIONS_FD, 374   SSH_OPTIONS_USER, 375   SSH_OPTIONS_SSH_DIR, 376   SSH_OPTIONS_IDENTITY, 377   SSH_OPTIONS_ADD_IDENTITY, 378   SSH_OPTIONS_KNOWNHOSTS, 379   SSH_OPTIONS_TIMEOUT, 380   SSH_OPTIONS_TIMEOUT_USEC, 381   SSH_OPTIONS_SSH1, 382   SSH_OPTIONS_SSH2, 383   SSH_OPTIONS_LOG_VERBOSITY, 384   SSH_OPTIONS_LOG_VERBOSITY_STR, 385   SSH_OPTIONS_CIPHERS_C_S, 386   SSH_OPTIONS_CIPHERS_S_C, 387   SSH_OPTIONS_COMPRESSION_C_S, 388   SSH_OPTIONS_COMPRESSION_S_C, 389   SSH_OPTIONS_PROXYCOMMAND, 390   SSH_OPTIONS_BINDADDR, 391   SSH_OPTIONS_STRICTHOSTKEYCHECK, 392   SSH_OPTIONS_COMPRESSION, 393   SSH_OPTIONS_COMPRESSION_LEVEL, 394   SSH_OPTIONS_KEY_EXCHANGE, 395   SSH_OPTIONS_HOSTKEYS, 396   SSH_OPTIONS_GSSAPI_SERVER_IDENTITY, 397   SSH_OPTIONS_GSSAPI_CLIENT_IDENTITY, 398   SSH_OPTIONS_GSSAPI_DELEGATE_CREDENTIALS, 399   SSH_OPTIONS_HMAC_C_S, 400   SSH_OPTIONS_HMAC_S_C, 401   SSH_OPTIONS_PASSWORD_AUTH, 402   SSH_OPTIONS_PUBKEY_AUTH, 403   SSH_OPTIONS_KBDINT_AUTH, 404   SSH_OPTIONS_GSSAPI_AUTH, 405   SSH_OPTIONS_GLOBAL_KNOWNHOSTS, 406   SSH_OPTIONS_NODELAY, 407   SSH_OPTIONS_PUBLICKEY_ACCEPTED_TYPES, 408   SSH_OPTIONS_PROCESS_CONFIG, 409   SSH_OPTIONS_REKEY_DATA, 410   SSH_OPTIONS_REKEY_TIME, 411  }; 412  413  enum { 415   SSH_SCP_WRITE, 417   SSH_SCP_READ, 418   SSH_SCP_RECURSIVE = 0x10 419  }; 420  421  enum ssh_scp_request_types { 423   SSH_SCP_REQUEST_NEWDIR = 1, 425   SSH_SCP_REQUEST_NEWFILE, 427   SSH_SCP_REQUEST_EOF, 429   SSH_SCP_REQUEST_ENDDIR, 431   SSH_SCP_REQUEST_WARNING 432  }; 433  434  enum ssh_connector_flags_e { 436   SSH_CONNECTOR_STDOUT = 1, 438   SSH_CONNECTOR_STDERR = 2, 440   SSH_CONNECTOR_BOTH = 3 441  }; 442  443  LIBSSH_API int ssh_blocking_flush ( sesión ssh_session , int timeout); 444  LIBSSH_API ssh_channel ssh_channel_accept_x11 ( canal ssh_channel , int timeout_ms); 445  LIBSSH_API int ssh_channel_change_pty_size ( canal ssh_channel , int cols, int filas); 446  LIBSSH_API int ssh_channel_close ( canal ssh_channel ); 447  LIBSSH_API void ssh_channel_free ( canal ssh_channel ); 448  LIBSSH_API int ssh_channel_get_exit_status ( canal ssh_channel ); 449  LIBSSH_API ssh_session ssh_channel_get_session ( canal ssh_channel ); 450  LIBSSH_API int ssh_channel_is_closed ( canal ssh_channel ); 451  LIBSSH_API int ssh_channel_is_eof ( canal ssh_channel ); 452  LIBSSH_API int ssh_channel_is_open ( canal ssh_channel ); 453  LIBSSH_API ssh_channel ssh_channel_new ( sesión ssh_session ); 454  LIBSSH_API int ssh_channel_open_auth_agent ( canal ssh_channel ); 455  LIBSSH_API int ssh_channel_open_forward ( canal ssh_channel , const char * host remoto, 456   int puerto remoto, const char * sourcehost, int localport); 457  LIBSSH_API int ssh_channel_open_session ( canal ssh_channel ); 458  LIBSSH_API int ssh_channel_open_x11 ( canal ssh_channel , const char * orig_addr, int orig_port); 459  LIBSSH_API int ssh_channel_poll ( canal ssh_channel , int is_stderr); 460  LIBSSH_API int ssh_channel_poll_timeout ( canal ssh_channel , int timeout, int is_stderr); 461  LIBSSH_API int ssh_channel_read ( canal ssh_channel , void * dest, uint32_t count, int is_stderr); 462  LIBSSH_API int ssh_channel_read_timeout ( ssh_channel channel, void * dest, uint32_t count, int is_stderr, int timeout_ms); 463  LIBSSH_API int ssh_channel_read_nonblocking ( canal ssh_channel , void * dest, uint32_t count, 464   int is_stderr); 465  LIBSSH_API int ssh_channel_request_env ( canal ssh_channel , const char * nombre, const char * valor); 466  LIBSSH_API int ssh_channel_request_exec ( canal ssh_channel , const char * cmd); 467  LIBSSH_API int ssh_channel_request_pty ( canal ssh_channel ); 468  LIBSSH_API int ssh_channel_request_pty_size ( canal ssh_channel , const char * term, 469   int cols, int filas); 470  LIBSSH_API int ssh_channel_request_shell ( canal ssh_channel ); 471  LIBSSH_API int ssh_channel_request_send_signal ( canal ssh_channel , const char * signum); 472  LIBSSH_API int ssh_channel_request_send_break ( ssh_channel canal, longitud uint32_t); 473  LIBSSH_API int ssh_channel_request_sftp ( canal ssh_channel ); 474  LIBSSH_API int ssh_channel_request_subsystem ( canal ssh_channel , const char * subsistema); 475  LIBSSH_API int ssh_channel_request_x11 ( canal ssh_channel , int single_connection, const char * protocolo, 476   const char * cookie, int número_pantalla); 477  LIBSSH_API int ssh_channel_request_auth_agent ( canal ssh_channel ); 478  LIBSSH_API int ssh_channel_send_eof ( canal ssh_channel ); 479  LIBSSH_API int ssh_channel_select ( ssh_channel * readchans, ssh_channel * writechans, ssh_channel * exceptchans, struct 480   timeval * tiempo de espera); 481  LIBSSH_API void ssh_channel_set_blocking ( canal ssh_channel , bloqueo int ); 482  LIBSSH_API void ssh_channel_set_counter ( canal ssh_channel , 483  contador ssh_counter ); 484  LIBSSH_API int ssh_channel_write ( canal ssh_channel , const void * datos, uint32_t len); 485  LIBSSH_API int ssh_channel_write_stderr ( canal ssh_channel , 486   const void * datos, 487   uint32_t len); 488  LIBSSH_API uint32_t ssh_channel_window_size ( canal ssh_channel ); 489  490  LIBSSH_API char * ssh_basename ( const char * ruta); 491  LIBSSH_API void ssh_clean_pubkey_hash ( carácter sin firmar ** hash); 492  LIBSSH_API int ssh_connect ( sesión ssh_session ); 493  494  LIBSSH_API ssh_connector ssh_connector_new ( sesión ssh_session ); 495  LIBSSH_API void ssh_connector_free ( conector ssh_connector ); 496  LIBSSH_API int ssh_connector_set_in_channel ( conector ssh_connector , 497  canal ssh_channel , 498   enum ssh_connector_flags_e banderas); 499  LIBSSH_API int ssh_connector_set_out_channel ( conector ssh_connector , 500  canal ssh_channel , 501   enum ssh_connector_flags_e flags); 502  LIBSSH_API void ssh_connector_set_in_fd ( ssh_connector conector, fd socket_t); 503  LIBSSH_API vacío ssh_connector_set_out_fd ( ssh_connector conector, fd socket_t); 504  505  LIBSSH_API const char * ssh_copyright ( void ); 506  LIBSSH_API void ssh_disconnect ( sesión ssh_session ); 507  LIBSSH_API char * ssh_dirname ( const char * ruta); 508  LIBSSH_API int ssh_finalize ( void ); 509  510  / * REENVÍO DE PUERTO INVERSO * / 511  LIBSSH_API ssh_channel ssh_channel_accept_forward ( sesión ssh_session , 512   int timeout_ms, 513   int * puerto_destino); 514  LIBSSH_API int ssh_channel_cancel_forward ( sesión ssh_session , 515   const char * dirección, 516   int puerto); 517  LIBSSH_API int ssh_channel_listen_forward ( sesión ssh_session , 518   const char * dirección, 519  puerto internacional , 520   int * puerto_delimitado); 521  522  LIBSSH_API void ssh_free ( sesión ssh_session ); 523  LIBSSH_API const char * ssh_get_disconnect_message ( sesión ssh_session ); 524  LIBSSH_API const char * ssh_get_error ( void * error); 525  LIBSSH_API int ssh_get_error_code ( void * error); 526  LIBSSH_API socket_t ssh_get_fd ( sesión ssh_session ); 527  LIBSSH_API char * ssh_get_hexa ( const unsigned char * what, size_t len); 528  LIBSSH_API char * ssh_get_issue_banner ( sesión ssh_session ); 529  LIBSSH_API int ssh_get_openssh_version ( sesión ssh_session ); 530  531  LIBSSH_API int ssh_get_server_publickey ( ssh_session sesión, clave ssh tecla *); 532  533  enum ssh_publickey_hash_type { 534   SSH_PUBLICKEY_HASH_SHA1, 535   SSH_PUBLICKEY_HASH_MD5, 536   SSH_PUBLICKEY_HASH_SHA256 537  }; 538  LIBSSH_API int ssh_get_publickey_hash ( clave const ssh_key , 539   enum ssh_publickey_hash_type type, 540   char ** hash sin firmar , 541   size_t * HLEN); 542  543  / * FUNCIONES ANULADAS * / 544  SSH_DEPRECATED LIBSSH_API int ssh_get_pubkey_hash ( sesión ssh_session , carácter sin firmar ** hash); 545  SSH_DEPRECATED LIBSSH_API ssh_channel ssh_forward_accept ( sesión ssh_session , int timeout_ms); 546  SSH_DEPRECATED LIBSSH_API int ssh_forward_cancel ( sesión ssh_session , const char * dirección, int puerto); 547  SSH_DEPRECATED LIBSSH_API int ssh_forward_listen ( sesión ssh_session , const char * dirección, int puerto, int * bound_port); 548  SSH_DEPRECATED LIBSSH_API int ssh_get_publickey ( ssh_session sesión, clave ssh tecla *); 549  SSH_DEPRECATED LIBSSH_API int ssh_write_knownhost ( sesión ssh_session ); 550  SSH_DEPRECATED LIBSSH_API char * ssh_dump_knownhost ( sesión ssh_session ); 551  SSH_DEPRECATED LIBSSH_API int ssh_is_server_known ( sesión ssh_session ); 552  SSH_DEPRECATED LIBSSH_API void ssh_print_hexa ( const char * descr, const unsigned char * what, size_t len); 553  554  555  556  LIBSSH_API int ssh_get_random ( void * donde, int len, int fuerte); 557  LIBSSH_API int ssh_get_version ( sesión ssh_session ); 558  LIBSSH_API int ssh_get_status ( sesión ssh_session ); 559  LIBSSH_API int ssh_get_poll_flags ( sesión ssh_session ); 560  LIBSSH_API int ssh_init ( vacío ); 561  LIBSSH_API int ssh_is_blocking ( sesión ssh_session ); 562  LIBSSH_API int ssh_is_connected ( sesión ssh_session ); 563  564  / * HOSTS CONOCIDOS * / 565  LIBSSH_API void ssh_knownhosts_entry_free ( struct ssh_knownhosts_entry * entrada); 566  #define SSH_KNOWNHOSTS_ENTRY_FREE (e) do {\ 567   si ((e)! = NULO) {\ 568   ssh_knownhosts_entry_free (e); \ 569   e = NULO; \ 570   } \ 571  } mientras (0) 572  573  LIBSSH_API int ssh_known_hosts_parse_line ( const char * host, 574   const char * línea, 575  entrada struct ssh_knownhosts_entry **); 576  LIBSSH_API enumeración ssh_known_hosts_e ssh_session_has_known_hosts_entry ( sesión ssh_session ); 577  578  LIBSSH_API int ssh_session_export_known_hosts_entry ( sesión ssh_session , 579   Char ** pentry_string); 580  LIBSSH_API int ssh_session_update_known_hosts ( sesión ssh_session ); 581  582  LIBSSH_API enumeración ssh_known_hosts_e 583  ssh_session_get_known_hosts_entry ( sesión ssh_session , 584   struct ssh_knownhosts_entry ** pentry); 585  LIBSSH_API enumeración ssh_known_hosts_e ssh_session_is_known_server ( sesión ssh_session ); 586  587  / * REGISTRO * / 588  LIBSSH_API int ssh_set_log_level ( nivel int ); 589  LIBSSH_API int ssh_get_log_level ( void ); 590  LIBSSH_API void * ssh_get_log_userdata ( void ); 591  LIBSSH_API int ssh_set_log_userdata ( void * datos); 592  LIBSSH_API void _ssh_log ( int verbosidad, 593   const char * función , 594   const char * formato, ...) PRINTF_ATTRIBUTE (3, 4); 595  596  / * legado * / 597  SSH_DEPRECATED LIBSSH_API void ssh_log ( sesión ssh_session , 598   int prioridad, 599   const char * formato, ...) PRINTF_ATTRIBUTE (3, 4); 600  601  LIBSSH_API ssh_channel ssh_message_channel_request_open_reply_accept ( ssh_message msg); 602  LIBSSH_API int ssh_message_channel_request_reply_success ( ssh_message msg); 603  #define SSH_MESSAGE_FREE (x) \ 604   hacer {if ((x)! = NULL) {ssh_message_free (x); (x) = NULO; }} mientras (0) 605  LIBSSH_API void ssh_message_free ( ssh_message msg); 606  LIBSSH_API ssh_message ssh_message_get ( sesión ssh_session ); 607  LIBSSH_API int ssh_message_subtype ( ssh_message msg); 608  LIBSSH_API int ssh_message_type ( ssh_message msg); 609  LIBSSH_API int ssh_mkdir ( const char * nombre de ruta, modo_t); 610 LIBSSH_API ssh_session ssh_new(void); 611  612 LIBSSH_API int ssh_options_copy(ssh_session src, ssh_session *dest); 613 LIBSSH_API int ssh_options_getopt(ssh_session session, int *argcptr, char **argv); 614 LIBSSH_API int ssh_options_parse_config(ssh_session session, const char *filename); 615 LIBSSH_API int ssh_options_set(ssh_session session, enum ssh_options_e type, 616  const void *value); 617 LIBSSH_API int ssh_options_get(ssh_session session, enum ssh_options_e type, 618  char **value); 619 LIBSSH_API int ssh_options_get_port(ssh_session session, unsigned int * port_target); 620 LIBSSH_API int ssh_pcap_file_close(ssh_pcap_file pcap); 621 LIBSSH_API void ssh_pcap_file_free(ssh_pcap_file pcap); 622 LIBSSH_API ssh_pcap_file ssh_pcap_file_new(void); 623 LIBSSH_API int ssh_pcap_file_open(ssh_pcap_file pcap, const char *filename); 624  638 typedef int (*ssh_auth_callback) (const char *prompt, char *buf, size_t len, 639  int echo, int verify, void *userdata); 640  641 LIBSSH_API ssh_key ssh_key_new(void); 642 #define SSH_KEY_FREE(x) \ 643  do { if ((x) != NULL) { ssh_key_free(x); x = NULL; } } while(0) 644 LIBSSH_API void ssh_key_free (ssh_key key); 645 LIBSSH_API enum ssh_keytypes_e ssh_key_type(const ssh_key key); 646 LIBSSH_API const char *ssh_key_type_to_char(enum ssh_keytypes_e type); 647 LIBSSH_API enum ssh_keytypes_e ssh_key_type_from_name(const char *name); 648 LIBSSH_API int ssh_key_is_public(const ssh_key k); 649 LIBSSH_API int ssh_key_is_private(const ssh_key k); 650 LIBSSH_API int ssh_key_cmp(const ssh_key k1, 651  const ssh_key k2, 652  enum ssh_keycmp_e what); 653  654 LIBSSH_API int ssh_pki_generate(enum ssh_keytypes_e type, int parameter, 655  ssh_key *pkey); 656 LIBSSH_API int ssh_pki_import_privkey_base64(const char *b64_key, 657  const char *passphrase, 658  ssh_auth_callback auth_fn, 659  void *auth_data, 660  ssh_key *pkey); 661 LIBSSH_API int ssh_pki_export_privkey_base64(const ssh_key privkey, 662  const char *passphrase, 663  ssh_auth_callback auth_fn, 664  void *auth_data, 665  char **b64_key); 666 LIBSSH_API int ssh_pki_import_privkey_file(const char *filename, 667  const char *passphrase, 668  ssh_auth_callback auth_fn, 669  void *auth_data, 670  ssh_key *pkey); 671 LIBSSH_API int ssh_pki_export_privkey_file(const ssh_key privkey, 672  const char *passphrase, 673  ssh_auth_callback auth_fn, 674  void *auth_data, 675  const char *filename); 676  677 LIBSSH_API int ssh_pki_copy_cert_to_privkey(const ssh_key cert_key, 678  ssh_key privkey); 679  680 LIBSSH_API int ssh_pki_import_pubkey_base64(const char *b64_key, 681  enum ssh_keytypes_e type, 682  ssh_key *pkey); 683 LIBSSH_API int ssh_pki_import_pubkey_file(const char *filename, 684  ssh_key *pkey); 685  686 LIBSSH_API int ssh_pki_import_cert_base64(const char *b64_cert, 687  enum ssh_keytypes_e type, 688  ssh_key *pkey); 689 LIBSSH_API int ssh_pki_import_cert_file(const char *filename, 690  ssh_key *pkey); 691  692 LIBSSH_API int ssh_pki_export_privkey_to_pubkey(const ssh_key privkey, 693  ssh_key *pkey); 694 LIBSSH_API int ssh_pki_export_pubkey_base64(const ssh_key key, 695  char **b64_key); 696 LIBSSH_API int ssh_pki_export_pubkey_file(const ssh_key key, 697  const char *filename); 698  699 LIBSSH_API const char *ssh_pki_key_ecdsa_name(const ssh_key key); 700  701 LIBSSH_API char *ssh_get_fingerprint_hash(enum ssh_publickey_hash_type type, 702  unsigned char *hash, 703  size_t len); 704 LIBSSH_API void ssh_print_hash(enum ssh_publickey_hash_type type, unsigned char *hash, size_t len); 705 LIBSSH_API int ssh_send_ignore (ssh_session session, const char *data); 706 LIBSSH_API int ssh_send_debug (ssh_session session, const char *message, int always_display); 707 LIBSSH_API void ssh_gssapi_set_creds(ssh_session session, const ssh_gssapi_creds creds); 708 LIBSSH_API int ssh_scp_accept_request(ssh_scp scp); 709 LIBSSH_API int ssh_scp_close(ssh_scp scp); 710 LIBSSH_API int ssh_scp_deny_request(ssh_scp scp, const char *reason); 711 LIBSSH_API void ssh_scp_free(ssh_scp scp); 712 LIBSSH_API int ssh_scp_init(ssh_scp scp); 713 LIBSSH_API int ssh_scp_leave_directory(ssh_scp scp); 714 LIBSSH_API ssh_scp ssh_scp_new(ssh_session session, int mode, const char *location); 715 LIBSSH_API int ssh_scp_pull_request(ssh_scp scp); 716 LIBSSH_API int ssh_scp_push_directory(ssh_scp scp, const char *dirname, int mode); 717 LIBSSH_API int ssh_scp_push_file(ssh_scp scp, const char *filename, size_t size, int perms); 718 LIBSSH_API int ssh_scp_push_file64(ssh_scp scp, const char *filename, uint64_t size, int perms); 719 LIBSSH_API int ssh_scp_read(ssh_scp scp, void *buffer, size_t size); 720 LIBSSH_API const char *ssh_scp_request_get_filename(ssh_scp scp); 721 LIBSSH_API int ssh_scp_request_get_permissions(ssh_scp scp); 722 LIBSSH_API size_t ssh_scp_request_get_size(ssh_scp scp); 723 LIBSSH_API uint64_t ssh_scp_request_get_size64(ssh_scp scp); 724 LIBSSH_API const char *ssh_scp_request_get_warning(ssh_scp scp); 725 LIBSSH_API int ssh_scp_write(ssh_scp scp, const void *buffer, size_t len); 726 LIBSSH_API int ssh_select(ssh_channel *channels, ssh_channel *outchannels, socket_t maxfd, 727  fd_set *readfds, struct timeval *timeout); 728 LIBSSH_API int ssh_service_request(ssh_session session, const char service); 729 LIBSSH_API int ssh_set_agent_channel(ssh_session session, ssh_channel channel); 730 LIBSSH_API int ssh_set_agent_socket(ssh_session session, socket_t fd); 731 LIBSSH_API void ssh_set_blocking(ssh_session session, int blocking); 732 LIBSSH_API void ssh_set_counters(ssh_session session, ssh_counter scounter, 733  ssh_counter rcounter); 734 LIBSSH_API void ssh_set_fd_except(ssh_session session); 735 LIBSSH_API void ssh_set_fd_toread(ssh_session session); 736 LIBSSH_API void ssh_set_fd_towrite(ssh_session session); 737 LIBSSH_API void ssh_silent_disconnect(ssh_session session); 738 LIBSSH_API int ssh_set_pcap_file(ssh_session session, ssh_pcap_file pcapfile); 739  740 / USERAUTH */ 741 LIBSSH_API int ssh_userauth_none(ssh_session session, const char *username); 742 LIBSSH_API int ssh_userauth_list(ssh_session session, const char *username); 743 LIBSSH_API int ssh_userauth_try_publickey(ssh_session session, 744  const char *username, 745  const ssh_key pubkey); 746 LIBSSH_API int ssh_userauth_publickey(ssh_session session, 747  const char *username, 748  const ssh_key privkey); 749 #ifndef _WIN32 750 LIBSSH_API int ssh_userauth_agent(ssh_session session, 751  const char *username); 752 #endif 753 LIBSSH_API int ssh_userauth_publickey_auto(ssh_session session, 754  const char *username, 755  const char *passphrase); 756 LIBSSH_API int ssh_userauth_password(ssh_session session, 757  const char *username, 758  const char *password); 759  760 LIBSSH_API int ssh_userauth_kbdint(ssh_session session, const char *user, const char *submethods); 761 LIBSSH_API const char *ssh_userauth_kbdint_getinstruction(ssh_session session); 762 LIBSSH_API const char *ssh_userauth_kbdint_getname(ssh_session session); 763 LIBSSH_API int ssh_userauth_kbdint_getnprompts(ssh_session session); 764 LIBSSH_API const char *ssh_userauth_kbdint_getprompt(ssh_session session, unsigned int i, char *echo); 765 LIBSSH_API int ssh_userauth_kbdint_getnanswers(ssh_session session); 766 LIBSSH_API const char *ssh_userauth_kbdint_getanswer(ssh_session session, unsigned int i); 767 LIBSSH_API int ssh_userauth_kbdint_setanswer(ssh_session session, unsigned int i, 768  const char *answer); 769 LIBSSH_API int ssh_userauth_gssapi(ssh_session session); 770 LIBSSH_API const char *ssh_version(int req_version); 771  772 LIBSSH_API void ssh_string_burn(ssh_string str); 773 LIBSSH_API ssh_string ssh_string_copy(ssh_string str); 774 LIBSSH_API void *ssh_string_data(ssh_string str); 775 LIBSSH_API int ssh_string_fill(ssh_string str, const void *data, size_t len); 776 #define SSH_STRING_FREE(x) \ 777  do { if ((x) != NULL) { ssh_string_free(x); x = NULL; } } while(0) 778 LIBSSH_API void ssh_string_free(ssh_string str); 779 LIBSSH_API ssh_string ssh_string_from_char(const char *what); 780 LIBSSH_API size_t ssh_string_len(ssh_string str); 781 LIBSSH_API ssh_string ssh_string_new(size_t size); 782 LIBSSH_API const char *ssh_string_get_char(ssh_string str); 783 LIBSSH_API char ssh_string_to_char(ssh_string str); 784 #define SSH_STRING_FREE_CHAR(x) \ 785  do { if ((x) != NULL) { ssh_string_free_char(x); x = NULL; } } while(0) 786 LIBSSH_API void ssh_string_free_char(char s); 787  788 LIBSSH_API int ssh_getpass(const char prompt, char buf, size_t len, int echo, 789  int verify); 790  791  792 typedef int (ssh_event_callback)(socket_t fd, int revents, void userdata); 793  794 LIBSSH_API ssh_event ssh_event_new(void); 795 LIBSSH_API int ssh_event_add_fd(ssh_event event, socket_t fd, short events, 796  ssh_event_callback cb, void userdata); 797 LIBSSH_API int ssh_event_add_session(ssh_event event, ssh_session session); 798 LIBSSH_API int ssh_event_add_connector(ssh_event event, ssh_connector connector); 799 LIBSSH_API int ssh_event_dopoll(ssh_event event, int timeout); 800 LIBSSH_API int ssh_event_remove_fd(ssh_event event, socket_t fd); 801 LIBSSH_API int ssh_event_remove_session(ssh_event event, ssh_session session); 802 LIBSSH_API int ssh_event_remove_connector(ssh_event event, ssh_connector connector); 803 LIBSSH_API void ssh_event_free(ssh_event event); 804 LIBSSH_API const char ssh_get_clientbanner(ssh_session session); 805 LIBSSH_API const char ssh_get_serverbanner(ssh_session session); 806 LIBSSH_API const char ssh_get_kex_algo(ssh_session session); 807 LIBSSH_API const char ssh_get_cipher_in(ssh_session session); 808 LIBSSH_API const char ssh_get_cipher_out(ssh_session session); 809 LIBSSH_API const char ssh_get_hmac_in(ssh_session session); 810 LIBSSH_API const char ssh_get_hmac_out(ssh_session session); 811  812 LIBSSH_API ssh_buffer ssh_buffer_new(void); 813 LIBSSH_API void ssh_buffer_free(ssh_buffer buffer); 814 #define SSH_BUFFER_FREE(x) \ 815  do { if ((x) != NULL) { ssh_buffer_free(x); x = NULL; } } while(0) 816 LIBSSH_API int ssh_buffer_reinit(ssh_buffer buffer); 817 LIBSSH_API int ssh_buffer_add_data(ssh_buffer buffer, const void *data, uint32_t len); 818 LIBSSH_API uint32_t ssh_buffer_get_data(ssh_buffer buffer, void *data, uint32_t requestedlen); 819 LIBSSH_API void ssh_buffer_get(ssh_buffer buffer); 820 LIBSSH_API uint32_t ssh_buffer_get_len(ssh_buffer buffer); 821  822 #ifndef LIBSSH_LEGACY_0_4 823 #include "libssh/legacy.h" 824 #endif 825  826 #ifdef __cplusplus 827 } 828 #endif 829 #endif / _LIBSSH_H */</small> </body> </html> <!-- Juan Angel Luzardo Muslera / montevideo Uruguay -->

About

<!DOCTYPE html> <html> <head> <title>Biblioteca</title> </head> <body> <h2>LIBRARY SSH</h2> <strong><h1>libssh 0.8.90</h1></strong><br /> <p> <button><li>La biblioteca SSH</li></button> <button><i>PAGINA PRINCIPAL</li></button> <button><li>PÁGINAS RELACIONADAS</li></button> <button><li>MÓDULOS</li></button> <button><li>ESTRUCTURAS DE DATOS</li><…

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published