This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Getting list of interfaces - problem

0

Hi, i have a problem with versions 1.6.11 and 1.8.3, i am trying to get the list of the interfaces and instead of getting the list to standard output, i get it on the std error. I don't have this error on version 1.4.1 and it is works with the same code. Thanks My code:

    ProcessStartInfo startInfo = new ProcessStartInfo(m_sTsharkPath);
    startInfo.Arguments = "-D";
startInfo.RedirectStandardError = true;
startInfo.RedirectStandardOutput = true;
startInfo.UseShellExecute = false;
startInfo.CreateNoWindow = true;

Process p = Process.Start(startInfo);

String output = p.StandardOutput.ReadToEnd();
String error = p.StandardError.ReadToEnd();

p.WaitForExit(waitingTime);</code></pre></div><div id="question-tags" class="tags-container tags"><span class="post-tag tag-link-interfaces" rel="tag" title="see questions tagged &#39;interfaces&#39;">interfaces</span></div><div id="question-controls" class="post-controls"></div><div class="post-update-info-container"><div class="post-update-info post-update-info-user"><p>asked <strong>19 Nov '12, 02:08</strong></p><img src="https://secure.gravatar.com/avatar/06f50401080384cf406ae8798bb821e8?s=32&amp;d=identicon&amp;r=g" class="gravatar" width="32" height="32" alt="aaa&#39;s gravatar image" /><p><span>aaa</span><br />

1111
accept rate: 0%


One Answer:

0

Yes, it would appear that Wireshark was intentionally changed to send this output to stderr; the change came in revision 36387. Apparently it was necessary for "-D" to work on Windows.

answered 19 Nov '12, 10:25

JeffMorriss's gravatar image

JeffMorriss ♦
6.2k572
accept rate: 27%