assh/helper_io.h header reference
Description [link]
This header provides helper functions designed to handle events generated by the transport layer.
It also provides terminal related helper functions.
Header inclusion [link]
Members [link]
Functions [link]
- size_t asshh_fd_event(struct assh_session_s *s, struct assh_event_s *e, int fd)
- assh_status_t asshh_fd_get_password(struct assh_context_s *c, const char **pass, size_t max_len, int fd, assh_bool_t echo)
- void asshh_print_kex_details(struct assh_session_s *s, FILE *out, const struct assh_event_s *event)
- void asshh_print_string(FILE *out, const struct assh_cbuffer_s *str)
Members detail [link]
size_t asshh_fd_event(struct assh_session_s *s, struct assh_event_s *e, int fd) [link]
This function is declared in assh/helper_io.h source file, line 51.
This function can be used to handle the ASSH_EVENT_READ and ASSH_EVENT_WRITE events by reading from and writing to a file descriptor. The amount of transferred data is returned.
This function takes care of calling the assh_event_done function.
assh_status_t asshh_fd_get_password(struct assh_context_s *c, const char **pass, size_t max_len, int fd, assh_bool_t echo) [link]
This function is declared in assh/helper_io.h source file, line 59.
This function read characters on the file descriptor until a new line is found. The terminal echo is disabled. Characters beyond the specified length are read but ignored. This function fails if the file descriptor is not a tty.
void asshh_print_kex_details(struct assh_session_s *s, FILE *out, const struct assh_event_s *event) [link]
This function is declared in assh/helper_io.h source file, line 71.
This function prints a list of algorithms selected by the kex exchange.
void asshh_print_string(FILE *out, const struct assh_cbuffer_s *str) [link]
This function is declared in assh/helper_io.h source file, line 66.
This function writes a string to the passed stream, filtering out terminal control characters.