libctru  v2.3.1
Macros | Functions | Variables
3dslink.h File Reference

Netloader (3dslink) utilities. More...

#include <stdbool.h>

Go to the source code of this file.

Macros

#define LINK3DS_COMM_PORT   17491
 3dslink TCP server port
 

Functions

int link3dsConnectToHost (bool redirStdout, bool redirStderr)
 Connects to the 3dslink host, setting up an output stream. More...
 
static int link3dsStdio (void)
 Same as link3dsConnectToHost but redirecting both stdout/stderr.
 
static int link3dsStdioForDebug (void)
 Same as link3dsConnectToHost but redirecting only stderr.
 

Variables

struct in_addr __3dslink_host
 Address of the host connected through 3dslink.
 

Detailed Description

Netloader (3dslink) utilities.

Function Documentation

◆ link3dsConnectToHost()

int link3dsConnectToHost ( bool  redirStdout,
bool  redirStderr 
)

Connects to the 3dslink host, setting up an output stream.

Parameters
[in]redirStdoutWhether to redirect stdout to nxlink output.
[in]redirStderrWhether to redirect stderr to nxlink output.
Returns
Socket fd on success, negative number on failure.
Note
The socket should be closed with close() during application cleanup.