Rtnl2OpenInterface

Rtnl2OpenInterface opens the interface object specified by its name.

Syntax

Copy
BOOL Rtnl2OpenInterface(
  [in]    CHAR *Name
);

Parameters

[in] Name

The name of the interface.

Return Value

If the function succeeds, it returns TRUE. If the function fails, it returns FALSE. Call GetLastError to obtain an error code.

Possible error codes:

Error code Meaning

ERROR_NOT_READY

The calling process has not called Rtnl2Init.

ERROR_INVALID_PARAMETER

Name doesn't correspond to any started interfaces.

ERROR_RESOURCE_NOT_AVAILABLE

The calling process has already opened too many interface handles.

RTNL2_ERROR_SERIALIZED_COMMAND_TIMEOUT

The NL2 process didn’t reply within an acceptable delay.

RTNL2_ERROR_NO_MORE_COMMUNICATION

Unable to communicate with the NL2 process. This might be because the NL2 process is not running anymore, or because an application process thread was terminated during a previous call to an NL2 API function.

Remarks

It is allowed to open the same interface multiple times from the same application process. Each handle must be closed independently by calling Rtnl2CloseInterface.

All interface names can be retrieved using the Rtnl2EnumInterface function.

Characteristics

Real-time

Deterministic

No

Local memory usage

Process

External MSpace usage

Internal MSpace usage

System

No

No

NL2 process

No

No

Calling process

No

No

Contiguous memory usage

Usage

No

Requirements

Minimum supported version Header Library

eRTOS 1.0 SDK

Rtnl2Api.h

Rtnl2Api.lib

See Also: