Go to the source code of this file.
◆ parserutils_buffer
◆ parserutils_buffer_append()
Append data to a memory buffer
- Parameters
-
| buffer | The buffer to append to |
| data | The data to append |
| len | The length, in bytes, of the data to append |
- Returns
- PARSERUTILS_OK on success, appropriate error otherwise.
◆ parserutils_buffer_appendv()
Append multiple data blocks to a memory buffer.
Each data block must be passed as a pair of const uint8_t* and size_t
- Parameters
-
| buffer | The buffer to append to |
| count | The number of data blocks to append |
| ... | The pairs of pointer and size |
- Returns
- PARSERUTILS_OK on success, appropriate error otherwise.
◆ parserutils_buffer_create()
Create a memory buffer
- Parameters
-
| buffer | Pointer to location to receive memory buffer |
- Returns
- PARSERUTILS_OK on success, PARSERUTILS_BADPARM on bad parameters, PARSERUTILS_NOMEM on memory exhausion
◆ parserutils_buffer_destroy()
Destroy a memory buffer
- Parameters
-
| buffer | The buffer to destroy |
- Returns
- PARSERUTILS_OK on success, appropriate error otherwise
◆ parserutils_buffer_discard()
Discard a section of a memory buffer
- Parameters
-
| buffer | The buffer to discard data from |
| offset | The offset into the buffer of the start of the section |
| len | The number of bytes to discard |
- Returns
- PARSERUTILS_OK on success, appropriate error otherwise.
◆ parserutils_buffer_grow()
Extend the amount of space allocated for a memory buffer
- Parameters
-
| buffer | The buffer to extend |
- Returns
- PARSERUTILS_OK on success, appropriate error otherwise.
◆ parserutils_buffer_insert()
Insert data into a memory buffer
- Parameters
-
| buffer | The buffer to insert into |
| offset | The offset into the buffer to insert at |
| data | The data to insert |
| len | The length, in bytes, of the data to insert |
- Returns
- PARSERUTILS_OK on success, appropriate error otherwise
◆ parserutils_buffer_randomise()