public static void RunDataPathValidation(WiFiDirectTestController localWFDController, WiFiDirectTestController remoteWFDController, string port = "5001")
        {
            // Close existing socket connections
            localWFDController.ResetDataPathTester();
            remoteWFDController.ResetDataPathTester();

            // Turn off the listen state on the remote device before working with sockets.
            remoteWFDController.ConfigureListenState(false);

            remoteWFDController.StartStreamSocketListener(port);
            localWFDController.ConnectStreamSocketAndSendGuid(port);
            remoteWFDController.WaitForSocketConnectionReceived(); // Wait for the connection received callback to complete so the DataPathTestGuid is properly initialized

            // Save GUID values to a local variable, to avoid having them change between the comparison and log prints below
            Guid localTestGuid  = localWFDController.DataPathTestGuid;
            Guid remoteTestGuid = remoteWFDController.DataPathTestGuid;

            if (remoteTestGuid != localTestGuid)
            {
                WiFiDirectTestLogger.Error("Received GUID value of {0} did not match transmitted value of {1}", remoteTestGuid, localTestGuid);
                return;
            }
            WiFiDirectTestLogger.Log("Validated transmitted and received GUID values match.");
        }
        private void ExecuteInternal()
        {
            try
            {
                if (discoverTestIe)
                {
                    remoteWFDController.SetTestIe();
                }

                if (discoveryScenarioType == DiscoveryScenarioType.DiscoverAsDevice)
                {
                    // Enable listen state on the remote device if it is not already enabled.
                    remoteWFDController.ConfigureListenState(true);
                }
                else if (discoveryScenarioType == DiscoveryScenarioType.DiscoverAsGo)
                {
                    // Start autonomous GO on the remote device if it is not already running
                    remoteWFDController.StartAutonomousGo();
                }

                // Flush the visible device list on the local device
                localWFDController.FlushVisibleDeviceList();

                Stopwatch stopwatch = new Stopwatch();
                stopwatch.Start();

                WfdDeviceDescriptor discoveredDeviceDescriptor;
                if (isTargetedDiscovery)
                {
                    discoveredDeviceDescriptor = PerformTargetedDiscovery();
                }
                else
                {
                    discoveredDeviceDescriptor = PerformWildcardDiscovery();
                }

                if (discoveredDeviceDescriptor == null)
                {
                    return;
                }

                WiFiDirectTestLogger.Log("Successfully discovered device {0} ({1})", remoteWFDController.DeviceAddress, remoteWFDController.MachineName);

                stopwatch.Stop();
                WiFiDirectTestLogger.Log("Discovery completed in {0} ms.", stopwatch.ElapsedMilliseconds);

                if (discoverTestIe)
                {
                    Guid discoveredGuid;
                    bool parsed = TestIeManager.TryParseIeBuffer(discoveredDeviceDescriptor.IE, out discoveredGuid);
                    if (!parsed)
                    {
                        WiFiDirectTestLogger.Error("Expected vendor extension IE not present in discovery result.");
                        return;
                    }

                    if (discoveredGuid == remoteWFDController.CurrentIEGuid)
                    {
                        WiFiDirectTestLogger.Log("Validated expected GUID {0} is present in vendor extension IE.", discoveredGuid);
                    }
                    else
                    {
                        WiFiDirectTestLogger.Error("Found incorrect GUID in vendor extension IE.  Expected: {0}, Found: {1}", remoteWFDController.CurrentIEGuid, discoveredGuid);
                        return;
                    }
                }

                succeeded = true;
            }
            catch (Exception e)
            {
                WiFiDirectTestLogger.Error("Caught exception while running discovery scenario: {0}", e);
            }
        }