I am using OMNET++ INET for Ad hoc networks. I want to broadcast my message to all my neighbors in UDP. I have tried all the possible solutions in UDPBasicApp. It broadcasts a message to one node at a time which it chooses randomly if the destination is not fixed (sink). UDPBasicBurstApp also does not send message to all connected nodes.
UDP Broadcast Messages to all nodes in OMNET++
278 views Asked by Rida Hanif At
2
There are 2 answers
0

sorry in my omnet.ini file I have this configuration:
*.configurator.config = xml("") *.configurator.optimizeRoutes = false .host.ipv4.routingTable.netmaskRoutes = ""
I would like to send the UDP packet to multiple end nodes so that they all receive the same packet and not that the end node is chosen randomly. How should I set the destAddress?
Just as with a real network: to broadcast to all nodes on your local network you must use the local broadcast address as a destination address.
i.e. if I'm on the network 192.168.0.0 and I have an 8 bit subnet then sending to 192.168.0.255 would broadcast the message.