|
struct ssh_buffer_struct * | ssh_buffer_new (void) |
| Create a new SSH buffer.
|
|
void | ssh_buffer_free (struct ssh_buffer_struct *buffer) |
| Deallocate a SSH buffer.
|
|
void | ssh_buffer_set_secure (ssh_buffer buffer) |
| Sets the buffer as secure.
|
|
int | ssh_buffer_reinit (struct ssh_buffer_struct *buffer) |
| Reinitialize a SSH buffer.
|
|
int | ssh_buffer_add_data (struct ssh_buffer_struct *buffer, const void *data, uint32_t len) |
| Add data at the tail of a buffer.
|
|
int | ssh_buffer_allocate_size (struct ssh_buffer_struct *buffer, uint32_t len) |
| Ensure the buffer has at least a certain preallocated size.
|
|
void * | ssh_buffer_allocate (struct ssh_buffer_struct *buffer, uint32_t len) |
|
int | ssh_buffer_add_ssh_string (struct ssh_buffer_struct *buffer, struct ssh_string_struct *string) |
|
int | ssh_buffer_add_u32 (struct ssh_buffer_struct *buffer, uint32_t data) |
|
int | ssh_buffer_add_u16 (struct ssh_buffer_struct *buffer, uint16_t data) |
|
int | ssh_buffer_add_u64 (struct ssh_buffer_struct *buffer, uint64_t data) |
|
int | ssh_buffer_add_u8 (struct ssh_buffer_struct *buffer, uint8_t data) |
|
int | ssh_buffer_prepend_data (struct ssh_buffer_struct *buffer, const void *data, uint32_t len) |
|
int | ssh_buffer_add_buffer (struct ssh_buffer_struct *buffer, struct ssh_buffer_struct *source) |
|
void * | ssh_buffer_get (struct ssh_buffer_struct *buffer) |
| Get a pointer to the head of a buffer at the current position.
|
|
uint32_t | ssh_buffer_get_len (struct ssh_buffer_struct *buffer) |
| Get the length of the buffer from the current position.
|
|
uint32_t | ssh_buffer_pass_bytes (struct ssh_buffer_struct *buffer, uint32_t len) |
|
uint32_t | ssh_buffer_pass_bytes_end (struct ssh_buffer_struct *buffer, uint32_t len) |
|
uint32_t | ssh_buffer_get_data (struct ssh_buffer_struct *buffer, void *data, uint32_t len) |
| Get the remaining data out of the buffer and adjust the read pointer.
|
|
uint32_t | ssh_buffer_get_u8 (struct ssh_buffer_struct *buffer, uint8_t *data) |
|
uint32_t | ssh_buffer_get_u32 (struct ssh_buffer_struct *buffer, uint32_t *data) |
|
uint32_t | ssh_buffer_get_u64 (struct ssh_buffer_struct *buffer, uint64_t *data) |
|
int | ssh_buffer_validate_length (struct ssh_buffer_struct *buffer, size_t len) |
| Validates that the given length can be obtained from the buffer.
|
|
struct ssh_string_struct * | ssh_buffer_get_ssh_string (struct ssh_buffer_struct *buffer) |
|
int | ssh_buffer_pack_va (struct ssh_buffer_struct *buffer, const char *format, size_t argc, va_list ap) |
|
int | _ssh_buffer_pack (struct ssh_buffer_struct *buffer, const char *format, size_t argc,...) |
|
int | ssh_buffer_unpack_va (struct ssh_buffer_struct *buffer, const char *format, size_t argc, va_list ap) |
|
int | _ssh_buffer_unpack (struct ssh_buffer_struct *buffer, const char *format, size_t argc,...) |
|
Functions to handle SSH buffers.