mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-06 05:42:49 +02:00
Added readme and size field to avatar data packet dissector
This commit is contained in:
parent
41b804a5dd
commit
2cd01ad189
2 changed files with 27 additions and 0 deletions
|
@ -19,6 +19,8 @@ local f_avatar_data_valid_rotations = ProtoField.string("hf_avatar.avatar_data_v
|
|||
local f_avatar_data_valid_translations = ProtoField.string("hf_avatar.avatar_data_valid_translations", "Valid Translations")
|
||||
local f_avatar_data_default_rotations = ProtoField.string("hf_avatar.avatar_data_default_rotations", "Valid Default")
|
||||
local f_avatar_data_default_translations = ProtoField.string("hf_avatar.avatar_data_default_translations", "Valid Default")
|
||||
local f_avatar_data_sizes = ProtoField.string("hf_avatar.avatar_sizes", "Sizes")
|
||||
|
||||
|
||||
p_hf_avatar.fields = {
|
||||
f_avatar_id, f_avatar_data_parent_id
|
||||
|
@ -110,6 +112,9 @@ function add_avatar_data_subtrees(avatar_data)
|
|||
if avatar_data["default_translations"] then
|
||||
avatar_subtree:add(f_avatar_data_default_translations, avatar_data["default_translations"])
|
||||
end
|
||||
if avatar_data["sizes"] then
|
||||
avatar_subtree:add(f_avatar_data_sizes, avatar_data["sizes"])
|
||||
end
|
||||
end
|
||||
|
||||
function decode_vec3(buf)
|
||||
|
@ -154,6 +159,8 @@ function decode_avatar_data_packet(buf)
|
|||
local i = 0
|
||||
local result = {}
|
||||
|
||||
result["sizes"] = ""
|
||||
|
||||
-- uint16 has_flags
|
||||
local has_flags = buf(i, 2):le_uint()
|
||||
i = i + 2
|
||||
|
@ -258,6 +265,8 @@ function decode_avatar_data_packet(buf)
|
|||
|
||||
if has_joint_data then
|
||||
|
||||
local joint_poses_start = i
|
||||
|
||||
local num_joints = buf(i, 1):uint()
|
||||
i = i + 1
|
||||
local num_validity_bytes = math.ceil(num_joints / 8)
|
||||
|
@ -279,6 +288,8 @@ function decode_avatar_data_packet(buf)
|
|||
-- TODO: skip hand controller data
|
||||
i = i + 24
|
||||
|
||||
result["sizes"] = result["sizes"] .. " Poses: " .. (i - joint_poses_start)
|
||||
|
||||
end
|
||||
|
||||
if has_joint_default_pose_flags then
|
||||
|
@ -295,5 +306,7 @@ function decode_avatar_data_packet(buf)
|
|||
result["default_translations"] = "Default Translations: " .. string.format("(%d/%d) {", #indices, num_joints) .. table.concat(indices, ", ") .. "}"
|
||||
end
|
||||
|
||||
result["sizes"] = result["sizes"] .. " Total: " .. i
|
||||
|
||||
return result
|
||||
end
|
||||
|
|
14
tools/dissectors/README.md
Normal file
14
tools/dissectors/README.md
Normal file
|
@ -0,0 +1,14 @@
|
|||
High Fidelity Wireshark Plugins
|
||||
---------------------------------
|
||||
|
||||
Install wireshark 2.4.6 or higher.
|
||||
|
||||
Copy these lua files into c:\Users\username\AppData\Roaming\Wireshark\Plugins
|
||||
|
||||
After a capture any detected High Fidelity Packets should be easily identifiable by one of the following protocols
|
||||
|
||||
* HF-AUDIO - Streaming audio packets
|
||||
* HF-AVATAR - Streaming avatar mixer packets
|
||||
* HF-ENTITY - Entity server traffic
|
||||
* HF-DOMAIN - Domain server traffic
|
||||
* HFUDT - All other UDP traffic
|
Loading…
Reference in a new issue