I am trying to send a packet from application layer at sender node directly to mac layer and then to a specific application at the receiver node.
*.S.numApps = 1
*.S.app[0].typename = "UdpSourceApp"
*.S.app[0].io.destAddress = "destination"
*.S.app[0].io.destPort = 1000
*.S.app[0].source.displayStringTextFormat = "sent %p pk (%l)"
*.S.app[0].source.packetLength = 1200B
*.S.app[0].source.productionInterval = truncnormal(100us,50us)
# destination application
*.R.numApps = 1
*.R.app[0].typename = "UdpSinkApp"
*.R.app[0].io.localPort = 1000
Error: handleMessage(): Unknown protocol: protocolId = 63, protocolName = udp, servicePrimitive = REQUEST, pathStartGate = NN.S.app[0].io.socketOut, pathEndGate = NN.S.sc.in[2] -- in module (inet::MessageDispatcher) NN.S.sc (id=12), during network initialization
Please give me an example of how I can send this packet to a specific application at the receiver node using only application/ mac and physical layers.
##################################
I also tried to use this, but the packet never arrived to the sink app. (please check the attached picture)
# source application
*.S.numApps = 1
*.S.app[0].typename = "EthernetSourceApp"
*.S.app[0].display-name = "source"
*.S.app[0].interfaceTable.displayAddresses = true
*.*.app[*].source.packetLength = 1B
*.*.app[*].source.productionInterval = 1ms
*.*.app[*].sink.consumptionInterval = 1ms
# destination application
*.R.numApps = 1
*.R.app[0].typename = "EthernetSinkApp"
*.R.app[0].display-name = "dest"


You are asking two questions in a single SO question... but: