1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-27 13:21:11 +03:00

buffer: expose ssh_buffer_get()

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Fabiano Fidêncio
2015-09-25 02:06:08 +02:00
parent 6953c8ec91
commit 5c5b1aaaa7
3 changed files with 1 additions and 5 deletions

View File

@@ -72,9 +72,6 @@ int _ssh_buffer_unpack(struct ssh_buffer_struct *buffer,
int ssh_buffer_prepend_data(ssh_buffer buffer, const void *data, uint32_t len); int ssh_buffer_prepend_data(ssh_buffer buffer, const void *data, uint32_t len);
int ssh_buffer_add_buffer(ssh_buffer buffer, ssh_buffer source); int ssh_buffer_add_buffer(ssh_buffer buffer, ssh_buffer source);
/* ssh_buffer_get_rest returns a pointer to the current position into the buffer */
void *ssh_buffer_get(ssh_buffer buffer);
/* buffer_read_*() returns the number of bytes read, except for ssh strings */ /* buffer_read_*() returns the number of bytes read, except for ssh strings */
int ssh_buffer_get_u8(ssh_buffer buffer, uint8_t *data); 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_u32(ssh_buffer buffer, uint32_t *data);

View File

@@ -684,6 +684,7 @@ LIBSSH_API void ssh_buffer_free(ssh_buffer buffer);
LIBSSH_API int ssh_buffer_reinit(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 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_data(ssh_buffer buffer, void *data, uint32_t requestedlen);
LIBSSH_API void *ssh_buffer_get(ssh_buffer buffer);
LIBSSH_API uint32_t ssh_buffer_get_len(ssh_buffer buffer); LIBSSH_API uint32_t ssh_buffer_get_len(ssh_buffer buffer);
#ifndef LIBSSH_LEGACY_0_4 #ifndef LIBSSH_LEGACY_0_4

View File

@@ -431,8 +431,6 @@ int ssh_buffer_add_buffer(struct ssh_buffer_struct *buffer,
} }
/** /**
* @internal
*
* @brief Get a pointer to the head of a buffer at the current position. * @brief Get a pointer to the head of a buffer at the current position.
* *
* @param[in] buffer The buffer to get the head pointer. * @param[in] buffer The buffer to get the head pointer.