Пример #1
0
        public static string dump_MIB_TCPSTATS(MIB_TCPSTATS mib)
        {
            string s = "";

            //retransmission timeout (RTO)
            s += "Retransmission timeout (min/max): ".PadLeft(34) + IPHelper.RtoAlgorithmStr[mib.dwRtoAlgorithm];
            s += ": " + mib.dwRtoMin.ToString() + "/" + mib.dwRtoMax.ToString();

            //max connections
            s += "\r\n" + "max connnections: ".PadLeft(34) + mib.dwMaxConn.ToString();

            //active open connection
            s += "\r\n" + "active open: ".PadLeft(34) + mib.dwActiveOpens.ToString();
            //passive open connection
            s += "\r\n" + "passive open: ".PadLeft(34) + mib.dwPassiveOpens.ToString();

            //failed attempts
            s += "\r\n" + "failed attempts: ".PadLeft(34) + mib.dwAttemptFails.ToString();

            //established resets
            s += "\r\n" + "established resets: ".PadLeft(34) + mib.dwEstabResets.ToString();

            //current established
            s += "\r\n" + "current established: ".PadLeft(34) + mib.dwCurrEstab.ToString();

            //data segs in
            s += "\r\n" + "segments in: ".PadLeft(34) + mib.dwInSegs.ToString();

            //data segs out
            s += "\r\n" + "segments out: ".PadLeft(34) + mib.dwOutSegs.ToString();

            //data segs re-transmitted
            s += "\r\n" + "retransmitted segments: ".PadLeft(34) + mib.dwRetransSegs.ToString();

            //errors received
            s += "\r\n" + "in errors: ".PadLeft(34) + mib.dwInErrs.ToString();

            //out resets
            s += "\r\n" + "out resets: ".PadLeft(34) + mib.dwOutRsts.ToString();

            //num connections
            s += "\r\n" + "num connections: ".PadLeft(34) + mib.dwNumConns.ToString();

            return(s);
        }
Пример #2
0
 public extern static int GetTcpStatistics(ref MIB_TCPSTATS pStats);
Пример #3
0
 public static extern int GetTcpStatistics(ref MIB_TCPSTATS pStats);
Пример #4
0
        public static string dump_MIB_TCPSTATS(MIB_TCPSTATS mib)
        {
            string s = "";
            //retransmission timeout (RTO)
            s += "Retransmission timeout (min/max): ".PadLeft(34) + IPHelper.RtoAlgorithmStr[mib.dwRtoAlgorithm];
            s += ": " + mib.dwRtoMin.ToString() + "/" + mib.dwRtoMax.ToString();

            //max connections
            s += "\r\n" + "max connnections: ".PadLeft(34) + mib.dwMaxConn.ToString();

            //active open connection
            s += "\r\n" + "active open: ".PadLeft(34) + mib.dwActiveOpens.ToString();
            //passive open connection
            s += "\r\n" + "passive open: ".PadLeft(34) + mib.dwPassiveOpens.ToString();

            //failed attempts
            s += "\r\n" + "failed attempts: ".PadLeft(34) + mib.dwAttemptFails.ToString();

            //established resets
            s += "\r\n" + "established resets: ".PadLeft(34) + mib.dwEstabResets.ToString();

            //current established
            s += "\r\n" + "current established: ".PadLeft(34) + mib.dwCurrEstab.ToString();

            //data segs in
            s += "\r\n" + "segments in: ".PadLeft(34) + mib.dwInSegs.ToString();

            //data segs out
            s += "\r\n" + "segments out: ".PadLeft(34) + mib.dwOutSegs.ToString();

            //data segs re-transmitted
            s += "\r\n" + "retransmitted segments: ".PadLeft(34) + mib.dwRetransSegs.ToString();

            //errors received
            s += "\r\n" + "in errors: ".PadLeft(34) + mib.dwInErrs.ToString();

            //out resets
            s += "\r\n" + "out resets: ".PadLeft(34) + mib.dwOutRsts.ToString();

            //num connections
            s += "\r\n" + "num connections: ".PadLeft(34) + mib.dwNumConns.ToString();

            return s;
        }