31.05.2013 Views

progettazione e realizzazione in java di una rete peer to peer ...

progettazione e realizzazione in java di una rete peer to peer ...

progettazione e realizzazione in java di una rete peer to peer ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Documentazione del proget<strong>to</strong><br />

kadCommand the object <strong>to</strong> communicate with kad;<br />

kadUI User <strong>in</strong>terface called <strong>to</strong> complete kadCommand.<br />

A.1.4 Datagrams<br />

Here is a list of datagrams with a brief description.<br />

Header<br />

tripla<br />

P<strong>in</strong>g<br />

Byte Use Note<br />

0 KaD version the version of the datagram<br />

1,2 size the size of the whole datagram (max 64KB)<br />

3 type the nature of the datagram<br />

4,5,6,7 random byte<br />

P<strong>in</strong>g and P<strong>in</strong>g check<br />

S<strong>to</strong>re<br />

P<strong>in</strong>g reply<br />

0,1,2,3 IP the tripla’s IPv4<br />

4,5 port the tripla’s listen<strong>in</strong>g port<br />

6 + hash length ID the tripla’s ID<br />

Byte Use Note<br />

8,9 port the client’s listen<strong>in</strong>g port<br />

10 + hash length ID the ID’s client<br />

Byte Use Note<br />

8,9 port the client’s listen<strong>in</strong>g port<br />

10 + hash length ID the ID’s client<br />

Byte Use Note<br />

8,9 port the client’s listen<strong>in</strong>g port<br />

10 + hash length ID the ID’s client<br />

10 + hash length + hash length hash the resources’s hash<br />

10 + hash length + hash length + tripla length tripla the answered triplas<br />

46

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!