summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/nwm/uds_connection.cpp
diff options
context:
space:
mode:
authorB3n30 <bene_thomas@web.de>2017-09-25 08:16:27 +0200
committerGitHub <noreply@github.com>2017-09-25 08:16:27 +0200
commitd673d508dd1ca463dc72ff68b5582ee56d62f142 (patch)
treee6c7d39198a7bb7a0b8d07c89bb15854ddd4c8e8 /src/core/hle/service/nwm/uds_connection.cpp
parentMerge pull request #2944 from huwpascoe/perf-3 (diff)
downloadyuzu-d673d508dd1ca463dc72ff68b5582ee56d62f142.tar
yuzu-d673d508dd1ca463dc72ff68b5582ee56d62f142.tar.gz
yuzu-d673d508dd1ca463dc72ff68b5582ee56d62f142.tar.bz2
yuzu-d673d508dd1ca463dc72ff68b5582ee56d62f142.tar.lz
yuzu-d673d508dd1ca463dc72ff68b5582ee56d62f142.tar.xz
yuzu-d673d508dd1ca463dc72ff68b5582ee56d62f142.tar.zst
yuzu-d673d508dd1ca463dc72ff68b5582ee56d62f142.zip
Diffstat (limited to 'src/core/hle/service/nwm/uds_connection.cpp')
-rw-r--r--src/core/hle/service/nwm/uds_connection.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/hle/service/nwm/uds_connection.cpp b/src/core/hle/service/nwm/uds_connection.cpp
index c8a76ec2a..c74f51253 100644
--- a/src/core/hle/service/nwm/uds_connection.cpp
+++ b/src/core/hle/service/nwm/uds_connection.cpp
@@ -75,5 +75,14 @@ std::vector<u8> GenerateAssocResponseFrame(AssocStatus status, u16 association_i
return data;
}
+std::tuple<AssocStatus, u16> GetAssociationResult(const std::vector<u8>& body) {
+ AssociationResponseFrame frame;
+ memcpy(&frame, body.data(), sizeof(frame));
+
+ constexpr u16 AssociationIdMask = 0x3FFF;
+ return std::make_tuple(static_cast<AssocStatus>(frame.status_code),
+ frame.assoc_id & AssociationIdMask);
+}
+
} // namespace NWM
} // namespace Service