Wireshark-users: Re: [Wireshark-users] Issue Network Interface list: Tshark 1.4.6 and 1.6.1
Hi,
You can find the output on stderr now.
Thanks,
Jaap
On Mon, 22 Aug 2011 18:20:25 +0530, NITIN GOYAL wrote:
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 ret = new List();
while ((line = proc.StandardOutput.ReadLine()) != null)
{
ret.Add(line);
}
return ret.ToArray(); // returns all the interfaces connected on machine
Thanks
Nitin