10 #include "../sf/service.h"
11 #include "../kernel/event.h"
124 char network_name[0x40];
136 char network_name[0x40];
212 Result nifmIsWirelessCommunicationEnabled(
bool* out);
220 Result nifmIsEthernetCommunicationEnabled(
bool* out);
228 Result nifmIsAnyForegroundRequestAccepted(
bool* out);
229 Result nifmPutToSleep(
void);
Result nifmRequestCancel(NifmRequest *r)
Cancel.
Result nifmRequestUnregisterSocketDescriptor(NifmRequest *r, int sockfd)
UnregisterSocketDescriptor.
Result nifmGetCurrentIpConfigInfo(u32 *current_addr, u32 *subnet_mask, u32 *gateway, u32 *primary_dns_server, u32 *secondary_dns_server)
GetCurrentIpConfigInfo.
Result nifmRequestSetKeptInSleep(NifmRequest *r, bool flag)
SetKeptInSleep.
Result nifmGetResult(NifmRequest *r)
GetResult.
Result nifmRequestGetAppletInfo(NifmRequest *r, u32 theme_color, void *buffer, size_t size, u32 *applet_id, u32 *mode, u32 *out_size)
GetAppletInfo.
Result nifmSetWowlDelayedWakeTime(s32 val)
SetWowlDelayedWakeTime.
Service * nifmGetServiceSession_GeneralService(void)
Gets the Service object for IGeneralService.
Result nifmGetCurrentNetworkProfile(NifmNetworkProfileData *profile)
GetCurrentNetworkProfile.
Result nifmRequestSubmitAndWait(NifmRequest *r)
SubmitAndWait.
Result nifmSetWirelessCommunicationEnabled(bool enable)
Result nifmInitialize(NifmServiceType service_type)
Initialize nifm. This is used automatically by gethostid().
Result nifmRequestSubmit(NifmRequest *r)
Submit.
Result nifmGetNetworkProfile(Uuid uuid, NifmNetworkProfileData *profile)
GetNetworkProfile.
NifmServiceType
Definition: nifm.h:13
@ NifmServiceType_Admin
Initializes nifm:a.
Definition: nifm.h:16
@ NifmServiceType_System
Initializes nifm:s.
Definition: nifm.h:15
@ NifmServiceType_User
Initializes nifm:u.
Definition: nifm.h:14
NifmInternetConnectionType
Definition: nifm.h:19
@ NifmInternetConnectionType_Ethernet
Ethernet connection is used.
Definition: nifm.h:21
@ NifmInternetConnectionType_WiFi
Wi-Fi connection is used.
Definition: nifm.h:20
Result nifmSetNetworkProfile(const NifmNetworkProfileData *profile, Uuid *uuid)
SetNetworkProfile.
NifmClientId nifmGetClientId(void)
GetClientId.
Result nifmGetRequestState(NifmRequest *r, NifmRequestState *out)
GetRequestState.
NifmInternetConnectionStatus
Definition: nifm.h:24
@ NifmInternetConnectionStatus_Connected
Internet is connected.
Definition: nifm.h:29
@ NifmInternetConnectionStatus_ConnectingUnknown2
Unknown internet connection status 2.
Definition: nifm.h:26
@ NifmInternetConnectionStatus_ConnectingUnknown3
Unknown internet connection status 3 (conntest?).
Definition: nifm.h:27
@ NifmInternetConnectionStatus_ConnectingUnknown1
Unknown internet connection status 1.
Definition: nifm.h:25
@ NifmInternetConnectionStatus_ConnectingUnknown4
Unknown internet connection status 4.
Definition: nifm.h:28
void nifmRequestClose(NifmRequest *r)
Close a NifmRequest.
Result nifmGetInternetConnectionStatus(NifmInternetConnectionType *connectionType, u32 *wifiStrength, NifmInternetConnectionStatus *connectionStatus)
NifmRequestState
Definition: nifm.h:32
@ NifmRequestState_Unknown5
Unknown.
Definition: nifm.h:38
@ NifmRequestState_OnHold
OnHold.
Definition: nifm.h:35
@ NifmRequestState_Unknown1
Not yet submitted or error.
Definition: nifm.h:34
@ NifmRequestState_Available
Available.
Definition: nifm.h:36
@ NifmRequestState_Unknown4
Unknown.
Definition: nifm.h:37
@ NifmRequestState_Invalid
Error.
Definition: nifm.h:33
Result nifmRequestRegisterSocketDescriptor(NifmRequest *r, int sockfd)
RegisterSocketDescriptor.
bool nifmIsAnyInternetRequestAccepted(NifmClientId id)
IsAnyInternetRequestAccepted.
void nifmExit(void)
Exit nifm. This is used automatically by gethostid().
Service * nifmGetServiceSession_StaticService(void)
Gets the Service object for the actual nifm:* service session.
Result nifmGetCurrentIpAddress(u32 *out)
GetCurrentIpAddress.
Result nifmCreateRequest(NifmRequest *r, bool autoclear)
CreateRequest.
Kernel-mode event structure.
Definition: event.h:13
ClientId.
Definition: nifm.h:52
u32 id
ClientId.
Definition: nifm.h:53
DnsSetting.
Definition: nifm.h:71
NifmIpV4Address secondary_dns_server
Secondary DNS server.
Definition: nifm.h:75
u8 is_automatic
Whether this setting is automatic. Ignored by nifmGetCurrentIpConfigInfo.
Definition: nifm.h:72
NifmIpV4Address primary_dns_server
Primary DNS server.
Definition: nifm.h:74
IpAddressSetting.
Definition: nifm.h:62
NifmIpV4Address gateway
Gateway.
Definition: nifm.h:67
NifmIpV4Address current_addr
Current address.
Definition: nifm.h:65
NifmIpV4Address subnet_mask
Subnet Mask.
Definition: nifm.h:66
u8 is_automatic
Whether this setting is automatic. Ignored by nifmGetCurrentIpConfigInfo.
Definition: nifm.h:63
IpSettingData.
Definition: nifm.h:91
NifmIpAddressSetting ip_address_setting
NifmIpAddressSetting
Definition: nifm.h:92
NifmProxySetting proxy_setting
NifmProxySetting
Definition: nifm.h:94
NifmDnsSetting dns_setting
NifmDnsSetting
Definition: nifm.h:93
u16 mtu
MTU.
Definition: nifm.h:95
IpV4Address.
Definition: nifm.h:57
NetworkProfileData. Converted from/to NifmSfNetworkProfileData.
Definition: nifm.h:134
Uuid uuid
NifmSfNetworkProfileData::uuid.
Definition: nifm.h:135
NifmIpSettingData ip_setting_data
NifmIpSettingData
Definition: nifm.h:143
u8 unk_x59
NifmSfNetworkProfileData::unk_x115.
Definition: nifm.h:140
u32 unk_x54
NifmSfNetworkProfileData::unk_x113.
Definition: nifm.h:138
u8 unk_x58
NifmSfNetworkProfileData::unk_x114.
Definition: nifm.h:139
u32 unk_x50
NifmSfNetworkProfileData::unk_x112.
Definition: nifm.h:137
NifmWirelessSettingData wireless_setting_data
NifmWirelessSettingData
Definition: nifm.h:142
ProxySetting.
Definition: nifm.h:79
u8 pad2
Padding.
Definition: nifm.h:87
u16 port
Port.
Definition: nifm.h:82
u8 auto_auth_enabled
Enables auto-authentication when set, which uses the following two strings.
Definition: nifm.h:84
u8 pad
Padding.
Definition: nifm.h:81
u8 enabled
Enables using the proxy when set.
Definition: nifm.h:80
Request.
Definition: nifm.h:42
NifmRequestState request_state
NifmRequestState from the GetRequestState cmd.
Definition: nifm.h:47
Result res
Result from the GetResult cmd.
Definition: nifm.h:48
Service s
IRequest.
Definition: nifm.h:43
Event event1
Second Event from cmd GetSystemEventReadableHandles.
Definition: nifm.h:45
Event event_request_state
First Event from cmd GetSystemEventReadableHandles, autoclear=true. Signaled when the RequestState ch...
Definition: nifm.h:44
SfNetworkProfileData. Converted to/from NifmNetworkProfileData.
Definition: nifm.h:121
NifmIpSettingData ip_setting_data
NifmIpSettingData
Definition: nifm.h:122
u8 unk_x115
Unknown.
Definition: nifm.h:128
Uuid uuid
Uuid.
Definition: nifm.h:123
u8 unk_x114
Unknown.
Definition: nifm.h:127
u8 unk_x113
Unknown.
Definition: nifm.h:126
u8 unk_x112
Unknown.
Definition: nifm.h:125
NifmSfWirelessSettingData wireless_setting_data
NifmSfWirelessSettingData
Definition: nifm.h:129
u8 pad
Padding.
Definition: nifm.h:130
SfWirelessSettingData.
Definition: nifm.h:111
u8 unk_x21
Unknown.
Definition: nifm.h:114
u8 unk_x22
Unknown.
Definition: nifm.h:115
u8 ssid_len
SSID length.
Definition: nifm.h:112
u8 unk_x23
Unknown.
Definition: nifm.h:116
WirelessSettingData.
Definition: nifm.h:99
u32 unk_x28
NifmSfWirelessSettingData::unk_x23.
Definition: nifm.h:105
u8 ssid_len
NifmSfWirelessSettingData::ssid_len.
Definition: nifm.h:100
u32 unk_x24
NifmSfWirelessSettingData::unk_x22.
Definition: nifm.h:104
u8 pad
Padding.
Definition: nifm.h:103
u8 unk_x22
NifmSfWirelessSettingData::unk_x21.
Definition: nifm.h:102
Service object structure.
Definition: service.h:14
uint8_t u8
8-bit unsigned integer.
Definition: types.h:19
uint16_t u16
16-bit unsigned integer.
Definition: types.h:20
u32 Result
Function error code result type.
Definition: types.h:44
int32_t s32
32-bit signed integer.
Definition: types.h:27
uint32_t u32
32-bit unsigned integer.
Definition: types.h:21