Beispiel #1
0
        public LinuxTcpStatistics(bool ipv4)
        {
            _table = StringParsingHelpers.ParseTcpGlobalStatisticsFromSnmpFile(NetworkFiles.SnmpV4StatsFile);

            string sockstatFile = ipv4 ? NetworkFiles.SockstatFile : NetworkFiles.Sockstat6File;
            string protoName    = ipv4 ? "TCP" : "TCP6";

            _currentConnections = StringParsingHelpers.ParseNumSocketConnections(sockstatFile, protoName);
        }