Typedef PntosCommonPlugin

Typedef Documentation

typedef struct PntosCommonPlugin PntosCommonPlugin

Common definitions that all plugins must provide. This structure should not be used directly (except in the case of a utility plugin), but instead is composed as the first field on all of the concrete pntOS plugin structures. For example, the transport plugin is specified as:

struct PntosTransportPlugin {
    PntosCommonPlugin common;
    ...
} PntosTransportPlugin;
Thus this structure defines a set of fields that all plugins have. The PntosCommonPlugin.init_plugin function is guaranteed to be called by pntOS when the plugin is first loaded into memory by the system.

When defining a new e.g. transport plugin, the plugin writer is responsible for implementing all fields on the PntosTransportPlugin structure. Thus, the fields of the PntosCommonPlugin nested on the PntosTransportPlugin are implemented by the plugin writer.