Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DHT] All the packets below have a common structure that is not clear from the description. [...] #24

Open
iphydf opened this issue Sep 25, 2015 · 2 comments

Comments

@iphydf
Copy link

iphydf commented Sep 25, 2015

https://github.com/Tox-Docs/Text/blob/master/src_text/DHT.txt#L21

Comment on

Ping(Request and response):

found at column 1.

All the packets below have a common structure that is not clear from the description. Every DHT packet looks the same, but with a different payload. In the case of a ping packet, the payload is the ping id. Repeating the entire DHT packet structure hides this commonality.

@iphydf iphydf changed the title All the packets below have a common structure that [...] [DHT] All the packets below have a common structure that [...] Oct 12, 2015
@iphydf iphydf changed the title [DHT] All the packets below have a common structure that [...] [DHT] All the packets below have a common structure that is not clear from the description. [...] Oct 20, 2015
@irungentoo
Copy link
Contributor

Not sure what the best way to fix this is.

@iphydf
Copy link
Author

iphydf commented Oct 27, 2015

Instead of writing the same packet format several times, with only the payload different, write it once, give it a name, and then describe the possible payloads. You don't write the IP header and UDP header every time, either. It's defined once, and then you have: NodesResponse in DHT-packet in UDP packet in IP packet in Ethernet frame(s) (or similar).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants