Socket Receive Question
| Fri, 2007-07-27 15:31 | |
|
Hello all, I am a Symbian C++ newbie so please bare with me. I'm trying to implement a simple traceroute application. I believe I am sending my ICMP echo request properly, but I'm a little bit confused on the response. I am receiving something in my TBuf8 receiveBuffer but I don't know how to manipulate the data. How do i print out the contents of the buffer? How do I read the headers in the response? Thanks, void Tracer::send_probe(TInetAddr host, TInt ttl) { |
|






Forum posts: 68
I haven't used RDebug before but my feeling is that it is expecting a 16bit buffer and you're supplying it with an 8 bit descriptor.
I'm no expert in icmp requests, and replies nut the reply probably isn't human readable, this might mean that a conversion from the 8bit descriptor to a 16 bit descriptor might not go well. I'm not sure about this, so anyone with a lo of descriptor knowledge might point out the truth. To get integers and the like from a descriptor you can get a pointer to the data it contains with TUint8 * bufferPtr = recvBuffer.Ptr(); then use it like you would any pointer.