Page 1 of 1

Questions about packet format

PostPosted: Mon Feb 11, 2013 23:24
by rarkenin
In the below Wireshark packets, I can see the magic number(4f457403), peer ID(0001) , channel(00), Type(03), Seqnum(1826), but the 01 right before the payload puzzles me. Is it the number of fragments, or something else? It doesn't seem to be in the doc.

Also, another question. For Pointedthing, is abovesurface the node under the cursor,and undersurface the location where a node can be potentially placed, or vice-versa?

0000 4f 45 74 03 00 01 00 03 18 26 01 00 30 00 53 00 OEt......&..0.S.
0010 3c 00 30 00 67 00 62 00 5f 00 75 00 73 00 3e 00 <.0.g.b._.u.s.>.
0020 20 00 49 00 20 00 74 00 68 00 69 00 6e 00 6b 00 .I. .t.h.i.n.k.
0030 20 00 4f 00 6c 00 64 00 20 00 43 00 6f 00 64 00 .O.l.d. .C.o.d.
0040 65 00 72 00 20 00 69 00 73 00 20 00 75 00 73 00 e.r. .i.s. .u.s.
0050 69 00 6e 00 67 00 20 00 74 00 68 00 65 00 20 00 i.n.g. .t.h.e. .
0060 4c 00 65 00 76 00 65 00 6c 00 44 00 42 00 20 00 L.e.v.e.l.D.B. .
0070 6f 00 6e 00 20 00 68 00 69 00 73 00 20 00 73 00 o.n. .h.i.s. .s.
0080 65 00 72 00 76 00 65 00 72 00 20 00 61 00 6c 00 e.r.v.e.r. .a.l.
0090 72 00 65 00 61 00 64 00 79 00 2e 00 20 00 4d 00 r.e.a.d.y... .M.
00a0 61 00 6e 00 79 00 20 00 6f 00 66 00 20 00 68 00 a.n.y. .o.f. .h.
00b0 69 00 73 00 20 i.s.

PostPosted: Tue Feb 12, 2013 00:48
by doserj
The type (03) indicates a "reliable" packet. Reliable packets are just wrappers around other packets, so you have to also unpack the payload. So the 01 indicates the packet type of the wrapped packet, here, "original", which means no splitting, error checking, etc.

Edit: For your other question. undersurface is the node that is punched, abovesurface is where you would place a node

PostPosted: Tue Feb 12, 2013 00:59
by rarkenin
Ah, OK. So reliable can be wrapped around chunked? Or does chunked imply reliable? Does chunked act as a wrapper itself?

PostPosted: Fri Feb 15, 2013 08:07
by celeron55

PostPosted: Fri Feb 15, 2013 16:47
by lkjoel
celeron55 wrote:Just did this: http://dev.minetest.net/Network_Protocol

Epic, thanks!!

PostPosted: Sun Feb 17, 2013 00:39
by rarkenin
Awesome!