Development Tools User’s Manual
89
IXP2400/IXP2800 Network Processors
Developer Workbench
1. To add a new Network Traffic Simulator Plug-in click
the
New
... button and the
Manage NTS Plug-in
pop
up appears. Specify the name and click
OK
. The
name then appears in the
Select Network Traffic
DLL
pulldown box.
2. To specify the
Run Time DLL
, enter the path. or
click the
button to Browse for the filename.
The Network Traffic Simulator has now been plugged into the Workbench project and is available
for selection on the Traffic Assignment page.
2.11.5.1
Network Traffic Simulation DLLs
To simulate supplying data to a port or taking data from the port, you can provide a dynamic-link
library (DLL) called a Network Traffic Simulator Run-time DLL. You assign this DLL to the input
and/or output side of a media bus device port (see
A network traffic simulation (NTS) Run-time DLL must provide the following functions:
Initialize
Close
Reset
If the DLL is assigned to supply data to a port, then it must also have the following functions:
InitializeRxPort
GetNextByte
GetInterpacketTime
GetReturnStatus
CloseRxPort
If the DLL is assigned to take data from a port, then it must also have the following functions:
InitializeTxPort
SendNextByte
CloseTxPort
If the DLL supports a port configuration string, then it must also have the following functions:
ConfigureRxPort
ConfigureTxPort
When you
Start Debugging
, if an NTS DLL is assigned to a port and the NTS DLL is not already
loaded due to a previous assignment to another port, the PacketSim DLL loads the NTS DLL and
calls its
Initialize()
function. This is the only time that this function is called. In the
Initialize()
function the NTS DLL can register console functions with the Transactor. You can
then call these functions from a script in order to configure your traffic simulation.
When the device model is connected to a chip model when debug is started, the NTS DLL is called
to initialize each port. The PacketSim DLL iterates through all the ports on every media bus device.
If the NTS DLL is connected to the receive side of the port, the function
InitializeRxPort()
is
called. If the NTS DLL is connected to the transmit side of the port, the function
InitializeTxPort()
is called. The
ConfigureRxPort
and
ConfigureTxPort
functions
are called, if provided, to send the port configuration string into the NTS DLL.