From 8e0fdd9105fa54f68fe50b370ae10042033fb5ed Mon Sep 17 00:00:00 2001 From: Tim Young Date: Fri, 4 May 2018 13:00:44 -0500 Subject: [PATCH] Get traceroute using ActionClass --- EduNetworkBuilder/NB.cs | 13 +++++++++++++ EduNetworkBuilder/NetworkBuilder.cs | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/EduNetworkBuilder/NB.cs b/EduNetworkBuilder/NB.cs index 4353a0c..0d14ad7 100644 --- a/EduNetworkBuilder/NB.cs +++ b/EduNetworkBuilder/NB.cs @@ -1392,6 +1392,19 @@ namespace EduNetworkBuilder AC.DoAction(); + } + + public static void DoActionTracertDevice(int HostID, NB_IPAddress Destination) + { + ActionClass AC = new ActionClass(); + AC.Action = NBAction.traceroute; + AC.SourceID = HostID; + AC.Destination = Destination; + + RegisterAction(AC); + + AC.DoAction(); + } #endregion ActionFunctions diff --git a/EduNetworkBuilder/NetworkBuilder.cs b/EduNetworkBuilder/NetworkBuilder.cs index 0dece69..0edfe35 100644 --- a/EduNetworkBuilder/NetworkBuilder.cs +++ b/EduNetworkBuilder/NetworkBuilder.cs @@ -1465,7 +1465,8 @@ namespace EduNetworkBuilder destination = myNetwork.DNSLookup(ItemClickedOn, dest); if (destination == null || destination.GetIPString == NB.ZeroIPString) destination = new NB_IPAddress(dest); - ItemClickedOn.TracerouteFromHere(destination); + //ItemClickedOn.TracerouteFromHere(destination); + NB.DoActionTracertDevice(ItemClickedOn.GetUniqueIdentifier, destination); myNetwork.ProcessPackets(); UpdateMessages(); }