RtndfltInitDriver

RtndfltInitDriver initializes the filter driver and exchanges global information between the filter driver and the Network Link Layer (NL2).

Syntax

Copy
BOOL RtndfltInitDriver(
  [in]    const RTNDFLT_CALLBACKS *pCallbacks,
  [in]    ULONG CallbacksStructSize,
  [in]    RTNDFLT_DRIVER_INFO *pFilterDriverInfo, 
  [in]    ULONG FilterDriverInfoStructSize
);

Parameters

[in] pCallbacks

The address of the structure that contains the function pointers.

[in] CallbackStructSize

The size of the structure pointed to by pCallbacks.

[in] pFilterDriverInfo

The address of the RTNDFLT_DRIVER_INFO structure to be populated by the driver.

[in] FilterDriverInfoStructSize

The size of the structure pointed by parameter pFilterDriverInfo.

Return Value

If the function succeeds, it returns TRUE. If the function fails, it returns FALSE. To get extended error information, call GetLastError.

Common error codes:

Error code Meaning

RTND_ERROR_BAD_REQUEST

An indispensable callback is missing from the supplied structure. The filter driver requires a newer version of the NL2.

Remarks

The NL2 always calls this function from the main thread of the NL2 process.

To ensure backward and forward compatibility, the NL2 always uses sizeof to get the size of the RTNDFLT_CALLBACKS and RTNDFLT_DRIVER_INFO structures at compilation time and zeros out the structure before populating it and calling this function.

Note: The NL2 calls this function for every Rx Queue with an associated filter driver that it starts. If multiple Rx Queues use the same filter driver, the NL2 will call this function multiple times. The filter driver must be prepared for this scenario and should not fail when it occurs.

Characteristics

Real-time requirements

Deterministic behavior

Not required

Shutdown-safe behavior

Not required

Local memory allocation/deallocation restrictions

Process

External MSpace

Internal MSpace

System

Allowed

Allowed

RTSS process

Allowed

Allowed

Windows contiguous memory allocation/deallocation restrictions

Contiguous memory

Allowed

Requirements

Minimum supported version Header

wRTOS 1.0 SDK

Rtnd.h

See Also: