comment out prints

This commit is contained in:
whosit 2024-02-06 10:35:54 +03:00
parent 61894f0943
commit c6867aad85

View File

@ -1244,7 +1244,7 @@ do
ao_proto.fields = { f_command } ao_proto.fields = { f_command }
function ao_proto.dissector(buffer, pinfo, tree) function ao_proto.dissector(buffer, pinfo, tree)
print("---------------------------------") -- print("---------------------------------")
local t = tree:add(ao_proto, buffer(0, 1)) local t = tree:add(ao_proto, buffer(0, 1))
t:add(f_command, buffer(0, 1)) t:add(f_command, buffer(0, 1))
end end
@ -1259,7 +1259,7 @@ do
function p_split.init() function p_split.init()
print("(re-)initialise") -- print("(re-)initialise")
split_store.fragments = {} split_store.fragments = {}
split_store.concats = {} split_store.concats = {}
end end
@ -1272,7 +1272,7 @@ do
p_split.fields = { f_split_seq, f_split_chunkcount, f_split_chunknum, f_split_data, f_assembled_data } p_split.fields = { f_split_seq, f_split_chunkcount, f_split_chunknum, f_split_data, f_assembled_data }
function p_split.dissector(buffer, pinfo, tree) function p_split.dissector(buffer, pinfo, tree)
print("---------------------------------") -- print("---------------------------------")
local t = tree:add(p_split, buffer(0, 6)) local t = tree:add(p_split, buffer(0, 6))
local seq_number = buffer(0, 2) local seq_number = buffer(0, 2)
t:add(f_split_seq, seq_number) t:add(f_split_seq, seq_number)
@ -1294,14 +1294,14 @@ do
local seq_fragments = split_store.fragments[seq_number] local seq_fragments = split_store.fragments[seq_number]
if not seq_fragments then if not seq_fragments then
print("first known fragment for", seq_number, seq_frag_index) -- print("first known fragment for", seq_number, seq_frag_index)
seq_fragments = { seq_fragments = {
total_frag_number = seq_frag_total, total_frag_number = seq_frag_total,
collected_frag_count = 0, collected_frag_count = 0,
} }
split_store.fragments[seq_number] = seq_fragments split_store.fragments[seq_number] = seq_fragments
else else
print("other fragment for", seq_number, seq_frag_index) -- print("other fragment for", seq_number, seq_frag_index)
end end
if not seq_fragments[seq_frag_index] then if not seq_fragments[seq_frag_index] then
@ -1309,7 +1309,7 @@ do
seq_fragments.collected_frag_count = seq_fragments.collected_frag_count + 1 seq_fragments.collected_frag_count = seq_fragments.collected_frag_count + 1
end end
print(("%s seq %s collected %s / %s"):format( -- print(("%s seq %s collected %s / %s"):format(
seq_number, seq_number,
seq_frag_index, seq_frag_index,
seq_fragments.collected_frag_count, seq_fragments.collected_frag_count,
@ -1337,7 +1337,7 @@ do
local data_dis = Dissector.get("minetest.server") local data_dis = Dissector.get("minetest.server")
new_tvb = ByteArray.tvb(split_store.concats[pinfo.number]) new_tvb = ByteArray.tvb(split_store.concats[pinfo.number])
local bytes_dissected = data_dis:call(new_tvb(0):tvb(), pinfo, tree) local bytes_dissected = data_dis:call(new_tvb(0):tvb(), pinfo, tree)
print("data dis", bytes_dissected) -- print("data dis", bytes_dissected)
end end
end end
@ -1345,9 +1345,9 @@ do
local data_dis = Dissector.get("minetest.server") local data_dis = Dissector.get("minetest.server")
new_tvb = ByteArray.tvb(split_store.concats[pinfo.number]) new_tvb = ByteArray.tvb(split_store.concats[pinfo.number])
local bytes_dissected = data_dis:call(new_tvb(0):tvb(), pinfo, tree) local bytes_dissected = data_dis:call(new_tvb(0):tvb(), pinfo, tree)
print("data dis", bytes_dissected) -- print("data dis", bytes_dissected)
print("has assembled") -- print("has assembled")
--new_tvb = ByteArray.tvb(split_store.concats[pinfo.number]) --new_tvb = ByteArray.tvb(split_store.concats[pinfo.number])
--t:add(f_assembled_data, seq_frag_data) --t:add(f_assembled_data, seq_frag_data)
--t:add(f_assembled_data, new_tvb) --split_store.concats[pinfo.number]:tohex()) -- HMMM???? --t:add(f_assembled_data, new_tvb) --split_store.concats[pinfo.number]:tohex()) -- HMMM????