NL2NICDriverSample

NL2NICDriverSample provides a basic example of a NIC Driver for the Network Link Layer (NL2). This sample doesn't control a hardware device but simulates some NICs with basic functionality. The driver simulates immediate consumption of every buffer submitted for transmit and simulates immediate filling, with dummy content, of every buffer submitted for receive.

NL2NICDriverSample provides these capabilities:

You can find the sample files at Public Documents\IntervalZero\MaxRT\wRTOS SDK\1.0.

Source Files

File Description
NL2NICDriverSample.c Driver source code.

NL2NICDriverSampleSpecialFunctions.h

A header file containing sample special functions of a device.

Building the Sample

This sample application requires Visual Studio 2022.

  1. Open NL2NICDriverSample.sln in Visual Studio 2022.
  2. Set the configuration to RTSSRelease.
  3. Build the solution.

You should end up with an RTDLL file called NL2NICDriverSample.rtdll.

Running the Sample

  1. Create an NL2 Interface in wRTOS Settings.
  2. Set DriverPathname to NL2NICDriverSample.rtdll (make sure that the file’s location is in the wRTOS search path; see wRTOS Settings for more information).
  3. Set PciLocation to one of the four locations that the driver simulates (see the code in NL2NICDriverSample.c).
  4. Start the NL2 through wRTOS Settings or wRTOS Control Panel.

By default, NL2NICDriverSample prints traces on the console output whenever one of its entry point functions is called by the NL2. You can modify it to behave differently and observe its behavior when you start the NL2 and run an application that links with the NL2.

Remarks

You can use NL2NICDriverSample for the following purposes:

APIs Referenced

RTAPI functions

Supported Windows functions