diff options
author | Fabiano Fidêncio <fidencio@redhat.com> | 2015-09-25 01:43:47 +0200 |
---|---|---|
committer | Fabiano Fidêncio <fidencio@redhat.com> | 2015-10-12 13:56:22 +0200 |
commit | a88d8e548f93d1dc6efb777c474905715683320e (patch) | |
tree | 65b02830aba4adea23f5ac5d0e6f6d4e5bfbc3d4 | |
parent | 424cbad8e22f82567db537890d49c9b0126e4e9b (diff) | |
download | libssh-a88d8e548f93d1dc6efb777c474905715683320e.tar.gz libssh-a88d8e548f93d1dc6efb777c474905715683320e.tar.xz libssh-a88d8e548f93d1dc6efb777c474905715683320e.zip |
buffer: expose ssh_buffer_{add,get}_data()
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
-rw-r--r-- | include/libssh/buffer.h | 2 | ||||
-rw-r--r-- | include/libssh/libssh.h | 2 | ||||
-rw-r--r-- | src/buffer.c | 4 |
3 files changed, 2 insertions, 6 deletions
diff --git a/include/libssh/buffer.h b/include/libssh/buffer.h index 3bdd6753..abfcc74e 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 654f0eea..d585d207 100644 --- a/include/libssh/libssh.h +++ b/include/libssh/libssh.h @@ -681,6 +681,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 24a428c9..16e324f9 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. |