aboutsummaryrefslogtreecommitdiff
path: root/data/mods/default/textures/stone.png
blob: cad0dbe2b428e955f6a345baccefba3c5428dfeb (plain)
ofshex dumpascii
0000 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 00 10 00 00 00 10 08 02 00 00 00 90 91 68 .PNG........IHDR...............h
0020 36 00 00 00 01 73 52 47 42 00 ae ce 1c e9 00 00 00 06 62 4b 47 44 00 ff 00 ff 00 ff a0 bd a7 93 6....sRGB.........bKGD..........
0040 00 00 00 09 70 48 59 73 00 00 0b 13 00 00 0b 13 01 00 9a 9c 18 00 00 00 07 74 49 4d 45 07 db 04 ....pHYs.................tIME...
0060 05 0a 15 35 1a e2 b7 5f 00 00 02 a6 49 44 41 54 28 cf 25 d1 4d 4f 82 60 00 c0 71 81 07 1f 41 40 ...5..._....IDAT(.%.MO.`..q...A@
0080 5e 84 12 32 26 75 c0 b2 2e 1e 3a d4 a5 b5 f5 c9 fa 06 7d 9f 2e cd 36 0f ad cd da 6c 15 59 2e 30 ^..2&u....:.......}...6....l.Y.0
00a0 35 63 05 3c 0f 10 2f 1d 3c ff f7 3f fd 88 cb cb 4b c7 71 14 45 11 45 91 61 98 5a ad f6 f1 f1 e1 5c.<../.<..?....K.q.E.E.a.Z.....
00c0 fb 7e 59 96 82 20 d0 34 8d 31 fe fa fa 4a 92 24 8e 63 51 14 a9 4e a7 b3 bf bf 8f 10 62 59 d6 75 .~Y....4.1...J.$.cQ..N......bY.u
00e0 dd c1 60 50 a9 54 58 96 25 49 72 32 99 fc fc fc b8 ae db ed 76 1d c7 d1 34 0d 42 48 f5 fb fd a2 ..`P.TX.%Ir2........v...4.BH....
0100 28 00 00 08 a1 28 8a 20 84 b6 6d 23 84 54 55 15 45 11 21 24 cb 32 c7 71 79 9e fb be df 6a b5 48 (....(....m#.TU.E.!$.2.qy....j.H
0120 96 65 a3 28 7a 7d 7d 8d e3 38 8a a2 46 a3 91 65 99 ae eb 9e e7 0d 06 03 9a a6 f3 3c a7 69 7a 67 .e.(z}}..8..F..e...........<.izg
0140 67 e7 e0 e0 e0 e9 e9 89 3a 3b 3b 23 08 42 d3 b4 75 b0 2c 8b 20 08 df f7 01 00 3c cf 27 49 52 ad g.......:;;#.B..u.,.......<.'IR.
0160 56 09 82 60 59 76 b1 58 34 1a 0d 32 4d 53 8e e3 74 5d df db db 83 10 16 45 01 21 c4 18 63 8c 79 V..`Yv.X4..2MS..t]......E.!..c.y
0180 9e 2f cb 92 e3 b8 28 8a 86 c3 61 92 24 3c cf 03 d3 34 21 84 69 9a aa aa ba 58 2c 5e 5e 5e 04 41 ./....(...a.$<...4!.i....X,^^^.A
01a0 10 04 21 cb b2 ef ef 6f c3 30 7c df 6f b7 db ab d5 6a 3e 9f 47 51 44 9d 9c 9c 08 82 70 75 75 95 ..!....o.0|.o....j>.GQD.....puu.
01c0 a6 e9 f1 f1 71 51 14 92 24 cd e7 f3 c9 64 62 59 d6 df df df 6c 36 23 08 62 7b 7b 7b 3a 9d 1a 86 ....qQ..$....dbY....l6#.b{{{:...
01e0 41 f5 7a 3d 41 10 34 4d eb 74 3a 00 80 66 b3 59 ab d5 14 45 b1 6d 9b e3 b8 24 49 9a cd e6 72 b9 A.z=A.4M.t:..f.Y...E.m...$I...r.
0200 ac 56 ab 6f 6f 6f b2 2c 13 17 17 17 6b 91 f7 f7 77 df f7 79 9e af d7 eb ba ae 33 0c c3 f3 fc e3 .V.ooo.,....k...w..y......3.....
0220 e3 a3 24 49 45 51 ac 67 86 61 80 61 18 9f 9f 9f 8e e3 1c 1d 1d 41 08 9f 9f 9f cb b2 94 65 39 cb ..$IEQ.g.a.a.........A.......e9.
0240 b2 fb fb 7b 82 20 74 5d 1f 8f c7 61 18 06 41 90 a6 29 c8 b2 4c 51 14 86 61 46 a3 d1 e9 e9 e9 9a ...{..t]...a..A..)..LQ..aF......
0260 2c 0c 43 00 c0 6a b5 8a e3 98 61 18 00 00 c6 38 4d 53 96 65 c9 20 08 82 20 40 08 ed ee ee 3e 3c ,.C..j....a....8MS.e.....@....><
0280 3c 94 65 a9 69 5a 18 86 6b 0a c3 30 3c cf 33 4d 93 a2 a8 f1 78 8c 31 a6 fa fd be e7 79 45 51 dc <.e.iZ..k..0<.3M....x.1.....yEQ.
02a0 de de 6e 6d 6d 75 bb 5d d7 75 1d c7 c1 18 b7 5a 2d cf f3 0e 0f 0f 97 cb 25 4d d3 e7 e7 e7 d3 e9 ..nmmu.].u.....Z-.......%M......
02c0 14 a8 aa 2a 49 12 49 92 1b 1b 1b 79 9e 57 2a 15 45 51 48 92 84 10 5e 5f 5f 9b a6 79 73 73 a3 28 ...*I.I....y.W*.EQH...^__..yss.(
02e0 ca e6 e6 e6 70 38 6c b7 db 54 b7 db 1d 8d 46 a2 28 f6 7a bd d9 6c 76 77 77 27 8a e2 ef ef 2f 42 ....p8l..T....F.(.z..lvww'..../B
0300 c8 b2 ac 24 49 6c db ae d7 eb 59 96 f1 3c 2f 08 c2 3f 42 b9 67 98 69 44 05 90 00 00 00 00 49 45 ...$Il....Y..</..?B.g.iD......IE
0320 4e 44 ae 42 60 82 ND.B`.
ref='#n190'>190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329
-- minetest.lua
-- Packet dissector for the UDP-based Minetest protocol
-- Copy this to $HOME/.wireshark/plugins/


--
-- Minetest-c55
-- Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License along
-- with this program; if not, write to the Free Software Foundation, Inc.,
-- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
--


-- Table of Contents:
--   Part 1: Client command dissectors (TOSERVER_*)
--   Part 2: Server command dissectors (TOCLIENT_*)
--   Part 3: Wrapper protocol subdissectors
--   Part 4: Wrapper protocol main dissector
--   Part 5: Utility functions




--------------------------------------------
-- Part 1                                 --
-- Client command dissectors (TOSERVER_*) --
--------------------------------------------

minetest_client_commands = {}
minetest_client_obsolete = {}

-- TOSERVER_INIT

do
	local f_ser_fmt = ProtoField.uint8("minetest.client.init_ser_version",
		"Maximum serialization format version", base.DEC)
	local f_player_name = ProtoField.stringz("minetest.client.init_player_name", "Player Name")
	local f_password = ProtoField.stringz("minetest.client.init_password", "Password")
	local f_version = ProtoField.uint16("minetest.client.init_version", "Version", base.DEC)

	minetest_client_commands[0x10] = {
		"INIT",                             -- Command name
		53,                                 -- Minimum message length including code
		{ f_ser_fmt,                        -- List of fields [optional]
		  f_player_name,
		  f_password,
		  f_version },
		function(buffer, pinfo, tree, t)    -- Dissector function [optional]
			t:add(f_ser_fmt, buffer(2,1))
			t:add(f_player_name, buffer(3,20))
			t:add(f_password, buffer(23,28))
			t:add(f_version, buffer(51,2))
		end
	}
end

-- TOSERVER_INIT2

minetest_client_commands[0x11] = { "INIT2", 2 }

-- TOSERVER_GETBLOCK (obsolete)

minetest_client_commands[0x20] = { "GETBLOCK", 2 }
minetest_client_obsolete[0x20] = true

-- TOSERVER_ADDNODE (obsolete)

minetest_client_commands[0x21] = { "ADDNODE", 2 }
minetest_client_obsolete[0x21] = true

-- TOSERVER_REMOVENODE (obsolete)

minetest_client_commands[0x22] = { "REMOVENODE", 2 }
minetest_client_obsolete[0x22] = true

-- TOSERVER_PLAYERPOS

do
	local f_x = ProtoField.int32("minetest.client.playerpos_x", "Position X", base.DEC)
	local f_y = ProtoField.int32("minetest.client.playerpos_y", "Position Y", base.DEC)
	local f_z = ProtoField.int32("minetest.client.playerpos_z", "Position Z", base.DEC)
	local f_speed_x = ProtoField.int32("minetest.client.playerpos_speed_x", "Speed X", base.DEC)
	local f_speed_y = ProtoField.int32("minetest.client.playerpos_speed_y", "Speed Y", base.DEC)
	local f_speed_z = ProtoField.int32("minetest.client.playerpos_speed_z", "Speed Z", base.DEC)
	local f_pitch = ProtoField.int32("minetest.client.playerpos_pitch", "Pitch", base.DEC)
	local f_yaw = ProtoField.int32("minetest.client.playerpos_yaw", "Yaw", base.DEC)

	minetest_client_commands[0x23] = {
		"PLAYERPOS", 34,
		{ f_x, f_y, f_z, f_speed_x, f_speed_y, f_speed_z, f_pitch, f_yaw },
		function(buffer, pinfo, tree, t)
			t:add(f_x, buffer(2,4))
			t:add(f_y, buffer(6,4))
			t:add(f_z, buffer(10,4))
			t:add(f_speed_x, buffer(14,4))
			t:add(f_speed_y, buffer(18,4))
			t:add(f_speed_z, buffer(22,4))
			t:add(f_pitch, buffer(26,4))
			t:add(f_yaw, buffer(30,4))
		end
	}
end

-- TOSERVER_GOTBLOCKS

do
	local f_count = ProtoField.uint8("minetest.client.gotblocks_count", "Count", base.DEC)
	local f_block = ProtoField.bytes("minetset.client.gotblocks_block", "Block", base.DEC)
	local f_x = ProtoField.int16("minetest.client.gotblocks_x", "Block position X", base.DEC)
	local f_y = ProtoField.int16("minetest.client.gotblocks_y", "Block position Y", base.DEC)
	local f_z = ProtoField.int16("minetest.client.gotblocks_z", "Block position Z", base.DEC)

	minetest_client_commands[0x24] = {
		"GOTBLOCKS", 3,
		{ f_count, f_block, f_x, f_y, f_z },
		function(buffer, pinfo, tree, t)
			t:add(f_count, buffer(2,1))
			local count = buffer(2,1):uint()
			if minetest_check_length(buffer, 3 + 6*count, t) then
				pinfo.cols.info:append(" * " .. count)
				local index
				for index = 0, count - 1 do
					local pos = 3 + 6*index
					local t2 = t:add(f_block, buffer(pos, 6))
					t2:set_text("Block, X: " .. buffer(pos, 2):int()
						.. ", Y: " .. buffer(pos + 2, 2):int()
						.. ", Z: " .. buffer(pos + 4, 2):int())
					t2:add(f_x, buffer(pos, 2))
					t2:add(f_y, buffer(pos + 2, 2))
					t2:add(f_z, buffer(pos + 4, 2))
				end
			end
		end
	}
end

-- TOSERVER_DELETEDBLOCKS
-- TODO: Test this

do
	local f_count = ProtoField.uint8("minetest.client.deletedblocks_count", "Count", base.DEC)
	local f_block = ProtoField.bytes("minetset.client.deletedblocks_block", "Block", base.DEC)
	local f_x = ProtoField.int16("minetest.client.deletedblocks_x", "Block position X", base.DEC)
	local f_y = ProtoField.int16("minetest.client.deletedblocks_y", "Block position Y", base.DEC)
	local f_z = ProtoField.int16("minetest.client.deletedblocks_z", "Block position Z", base.DEC)

	minetest_client_commands[0x25] = {
		"DELETEDBLOCKS", 3,
		{ f_count, f_block, f_x, f_y, f_z },
		function(buffer, pinfo, tree, t)
			t:add(f_count, buffer(2,1))
			local count = buffer(2,1):uint()
			if minetest_check_length(buffer, 3 + 6*count, t) then
				pinfo.cols.info:append(" * " .. count)
				local index
				for index = 0, count - 1 do
					local pos = 3 + 6*index
					local t2 = t:add(f_block, buffer(pos, 6))
					t2:set_text("Block, X: " .. buffer(pos, 2):int()
						.. ", Y: " .. buffer(pos + 2, 2):int()
						.. ", Z: " .. buffer(pos + 4, 2):int())
					t2:add(f_x, buffer(pos, 2))
					t2:add(f_y, buffer(pos + 2, 2))
					t2:add(f_z, buffer(pos + 4, 2))
				end
			end
		end