libnx  v4.2.0
Macros | Functions | Variables
nxlink.h File Reference

Netloader (nxlink) utilities. More...

#include "../types.h"

Go to the source code of this file.

Macros

#define NXLINK_SERVER_PORT   28280
 nxlink TCP server port
 
#define NXLINK_CLIENT_PORT   28771
 nxlink TCP client port
 

Functions

int nxlinkConnectToHost (bool redirStdout, bool redirStderr)
 Connects to the nxlink host, setting up an output stream. More...
 
static int nxlinkStdio (void)
 Same as nxlinkConnectToHost but redirecting both stdout/stderr.
 
static int nxlinkStdioForDebug (void)
 Same as nxlinkConnectToHost but redirecting only stderr.
 

Variables

struct in_addr __nxlink_host
 Address of the host connected through nxlink.
 

Detailed Description

Netloader (nxlink) utilities.

Author
WinterMute

Function Documentation

◆ nxlinkConnectToHost()

int nxlinkConnectToHost ( bool  redirStdout,
bool  redirStderr 
)

Connects to the nxlink 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.