KOS Network Configuration Management
More...
|
| Methods |
| Network connection methods
|
|
| Sources |
| Network configuration sources
|
|
|
file | netcfg.h |
| Network configuration interface.
|
|
KOS Network Configuration Management
◆ netcfg_load()
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
-
out | Buffer to store the parsed configuration. |
- Returns
- 0 on success, <0 on failure.
◆ netcfg_load_flash()
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
-
out | Buffer 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
-
fn | The file to read the configuration from. |
out | Buffer to store the parsed configuration. |
- Returns
- 0 on success, <0 on failure.
◆ netcfg_save()
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
-
cfg | The 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
-
fn | The file to save to. |
cfg | The configuration to save. |
- Returns
- 0 on success, <0 on failure.