diff options
| author | 2017-06-14 09:43:05 -0500 | |
|---|---|---|
| committer | 2017-06-15 12:08:55 -0500 | |
| commit | 812b404492d36d499b4a74019eacb6da2a052a26 (patch) | |
| tree | cb8788d4e84c31ce29c699ce4ab83a2e745b8d4f /src/core | |
| parent | UDS: Return the correct error messages in SendTo when not connected to a netw... (diff) | |
| download | yuzu-812b404492d36d499b4a74019eacb6da2a052a26.tar.gz yuzu-812b404492d36d499b4a74019eacb6da2a052a26.tar.xz yuzu-812b404492d36d499b4a74019eacb6da2a052a26.zip | |
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')
| -rw-r--r-- | src/core/hle/service/nwm/uds_data.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/service/nwm/uds_data.h | 2 |
2 files changed, 5 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 | |||
| 40 | u16 src_node_id, u16 sequence_number) { | 40 | u16 src_node_id, u16 sequence_number) { |
| 41 | SecureDataHeader header{}; | 41 | SecureDataHeader header{}; |
| 42 | header.protocol_size = data_size + sizeof(SecureDataHeader); | 42 | header.protocol_size = data_size + sizeof(SecureDataHeader); |
| 43 | // TODO(Subv): It is likely that the first 4 bytes of this header are actually a decorator for another protocol. | 43 | // Note: This size includes everything except the first 4 bytes of the structure, |
| 44 | // reinforcing the hypotheses that the first 4 bytes are actually the header of | ||
| 45 | // another container protocol. | ||
| 44 | header.securedata_size = data_size + sizeof(SecureDataHeader) - 4; | 46 | header.securedata_size = data_size + sizeof(SecureDataHeader) - 4; |
| 45 | header.is_management = 0; // Frames sent by the emulated application are never UDS management frames | 47 | header.is_management = 0; // Frames sent by the emulated application are never UDS management frames |
| 46 | header.data_channel = channel; | 48 | header.data_channel = channel; |
diff --git a/src/core/hle/service/nwm/uds_data.h b/src/core/hle/service/nwm/uds_data.h index 0dd46bcb1..8480ef94b 100644 --- a/src/core/hle/service/nwm/uds_data.h +++ b/src/core/hle/service/nwm/uds_data.h | |||
| @@ -45,6 +45,8 @@ static_assert(sizeof(LLCHeader) == 8, "LLCHeader has the wrong size"); | |||
| 45 | * the source and destination network node ids. | 45 | * the source and destination network node ids. |
| 46 | */ | 46 | */ |
| 47 | struct SecureDataHeader { | 47 | struct SecureDataHeader { |
| 48 | // TODO(Subv): It is likely that the first 4 bytes of this header are | ||
| 49 | // actually part of another container protocol. | ||
| 48 | u16_be protocol_size; | 50 | u16_be protocol_size; |
| 49 | INSERT_PADDING_BYTES(2); | 51 | INSERT_PADDING_BYTES(2); |
| 50 | u16_be securedata_size; | 52 | u16_be securedata_size; |