Class NetworkStack
Implement a Network Stack for all network devices and protocols
Inheritance
Inherited Members
Namespace: Cosmos.System.Network
Assembly: Cosmos.System2.dll
Syntax
public static class NetworkStack
Fields
| Improve this Doc View Sourcedebugger
Debugger instance of the "System" ring, with the "NetworkStack" tag.
Declaration
public static Debugger debugger
Field Value
Type | Description |
---|---|
Debugger |
Methods
| Improve this Doc View SourceConfigEmpty()
Check if Config is empty
Declaration
public static bool ConfigEmpty()
Returns
Type | Description |
---|---|
System.Boolean |
ConfigIP(NetworkDevice, IPConfig)
Configure a IP configuration on the given network device.
Declaration
public static void ConfigIP(NetworkDevice nic, IPConfig config)
Parameters
Type | Name | Description |
---|---|---|
NetworkDevice | nic | NetworkDevice that will have the assigned configuration |
IPConfig | config | Cosmos.System.Network.Config instance that defines the IP Address, Subnet Mask and Default Gateway for the device |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
|
System.ArgumentOutOfRangeException | Thrown on fatal error (contact support). |
System.OverflowException | Thrown on fatal error (contact support). |
Init()
Initialize the Network Stack to prepare it for operation.
Declaration
public static void Init()
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Thrown on fatal error (contact support). |
RemoveAllConfigIP()
Remove All IPConfig
Declaration
public static void RemoveAllConfigIP()
RemoveIPConfig(NetworkDevice)
Remove IPConfig
Declaration
public static void RemoveIPConfig(NetworkDevice nic)
Parameters
Type | Name | Description |
---|---|---|
NetworkDevice | nic | Network device. |
Update()
Called continously to keep the Network Stack going.
Declaration
public static void Update()
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown on fatal error (contact support). |
System.ArgumentOutOfRangeException | Thrown on memory error. |
System.OverflowException | Thrown if data length of any packet in the queue is bigger than Int32.MaxValue. |