libctru  v1.6.0
Enumerations | Functions
ndm.h File Reference

NDMU service. More...

Go to the source code of this file.

Enumerations

enum  ndmExclusiveState {
  EXCLUSIVE_STATE_NONE = 0,
  EXCLUSIVE_STATE_INFRASTRUCTURE = 1,
  EXCLUSIVE_STATE_LOCAL_COMMUNICATIONS = 2,
  EXCLUSIVE_STATE_STREETPASS = 3,
  EXCLUSIVE_STATE_STREETPASS_DATA = 4
}
 Exclusive states.
 
enum  ndmState {
  STATE_INITIAL = 0,
  STATE_SUSPENDED = 1,
  STATE_INFRASTRUCTURE_CONNECTING = 2,
  STATE_INFRASTRUCTURE_CONNECTED = 3,
  STATE_INFRASTRUCTURE_WORKING = 4,
  STATE_INFRASTRUCTURE_SUSPENDING = 5,
  STATE_INFRASTRUCTURE_FORCE_SUSPENDING = 6,
  STATE_INFRASTRUCTURE_DISCONNECTING = 7,
  STATE_INFRASTRUCTURE_FORCE_DISCONNECTING = 8,
  STATE_CEC_WORKING = 9,
  STATE_CEC_FORCE_SUSPENDING = 10,
  STATE_CEC_SUSPENDING = 11
}
 Current states.
 
enum  ndmDaemon {
  DAEMON_CEC = 0,
  DAEMON_BOSS = 1,
  DAEMON_NIM = 2,
  DAEMON_FRIENDS = 3
}
 
enum  ndmDaemonMask {
  DAEMON_MASK_CEC = BIT(DAEMON_CEC),
  DAEMON_MASK_BOSS = BIT(DAEMON_BOSS),
  DAEMON_MASK_NIM = BIT(DAEMON_NIM),
  DAEMON_MASK_FRIENDS = BIT(DAEMON_FRIENDS),
  DAEMON_MASK_BACKGROUOND = DAEMON_MASK_CEC | DAEMON_MASK_BOSS | DAEMON_MASK_NIM,
  DAEMON_MASK_ALL = DAEMON_MASK_CEC | DAEMON_MASK_BOSS | DAEMON_MASK_NIM | DAEMON_MASK_FRIENDS,
  DAEMON_MASK_DEFAULT = DAEMON_MASK_CEC | DAEMON_MASK_FRIENDS
}
 Used to specify multiple daemons.
 
enum  ndmDaemonStatus {
  DAEMON_STATUS_BUSY = 0,
  DAEMON_STATUS_IDLE = 1,
  DAEMON_STATUS_SUSPENDING = 2,
  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 (ndmDaemonStatus *status)
 Returns the 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 ( ndmDaemonStatus *  status)

Returns the daemon state.

Parameters
statePointer to write the daemons 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.