



















by Jose Solares on Jun.01, 2005, under english, Linux
As i didnt find any GNU/Linux Applications that could speak RDT and i had a need for a proyect at work, armed with ethereal and RDTT i did a reverse engineering of the packets captured, this is what i learned of RDT.
This Draft specifies a Server, see example code using this information here
When we start listening the RDT client sends us a 17 byte packet, albeit it has a distinct structure from other packets received, at no other time did i get a 17 byte packet in all the time i captured packets so i just send a response when i receive 17 bytes, in order to start receiving the data we want, we need to send back a response:
byte response[] = {2, 6, 1, 0, 7, 1, 0, 2, 1, 6, 0x81};
Just then do we start receiving the data:
We define a checksum-like number that the client expects to get back so it knows that we have indeed received the data :
( buffer[ 0 ] == -128 && msize > 5 )?buffer[ 3 ]:0; or ( buffer[ 0 ] == 0x80 && msize > 5 )?buffer[ 3 ]:0;
depending on the OS and data types you want to use
buffer is a char * where we store the data received with functions recv o read
msize is an int where recv/read return the quantity of data read
We send the above checksum when we get a `200d0a` at the end of a packet, using a char[]
{0x40, 0x05, 0x01, ++checksum, 0x81};
RDT has something similar to the ping on IRC, It periodically sends us a 1 byte packet with 0x50, expecting us to send a 1 byte packet with 0x51
I hope you find this information useful.
Use the form below to search the site:
Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!
All entries, chronologically...