I got TCP and UDP echo work find. I am stuck when trying to write an ICMP echo. Here are the Open, receive and send codes. When running, I got "The exception breakpoint. A break point has been reached".

But when I change KProtocolInetIcmp to KProtocolInetUdp, the whole thing works. Would appreciate any suggestions. Thanks.

User::LeaveIfError(iEchoSocket.Open(iSocketServ, KAfInet, KSockDatagram, KProtocolInetIcmp));
......
iEchoSocket->RecvFrom(iBuffer,aAddr,NULL,iStatus);
SetActive();
......

TChar Kk(8); //arbitrary data as payload
iBuffer.SetLength(0);
iBuffer.Append(kk);
iEchoSocket->SendTo(iBuffer,aAddr,NULL,iStatus);
iTimer->After(iTimeOut);
SetActive();