Пример #1
0
 public BufferEntry(NetworkDevice nic, IPPacket packet)
 {
     this.NIC = nic;
     this.Packet = packet;
     this.Status = EntryStatus.ADDED;
 }
Пример #2
0
 /// <summary>
 /// Configure a IP configuration on the given network device.
 /// <remarks>Multiple IP Configurations can be made, like *nix environments</remarks>
 /// </summary>
 /// <param name="nic"><see cref="Cosmos.HAL.NetworkDevice"/> that will have the assigned configuration</param>
 /// <param name="config"><see cref="Cosmos.System.Network.IPv4.Config"/> instance that defines the IP Address, Subnet
 /// Mask and Default Gateway for the device</param>
 public static void ConfigIP(NetworkDevice nic, IPv4.Config config)
 {
     AddressMap.Add(config.IPAddress.Hash, nic);
     IPv4.Config.Add(config);
     nic.DataReceived = HandlePacket;
 }