Class NetworkConfiguration
Represents the global network stack configuration.
Inheritance
Inherited Members
Namespace: Cosmos.System.Network.Config
Assembly: Cosmos.System2.dll
Syntax
public static class NetworkConfiguration
Fields
| Improve this Doc View SourceNetworkConfigs
The current network configuration list used by the network stack.
Declaration
public static readonly List<NetworkConfig> NetworkConfigs
Field Value
Type | Description |
---|---|
System.Collections.Generic.List<NetworkConfig> |
Properties
| Improve this Doc View SourceCount
Gets the amount of available network configurations.
Declaration
public static int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
CurrentAddress
Gets the current IPv4 address.
Declaration
public static Address CurrentAddress { get; }
Property Value
Type | Description |
---|---|
Address |
CurrentNetworkConfig
The current network configuration used by the network stack.
Declaration
public static NetworkConfig CurrentNetworkConfig { get; set; }
Property Value
Type | Description |
---|---|
NetworkConfig |
Methods
| Improve this Doc View SourceAddConfig(NetworkDevice, IPConfig)
Adds a new network configuration.
Declaration
public static void AddConfig(NetworkDevice device, IPConfig config)
Parameters
Type | Name | Description |
---|---|---|
NetworkDevice | device | The network device to use. |
IPConfig | config | The IPv4 configuration associated with the device to use. |
ClearConfigs()
Clears network configurations, removing each configuration.
Declaration
public static void ClearConfigs()
ConfigsContainsDevice(NetworkDevice)
Returns whether the network stack contains the given network device.
Declaration
public static bool ConfigsContainsDevice(NetworkDevice targetDevice)
Parameters
Type | Name | Description |
---|---|---|
NetworkDevice | targetDevice |
Returns
Type | Description |
---|---|
System.Boolean |
Get(NetworkDevice)
Get the IPv4 configuration for the given network device.
Declaration
public static IPConfig Get(NetworkDevice device)
Parameters
Type | Name | Description |
---|---|---|
NetworkDevice | device | Network device. |
Returns
Type | Description |
---|---|
IPConfig |
Remove(NetworkDevice)
Remove the configuration for the given network device.
Declaration
public static void Remove(NetworkDevice key)
Parameters
Type | Name | Description |
---|---|---|
NetworkDevice | key | The target network device. |
SetCurrentConfig(NetworkDevice, IPConfig)
Sets the configuration of the current network.
Declaration
public static void SetCurrentConfig(NetworkDevice device, IPConfig config)
Parameters
Type | Name | Description |
---|---|---|
NetworkDevice | device | The network device to use. |
IPConfig | config | The IPv4 configuration associated with the device to use. |