Wireshark

  • Riverbed Technology
  • WinPcap
SHARKFEST '13 - Wireshark Developer and User Conference - June 16-19, 2013 - UC Berkeley
  • Wireshark
    • About
    • Download
    • Blog
  • Get Help
    • Ask a Question
    • FAQs
    • Documentation
    • Mailing Lists
    • Online Tools
    • Wiki
    • Bug Tracker
  • Develop
    • Get Involved
    • Developer's Guide
    • Browse the Code
    • Latest Builds

Wireshark-users: [Wireshark-users] Issue Network Interface list: Tshark 1.4.6 and 1.6.1

Date Index Thread Index Other Months All Mailing Lists
Date Prev Date Next Thread Prev Thread Next


From: NITIN GOYAL <nitinkumgoyal@xxxxxxxxx>
Date: Mon, 22 Aug 2011 18:20:25 +0530

Hi

I have an issue related to Interface list.

When i use tshark 1.4.6, using the command tshark -D through my code in C#, i can read the stream data directly and it returns all the interfaces on my machine.

But the same thing if i use with tshark 1.6.1, the same stream is not able to read anything. But it works well, when we write this on command line and not call it using c# code.

So, i want to know if there any change done for this in this new version which is creating this problem.

Here is the C# code, which is running fine and returning all the interfaces on my machine for tshark 1.4.6 but the same code is not working for 1.6.1.

I did not found if there is any change at this level for this command between versions?

                Process proc = new Process();
                proc.StartInfo.FileName = mTsharkPath;
                proc.StartInfo.Arguments = "-D";
                proc.StartInfo.UseShellExecute = false;
                proc.StartInfo.CreateNoWindow = false;
                proc.StartInfo.RedirectStandardOutput = true;
                proc.StartInfo.RedirectStandardError = true;
                proc.StartInfo.RedirectStandardInput = false;
                proc.Start();
                proc.WaitForExit();
                string aaa = proc.MachineName;
                StreamReader aaav = proc.StandardError;
                string line;
                List<string> ret = new List<string>();
                 while ((line = proc.StandardOutput.ReadLine()) != null)
                {
                    ret.Add(line);
                }
                return ret.ToArray(); // returns all the interfaces connected on machine

Thanks
Nitin
  • Follow-Ups:
    • Re: [Wireshark-users] Issue Network Interface list: Tshark 1.4.6 and 1.6.1
      • From: Jaap Keuter
  • Prev by Date: [Wireshark-users] Pcap Ideal Size for Analysis
  • Next by Date: Re: [Wireshark-users] Pcap Ideal Size for Analysis
  • Previous by thread: Re: [Wireshark-users] Pcap Ideal Size for Analysis
  • Next by thread: Re: [Wireshark-users] Issue Network Interface list: Tshark 1.4.6 and 1.6.1
  • Index(es):
    • Date
    • Thread

Wireshark and the "fin" logo are registered trademarks of the Wireshark Foundation