{"action":"created","issue":{"url":"https://api.github.com/repos/Tox-Docs/Text/issues/24","labels_url":"https://api.github.com/repos/Tox-Docs/Text/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/Tox-Docs/Text/issues/24/comments","events_url":"https://api.github.com/repos/Tox-Docs/Text/issues/24/events","html_url":"https://github.com/Tox-Docs/Text/issues/24","id":108372517,"number":24,"title":"[DHT] All the packets below have a common structure that is not clear from the description. [...]","user":{"login":"iphydf","id":10647936,"avatar_url":"https://avatars.githubusercontent.com/u/10647936?v=3","gravatar_id":"","url":"https://api.github.com/users/iphydf","html_url":"https://github.com/iphydf","followers_url":"https://api.github.com/users/iphydf/followers","following_url":"https://api.github.com/users/iphydf/following{/other_user}","gists_url":"https://api.github.com/users/iphydf/gists{/gist_id}","starred_url":"https://api.github.com/users/iphydf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iphydf/subscriptions","organizations_url":"https://api.github.com/users/iphydf/orgs","repos_url":"https://api.github.com/users/iphydf/repos","events_url":"https://api.github.com/users/iphydf/events{/privacy}","received_events_url":"https://api.github.com/users/iphydf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-25T17:29:48Z","updated_at":"2015-10-27T18:48:19Z","closed_at":null,"body":"https://github.com/Tox-Docs/Text/blob/master/src_text/DHT.txt#L21\n\nComment on\n```\nPing(Request and response):\n```\nfound at column 1.\n\nAll 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."},"comment":{"url":"https://api.github.com/repos/Tox-Docs/Text/issues/comments/151607443","html_url":"https://github.com/Tox-Docs/Text/issues/24#issuecomment-151607443","issue_url":"https://api.github.com/repos/Tox-Docs/Text/issues/24","id":151607443,"user":{"login":"iphydf","id":10647936,"avatar_url":"https://avatars.githubusercontent.com/u/10647936?v=3","gravatar_id":"","url":"https://api.github.com/users/iphydf","html_url":"https://github.com/iphydf","followers_url":"https://api.github.com/users/iphydf/followers","following_url":"https://api.github.com/users/iphydf/following{/other_user}","gists_url":"https://api.github.com/users/iphydf/gists{/gist_id}","starred_url":"https://api.github.com/users/iphydf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iphydf/subscriptions","organizations_url":"https://api.github.com/users/iphydf/orgs","repos_url":"https://api.github.com/users/iphydf/repos","events_url":"https://api.github.com/users/iphydf/events{/privacy}","received_events_url":"https://api.github.com/users/iphydf/received_events","type":"User","site_admin":false},"created_at":"2015-10-27T18:48:19Z","updated_at":"2015-10-27T18:48:19Z","body":"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)."}}