NalDataStream Sample

You can find these sample files at Public Documents\IntervalZero\RTX64 SDK\4.5.

Description

This sample program uses the NAL API to:

It also allows you to display information about all system device queues. This sample uses a default Ethernet type 0x1234 and a default packet size of 1514 bytes (not counting Ethernet FCS). You can run RtssRun NalDataStream.rtss Interface1 /s /c xx:xx:xx:xx:xx:xx.

Alternatively, you can run two instances of NalDataStream.rtss simultaneously:

RtssRun NalDataStream.rtss Interface1 /s

RtssRun NalDataStream.rtss Interface1 /c xx:xx:xx:xx:xx:xx

Source Files

File Description
NalDataStream.h Header file.
NalDataStream.c Source file.
NalDataStream.rc Resource file.
NalDataStream_VS<Visual Studio Version>.vcxproj Project file for supported versions of Visual Studio.
NalDataStream_VS<Visual Studio Version>.vcxproj.filters Project filters file for supported versions of Visual Studio.
NalDataStream_VS<Visual Studio Version>.sln Solution file for supported versions of Visual Studio.
resource.h Resource header file.
readme.txt Text file containing a description of the sample and a list of provided files.

Building the Sample

This sample application requires a supported version of Visual Studio.

  1. Open the appropriate solution file for your version of Visual Studio.
  2. Set the configuration to RTSSRelease.
  3. Build the sample.

You should end up with an RTSS process called NalDataStream.rtss.

Running the Sample

Follow these steps to run the sample using the RtNalIGB driver and send to a peer (destination) MAC address xx:xx:xx:xx:xx:xx at the default burst rate:

  1. Convert your RtNalIGB supported device to RTX64.
  2. Open the RTX64 Control Panel and do the following:
  3. On the Manage interfaces page, add a new interface.
  4. On the Configure and control the network page, clear selection of these check-boxes:
  5. Start with Subsystem
  6. Start with NAL
  7. Select the Run in verbose mode check box.
  8. Start or restart the NAL.
  9. Run the sample with the flag to send packets

RtssRun NalDataStream.rtss Interface1 /c xx:xx:xx:xx:xx:xx

 

You should see the following once the sample begins:

NalDataStream: Interface1 Link is UP

NalDataStream: Interface1 Transmitted 100000 packets

NalDataStream: Interface1 Transmitted 200000 packets

NalDataStream: Interface1 Transmitted 300000 packets

  1. To stop the sample use Rtsskill

This sample uses the following flags:

/a

displays all queues configured by the NAL on the System

/s

receive data

If the application receives data you should see output:

NalDataStream: Interface1 Received 100000, Length: 1514

/c <MAC_Address>

continuously send to the provided MAC address using the default data rate. This is the destination to which the packets are sent.

/burst <burst count>

modify the number of packets contained in a burst. The default value is 25. For 100MB connections the suggested value is 10.

/i <interval>

modify the interval between burst in MS. The default is 1MS. For 100MB connections the suggested value is 2MS.

/q <queue number>

Sets the queue number. When not specified the default receive queue is used for receive, and queue with the same number for transmit.

/send <count>

sets the number of frames to send before terminating the sample. The default is set to send forever.

/txlen <bytes>

sets the size of transmitted packet in bytes (not counting FCS). Default is 1514.

/rxlen <bytes>

sets the size of the receive buffer in bytes. Default is 1514.

/type <Ethernet type>

sets the Ethernet type in transmit frames to match receive frames. This is a hexadecimal value without leading 0x. Default is 1234.

Examples

In the following examples, the Interface1 device name is used and the peer (destination) MAC address is xx:xx:xx:xx:xx:xx.

RtssRun NalDataStream.rtss /a

RtssRun NalDataStream.rtss Interface1 /s

RtssRun NalDataStream.rtss Interface1 /c xx:xx:xx:xx:xx:xx

RtssRun NalDataStream.rtss Interface1 /s /c xx:xx:xx:xx:xx:xx /burst 10 /i 2

RtssRun NalDataStream.rtss Interface1 /s /c xx:xx:xx:xx:xx:xx /burst 10 /i 2 /send 500000

Remarks

This sample prints an incorrect number of missing received packets if the packets are transmitted from multiple sources.

This sample is not supported for the RtVirtualNic driver.

APIs Referenced

RTNal