op_ici_is_format()
Abstract
Tests the name of an ICI format.
Syntax
op_ici_is_format (iciptr, name)
| Argument | Type | Description |
|---|---|---|
iciptr |
Ici * |
pointer to the ICI-of-interest [A pointer to an ICI can be obtained from two KPs: op_ici_create() returns a pointer to a newly allocated ICI (in an ICI-sending process), and op_intrpt_ici() returns a pointer to an ICI associated with an incoming interrupt (in an ICI-receiving process).] |
name |
const char * |
name of an ICI format |
Return Type
VosT_Boolean
VOSC_TRUE if the ICI has the named format; VOSC_FALSE if the ICI has a different format or an error occurred.
Example
/* Get the ICI associated with the new arrival. */
iciptr = op_intrpt_ici ();
/* Extract the addressing information from the ICI and insert it into the */
/* network packet. */
op_ici_attr_get (iciptr, "primitive", &primitive);
/* Test the ICI format name and interpret its contents accordingly. */
if (op_ici_is_format (iciptr, "X25_connect"))
{
/* ... */
}
else
{
/* ... */
}
Details
None.
Purpose
Provides a fast way to test the name of an ICI format.
Errors
- Recoverable Error: ICI pointer is NIL.
- Recoverable Error: Operation attempted on invalid ICI; ICI may already have been destroyed.
Reference
- Use the KP op_ici_format() to get the name of an ICI’s format for manual testing