Function SilcBufferUnformatFunc
SYNOPSIS
typedef int (*SilcBufferUnformatFunc)(SilcBuffer buffer,
void **value,
void *context);
DESCRIPTION
Unformatting function callback given with SILC_STR_FUNC type. The
`buffer' is the buffer being unformatted and is at the location where
the SILC_STR_FUNC was placed in unformatting. The function should
check there is enough data in the `buffer' before trying to decode
from it.
If this function unformats anything from the buffer its value is to
be returned to the `value' pointer. The implementation should itself
decide whether the unformatted value is allocated or not. If this
function does not unformat anything, nothing is returned to `value'
The `context' is caller specific context. Returns -1 on error, and
length of the unformatted value otherwise, and 0 if nothing was
unformatted.
|