aboutsummaryrefslogtreecommitdiffstats
path: root/dumpcap.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2008-02-29 18:48:29 +0000
committerBill Meier <wmeier@newsguy.com>2008-02-29 18:48:29 +0000
commit2c07da3195b945551ef67b12dc0c23bf6d35c9f5 (patch)
treeca05a9e9db3478b646b94ef4aad9c6a8c02238cd /dumpcap.c
parent26b8bf31d7b5c0659be2284119e7880f3a1d0638 (diff)
Fix for handling dumpcap errmsgs when wireshark does 'dumpcap -D -M', etc
svn path=/trunk/; revision=24507
Diffstat (limited to 'dumpcap.c')
-rw-r--r--dumpcap.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/dumpcap.c b/dumpcap.c
index 2f1993e4a3..93c580759c 100644
--- a/dumpcap.c
+++ b/dumpcap.c
@@ -2233,14 +2233,20 @@ main(int argc, char *argv[])
}
#endif
- /* Determine if dumpcap is running as a child process by going thru */
- /* the command line args to see if a -Z option (which is the */
- /* hidden option which indicates that dumpcap has been invoked */
- /* from a parent process using a pipe). */
- /* "Child" status needs to be determined immediately upon startup so */
- /* that any messages generated by dumpcap (eg: during initialization)*/
- /* will be formatted properly if being sent back to a parent via */
- /* a pipe. */
+ /* Determine if dumpcap is being requested to run in a special */
+ /* capture_child mode by going thru the command line args to see if */
+ /* a -Z is present. (-Z is a hidden option). */
+ /* The primary result of running in capture_child mode is that */
+ /* all messages sent out on stderr are in a special type/len/string */
+ /* format to allow message processing by type. */
+ /* These messages include various 'status' messages which are sent */
+ /* when an actual capture is in progress. Capture_child mode */
+ /* would normally be requested by a parent process which invokes */
+ /* dumpcap and obtains dumpcap stderr output via a pipe to which */
+ /* dumpcap stderr has been redirected. */
+ /* Capture_child mode needs to be determined immediately upon */
+ /* startup so that any messages generated by dumpcap in this mode */
+ /* (eg: during initialization) will be formatted properly. */
for (i=1; i<argc; i++) {
if (strcmp("-Z", argv[i]) == 0) {