Go to main content

man pages section 3: Extended Library Functions, Volume 2

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

IMA_PluginIOCtl (3IMA)

Name

IMA_PluginIOCtl - Sends a vendor specific command to a specified plugin

Synopsis

cc [ flag... ] file... -lima [ library... ]
#include <ima.h>

IMA_STATUS IMA_PluginIOCtl(
    /* in */      IMA_OID pluginOid,
    /* in */      IMA_UINT command,
    /* in */     const void *pInputBuffer,
    /* in */      IMA_UINT inputBufferLength,
    /* out */     void *pOutputBuffer,
    /* in, out */ IMA_UINT *pOutputBufferLength,
);

Parameters

pluginOid

The object ID of the plugin to which the command is set.

command

The command to be sent to the plugin.

pInputBuffer

A pointer to a buffer allocated by the caller. The buffer contains the input parameters that the specified command needs. A value of NULL for this parameter indicates that there are no input parameters provided by the caller. In this case, the value of the inputBufferLength argument is also 0.

inputBufferLength

The length, in bytes, of the input buffer. The plugin does not attempt to read more data than is specified by the caller.

pOutputBuffer

A pointer to a buffer allocated by the caller that contains any output of the specified command. A value of NULL for this parameter indicates that the caller expects to receive no output data from the plugin. In this case, the value of the pOutputBufferLength argument is also NULL.

pOutputBufferLength

A pointer to a value that, on entry, contains the length, in bytes, of the output buffer. If returned successfully, this value is the number of bytes returned in the pOutputBuffer argument. If this value is NULL, then both the pInputBuffer argument and the pOutputBuffer argument are NULL, and the inputBufferLength argument is 0.

Description

The IMA_PluginIOCtl() API sends a vendor specific command to a specified plugin.

Return Values

IMA_ERROR_NOT_SUPPORTED

Returned if the plugin does not support this API call

IMA_ERROR_INVALID_PARAMETER
  • Returned if the pInputBuffer argument is NULL, and the inputBufferLength argument is not 0

  • Returned if the pOutputBuffer argument is NULL, and the pInputBufferLength argument points to a value that is not 0

  • Returned if the pOutputBuffer argument is not NULL, and the pOutputBufferLength argument is NULL, or points to a value that is 0

  • Returned if the plugin does not support the specified command or if the input or output buffers, or the lengths of these buffers are not correct for the given command

IMA_ERROR_INVALID_OBJECT_TYPE

Returned if the pluginOid argument does not specify a valid object type

IMA_ERROR_INCORRECT_OBJECT_TYPE

Returned if the pluginOid argument does not specify a plugin object

IMA_ERROR_OBJECT_NOT_FOUND

Returned if the pluginOid argument does not specify a plugin known to the system

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
system/library/storage/snia-ima
Interface Stability
Volatile
MT-Level
Safe

See Also

libima(3LIB), attributes(7), IMA_GetPluginOidList(3IMA), IMA_GetPluginProperties(3IMA)