Data Structures | |
struct | _ntar_data_chunk |
Element of a list representing a generic blob (block of bytes) that have to be written to a trace file, or have been read out of it. More... | |
struct | _ntar_plugin_data |
This structure is used to uniquely identify a given plugin. It contains the unique identifier of a block, as well as all the pointers to the plugin callbacks. More... | |
Typedefs | |
typedef _ntar_data_chunk | ntar_data_chunk |
Element of a list representing a generic blob (block of bytes) that have to be written to a trace file, or have been read out of it. | |
typedef int(* | plugin_init )(void **plugin_state) |
Initializes a given plugin state. | |
typedef int(* | plugin_destroy )(void *plugin_state) |
Destroys a given plugin state. | |
typedef int(* | plugin_write_data )(void *plugin_state, void *data, void *data_buffer, size_t *pbuffer_size) |
Formats the data of a block in order to be written to some storage. | |
typedef int(* | plugin_write_option )(void *plugin_state, ntar_option *option, void *opt_buffer, size_t *pbuffer_size) |
Formats the option data of a block option in order to be written to some storage. | |
typedef int(* | plugin_validate_option )(void *plugin_state, ntar_option *option) |
Verifies that a given option is compatible with a given block. | |
typedef int(* | plugin_read_data )(void *plugin_state, int byte_order, void *raw_data, size_t raw_data_size, void **data_buffer, size_t *pbuffer_size, size_t *poption_start) |
This function should decode the data of a block to a library provided memory buffer. | |
typedef int(* | plugin_read_option )(void *plugin_state, option_header *opt_header, int byte_order, void *opt_buffer, size_t *pbuffer_size) |
This function should decode the option data of a block to a library provided memory buffer. | |
typedef _ntar_plugin_data | ntar_plugin_data |
This structure is used to uniquely identify a given plugin. It contains the unique identifier of a block, as well as all the pointers to the plugin callbacks. | |
Functions | |
ntar_plugin_data * | get_plugin_data (u_int32 block_id) |
This function returns a pointer to a ntar_plugin_data structure uniquely identifying the callbacks of a given block. | |
Variables | |
ntar_plugin_data | ntar_plugins [] |
|
Element of a list representing a generic blob (block of bytes) that have to be written to a trace file, or have been read out of it. A NULL terminated list of such blocks is dumped to disk without any further modification, and no checks are performed on the contents of the internal buffer. |
|
This structure is used to uniquely identify a given plugin. It contains the unique identifier of a block, as well as all the pointers to the plugin callbacks.
|
|
Destroys a given plugin state. This callback is called when a block is closed.
|
|
Initializes a given plugin state. This callback is called whenever the data of a block whose type matches with the given plugin is retrieved (i.e. through ntar_get_block_data or ntar_get_block_options) The plugin can initialize its internal structures and return a handle to such data in the parameter plugin_state
|
|
This function should decode the data of a block to a library provided memory buffer.
|
|
This function should decode the option data of a block to a library provided memory buffer.
|
|
Verifies that a given option is compatible with a given block. This plugin callback is called by the library when the user tries to add an option to a block using ntar_add_block_option. It should return success only if the option is actually supported by the block *and* the data associated with the option have a proper format.
|
|
Formats the data of a block in order to be written to some storage. This plugin callback is called by the library when a block should be written to some storage. This callback should format the buffer provided by the user through ntar_create_block in the correct format that should be written to some storage.. In particular, this function should write the data of a block to a library provided memory buffer.
|
|
Formats the option data of a block option in order to be written to some storage. This plugin callback is called by the library when a block option should be written to some storage. This callback should format the buffer provided by the user through ntar_add_block_option in the correct format that should be written to some storage.. In particular, this function should write the data of a block option to a library provided memory buffer.
|
|
This function returns a pointer to a ntar_plugin_data structure uniquely identifying the callbacks of a given block.
|
|
|
NTAR documentation. Copyright (c) 2004 - 2005 Condor Engineering, Inc. All rights reserved.