SSH Buffers

buffer handling More...


Functions

void buffer_free (struct buffer_struct *buffer)
 deallocate a buffer
void * buffer_get (struct buffer_struct *buffer)
 get a pointer on the head of the buffer
u32 buffer_get_len (struct buffer_struct *buffer)
 get length of the buffer, not counting position
struct buffer_structbuffer_new (void)
 creates a new buffer


Detailed Description

buffer handling

Function Documentation

void buffer_free ( struct buffer_struct buffer  ) 

void* buffer_get ( struct buffer_struct buffer  ) 

get a pointer on the head of the buffer

Parameters:
buffer buffer
Returns:
data pointer on the head. Doesn't take position into account.
Warning:
don't expect data to be nul-terminated
See also:
buffer_get_rest()

buffer_get_len()

Referenced by publickey_from_file(), and publickey_to_string().

u32 buffer_get_len ( struct buffer_struct buffer  ) 

get length of the buffer, not counting position

Parameters:
buffer 
Returns:
length of the buffer
See also:
buffer_get()

Referenced by channel_read_buffer(), publickey_from_file(), and publickey_to_string().

struct buffer_struct* buffer_new ( void   )  [read]


doxygen