Count all received packet using Tshark

Posted by user1269592 on Server Fault See other posts from Server Fault or by user1269592
Published on 2012-10-08T08:58:39Z Indexed on 2012/10/08 9:38 UTC
Read the original article Hit count: 209

Filed under:
|
|

i am build application who start capturing via Tshark with command line and i am looking for option to count all the received packets after i am start Tshark process this is my function who start the process:

int _interfaceNumber;
string _pcapPath;


    Process tshark = new Process();
    tshark.StartInfo.FileName = _tshark;
    tshark.StartInfo.Arguments = string.Format(" -i " + _interfaceNumber + " -V -x -s " + _packetLimitSize + " -w " + _pcapPath);
    tshark.StartInfo.RedirectStandardOutput = true;
    tshark.StartInfo.UseShellExecute = false;
    tshark.StartInfo.CreateNoWindow = true;
    tshark.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
    tshark.Start();

maybe someone had an idea ?

© Server Fault or respective owner

Related posts about c#

Related posts about wireshark