summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabiano Fidêncio <fidencio@redhat.com>2015-09-25 01:43:47 +0200
committerFabiano Fidêncio <fidencio@redhat.com>2016-01-19 11:31:08 +0100
commit06e1dfb6a8eb02624bd35f273a72eb6d0929abef (patch)
tree603a278b7fef5d80978cd1d5a19e76d923e0c139
parent09f315e7eeb5aa69adae4bbbd5c69ba384c6a21f (diff)
downloadlibssh-06e1dfb6a8eb02624bd35f273a72eb6d0929abef.tar.gz
libssh-06e1dfb6a8eb02624bd35f273a72eb6d0929abef.tar.xz
libssh-06e1dfb6a8eb02624bd35f273a72eb6d0929abef.zip
buffer: expose ssh_buffer_{add,get}_data()
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
-rw-r--r--include/libssh/buffer.h2
-rw-r--r--include/libssh/libssh.h2
-rw-r--r--src/buffer.c4
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 635e015f..6ef63225 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 d3eecb72..4e114760 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.