26 char *ssh_get_user_home_dir(
void);
27 char *ssh_get_local_username(
void);
28 int ssh_file_readaccess_ok(
const char *file);
32 char *ssh_path_expand_escape(
ssh_session session,
const char *s);
33 int ssh_analyze_banner(
ssh_session session,
int server);
34 int ssh_is_ipaddr_v4(
const char *str);
35 int ssh_is_ipaddr(
const char *str);
54 enum ssh_quote_state_e {
61 void ssh_list_free(
struct ssh_list *list);
65 int ssh_list_append(
struct ssh_list *list,
const void *data);
66 int ssh_list_prepend(
struct ssh_list *list,
const void *data);
68 char *ssh_lowercase(
const char* str);
69 char *ssh_hostport(
const char *host,
int port);
71 const void *_ssh_list_pop_head(
struct ssh_list *list);
73 #define ssh_iterator_value(type, iterator)\ 74 ((type)((iterator)->data)) 81 #define ssh_list_pop_head(type, ssh_list)\ 82 ((type)_ssh_list_pop_head(ssh_list)) 84 int ssh_make_milliseconds(
long sec,
long usec);
86 int ssh_timeout_elapsed(
struct ssh_timestamp *ts,
int timeout);
89 int ssh_match_group(
const char *group,
const char *
object);
91 void uint64_inc(
unsigned char *counter);
93 void ssh_log_hexdump(
const char *descr,
const unsigned char *what,
size_t len);
95 int ssh_mkdirs(
const char *pathname, mode_t mode);
97 int ssh_quote_file_name(
const char *file_name,
char *buf,
size_t buf_len);
98 int ssh_newline_vis(
const char *
string,
char *buf,
size_t buf_len);
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:283
Definition: session.h:109
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:467
size_t ssh_list_count(const struct ssh_list *list)
Get the number of elements in the list.
Definition: misc.c:703
int ssh_timeout_update(struct ssh_timestamp *ts, int timeout)
updates a timeout value so it reflects the remaining time
Definition: misc.c:1420
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:977
char * ssh_path_expand_tilde(const char *d)
Expand a directory starting with a tilde '~'.
Definition: misc.c:1037