How to receive a message through TCPBasicClientApp in omnet++?

1,961 views
Skip to first unread message

Usama Aftab

unread,
Sep 7, 2015, 1:27:31 AM9/7/15
to OMNeT++ Users

I have made two different TCP Applications in Omnet++, one is TCPBasicClientApp and other is TCPGenericServerApp. TCP client application is successfully sending a GenericAppMsg through TCP Protocol. Once the message is received on the Server Side (with a specific replyLength) it is sending it back to the client side through SendBack() method (also mentioned in the inet example application).

My question is, how to receive this message back on the client side?

Here is the omnet.ini file code, for this transfer,

The Client Side,

**.host[0].numTcpApps = 1
**.host[0].tcpApp[0].typename = "ReputationAlgorithmApplication"
**.host[0].tcpApp[0].localAddress = ""
**.host[0].tcpApp[0].localPort = -1
**.host[0].tcpApp[0].connectAddress = "host[3]"
**.host[0].tcpApp[0].connectPort = 2000
**.host[0].tcpApp[0].dataTransferMode = "object"

The Server Side,

**.host[3].numTcpApps = 1
**.host[3].tcpApp[*].typename = "ReputationServerApplication"
**.host[3].tcpApp[*].localAddress = "host[3]"
**.host[3].tcpApp[*].localPort = 2000

Here is the sendBack method on Server Side,

void ReputationServerApplication::sendBack(cMessage *msg) {
    cPacket *packet = dynamic_cast<cPacket *>(msg);

    if (packet) {
        msgsSent++;
        bytesSent += packet->getByteLength();
        emit(sentPkSignal, packet);

        EV_INFO << "sending \"" << packet->getName() << "\" to TCP, "
                       << packet->getByteLength() << " bytes\n";
    } else {
        EV_INFO << "sending \"" << msg->getName() << "\" to TCP\n";
    }
    DummyMessageForReputation *msgDum =
            dynamic_cast<DummyMessageForReputation *>(msg);
    std::cout << "\n Tested: Message with the string "
            << msgDum->getMessageString() << " is sending back to "
            << msgDum->getNodeName();

    send(msgDum, "tcpOut");
}

Any help would be appreciated.

Usama Aftab

unread,
Sep 7, 2015, 3:33:03 AM9/7/15
to OMNeT++ Users
It is an urgent query! Can anyone even hint the correct direction?

Do reply please.

Ester Lopez

unread,
Sep 8, 2015, 5:56:16 AM9/8/15
to OMNeT++ Users
I think you have to set the controlInfo on the message that you are sending back. Mainly you have to get the address from the received message:


IPv4ControlInfo *ctrl = dynamic_cast<IPv4ControlInfo *>(msg->getControlInfo());
IPv4Address ip = ctrl->getSrcAddr();

And then, assign it to your new message:

    // Create IPv4 Packet & send
    IPv4ControlInfo *controlInfo = new IPv4ControlInfo();
    controlInfo->setDestAddr(ip);
    controlInfo->setProtocol(protocol);
    newMsg->setControlInfo(controlInfo);

Hope this helps,
Ester

--
You received this message because you are subscribed to the Google Groups "OMNeT++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.
Visit this group at http://groups.google.com/group/omnetpp.
For more options, visit https://groups.google.com/d/optout.

Usama Aftab

unread,
Sep 8, 2015, 12:24:49 PM9/8/15
to OMNeT++ Users
Hey Ester,

Thanks for your reply, I am mostly working on the port and the node ID (transport layer) and not on the network layer, can you tell me how to do this thing with transport layer?

Your reply is of big help.

Usama

Ester Lopez

unread,
Sep 9, 2015, 6:49:44 AM9/9/15
to OMNeT++ Users
Do you mean that you dont have the IP control info?

In such case, check the code from INET TCPGenericSrvApp which does pretty much what you want to do.

Alfonso Ariza Quintana

unread,
Sep 9, 2015, 7:35:32 AM9/9/15
to omn...@googlegroups.com

IPv4ControlInfo it is used between IP and TCP/UDP.

 

The TCP applications use “callbacks”, the callback that process the received data in the client is  socketDataArrived()

 

In the particular case of TCPBasicClientApp is the method

 

void TCPBasicClientApp::socketDataArrived(int connId, void *ptr, cPacket *msg, bool urgent)

Usama Aftab

unread,
Sep 9, 2015, 5:14:13 PM9/9/15
to OMNeT++ Users, aari...@hotmail.com
Thank you Alfonso, it is exactly what i was looking for. All the data is arriving through socketDataArrived method, so there is no need of finding the control info. 

But thanks to the rest of guys as well, i didn't know how to take the control information through IPv4ControlInfo. :)

Cheers.
Message has been deleted

Alfonso Ariza Quintana

unread,
Sep 17, 2015, 10:53:52 AM9/17/15
to omn...@googlegroups.com

Packet delay due to the buffer is, usually, in the models of inet, due to the buffers in the link layer.

You should change the buffers in the link layer.

 

 

De: omn...@googlegroups.com [mailto:omn...@googlegroups.com] En nombre de sarfara...@iqra.edu.pk
Enviado el: jueves, 17 de septiembre de 2015 16:46
Para: OMNeT++ Users <omn...@googlegroups.com>
CC: aari...@hotmail.com
Asunto: Re: [Omnetpp-l] Re: How to receive a message through TCPBasicClientApp in omnet++?

 

Hi Alfonso Ariza Quintana ,

 

 

I have to make a network of TCP and UDP based network ,....

 

I want to change the router buffer size  and find jitter and end to end delay..

 

Kindly tell which inet example i may use..

 

 

Waiting ur reply..

 

 

 

 

sarfara...@iqra.edu.pk

unread,
Sep 18, 2015, 11:55:14 PM9/18/15
to OMNeT++ Users, aari...@hotmail.com
Thanks so much for reply..

Please tell or send ini file of it....


How tcp and udp communicate in one model.

How we change the buffer size of udp based  communication at routers .

waiting ur reply..

Sarfaraz Ahmed

unread,
Sep 19, 2015, 12:19:28 AM9/19/15
to omn...@googlegroups.com, aari...@hotmail.com

 

Hi Alfonso Ariza,

 

 I tried hard but I think I can't make a network.. network of TCP and UDP based communication ,....


        Kindly send the ini file or any guidance.
 

 

I want to change the router buffer size  and find jitter and end to end delay for only UDP voice and video traffic. and in same model TCP based traffic is flow.


Waiting ur reply..

 

 

 


Usama Aftab

unread,
Sep 19, 2015, 3:09:44 AM9/19/15
to OMNeT++ Users, aari...@hotmail.com
Hi Sarfaraz,

I think you need to go step by step. According to your questions you can follow these steps to achieve your desired condition.
  • First choose the type of network that you want to make. If there is no limitation on network and routing protocol type, you can use the idealwireless example from INET. Go to inet > examples > adhoc > idealwireless. You can find .ini and .ned files there. You can use these files to build your own network.
  • Once you are done deploying the network, test the ping app to verify the functionality.
  • Now you need to go and implement the TCP or UDP application on the nodes defined in omnetpp.ini of idealwireless example.
  • You can find this implementation in INET. Go to inet > applications > tcpapp and you will find many .ned files implementing different TCP applications. You can find the same for UDS in udpapp project.
  • Define these modules in your idealwireless example and then use **.host[0].tcpApp[0].typename = "<Your .ned file for module>" in your omnetpp.ini file.
Customize your buffer in the inet library according to your needs and it will reflect in your project as your own project will be referencing it as a library.

Hope it helps.

Usama

sarfara...@iqra.edu.pk

unread,
Sep 19, 2015, 6:34:41 AM9/19/15
to OMNeT++ Users, aari...@hotmail.com
Thanks so much dear Muhammad Usman..

I will do it ..

I may need ur help again...

Hope u may help...

Thanks

Alfonso Ariza Quintana

unread,
Sep 21, 2015, 5:20:42 AM9/21/15
to omn...@googlegroups.com

In a wireless communication, the packets are, usually stored in the link layer mac buffers, the ip layer can send packets to the link layer with higher speed than the link layer, due to this, the packets are stored, mainly, in the link layer buffers. If you want to study the performance of the protocols in function of the buffer size in a wireless environment, you need to modify the buffer size in the link layer (wifi)

 

De: omn...@googlegroups.com [mailto:omn...@googlegroups.com] En nombre de Sarfaraz Ahmed
Enviado el: sábado, 19 de septiembre de 2015 6:19
Para: omn...@googlegroups.com
CC: aari...@hotmail.com
Asunto: Re: [Omnetpp-l] Re: How to receive a message through TCPBasicClientApp in omnet++?

 

 

Hi Alfonso Ariza,

 

--

Sarfaraz Ahmed

unread,
Sep 21, 2015, 9:04:05 AM9/21/15
to omn...@googlegroups.com

I want to use fix network... not wireless network.

Alfonso Ariza Quintana

unread,
Sep 21, 2015, 12:03:11 PM9/21/15
to omn...@googlegroups.com

Even in fixed network, most of the packet are stored in the link layer queues

Usama Aftab

unread,
Sep 21, 2015, 12:24:32 PM9/21/15
to OMNeT++ Users, aari...@hotmail.com
Thanks Alfonso, i didn't know how to differ the buffer size in any network. May be this will help me later. :) 

Usama

Alfonso Ariza Quintana

unread,
Sep 21, 2015, 12:36:56 PM9/21/15
to omn...@googlegroups.com

There are several types or routers, depending of the link layer technology, the packets are stored in different queues

 

If the link layer is optics with terabytes, the packets are stored in the IP layer because the link layer can send packets a higher speed than the ip layer can process.With other technologies, the IP layer can switch the packets the packets are stored in the link layer.

 

With de default configuration in the simulator, the process delay in the IP layer is 0, this implies than doesn’t matter the bit rate of the link layer, the packets will be stored in the link layer queues.

Sarfaraz Ahmed

unread,
Sep 21, 2015, 10:57:06 PM9/21/15
to omn...@googlegroups.com

Thanks so much Alfonso.

Please tell which example, I have to take for both TCP and UDP traffic...

and how to make it.

waiting ur reply...

Alfonso Ariza Quintana

unread,
Sep 22, 2015, 9:46:41 AM9/22/15
to omn...@googlegroups.com

You can find several examples in inet framework

Directory examples/inet

sarfara...@iqra.edu.pk

unread,
Sep 22, 2015, 1:38:21 PM9/22/15
to OMNeT++ Users
Thanks so much....I appreciate ur help...

Thanks again..

Message has been deleted

Alfonso Ariza Quintana

unread,
Sep 30, 2015, 12:09:01 PM9/30/15
to omn...@googlegroups.com

With this information it is difficult to determine the problem, usually the error message offer some information about the problem

 

 

De: omn...@googlegroups.com [mailto:omn...@googlegroups.com] En nombre de Sarfaraz Ahmed
Enviado el: miércoles, 30 de septiembre de 2015 17:35
Para: omn...@googlegroups.com
Asunto: Re: [Omnetpp-l] Re: How to receive a message through TCPBasicClientApp in omnet++?

 

Hi Alfonso Ariza Quintana and Osama ,

 

I have tried again and again..but I think I may not create a fix network of (TCP and UDP based traffic in one model), 

and then find the affect on jitter and end to end delay by varying buffer size.

 

I took example of nclient, udp brust, tcp sack..they are working normal, but whenever i modify ini or ned file of any example they gave errors.

 

I am too confused who to remove error ...

Please Please give me complete idea so that i may make network without error..

I will remain thankful;

Thanks

 

Waiting ur reply..

Waiting ur reply..

 

On Tue, Sep 22, 2015 at 10:38 PM, <sarfara...@iqra.edu.pk> wrote:

Thanks so much....I appreciate ur help...

Thanks again..

--
You received this message because you are subscribed to the Google Groups "OMNeT++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.
Visit this group at http://groups.google.com/group/omnetpp.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted

Sarfaraz Ahmed

unread,
Oct 12, 2015, 12:44:13 AM10/12/15
to omn...@googlegroups.com
Hi Alfonso Ariza Quintana and Osama 


I have tried and i made a fix network , bellow is attched ini file.

But I have 3 problems.

1. UDP based traffic like (Voip and Videostreaming ) sent normal..but TCP based traffic (TCP sessionApp) did not send, in this ini file.
2. Please tell how to change the buffer size of router and hosts ..and what are methods.
3.  And how to measure the  jitter and end to end delay by varying buffer size.

Please help me to find out these problems.

I am also attaching INI file and NED file of the model..


Waiting ur reply.

I will remain thankful;


Thanks in advance..


###################################################################
[General]
network = Saf
sim-time-limit = 180s

#UDP;;;;;;;;VoiP::::::::::::::

**.udpType = "UDP"

**.Host12.numUdpApps = 3
**.Host12.udpApp[0].typename = "SimpleVoIPReceiver"
**.Host12.udpApp[0].localPort = 101

**.Host1.numUdpApps = 2
**.Host1.udpApp[0].typename = "SimpleVoIPSender"
**.Host1.udpApp[0].destPort = 1003
**.Host1.udpApp[0].destAddress = "Host12"
**.Host1.udpApp[0].stopTime = 100s

**.Host9.numUdpApps = 2
**.Host9.udpApp[0].typename = "SimpleVoIPReceiver"
**.Host9.udpApp[0].localPort = 1005

**.Host4.numUdpApps = 2
**.Host4.udpApp[0].typename = "SimpleVoIPSender"
**.Host4.udpApp[0].destPort = 102
**.Host4.udpApp[0].destAddress = "Host9"
**.Host4.udpApp[0].stopTime = 100s

#**.Host1.numUdpApps = 1
**.Host1.udpApp[1].typename = "SimpleVoIPReceiver"
**.Host1.udpApp[1].localPort = 103

**.Host7.numUdpApps = 3
**.Host7.udpApp[0].typename = "SimpleVoIPSender"
**.Host7.udpApp[0].destPort = 1009
**.Host7.udpApp[0].destAddress = "Host1"
**.Host7.udpApp[0].stopTime = 10s

**.Host6.numUdpApps = 1
**.Host6.udpApp[0].typename = "SimpleVoIPReceiver"
**.Host6.udpApp[0].localPort = 1070

**.Host10.numUdpApps = 1
**.Host10.udpApp[0].typename = "SimpleVoIPSender"
**.Host10.udpApp[0].destPort = 1060
**.Host10.udpApp[0].destAddress = "Host6"
**.Host10.udpApp[0].stopTime = 10s

#UDP;;;;;;;;;;;;;;;;Video>>>>>

**.Host11.numUdpApps = 1
**.Host11.udpApp[0].typename = "UDPVideoStreamCli"
**.Host11.udpApp[0].serverAddress = "Host4"
**.Host11.udpApp[0].localPort = 9998
**.Host11.udpApp[0].serverPort = 3080
**.Host11.udpApp[0].startTime = uniform(5s, 5.01s)

**.Host4.udpApp[1].typename = "UDPVideoStreamSvr"
**.Host4.udpApp[1].videoSize = 12MiB
**.Host4.udpApp[1].localPort = 3080
**.Host4.udpApp[1].sendInterval = 10ms
**.Host4.udpApp[1].packetLen = 1000B

**.Host2.numUdpApps = 1
**.Host2.udpApp[0].typename = "UDPVideoStreamCli"
**.Host2.udpApp[0].serverAddress = "Host7"
**.Host2.udpApp[0].localPort = 9993
**.Host2.udpApp[0].serverPort = 3008
**.Host2.udpApp[0].startTime = uniform(5s, 5.01s)


**.Host7.udpApp[1].typename = "UDPVideoStreamSvr"
**.Host7.udpApp[1].videoSize = 11MiB
**.Host7.udpApp[1].localPort = 3018
**.Host7.udpApp[1].sendInterval = 10ms
**.Host7.udpApp[1].packetLen = 1000B

**.Host9.udpApp[1].typename = "UDPVideoStreamCli"
**.Host9.udpApp[1].serverAddress = "Host12"
**.Host9.udpApp[1].localPort = 9333
**.Host9.udpApp[1].serverPort = 3033
**.Host9.udpApp[1].startTime = uniform(5s, 5.01s)


**.Host12.udpApp[1].typename = "UDPVideoStreamSvr"
**.Host12.udpApp[1].videoSize = 10MiB
**.Host12.udpApp[1].localPort = 3022
**.Host12.udpApp[1].sendInterval = 10ms
**.Host12.udpApp[1].packetLen = 1000B

**.Host12.udpApp[2].typename = "UDPVideoStreamCli"
**.Host12.udpApp[2].serverAddress = "Host7"
**.Host12.udpApp[2].localPort = 9912
**.Host12.udpApp[2].serverPort = 3077
**.Host12.udpApp[2].startTime = uniform(5s, 5.01s)



**.Host7.udpApp[2].typename = "UDPVideoStreamSvr"
**.Host7.udpApp[2].videoSize = 10MiB
**.Host7.udpApp[2].localPort = 3001
**.Host7.udpApp[2].sendInterval = 10ms
**.Host7.udpApp[2].packetLen = 1000B


**.configurator.networkConfiguratorModule = "configurator"
#;;;;;;TCP.................

**.tcpType = "TCP"
**.Host2.numTcpApps = 1
**.Host2.tcpApp[0].typename = "TCPSessionApp"
**.Host2.tcpApp[0].connectAddress = "Host5"
**.Host2.tcpApp[0].connectPort = 101
**.Host2.tcpApp[0].localPort = 151
**.Host2.tcpApp[0].active = true
**.Host2.tcpApp[0].sendBytes = 40B

**.Host6.numTcpApps = 1
**.Host6.tcpApp[0].typename = "TCPSessionApp"
**.Host6.tcpApp[0].connectAddress = "Host2"
**.Host6.tcpApp[0].connectPort = 100
**.Host6.tcpApp[0].localPort = 100
**.Host6.tcpApp[0].active = true
**.Host6.tcpApp[0].sendBytes = 40B


**.Host9.numTcpApps = 1
**.Host9.tcpApp[0].typename = "TCPSessionApp"
**.Host9.tcpApp[0].connectAddress = "Host12"
**.Host9.tcpApp[0].connectPort = 153
**.Host9.tcpApp[0].localPort = 10
**.Host9.tcpApp[0].active = true
**.Host9.tcpApp[0].sendBytes = 40B

**.Host12.numTcpApps = 1
**.Host12.tcpApp[0].typename = "TCPSessionApp"
**.Host12.tcpApp[0].connectAddress = "Host7"
**.Host12.tcpApp[0].connectPort = 103
**.Host12.tcpApp[0].localPort = 159
**.Host12.tcpApp[0].active = true
**.Host12.tcpApp[0].sendBytes = 40B
##########################################################################


package saf.simulations;

import inet.networklayer.autorouting.ipv4.IPv4NetworkConfigurator;
import inet.nodes.ethernet.Eth1G;
import inet.nodes.inet.Router;
import inet.nodes.inet.StandardHost;


//
// TODO auto-generated type
//
network Saf
{
    @display("bgb=937,405");
    submodules:
        Host1: StandardHost {
            @display("p=52,229");
        }
        Host2: StandardHost {
            @display("p=107,264");
        }
        router1: Router {
            @display("p=158,159");
        }
        configurator: IPv4NetworkConfigurator {
            @display("p=32,39");
        }
        router2: Router {
            @display("p=307,89");
        }
        router4: Router {
            @display("p=307,246");
        }
        router5: Router {
            @display("p=442,159");
        }
        router3: Router {
            @display("p=307,159");
        }
        Host12: StandardHost {
            @display("p=559,89");
        }
        Host3: StandardHost {
            @display("p=32,159");
        }
        Host4: StandardHost {
            @display("p=180,77");
        }
        Host5: StandardHost {
            @display("p=307,24");
        }
        Host6: StandardHost {
            @display("p=442,63");
        }
        Host7: StandardHost {
            @display("p=229,296");
        }
        Host8: StandardHost {
            @display("p=328,320");
        }
        Host9: StandardHost {
            @display("p=442,274");
        }
        Host10: StandardHost {
            @display("p=552,264");
        }
        Host11: StandardHost {
            @display("p=627,194");
        }
    connections:
        Host1.ethg++ <--> Eth1G <--> router1.ethg++;
        router1.ethg++ <--> Eth1G <--> Host2.ethg++;
        Host3.ethg++ <--> Eth1G <--> router1.ethg++;
        Host4.ethg++ <--> Eth1G <--> router2.ethg++;
        Host5.ethg++ <--> Eth1G <--> router2.ethg++;
        Host6.ethg++ <--> Eth1G <--> router2.ethg++;
        router2.ethg++ <--> Eth1G <--> router3.ethg++;
        router1.ethg++ <--> Eth1G <--> router3.ethg++;
        router3.ethg++ <--> Eth1G <--> router5.ethg++;
        router3.ethg++ <--> Eth1G <--> router4.ethg++;
        Host7.ethg++ <--> Eth1G <--> router4.ethg++;
        Host8.ethg++ <--> Eth1G <--> router4.ethg++;
        Host9.ethg++ <--> Eth1G <--> router4.ethg++;
        Host10.ethg++ <--> Eth1G <--> router5.ethg++;
        Host11.ethg++ <--> Eth1G <--> router5.ethg++;
        Host12.ethg++ <--> Eth1G <--> router5.ethg++;
}




 

On Wed, Sep 30, 2015 at 9:41 PM, Sarfaraz Ahmed <sarfara...@iqra.edu.pk> wrote:

please suggest.... what will I do..
from where I have to start and end ...
please send steps... or any help...
I am thankful for ur help..

ini file of final network.txt
NEd file of final network.txt

Sarfaraz Ahmed

unread,
Oct 12, 2015, 11:55:28 AM10/12/15
to omn...@googlegroups.com, aari...@hotmail.com

Please tell how to configure buffer size in link layer..
please send ini file example

On Sep 17, 2015 7:46 PM, <sarfara...@iqra.edu.pk> wrote:
Hi Alfonso Ariza Quintana ,


I have to make a network of TCP and UDP based network ,....

I want to change the router buffer size  and find jitter and end to end delay..

Kindly tell which inet example i may use..


Waiting ur reply..




--
You received this message because you are subscribed to a topic in the Google Groups "OMNeT++ Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/omnetpp/XoOSPs3RkJM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to omnetpp+u...@googlegroups.com.

Alfonso Ariza Quintana

unread,
Oct 13, 2015, 3:08:46 AM10/13/15
to omn...@googlegroups.com

It depends of the mac interface that you use, in the basic Ethernet implementation is

**.mac.txQueueLimit = 100

 

For example, the value by default is 1000

https://github.com/aarizaq/inetmanet-2.0/blob/inetmanet-2.2/src/linklayer/ethernet/EtherMAC.ned

 

 

De: omn...@googlegroups.com [mailto:omn...@googlegroups.com] En nombre de Sarfaraz Ahmed
Enviado el: lunes, 12 de octubre de 2015 17:55
Para: omn...@googlegroups.com
CC: aari...@hotmail.com
Asunto: Re: [Omnetpp-l] Re: How to receive a message through TCPBasicClientApp in omnet++?

 

Please tell how to configure buffer size in link layer..

--

You received this message because you are subscribed to the Google Groups "OMNeT++ Users" group.

To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.

Alfonso Ariza Quintana

unread,
Oct 13, 2015, 3:32:05 AM10/13/15
to omn...@googlegroups.com

TCP is a client/server protocol, you have clients but you don’t have servers

The clients can’t open sessions and if they cannot open sessions they cannot transmit

Sarfaraz Ahmed

unread,
Oct 13, 2015, 4:20:11 AM10/13/15
to omn...@googlegroups.com
Thank u so much dear sir Alfonso Ariza .....

Thanks again...

Sarfaraz Ahmed

unread,
Oct 21, 2015, 12:39:58 PM10/21/15
to omn...@googlegroups.com
Dear sir Alfonso Ariza

I am in trouble ...hope u guide and resolve this problem....

error is this....

 Error in module (EtherMACFullDuplex) Sarfaraz.Host12.eth[1].mac (id=218) during network initialization: Ethernet phys gate must be connected using a transmission channel.

I tried to use following in the NED file.....as u guided one omnet user's...

but I think i may not understand it and problem happened..


        channel ethline extends DatarateChannel
        {
            delay = 500ns;
            datarate = 10Mbps;
        }

Host1.ethg++ <--> ethline <--> router18.ethg++;

kindly give instruction ...and guide please please ....

following is the NED file of my model...


please help me to resolve this error..


waiting ur reply


package sarfaraz.simulations;

//
// TODO auto-generated type
//
//import ned.datarateChannel.ethline;
import ned.DatarateChannel;
import inet.linklayer.ethernet.EtherMACFullDuplex;
//import inet.linklayer.ethernet.EtherMAC;
import inet.networklayer.autorouting.ipv4.IPv4NetworkConfigurator;
import inet.nodes.ethernet.Eth1G;
import inet.nodes.inet.Router;
import inet.nodes.inet.StandardHost;
import inet.util.ThruputMeter;
import inet.world.scenario.ScenarioManager;

            
network Sarfaraz
{
      
   types:
        channel ethline extends DatarateChannel
        {
            delay = 500ns;
            datarate = 1Gbps;
           // 
        }
 // Host1.ethg++ <--> ethline <--> router1.ethg++;

    submodules:

        
        Host1: StandardHost {
            @display("p=52,242");
        }
        Host2: StandardHost {
            @display("p=107,275");
        }
        router1: Router {
            @display("p=158,159");
        }
        configurator: IPv4NetworkConfigurator {
            @display("p=83,24");
        }
        router2: Router {
            @display("p=307,89");
        }
        router4: Router {
            @display("p=307,246");
        }
        router5: Router {
            @display("p=442,159");
        }
        router3: Router {
            @display("p=307,159");
        }
        Host12: StandardHost {
            @display("p=558,246");
        }
        Host3: StandardHost {
            @display("p=32,179");
        }
        Host4: StandardHost {
            @display("p=252,31");
        }
        Host5: StandardHost {
            @display("p=307,24");
        }
        Host6: StandardHost {
            @display("p=368,38");
        }
        Host7: StandardHost {
            @display("p=252,362");
        }
        Host8: StandardHost {
            @display("p=322,362");
        }
        Host9: StandardHost {
            @display("p=389,362");
        }
        Host10: StandardHost {
            @display("p=442,264");
        }
        Host11: StandardHost {
            @display("p=507,264");
        }
        thruputMeter1: ThruputMeter {
            @display("p=67,120");
        }
        thruputMeter2: ThruputMeter {
            @display("p=596,308");
        }
        thruputMeter3: ThruputMeter {
            @display("p=507,320");
        }
        thruputMeter4: ThruputMeter {
            @display("p=753,338");
        }
        thruputMeter5: ThruputMeter {
            @display("p=645,389");
        }
        router6: Router {
            @display("p=558,152");
        }
        router7: Router {
            @display("p=657,120");
        }
        Host13: StandardHost {
            @display("p=608,63");
        }
        Host14: StandardHost {
            @display("p=507,77");
        }
        Host15: StandardHost {
            @display("p=558,58");
        }
        Host16: StandardHost {
            @display("p=741,207");
        }
        Host17: StandardHost {
            @display("p=741,120");
        }
        Host18: StandardHost {
            @display("p=735,38");
        }
        thruputMeter6: ThruputMeter {
            @display("p=558,462");
        }
        thruputMeter7: ThruputMeter {
            @display("p=430,462");
        }
        thruputMeter8: ThruputMeter {
            @display("p=507,389");
        }
        thruputMeter9: ThruputMeter {
            @display("p=684,335");
        }
    connections:
        Host1.ethg++ <--> Eth1G <--> router1.ethg++;
        router1.ethg++ <--> Eth1G <--> Host2.ethg++;
        Host3.ethg++ <--> Eth1G <--> router1.ethg++;
        Host4.ethg++ <--> Eth1G <--> router2.ethg++;
        Host5.ethg++ <--> Eth1G <--> router2.ethg++;
        Host6.ethg++ <--> Eth1G <--> router2.ethg++;
        router2.ethg++ <--> Eth1G <--> router3.ethg++;
        router1.ethg++ <--> Eth1G <--> router3.ethg++;
        router3.ethg++ <--> Eth1G <--> router5.ethg++;
        router3.ethg++ <--> Eth1G <--> router4.ethg++;
        Host7.ethg++ <--> Eth1G <--> router4.ethg++;
        Host8.ethg++ <--> Eth1G <--> router4.ethg++;
        Host9.ethg++ <--> Eth1G <--> router4.ethg++;
        Host10.ethg++ <--> Eth1G <--> router5.ethg++;
        Host11.ethg++ <--> Eth1G <--> router5.ethg++;
        Host12.ethg++ <--> Eth1G <--> router5.ethg++;
        router5.ethg++ <--> Eth1G <--> router6.ethg++;
        router6.ethg++ <--> Eth1G <--> router7.ethg++;
        Host14.ethg++ <--> Eth1G <--> router6.ethg++;
        Host15.ethg++ <--> Eth1G <--> router6.ethg++;
        Host13.ethg++ <--> Eth1G <--> router6.ethg++;
        Host18.ethg++ <--> Eth1G <--> router7.ethg++;
        Host17.ethg++ <--> Eth1G <--> router7.ethg++;
        Host16.ethg++ <--> Eth1G <--> router7.ethg++;
       //#######################Throughputmeter#########9######

        Host1.ethg$o++ --> Eth1G --> thruputMeter1.in;
        thruputMeter1.out --> Host18.ethg$i++;
        Host18.ethg$o++ --> Eth1G --> Host1.ethg$i++;


        Host2.ethg$o++ --> Eth1G --> thruputMeter2.in;
        thruputMeter2.out --> Host17.ethg$i++;
        Host17.ethg$o++ --> Eth1G --> Host2.ethg$i++;

        Host3.ethg$o++ --> Eth1G --> thruputMeter3.in;
        thruputMeter3.out --> Host16.ethg$i++;
        Host16.ethg$o++ --> Eth1G --> Host3.ethg$i++;

        Host4.ethg$o++ --> Eth1G --> thruputMeter4.in;
        thruputMeter4.out --> Host13.ethg$i++;
        Host13.ethg$o++ --> Eth1G --> Host4.ethg$i++;

        Host5.ethg$o++ --> Eth1G --> thruputMeter5.in;
        thruputMeter5.out --> Host14.ethg$i++;
        Host14.ethg$o++ --> Eth1G --> Host5.ethg$i++;

        Host6.ethg$o++ --> Eth1G --> thruputMeter6.in;
        thruputMeter6.out --> Host15.ethg$i++;
        Host15.ethg$o++ --> Eth1G --> Host6.ethg$i++;

        Host7.ethg$o++ --> Eth1G --> thruputMeter7.in;
        thruputMeter7.out --> Host10.ethg$i++;
        Host10.ethg$o++ --> Eth1G --> Host7.ethg$i++;

        Host8.ethg$o++ --> Eth1G --> thruputMeter8.in;
        thruputMeter8.out --> Host11.ethg$i++;
        Host11.ethg$o++ --> Eth1G --> Host8.ethg$i++;

        Host9.ethg$o++ --> Eth1G --> thruputMeter9.in;
        thruputMeter9.out --> Host12.ethg$i++;
        Host12.ethg$o++ --> Eth1G --> Host9.ethg$i++;


Alfonso Ariza Quintana

unread,
Oct 22, 2015, 7:38:11 AM10/22/15
to omn...@googlegroups.com

You use EthG1 to connect the host12, no etheline.

Message has been deleted

Alfonso Ariza Quintana

unread,
Oct 27, 2015, 5:48:01 AM10/27/15
to omn...@googlegroups.com

If you want to measure in both directions you need two, between sender and receiver.

The end to end delay is already recorded in the sca file

 

 

 

De: omn...@googlegroups.com [mailto:omn...@googlegroups.com] En nombre de Sarfaraz Ahmed
Enviado el: lunes, 26 de octubre de 2015 17:58
Para: omn...@googlegroups.com
Asunto: Re: [Omnetpp-l] Re: How to receive a message through TCPBasicClientApp in omnet++?

 

Dear Sir Alfonso Ariza .....

 

kindly tell how to connect throughput meter ..in TCP and UDP based applications..

 

is throughput meter connected between sender and receiver  or two throughput meter connected..one for sender and one for receiver..

??

 

please guide ..I want to measure end to end delay ...throughput and jitters...by varying buffer size,...

 

 

Please tell also how to configure link layer buffer for sender host ans receiver host..

 

you are the only one who helped me ...now you kind help is needed again..

 

Kindly send NED and ini file of one throughput meter..

 

 


Please Please..

kindly help..

 

Sarfaraz Ahmed

unread,
Oct 27, 2015, 6:22:50 AM10/27/15
to omn...@googlegroups.com
Dear sir thanks for replying. Kindly tell me how to connect the throughput meter 

Please send .ini and NED file ....

I tried a lot to connect throughput meter but i couldn't be able to connect. So for the reference kindly send me the complete model of throughput meter...

Thanks 

Alfonso Ariza Quintana

unread,
Oct 27, 2015, 2:48:22 PM10/27/15
to omn...@googlegroups.com

You need to include between udpapp and udp modules, but it is necessary to modify the source code of ThruputMeter

 

void ThruputMeter::handleMessage(cMessage *msg)

{

    updateStats(simTime(), PK(msg)->getBitLength());

    send(msg, "out");

}

 

To

 

void ThruputMeter::handleMessage(cMessage *msg)

{

    cPacket *pkt = dynamic_cast<cPacket *>(msg);

    if (pkt)

       updateStats(simTime(), pkt->getBitLength());

    send(msg, "out");

sarfara...@iqra.edu.pk

unread,
Oct 31, 2015, 2:46:31 AM10/31/15
to OMNeT++ Users, aari...@hotmail.com
Aslam alekum dear,

Thanks so much for ur guidance .....

As per ur instructions,  I did  step by step...and now I am at last step to analyse the jitter by varying the buffer size .....

 (Customize your buffer in the inet library according to your needs and it will reflect in your project as your own project will be referencing it as a library).


Kindly tell from where i may change the buffer size of inet...> link layer ...>  ? 

Waiting your relpy

Sarfaraz Ahmed

unread,
Nov 3, 2015, 4:05:48 AM11/3/15
to omn...@googlegroups.com, aari...@hotmail.com
Dear Sir Alfonso Ariza Quintana,

I am working on a network. below is the ini file and NED file ....I need help to set buffer sizes of the nine(9) receivers Hosts.
and seven routers..

as below your comments I checked in the inet ...> source file ...>Linklayer.....>ethernet.....>EtherMAC.ned.....>

int txQueueLimit = default(1000);.....

But I can't able to set different buffer size of all 9 hosts and 7 routers...

Please explain .....how can I set buffer sizes in different file... (in ini , NED, EtherMac.ned, .cc)..

send a complete example for one host so that I may get help to implement all.



Waiting your reply..
......................................................................................................................................................

Packet delay due to the buffer is, usually, in the models of inet, due to the buffers in the link layer.

You should change the buffers in the link layer.

 


It depends of the mac interface that you use, in the basic Ethernet implementation is

**.mac.txQueueLimit = 100

 

For example, the value by default is 1000

https://github.com/aarizaq/inetmanet-2.0/blob/inetmanet-2.2/src/linklayer/ethernet/EtherMAC.ned

............................................................................................................................................................


[General]


network = Sarfaraz 

sim-time-limit = 180s

seed-0-mt = 5

**.configurator.networkConfiguratorModule = "configurator"


########VOIP#########(03sender,,,,1,2,3) and three receiver(18,17,16)########


**.udpType = "UDP"

**.Host1.numUdpApps = 1

**.Host2.numUdpApps = 1

**.Host3.numUdpApps = 1

**.Host4.numUdpApps = 1

**.Host5.numUdpApps = 1

**.Host6.numUdpApps = 1


**.Host13.numUdpApps = 1

**.Host14.numUdpApps = 1

**.Host15.numUdpApps = 1

**.Host16.numUdpApps = 1

**.Host17.numUdpApps = 1

**.Host18.numUdpApps = 1




# udp app configuration


**.Host1.udpApp[0].typename = "UDPBasicBurst"

**.Host1.udpApp[0].localPort = 200

**.Host1.udpApp[0].destPort = 200

**.Host1.udpApp[0].messageLength = 125B

**.Host1.udpApp[0].sendInterval = 0.5s

**.Host1.udpApp[0].destAddresses = "Host18"



**.mgmt.frameCapacity = 10

**.mac.maxQueueSize = 14

**.mac.rtsThresholdBytes = 3000B

**.mac.basicBitrate = 6Mbps  # 24Mbps

**.mac.retryLimit = 7

**.mac.cwMinData = 31



**.Host18.udpApp[0].typename = "UDPBasicBurst"

**.Host18.udpApp[0].localPort = 200

**.Host18.udpApp[0].destPort = 200

**.Host18.udpApp[0].messageLength = 125B

**.Host18.udpApp[0].sendInterval = 0.5s

**.Host18.udpApp[0].burstDuration = 10s

**.Host18.udpApp[0].sleepDuration = 2s

**.Host18.udpApp[0].chooseDestAddrMode = "perBurst"

**.Host18.udpApp[0].destAddresses = "Host1"


**.Host1.udpApp[0].burstDuration = 10s

**.Host1.udpApp[0].sleepDuration = 2s

**.Host1.udpApp[0].chooseDestAddrMode = "perBurst"




**.Host2.udpApp[0].typename = "UDPBasicBurst"

**.Host2.udpApp[0].localPort = 200

**.Host2.udpApp[0].destPort = 200

**.Host2.udpApp[0].messageLength = 1250B

**.Host2.udpApp[0].sendInterval = 0.5s

**.Host2.udpApp[0].destAddresses = "Host17"


**.Host17.udpApp[0].typename = "UDPBasicBurst"

**.Host17.udpApp[0].localPort = 200

**.Host17.udpApp[0].destPort = 200

**.Host17.udpApp[0].messageLength = 1250B

**.Host17.udpApp[0].sendInterval = 0.5s

**.Host17.udpApp[0].burstDuration = 10s

**.Host17.udpApp[0].sleepDuration = 2s


**.Host17.udpApp[0].chooseDestAddrMode = "perBurst"

**.Host17.udpApp[0].destAddresses = "Host2"



**.Host2.udpApp[0].burstDuration = 10s

**.Host2.udpApp[0].sleepDuration = 2s

**.Host2.udpApp[0].chooseDestAddrMode = "perBurst"


**.Host3.udpApp[0].typename = "UDPBasicBurst"

**.Host3.udpApp[0].localPort = 200

**.Host3.udpApp[0].destPort = 200

**.Host3.udpApp[0].messageLength = 1250B

**.Host3.udpApp[0].sendInterval = 0.5s

**.Host3.udpApp[0].destAddresses = "Host16"


**.Host16.udpApp[0].typename = "UDPBasicBurst"

**.Host16.udpApp[0].localPort = 200

**.Host16.udpApp[0].destPort = 200

**.Host16.udpApp[0].messageLength = 1250B

**.Host16.udpApp[0].sendInterval = 0.5s


**.Host16.udpApp[0].burstDuration = 10s

**.Host16.udpApp[0].sleepDuration = 2s


**.Host16.udpApp[0].chooseDestAddrMode = "perBurst"

**.Host16.udpApp[0].destAddresses = "Host3"


**.Host3.udpApp[0].burstDuration = 10s

**.Host3.udpApp[0].sleepDuration = 2s

**.Host3.udpApp[0].chooseDestAddrMode = "perBurst"





###;;;;VideoStreaming,,,[03 client(4,5,6....) and 03 server(13,14,15....) ,,,,]>>>>



**.Host4.udpApp[0].typename = "UDPVideoStreamCli"

**.Host4.udpApp[0].serverAddress = "Host13"

**.Host4.udpApp[0].localPort = 210

**.Host4.udpApp[0].serverPort = 210

**.Host4.udpApp[0].startTime = 5s # uniform(5s, 5.01s)


**.Host13.udpApp[0].typename = "UDPVideoStreamSvr"

**.Host13.udpApp[0].videoSize = 10MiB

**.Host13.udpApp[0].localPort = 210

**.Host13.udpApp[0].sendInterval = 10ms

**.Host13.udpApp[0].packetLen = 100B



**.Host5.udpApp[0].typename = "UDPVideoStreamCli"

**.Host5.udpApp[0].serverAddress = "Host14"

**.Host5.udpApp[0].localPort = 191

**.Host5.udpApp[0].serverPort = 171

**.Host5.udpApp[0].startTime = 5s # uniform(5s, 5.01s)


**.Host14.udpApp[0].typename = "UDPVideoStreamSvr"

**.Host14.udpApp[0].videoSize = 10MiB

**.Host14.udpApp[0].localPort = 191

**.Host14.udpApp[0].sendInterval = 10ms

**.Host14.udpApp[0].packetLen = 100B



**.Host6.udpApp[0].typename = "UDPVideoStreamCli"

**.Host6.udpApp[0].serverAddress = "Host15"

**.Host6.udpApp[0].localPort = 181

**.Host6.udpApp[0].serverPort = 163

**.Host6.udpApp[0].startTime = 5s# uniform(6s, 5.07s)



**.Host15.udpApp[0].typename = "UDPVideoStreamSvr"

**.Host15.udpApp[0].videoSize = 10MiB

**.Host15.udpApp[0].localPort = 181

**.Host15.udpApp[0].sendInterval = 10ms

**.Host15.udpApp[0].packetLen = 100B


##############TCP####three client( 7,8,9...) and three server( 10 11 12.)


**.tcpType = "TCP"

**.Host7.numTcpApps = 1

**.Host8.numTcpApps = 1

**.Host9.numTcpApps = 1

**.Host10.numTcpApps = 1

**.Host11.numTcpApps = 1

**.Host12.numTcpApps = 1


**.Host7.tcpApp[0].typename = "TCPSessionApp"  # FTP

**.Host7.tcpApp[0].sendBytes = 1MiB

**.Host7.tcpApp[0].active = true

**.Host7.tcpApp[0].localPort = 10021

**.Host7.tcpApp[0].connectAddress = "Host10"

**.Host7.tcpApp[0].connectPort = 10025

**.Host7.tcpApp[0].tOpen = 0s

**.Host7.tcpApp[0].tSend = 0s

**.Host7.tcpApp[0].tClose = 0s

**.Host7.tcpApp[0].sendScript = ""



**.Host10.tcpApp[0].typename = "TCPSinkApp"

**.Host10.tcpApp[0].localPort = 10089



**.Host8.tcpApp[0].typename = "TCPSessionApp"  # FTP

**.Host8.tcpApp[0].sendBytes = 1MiB

**.Host8.tcpApp[0].active = true

**.Host8.tcpApp[0].localPort = 10020

**.Host8.tcpApp[0].connectAddress = "Host11"

**.Host8.tcpApp[0].connectPort = 10021

**.Host8.tcpApp[0].tOpen = 0s

**.Host8.tcpApp[0].tSend = 0s

**.Host8.tcpApp[0].tClose = 0s

**.Host8.tcpApp[0].sendScript = ""



**.Host11.tcpApp[0].typename = "TCPSinkApp"

**.Host11.tcpApp[0].localPort = 10026



**.Host9.tcpApp[0].typename = "TCPSessionApp"  # FTP

**.Host9.tcpApp[0].sendBytes = 1MiB

**.Host9.tcpApp[0].active = true

**.Host9.tcpApp[0].localPort = 10020

**.Host9.tcpApp[0].connectAddress = "Host12"

**.Host9.tcpApp[0].connectPort = 10021

**.Host9.tcpApp[0].tOpen = 0s

**.Host9.tcpApp[0].tSend = 0s

**.Host9.tcpApp[0].tClose = 0s

**.Host9.tcpApp[0].sendScript = ""

 

**.Host12.tcpApp[0].typename = "TCPSinkApp"

**.Host12.tcpApp[0].localPort = 10021




**.eth[*].numOutputHooks = 1

**.eth[*].outputHook[*].typename = "ThruputMeter"


**.eth[*].numInputHooks = 1

 **.eth[*].inputHook[*].typename = "ThruputMeter"


**.eth[*].mac.promiscuous = false

**.eth[*].mac.address = "auto"

**.eth[*].mac.duplexMode = true




package sarfaraz.simulations;

import inet.linklayer.IOutputQueue;

import inet.linklayer.queue.DropTailQueue;

import inet.nodes.ethernet.Eth10G;

import inet.nodes.ethernet.Eth10M;

//import inet.nodes.ipv6.StandardHost6;

//import inet.linklayer.IOutputQueue;

//

// TODO auto-generated type

//

//import ned.datarateChannel.ethline;

import ned.DatarateChannel;


import inet.linklayer.ethernet.EtherMAC;

import inet.networklayer.autorouting.ipv4.IPv4NetworkConfigurator;

import inet.nodes.ethernet.Eth1G;

import inet.nodes.inet.Router;

import inet.nodes.inet.StandardHost;

import inet.util.ThruputMeter;





network Sarfaraz

{

    submodules:



        Host1: StandardHost {

            @display("p=83,120");

        }

        Host2: StandardHost {

            @display("p=83,187");

        }

        router1: Router {

            @display("p=158,159");

        }

        configurator: IPv4NetworkConfigurator {

            @display("p=83,24");

        }

        router2: Router {

            @display("p=307,89");

        }

        router4: Router {

            @display("p=307,246");

        }

        router5: Router {

            @display("p=442,159");

        }

        router3: Router {

            @display("p=307,159");

        }

        Host12: StandardHost {

            @display("p=546,259");

        }

        Host3: StandardHost {

            @display("p=122,246");

        }

        Host4: StandardHost {

            @display("p=261,32");

        }

        Host5: StandardHost {

            @display("p=307,24");

        }

        Host6: StandardHost {

            @display("p=350,32");

        }

        Host7: StandardHost {

            @display("p=268,324");

        }

        Host8: StandardHost {

            @display("p=311,331");

        }

        Host9: StandardHost {

            @display("p=358,324");

        }

        Host10: StandardHost {

            @display("p=417,259");

        }

        Host11: StandardHost {

            @display("p=481,272");

        }

        router6: Router {

            @display("p=558,152");

        }

        router7: Router {

            @display("p=657,120");

        }

        Host13: StandardHost {

            @display("p=469,89");

        }

        Host14: StandardHost {

            @display("p=529,63");

        }

        Host15: StandardHost {

            @display("p=597,77");

        }

        Host16: StandardHost {

            @display("p=741,175");

        }

        Host17: StandardHost {

            @display("p=741,120");

        }

        Host18: StandardHost {

            @display("p=721,63");

        }


    connections:

        Host1.ethg++ <--> Eth1G <--> router1.ethg++;

        router1.ethg++ <--> Eth1G <--> Host2.ethg++;

        Host3.ethg++ <--> Eth1G <--> router1.ethg++;

        Host4.ethg++ <--> Eth1G <--> router2.ethg++;

        Host5.ethg++ <--> Eth1G <--> router2.ethg++;

        Host6.ethg++ <--> Eth1G <--> router2.ethg++;

        Host7.ethg++ <--> Eth1G <--> router4.ethg++;

        Host8.ethg++ <--> Eth1G <--> router4.ethg++;

        Host9.ethg++ <--> Eth1G <--> router4.ethg++;

        Host10.ethg++ <--> Eth1G <--> router5.ethg++;

        Host11.ethg++ <--> Eth1G <--> router5.ethg++;

        Host12.ethg++ <--> Eth1G <--> router5.ethg++;

        Host14.ethg++ <--> Eth1G <--> router6.ethg++;

        Host15.ethg++ <--> Eth1G <--> router6.ethg++;

        Host13.ethg++ <--> Eth1G <--> router6.ethg++;

        Host18.ethg++ <--> Eth1G <--> router7.ethg++;

        Host17.ethg++ <--> Eth1G <--> router7.ethg++;

        Host16.ethg++ <--> Eth1G <--> router7.ethg++;

       //#######################Throughputmeter#########9######







        router1.ethg++ <--> Eth10M <--> router3.ethg++;

        router2.ethg++ <--> Eth10M <--> router3.ethg++;

        router3.ethg++ <--> Eth10M <--> router4.ethg++;

        router3.ethg++ <--> Eth10M <--> router5.ethg++;

        router5.ethg++ <--> Eth10M <--> router6.ethg++;

        router6.ethg++ <--> Eth10M <--> router7.ethg++;




}


















Alfonso Ariza Quintana

unread,
Nov 3, 2015, 4:15:19 AM11/3/15
to omn...@googlegroups.com

You can set in the ini file different sizes for every one

 

**.Node1.**.txQueueLimit = 10

**.Node2.**.txQueueLimit = 100

 

**.Node[0..10].**.txQueueLimit = 10

**.Node[11..20].**.txQueueLimit = 100

Sarfaraz Ahmed

unread,
Nov 3, 2015, 5:15:39 AM11/3/15
to omn...@googlegroups.com
Thanks so much for reply..


I have set for all Hosts 1 to 18 and for all Routers from 1 to 7..

Attached is screenshot.

But there are symbol of (Unused entry (does not match any parameters)) ..

Kindly suggest ..is it right..implementation of buffer size??

please reply
Screenshot - 11_3_2015 , 3_10_44 AM.png

Sarfaraz Ahmed

unread,
Nov 3, 2015, 11:48:01 AM11/3/15
to omn...@googlegroups.com, Alfonso Ariza Quintana
Thanks so much for reply..


I have set for all Hosts 1 to 18 and for all Routers from 1 to 7..

Attached is screenshot.

But there are symbol of (Unused entry (does not match any parameters)) ..

Kindly suggest ..is it right..implementation of buffer size??

please reply

Screenshot - 11_3_2015 , 3_10_44 AM.png

Alfonso Ariza Quintana

unread,
Nov 3, 2015, 12:08:18 PM11/3/15
to omn...@googlegroups.com

Try to run the simulation and you can check in the IDE if the values are correctly read

Sarfaraz Ahmed

unread,
Nov 6, 2015, 1:00:11 AM11/6/15
to omn...@googlegroups.com, Alfonso Ariza Quintana
Dear Sir Alfonso Ariza ,


I have connected throughput meter in the UDP based application.

snap shot is attached ..

I had already changed the source file of throughput meter..as you guided me...

But I can't get output in the throughput meter..

Kindly tell how to connect in the right way of throughput meter..

and I wante to measure Jitter... kindly send code of jitter..

Please help..

Waiting your reply
..............................................................................................................................

You need to include between udpapp and udp modules, but it is necessary to modify the source code of ThruputMeter

 

void ThruputMeter::handleMessage(cMessage *msg)

{

    updateStats(simTime(), PK(msg)->getBitLength()); send(msg, "out");

}

To

void ThruputMeter::handleMessage(cMessage *msg)

{

    cPacket *pkt = dynamic_cast<cPacket *>(msg);

    if (pkt)

       updateStats(simTime(), pkt->getBitLength());

    send(msg, "out");

}

..................................................................................................................................................
Screenshot - 11_5_2015 , 8_38_28 PM.png
Screenshot - 11_5_2015 , 9_02_13 PM.png

Alfonso Ariza Quintana

unread,
Nov 6, 2015, 4:10:41 AM11/6/15
to omn...@googlegroups.com

The meter is incorrectly connected,

 

It should be connected between UDP and UDPApp, or between UDP and networkLayer, in both cases you need to modify the file StandardHost.ned

 

if you want to measure individual source throughputs

       thrUp [numUdpApps]: ThruputMeter{

        }

 

       thrDown [numUdpApps]: ThruputMeter{

        }

 

 

        for i=0..numUdpApps-1 {

            udpApp[i].udpOut --> thrDown.in;

            thrDown.out --> udp.appIn++;

            udpApp[i].udpIn <-- thrUp.out;

            thrUp.out <-- udp.appOut++;

        }

 

If you want to measure the aggregate traffic.

 

        thrUp : ThruputMeter if hasUdp{

        }

 

       thrDown: ThruputMeter if hasUdp{

        }

 

        udp.ipOut --> thrDown.in if hasUdp;

        thrDown.out --> networkLayer.transportIn++ if hasUdp;

        udp.ipIn <-- thrUp.out if hasUdp;

        thrUp.in <-- networkLayer.transportOut++ if hasUdp;

noor ul huda malik

unread,
Sep 20, 2016, 5:13:18 AM9/20/16
to OMNeT++ Users
Hi Sarfraz,

I am working on tcp and i have created a scenario of sending same tcp segement to multipath but its not working even after the command ccmt. Can you please help me

To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "OMNeT++ Users" group.

To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "OMNeT++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages