Exemple #1
0
        public override TcpConnectionInformation[] GetActiveTcpConnections()
        {
            List <string[]> list = new List <string[]>();

            this.GetRows(this.TcpFile, list);
            this.GetRows(this.Tcp6File, list);
            TcpConnectionInformation[] array = new TcpConnectionInformation[list.Count];
            for (int i = 0; i < array.Length; i++)
            {
                IPEndPoint local  = this.ToEndpoint(list[i][1]);
                IPEndPoint remote = this.ToEndpoint(list[i][2]);
                TcpState   state  = (TcpState)int.Parse(list[i][3], NumberStyles.HexNumber);
                array[i] = new TcpConnectionInformationImpl(local, remote, state);
            }
            return(array);
        }
Exemple #2
0
        public override TcpConnectionInformation [] GetActiveTcpConnections()
        {
            List <string []> list = new List <string []> ();

            GetRows(TcpFile, list);
            GetRows(Tcp6File, list);

            TcpConnectionInformation [] ret = new TcpConnectionInformation [list.Count];
            for (int i = 0; i < ret.Length; i++)
            {
                // sl  local_address rem_address   st tx_queue rx_queue tr tm->when retrnsmt   uid  timeout inode
                IPEndPoint local  = ToEndpoint(list [i] [1]);
                IPEndPoint remote = ToEndpoint(list [i] [2]);
                TcpState   state  = (TcpState)int.Parse(list [i] [3], NumberStyles.HexNumber);
                ret [i] = new TcpConnectionInformationImpl(local, remote, state);
            }
            return(ret);
        }
Exemple #3
0
		public override TcpConnectionInformation [] GetActiveTcpConnections ()
		{
			List<string []> list = new List<string []> ();
			GetRows (TcpFile, list);
			GetRows (Tcp6File, list);

			TcpConnectionInformation [] ret = new TcpConnectionInformation [list.Count];
			for (int i = 0; i < ret.Length; i++) {
				// sl  local_address rem_address   st tx_queue rx_queue tr tm->when retrnsmt   uid  timeout inode
				IPEndPoint local = ToEndpoint (list [i] [1]);
				IPEndPoint remote = ToEndpoint (list [i] [2]);
				TcpState state = (TcpState) int.Parse (list [i] [3], NumberStyles.HexNumber);
				ret [i] = new TcpConnectionInformationImpl (local, remote, state);
			}
			return ret;
		}