27#  ifndef _SSIZE_T_DEFINED 
   30    typedef _W64 SSIZE_T ssize_t;
 
   31#   define _SSIZE_T_DEFINED 
   46char *ssh_get_user_home_dir(
void);
 
   47char *ssh_get_local_username(
void);
 
   48int ssh_file_readaccess_ok(
const char *file);
 
   52char *ssh_path_expand_escape(ssh_session session, 
const char *s);
 
   53int ssh_analyze_banner(ssh_session session, 
int server);
 
   54int ssh_is_ipaddr_v4(
const char *str);
 
   55int ssh_is_ipaddr(
const char *str);
 
   60  struct ssh_iterator *root;
 
   61  struct ssh_iterator *end;
 
   65  struct ssh_iterator *next;
 
   80enum ssh_quote_state_e {
 
   86struct ssh_list *ssh_list_new(
void);
 
   87void ssh_list_free(
struct ssh_list *list);
 
   88struct ssh_iterator *ssh_list_get_iterator(
const struct ssh_list *list);
 
   89struct ssh_iterator *ssh_list_find(
const struct ssh_list *list, 
void *value);
 
   91int ssh_list_append(
struct ssh_list *list, 
const void *data);
 
   92int ssh_list_prepend(
struct ssh_list *list, 
const void *data);
 
   93void ssh_list_remove(
struct ssh_list *list, 
struct ssh_iterator *iterator);
 
   94char *ssh_lowercase(
const char* str);
 
   95char *ssh_hostport(
const char *host, 
int port);
 
   97const void *_ssh_list_pop_head(
struct ssh_list *list);
 
   99#define ssh_iterator_value(type, iterator)\ 
  100  ((type)((iterator)->data)) 
  107#define ssh_list_pop_head(type, ssh_list)\ 
  108  ((type)_ssh_list_pop_head(ssh_list)) 
  110#define SSH_LIST_FREE(x) \ 
  111    do { if ((x) != NULL) { ssh_list_free(x); (x) = NULL; } } while(0) 
  113int ssh_make_milliseconds(
unsigned long sec, 
unsigned long usec);
 
  114void ssh_timestamp_init(
struct ssh_timestamp *ts);
 
  115int ssh_timeout_elapsed(
struct ssh_timestamp *ts, 
int timeout);
 
  118void uint64_inc(
unsigned char *counter);
 
  120void ssh_log_hexdump(
const char *descr, 
const unsigned char *what, 
size_t len);
 
  122int ssh_mkdirs(
const char *pathname, mode_t mode);
 
  124int ssh_quote_file_name(
const char *file_name, 
char *buf, 
size_t buf_len);
 
  125int ssh_newline_vis(
const char *
string, 
char *buf, 
size_t buf_len);
 
  126int ssh_tmpname(
char *name);
 
  128char *ssh_strreplace(
const char *src, 
const char *pattern, 
const char *repl);
 
  130ssize_t 
ssh_readn(
int fd, 
void *buf, 
size_t nbytes);
 
  131ssize_t 
ssh_writen(
int fd, 
const void *buf, 
size_t nbytes);
 
bool ssh_libssh_proxy_jumps(void)
Check if libssh proxy jumps is enabled.
Definition misc.c:2238
ssize_t ssh_writen(int fd, const void *buf, size_t nbytes)
Write the requested number of bytes to a local file.
Definition misc.c:2077
void ssh_log_hexdump(const char *descr, const unsigned char *what, size_t len)
Log the content of a buffer in hexadecimal format, similar to the output of 'hexdump -C' command.
Definition misc.c:521
int ssh_mkdirs(const char *pathname, mode_t mode)
Attempts to create a directory with the given pathname. The missing directories in the given pathname...
Definition misc.c:1053
ssize_t ssh_readn(int fd, void *buf, size_t nbytes)
Read the requested number of bytes from a local file.
Definition misc.c:2021
size_t ssh_list_count(const struct ssh_list *list)
Get the number of elements in the list.
Definition misc.c:764
void ssh_proxyjumps_free(struct ssh_list *proxy_jump_list)
Free proxy jump list.
Definition misc.c:2213
int ssh_check_hostname_syntax(const char *hostname)
Checks syntax of a domain name.
Definition misc.c:2123
char * ssh_path_expand_tilde(const char *d)
Expand a directory starting with a tilde '~'.
Definition misc.c:1116
int ssh_check_username_syntax(const char *username)
Checks syntax of a username.
Definition misc.c:2182
int ssh_timeout_update(struct ssh_timestamp *ts, int timeout)
updates a timeout value so it reflects the remaining time
Definition misc.c:1559
int ssh_dir_writeable(const char *path)
Check if the given path is an existing directory and that is accessible for writing.
Definition misc.c:314