Ejemplo n.º 1
0
 private void OnUpdatePacketList(Packet p) {
     PacketList.Items.Add(new ListViewItem(new string[] { p.Time.ToString(), p.Protocol.ToString(), p.Source, p.Destination, p.TotalLength.ToString() }));
     StatusBar.Text = string.Format("Intercepted {0} packet(s) [{1} bytes]", m_Packets.Count, m_PacketsSize);
 }
Ejemplo n.º 2
0
		/// <summary>
		/// Raises an event that indicates a new packet has arrived.
		/// </summary>
		/// <param name="p">The arrived <see cref="Packet"/>.</param>
		protected void OnNewPacket(Packet p) {
			if (NewPacket != null)
				NewPacket(this, p);
		}
Ejemplo n.º 3
0
		private void OnNewPacket(PacketMonitor pm, Packet p) {
			// add the new packet to the list
			m_Packets.Add(p);
			m_PacketsSize += p.TotalLength;

            this.Invoke(new UpdatePacketList(OnUpdatePacketList), p);
			//PacketList.Items.Add(new ListViewItem(new string[] { p.Time.ToString(), p.Protocol.ToString(), p.Source, p.Destination, p.TotalLength.ToString() }));
			//StatusBar.Text = string.Format("Intercepted {0} packet(s) [{1} bytes]", m_Packets.Count, m_PacketsSize);
            //UpdatePacketList
		}