问题
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.
回答1:
To be able to send broadcast packets in omnet, you need to do either of below:
- bind your udp socket to a network interface, or
- 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.
来源:https://stackoverflow.com/questions/45534833/how-to-send-a-broadcast-packet-in-application-layer-in-inet