KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
Configuration

KOS Network Configuration Management More...

Topics

 Methods
 Network connection methods
 
 Sources
 Network configuration sources
 

Files

file  netcfg.h
 Network configuration interface.
 

Data Structures

struct  netcfg_t
 Network configuration information. More...
 

Functions

int netcfg_load_from (const char *fn, netcfg_t *out)
 Load network configuration from a file.
 
int netcfg_load_flash (netcfg_t *out)
 Load network configuration from the Dreamcast's flashrom.
 
int netcfg_load (netcfg_t *out)
 Load network configuration.
 
int netcfg_save_to (const char *fn, const netcfg_t *cfg)
 Save network configuration to a file.
 
int netcfg_save (const netcfg_t *cfg)
 Save network configuration to the first available VMU.
 

Detailed Description

KOS Network Configuration Management

Function Documentation

◆ netcfg_load()

int netcfg_load ( netcfg_t * out)

Load network configuration.

This function loads the network configuration data, searching in multiple locations to attempt to find a file with a stored configuration. This function will attempt to read the configuration from each VMU first (from a file named net.cfg), then it will try the flashrom, followed by the current working directory, and lastly the root of the CD.

Parameters
outBuffer to store the parsed configuration.
Returns
0 on success, <0 on failure.

◆ netcfg_load_flash()

int netcfg_load_flash ( netcfg_t * out)

Load network configuration from the Dreamcast's flashrom.

This function loads the network configuration that is stored in flashrom of the Dreamcast, parsing it into a netcfg_t.

Note
This currently does not read the configuration stored by the PlanetWeb browser at all.
Parameters
outBuffer to store the parsed configuration.
Returns
0 on success, <0 on failure.

◆ netcfg_load_from()

int netcfg_load_from ( const char * fn,
netcfg_t * out )

Load network configuration from a file.

This function loads the network configuration that is stored in the given file to the network configuration structure passed in. This function will also handle files on the VMU with the VMU specific header attached without any extra work required.

Parameters
fnThe file to read the configuration from.
outBuffer to store the parsed configuration.
Returns
0 on success, <0 on failure.

◆ netcfg_save()

int netcfg_save ( const netcfg_t * cfg)

Save network configuration to the first available VMU.

This function saves the network configuration to first VMU that it finds. It will not retry if the first VMU doesn't have enough space to hold the file.

Parameters
cfgThe configuration to save.
Returns
0 on success, <0 on failure.

◆ netcfg_save_to()

int netcfg_save_to ( const char * fn,
const netcfg_t * cfg )

Save network configuration to a file.

This function saves the network configuration to the specified file. This function will automatically prepend the appropriate header if it is saved to a VMU.

Parameters
fnThe file to save to.
cfgThe configuration to save.
Returns
0 on success, <0 on failure.