I am writing customized process model to work with OPNET application model. My process model uses OPNET connection APIs. But when I run the simulation, I found the traffic doesn't go through, and I get all these TCP error messages in the DES log saying SYN received for invalid connection plus a phase error message saying Unable to continue execution of phase <foo> due to closing of connection <bar>. Also, the TCP Connection stats shows that there are weird port numbers like 0 and 885763223, plus Unknown connection sources.

Categories:
Solution Number:
S20820
Last Modified:
2013-08-20
Issue

I am writing customized process model to work with OPNET application model. My process model uses OPNET connection APIs. But when I run the simulation, I found the traffic doesn't go through, and I get all these TCP error messages in the DES log saying SYN received for invalid connection plus a phase error message saying Unable to continue execution of phase <foo> due to closing of connection <bar>. Also, the TCP Connection stats shows that there are weird port numbers like 0 and 885763223, plus Unknown connection sources.

Solution

This could happen when the transport port number is not properly set (or initalized) for the connection. Since 11.5, OPNET supports port assignment for the passive connection. User can explicitly set the preferred connection port by modifying the attribute at Task Object->Task Specification->Transport Connection->Connections->Transport Port. But this also means if you want to create a passive connection via a non-GUI way, you must initalize the transport port in your code. If you skip the initalization, the transport port will be uninitalized (which in C language means it could be anything), and the simulation results will be abnormal. Set the transport port for the connection is easy. Typical code looks like the following:/************************************//* Allocate the memory for the passive connection parmaters */GnaT_Passive_Conn_Params* passive_conn_params = (GnaT_Passive_Conn_Params*) op_prg_mem_alloc (sizeof (GnaT_Passive_Conn_Params));/* Initalize the port to -1, which means system will select the next available port */passive_conn_params->transport_port = -1;/* Initalization for other connection parameters */.../************************************/You can find the definition of GnaT_Passive_Conn_Params from header file gna_sup_conn_api.h at $std/include directory.

Environment

DES Kernel->Error Messages/Logs,DES Kernel->Process Modeling/Coding,Protocols->TCP,Protocols->UDP

Attachments
NOTICE: Riverbed® product names have changed. Please refer to the Product List for a complete list of product names.
Can't find an answer? Create a case