-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathfactorio.lua
3156 lines (2541 loc) · 90.8 KB
/
factorio.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
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
-- SPDX-License-Identifier: GPL-2.0-or-later
-- Factorio Game Protocol Dissector
--
-- Reverse engineered from packet captures and factorio.pdb
-- by Hornwitser
-- Converts a table of key, value pairs into an array of values
function values(iterable)
local array = {}
for k, v in pairs(iterable) do
table.insert(array, v)
end
return array
end
dprint = function(...)
print(table.concat({"Lua:", ...}," "))
end
local default_settings = {
broadcast = 34196,
port = 34197,
}
-- Protocol fields
local pf = {}
-- Field extractors
local fe = {}
-- Expert info
local ef = {}
ef.too_short = ProtoExpert.new("fgp.too_short.expert", "Factorio Game Protocol packet too short", expert.group.MALFORMED, expert.severity.ERROR)
ef.unknown = ProtoExpert.new("fgp.unknown.expert", "Factorio Game Protocol unknown packet data", expert.group.UNDECODED, expert.severity.WARN)
ef.malformed = ProtoExpert.new("fgp.malformed.expert", "Factorio Game Protocol malformed data", expert.group.MALFORMED, expert.severity.ERROR)
ef.unnecessary = ProtoExpert.new("fgp.unnecessary.expert", "Factorio Game Protocol unnecessary encoding", expert.group.PROTOCOL, expert.severity.NOTE)
function decode_uint32v(pos, tvbuf)
local range = tvbuf:range(pos, 1)
local value = range:le_uint()
pos = pos + 1
if value == 0xff then
range = tvbuf:range(pos - 1, 5)
value = tvbuf:range(pos, 4):le_uint()
pos = pos + 4
end
return pos, range, value
end
function decode_uint16v(pos, tvbuf)
local range = tvbuf:range(pos, 1)
local value = range:le_uint()
pos = pos + 1
if value == 0xff then
range = tvbuf:range(pos - 1, 3)
value = tvbuf:range(pos, 2):le_uint()
pos = pos + 2
end
return pos, range, value
end
function decode_string(pos, tvbuf, tree, name, pf_name, show_value)
local start_pos = pos
local string_tree = tree:add(tvbuf:range(pos), name)
local length_range, length
pos, length_range, length = decode_uint32v(pos, tvbuf)
string_tree:add(pf[pf_name .. "_length"], length_range, length)
local data = tvbuf:range(pos, length):string()
if show_value or show_value == nil then
string_tree:append_text(": " .. data)
end
string_tree:add(pf[pf_name .. "_data"], tvbuf:range(pos, length))
pos = pos + length
string_tree.len = pos - start_pos
return pos, data
end
pf.localized_string_key_length = ProtoField.uint32("fgp.localized_string.key.length", "length", base.DEC, nil, 0)
pf.localized_string_key_data = ProtoField.string("fgp.localized_string.key.data", "data", base.ASCII)
local LocalizedStringMode = {
[0] = 'Empty',
[1] = 'Translation',
[2] = 'Literal',
[3] = 'LiteralTranslation',
}
pf.localized_string_mode = ProtoField.uint8("fpg.localized_string.mode", "mode", base.DEC, LocalizedStringMode, 0)
pf.localized_string_parameters_size = ProtoField.uint8("fgp.localized_string.parameters.size", "size", base.DEC, nil, 0)
function decode_localized_string(pos, tvbuf, tree, name)
local start_pos = pos
local string_tree = tree:add(tvbuf:range(pos), name)
pos = decode_string(pos, tvbuf, string_tree, "key", "localized_string_key")
string_tree:add(pf.localized_string_mode, tvbuf:range(pos, 1))
pos = pos + 1
local parameters_size = tvbuf:range(pos, 1):uint()
local parameters_start_pos = pos
local parameters_tree = string_tree:add(tvbuf:range(pos), "parameters")
parameters_tree:add(pf.localized_string_parameters_size, tvbuf:range(pos, 1))
pos = pos + 1
for _=1, parameters_size do
pos = decode_localized_string(pos, tvbuf, parameters_tree, tostring(_ - 1))
end
parameters_tree.len = pos - parameters_start_pos
string_tree.len = pos - start_pos
return pos
end
local NetworkMessageType = {
[0] = 'Ping',
[1] = 'PingReply',
[2] = 'ConnectionRequest',
[3] = 'ConnectionRequestReply',
[4] = 'ConnectionRequestReplyConfirm',
[5] = 'ConnectionAcceptOrDeny',
[6] = 'ClientToServerHeartbeat',
[7] = 'ServerToClientHeartbeat',
[8] = 'GetOwnAddress',
[9] = 'GetOwnAddressReply',
[10] = 'NatPunchRequest',
[11] = 'NatPunch',
[12] = 'TransferBlockRequest',
[13] = 'TransferBlock',
[14] = 'RequestForHeartbeatWhenDisconnecting',
[15] = 'LANBroadcast',
[16] = 'GameInformationRequest',
[17] = 'GameInformationRequestReply',
[18] = 'Empty',
}
local NetworkMessageTypeEnum = {}
for value, name in pairs(NetworkMessageType) do
NetworkMessageTypeEnum[name] = value
end
-- For some weird reason connection requests include the
-- message id even though they don't have the fragmented flag set
always_has_message_id_types = {
[NetworkMessageTypeEnum.ConnectionRequest] = true,
[NetworkMessageTypeEnum.ConnectionRequestReplyConfirm] = true,
}
pf.flags = ProtoField.uint8("fgp.header.flags", "Flags", base.HEX, nil, 0, "NetworkHeader flags")
pf.message_type = ProtoField.uint8("fgp.header.type", "type", base.DEC, NetworkMessageType, 0x1f, "NetworkMessageType")
pf.random_flag = ProtoField.bool("fgp.header.random", "random", 8, nil, 0x20, "Checksum pertubation flag")
pf.fragmented = ProtoField.bool("fgp.header.fragmented", "fragmented", 8, nil, 0x40)
pf.last_frag = ProtoField.bool("fgp.header.last_fragment", "lastFragment", 8, nil, 0x80)
pf.payload = ProtoField.bytes("fgp.header.payload", "Payload", base.SPACE, "Message Data")
fe.message_type = "fgp.header.type"
fe.fragmented = "fgp.header.fragmented"
fe.last_frag = "fgp.header.last_fragment"
pf.message_id = ProtoField.uint16("fgp.header.message_id", "Message ID",base.DEC, nil, 0x7fff, "Message ID fragment belongs to")
pf.confirm = ProtoField.bool("fgp.header.confirm", "confirm", 16, nil, 0x8000, "Contains Message ID confirmations")
pf.frag_number = ProtoField.uint8("fgp.header.fragment_number", "fragmentNumber", base.DEC, nil, 0, "Fragment sequence number")
pf.frag_data = ProtoField.bytes("fgp.frag.data", "Fragment data", base.SPACE, "Fragment content")
fe.confirm = "fgp.header.confirm"
fe.message_id = "fgp.header.message_id"
fe.frag_number = "fgp.header.fragment_number"
pf.confirm_count = ProtoField.uint8("fgp.header.confirm_count", "Confirm count", base.DEC, nil, 0)
pf.confirm_item = ProtoField.bytes("fgp.header.confirm_item", "Confirm Data", base.SPACE)
function dissect_network_message_header(pos, tvbuf, pktinfo, tree)
local start_pos = pos
local pktlen = tvbuf:reported_length_remaining()
local header_tree = tree:add(tvbuf:range(pos, pktlen - pos), "NetworkMessageHeader")
if pktlen < 1 then
pktinfo.cols.info:set("[Malformed] Empty")
header_tree:add_proto_expert_info(ef.too_short)
return
end
local flagrange = tvbuf:range(pos, 1)
pos = pos + 1
local flag_tree = header_tree:add(pf.flags, flagrange)
flag_tree:add(pf.message_type, flagrange)
flag_tree:add(pf.random_flag, flagrange)
flag_tree:add(pf.fragmented, flagrange)
flag_tree:add(pf.last_frag, flagrange)
pktinfo.cols.info:set(NetworkMessageType[fe.message_type()()] or "Unknown")
local msg_type = fe.message_type()()
local fragmented = fe.fragmented()()
if fragmented or always_has_message_id_types[msg_type] then
if pktlen < 4 then
pktinfo.cols.info:append("[Too short] ")
header_tree:add_proto_expert_info(
ef.too_short, "Packet too short for fragment header"
)
return nil
end
header_tree:add_le(pf.message_id, tvbuf:range(pos, 2))
header_tree:add_le(pf.confirm, tvbuf:range(pos, 2))
pos = pos + 2
if fragmented then
header_tree:add(pf.frag_number, tvbuf:range(pos, 1))
pos = pos + 1
end
if fe.confirm()() then
header_tree:add(pf.confirm_count, tvbuf:range(pos, 1))
local count = tvbuf:range(pos, 1):uint()
pos = pos + 1
for _=1, count do
header_tree:add(pf.confirm_item, tvbuf:range(pos, 4))
pos = pos + 4
end
end
-- last frag set while fragment is unset
elseif fe.last_frag()() then
pktinfo.cols.info:prepend("[Unknown]")
header_tree:add_proto_expert_info(
ef.unknown, "Last Fragment flag set without Fragment flag"
)
return nil
end
header_tree.len = pos - start_pos
header_tree:add(pf.payload, tvbuf:range(pos)):set_text("Payload (" .. pktlen - pos .. " bytes)")
return pos
end
function dissect_network_message(pos, tvbuf, pktinfo, tree)
local msg_type = fe.message_type()()
local msg_tree = tree:add(tvbuf:range(pos), NetworkMessageType[msg_type] or "Unknown")
if msg_type == NetworkMessageTypeEnum.Ping then
pos = dissect_ping(pos, tvbuf, pktinfo, msg_tree)
elseif msg_type == NetworkMessageTypeEnum.PingReply then
pos = dissect_ping(pos, tvbuf, pktinfo, msg_tree)
elseif msg_type == NetworkMessageTypeEnum.ConnectionRequest then
pos = dissect_connection_request(pos, tvbuf, pktinfo, msg_tree)
elseif msg_type == NetworkMessageTypeEnum.ConnectionRequestReply then
pos = dissect_connection_request_reply(pos, tvbuf, pktinfo, msg_tree)
elseif msg_type == NetworkMessageTypeEnum.ConnectionRequestReplyConfirm then
pos = dissect_connection_request_reply_confirm(pos, tvbuf, pktinfo, msg_tree)
elseif msg_type == NetworkMessageTypeEnum.ConnectionAcceptOrDeny then
pos = dissect_connection_accept_or_deny(pos, tvbuf, pktinfo, msg_tree)
elseif msg_type == NetworkMessageTypeEnum.ClientToServerHeartbeat then
pos = dissect_heartbeat(pos, tvbuf, pktinfo, msg_tree, false)
elseif msg_type == NetworkMessageTypeEnum.ServerToClientHeartbeat then
pos = dissect_heartbeat(pos, tvbuf, pktinfo, msg_tree, true)
elseif msg_type == NetworkMessageTypeEnum.GetOwnAddress then
pos = dissect_get_own_address(pos, tvbuf, pktinfo, msg_tree)
elseif msg_type == NetworkMessageTypeEnum.GetOwnAddressReply then
pos = dissect_get_own_address_reply(pos, tvbuf, pktinfo, msg_tree)
elseif msg_type == NetworkMessageTypeEnum.NatPunchRequest then
pos = dissect_nat_punch_request(pos, tvbuf, pktinfo, msg_tree)
elseif msg_type == NetworkMessageTypeEnum.NatPunch then
-- These look like they are always empty
elseif msg_type == NetworkMessageTypeEnum.TransferBlockRequest then
pos = dissect_transfer_block_request(pos, tvbuf, pktinfo, msg_tree)
elseif msg_type == NetworkMessageTypeEnum.TransferBlock then
pos = dissect_transfer_block(pos, tvbuf, pktinfo, msg_tree)
elseif msg_type == NetworkMessageTypeEnum.RequestForHeartbeatWhenDisconnecting then
pos = dissect_heartbeat_request(pos, tvbuf, pktinfo, msg_tree)
elseif msg_type == NetworkMessageTypeEnum.LANBroadcast then
pos = dissect_lan_broadcast(pos, tvbuf, pktinfo, msg_tree)
end
-- GameInformationRequest -- Empty
-- GameInformationRequestReply -- Likely the contents of ServerGameData
-- Empty
if pos ~= tvbuf:len() then
local item = msg_tree:add(pf.unknown, tvbuf:range(pos, tvbuf:len() - pos))
item:add_proto_expert_info(ef.unknown, "Undecoded data")
pktinfo.cols.info:prepend("[Undecoded Data] ")
end
end
pf.ping_number = ProtoField.uint16("fgp.ping.number", "number", base.DEC, nil, 0)
function dissect_ping(pos, tvbuf, pktinfo, tree)
local number = tvbuf:range(pos, 2):le_uint()
tree:add_le(pf.ping_number, tvbuf:range(pos, 2))
pos = pos + 2
pktinfo.cols.info:append(" Nr=" .. number)
return pos
end
pf.connection_request_major_ver = ProtoField.uint8("fgp.connection_request.version.major", "major", base.DEC, nil, 0)
pf.connection_request_minor_ver = ProtoField.uint8("fgp.connection_request.version.minor", "minor", base.DEC, nil, 0)
pf.connection_request_patch_ver = ProtoField.uint8("fgp.connection_request.version.patch", "patch", base.DEC, nil, 0)
pf.connection_request_build_ver = ProtoField.uint16("fgp.connection_request.version.build", "build", base.DEC, nil, 0)
pf.connection_request_client_id = ProtoField.uint32(
"fgp.connection_request.connection_request_id_generated_on_client", "connectionRequestIDGeneratedOnClient", base.HEX, nil, 0
)
function dissect_connection_request(pos, tvbuf, pktinfo, tree)
local version =
tvbuf:range(pos, 1):uint() .. "." ..
tvbuf:range(pos + 1, 1):uint() .. "." ..
tvbuf:range(pos + 2, 1):uint() ..
" (build " .. tvbuf:range(pos + 3, 2):le_uint() .. ")"
local ver_tree = tree:add(tvbuf:range(pos, 5), "clientApplicationVersion: " .. version)
ver_tree:add(pf.connection_request_major_ver, tvbuf:range(pos, 1))
pos = pos + 1
ver_tree:add(pf.connection_request_minor_ver, tvbuf:range(pos, 1))
pos = pos + 1
ver_tree:add(pf.connection_request_patch_ver, tvbuf:range(pos, 1))
pos = pos + 1
ver_tree:add_le(pf.connection_request_build_ver, tvbuf:range(pos, 2))
pos = pos + 2
pktinfo.cols.info:append(" Ver=" .. version .. " CID=" .. tvbuf:range(pos, 4):le_uint())
tree:add_le(pf.connection_request_client_id, tvbuf:range(pos, 4))
pos = pos + 4
return pos
end
pf.connection_reply_major_ver = ProtoField.uint8("fgp.connection_request_reply.version.major", "major", base.DEC, nil, 0)
pf.connection_reply_minor_ver = ProtoField.uint8("fgp.connection_request_reply.version.minor", "minor", base.DEC, nil, 0)
pf.connection_reply_patch_ver = ProtoField.uint8("fgp.connection_request_reply.version.patch", "patch", base.DEC, nil, 0)
pf.connection_reply_build_ver = ProtoField.uint16("fgp.connection_request_reply.version.build", "build", base.DEC, nil, 0)
pf.connection_reply_client_id = ProtoField.uint32(
"fgp.connection_request_reply.connection_request_id_generated_on_client", "connectionRequestIDGeneratedOnClient", base.HEX, nil, 0
)
pf.connection_reply_server_id = ProtoField.uint32(
"fgp.connection_request_reply.connection_request_id_generated_on_server", "connectionRequestIDGeneratedOnServer", base.HEX, nil, 0
)
function dissect_connection_request_reply(pos, tvbuf, pktinfo, tree)
local version =
tvbuf:range(pos, 1):uint() .. "." ..
tvbuf:range(pos + 1, 1):uint() .. "." ..
tvbuf:range(pos + 2, 1):uint() ..
" (build " .. tvbuf:range(pos + 3, 2):le_uint() .. ")"
local ver_tree = tree:add(tvbuf:range(pos, 5), "serverApplicationVersion: " .. version)
ver_tree:add(pf.connection_reply_major_ver, tvbuf:range(pos, 1))
pos = pos + 1
ver_tree:add(pf.connection_reply_minor_ver, tvbuf:range(pos, 1))
pos = pos + 1
ver_tree:add(pf.connection_reply_patch_ver, tvbuf:range(pos, 1))
pos = pos + 1
ver_tree:add_le(pf.connection_reply_build_ver, tvbuf:range(pos, 2))
pos = pos + 2
pktinfo.cols.info:append(" Ver=" .. version .. " CID=" .. tvbuf:range(pos, 4):le_uint() .. " SID=" .. tvbuf:range(pos + 4, 4):le_uint())
tree:add_le(pf.connection_reply_client_id, tvbuf:range(pos, 4))
pos = pos + 4
tree:add_le(pf.connection_reply_server_id, tvbuf:range(pos, 4))
pos = pos + 4
return pos
end
-- ModID
pf.mod_id_name_length = ProtoField.uint32("fgp.mod_id.name.length", "length", base.DEC, nil, 0)
pf.mod_id_name_data = ProtoField.string("fgp.mod_id.name.data", "data", base.ASCII)
pf.mod_id_version_major = ProtoField.uint16("fgp.mod_id.version.major_version", "majorVersion", base.DEC, nil, 0)
pf.mod_id_version_minor = ProtoField.uint16("fgp.mod_id.version.minor_version", "minorVersion", base.DEC, nil, 0)
pf.mod_id_version_sub = ProtoField.uint16("fgp.mod_id.version.sub_version", "subVersion", base.DEC, nil, 0)
pf.mod_id_crc = ProtoField.uint32("fgp.mod_id.crc", "crc", base.DEC, nil, 0)
function dissect_mod_id(pos, tvbuf, pktinfo, tree)
local start_pos = pos
local mod_tree = tree:add(tvbuf:range(pos), "ModID")
local name
pos, name = decode_string(pos, tvbuf, mod_tree, "name", "mod_id_name")
local ver_tree = mod_tree:add(tvbuf:range(pos), "version")
local major_range, major_ver
pos, major_range, major_ver = decode_uint16v(pos, tvbuf)
ver_tree:add(pf.mod_id_version_major, major_range, major_ver)
local minor_range, minor_ver
pos, minor_range, minor_ver = decode_uint16v(pos, tvbuf)
ver_tree:add(pf.mod_id_version_minor, minor_range, minor_ver)
local sub_range, sub_ver
pos, sub_range, sub_ver = decode_uint16v(pos, tvbuf)
ver_tree:add(pf.mod_id_version_sub, sub_range, sub_ver)
local version = major_ver .. "." .. minor_ver .. "." .. sub_ver
ver_tree:append_text(": " .. version)
mod_tree:add_le(pf.mod_id_crc, tvbuf:range(pos, 4))
pos = pos + 4
mod_tree.len = pos - start_pos
mod_tree:append_text(": " .. name .. " " .. version)
return pos
end
pf.connection_confirm_client_id = ProtoField.uint32(
"fgp.connection_request_reply_confirm.connection_request_id_generated_on_client", "connectionRequestIDGeneratedOnClient", base.HEX, nil, 0
)
pf.connection_confirm_server_id = ProtoField.uint32(
"fgp.connection_request_reply_confirm.connection_request_id_generated_on_server", "connectionRequestIDGeneratedOnServer", base.HEX, nil, 0
)
pf.connection_confirm_instance_id = ProtoField.uint32("fgp.connection_request_reply_confirm.instance_id", "instanceID", base.DEC, nil, 0)
pf.connection_confirm_username_length = ProtoField.uint32("fgp.connection_request_reply_confirm.username.length", "length", base.DEC, nil, 0)
pf.connection_confirm_username_data = ProtoField.string("fgp.connection_request_reply_confirm.username.data", "data", base.ASCII)
pf.connection_confirm_password_hash_length = ProtoField.uint32("fgp.connection_request_reply_confirm.password_hash.length", "length", base.DEC, nil, 0)
pf.connection_confirm_password_hash_data = ProtoField.string("fgp.connection_request_reply_confirm.password_hash.data", "data", base.ASCII)
pf.connection_confirm_server_key_length = ProtoField.uint32("fgp.connection_request_reply_confirm.server_key.length", "length", base.DEC, nil, 0)
pf.connection_confirm_server_key_data = ProtoField.string("fgp.connection_request_reply_confirm.server_key.data", "data", base.ASCII)
pf.connection_confirm_server_key_time_length = ProtoField.uint32("fgp.connection_request_reply_confirm.server_key_timestamp.length", "length", base.DEC, nil, 0)
pf.connection_confirm_server_key_time_data = ProtoField.string("fgp.connection_request_reply_confirm.server_key_timestamp.data", "data", base.ASCII)
pf.connection_confirm_core_checksum = ProtoField.uint32("fgp.connection_request_reply_confirm.core_checksum", "coreChecksum", base.DEC, nil, 0)
pf.connection_confirm_prototype_list_checksum = ProtoField.uint32("fgp.connection_request_reply_confirm.prototype_list_checksum", "prototypeListChecksum", base.DEC, nil, 0)
pf.connection_confirm_active_mods_size = ProtoField.uint32("fgp.connection_request_reply_confirm.active_mods.size", "size", base.DEC, nil, 0)
function dissect_connection_request_reply_confirm(pos, tvbuf, pktinf, tree)
tree:add_le(pf.connection_confirm_client_id, tvbuf:range(pos, 4))
pos = pos + 4
tree:add_le(pf.connection_confirm_server_id, tvbuf:range(pos, 4))
pos = pos + 4
tree:add_le(pf.connection_confirm_instance_id, tvbuf:range(pos, 4))
pos = pos + 4
pos = decode_string(pos, tvbuf, tree, "username", "connection_confirm_username")
pos = decode_string(pos, tvbuf, tree, "passwordHash", "connection_confirm_password_hash")
pos = decode_string(pos, tvbuf, tree, "serverKey", "connection_confirm_server_key")
pos = decode_string(pos, tvbuf, tree, "serverKeyTimestamp", "connection_confirm_server_key_time")
tree:add_le(pf.connection_confirm_core_checksum, tvbuf:range(pos, 4))
pos = pos + 4
tree:add_le(pf.connection_confirm_prototype_list_checksum, tvbuf:range(pos, 4))
pos = pos + 4
local mods_size = tvbuf:range(pos, 1):uint()
local mods_start_pos = pos
local mods_tree = tree:add(tvbuf:range(pos), "activeMods")
mods_tree:add(pf.connection_confirm_active_mods_size, tvbuf:range(pos, 1))
pos = pos + 1
for _=1, mods_size do
pos = dissect_mod_id(pos, tvbuf, pktinfo, mods_tree)
end
mods_tree.len = pos - mods_start_pos
-- TODO: startupModSettings
return pos
end
-- ClientsPeerInfo
pf.clients_info_username_length = ProtoField.uint32("fgp.clients_peer_info.server_username.length", "length", base.DEC, nil, 0)
pf.clients_info_username_data = ProtoField.string("fgp.clients_peer_info.server_username.data", "data", base.ASCII)
pf.clients_info_map_saving_progress = ProtoField.uint8("fpg.clients_peer_info.map_saving_progress", "mapSavingProgress", base.DEC, nil, 0)
pf.clients_info_saving_for_size = ProtoField.uint8("fpg.clients_peer_info.saving_for.size", "size", base.DEC, nil, 0)
pf.clients_info_saving_for_item = ProtoField.uint16("fgp.clients_peer_info.saving_for.item", "item", base.DEC, nil, 0)
pf.clients_info_client_size = ProtoField.uint32("fpg.clients_peer_info.client_peer_info.size", "size", base.DEC, nil, 0)
pf.clients_info_client_first = ProtoField.uint16("fgp.clients_peer_info.client_peer_info.first", "first", base.DEC, nil, 0)
pf.clients_info_client_username_length = ProtoField.uint32("fgp.clients_peer_info.client_peer_info.username.length", "length", base.DEC, nil, 0)
pf.clients_info_client_username_data = ProtoField.string("fgp.clients_peer_info.client_peer_info.username.data", "data", base.ASCII)
pf.clients_info_client_flags = ProtoField.uint8("fgp.clients_peer_info.client_peer_info.flags", "flags", base.HEX, nil, 0)
pf.clients_info_client_bit0_flag = ProtoField.bool("fgp.clients_peer_info.client_peer_info.bit0_flag", "bit0", 8, nil, 0x01)
pf.clients_info_client_bit1_flag = ProtoField.bool("fgp.clients_peer_info.client_peer_info.bit1_flag", "bit1", 8, nil, 0x02)
pf.clients_info_client_bit2_flag = ProtoField.bool("fgp.clients_peer_info.client_peer_info.bit2_flag", "bit2", 8, nil, 0x04)
pf.clients_info_client_bit3_flag = ProtoField.bool("fgp.clients_peer_info.client_peer_info.bit3_flag", "bit3", 8, nil, 0x08)
pf.clients_info_client_bit4_flag = ProtoField.bool("fgp.clients_peer_info.client_peer_info.bit4_flag", "bit4", 8, nil, 0x10)
pf.clients_info_client_bit5_flag = ProtoField.bool("fgp.clients_peer_info.client_peer_info.bit5_flag", "bit5", 8, nil, 0x20)
pf.clients_info_client_bit6_flag = ProtoField.bool("fgp.clients_peer_info.client_peer_info.bit6_flag", "bit6", 8, nil, 0x40)
pf.clients_info_client_bit7_flag = ProtoField.bool("fgp.clients_peer_info.client_peer_info.bit7_flag", "bit7", 8, nil, 0x80)
-- These are the likely meanings of the flags
-- NON_DEFAULT_DROPPING_PROGRESS_VALUE -> droppingProgress
-- NON_DEFAULT_MAP_SAVING_PROGRESS_VALUE -> mapSavingProgress
-- NON_DEFAULT_MAP_DOWNLOADING_PROGRESS_VALUE -> mapDownloadingProgress
-- NON_DEFAULT_MAP_LOADING_PROGRESS_VALUE -> mapLoadingProgress
-- NON_DEFAULT_CATCHUP_PROGRESS_VALUE -> tryingToCatchUpProgress
pf.clients_info_client_progress = ProtoField.uint8("fpg.clients_peer_info.client_peer_info.progress_value", "progress", base.DEC, nil, 0)
function dissect_clients_peer_info(pos, tvbuf, pktinfo, tree)
pos = decode_string(pos, tvbuf, tree, "serverUsername", "clients_info_username")
tree:add(pf.clients_info_map_saving_progress, tvbuf:range(pos, 1))
pos = pos + 1
local saving_start_pos = pos
local saving_size = tvbuf:range(pos, 1):uint()
local saving_tree = tree:add(tvbuf:range(pos), "savingFor")
saving_tree:add(pf.clients_info_saving_for_size, tvbuf:range(pos, 1))
pos = pos + 1
for _=1, saving_size do
local item_range, item_value
pos, item_range, item_value = decode_uint16v(pos, tvbuf)
saving_tree:add(pf.clients_info_saving_for_item, item_range, item_value)
end
saving_tree.len = pos - saving_start_pos
local client_start_pos = pos
local client_tree = tree:add(tvbuf:range(pos), "clientPeerInfo")
local client_size_range, client_size
pos, client_size_range, client_size = decode_uint32v(pos, tvbuf)
client_tree:add(pf.clients_info_client_size, client_size_range, client_size)
for _=1, client_size do
local entry_start_pos = pos
local first_range, first_value
pos, first_range, first_value = decode_uint16v(pos, tvbuf)
local entry_tree = client_tree:add(tvbuf:range(pos), "entry: " .. first_value)
entry_tree:add(pf.clients_info_client_first, first_range, first_value)
pos = decode_string(pos, tvbuf, entry_tree, "username", "clients_info_client_username")
local flags_range = tvbuf:range(pos, 1)
local client_flags_tree = entry_tree:add(pf.clients_info_client_flags, flags_range)
pos = pos + 1
client_flags_tree:add(pf.clients_info_client_bit0_flag, flags_range)
client_flags_tree:add(pf.clients_info_client_bit1_flag, flags_range)
client_flags_tree:add(pf.clients_info_client_bit2_flag, flags_range)
client_flags_tree:add(pf.clients_info_client_bit3_flag, flags_range)
client_flags_tree:add(pf.clients_info_client_bit4_flag, flags_range)
client_flags_tree:add(pf.clients_info_client_bit5_flag, flags_range)
client_flags_tree:add(pf.clients_info_client_bit6_flag, flags_range)
client_flags_tree:add(pf.clients_info_client_bit7_flag, flags_range)
local flags_value = flags_range:uint()
if bit32.band(flags_value, 0x01) ~= 0 then
entry_tree:add(pf.clients_info_client_progress, tvbuf:range(pos, 1))
pos = pos + 1
end
if bit32.band(flags_value, 0x02) ~= 0 then
entry_tree:add(pf.clients_info_client_progress, tvbuf:range(pos, 1))
pos = pos + 1
end
if bit32.band(flags_value, 0x04) ~= 0 then
entry_tree:add(pf.clients_info_client_progress, tvbuf:range(pos, 1))
pos = pos + 1
end
if bit32.band(flags_value, 0x08) ~= 0 then
entry_tree:add(pf.clients_info_client_progress, tvbuf:range(pos, 1))
pos = pos + 1
end
if bit32.band(flags_value, 0x10) ~= 0 then
entry_tree:add(pf.clients_info_client_progress, tvbuf:range(pos, 1))
pos = pos + 1
end
entry_tree.len = pos - entry_start_pos
end
client_tree.len = pos - client_start_pos
return pos
end
local ConnectionRequestStatus = {
[0] = 'Valid',
[1] = 'ModsMismatch',
[2] = 'CoreModMismatch',
[3] = 'ModStartupSettingMismatch',
[4] = 'PrototypeChecksumMismatch',
[5] = 'PlayerLimitReached',
[6] = 'PasswordMissing',
[7] = 'PasswordMismatch',
[8] = 'UserVerificationMissing',
[9] = 'UserVerificationTimeout',
[10] = 'UserVerificationMismatch',
[11] = 'UserBanned',
[12] = 'AddressUsedForDifferentPlayer',
[13] = 'UserWithThatNameAlreadyInGame',
[14] = 'UserNotWhitelisted',
}
pf.connection_accept_client_id = ProtoField.uint32(
"fgp.connection_accept_or_deny.connection_request_id_generated_on_client", "connectionRequestIDGeneratedOnClient", base.HEX, nil, 0
)
pf.connection_accept_status = ProtoField.uint8("fpg.connection_accept_or_deny.status", "status", base.DEC, ConnectionRequestStatus, 0)
pf.connection_accept_game_name_length = ProtoField.uint32("fgp.connection_accept_or_deny.game_name.length", "length", base.DEC, nil, 0)
pf.connection_accept_game_name_data = ProtoField.string("fgp.connection_accept_or_deny.game_name.data", "data", base.ASCII)
pf.connection_accept_server_hash_length = ProtoField.uint32("fgp.connection_accept_or_deny.server_hash.length", "length", base.DEC, nil, 0)
pf.connection_accept_server_hash_data = ProtoField.string("fgp.connection_accept_or_deny.server_hash.data", "data", base.ASCII)
pf.connection_accept_description_length = ProtoField.uint32("fgp.connection_accept_or_deny.description.length", "length", base.DEC, nil, 0)
pf.connection_accept_description_data = ProtoField.string("fgp.connection_accept_or_deny.description.data", "data", base.ASCII)
pf.connection_accept_latency = ProtoField.uint8("fpg.connection_accept_or_deny.latency", "latency", base.DEC, nil, 0)
pf.connection_accept_max_updates = ProtoField.uint32("fgp.connection_accept_or_deny.max_updates_per_second", "maxUpdatesPerSecond", base.DEC, nil, 0)
pf.connection_accept_game_id = ProtoField.uint32("fpg.connection_accept_or_deny.game_id", "gameID", base.DEC, nil, 0)
pf.connection_accept_steam_id = ProtoField.uint64("fpg.connection_accept_or_deny.steam_id", "steamID", base.DEC, nil, 0)
pf.connection_accept_expect_seq = ProtoField.uint32("fgp.connection_accept_or_deny.first_sequence_number_to_expect", "firstSequenceNumberToExpect", base.DEC, nil, 0)
pf.connection_accept_send_seq = ProtoField.uint32("fgp.connection_accept_or_deny.first_sequence_number_to_send", "firstSequenceNumberToSend", base.DEC, nil, 0)
pf.connection_accept_new_peer_id = ProtoField.uint16("fgp.connection_accept_or_deny.new_peer_id", "newPeerID", base.DEC, nil, 0)
pf.connection_accept_active_mods_size = ProtoField.uint32("fgp.connection_accept_or_deny.active_mods.size", "size", base.DEC, nil, 0)
function dissect_connection_accept_or_deny(pos, tvbuf, pktinf, tree)
tree:add_le(pf.connection_accept_client_id, tvbuf:range(pos, 4))
pos = pos + 4
tree:add(pf.connection_accept_status, tvbuf:range(pos, 1))
pos = pos + 1
pos = decode_string(pos, tvbuf, tree, "gameName", "connection_accept_game_name")
pos = decode_string(pos, tvbuf, tree, "serverHash", "connection_accept_server_hash")
pos = decode_string(pos, tvbuf, tree, "description", "connection_accept_description")
tree:add(pf.connection_accept_latency, tvbuf:range(pos, 1))
pos = pos + 1
local max_updates_range, max_updates
pos, max_updates_range, max_updates = decode_uint32v(pos, tvbuf)
tree:add(pf.connection_accept_max_updates, max_updates_range, max_updates)
tree:add_le(pf.connection_accept_game_id, tvbuf:range(pos, 4))
pos = pos + 4
tree:add_le(pf.connection_accept_steam_id, tvbuf:range(pos, 8))
pos = pos + 8
local peer_start = pos
local peer_tree = tree:add(tvbuf:range(pos), "clientsPeerInfo")
pos = dissect_clients_peer_info(pos, tvbuf, pktinfo, peer_tree)
peer_tree.len = pos - peer_start
tree:add_le(pf.connection_accept_expect_seq, tvbuf:range(pos, 4))
pos = pos + 4
tree:add_le(pf.connection_accept_send_seq, tvbuf:range(pos, 4))
pos = pos + 4
tree:add_le(pf.connection_accept_new_peer_id, tvbuf:range(pos, 2))
pos = pos + 2
local mods_size = tvbuf:range(pos, 1):uint()
local mods_start_pos = pos
local mods_tree = tree:add(tvbuf:range(pos), "activeMods")
mods_tree:add(pf.connection_accept_active_mods_size, tvbuf:range(pos, 1))
pos = pos + 1
for _=1, mods_size do
pos = dissect_mod_id(pos, tvbuf, pktinfo, mods_tree)
end
mods_tree.len = pos - mods_start_pos
-- TODO: startupModSettings
return pos
end
pf.heartbeat_flags = ProtoField.uint8("fgp.heartbeat.flags", "Flags", base.HEX, nil, 0)
pf.has_heartbeat_requests = ProtoField.bool("fgp.heartbeat.has_heartbeat_requests", "HAS_HEARTBEAT_REQUESTS", 8, nil, 0x01)
pf.has_tick_closures = ProtoField.bool("fgp.heartbeat.has_tick_closures", "HAS_TICK_CLOSURES", 8, nil, 0x02)
pf.has_single_tick_closure = ProtoField.bool("fgp.heartbeat.has_single_tick_closure", "HAS_SINGLE_TICK_CLOSURE", 8, nil, 0x04)
pf.all_tick_closures_are_empty = ProtoField.bool("fgp.heartbeat.all_tick_closures_are_empty", "ALL_TICK_CLOSURES_ARE_EMPTY", 8, nil, 0x08)
pf.has_synchronizer_action = ProtoField.bool("fgp.heartbeat.has_synchronizer_action", "HAS_SYNCHRONIZER_ACTION", 8, nil, 0x10)
pf.heartbeat_flag_bit5 = ProtoField.bool("fgp.heartbeat.flag_bit5", "Bit5", 8, nil, 0x20)
pf.heartbeat_flag_bit6 = ProtoField.bool("fgp.heartbeat.flag_bit6", "Bit6", 8, nil, 0x40)
pf.heartbeat_flag_bit7 = ProtoField.bool("fgp.heartbeat.flag_bit7", "Bit7", 8, nil, 0x80)
fe.has_heartbeat_requests = "fgp.heartbeat.has_heartbeat_requests"
fe.has_tick_closures = "fgp.heartbeat.has_tick_closures"
fe.has_single_tick_closure = "fgp.heartbeat.has_single_tick_closure"
fe.all_tick_closures_are_empty = "fgp.heartbeat.all_tick_closures_are_empty"
fe.has_synchronizer_action = "fgp.heartbeat.has_synchronizer_action"
pf.heartbeat_sequence_number = ProtoField.uint32("fgp.heartbeat.sequence_number", "sequenceNumber", base.DEC, nil, 0)
pf.heartbeat_tick_closures_count = ProtoField.uint8("fgp.heartbeat.tick_closures.size", "size", base.DEC, nil, 0)
fe.heartbeat_sequence_number = "fgp.heartbeat.sequence_number"
pf.client_gametick_timeshift = ProtoField.uint32("fgp.client_gametick.timeshift", "nextToReceiveServerTickClosure", base.DEC, nil, 0)
pf.heartbeat_synchronizer_actions_count = ProtoField.uint8("fgp.heartbeat.synchronizer_actions.size", "size", base.DEC, nil, 0)
pf.strange_size = ProtoField.uint8("fgp.heartbeat.request_for_heartbeat.size", "size", base.DEC, nil, 0)
pf.strange_data = ProtoField.uint32("fgp.heartbeat.request_for_heartbeat.item", "item", base.DEC, nil, 0)
function dissect_heartbeat(pos, tvbuf, pktinfo, tree, is_server)
local pktlen = tvbuf:len()
if pktlen < 1 then
pktinfo.cols.info:prepend("[Too short] ")
tree:add_proto_expert_info(ef.too_short)
return pos
end
local heartbeat_flags_range = tvbuf:range(pos, 1)
local heartbeat_flags_tree = tree:add(pf.heartbeat_flags, heartbeat_flags_range)
pos = pos + 1
heartbeat_flags_tree:add(pf.has_heartbeat_requests, heartbeat_flags_range)
heartbeat_flags_tree:add(pf.has_tick_closures, heartbeat_flags_range)
heartbeat_flags_tree:add(pf.has_single_tick_closure, heartbeat_flags_range)
heartbeat_flags_tree:add(pf.all_tick_closures_are_empty, heartbeat_flags_range)
heartbeat_flags_tree:add(pf.has_synchronizer_action, heartbeat_flags_range)
heartbeat_flags_tree:add(pf.heartbeat_flag_bit5, heartbeat_flags_range)
heartbeat_flags_tree:add(pf.heartbeat_flag_bit6, heartbeat_flags_range)
heartbeat_flags_tree:add(pf.heartbeat_flag_bit7, heartbeat_flags_range)
if pktlen < pos + 4 then
pktinfo.cols.info:prepend("[Too short] ")
tree:add_proto_expert_info(ef.too_short)
return pos
end
tree:add_le(pf.heartbeat_sequence_number, tvbuf:range(pos, 4))
pos = pos + 4
pktinfo.cols.info:append(" Seq=" .. fe.heartbeat_sequence_number().display)
local all_tick_closures_are_empty = fe.all_tick_closures_are_empty()()
local tick_closures_count = nil
local hit_unknown = false
if fe.has_tick_closures()() then
local tick_closures_start_pos = pos
local tick_closures_tree = tree:add(tvbuf:range(pos), "tickClosures")
if fe.has_single_tick_closure()() then
tick_closures_count = 1
local count_item = tick_closures_tree:add(pf.heartbeat_tick_closures_count, tick_closures_count)
count_item.generated = true
else
tick_closures_count = tvbuf(pos, 1):uint()
tick_closures_tree:add(pf.heartbeat_tick_closures_count, tvbuf(pos, 1))
pos = pos + 1
end
for _=1, tick_closures_count do
pos, hit_unknown = dissect_tick_closure(pos, tvbuf, pktinfo, tick_closures_tree, all_tick_closures_are_empty)
if hit_unknown then
break
end
end
tick_closures_tree.len = pos - tick_closures_start_pos
end
if not hit_unknown and not is_server then
tree:add_le(pf.client_gametick_timeshift, tvbuf:range(pos, 4))
pos = pos + 4
end
if not hit_unknown and fe.has_synchronizer_action()() then
local sync_tree_start_pos = pos
local sync_tree = tree:add(tvbuf:range(pos), "synchronizerActions")
local sync_count_range, sync_count
pos, sync_count_range, sync_count = decode_uint32v(pos, tvbuf)
sync_tree:add(pf.heartbeat_synchronizer_actions_count, sync_count_range, sync_count)
for _=1, sync_count do
pos, hit_unknown = dissect_synchronizer_action(pos, tvbuf, pktinfo, sync_tree, is_server)
if hit_unknown then
break
end
end
sync_tree.len = pos - sync_tree_start_pos
end
if not hit_unknown and fe.has_heartbeat_requests()() then
local req_count = tvbuf:range(pos, 1):uint()
local req_tree = tree:add(tvbuf:range(pos, 1 + req_count * 4), "requestsForHeartbeat: " .. req_count)
req_tree:add(pf.strange_size, tvbuf:range(pos, 1))
pos = pos + 1
for _=1, req_count do
req_tree:add_le(pf.strange_data, tvbuf:range(pos, 4))
pos = pos + 4
end
end
return pos
end
pf.tick_closure_update_tick = ProtoField.uint32("fgp.tick_closure.update_tick", "updateTick", base.DEC, nil, 0)
pf.tick_closure_segments_size = ProtoField.uint8("fgp.tick_closure.input_action_segments.size", "size", base.DEC, nil, 0)
-- class TickClosure
function dissect_tick_closure(pos, tvbuf, pktinfo, tree, is_empty)
local tick_tree = tree:add(tvbuf:range(pos), "TickClosure")
local start_pos = pos
tick_tree:add_le(pf.tick_closure_update_tick, tvbuf:range(pos, 4))
pos = pos + 4
local hit_unknown = false
if not is_empty then
local input_start_pos = pos
local input_tree = tick_tree:add(tvbuf:range(pos), "inputActions")
local count_range, count_flagged
pos, count_range, count_flagged = decode_uint32v(pos, tvbuf)
local count = bit32.rshift(count_flagged, 1)
local has_segments = bit32.band(count_flagged, 1) == 1
input_tree:add_le(pf.input_actions_size, count_range, count)
input_tree:append_text(": " .. count)
local last_index = 0xffff
for _=1, count do
pos, last_index, hit_unknown = dissect_input_action(pos, tvbuf, pktinfo, input_tree, last_index)
if hit_unknown then
break
end
end
input_tree.len = pos - input_start_pos
if not hit_unknown and has_segments then
local segment_start_pos = pos
local segment_tree = tick_tree:add(tvbuf:range(pos), "inputActionSegments")
local segment_count = tvbuf:range(pos, 1):uint()
segment_tree:add(pf.tick_closure_segments_size, tvbuf:range(pos, 1))
pos = pos + 1
for _=1, segment_count do
pos = dissect_input_action_segment(pos, tvbuf, pktinfo, segment_tree)
end
segment_tree.len = pos - segment_start_pos
end
end
tick_tree.len = pos - start_pos
return pos, hit_unknown
end
pf.input_action_string_length = ProtoField.uint32("fgp.input_action.string.length", "length", base.DEC, nil, 0)
pf.input_action_string_data = ProtoField.string("fgp.input_action.string.length", "data", base.ASCII)
input_actions = {}
input_actions[0] = {
name = 'Nothing',
len = 0,
}
input_actions[#input_actions+1] = {
name = 'StopWalking',
len = 0,
}
input_actions[#input_actions+1] = {
name = 'BeginMining',
len = 0,
}
input_actions[#input_actions+1] = {
name = 'StopMining',
len = 0,
}
input_actions[#input_actions+1] = {
name = 'ToggleDriving',
len = 0,
}
input_actions[#input_actions+1] = {
name = 'OpenGui',
len = 0,
}
input_actions[#input_actions+1] = {
name = 'CloseGui',
len = 0,
}
input_actions[#input_actions+1] = {
name = 'OpenCharacterGui',
len = 0,
}
input_actions[#input_actions+1] = {
name = 'OpenCurrentVehicleGui',
len = 0,
}
input_actions[#input_actions+1] = {
name = 'ConnectRollingStock',
len = 0,
}
input_actions[#input_actions+1] = {
name = 'DisconnectRollingStock',
len = 0,
}
input_actions[#input_actions+1] = {
name = 'SelectedEntityCleared',
len = 0,
}
input_actions[#input_actions+1] = {
name = 'ClearCursor',
len = 0,
}
input_actions[#input_actions+1] = {
name = 'ResetAssemblingMachine',
len = 0,
}
input_actions[#input_actions+1] = {
name = 'OpenTechnologyGui',
len = 0,
}
input_actions[#input_actions+1] = {
name = 'LaunchRocket',
len = 0,
}
input_actions[#input_actions+1] = {
name = 'OpenProductionGui',
len = 0,
}
input_actions[#input_actions+1] = {
name = 'StopRepair',
len = 0,
}
input_actions[#input_actions+1] = {
name = 'CancelNewBlueprint',
len = 0,
}
input_actions[#input_actions+1] = {
name = 'CloseBlueprintRecord',
len = 0,
}
input_actions[#input_actions+1] = {
name = 'CopyEntitySettings',
len = 0,
}
input_actions[#input_actions+1] = {
name = 'PasteEntitySettings',
len = 0,
}
input_actions[#input_actions+1] = {
name = 'DestroyOpenedItem',
len = 0,
}
input_actions[#input_actions+1] = {
name = 'CopyOpenedItem',
len = 0,
}
input_actions[#input_actions+1] = {
name = 'ToggleShowEntityInfo',
len = 0,
}
input_actions[#input_actions+1] = {
name = 'SingleplayerInit',
len = 0,