diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2010-05-17 23:56:00 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2010-05-17 23:56:00 +0000 |
commit | b145e3d31f1c302a6ae274b2ba77a72470391697 (patch) | |
tree | f99dc55a9cbb5b539c475acb2c1c4bed84433a1c /dumpcap.c | |
parent | 894a783863d51be1269701d8c8b56b0411dd157b (diff) |
Make -Z always generate machine-readable output, and don't bother
supplying -M along with -Z. (We keep -M around for debugging use; it's
documented, unlike -Z.)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32850 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'dumpcap.c')
-rw-r--r-- | dumpcap.c | 40 |
1 files changed, 26 insertions, 14 deletions
@@ -3099,24 +3099,36 @@ main(int argc, char *argv[]) } #endif - /* 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. */ + /* + * 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 + * error messages if dumpcap fails to start the operation it was + * requested to do, as well as various "status" messages which are sent + * when an actual capture is in progress, and a "success" message sent + * if dumpcap was requested to perform an operation other than a + * capture. + * + * 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. It might also have + * another pipe to obtain dumpcap stdout output; for operations other + * than a capture, that information is formatted specially for easier + * parsing by the parent process. + * + * 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) { capture_child = TRUE; + machine_readable = TRUE; /* request machine-readable output */ #ifdef _WIN32 /* set output pipe to binary mode, to avoid ugly text conversions */ _setmode(2, O_BINARY); |