diff --git a/docbook/wsug_graphics/ws-export-plain.png b/docbook/wsug_graphics/ws-export-plain.png index 725f138096..e0e24e8d68 100644 Binary files a/docbook/wsug_graphics/ws-export-plain.png and b/docbook/wsug_graphics/ws-export-plain.png differ diff --git a/docbook/wsug_graphics/ws-file-import.png b/docbook/wsug_graphics/ws-file-import.png index 178afc0915..10002fcb51 100644 Binary files a/docbook/wsug_graphics/ws-file-import.png and b/docbook/wsug_graphics/ws-file-import.png differ diff --git a/docbook/wsug_src/WSUG_chapter_io.xml b/docbook/wsug_src/WSUG_chapter_io.xml index 6728142c24..874dc576d7 100644 --- a/docbook/wsug_src/WSUG_chapter_io.xml +++ b/docbook/wsug_src/WSUG_chapter_io.xml @@ -39,52 +39,52 @@
Open capture files - Wireshark can read in previously saved capture files. + Wireshark can read in previously saved capture files. To read them, simply select the menu or toolbar item: "File/ - Open". - Wireshark will then pop up the File - Open dialog box, which is discussed in more detail in - . + Open". + Wireshark will then pop up the File + Open dialog box, which is discussed in more detail in + . It's convenient to use drag-and-drop! - ... to open a file, by simply dragging the desired file from your file - manager and dropping it onto Wireshark's main window. - However, drag-and-drop is not available/won't work in all desktop + ... to open a file, by simply dragging the desired file from your file + manager and dropping it onto Wireshark's main window. + However, drag-and-drop is not available/won't work in all desktop environments. - If you haven't previously saved the current capture file, you will be asked - to do so, to prevent data loss (this behaviour can be disabled in the + If you haven't previously saved the current capture file, you will be asked + to do so, to prevent data loss (this behaviour can be disabled in the preferences). - In addition to its native file format (libpcap format, also used by - tcpdump/WinDump and other libpcap/WinPcap-based programs), Wireshark can - read capture files from a large number of other packet capture programs - as well. See for the list of + In addition to its native file format (libpcap format, also used by + tcpdump/WinDump and other libpcap/WinPcap-based programs), Wireshark can + read capture files from a large number of other packet capture programs + as well. See for the list of capture formats Wireshark understands. - +
The "Open Capture File" dialog box - The "Open Capture File" dialog box allows you to search for a - capture file containing previously captured packets for display in - Wireshark. shows some examples + The "Open Capture File" dialog box allows you to search for a + capture file containing previously captured packets for display in + Wireshark. shows some examples of the Wireshark Open File Dialog box. The dialog appearance depends on your system! - The appearance of this dialog depends on the system and/or GTK+ - toolkit version used. However, the functionality remains basically + The appearance of this dialog depends on the system and/or GTK+ + toolkit version used. However, the functionality remains basically the same on any particular system. - + Common dialog behaviour on all systems: @@ -96,36 +96,36 @@ - Click the Open/Ok button to accept your selected file and open it. + Click the Open/Ok button to accept your selected file and open it. - Click the Cancel button to go back to Wireshark and not load a capture + Click the Cancel button to go back to Wireshark and not load a capture file. - Wireshark extensions to the standard behaviour of + Wireshark extensions to the standard behaviour of these dialogs: - View file preview information (like the filesize, the number of + View file preview information (like the filesize, the number of packets, ...), if you've selected a capture file. - Specify a display filter with the "Filter:" button and filter - field. This filter will be used when opening the new file. - The text field background becomes green for a valid filter string + Specify a display filter with the "Filter:" button and filter + field. This filter will be used when opening the new file. + The text field background becomes green for a valid filter string and red for an invalid one. - Clicking on the Filter button causes Wireshark to pop up - the Filters dialog box (which is discussed further in + Clicking on the Filter button causes Wireshark to pop up + the Filters dialog box (which is discussed further in ). @@ -134,9 +134,9 @@ - Specify which type of name resolution is to be performed for all packets by - clicking on one of the "... name resolution" check buttons. - Details about name resolution can be found in + Specify which type of name resolution is to be performed for all packets by + clicking on one of the "... name resolution" check buttons. + Details about name resolution can be found in . @@ -144,14 +144,14 @@ Save a lot of time loading huge capture files! - You can change the display filter and name resolution settings later - while viewing the packets. - However, loading huge capture files can take a significant amount of - extra time if these settings are changed later, so in such situations it can + You can change the display filter and name resolution settings later + while viewing the packets. + However, loading huge capture files can take a significant amount of + extra time if these settings are changed later, so in such situations it can be a good idea to set at least the filter in advance here. - + The system specific "Open Capture File" dialog box @@ -169,7 +169,7 @@ Microsoft Windows - This is the common Windows file open dialog - + This is the common Windows file open dialog - plus some Wireshark extensions. @@ -178,7 +178,7 @@ - If available, the "Help" button will lead you to this section of + If available, the "Help" button will lead you to this section of this "User's Guide". @@ -202,7 +202,7 @@ Unix/Linux: GTK version >= 2.4 - This is the common Gimp/GNOME file open dialog - + This is the common Gimp/GNOME file open dialog - plus some Wireshark extensions. @@ -211,21 +211,21 @@ - The "+ Add" button allows you to add a directory, selected in the - right-hand pane, to the favorites list on the left. Those changes + The "+ Add" button allows you to add a directory, selected in the + right-hand pane, to the favorites list on the left. Those changes are persistent. - The "- Remove" button allows you to remove a selected directory from - that list again (the items like: "Home", "Desktop", and "Filesystem" + The "- Remove" button allows you to remove a selected directory from + that list again (the items like: "Home", "Desktop", and "Filesystem" cannot be removed). - If Wireshark doesn't recognize the selected file as a capture file, + If Wireshark doesn't recognize the selected file as a capture file, it will grey out the "Open" button. @@ -245,7 +245,7 @@ Unix/Linux: GTK version < 2.4 - This is the file open dialog of former Gimp/GNOME versions - + This is the file open dialog of former Gimp/GNOME versions - plus some Wireshark extensions. @@ -254,7 +254,7 @@ - If Wireshark doesn't recognize the selected file as a capture file, + If Wireshark doesn't recognize the selected file as a capture file, it will grey out the "Ok" button. @@ -264,14 +264,14 @@
- - + +
Input File Formats - The following file formats from other capture tools can be opened by + The following file formats from other capture tools can be opened by Wireshark: libpcap - captures from Wireshark/TShark/dumpcap, tcpdump, and various other tools using libpcap's/tcpdump's capture format @@ -281,13 +281,13 @@ Novell LANalyzer captures Microsoft Network Monitor captures AIX's iptrace captures - Cinco Networks NetXray captures + Cinco Networks NetXray captures Network Associates Windows-based Sniffer and Sniffer Pro captures Network General/Network Associates DOS-based Sniffer (compressed or uncompressed) captures AG Group/WildPackets EtherPeek/TokenPeek/AiroPeek/EtherHelp/PacketGrabber captures RADCOM's WAN/LAN Analyzer captures Network Instruments Observer version 9 captures - Lucent/Ascend router debug output + Lucent/Ascend router debug output HP-UX's nettl Toshiba's ISDN routers dump output ISDN4BSD i4btrace utility @@ -316,27 +316,27 @@ Opening a file may fail due to invalid packet types! - It may not be possible to read some formats dependent on the packet types + It may not be possible to read some formats dependent on the packet types captured. Ethernet captures are usually supported for most file formats but - it may not be possible to read other packet types (e.g. token ring packets) + it may not be possible to read other packet types (e.g. token ring packets) from all file formats. - +
- +
Saving captured packets - You can save captured packets simply by using the Save As... menu - item from the File menu under Wireshark. You can choose which + You can save captured packets simply by using the Save As... menu + item from the File menu under Wireshark. You can choose which packets to save and which file format to be used. Saving may reduce the available information! - Saving the captured packets will slightly reduce the amount of + Saving the captured packets will slightly reduce the amount of information, e.g. the number of dropped packets will be lost; see for details. @@ -344,20 +344,20 @@
The "Save Capture File As" dialog box - The "Save Capture File As" dialog box allows you to save - the current capture to a file. - shows some examples of this + The "Save Capture File As" dialog box allows you to save + the current capture to a file. + shows some examples of this dialog box. The dialog appearance depends on your system! - The appearance of this dialog depends on the system and GTK+ toolkit - version used. However, the functionality remains basically the same + The appearance of this dialog depends on the system and GTK+ toolkit + version used. However, the functionality remains basically the same on any particular system. - + The system specific "Save Capture File As" dialog box @@ -374,7 +374,7 @@ Microsoft Windows - This is the common Windows file save dialog - + This is the common Windows file save dialog - plus some Wireshark extensions. @@ -383,14 +383,14 @@ - If available, the "Help" button will lead you to this section of + If available, the "Help" button will lead you to this section of this "User's Guide". - If you don't provide a file extension to the filename - e.g. .pcap, - Wireshark will append the standard file extension for that file + If you don't provide a file extension to the filename - e.g. .pcap, + Wireshark will append the standard file extension for that file format. @@ -409,7 +409,7 @@ Unix/Linux: GTK version >= 2.4 - This is the common Gimp/GNOME file save dialog - + This is the common Gimp/GNOME file save dialog - plus some Wireshark extensions. @@ -418,7 +418,7 @@ - Clicking on the + at "Browse for other folders" will allow you + Clicking on the + at "Browse for other folders" will allow you to browse files and folders in your file system. @@ -437,7 +437,7 @@ Unix/Linux: GTK version < 2.4 - This is the file save dialog of former Gimp/GNOME versions - + This is the file save dialog of former Gimp/GNOME versions - plus some Wireshark extensions. @@ -445,13 +445,13 @@
- + With this dialog box, you can perform the following actions: - Type in the name of the file you wish to save the captured + Type in the name of the file you wish to save the captured packets in, as a standard file name in your file system. @@ -462,43 +462,43 @@ - Select the range of the packets to be saved, see + Select the range of the packets to be saved, see - Specify the format of the saved capture file by clicking on - the File type drop down box. You can choose from the + Specify the format of the saved capture file by clicking on + the File type drop down box. You can choose from the types, described in . The selection of capture formats may be reduced! - Some capture formats may not be available, depending on the + Some capture formats may not be available, depending on the packet types captured. File formats can be converted! - You can convert capture files from one format to another - by reading in a capture file and writing it out using a + You can convert capture files from one format to another + by reading in a capture file and writing it out using a different format. - Click on the Save/Ok button to accept your selected file and save to - it. If Wireshark has a problem saving the captured packets to - the file you specified, it will display an error dialog box. - After clicking OK on that error dialog box, you can try again. + Click on the Save/Ok button to accept your selected file and save to + it. If Wireshark has a problem saving the captured packets to + the file you specified, it will display an error dialog box. + After clicking OK on that error dialog box, you can try again. - Click on the Cancel button to go back to Wireshark and not save the + Click on the Cancel button to go back to Wireshark and not save the captured packets. @@ -508,13 +508,13 @@
Output File Formats - Wireshark can save the packet data in its "native" file format (libpcap) - and in the file formats of some other protocol analyzers, so other tools + Wireshark can save the packet data in its "native" file format (libpcap) + and in the file formats of some other protocol analyzers, so other tools can read the capture data. File formats have different time stamp accuracies! - Saving from the currently used file format to a different format may reduce the + Saving from the currently used file format to a different format may reduce the time stamp accuracy; see the for details. @@ -539,40 +539,40 @@ Third party protocol analyzers may require specific file extensions! - Other protocol analyzers than Wireshark may require that the file has a + Other protocol analyzers than Wireshark may require that the file has a certain file extension in order to read the files you generate with Wireshark, e.g.: ".cap" for Network Associates Sniffer - Windows -
- +
+
Merging capture files - Sometimes you need to merge several capture files into one. For example - this can be useful, if you have captured simultaneously from multiple + Sometimes you need to merge several capture files into one. For example + this can be useful, if you have captured simultaneously from multiple interfaces at once (e.g. using multiple instances of Wireshark). Merging capture files can be done in three ways: - Use the menu item "Merge" from the "File" menu, + Use the menu item "Merge" from the "File" menu, to open the merge dialog, see . This menu item will be disabled, until you have loaded a capture file. - Use drag-and-drop to drop multiple files on the - main window. Wireshark will try to merge the packets in chronological - order from the dropped files into a newly created temporary file. If + Use drag-and-drop to drop multiple files on the + main window. Wireshark will try to merge the packets in chronological + order from the dropped files into a newly created temporary file. If you drop only a single file, it will simply replace a (maybe) existing one. - Use the mergecap tool, which is a command - line tool to merge capture files. This tool provides the most options + Use the mergecap tool, which is a command + line tool to merge capture files. This tool provides the most options to merge capture files, see . @@ -580,29 +580,29 @@
The "Merge with Capture File" dialog box - - This dialog box let you select a file to be merged into the currently + + This dialog box let you select a file to be merged into the currently loaded file. You will be prompted for an unsaved file first! - If your current data wasn't saved before, you will be asked to save + If your current data wasn't saved before, you will be asked to save it first, before this dialog box is shown. - + - Most controls of this dialog will work the same way as described in the + Most controls of this dialog will work the same way as described in the "Open Capture File" dialog box, see . Specific controls of this merge dialog are: - + Prepend packets to existing file - Prepend the packets from the selected file before the currently loaded + Prepend the packets from the selected file before the currently loaded packets. @@ -611,7 +611,7 @@ Merge packets chronologically - Merge both the packets from the selected and currently loaded file in + Merge both the packets from the selected and currently loaded file in chronological order. @@ -620,13 +620,13 @@ Append packets to existing file - Append the packets from the selected file after the currently loaded + Append the packets from the selected file after the currently loaded packets. - + The system specific "Merge Capture File As" dialog box @@ -643,7 +643,7 @@ Microsoft Windows - This is the common Windows file open dialog - + This is the common Windows file open dialog - plus some Wireshark extensions. @@ -660,7 +660,7 @@ Unix/Linux: GTK version >= 2.4 - This is the common Gimp/GNOME file open dialog - + This is the common Gimp/GNOME file open dialog - plus some Wireshark extensions. @@ -677,7 +677,7 @@ Unix/Linux: GTK version < 2.4 - This is the file open dialog of former Gimp/GNOME versions - + This is the file open dialog of former Gimp/GNOME versions - plus some Wireshark extensions. @@ -691,15 +691,15 @@
Import hex dump - Wireshark can read in an ASCII hex dump and write the data described - into a temporary libpcap capture file. It can read hex dumps with multiple - packets in them, and build a capture file of multiple packets. It is also - capable of generating dummy Ethernet, IP and UDP, TCP, or SCTP headers, - in order to build fully processable packet dumps from hexdumps of + Wireshark can read in an ASCII hex dump and write the data described + into a temporary libpcap capture file. It can read hex dumps with multiple + packets in them, and build a capture file of multiple packets. It is also + capable of generating dummy Ethernet, IP and UDP, TCP, or SCTP headers, + in order to build fully processable packet dumps from hexdumps of application-level data only. - Wireshark understands a hexdump of the form generated by + Wireshark understands a hexdump of the form generated by od -Ax -tx1 -v. In other words, each byte is individually displayed and surrounded with a space. Each line begins with an offset describing the position in the file. The offset @@ -719,7 +719,7 @@ There is no limit on the width or number of bytes per line. Also the text dump at the end of the line is ignored. Bytes/hex numbers can be uppercase or lowercase. Any text before the offset is ignored, including email forwarding characters '>'. - Any lines of text between the bytestring lines is ignored. The offsets are used + Any lines of text between the bytestring lines are ignored. The offsets are used to track the bytes, so offsets must be correct. Any line which has only bytes without a leading offset is ignored. An offset is recognized as being a hex number longer than two characters. Any text after the bytes is ignored (e.g. the @@ -764,7 +764,7 @@ Input - Determine which input file has to be imported and + Determine which input file has to be imported and how it is to be interpreted. @@ -782,7 +782,7 @@ Filename / Browse - Enter the name of the text file to import. You can use + Enter the name of the text file to import. You can use Browse to browse for a file. @@ -791,7 +791,7 @@ Offsets - Select the radix of the offsets given in the text file to import. + Select the radix of the offsets given in the text file to import. This is usually hexadecimal, but decimal and octal are also supported. @@ -800,7 +800,7 @@ Date/Time - Tick this checkbox if there are timestamps associated with the frames + Tick this checkbox if there are timestamps associated with the frames in the text file to import you would like to use. Otherwise the current time is used for timestamping the frames. @@ -810,11 +810,11 @@ Format - This is the format specifier used to parse the timestamps in the text file + This is the format specifier used to parse the timestamps in the text file to import. It uses a simple syntax to describe the format of the timestamps, using %H for hours, %M for minutes, %S for seconds, etc. The straightforward - HH:MM:SS format is covered by %T. For a full definition of the syntax look for - strftime(3). + HH:MM:SS format is covered by %T. For a full definition of the syntax look for + strptime(3). @@ -828,7 +828,7 @@ Here you can select which type of frames you are importing. This all depends on - from what type of medium the dump to import was taken. It lists all types that + from what type of medium the dump to import was taken. It lists all types that Wireshark understands, so as to pass the capture file contents to the right dissector. @@ -840,7 +840,7 @@ When Ethernet encapsulation is selected you have to option to prepend dummy headers to the frames to import. These headers can provide artificial Ethernet, IP, UDP or TCP or SCTP headers and SCTP data chunks. When selecting a type of dummy - header the applicable entries are enabled, others are grayed out and default values + header the applicable entries are enabled, others are grayed out and default values are used. @@ -849,9 +849,9 @@ Max. frame length - You may not be interested in the full frames from the text file, just the first part. + You may not be interested in the full frames from the text file, just the first part. Here you can define how much data from the start of the frame you want to import. - If you leave this open the maximum is set to 64000 bytes. + If you leave this open the maximum is set to 65535 bytes. @@ -862,12 +862,12 @@ You will be prompted for an unsaved file first! - If your current data wasn't saved before, you will be asked to save + If your current data wasn't saved before, you will be asked to save it first, before this dialog box is shown. - When completed there will be a new capture file loaded with the frames imported + When completed there will be a new capture file loaded with the frames imported from the text file.
@@ -876,48 +876,48 @@
File Sets When using the "Multiple Files" option while doing a capture - (see: ), - the capture data is spread over several capture files, called a file - set. + (see: ), + the capture data is spread over several capture files, called a file + set. - As it can become tedious to work with a file set by hand, Wireshark + As it can become tedious to work with a file set by hand, Wireshark provides some features to handle these file sets in a convenient way. How does Wireshark detect the files of a file set? - A filename in a file set uses the format Prefix_Number_DateTimeSuffix + A filename in a file set uses the format Prefix_Number_DateTimeSuffix which might look like this: "test_00001_20060420183910.pcap". - All files of a file set share the same prefix (e.g. "test") and suffix + All files of a file set share the same prefix (e.g. "test") and suffix (e.g. ".pcap") and a varying middle part. - To find the files of a file set, Wireshark scans the directory where the - currently loaded file resides and checks for files matching the filename - pattern (prefix and suffix) of the currently loaded file. + To find the files of a file set, Wireshark scans the directory where the + currently loaded file resides and checks for files matching the filename + pattern (prefix and suffix) of the currently loaded file. - This simple mechanism usually works well, but has its drawbacks. If several - file sets were captured with the same prefix and suffix, Wireshark will detect - them as a single file set. If files were renamed or spread over several + This simple mechanism usually works well, but has its drawbacks. If several + file sets were captured with the same prefix and suffix, Wireshark will detect + them as a single file set. If files were renamed or spread over several directories the mechanism will fail to find all files of a set. - The following features in the "File Set" submenu of the "File" menu are + The following features in the "File Set" submenu of the "File" menu are available to work with file sets in a convenient way: - The List Files dialog box will list the files + The List Files dialog box will list the files Wireshark has recognized as being part of the current file set. - Next File closes the current and opens the next + Next File closes the current and opens the next file in the file set. - Previous File closes the current and opens the + Previous File closes the current and opens the previous file in the file set. @@ -931,9 +931,9 @@ Each line contains information about a file of the file set: - Filename the name of the file. If you click on + Filename the name of the file. If you click on the filename (or the radio button left to it), the current file will - be closed and the corresponding capture file will be opened. + be closed and the corresponding capture file will be opened. Created the creation time of the file @@ -949,7 +949,7 @@ all of the files in the file set can be found. - The content of this dialog box is updated each time a capture file is + The content of this dialog box is updated each time a capture file is opened/closed. @@ -959,53 +959,84 @@
Exporting data - Wireshark provides several ways and formats to export packet data. This + Wireshark provides several ways and formats to export packet data. This section describes general ways to export data from Wireshark. Note! - There are more specialized functions to export specific data, - which will be described at the appropriate places. + There are more specialized functions to export specific data, + which will be described at the appropriate places. - XXX - add detailed descriptions of the output formats and some sample + XXX - add detailed descriptions of the output formats and some sample output, too.
The "Export as Plain Text File" dialog box - Export packet data into a plain ASCII text file, much like the format + Export packet data into a plain ASCII text file, much like the format used to print packets. + Tip! + + If you would like to be able to import any previously exported + packets from a plain text file, it is recommended that you: + + + Add the "Absolute date and time" column. + + + Temporarily hide all other columns. + + + Turn off: Edit/Preferences/Protocols/Data/ + "Show not dissected data on new Packet Bytes pane". More detail is + provided in + + + Include the packet summary line. + + + Exclude the column headings. + + + Exclude the packet details. + + + Include the packet bytes. + + + +
The "Export as Plain Text File" dialog box
- Export to file: frame chooses the file to export + Export to file: frame chooses the file to export the packet data to. - The Packet Range frame is described in Packet Range frame is described in . - The Packet Details frame is described in Packet Details frame is described in . - +
The "Export as PostScript File" dialog box - Export packet data into PostScript, much like the format used + Export packet data into PostScript, much like the format used to print packets. Tip! You can easily convert PostScript files to PDF files using ghostscript. - For example: export to a file named foo.ps and then call: + For example: export to a file named foo.ps and then call: ps2pdf foo.ps @@ -1015,25 +1046,25 @@ - Export to file: frame chooses the file to export + Export to file: frame chooses the file to export the packet data to. - The Packet Range frame is described in Packet Range frame is described in . - The Packet Details frame is described in Packet Details frame is described in . - +
The "Export as CSV (Comma Separated Values) File" dialog box XXX - add screenshot - Export packet summary into CSV, used e.g. by spreadsheet programs to + Export packet summary into CSV, used e.g. by spreadsheet programs to im-/export data. - Export to file: frame chooses the file to export + Export to file: frame chooses the file to export the packet data to. - The Packet Range frame is described in Packet Range frame is described in . - +
@@ -1065,21 +1096,21 @@ --> - Export to file: frame chooses the file to export + Export to file: frame chooses the file to export the packet data to. - The Packet Range frame is described in Packet Range frame is described in . - +
The "Export as PSML File" dialog box - Export packet data into PSML. This is an XML based format including - only the packet summary. The PSML file specification is available at: + Export packet data into PSML. This is an XML based format including + only the packet summary. The PSML file specification is available at: .
The "Export as PSML File" dialog box @@ -1087,28 +1118,28 @@
- Export to file: frame chooses the file to export + Export to file: frame chooses the file to export the packet data to. - The Packet Range frame is described in Packet Range frame is described in . - - There's no such thing as a packet details frame for PSML export, as the + + There's no such thing as a packet details frame for PSML export, as the packet format is defined by the PSML specification.
The "Export as PDML File" dialog box - Export packet data into PDML. This is an XML based format including - the packet details. The PDML file specification is available at: + Export packet data into PDML. This is an XML based format including + the packet details. The PDML file specification is available at: . - The PDML specification is not officially released and Wireshark's - implementation of it is still in an early beta state, so please expect + The PDML specification is not officially released and Wireshark's + implementation of it is still in an early beta state, so please expect changes in future Wireshark versions. @@ -1118,22 +1149,22 @@ - Export to file: frame chooses the file to export + Export to file: frame chooses the file to export the packet data to. - The Packet Range frame is described in Packet Range frame is described in . - - There's no such thing as a packet details frame for PDML export, as the + + There's no such thing as a packet details frame for PDML export, as the packet format is defined by the PDML specification.
The "Export selected packet bytes" dialog box - Export the bytes selected in the "Packet Bytes" pane into a raw + Export the bytes selected in the "Packet Bytes" pane into a raw binary file.
The "Export Selected Packet Bytes" dialog box @@ -1144,14 +1175,14 @@ Name: the filename to export the packet data to. - The Save in folder: field lets you select the + The Save in folder: field lets you select the folder to save to (from some predefined folders). - Browse for other folders provides a flexible + Browse for other folders provides a flexible way to choose a folder. - +
@@ -1167,14 +1198,14 @@ opened with the proper viewer or executed in the case of executables (if it is for the same platform you are running Wireshark on) without any further work on your - part. This feature is not available when using GTK2 versions + part. This feature is not available when using GTK2 versions below 2.4.
The "Export Objects" dialog box
- + Columns: @@ -1204,7 +1235,7 @@ typically indicates that the file was received in response to a HTTP POST request. - + Buttons: @@ -1239,8 +1270,8 @@
Printing packets - To print packets, select the "Print..." menu item from the File menu. - When you do this, Wireshark pops up the Print dialog box as shown in + To print packets, select the "Print..." menu item from the File menu. + When you do this, Wireshark pops up the Print dialog box as shown in .
The "Print" dialog box @@ -1258,50 +1289,50 @@ - Plain Text specifies that + Plain Text specifies that the packet print should be in plain text. - PostScript specifies that - the packet print process should use PostScript to + PostScript specifies that + the packet print process should use PostScript to generate a better print output on PostScript aware printers. - Output to file: specifies that printing - be done to a file, using the filename entered in the field or selected + Output to file: specifies that printing + be done to a file, using the filename entered in the field or selected with the browse button. - This field is where you enter the file to - print to if you have selected Print to a file, or you can click the - button to browse the filesystem. It is greyed out if Print to a file + This field is where you enter the file to + print to if you have selected Print to a file, or you can click the + button to browse the filesystem. It is greyed out if Print to a file is not selected. - Print command specifies that a - command be used for printing. + Print command specifies that a + command be used for printing. Note! - These Print command fields are not available on - windows platforms. + These Print command fields are not available on + windows platforms. - This field specifies the command to use for printing. It - is typically lpr. You would change it - to specify a particular queue if you need to print to a + This field specifies the command to use for printing. It + is typically lpr. You would change it + to specify a particular queue if you need to print to a queue other than the default. An example might be: lpr -Pmypostscript - This field is greyed out if Output to file: is + This field is greyed out if Output to file: is checked above. @@ -1313,7 +1344,7 @@ lpr -Pmypostscript Packet Range - Select the packets to be printed, see @@ -1322,8 +1353,8 @@ lpr -Pmypostscript Packet Format - Select the output format of the packets to be printed. You can - choose, how each packet is printed, see + Select the output format of the packets to be printed. You can + choose, how each packet is printed, see @@ -1335,8 +1366,8 @@ lpr -Pmypostscript
The Packet Range frame - The packet range frame is a part of various output related dialog boxes. - It provides options to select which packets should be processed by the + The packet range frame is a part of various output related dialog boxes. + It provides options to select which packets should be processed by the output function.
The "Packet Range" frame @@ -1344,9 +1375,9 @@ lpr -Pmypostscript
- If the Captured button is set (default), all packets + If the Captured button is set (default), all packets from the selected rule will be processed. If the Displayed - button is set, only the currently displayed packets are taken + button is set, only the currently displayed packets are taken into account to the selected rule. @@ -1358,39 +1389,39 @@ lpr -Pmypostscript - Selected packet only process only the selected + Selected packet only process only the selected packet. - Marked packets only process only the marked + Marked packets only process only the marked packets. - From first to last marked packet process the + From first to last marked packet process the packets from the first to the last marked one. - Specify a packet range process a user specified - range of packets, e.g. specifying 5,10-15,20- will - process the packet number five, the packets from packet number ten - to fifteen (inclusive) and every packet from number twenty to the + Specify a packet range process a user specified + range of packets, e.g. specifying 5,10-15,20- will + process the packet number five, the packets from packet number ten + to fifteen (inclusive) and every packet from number twenty to the end of the capture.
- +
The Packet Format frame - The packet format frame is a part of various output related dialog boxes. - It provides options to select which parts of a packet should be used for + The packet format frame is a part of various output related dialog boxes. + It provides options to select which parts of a packet should be used for the output function.
The "Packet Format" frame @@ -1399,31 +1430,31 @@ lpr -Pmypostscript - Packet summary line enable the output of the + Packet summary line enable the output of the summary line, just as in the "Packet List" pane. - Packet details enable the output of the packet + Packet details enable the output of the packet details tree. - All collapsed the info from the "Packet Details" + All collapsed the info from the "Packet Details" pane in "all collapsed" state. - As displayed the info from the "Packet Details" + As displayed the info from the "Packet Details" pane in the current state. - All expanded the info from the "Packet Details" + All expanded the info from the "Packet Details" pane in "all expanded" state. @@ -1431,21 +1462,21 @@ lpr -Pmypostscript - Packet bytes enable the output of the packet + Packet bytes enable the output of the packet bytes, just as in the "Packet Bytes" pane. - Each packet on a new page put each packet on a - separate page (e.g. when saving/printing to a text file, this will + Each packet on a new page put each packet on a + separate page (e.g. when saving/printing to a text file, this will put a form feed character between the packets).
- + diff --git a/file.c b/file.c index 7fa6681920..66949864c7 100644 --- a/file.c +++ b/file.c @@ -2410,6 +2410,8 @@ print_packet(capture_file *cf, frame_data *fdata, g_snprintf(bookmark_name, sizeof bookmark_name, "__frame%u__", fdata->num); if (args->print_args->print_summary) { + if (!args->print_args->print_col_headings) + args->print_header_line = FALSE; if (args->print_header_line) { if (!print_line(args->print_args->stream, 0, args->header_line_buf)) goto fail; @@ -2479,7 +2481,8 @@ print_packet(capture_file *cf, frame_data *fdata, args->print_separator = TRUE; /* Print a header line if we print any more packet summaries */ - args->print_header_line = TRUE; + if (args->print_args->print_col_headings) + args->print_header_line = TRUE; } if (args->print_args->print_hex) { @@ -2495,7 +2498,8 @@ print_packet(capture_file *cf, frame_data *fdata, args->print_separator = TRUE; /* Print a header line if we print any more packet summaries */ - args->print_header_line = TRUE; + if (args->print_args->print_col_headings) + args->print_header_line = TRUE; } /* if (args->print_args->print_dissections != print_dissections_none) */ epan_dissect_cleanup(&edt); @@ -2525,7 +2529,7 @@ cf_print_packets(capture_file *cf, print_args_t *print_args) fmt_data *cfmt; callback_args.print_args = print_args; - callback_args.print_header_line = TRUE; + callback_args.print_header_line = print_args->print_col_headings; callback_args.header_line_buf = NULL; callback_args.header_line_buf_len = 256; callback_args.print_formfeed = FALSE; diff --git a/image/file_dlg_win32.rc b/image/file_dlg_win32.rc index bb8c7b2674..32320cae06 100644 --- a/image/file_dlg_win32.rc +++ b/image/file_dlg_win32.rc @@ -128,13 +128,13 @@ FONT 8, "MS Shell Dlg" LTEXT "0", EWFD_RANGE_DISP, 282, 72, 41, 8, SS_RIGHT LTEXT "0", EWFD_IGNORED_DISP, 282, 84, 41, 8, SS_RIGHT - GROUPBOX "Packet Format", EWFD_PKT_FORMAT_GB, 344, 0, 118, 102 CONTROL "Packet summary line", EWFD_PKT_SUMMARY_CB, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 350, 15, 84, 10 - CONTROL "Packet details:", EWFD_PKT_DETAIL_CB, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 350, 27, 95, 10 - COMBOBOX EWFD_PKT_DETAIL_COMBO, 366, 39, 74, 45, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - CONTROL "Packet Bytes", EWFD_PKT_BYTES_CB, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 350, 56, 80, 10 - CONTROL "Each packet on a new page", EWFD_PKT_NEW_PAGE_CB, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 350, 70, 106, 10 + CONTROL "Include column headings", EWFD_COL_HEADINGS_CB, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 362, 27, 94, 10 + CONTROL "Packet details:", EWFD_PKT_DETAIL_CB, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 350, 39, 95, 10 + COMBOBOX EWFD_PKT_DETAIL_COMBO, 362, 51, 74, 45, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + CONTROL "Packet Bytes", EWFD_PKT_BYTES_CB, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 350, 68, 80, 10 + CONTROL "Each packet on a new page", EWFD_PKT_NEW_PAGE_CB, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 350, 80, 106, 10 } diff --git a/print.h b/print.h index dd86882521..5011b00159 100644 --- a/print.h +++ b/print.h @@ -95,20 +95,20 @@ typedef enum { } print_dissections_e; typedef struct { - print_stream_t *stream; /* the stream to which we're printing */ - print_format_e format; /* plain text or PostScript */ - gboolean to_file; /* TRUE if we're printing to a file */ - char *file; /* file output pathname */ - char *cmd; /* print command string (not win32) */ + print_stream_t *stream; /* the stream to which we're printing */ + print_format_e format; /* plain text or PostScript */ + gboolean to_file; /* TRUE if we're printing to a file */ + char *file; /* file output pathname */ + char *cmd; /* print command string (not win32) */ packet_range_t range; - gboolean print_summary; /* TRUE if we should just print summary; - FALSE if we should print protocol tree. */ - print_dissections_e print_dissections; - gboolean print_hex; /* TRUE if we should also print hex data; - FALSE if we should print only if not dissected. */ - gboolean print_formfeed; /* TRUE if a formfeed should be printed - before each new packet */ + gboolean print_summary; /* TRUE if we should print summary line. */ + gboolean print_col_headings; /* TRUE if we should print column headings */ + print_dissections_e print_dissections; + gboolean print_hex; /* TRUE if we should print hex data; + * FALSE if we should print only if not dissected. */ + gboolean print_formfeed; /* TRUE if a formfeed should be printed before + * each new packet */ } print_args_t; /* diff --git a/ui/gtk/file_import_dlg.c b/ui/gtk/file_import_dlg.c index 4b7cd5a15d..447e3e812a 100644 --- a/ui/gtk/file_import_dlg.c +++ b/ui/gtk/file_import_dlg.c @@ -901,8 +901,9 @@ file_import_dlg_new(void) g_object_set_data(G_OBJECT(timefmt_cb), INPUT_TIMEFMT_LBL_KEY, timefmt_lbl); timefmt_te = gtk_entry_new(); + gtk_entry_set_text(GTK_ENTRY(timefmt_te), "%F %T."); gtk_widget_set_tooltip_text(timefmt_te, - "The format in which to parse timestamps in the text file (eg. %H:%M:%S.)." + "The format in which to parse timestamps in the text file (eg. %F %T.)." " Format specifiers are based on strptime(3)"); gtk_box_pack_start(GTK_BOX(timefmt_hb), timefmt_te, FALSE, FALSE, 0); @@ -922,7 +923,7 @@ file_import_dlg_new(void) " (inbound or outbound) of the packet"); gtk_box_pack_start(GTK_BOX(dir_hb), dir_cb, FALSE, FALSE, 0); - g_object_set_data(G_OBJECT(input_frm), INPUT_DIR_CB_KEY, dir_cb); + g_object_set_data(G_OBJECT(input_frm), INPUT_DIR_CB_KEY, dir_cb); /* Setup the import frame */ @@ -1118,7 +1119,7 @@ file_import_dlg_new(void) framelen_te = gtk_entry_new(); gtk_widget_set_tooltip_text(framelen_te, - "The maximum size of the frames to write to the import capture file (max 64000)"); + "The maximum size of the frames to write to the import capture file (max 65535)"); gtk_box_pack_start(GTK_BOX(framelen_hb), framelen_te, FALSE, FALSE, 0); g_object_set_data(G_OBJECT(import_frm), IMPORT_FRAME_LENGTH_TE_KEY, framelen_te); diff --git a/ui/gtk/print_dlg.c b/ui/gtk/print_dlg.c index fbfcbd84fe..228ada266d 100644 --- a/ui/gtk/print_dlg.c +++ b/ui/gtk/print_dlg.c @@ -96,6 +96,7 @@ static void print_destroy_cb(GtkWidget *win, gpointer user_data); #define PRINT_DEST_CB_KEY "printer_destination_check_button" #define PRINT_SUMMARY_CB_KEY "printer_summary_check_button" +#define PRINT_COL_HEADINGS_CB_KEY "printer_include_column_headings_button" #define PRINT_DETAILS_CB_KEY "printer_details_check_button" #define PRINT_COLLAPSE_ALL_RB_KEY "printer_collapse_all_radio_button" #define PRINT_AS_DISPLAYED_RB_KEY "printer_as_displayed_radio_button" @@ -139,6 +140,7 @@ file_print_cmd(gboolean print_selected) args->file = g_strdup(prefs.pr_file); args->cmd = g_strdup(prefs.pr_cmd); args->print_summary = TRUE; + args->print_col_headings = TRUE; args->print_dissections = print_dissections_as_displayed; args->print_hex = FALSE; args->print_formfeed = FALSE; @@ -207,6 +209,7 @@ export_text_cmd_cb(GtkWidget *widget _U_, gpointer data _U_) args->file = g_strdup(""); args->cmd = g_strdup(""); args->print_summary = TRUE; + args->print_col_headings = TRUE; args->print_dissections = print_dissections_as_displayed; args->print_hex = FALSE; args->print_formfeed = FALSE; @@ -261,6 +264,7 @@ export_ps_cmd_cb(GtkWidget *widget _U_, gpointer data _U_) args->file = g_strdup(""); args->cmd = g_strdup(""); args->print_summary = TRUE; + args->print_col_headings = TRUE; args->print_dissections = print_dissections_as_displayed; args->print_hex = FALSE; args->print_formfeed = FALSE; @@ -315,6 +319,7 @@ export_psml_cmd_cb(GtkWidget *widget _U_, gpointer data _U_) args->file = g_strdup(""); args->cmd = g_strdup(""); args->print_summary = TRUE; + args->print_col_headings = TRUE; args->print_dissections = print_dissections_as_displayed; args->print_hex = FALSE; args->print_formfeed = FALSE; @@ -368,6 +373,7 @@ export_pdml_cmd_cb(GtkWidget *widget _U_, gpointer data _U_) args->file = g_strdup(""); args->cmd = g_strdup(""); args->print_summary = TRUE; + args->print_col_headings = TRUE; args->print_dissections = print_dissections_as_displayed; args->print_hex = FALSE; args->print_formfeed = FALSE; @@ -420,6 +426,7 @@ export_csv_cmd_cb(GtkWidget *widget _U_, gpointer data _U_) args->file = g_strdup(""); args->cmd = g_strdup(""); args->print_summary = FALSE; + args->print_col_headings = FALSE; args->print_dissections = print_dissections_none; args->print_hex = FALSE; args->print_formfeed = FALSE; @@ -472,6 +479,7 @@ export_carrays_cmd_cb(GtkWidget *widget _U_, gpointer data _U_) args->file = g_strdup(""); args->cmd = g_strdup(""); args->print_summary = FALSE; + args->print_col_headings = FALSE; args->print_dissections = print_dissections_none; args->print_hex = FALSE; args->print_formfeed = FALSE; @@ -517,6 +525,7 @@ open_print_dialog(const char *title, output_action_e action, print_args_t *args) GtkWidget *format_fr, *format_vb; GtkWidget *summary_cb; + GtkWidget *col_headings_cb; GtkWidget *details_cb; GtkWidget *details_hb, *details_vb; @@ -709,6 +718,13 @@ open_print_dialog(const char *title, output_action_e action, print_args_t *args) gtk_box_pack_start(GTK_BOX(format_vb), summary_cb, TRUE, TRUE, 0); gtk_widget_show(summary_cb); + /* "Include column headings" check button */ + col_headings_cb = gtk_check_button_new_with_mnemonic("Include column headings"); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(col_headings_cb), args->print_col_headings); + g_signal_connect(col_headings_cb, "clicked", G_CALLBACK(print_cmd_toggle_detail), main_win); + gtk_widget_set_tooltip_text(col_headings_cb, "Include column headings when printing the packet summary line"); + gtk_box_pack_start(GTK_BOX(format_vb), col_headings_cb, TRUE, TRUE, 0); + gtk_widget_show(col_headings_cb); /* "Details" check button */ details_cb = gtk_check_button_new_with_mnemonic("Packet details:"); @@ -780,6 +796,7 @@ open_print_dialog(const char *title, output_action_e action, print_args_t *args) g_object_set_data(G_OBJECT(main_win), PRINT_ARGS_KEY, args); g_object_set_data(G_OBJECT(main_win), PRINT_SUMMARY_CB_KEY, summary_cb); + g_object_set_data(G_OBJECT(main_win), PRINT_COL_HEADINGS_CB_KEY, col_headings_cb); g_object_set_data(G_OBJECT(main_win), PRINT_DETAILS_CB_KEY, details_cb); g_object_set_data(G_OBJECT(main_win), PRINT_COLLAPSE_ALL_RB_KEY, collapse_all_rb); g_object_set_data(G_OBJECT(main_win), PRINT_AS_DISPLAYED_RB_KEY, as_displayed_rb); @@ -811,6 +828,7 @@ open_print_dialog(const char *title, output_action_e action, print_args_t *args) g_object_set_data(G_OBJECT(ok_bt), PRINT_ARGS_KEY, args); g_object_set_data(G_OBJECT(ok_bt), PRINT_FILE_TE_KEY, file_te); g_object_set_data(G_OBJECT(ok_bt), PRINT_SUMMARY_CB_KEY, summary_cb); + g_object_set_data(G_OBJECT(ok_bt), PRINT_COL_HEADINGS_CB_KEY, col_headings_cb); g_object_set_data(G_OBJECT(ok_bt), PRINT_DETAILS_CB_KEY, details_cb); g_object_set_data(G_OBJECT(ok_bt), PRINT_COLLAPSE_ALL_RB_KEY, collapse_all_rb); g_object_set_data(G_OBJECT(ok_bt), PRINT_AS_DISPLAYED_RB_KEY, as_displayed_rb); @@ -889,11 +907,13 @@ print_cmd_toggle_dest(GtkWidget *widget, gpointer data _U_) static void print_cmd_toggle_detail(GtkWidget *widget _U_, gpointer data) { - GtkWidget *print_bt, *summary_cb, *details_cb, *collapse_all_rb, *expand_all_rb, *as_displayed_rb, *hex_cb; + GtkWidget *print_bt, *summary_cb, *col_headings_cb, *details_cb; + GtkWidget *collapse_all_rb, *expand_all_rb, *as_displayed_rb, *hex_cb; gboolean print_detail; print_bt = GTK_WIDGET(g_object_get_data(G_OBJECT(data), PRINT_BT_KEY)); summary_cb = GTK_WIDGET(g_object_get_data(G_OBJECT(data), PRINT_SUMMARY_CB_KEY)); + col_headings_cb = GTK_WIDGET(g_object_get_data(G_OBJECT(data), PRINT_COL_HEADINGS_CB_KEY)); details_cb = GTK_WIDGET(g_object_get_data(G_OBJECT(data), PRINT_DETAILS_CB_KEY)); collapse_all_rb = GTK_WIDGET(g_object_get_data(G_OBJECT(data), PRINT_COLLAPSE_ALL_RB_KEY)); as_displayed_rb = GTK_WIDGET(g_object_get_data(G_OBJECT(data), PRINT_AS_DISPLAYED_RB_KEY)); @@ -1009,6 +1029,9 @@ print_ok_cb(GtkWidget *ok_bt, gpointer parent_w) button = (GtkWidget *)g_object_get_data(G_OBJECT(ok_bt), PRINT_SUMMARY_CB_KEY); args->print_summary = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (button)); + button = (GtkWidget *)g_object_get_data(G_OBJECT(ok_bt), PRINT_COL_HEADINGS_CB_KEY); + args->print_col_headings = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (button)); + button = (GtkWidget *)g_object_get_data(G_OBJECT(ok_bt), PRINT_COLLAPSE_ALL_RB_KEY); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (button))) { args->print_dissections = print_dissections_collapsed; diff --git a/ui/win32/file_dlg_win32.c b/ui/win32/file_dlg_win32.c index 0d2007cf6d..0f2a384467 100644 --- a/ui/win32/file_dlg_win32.c +++ b/ui/win32/file_dlg_win32.c @@ -655,6 +655,7 @@ win32_export_file(HWND h_wnd, capture_file *cf, export_type_e export_type) { print_args.to_file = TRUE; print_args.cmd = NULL; print_args.print_summary = TRUE; + print_args.print_col_headings = TRUE; print_args.print_dissections = print_dissections_as_displayed; print_args.print_hex = FALSE; print_args.print_formfeed = FALSE; @@ -1031,10 +1032,20 @@ print_update_dynamic(HWND dlg_hwnd, print_args_t *args) { HWND cur_ctrl; cur_ctrl = GetDlgItem(dlg_hwnd, EWFD_PKT_SUMMARY_CB); - if (SendMessage(cur_ctrl, BM_GETCHECK, 0, 0) == BST_CHECKED) + if (SendMessage(cur_ctrl, BM_GETCHECK, 0, 0) == BST_CHECKED) { args->print_summary = TRUE; - else + cur_ctrl = GetDlgItem(dlg_hwnd, EWFD_COL_HEADINGS_CB); + EnableWindow(cur_ctrl, TRUE); + if (SendMessage(cur_ctrl, BM_GETCHECK, 0, 0) == BST_CHECKED) + args->print_col_headings = TRUE; + else + args->print_col_headings = FALSE; + } else { args->print_summary = FALSE; + args->print_col_headings = FALSE; + cur_ctrl = GetDlgItem(dlg_hwnd, EWFD_COL_HEADINGS_CB); + EnableWindow(cur_ctrl, FALSE); + } cur_ctrl = GetDlgItem(dlg_hwnd, EWFD_PKT_DETAIL_CB); if (SendMessage(cur_ctrl, BM_GETCHECK, 0, 0) == BST_CHECKED) { @@ -1076,9 +1087,11 @@ static void format_handle_wm_initdialog(HWND dlg_hwnd, print_args_t *args) { HWND cur_ctrl; - /* Set the "Packet summary" box */ + /* Set the "Packet summary" and "Include column headings" boxes */ cur_ctrl = GetDlgItem(dlg_hwnd, EWFD_PKT_SUMMARY_CB); SendMessage(cur_ctrl, BM_SETCHECK, args->print_summary, 0); + cur_ctrl = GetDlgItem(dlg_hwnd, EWFD_COL_HEADINGS_CB); + SendMessage(cur_ctrl, BM_SETCHECK, args->print_col_headings, 0); /* Set the "Packet details" box */ cur_ctrl = GetDlgItem(dlg_hwnd, EWFD_PKT_DETAIL_CB); diff --git a/ui/win32/file_dlg_win32.h b/ui/win32/file_dlg_win32.h index a62e2cd402..3c3b07508f 100644 --- a/ui/win32/file_dlg_win32.h +++ b/ui/win32/file_dlg_win32.h @@ -72,7 +72,7 @@ gboolean win32_save_as_file(HWND h_wnd, capture_file *cf, * @param file_type Wiretap file type. * @param compressed Compress the file with gzip. * @param range Range of packets to export. - * + * * @return TRUE if packets were discarded when saving, FALSE otherwise */ gboolean win32_export_specified_packets_file(HWND h_wnd, GString *file_name, @@ -190,10 +190,11 @@ void file_set_save_marked_sensitive(); /* These MUST be contiguous */ #define EWFD_PKT_FORMAT_GB 1050 #define EWFD_PKT_SUMMARY_CB 1051 -#define EWFD_PKT_DETAIL_CB 1052 -#define EWFD_PKT_DETAIL_COMBO 1053 -#define EWFD_PKT_BYTES_CB 1054 -#define EWFD_PKT_NEW_PAGE_CB 1055 +#define EWFD_COL_HEADINGS_CB 1052 +#define EWFD_PKT_DETAIL_CB 1053 +#define EWFD_PKT_DETAIL_COMBO 1054 +#define EWFD_PKT_BYTES_CB 1055 +#define EWFD_PKT_NEW_PAGE_CB 1056 #ifdef __cplusplus }