Error: sending ICMP error ICMP-error-#3-type13-code3

175 views
Skip to first unread message

rport...@gmail.com

unread,
May 16, 2013, 5:18:39 AM5/16/13
to omn...@googlegroups.com

Hi,

I 'm trying to generate an echo like in UDPEchoApp. In the initialize I did the following code:

    localPort = par("localPort");
    destPort = par("destPort");


    socket.setOutputGate(gate("udpOut"));
    socket.bind(localPort);
    setSocketOptions();

When I send a packet to a particular destination, everything works well and the packet is processed. But when packet is processed I am trying to send an acknowledgement packet to the sender by doing the below code:

        UDPDataIndication *ctrl;
        ctrl = check_and_cast<UDPDataIndication *> (msg->getControlInfo());

       socket.sendTo(createACKpkt(msg), (IPvXAddressResolver().resolve(rcheck, IPvXAddressResolver().ADDR_IPv4)), destPort);

Where destPort is 1234 and the IP address to send to is the correct IP address of the node that sent the packet. But when the packet reaches the node with this IP address I get the below error in the output:

No socket registered on port 24899
sending ICMP error ICMP-error-#3-type13-code3

And so the packet is deleted. I know that the error means that the destination is unreachable but I don't understand why the destination port is changing from 1234 to 24899?


Also I suspect the error might come from when receiving a packet and calling  UDPSocket::getReceivedPacketInfo(msg), the below output is seen
Received IVC Message: (PACKET)Created IVC Data Packet to Car[6] (12 bytes) 192.168.0.2:1234 --> 192.168.0.2:1234 TTL=31 ToS=0 on ifID=101

When in fact, the destination IP address was suppose to be of another node with IP 192.168.0.1 not 192.168.0.2

Why are these error happening, please? and how can I fix them?

Thanks in advance


bahareh shafaei

unread,
Jul 1, 2013, 1:29:19 AM7/1/13
to omn...@googlegroups.com
hello.how are you?can you solve this problem.I am facing to it too and I do not know what to do!!!!
if you solve it please help me thank you very very much.

Shaikha Al-Khuder

unread,
Dec 30, 2015, 12:19:47 PM12/30/15
to OMNeT++ Users
socket.bind(localPort);

This function is also used in UDPBasicApp and I still see " No socket registered on port ####" on EV.
Reply all
Reply to author
Forward
0 new messages