Esempio n. 1
0
        private static int Dump(IPEndPoint ipEndPoint)
        {
            using PortMapperClient client = CreateClient(ipEndPoint);
            IReadOnlyList <Mapping> result = client.Dump();

            foreach (Mapping mapping in result)
            {
                Console.WriteLine(
                    $"Protocol: {mapping.Protocol}, Program: {mapping.Program}, " +
                    $"Version: {mapping.Version}, Port: {mapping.Port}");
            }

            return(0);
        }