private void KernelOnTcpIpRecv(TcpIpTraceData data)
 {
     if (_stopping)
     {
         return;
     }
     if (Program.bmobile == "true" && mobile || Program.bmobile == "false")
     {
         lock (_mCounters)
         {
             if (dicData.ContainsKey(data.ProcessName))
             {
                 dicData[data.ProcessName].Received =
                     dicData[data.ProcessName].Received + data.size / 1024f / 1024f;
             }
             else
             {
                 dicData.Add(data.ProcessName,
                             new Counters {
                     Received = data.size / 1024f / 1024f, Sent = 0
                 });
             }
         }
     }
 }
 private void HandleTcpIpRev(TcpIpTraceData data)
 {
     if (data.ProcessID == pid)
     {
         traceOutput.Write(data.TimeStampRelativeMSec, data.ProcessID, data.ThreadID, data.EventName,
                           $"{data.daddr}:{data.dport} <- {data.saddr}:{data.sport} (0x{data.connid:X})");
     }
 }
Exemplo n.º 3
0
 private void HandleTcpIp(TcpIpTraceData 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})");
     }
 }
Exemplo n.º 4
0
        public void LogEvent(TcpIpTraceData 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);
        }
Exemplo n.º 5
0
 void ReceivePacketUpdateUI(TcpIpTraceData obj)
 {
     sizeReceived += obj.size;
     ++numReceived;
     lblNumPacketsReceived.Text = numReceived.ToString();
     lblSize.Text = sizeReceived.ToString();
     textBox1.AppendText("RECEIVED: " +
                         "\tDest: " + obj.daddr.ToString() +
                         "\tSrc: " + obj.saddr.ToString() +
                         "\tSPort: " + obj.sport.ToString() +
                         "\tDPort: " + obj.dport.ToString() +
                         "\tSize: " + obj.size.ToString() +
                         "\tSeq: " + obj.seqnum.ToString() +
                         "\tProcess: " + obj.ProcessName +
                         "\tHash: " + obj.Dump(true, false) +
                         Environment.NewLine
                         );
     this.Text = kernelsession.EventsLost.ToString();
 }
Exemplo n.º 6
0
 private void Kernel_TcpIpRecv(TcpIpTraceData obj)
 {
     Invoke(new dlgReceivePacketUpdate(ReceivePacketUpdateUI), new object[] { obj });
 }