diff options
Diffstat (limited to 'src/libstrongswan/utils/chunk.h')
-rw-r--r-- | src/libstrongswan/utils/chunk.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libstrongswan/utils/chunk.h b/src/libstrongswan/utils/chunk.h index 34ba77357..d3751da70 100644 --- a/src/libstrongswan/utils/chunk.h +++ b/src/libstrongswan/utils/chunk.h @@ -100,6 +100,14 @@ void chunk_split(chunk_t chunk, const char *mode, ...); bool chunk_write(chunk_t chunk, char *path, char *label, mode_t mask, bool force); /** + * Store data read from FD into a chunk + * + * @param fd file descriptor to read from + * @return chunk or chunk_empty on failure + */ +chunk_t chunk_from_fd(int fd); + +/** * Convert a chunk of data to hex encoding. * * The resulting string is '\\0' terminated, but the chunk does not include @@ -368,6 +376,7 @@ u_int64_t chunk_mac(chunk_t chunk, u_char *key); * Arguments are: * chunk_t *chunk * Use #-modifier to print a compact version + * Use +-modifier to print a compact version without separator */ int chunk_printf_hook(printf_hook_data_t *data, printf_hook_spec_t *spec, const void *const *args); |