buffer: expose ssh_buffer_{add,get}_data()
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Этот коммит содержится в:
родитель
58aff4495e
Коммит
6953c8ec91
@ -47,7 +47,6 @@ int ssh_buffer_add_u8(ssh_buffer buffer, uint8_t data);
|
||||
int ssh_buffer_add_u16(ssh_buffer buffer, uint16_t data);
|
||||
int ssh_buffer_add_u32(ssh_buffer buffer, uint32_t data);
|
||||
int ssh_buffer_add_u64(ssh_buffer buffer, uint64_t data);
|
||||
int ssh_buffer_add_data(ssh_buffer buffer, const void *data, uint32_t len);
|
||||
|
||||
int ssh_buffer_pack_va(struct ssh_buffer_struct *buffer,
|
||||
const char *format,
|
||||
@ -81,7 +80,6 @@ int ssh_buffer_get_u8(ssh_buffer buffer, uint8_t *data);
|
||||
int ssh_buffer_get_u32(ssh_buffer buffer, uint32_t *data);
|
||||
int ssh_buffer_get_u64(ssh_buffer buffer, uint64_t *data);
|
||||
|
||||
uint32_t ssh_buffer_get_data(ssh_buffer buffer, void *data, uint32_t requestedlen);
|
||||
/* ssh_buffer_get_ssh_string() is an exception. if the String read is too large or invalid, it will answer NULL. */
|
||||
ssh_string ssh_buffer_get_ssh_string(ssh_buffer buffer);
|
||||
/* ssh_gets a string out of a SSH-1 mpint */
|
||||
|
@ -682,6 +682,8 @@ LIBSSH_API const char* ssh_get_hmac_out(ssh_session session);
|
||||
LIBSSH_API ssh_buffer ssh_buffer_new(void);
|
||||
LIBSSH_API void ssh_buffer_free(ssh_buffer buffer);
|
||||
LIBSSH_API int ssh_buffer_reinit(ssh_buffer buffer);
|
||||
LIBSSH_API int ssh_buffer_add_data(ssh_buffer buffer, const void *data, uint32_t len);
|
||||
LIBSSH_API uint32_t ssh_buffer_get_data(ssh_buffer buffer, void *data, uint32_t requestedlen);
|
||||
LIBSSH_API uint32_t ssh_buffer_get_len(ssh_buffer buffer);
|
||||
|
||||
#ifndef LIBSSH_LEGACY_0_4
|
||||
|
@ -206,8 +206,6 @@ int ssh_buffer_reinit(struct ssh_buffer_struct *buffer)
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @brief Add data at the tail of a buffer.
|
||||
*
|
||||
* @param[in] buffer The buffer to add the data.
|
||||
@ -515,8 +513,6 @@ uint32_t ssh_buffer_pass_bytes_end(struct ssh_buffer_struct *buffer, uint32_t le
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @brief Get the remaining data out of the buffer and adjust the read pointer.
|
||||
*
|
||||
* @param[in] buffer The buffer to read.
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user