diff options
author | Subv <subv2112@gmail.com> | 2017-06-14 16:43:05 +0200 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2017-06-15 19:08:55 +0200 |
commit | 812b404492d36d499b4a74019eacb6da2a052a26 (patch) | |
tree | cb8788d4e84c31ce29c699ce4ab83a2e745b8d4f /src/core/hle | |
parent | UDS: Return the correct error messages in SendTo when not connected to a network or trying to send to itself. (diff) | |
download | yuzu-812b404492d36d499b4a74019eacb6da2a052a26.tar yuzu-812b404492d36d499b4a74019eacb6da2a052a26.tar.gz yuzu-812b404492d36d499b4a74019eacb6da2a052a26.tar.bz2 yuzu-812b404492d36d499b4a74019eacb6da2a052a26.tar.lz yuzu-812b404492d36d499b4a74019eacb6da2a052a26.tar.xz yuzu-812b404492d36d499b4a74019eacb6da2a052a26.tar.zst yuzu-812b404492d36d499b4a74019eacb6da2a052a26.zip |
Diffstat (limited to 'src/core/hle')
-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 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; 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"); * the source and destination network node ids. */ struct SecureDataHeader { + // TODO(Subv): It is likely that the first 4 bytes of this header are + // actually part of another container protocol. u16_be protocol_size; INSERT_PADDING_BYTES(2); u16_be securedata_size; |