private void KernelOnTcpIpSend(TcpIpSendTraceData data)
 {
     if (_stopping)
     {
         return;
     }
     if (Program.bmobile == "true" && mobile || Program.bmobile == "false")
     {
         lock (_mCounters)
         {
             if (dicData.ContainsKey(data.ProcessName))
             {
                 dicData[data.ProcessName].Sent =
                     dicData[data.ProcessName].Sent + data.size / 1024f / 1024f;
             }
             else
             {
                 dicData.Add(data.ProcessName,
                             new Counters {
                     Received = 0, Sent = data.size / 1024f / 1024f
                 });
             }
         }
     }
 }
 private void HandleTcpIpSend(TcpIpSendTraceData data)
 {
     if (data.ProcessID == pid)
     {
         traceOutput.Write(data.TimeStampRelativeMSec, data.ProcessID, data.ThreadID, data.EventName,
                           $"{data.saddr}:{data.sport} -> {data.daddr}:{data.dport} (0x{data.connid:X})");
     }
 }
Beispiel #3
0
 private void HandleTcpIpSend(TcpIpSendTraceData data)
 {
     if (data.ProcessID == pid)
     {
         traceOutput.WriteLine($"{data.TimeStampRelativeMSec:0.0000} ({data.ProcessID}.{data.ThreadID}) {data.EventName} " +
                               $"{data.saddr}:{data.sport} -> {data.daddr}:{data.dport} (0x{data.connid:X})");
         UpdateStats(data.saddr, data.daddr, false, data.size);
     }
 }
Beispiel #4
0
        public void LogEvent(TcpIpSendTraceData data)
        {
            LogRow text = new LogRow();

            _netWriter.WriteHeader(data, text);
            text.Add(data.saddr.ToString());
            text.Add(data.sport.ToString());
            text.Add(data.daddr.ToString());
            text.Add(data.dport.ToString());
            _netWriter.WriteRow(text);
        }
Beispiel #5
0
 void SendPacketUpdateUI(TcpIpSendTraceData obj)
 {
     sizeSent += obj.size;
     ++numSent;
     lblNumPacketsSent.Text = numSent.ToString();
     lblSizeSent.Text       = sizeSent.ToString();
     textBox1.AppendText("SENT: " +
                         "Dest: " + obj.daddr.ToString() +
                         "Src: " + obj.saddr.ToString() +
                         "SPort: " + obj.sport.ToString() +
                         "DPort: " + obj.dport.ToString() +
                         "Size: " + obj.size.ToString() +
                         "Seq: " + obj.seqnum.ToString() +
                         "Process: " + obj.ProcessName +
                         "Hash: " + obj.GetHashCode().ToString() +
                         Environment.NewLine
                         );
     this.Text = kernelsession.EventsLost.ToString();
 }
Beispiel #6
0
 private void Kernel_TcpIpSend(TcpIpSendTraceData obj)
 {
     Invoke(new dlgSendPacketUpdate(SendPacketUpdateUI), new object[] { obj });
 }