diff options
Diffstat (limited to '')
| -rw-r--r-- | src/core/hle/service/nifm/nifm.cpp | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/src/core/hle/service/nifm/nifm.cpp b/src/core/hle/service/nifm/nifm.cpp index ef5176bea..b924a12d1 100644 --- a/src/core/hle/service/nifm/nifm.cpp +++ b/src/core/hle/service/nifm/nifm.cpp | |||
| @@ -21,6 +21,93 @@ enum class RequestState : u32 { | |||
| 21 | Connected = 3, | 21 | Connected = 3, |
| 22 | }; | 22 | }; |
| 23 | 23 | ||
| 24 | struct IpAddressSetting { | ||
| 25 | bool is_automatic{}; | ||
| 26 | Network::IPv4Address current_address{}; | ||
| 27 | Network::IPv4Address subnet_mask{}; | ||
| 28 | Network::IPv4Address gateway{}; | ||
| 29 | }; | ||
| 30 | static_assert(sizeof(IpAddressSetting) == 0xD, "IpAddressSetting has incorrect size."); | ||
| 31 | |||
| 32 | struct DnsSetting { | ||
| 33 | bool is_automatic{}; | ||
| 34 | Network::IPv4Address primary_dns{}; | ||
| 35 | Network::IPv4Address secondary_dns{}; | ||
| 36 | }; | ||
| 37 | static_assert(sizeof(DnsSetting) == 0x9, "DnsSetting has incorrect size."); | ||
| 38 | |||
| 39 | struct ProxySetting { | ||
| 40 | bool enabled{}; | ||
| 41 | INSERT_PADDING_BYTES(1); | ||
| 42 | u16 port{}; | ||
| 43 | std::array<char, 0x64> proxy_server{}; | ||
| 44 | bool automatic_auth_enabled{}; | ||
| 45 | std::array<char, 0x20> user{}; | ||
| 46 | std::array<char, 0x20> password{}; | ||
| 47 | INSERT_PADDING_BYTES(1); | ||
| 48 | }; | ||
| 49 | static_assert(sizeof(ProxySetting) == 0xAA, "ProxySetting has incorrect size."); | ||
| 50 | |||
| 51 | struct IpSettingData { | ||
| 52 | IpAddressSetting ip_address_setting{}; | ||
| 53 | DnsSetting dns_setting{}; | ||
| 54 | ProxySetting proxy_setting{}; | ||
| 55 | u16 mtu{}; | ||
| 56 | }; | ||
| 57 | static_assert(sizeof(IpSettingData) == 0xC2, "IpSettingData has incorrect size."); | ||
| 58 | |||
| 59 | struct SfWirelessSettingData { | ||
| 60 | u8 ssid_length{}; | ||
| 61 | std::array<char, 0x20> ssid{}; | ||
| 62 | u8 unknown_1{}; | ||
| 63 | u8 unknown_2{}; | ||
| 64 | u8 unknown_3{}; | ||
| 65 | std::array<char, 0x41> passphrase{}; | ||
| 66 | }; | ||
| 67 | static_assert(sizeof(SfWirelessSettingData) == 0x65, "SfWirelessSettingData has incorrect size."); | ||
| 68 | |||
| 69 | struct NifmWirelessSettingData { | ||
| 70 | u8 ssid_length{}; | ||
| 71 | std::array<char, 0x21> ssid{}; | ||
| 72 | u8 unknown_1{}; | ||
| 73 | INSERT_PADDING_BYTES(1); | ||
| 74 | u32 unknown_2{}; | ||
| 75 | u32 unknown_3{}; | ||
| 76 | std::array<char, 0x41> passphrase{}; | ||
| 77 | INSERT_PADDING_BYTES(3); | ||
| 78 | }; | ||
| 79 | static_assert(sizeof(NifmWirelessSettingData) == 0x70, | ||
| 80 | "NifmWirelessSettingData has incorrect size."); | ||
| 81 | |||
| 82 | #pragma pack(push, 1) | ||
| 83 | struct SfNetworkProfileData { | ||
| 84 | IpSettingData ip_setting_data{}; | ||
| 85 | u128 uuid{}; | ||
| 86 | std::array<char, 0x40> network_name{}; | ||
| 87 | u8 unknown_1{}; | ||
| 88 | u8 unknown_2{}; | ||
| 89 | u8 unknown_3{}; | ||
| 90 | u8 unknown_4{}; | ||
| 91 | SfWirelessSettingData wireless_setting_data{}; | ||
| 92 | INSERT_PADDING_BYTES(1); | ||
| 93 | }; | ||
| 94 | static_assert(sizeof(SfNetworkProfileData) == 0x17C, "SfNetworkProfileData has incorrect size."); | ||
| 95 | |||
| 96 | struct NifmNetworkProfileData { | ||
| 97 | u128 uuid{}; | ||
| 98 | std::array<char, 0x40> network_name{}; | ||
| 99 | u32 unknown_1{}; | ||
| 100 | u32 unknown_2{}; | ||
| 101 | u8 unknown_3{}; | ||
| 102 | u8 unknown_4{}; | ||
| 103 | INSERT_PADDING_BYTES(2); | ||
| 104 | NifmWirelessSettingData wireless_setting_data{}; | ||
| 105 | IpSettingData ip_setting_data{}; | ||
| 106 | }; | ||
| 107 | static_assert(sizeof(NifmNetworkProfileData) == 0x18E, | ||
| 108 | "NifmNetworkProfileData has incorrect size."); | ||
| 109 | #pragma pack(pop) | ||
| 110 | |||
| 24 | class IScanRequest final : public ServiceFramework<IScanRequest> { | 111 | class IScanRequest final : public ServiceFramework<IScanRequest> { |
| 25 | public: | 112 | public: |
| 26 | explicit IScanRequest(Core::System& system_) : ServiceFramework{system_, "IScanRequest"} { | 113 | explicit IScanRequest(Core::System& system_) : ServiceFramework{system_, "IScanRequest"} { |