libkdumpfile-0.5.4
Kernel coredump file access
|
Read buffer metadata. More...
#include <addrxlat.h>
Data Fields | |
addrxlat_fulladdr_t | addr |
Buffer start address. | |
const void * | ptr |
Pointer to raw binary data. | |
size_t | size |
Buffer size. | |
addrxlat_byte_order_t | byte_order |
Page data byte order. | |
addrxlat_put_page_fn * | put_page |
Callback to release a page buffer. | |
void * | priv |
Private data to be used by the callback. | |
Read buffer metadata.
This structure is used to pass data between the library and a callback function. The idea is that the library should not have to care about the limitations of any given implementation. It communicates the intention to get data at a given address, the get-page callback translates that to a full page and returns as much as possible, adjusting remaining fields accordingly.
NOTE: The callback may theoretically provide as little as one byte at the desired address. However, it does not happen in practice, because:
addrxlat_fulladdr_t _addrxlat_buffer::addr |
Buffer start address.
This field is set to the desired read address before calling the get-page callback. The callback should adjust it to the start address of the page that contains the desired address.
void* _addrxlat_buffer::priv |
Private data to be used by the callback.
The library will preserve this value between a call to the get-page and put-page callbacks.
size_t _addrxlat_buffer::size |
Buffer size.
This field must be initialized by the get-page callback to the length of the buffer at ptr
.