ams::mitm::ldn::LdnMitMService
ams::mitm::ldn::LdnMitMService
Section titled “ams::mitm::ldn::LdnMitMService”LDN MITM Service implementation.
This class implements the ldn:u MITM service. When a game opens ldn:u, this service intercepts the calls and creates our custominstead of the original Nintendo service.
Members
Section titled “Members”m_program_id
Section titled “m_program_id”Type: ncm::ProgramId
Program ID of the client process.
m_client_pid
Section titled “m_client_pid”Type: u64
Process ID of the client (for BSD MITM tracking)
Methods
Section titled “Methods”LdnMitMService
Section titled “LdnMitMService”void LdnMitMService(std::shared_ptr<::Service > && s, const sm::MitmProcessInfo & c)Constructor.
sShared pointer to the original servicecMITM process info for the clientparam
Parameters:
s(std::shared_ptr<::Service > &&)c(const sm::MitmProcessInfo &)
~LdnMitMService
Section titled “~LdnMitMService”void ~LdnMitMService()Destructor.
CreateUserLocalCommunicationService
Section titled “CreateUserLocalCommunicationService”Result CreateUserLocalCommunicationService(sf::Out< sf::SharedPointer< ICommunicationInterface > > out)Create the communication service.
This is the main entry point for games. When they call CreateUserLocalCommunicationService, we create our customthat communicates with the RyuLdn server.outOutput pointer for the created serviceparamResult codereturn
Parameters:
out(sf::Out< sf::SharedPointer< ICommunicationInterface > >)
Returns: Result
CreateClientProcessMonitor
Section titled “CreateClientProcessMonitor”Result CreateClientProcessMonitor(sf::Out< sf::SharedPointer< IClientProcessMonitorInterface > > out)Create the client process monitor.
Required for firmware 18.0.0+ compatibility. This is a stub implementation - games require it but don’t use it.outOutput pointer for the created monitorparamResult codereturn
Parameters:
out(sf::Out< sf::SharedPointer< IClientProcessMonitorInterface > >)
Returns: Result
Methods
Section titled “Methods”ShouldMitm
Section titled “ShouldMitm”bool ShouldMitm(const sm::MitmProcessInfo & client_info)Determine if we should MITM this process.
This is called by Atmosphere to determine if we should intercept calls from a specific process. We always return true to intercept all LDN calls.client_infoProcess information for the clientparamtrue Always interceptreturn
Parameters:
client_info(const sm::MitmProcessInfo &)
Returns: bool