Real-Time Network Functions

This section contains documentation on the Real-time Network (RTN) function set. This set consists of RTN functions that can be used by the RTX64 Network Abstraction Layer (NAL) and/or TCP/IP Stack.

NOTE: Real-time network functions are not deterministic.

topics in this section:

 


RTN NAL Functions

RTN NAL functions are provided by the Network Abstraction Layer (NAL) for use by RTDLL NIC drivers. These RTN functions are exported by RTX64Nal and may be used by doing the following:

NOTE: Real-Time Network functions can only be called by RTSS applications and RTDLLs. They cannot be called from a Windows executable (.exe).

For detailed information about a function, click its link in the table below.

Real-Time Network Function Description

RtnDecodePacket

Accesses various fields in the NAL-defined packet structure.

RtnDeleteCriticalLock

Frees any associated memory from a CriticalLock.

RtnEnterCriticalLock

Waits on the associated CriticalLock until no other thread is inside a RtnEnterCritcalLock RtnLeaveCriticalLock pairing.

RtnEnumPciCards

Calls the fnCheckPciCard function for every PCI card found within the system (or until fnCheckPciCard returns TRUE), and is used to locate a PCI NIC.

RtnGetDataLong

Retrieves the value placed at offset index of a network device.

RtnGetDeviceName

Returns a pointer to the ASCII character name associated with this driver instance.

RtnGetPacket

Returns a pointer to a NAL-defined packet structure.

RtnIndicateStatus

Reports the status for an instance of the driver for the RTX64-converted NIC card.

RtnInitializeCriticalLock

Initializes a CriticalLock data structure.

RtnLeaveCriticalLock

Exits a CriticalLock section.

RtnNotifyRecvQueue

Used to notify the receiving application that data has been received.

RtnNotifyTransmitQueue Used to notify the sending application that data have been transmitted.

RtnSetDataLong

Sets the value at offset index of a network device.

RtnSetLinkAddress

Sets the hardware address (in the NAL) for an instance of the driver.

RtnTransmitCompleteCallback Must be called for a NAL frame transmitted by RtndTransmitEx.

RTN TCP/IP Stack Functions

RTN TCP/IP Stack functions are provided by the TCP/IP Protocol Stack and are available for use by an RTDLL TCP/IP filter or an RTSS application. The RTN functions are exported by the Stack and may be used by doing the following:

NOTE: These functions require the TCP/IP Stack to be running. When an application process calls one of these functions, we recommend using RtnIsStackOnline to ensure that the Stack is running.

For detailed information about a function, click its link in the table below.

Real-Time Network Function Description

RtnAddMultiRoute

First validates if it has received a proper multicast IPv4 address. Then it adds multicast IPv4 address to the routing table on the selected device. After allocating a new entry in the IGMP table, it then sends the IGMP report of the new entry.

RtnAttachProcessExitHandler Registers an application's networking exit handler to allow an RTSS application to perform custom socket code cleanup when an application terminates.

RtnDeleteCriticalLock

Frees any associated memory item for a CriticalLock.

RtnDeleteMultiRoute

First validates if it has received a proper multicast IPv4 address. It then deletes the multicast IPv4 address from the routing table on the selected device.

RtnDisplayNbrCacheTable

Displays the neighbor cache entry, the neighboring node's IPv6 address, the corresponding link-layer address, and the state of the neighbor cache entry for the network device identifier.

RtnDisplayRoutingTable

Displays all static IPv4 and IPv6 routes from RT-TCP/IP stack’s forwarding database.

RtnEnterCriticalLock

Waits on the associated CriticalLock until no other thread is inside a RtnEnterCritcalLock RtnLeaveCriticalLock pairing.

RtnFrameAllocate Used by a filter driver or an application to allocate a block of memory to store an Ethernet frame.
RtnFrameFree Frees memory allocated by RtnFrameAllocate.
RtnFrameTransmit Used by a filter driver or an application to transmit an Ethernet frame for the device who’s source MAC address is in the frame.
RtnFrameTransmitInterface Used by a filter driver or an application to transmit an Ethernet frame for a device.

RtnGetDataLong

Retrieves the value placed at offset index of a network device.

RtnGetDeviceFromIpAddress

Converts a binary IP address in network byte order into the network device pointer for the particular device.

RtnGetDeviceName

Returns a pointer to the ASCII character name associated with this driver instance.

RtnGetDevicePtr

Gets the network device pointer associated with ASCII network device name.

RtnGetIpAddress

Returns the IP address associated with this device instance.

RtnGetMcastCount

Gets the number of multicast addresses added by the Stack for an interface.

RtnGetMsPerTick

Returns the tick interval, in milliseconds per tick, that the stack timer is configured to use.

RtnInitializeCriticalLock

Initializes a CriticalLock data structure.

RtnInstallStaticRoute

Installs a static IPv4 or IPv6 route in RT-TCP/IP stack’s forwarding database.

RtnIsDeviceOnline Used to get the online status of a network device for link status monitoring.
RtnIsStackOnline Used to get the online status of the RT-TCP/IP stack for link status monitoring.

RtnIOCTLDriver

Called when a filter or an application requires that the driver configure certain NIC modes or characteristics.  

RtnLeaveCriticalLock

Exits a CriticalLock section.

RtnQueryStackHeapUsage Retrieves the heap usage information for the RT-TCP/IP stack.
RtnReleaseProcessExitHandler

Removes an application's networking exit handler registered by the function RtnAttachProcessExitHandler.

RtnRemoveStaticRoute

Removes a static IPv4 or IPv6 route from RT-TCP/IP stack’s forwarding database.

RtnRequest

Forwards a request to the underlying driver to query the requested capabilities and/or statistics of the RTX64 converted NIC card.

RtnSetDataLong

Sets the value at offset index of a network device.

RtnSetDefaultGateway Sets the gateway address (in the stack) for an instance of the driver.