66 lines
1.6 KiB
Groff
66 lines
1.6 KiB
Groff
.TH NDBUF_READ_RAW 3 "15 September 2018" "NDBUF" "Binary buffers lib manual"
|
|
.SH NAME
|
|
ndbuf_read_u8 \- Read unsigned 8 bit value from buffer
|
|
.br
|
|
ndbuf_read_u16 \- Read unsigned 16 bit value from buffer
|
|
.br
|
|
ndbuf_read_u32 \- Read unsigned 32 bit value from buffer
|
|
.br
|
|
ndbuf_read_u64 \- Read unsigned 64 bit value from buffer
|
|
.br
|
|
ndbuf_read_raw \- Read raw data with pointed length
|
|
.br
|
|
.SH SYNOPSIS
|
|
.B #include <ndbuf/ndbuf.h>
|
|
.sp
|
|
uint32_t ndbuf_read_u8(ndbuf_t *, uint8_t *);
|
|
|
|
uint32_t ndbuf_read_u16(ndbuf_t *, uint16_t *);
|
|
|
|
uint32_t ndbuf_read_u32(ndbuf_t *, uint32_t *);
|
|
|
|
uint32_t ndbuf_read_u64(ndbuf_t *, uint64_t *);
|
|
|
|
uint32_t ndbuf_read_raw(ndbuf_t *, void *, uint32_t);
|
|
.br
|
|
.sp
|
|
.SH DESCRIPTION
|
|
Those functions reads a data from the
|
|
.B ndbuf_t
|
|
structure. Returns amount of bytes ridden or 0 in case of error.
|
|
.br
|
|
.B ndbuf_read_u8
|
|
,
|
|
.B ndbuf_read_u16
|
|
,
|
|
.B ndbuf_read_u32
|
|
,
|
|
.B ndbuf_read_u64
|
|
functions copies an integer values from
|
|
.B ndbuf_t
|
|
structure to the second function argument.
|
|
.br
|
|
.B ndbuf_read_raw
|
|
function copies raw data from
|
|
.B ndbuf_t
|
|
structure to the second argument with provided length in the third argument. Memory of appropriate length should be preallocated at the given pointer.
|
|
.br
|
|
.SH BUGS
|
|
Not known yet.
|
|
.SH EXAMPLE
|
|
None.
|
|
.SH APPLICATION USAGE
|
|
None.
|
|
.SH RATIONALE
|
|
This family of functions might be used when the copy of the data is required, otherwise use
|
|
.B ndbuf_escan
|
|
family of functions.
|
|
.SH SEE ALSO
|
|
.BI ndbuf_write_raw(3), ndbuf_escan(3)
|
|
.SH COPYRIGHT
|
|
This software licensed under GNU LGPL v2.1 or later. See COPYING for further details.
|
|
.br
|
|
(c) Authors of libndbuf 2017-2018 <http://vapaa.xyz>
|
|
.SH AUTHOR
|
|
Alexander Vdolainen (alex@vapaa.xyz)
|