Table of Contents

Name

ULLA (Unified Link Layer API) - access link layer information

Synopsis

#include <ulla/lu.h>

ullaResultCode_t ullaRequestCommand(const ullaString_t uqlQuery, ullaResultId_t *urId, const ullaTime_t timeout);

Description

ullaRequestCommand issues a command to an LLA (Link Layer Adapter), or device driver supporting ULLA, in a synchronous manner. The set of commands available are part of the classes the LLA has registered. The query is specified using the UQL (ULLA Query Language), which full lexical and grammatical specification is described in uql(2) . The user of this function is responsible to free the ullaResult(2) .

Parameters

The following parameters have to be carefully considered:

urId 
A handle for the ullaResult returned.
uqlQuery 
For the ullaRequestCommand method only the following statement is valid:
select_statement this statement is used to execute the commands in the select_clause of the statement.
timeout 
The timeout value is forwarded to the Link Layer Adapter (LLA), or device driver supporting ULLA. The command is to be aborted when this period has elapsed. If zero is specified there is no timeout functionality activated.

Return Vallue

On success, the function call returns a handle for the ULLA result at pre-allocated urId. The return value is ULLA_OK.

On error, the return value is negative.

The list of error codes is

ULLA_OK
everything is fine.

ULLA_NO_MEMORY
ran out of user space or kernel space RAM memory.

ULLA_INSUFICIENT_MEMORY
ran out of user space RAM memory.

ULLA_ERROR_IN_VALUE
a parameter is syntactically or semantically incorrect.

ULLA_ERROR_FAULT
general error.

ULLA_SEGMENTATION_FAULT
ULLA Core implementation error.

ULLA_CORE_NOT_PRESENT
the ULLA Core kernel module cannot be loaded.

ULLA_BUG
ULLA Core implementation bug.

Examples

Some examples for valid UQL-statements are given below:

How-to connect a Link?

In order for connecting a Link the LinkProvider might have to be enabled before. Technology specific commands might be to be considered for that. For connecting a Link the following command can be used:
"SELECT connect FROM ullaLink WHERE linkId = 2;"

See Also

ullaReflection(1) , ullaAttribute(1) , ullaCommand(1) , ullaSample(1) , ullaNotification(1) , ullaTools(1)

ulla(2) , uql(2) , ullaResult(2) , ullaTuple(2) , ullaRequestReflection(2) , ullaRequestAttribute(2) , ullaRequestCommand(2) , ullaRequestNotification(2) , ullaRequestSample(2) , ullaRequestLock(2) , ullaGetCoreDescriptor(2)

Conforming to

RWTH contribution to the GOLLUM project (http://www.ist-gollum.org). Compliant with ULLA C-API Version 1.0 (http://ulla.sourceforge.net).

Author

This man page was written by Marten Bandholz (mba@mobnets.rwth-aachen.de).


Table of Contents