libkdumpfile-0.5.1
Kernel coredump file access
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Fields
_addrxlat_buffer Struct Reference

Read buffer metadata. More...

#include <addrxlat.h>

Data Fields

addrxlat_fulladdr_t addr
 Buffer start address. More...
 
const void * ptr
 Pointer to raw binary data. More...
 
size_t size
 Buffer size. More...
 
addrxlat_byte_order_t byte_order
 Page data byte order. More...
 
addrxlat_put_page_fnput_page
 Callback to release a page buffer. More...
 
void * priv
 Private data to be used by the callback. More...
 

Detailed Description

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:

Field Documentation

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.

addrxlat_byte_order_t _addrxlat_buffer::byte_order

Page data byte order.

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.

const void* _addrxlat_buffer::ptr

Pointer to raw binary data.

addrxlat_put_page_fn* _addrxlat_buffer::put_page

Callback to release a page buffer.

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.


The documentation for this struct was generated from the following file: