Skip to content

ryu_ldn::ipc::ConfigService

Configuration IPC service implementation.

void ConfigService()
ams::Result GetVersion(ams::sf::Out< std::array< char, 32 > > out)

Get the sysmodule version string.

Returns the current version of the ryu_ldn_nx sysmodule. Format: “MAJOR.MINOR.PATCH” (e.g., “1.0.0”)outOutput buffer for version string (32 bytes, null-terminated)paramAlways succeedsreturn

Parameters:

  • out (ams::sf::Out&lt; std::array&lt; char, 32 &gt; &gt;)

Returns: ams::Result

ams::Result GetConnectionStatus(ams::sf::Out< u32 > out)

Get the current connection status.

Returns status code indicating the sysmodule’s operational state.Status codes:outOutput status codeparamAlways succeedsreturn

Parameters:

  • out (ams::sf::Out&lt; u32 &gt;)

Returns: ams::Result

ams::Result GetPassphrase(ams::sf::Out< std::array< char, 64 > > out)

Get the current room passphrase.

Returns the passphrase used to filter LDN rooms. Empty string means public/no filtering.outOutput buffer for passphrase (64 bytes, null-terminated)paramAlways succeedsreturn

Parameters:

  • out (ams::sf::Out&lt; std::array&lt; char, 64 &gt; &gt;)

Returns: ams::Result

ams::Result SetPassphrase(std::array< char, 64 > passphrase)

Set the room passphrase.

Changes the passphrase in memory. Call SaveConfig to persist.passphraseNew passphrase (64 bytes, null-terminated)paramAlways succeedsreturn

Parameters:

  • passphrase (std::array&lt; char, 64 &gt;)

Returns: ams::Result

ams::Result GetServerAddress(ams::sf::Out<> out)

Get the server address (host and port)

Returns the Ryujinx LDN server address currently configured.outOutput structure with host (64 bytes) and port (u16)paramAlways succeedsreturn

Parameters:

  • out (ams::sf::Out&lt;&gt;)

Returns: ams::Result

ams::Result SetServerAddress(ServerAddressIpc address)

Set the server address (host and port)

Changes the server address in memory. Call SaveConfig to persist. Requires restart/reconnect to take effect.addressNew server address structureparamAlways succeedsreturn

Parameters:

  • address (ServerAddressIpc)

Returns: ams::Result

ams::Result GetLdnEnabled(ams::sf::Out< u32 > out)

Check if LDN emulation is enabled.

When disabled, the sysmodule does not intercept LDN calls.outOutput: 1 = enabled, 0 = disabledparamAlways succeedsreturn

Parameters:

  • out (ams::sf::Out&lt; u32 &gt;)

Returns: ams::Result

ams::Result SetLdnEnabled(u32 enabled)

Enable or disable LDN emulation.

Changes the setting in memory. Call SaveConfig to persist.enabled1 = enable, 0 = disableparamAlways succeedsreturn

Parameters:

  • enabled (u32)

Returns: ams::Result

ams::Result GetUseTls(ams::sf::Out< u32 > out)

Check if TLS is enabled for server connection.

outOutput: 1 = TLS enabled, 0 = plaintextparamAlways succeedsreturn

Parameters:

  • out (ams::sf::Out&lt; u32 &gt;)

Returns: ams::Result

ams::Result SetUseTls(u32 enabled)

Enable or disable TLS for server connection.

Changes the setting in memory. Call SaveConfig to persist. Requires restart/reconnect to take effect.enabled1 = enable TLS, 0 = disableparamAlways succeedsreturn

Parameters:

  • enabled (u32)

Returns: ams::Result

ams::Result GetDebugEnabled(ams::sf::Out< u32 > out)

Check if debug logging is enabled.

outOutput: 1 = enabled, 0 = disabledparamAlways succeedsreturn

Parameters:

  • out (ams::sf::Out&lt; u32 &gt;)

Returns: ams::Result

ams::Result SetDebugEnabled(u32 enabled)

Enable or disable debug logging.

enabled1 = enable, 0 = disableparamAlways succeedsreturn

Parameters:

  • enabled (u32)

Returns: ams::Result

ams::Result GetDebugLevel(ams::sf::Out< u32 > out)

Get the current debug log level.

Log levels:outOutput log level (0-3)paramAlways succeedsreturn

Parameters:

  • out (ams::sf::Out&lt; u32 &gt;)

Returns: ams::Result

ams::Result SetDebugLevel(u32 level)

Set the debug log level.

levelNew log level (0-3)paramAlways succeedsreturn

Parameters:

  • level (u32)

Returns: ams::Result

ams::Result GetLogToFile(ams::sf::Out< u32 > out)

Check if file logging is enabled.

When enabled, logs are written to SD card at /config/ryu_ldn_nx/ryu_ldn_nx.logoutOutput: 1 = enabled, 0 = disabledparamAlways succeedsreturn

Parameters:

  • out (ams::sf::Out&lt; u32 &gt;)

Returns: ams::Result

ams::Result SetLogToFile(u32 enabled)

Enable or disable file logging.

enabled1 = enable, 0 = disableparamAlways succeedsreturn

Parameters:

  • enabled (u32)

Returns: ams::Result

ams::Result GetConnectTimeout(ams::sf::Out< u32 > out)

Get the connection timeout in milliseconds.

Maximum time to wait when establishing connection to server.outOutput timeout in millisecondsparamAlways succeedsreturn

Parameters:

  • out (ams::sf::Out&lt; u32 &gt;)

Returns: ams::Result

ams::Result SetConnectTimeout(u32 timeout_ms)

Set the connection timeout in milliseconds.

timeout_msNew timeout valueparamAlways succeedsreturn

Parameters:

  • timeout_ms (u32)

Returns: ams::Result

ams::Result GetPingInterval(ams::sf::Out< u32 > out)

Get the ping interval in milliseconds.

How often to send keepalive pings to the server.outOutput interval in millisecondsparamAlways succeedsreturn

Parameters:

  • out (ams::sf::Out&lt; u32 &gt;)

Returns: ams::Result

ams::Result SetPingInterval(u32 interval_ms)

Set the ping interval in milliseconds.

interval_msNew interval valueparamAlways succeedsreturn

Parameters:

  • interval_ms (u32)

Returns: ams::Result

ams::Result SaveConfig(ams::sf::Out<> out)

Save current configuration to SD card.

Writes the current in-memory configuration to /config/ryu_ldn_nx/config.ini. This persists any changes made via Set* commands.outOutput result code:paramAlways succeeds (check out for actual result)return

Parameters:

  • out (ams::sf::Out&lt;&gt;)

Returns: ams::Result

ams::Result ReloadConfig(ams::sf::Out<> out)

Reload configuration from SD card.

Discards any unsaved in-memory changes and reloads from config.ini. Useful to revert changes or pick up external modifications.outOutput result code:paramAlways succeeds (check out for actual result)return

Parameters:

  • out (ams::sf::Out&lt;&gt;)

Returns: ams::Result

ams::Result IsServiceActive(ams::sf::Out< u32 > out)

Check if the IPC service is active.

Simple ping to verify the service is responding. If this call succeeds, the sysmodule is loaded and the IPC service is operational.outOutput: 1 = active, 0 = inactive (never returned)paramAlways succeedsreturn

Parameters:

  • out (ams::sf::Out&lt; u32 &gt;)

Returns: ams::Result

ams::Result IsGameActive(ams::sf::Out< u32 > out)

Returns 1 if a game is actively using LDN, 0 otherwise.

Check if a game is actively using LDN.Returns 1 if a game has initialized the LDN service (ldn:u), 0 otherwise. Used by overlay to determine what UI to show.outOutput: 1 = game active, 0 = no gameparamAlways succeedsreturn

Parameters:

  • out (ams::sf::Out&lt; u32 &gt;)

Returns: ams::Result

ams::Result GetLdnState(ams::sf::Out< u32 > out)

Returns current LDN CommState (0=None, 1=Initialized, etc.)

Get the current LDN communication state.Returns the CommState enum value representing current LDN state:outOutput state value (0-6)paramAlways succeedsreturn

Parameters:

  • out (ams::sf::Out&lt; u32 &gt;)

Returns: ams::Result

ams::Result GetSessionInfo(ams::sf::Out<> out)

Returns session information (node count, max, local id, is_host)

Get session information.Returns current session info: node count, max nodes, local node ID, and whether this node is the host.outOutputstructureparamAlways succeedsreturn

Parameters:

  • out (ams::sf::Out&lt;&gt;)

Returns: ams::Result

ams::Result GetLastRtt(ams::sf::Out< u32 > out)

Returns last measured RTT in milliseconds.

Get last measured RTT.Returns the last round-trip time measurement in milliseconds. 0 means no RTT has been measured yet.outOutput RTT in millisecondsparamAlways succeedsreturn

Parameters:

  • out (ams::sf::Out&lt; u32 &gt;)

Returns: ams::Result

ams::Result ForceReconnect()

Requests the MITM service to reconnect.

Request reconnection.Sets a flag that the MITM service will check to trigger a reconnect. Useful when network conditions change or connection is lost.Always succeedsreturn

Returns: ams::Result

ams::Result GetActiveProcessId(ams::sf::Out< u64 > out)

Returns the process ID of the active game (for debugging)

Get the process ID of the active game.Returns the process ID of the game currently using LDN. Useful for debugging and logging.outOutput process ID (0 if no game active)paramAlways succeedsreturn

Parameters:

  • out (ams::sf::Out&lt; u64 &gt;)

Returns: ams::Result

ams::Result GetDisableP2p(ams::sf::Out< u32 > out)

Returns 1 if P2P proxy is disabled.

Get P2P proxy disabled state.Returns whether P2P proxy is disabled (like Ryujinx MultiplayerDisableP2p).outOutput: 1 if disabled, 0 if enabledparamAlways succeedsreturn

Parameters:

  • out (ams::sf::Out&lt; u32 &gt;)

Returns: ams::Result

ams::Result SetDisableP2p(u32 disabled)

Sets P2P proxy disabled state (like Ryujinx MultiplayerDisableP2p)

Set P2P proxy disabled state.Sets whether P2P proxy should be disabled (like Ryujinx MultiplayerDisableP2p). When disabled, the server will not attempt P2P connections.disabled1 to disable P2P, 0 to enableparamAlways succeedsreturn

Parameters:

  • disabled (u32)

Returns: ams::Result