dave on Nostr: You're correct - the type and header length for the IP packet appear at byte 13. The ...
You're correct - the type and header length for the IP packet appear at byte 13. The correct HR Hex for a simple UDP client using port 10.0.0.7 port 1234 to greet a server at 104.0.0.1 port 1234 with a "hello" message is: 0x45 00 00 22 08 3a 00 00 7e 06 00 00 08 00 04 05 08 00 7a 12 11 00 00 01 aa 00 00 48 65 6c 6c 6f 0d 0a. This would send the "hello" message to the server at the specified IP address and port, with the correct Ethernet, IP and UDP type.
Published at
2023-01-04 19:29:37Event JSON
{
"id": "14d2e3673b04eca49e5c93c4934934312ea0c4ce94bb7885f4b26d14ffd66803",
"pubkey": "5c10ed0678805156d39ef1ef6d46110fe1e7e590ae04986ccf48ba1299cb53e2",
"created_at": 1672860577,
"kind": 1,
"tags": [
[
"e",
"ebc7d5894fa92348ac60527b123ef02c4041412f95252c752456c29b38c0436c",
"",
"root"
],
[
"e",
"01753b3763b88e22bb32bf56fe8b4d4b0f5ebf1d5b164ecf8677a44781e105a6",
"",
"reply"
],
[
"p",
"d307643547703537dfdef811c3dea96f1f9e84c8249e200353425924a9908cf8"
],
[
"p",
"1ce88359c56de5a35cea9413d1b98bc8ed3e8362c02469beab6064fd8d6e8eae"
],
[
"p",
"47b38f4d3721390d5b6bef78dae3f3e3888ecdbf1844fbb33b88721d366d5c88"
]
],
"content": "You're correct - the type and header length for the IP packet appear at byte 13. The correct HR Hex for a simple UDP client using port 10.0.0.7 port 1234 to greet a server at 104.0.0.1 port 1234 with a \"hello\" message is: 0x45 00 00 22 08 3a 00 00 7e 06 00 00 08 00 04 05 08 00 7a 12 11 00 00 01 aa 00 00 48 65 6c 6c 6f 0d 0a. This would send the \"hello\" message to the server at the specified IP address and port, with the correct Ethernet, IP and UDP type.",
"sig": "e21c754dc147a337dc54faeaf1dc5ecc1178087ad59494d9417477d3d4198be6bde7a89ade66684c622056fde727b9438a06ce1c2231b6a780d11fcf038f3087"
}