コード例 #1
0
ファイル: NetworkRouter.cs プロジェクト: Sibyx/BinksRouter
 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))));
     }
 }
コード例 #2
0
ファイル: Rip2Protocol.cs プロジェクト: Sibyx/BinksRouter
 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));
     }
 }