upipe/uref_block.h header reference
Upipe wrapper for block ubuf and uref More
Header inclusion
Members
Functions
- struct uref * uref_block_alloc(struct uref_mgr *uref_mgr, struct ubuf_mgr *ubuf_mgr, int size)
- int uref_block_append(struct uref *uref, struct ubuf *append)
- int uref_block_cmp_header_size(struct uref *uref1, struct uref *uref2)
- int uref_block_compare(struct uref *uref, int offset, struct uref *uref_small)
- int uref_block_delete(struct uref *uref, int offset, int size)
- void uref_block_delete_end(struct uref *uref)
- int uref_block_delete_header_size(struct uref *uref)
- void uref_block_delete_start(struct uref *uref)
- int uref_block_equal(struct uref *uref1, struct uref *uref2)
- int uref_block_extract(struct uref *uref, int offset, int size, uint8_t *buffer)
- int uref_block_find(struct uref *uref, size_t *offset_p, unsigned int nb_octets, ...)
- int uref_block_find_va(struct uref *uref, size_t *offset_p, unsigned int nb_octets, va_list args)
- int uref_block_get_end(struct uref *uref)
- int uref_block_get_header_size(struct uref *uref, uint64_t *p)
- int uref_block_get_start(struct uref *uref)
- int uref_block_insert(struct uref *uref, int offset, struct ubuf *insert)
- int uref_block_iovec_count(struct uref *uref, int offset, int size)
- int uref_block_iovec_read(struct uref *uref, int offset, int size, struct iovec *iovecs)
- int uref_block_iovec_unmap(struct uref *uref, int offset, int size, struct iovec *iovecs)
- int uref_block_match(struct uref *uref, const uint8_t *filter, const uint8_t *mask, size_t size)
- int uref_block_match_header_size(struct uref *uref, uint64_t min, uint64_t max)
- int uref_block_merge(struct uref *uref, struct ubuf_mgr *ubuf_mgr, int skip, int new_size)
- const uint8_t * uref_block_peek(struct uref *uref, int offset, int size, uint8_t *buffer)
- int uref_block_peek_unmap(struct uref *uref, int offset, uint8_t *buffer, const uint8_t *read_buffer)
- int uref_block_read(struct uref *uref, int offset, int *size_p, const uint8_t **buffer_p)
- int uref_block_resize(struct uref *uref, int skip, int new_size)
- int uref_block_scan(struct uref *uref, size_t *offset_p, uint8_t word)
- void uref_block_set_end(struct uref *uref)
- int uref_block_set_header_size(struct uref *uref, uint64_t v)
- void uref_block_set_start(struct uref *uref)
- int uref_block_size(struct uref *uref, size_t *size_p)
- int uref_block_size_linear(struct uref *uref, int offset, size_t *size_p)
- struct uref * uref_block_splice(struct uref *uref, int offset, int size)
- int uref_block_truncate(struct uref *uref, int offset)
- int uref_block_unmap(struct uref *uref, int offset)
- int uref_block_write(struct uref *uref, int offset, int *size_p, uint8_t **buffer_p)
Description
Members detail
This macro is declared in upipe/uref_block.h source file, line 31.
This function is declared in upipe/uref_block.h source file, line 61.
This function returns a new uref pointing to a new ubuf pointing to a block. This is equivalent to the two operations sequentially, and is a shortcut.
Parameters list:
- uref_mgr: management structure for this uref type
- ubuf_mgr: management structure for this ubuf type
- size: size of the buffer
The return value is pointer to uref or NULL in case of failure
This function is declared in upipe/uref_block.h source file, line 130.
See also ubuf_block_append function.
This function is declared in upipe/uref_block.h source file, line 48.
This function compares the global headers size attribute in two refs.
Parameters list:
- uref1: pointer to the first uref
- uref2: pointer to the second uref
The return value is 0 if both attributes are absent or identical
This function is declared in upipe/uref_block.h source file, line 258.
See also ubuf_block_compare function.
int uref_block_delete(struct uref *uref, int offset, int size)
This function is declared in upipe/uref_block.h source file, line 138.
See also ubuf_block_delete function.
void uref_block_delete_end(struct uref *uref)
This function is declared in upipe/uref_block.h source file, line 47.
This function deletes a end of logical block attribute from a uref.
Parameters list:
- uref: pointer to the uref
int uref_block_delete_header_size(struct uref *uref)
This function is declared in upipe/uref_block.h source file, line 48.
This function deletes the global headers size attribute of a uref.
Parameters list:
- uref: pointer to the uref
The return value is an error code
void uref_block_delete_start(struct uref *uref)
This function is declared in upipe/uref_block.h source file, line 46.
This function deletes a start of logical block attribute from a uref.
Parameters list:
- uref: pointer to the uref
This function is declared in upipe/uref_block.h source file, line 266.
See also ubuf_block_equal function.
int uref_block_extract(struct uref *uref, int offset, int size, uint8_t *buffer)
This function is declared in upipe/uref_block.h source file, line 201.
See also ubuf_block_extract function.
int uref_block_find(struct uref *uref, size_t *offset_p, unsigned int nb_octets, ...)
This function is declared in upipe/uref_block.h source file, line 302.
See also ubuf_block_find function.
int uref_block_find_va(struct uref *uref, size_t *offset_p, unsigned int nb_octets, va_list args)
This function is declared in upipe/uref_block.h source file, line 293.
See also ubuf_block_find_va function.
int uref_block_get_end(struct uref *uref)
This function is declared in upipe/uref_block.h source file, line 47.
This function returns the presence of a end of logical block attribute in a uref.
Parameters list:
- uref: pointer to the uref
The return value is an error code
int uref_block_get_header_size(struct uref *uref, uint64_t *p)
This function is declared in upipe/uref_block.h source file, line 48.
This function returns the global headers size attribute of a uref.
Parameters list:
- uref: pointer to the uref
- p: pointer to the retrieved value (modified during execution)
The return value is an error code
int uref_block_get_start(struct uref *uref)
This function is declared in upipe/uref_block.h source file, line 46.
This function returns the presence of a start of logical block attribute in a uref.
Parameters list:
- uref: pointer to the uref
The return value is an error code
This function is declared in upipe/uref_block.h source file, line 122.
See also ubuf_block_insert function.
int uref_block_iovec_count(struct uref *uref, int offset, int size)
This function is declared in upipe/uref_block.h source file, line 210.
See also ubuf_block_iovec_count function.
int uref_block_iovec_read(struct uref *uref, int offset, int size, struct iovec *iovecs)
This function is declared in upipe/uref_block.h source file, line 219.
See also ubuf_block_iovec_read function.
int uref_block_iovec_unmap(struct uref *uref, int offset, int size, struct iovec *iovecs)
This function is declared in upipe/uref_block.h source file, line 229.
See also ubuf_block_iovec_unmap function.
int uref_block_match(struct uref *uref, const uint8_t *filter, const uint8_t *mask, size_t size)
This function is declared in upipe/uref_block.h source file, line 275.
See also ubuf_block_match function.
int uref_block_match_header_size(struct uref *uref, uint64_t min, uint64_t max)
This function is declared in upipe/uref_block.h source file, line 48.
This function compares the global headers size attribute to given values.
Parameters list:
- uref: pointer to the uref
- min: minimum value
- max: maximum value
The return value is an error code
This function is declared in upipe/uref_block.h source file, line 249.
This function allocates a new ubuf of size new_size, and copies part of the old (possibly segemented) ubuf to the new one, switches the ubufs and frees the old one.
Parameters list:
- uref: pointer to uref structure
- ubuf_mgr: management structure for the new ubuf
- skip: number of octets to skip at the beginning of the buffer (if < 0, extend buffer upwards)
- new_size: size of the buffer space wanted, in octets, or -1 for the end of the block
The return value is an error code
const uint8_t * uref_block_peek(struct uref *uref, int offset, int size, uint8_t *buffer)
This function is declared in upipe/uref_block.h source file, line 182.
See also ubuf_block_peek function.
int uref_block_peek_unmap(struct uref *uref, int offset, uint8_t *buffer, const uint8_t *read_buffer)
This function is declared in upipe/uref_block.h source file, line 192.
See also ubuf_block_peek_unmap function.
int uref_block_read(struct uref *uref, int offset, int *size_p, const uint8_t **buffer_p)
This function is declared in upipe/uref_block.h source file, line 96.
See also ubuf_block_read function.
int uref_block_resize(struct uref *uref, int skip, int new_size)
This function is declared in upipe/uref_block.h source file, line 154.
See also ubuf_block_resize function.
int uref_block_scan(struct uref *uref, size_t *offset_p, uint8_t word)
This function is declared in upipe/uref_block.h source file, line 284.
See also ubuf_block_scan function.
void uref_block_set_end(struct uref *uref)
This function is declared in upipe/uref_block.h source file, line 47.
This function sets a end of logical block attribute in a uref.
Parameters list:
- uref: pointer to the uref
int uref_block_set_header_size(struct uref *uref, uint64_t v)
This function is declared in upipe/uref_block.h source file, line 48.
This function sets the global headers size attribute of a uref.
Parameters list:
- uref: pointer to the uref
- v: value to set
The return value is an error code
void uref_block_set_start(struct uref *uref)
This function is declared in upipe/uref_block.h source file, line 46.
This function sets a start of logical block attribute in a uref.
Parameters list:
- uref: pointer to the uref
int uref_block_size(struct uref *uref, size_t *size_p)
This function is declared in upipe/uref_block.h source file, line 78.
See also ubuf_block_size function.
int uref_block_size_linear(struct uref *uref, int offset, size_t *size_p)
This function is declared in upipe/uref_block.h source file, line 87.
See also ubuf_block_size_linear function.
This function is declared in upipe/uref_block.h source file, line 163.
See also ubuf_block_splice function.
int uref_block_truncate(struct uref *uref, int offset)
This function is declared in upipe/uref_block.h source file, line 146.
See also ubuf_block_truncate function.
int uref_block_unmap(struct uref *uref, int offset)
This function is declared in upipe/uref_block.h source file, line 113.
See also ubuf_block_unmap function.
int uref_block_write(struct uref *uref, int offset, int *size_p, uint8_t **buffer_p)
This function is declared in upipe/uref_block.h source file, line 105.
See also ubuf_block_write function.