Wireshark mailing list archives

Re: Issue Network Interface list: Tshark 1.4.6 and 1.6.1


From: Jaap Keuter <jaap.keuter () xs4all nl>
Date: Mon, 22 Aug 2011 15:26:39 +0200

  

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

  
___________________________________________________________________________
Sent via:    Wireshark-users mailing list <wireshark-users () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-users
Unsubscribe: https://wireshark.org/mailman/options/wireshark-users
             mailto:wireshark-users-request () wireshark org?subject=unsubscribe

Current thread: