aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/service/nwm/uds_data.cpp
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2017-06-14 09:43:05 -0500
committerSubv <subv2112@gmail.com>2017-06-15 12:08:55 -0500
commit812b404492d36d499b4a74019eacb6da2a052a26 (patch)
treecb8788d4e84c31ce29c699ce4ab83a2e745b8d4f /src/core/hle/service/nwm/uds_data.cpp
parent61ce89a55ac6ff12f881e3bba0220ac3f04fbf50 (diff)
UDS: Clarify comment about the first 4 bytes of the SecureData header.
It is likely that these 4 bytes are actually a different header, part of some protocol that encapsulates the SecureData protocol.
Diffstat (limited to 'src/core/hle/service/nwm/uds_data.cpp')
-rw-r--r--src/core/hle/service/nwm/uds_data.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/hle/service/nwm/uds_data.cpp b/src/core/hle/service/nwm/uds_data.cpp
index 7e4aec624..9ba2fdcf1 100644
--- a/src/core/hle/service/nwm/uds_data.cpp
+++ b/src/core/hle/service/nwm/uds_data.cpp
@@ -40,7 +40,9 @@ static std::vector<u8> GenerateSecureDataHeader(u16 data_size, u8 channel, u16 d
u16 src_node_id, u16 sequence_number) {
SecureDataHeader header{};
header.protocol_size = data_size + sizeof(SecureDataHeader);
- // TODO(Subv): It is likely that the first 4 bytes of this header are actually a decorator for another protocol.
+ // Note: This size includes everything except the first 4 bytes of the structure,
+ // reinforcing the hypotheses that the first 4 bytes are actually the header of
+ // another container protocol.
header.securedata_size = data_size + sizeof(SecureDataHeader) - 4;
header.is_management = 0; // Frames sent by the emulated application are never UDS management frames
header.data_channel = channel;