libctru  v2.4.1
Enumerations | Functions
ndm.h File Reference

NDMU service. More...

Go to the source code of this file.

Enumerations

enum  ndmExclusiveState {
  NDM_EXCLUSIVE_STATE_NONE = 0 ,
  NDM_EXCLUSIVE_STATE_INFRASTRUCTURE = 1 ,
  NDM_EXCLUSIVE_STATE_LOCAL_COMMUNICATIONS = 2 ,
  NDM_EXCLUSIVE_STATE_STREETPASS = 3 ,
  NDM_EXCLUSIVE_STATE_STREETPASS_DATA = 4
}
 Exclusive states.
 
enum  ndmState {
  NDM_STATE_INITIAL = 0 ,
  NDM_STATE_SUSPENDED = 1 ,
  NDM_STATE_INFRASTRUCTURE_CONNECTING = 2 ,
  NDM_STATE_INFRASTRUCTURE_CONNECTED = 3 ,
  NDM_STATE_INFRASTRUCTURE_WORKING = 4 ,
  NDM_STATE_INFRASTRUCTURE_SUSPENDING = 5 ,
  NDM_STATE_INFRASTRUCTURE_FORCE_SUSPENDING = 6 ,
  NDM_STATE_INFRASTRUCTURE_DISCONNECTING = 7 ,
  NDM_STATE_INFRASTRUCTURE_FORCE_DISCONNECTING = 8 ,
  NDM_STATE_CEC_WORKING = 9 ,
  NDM_STATE_CEC_FORCE_SUSPENDING = 10 ,
  NDM_STATE_CEC_SUSPENDING = 11
}
 Current states.
 
enum  ndmDaemon {
  NDM_DAEMON_CEC = 0 ,
  NDM_DAEMON_BOSS = 1 ,
  NDM_DAEMON_NIM = 2 ,
  NDM_DAEMON_FRIENDS = 3
}
 
enum  ndmDaemonMask {
  NDM_DAEMON_MASK_CEC = BIT(NDM_DAEMON_CEC) ,
  NDM_DAEMON_MASK_BOSS = BIT(NDM_DAEMON_BOSS) ,
  NDM_DAEMON_MASK_NIM = BIT(NDM_DAEMON_NIM) ,
  NDM_DAEMON_MASK_FRIENDS = BIT(NDM_DAEMON_FRIENDS) ,
  NDM_DAEMON_MASK_BACKGROUOND = NDM_DAEMON_MASK_CEC | NDM_DAEMON_MASK_BOSS | NDM_DAEMON_MASK_NIM ,
  NDM_DAEMON_MASK_ALL = NDM_DAEMON_MASK_CEC | NDM_DAEMON_MASK_BOSS | NDM_DAEMON_MASK_NIM | NDM_DAEMON_MASK_FRIENDS ,
  NDM_DAEMON_MASK_DEFAULT = NDM_DAEMON_MASK_CEC | NDM_DAEMON_MASK_FRIENDS
}
 Used to specify multiple daemons.
 
enum  ndmDaemonStatus {
  NDM_DAEMON_STATUS_BUSY = 0 ,
  NDM_DAEMON_STATUS_IDLE = 1 ,
  NDM_DAEMON_STATUS_SUSPENDING = 2 ,
  NDM_DAEMON_STATUS_SUSPENDED = 3
}
 

Functions

Result ndmuInit (void)
 Initializes ndmu.
 
void ndmuExit (void)
 Exits ndmu.
 
Result NDMU_EnterExclusiveState (ndmExclusiveState state)
 Sets the network daemon to an exclusive state. More...
 
Result NDMU_LeaveExclusiveState (void)
 Cancels an exclusive state for the network daemon.
 
Result NDMU_GetExclusiveState (ndmExclusiveState *state)
 Returns the exclusive state for the network daemon. More...
 
Result NDMU_LockState (void)
 Locks the exclusive state.
 
Result NDMU_UnlockState (void)
 Unlocks the exclusive state.
 
Result NDMU_SuspendDaemons (ndmDaemonMask mask)
 Suspends network daemon. More...
 
Result NDMU_ResumeDaemons (ndmDaemonMask mask)
 Resumes network daemon. More...
 
Result NDMU_SuspendScheduler (u32 flag)
 Suspends scheduling for all network daemons. More...
 
Result NDMU_ResumeScheduler (void)
 Resumes daemon scheduling.
 
Result NDMU_GetCurrentState (ndmState *state)
 Returns the current state for the network daemon. More...
 
Result NDMU_QueryStatus (ndmDaemon daemon, ndmDaemonStatus *status)
 Returns a daemon state. More...
 
Result NDMU_SetScanInterval (u32 interval)
 Sets the scan interval. More...
 
Result NDMU_GetScanInterval (u32 *interval)
 Returns the scan interval. More...
 
Result NDMU_GetRetryInterval (u32 *interval)
 Returns the retry interval. More...
 
Result NDMU_ResetDaemons (void)
 Reverts network daemon to defaults.
 
Result NDMU_GetDefaultDaemons (ndmDaemonMask *mask)
 Gets the current default daemon bit mask. More...
 
Result NDMU_ClearMacFilter (void)
 Clears half awake mac filter.
 

Detailed Description

NDMU service.

https://3dbrew.org/wiki/NDM_Services

Function Documentation

◆ NDMU_EnterExclusiveState()

Result NDMU_EnterExclusiveState ( ndmExclusiveState  state)

Sets the network daemon to an exclusive state.

Parameters
stateState specified in the ndmExclusiveState enumerator.

◆ NDMU_GetCurrentState()

Result NDMU_GetCurrentState ( ndmState state)

Returns the current state for the network daemon.

Parameters
statePointer to write the current state to.

◆ NDMU_GetDefaultDaemons()

Result NDMU_GetDefaultDaemons ( ndmDaemonMask mask)

Gets the current default daemon bit mask.

Parameters
intervalPointer to write the default daemon mask value to. The default value is (DAEMONMASK_CEC | DAEMONMASK_FRIENDS)

◆ NDMU_GetExclusiveState()

Result NDMU_GetExclusiveState ( ndmExclusiveState state)

Returns the exclusive state for the network daemon.

Parameters
statePointer to write the exclsuive state to.

◆ NDMU_GetRetryInterval()

Result NDMU_GetRetryInterval ( u32 interval)

Returns the retry interval.

Parameters
intervalPointer to write the interval value to.

◆ NDMU_GetScanInterval()

Result NDMU_GetScanInterval ( u32 interval)

Returns the scan interval.

Parameters
intervalPointer to write the interval value to.

◆ NDMU_QueryStatus()

Result NDMU_QueryStatus ( ndmDaemon  daemon,
ndmDaemonStatus *  status 
)

Returns a daemon state.

Parameters
daemonThe specified daemon.
statePointer to write the daemon state to.

◆ NDMU_ResumeDaemons()

Result NDMU_ResumeDaemons ( ndmDaemonMask  mask)

Resumes network daemon.

Parameters
maskThe specified daemon.

◆ NDMU_SetScanInterval()

Result NDMU_SetScanInterval ( u32  interval)

Sets the scan interval.

Parameters
intervalValue to set the scan interval to.

◆ NDMU_SuspendDaemons()

Result NDMU_SuspendDaemons ( ndmDaemonMask  mask)

Suspends network daemon.

Parameters
maskThe specified daemon.

◆ NDMU_SuspendScheduler()

Result NDMU_SuspendScheduler ( u32  flag)

Suspends scheduling for all network daemons.

Parameters
flag0 = Wait for completion, 1 = Perform in background.