M_Gh
M_Gh

Reputation: 1142

How to Send a broadcast packet in application layer in INET

I use INET 3.6 in Omnet 5.1.1.

I have done this structure which has been mentioned in bellow link successfully.

https://stackoverflow.com/a/36647631/6640504

Then,I have made simple module in (inet --> application --> base) and added its NED file to node. But I could not send any packet to other nodes.

Would you please guide me how to send or receive broadcast packets in Application layer without using udpapp or tcpapp?

Thank you in advance.

Upvotes: 2

Views: 978

Answers (1)

Deep Thinking
Deep Thinking

Reputation: 1

To be able to send broadcast packets in omnet, you need to do either of below:

  1. bind your udp socket to a network interface, or
  2. in omnet.ini, set "**.forceBroadcast = true", which will ask omnet to send your broadcast packets to all available interfaces

otherwise, your broadcast packets will be dropped and a signal packetFromUpperDroppedSignal will be emitted.

Upvotes: 0

Related Questions