private void RipUpdateEvent(object source, ElapsedEventArgs e) { foreach (var @interface in Interfaces.Where(item => (item.RipEnabled))) { @interface.Send(RipPacketFactory.CreateEthernetPacket(@interface, Routes.Where(item => !Equals(item.Origin, @interface)))); } }
public override void Process(Interface receiver, RipPacket packet) { if (packet.Command.Equals(RipPacket.RipCommand.Response)) { foreach (var ripRecord in packet.Records) { _router.Routes.Learn(ripRecord, receiver); } } else if (packet.Command.Equals(RipPacket.RipCommand.Request)) { receiver.Send(RipPacketFactory.CreateEthernetPacket(receiver, _router.Routes.Where(item => !Equals(item.Origin, receiver)), receiver.NetworkAddress)); } }