Commit graph

59 commits

Author SHA1 Message Date
Ben
4be12d5f56 NWM_UDS:: Check flags in SendTo (#3481)
* NWM_UDS:: Check flags in SendTo

* NWM_UDS: SendTo from Host to only oneClient

* fix u8 in flags

* Send node_map to clients

* Libnetwork: Increase libnetwork version

* Broadcast on dest_node_id 0xFFFF

* fixup: dest_node_id offset

* fixup: dest_node_id offset part 2

* Adressed wwyleles feedback

* Adressed wwylele's nits
2018-03-27 15:01:29 +03:00
James Rowe
f61141e86a Update the entire application to use the new clang format style 2018-03-09 10:54:43 -07:00
James Rowe
d26cf11399 Fix clang format 2018-03-04 20:27:22 -07:00
James Rowe
878217372b Remove useless static cast 2018-03-04 20:16:36 -07:00
James Rowe
1f87766b86 Change to use CryptoPP random and address review comments 2018-02-22 22:31:58 -07:00
James Rowe
752cfcaaae Move writing to shared page to the nwm init 2018-02-22 10:20:34 -07:00
James Rowe
ffe94421b2 UDS: Add non zero mac address to the shared page
Apparently several games check the shared page mac address and wifi
link level values, and will refuse to start UDS if they are not correct.
This change gives a default value (in case you aren't connected to a
network) and will read the value from Room if you are connected.
2018-02-22 10:17:38 -07:00
wwylele
dfc22661a4 NWM_UDS: change SleepClientThread to use std::chrono::nanoseconds 2018-02-22 16:44:04 +02:00
B3n30
853a79c94c clang-format fix 2018-02-17 13:45:52 +01:00
B3n30
7cb3d84a98 HW checked signals Disconnect, Destroy and Shutdown 2018-02-17 12:54:48 +01:00
B3n30
237835a8b6 NWM_UDS: More of wwyleles comments 2018-02-15 23:00:32 +01:00
B3n30
cbf514190e NWM_UDS: Addressed wwyleles comments 2018-02-15 22:48:27 +01:00
B3n30
cc6a83621c fix clang 2018-02-15 22:48:27 +01:00
B3n30
d793624c61 fixup! NWM_UDS: Convert to service framework 2018-02-15 22:48:27 +01:00
B3n30
27e6e03d16 Fixups from Subvs comments 2018-02-15 22:48:27 +01:00
B3n30
520ecf7be6 NWM_UDS: Convert to service framework 2018-02-15 22:48:27 +01:00
B3n30
5904e11215 fixup! UDS: Add coonnect and disconnect 2018-02-15 22:48:27 +01:00
B3n30
f29a9ac3c1 UDS: Add coonnect and disconnect 2018-02-15 22:48:27 +01:00
B3n30
e9a95b2e7d
CoreTiming: Reworked CoreTiming (#3119)
* CoreTiming: New CoreTiming; Add Test for CoreTiming
2017-11-25 14:56:57 +01:00
Subv
c9c1ba0952 Kernel/IPC: Implement StaticBuffer translation for HLE services that use the HLERequestContext architecture.
The real kernel requires services to set up their static buffer targets ahead of time. This implementation does not require that and will simply create the storage for the buffers as they are processed in the incoming IPC request.

Static buffers are kept in an unordered_map keyed by their buffer id, and are written into the already-setup area of the request thread when responding an IPC request.

This fixes a regression (crash) introduced in #2992.

This PR introduces more warnings due to the [[deprecated]] attribute being added to void PushStaticBuffer(VAddr buffer_vaddr, size_t size, u8 buffer_id); and VAddr PopStaticBuffer(size_t* data_size);
2017-11-12 11:00:00 -05:00
Sebastian Valle
3fe9b332bc
Merge pull request #2989 from B3n30/sendTo_PullPacket_Bind
Service/UDS: Implement Bind, Unbind, SendTo, PullPacket, and GetNodeInformation
2017-11-04 10:58:49 -05:00
B3n30
ed9db735a2 Service/UDS: Updated BeginHostingNetwork 2017-11-04 15:41:54 +01:00
B3n30
f6d16c3f87 Service/UDS: Implement Unbind and GetNodeInformation 2017-11-04 15:41:54 +01:00
B3n30
230ea063a5 Service/UDS: Implement SendTo, PullPacket, HandleSecureData, and Bind 2017-11-04 15:41:27 +01:00
Dragios
e46f66a5fa Remove Crypto++ weak algorithm warning 2017-10-22 13:56:59 +08:00
Dragios
83e5f639e6 Change command header in nwm::UDS Initialize function 2017-10-09 09:10:48 +08:00
B3n30
afb1012bcd Services/UDS: Handle the rest of the connection sequence. (#2963)
Services/UDS: Handle the rest of the connection sequence.
2017-09-30 18:18:45 +02:00
Huw Pascoe
a13ab958cb Fixed type conversion ambiguity 2017-09-30 09:34:35 +01:00
B3n30
d673d508dd Services/UDS: Added a function to send EAPoL-Start packets (#2920)
* Services/UDS: Added a function to generate the EAPoL-Start packet body.

* Services/UDS: Added filter for beacons.

* Services/UDS: Lock a mutex when accessing connection_status from both the emulation and network thread.

* Services/UDS: Handle the Association Response frame and respond with the EAPoL-Start frame.

* fixup: make use of current_node, changed received_beacons into a list, mutex and assert corrections

* fixup: fix damn clang-format
2017-09-25 08:16:27 +02:00
Subv
f64cd87604 Services/UDS: Remove an old duplicated declaration of WifiPacket. 2017-08-27 10:48:15 -05:00
Subv
d088dbfbe1 Services/UDS: Handle the connection sequence packets.
There is currently no stage tracking, a client is considered "Connected" when it receives the EAPoL Logoff packet from the server, this is not yet implemented.
2017-08-27 10:48:13 -05:00
Subv
2e9f544ecc Services/UDS: Store the received beacon frames until RecvBeaconBroadcastData is called, up to 15 beacons at the same time, removing any older beacon frames when the limit is exceeded. 2017-08-27 10:48:11 -05:00
Subv
54411bef4e Services/UDS: Add functions to generate 802.11 auth and assoc response frames. 2017-08-27 10:48:09 -05:00
Sebastian Valle
fa53ccc74b Merge pull request #2778 from Subv/uds_more
Services/UDS: Stub SendTo to generate the unencrypted data frames with the right headers
2017-06-26 19:35:52 -05:00
Subv
2eb174713b UDS: Use the ToDS and FromDS fields to properly calculate the AAD used during encryption. 2017-06-26 12:24:14 -05:00
Subv
1f1739d366 UDS: Move the UDS keyslot used to generate the CCMP key to the AES::KeySlotID enum. 2017-06-26 12:24:13 -05:00
Subv
87168bfe8b UDS: Run clang-format. 2017-06-26 12:24:11 -05:00
Subv
9befb8c887 UDS: Added functions to encrypt and decrypt the data frames.
The responsibility of encryption and encapsulation into an 802.11 MAC frame will fall into the callers of GenerateDataPayload.
2017-06-26 12:24:09 -05:00
Yuri Kunde Schlesner
b21dfbb295 Merge pull request #2790 from yuriks/remove-movefrom
Remove ResultVal::MoveFrom
2017-06-20 22:04:09 -07:00
Yuri Kunde Schlesner
723dc644fa ResultVal: Remove MoveFrom()
Replace it with std::move(result_val).Unwrap(), or Foo().Unwrap() in
case you already have an rvalue.
2017-06-18 19:03:15 -07:00
Subv
812b404492 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.
2017-06-15 12:08:55 -05:00
Subv
61ce89a55a UDS: Return the correct error messages in SendTo when not connected to a network or trying to send to itself. 2017-06-15 12:08:54 -05:00
Subv
7efb64132d UDS: Stub SendTo to generate the unencrypted data frame with the right headers. 2017-06-15 12:08:53 -05:00
Subv
38ceab13f6 UDS: Added a hook for updating the connection status when a client connects to the network. 2017-06-15 11:57:49 -05:00
Sebastian Valle
ac168eeb5d Services/UDS: Set the proper bit in the ConnectionStatus structure when creating a network. (#2738)
* Services/UDS: Set the proper bit in the ConnectionStatus structure when creating a network.

This lets the application know that the host was successfully added to the session.

* Services/UDS: Reset the connection status when destroying the network

* Services/UDS: Reset the connection status's bitmask of changed nodes after reporting it to the game.
2017-06-13 22:00:58 +03:00
James Rowe
8c22334f96 Merge pull request #2737 from Subv/decryptbeacondata
Services/UDS: Implement DecryptBeaconData.
2017-06-07 10:08:43 -06:00
Subv
d7d0b46fc1 Services/UDS: Implement DecryptBeaconData.
This function decrypts the encrypted data tags contained in the 802.11 beacon frames.
2017-06-06 11:31:20 -05:00
Yuri Kunde Schlesner
d96a9e0c11 Service: Remove unnecessary includes from service.h
This has a huge fallout in terms of needing to fix other files because
all service implementations included that file.
2017-06-06 02:57:23 -07:00
Subv
f2d5d8cfac Services/UDS: Use the new IPC helper functions. 2017-05-15 13:05:17 -05:00
Subv
846cc6cee3 Services/UDS: Implement RecvBeaconBroadcastData.
This allows the applications to retrieve 802.11 beacon frames from nearby UDS networks.
Note that the networks are still not announced anywhere.
2017-05-15 13:05:16 -05:00