Reza
Reza

Reputation: 165

Finding the best methods in the Inet which perform receiving messages the application layer

I need to find which methods in the Inet are best for the following conditions and requests:

All applications in the application layer such as TcpApp, UDPApp, UdpBasicApp, etc are processed in a common method when a message or packet is received. For example, when a UdpBasicApp packet is sent, that packet is processed in that function(method). Also, a TcpApp packet is received, that packet is processed in that function(method). I guess that function(method) should be belonging a class on the common path before arriving to all applications(I guess that should be in Network Layer or Transport Layer).

Suppose a part of my omnetpp.ini is:

*.hostA.numApps = 1
*.hostA.app[0].typename = "UdpBasicApp"
*.hostA.app[0].destAddresses = "hostB"
*.hostA.app[0].destPort = 5000
*.hostA.app[0].messageLength = 1000B
*.hostA.app[0].sendInterval = exponential(12ms)
*.hostA.app[0].packetName = "UDPData"

*.hostB.numApps = 1
*.hostB.app[0].typename = "UdpSink"
*.hostB.app[0].localPort = 5000

The hostA and the hostB are nodes. Thanks in advance

Upvotes: 0

Views: 75

Answers (1)

Rudi
Rudi

Reputation: 6681

The content of the application data packet is specific to any given application so there is no common function where you could catch 'all' application data. Even if there would be such a method, you would not be able to do anything with the data packet, because you would not know what is inside the packet and how to interpret it. You would just see X bytes of data.

There is no common point down on lower layers either.

  • On link layer, data can come in on various interfaces if you have several networking cards.
  • On network layer, you can have either IPv6 or IPv4 traffic, so again no common path.
  • On transport layer, you can have either UDP, TCP or SCTP
  • On application layer, you have many application each interpreting the application data differently.

In short, there is no such method and in fact it does not make sense to have one.

Upvotes: 2

Related Questions