[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 23/24] buffer: expose ssh_buffer_{add,get}_data()
[Thread Prev] | [Thread Next]
- Subject: [PATCH 23/24] buffer: expose ssh_buffer_{add,get}_data()
- From: Fabiano Fidêncio <fidencio@xxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Mon, 18 Jan 2016 10:07:04 +0100
- To: libssh@xxxxxxxxxx
- Cc: Fabiano Fidêncio <fidencio@xxxxxxxxxx>
Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx> --- include/libssh/buffer.h | 2 -- include/libssh/libssh.h | 2 ++ src/buffer.c | 4 ---- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/include/libssh/buffer.h b/include/libssh/buffer.h index 3bdd675..abfcc74 100644 --- a/include/libssh/buffer.h +++ b/include/libssh/buffer.h @@ -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 */ diff --git a/include/libssh/libssh.h b/include/libssh/libssh.h index 635e015..6ef6322 100644 --- a/include/libssh/libssh.h +++ b/include/libssh/libssh.h @@ -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 diff --git a/src/buffer.c b/src/buffer.c index 24a428c..16e324f 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -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. -- 2.5.0
[PATCH 00/24] clean up + expose some buffer functions (the ones necessary for writing an ssh-agent). | Fabiano Fidêncio <fidencio@xxxxxxxxxx> |