A block plugin is used to save or read a specific, user defined block to a NTAR trace file.
The philosophy behind these plugins makes use of a set of callbacks that should be exposed. The pointers to such callbacks are then registered to the core NTAR engine. Every plugin manages data written or read to/from a trace file in form of buffers of bytes of known size. The plugins are not required (and must not) access the underlying trace file descriptor directly.
Every plugin is formed by at least three files (where xxx is the identifier of the plugin):
plugin_xxx.c | It contains the actual code to read and write a block. |
plugin_xxx.h | It contains the public structures exposed to NTAR users. This include file is automatically available when ntar.h is included in a user application. |
plugin_xxx_int.h | It contains all the internal definitions used by the plugin (e.g. the prototypes of the functions defined by the plugin). |
Every plugin should export the following callbacks (again xxx stands for the identifier of the plugin):
Block plugins callbacks
NTAR documentation. Copyright (c) 2004 - 2005 Condor Engineering, Inc. All rights reserved.