简体   繁体   中英

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM