1

I have all the examples up and running for the INET (AODV) simulation. My network comprises of number of AODV Router hosts.

My next task is to exchange some custom massages regarding each host's current position (which will be updated after a certain time through Mobility). All the examples I found (normally) are of tictoc which is asking me to build a simpleModule in a .cc file and then use that module in the .ned file. I want to use the AODVRouter module to exchange these messages (as it already has the implemented things that I need for the network).

This is the example I used for exchanging messages with a cSimpleModule

I have tried this example (as described in INET project), but the problem here is that it is only extending cSimpleModule. Since I want to use AODVRouter module (from INET) as my sender and receiver, I can't use this example. So my question is, what is the other way to do it (i.e. sending and receiving messages through INET modules such as AODVRouter module).

Wandering Fool
  • 2,170
  • 3
  • 18
  • 48
Usama Aftab
  • 47
  • 1
  • 9
  • What is your actual question? The question title asks one thing, but your last paragraph asks another. Also, what have you tried so far? Any links, code samples, etc., that you can provide would be helpful. – Mar Jul 29 '15 at 21:42
  • May be it is more clear now? Sorry for being unclear. But i want to know the way you can send messages through inet modules (such as AODVRouter)? Because in the above example, it tells you to do it via cSimpleModule. – Usama Aftab Jul 29 '15 at 21:50
  • Is [this](https://omnetpp.org/doc/omnetpp/tictoc-tutorial/txc6.cc.html) the tutorial you are using? You should link to the tutorial/example rather than just copy/pasting it. – Mar Jul 29 '15 at 22:01
  • Yes this is the one. Can you help me with how to modify it for an inet module? Or if there is any other way to send messages between AODVRouter hosts? Yes i edited it. Thanks for recommending – Usama Aftab Jul 29 '15 at 22:03
  • Sorry, I know nothing on these subjects; I'm just trying to help improve the question's quality so others are more able to answer it. – Mar Jul 29 '15 at 22:27

1 Answers1

1

How you handle this problem depends on what those messages are, and how they are related to the AODV protocol.

  • If you are trying to extend the AODV protocol with some location aware features and the location will be used by the routing protocol itself, then you should obviously look into the AODVRouting source code. You can check there to see how the messages are sent/received.

  • If the message is completely unrelated to AODV and you want to implement some kind of application level message exchanges, then the way is to create an "Application" module and install it into the router. Of course, you have to know whether you want to send the data using TCP or UDP (I'm guessing UDP as that is more suited to message oriented data exchange). At that point you should implement something like the UDPBasicApp with the addition that you create your own PacketType that contains the data you want to transmit (i.e. the coordinates of the node). Use that for starting.

Generally, the TicToc tutorial is just a basic example to show how the sending is done by the OMNeT++ kernel. Sending in INET requires additional works depending from what OSI layer you are try to send the data. On application layer for example, you have to open sockets (see the code) and use that for the sending. The rest of the INET codebase will deal with the complexity of embedding that information correctly in lower layer packets (UDP, IP, Ethernet)

Wandering Fool
  • 2,170
  • 3
  • 18
  • 48
Rudi
  • 6,418
  • 1
  • 16
  • 20
  • Thanks for the answer. It clears many things. Can you tell me what do you mean by "On application layer for example, you have to open sockets (see the code) and use that for the sending.". What code are you referring to? – Usama Aftab Jul 30 '15 at 23:07
  • No worries, i got it! Loads of thanks for this help. It will get me moving forward. – Usama Aftab Jul 30 '15 at 23:49