aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/proto_draw.h
diff options
context:
space:
mode:
authorStephen Fisher <steve@stephen-fisher.com>2007-01-28 02:49:50 +0000
committerStephen Fisher <steve@stephen-fisher.com>2007-01-28 02:49:50 +0000
commitb4a656ec1fb861536ba5fb0d0a4dfd523b7fcc14 (patch)
tree65e943e1270b7f234f6190acdaa128bcb7717eba /gtk/proto_draw.h
parentc6009ed5ab1b340e87765a56122d234f13b760db (diff)
From Douglas Pratley:
This is a patch adding items to the context menus for the packet list and packet details panes for copying packet data to the clipboard. New menu item on packet list pane: Copy (sub menu) -> Summary (Text) Copies fields displayed in the packet list, tab separated Summary (CSV) Copies fields displayed in the packet list, comma separated Hex and Text Copies data for the selected frame in hex-editor style (similar to Copy\All Information in packet bytes pane) Text Only Copies data for the selected frame, dropping non-printable characters other than line breaks (similar to Copy\Text Only in packet bytes pane) Hex Columns As Hex and Text but without text Hex Stream Copies data for the selected frame as an unpunctuated list of hex values Binary Stream Copies raw packet bytes to the clipboard as MIME type application/octet-stream svn path=/trunk/; revision=20581
Diffstat (limited to 'gtk/proto_draw.h')
-rw-r--r--gtk/proto_draw.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/gtk/proto_draw.h b/gtk/proto_draw.h
index 094b0bf0a9..367083b182 100644
--- a/gtk/proto_draw.h
+++ b/gtk/proto_draw.h
@@ -127,12 +127,29 @@ highlight_field(tvbuff_t *tvb, gint byte, GtkTreeView *tree_view,
*/
extern void savehex_cb(GtkWidget * w, gpointer data);
+/** Format of packet data to copy to clipboard.
+ * Lower nibble holds data type, next nibble holds flags.
+ */
+typedef enum {
+ CD_ALLINFO, /* All information - columated hex with text in separate column */
+ CD_TEXTONLY, /* Printable characters */
+ CD_HEX, /* Hex, space separated, no linebreaks */
+ CD_HEXCOLUMNS, /* Like "All Information" but with no ASCII */
+ CD_BINARY, /* Raw binary octets */
+
+ CD_TYPEMASK = 0x0000FFFF, /* Mask for extracting type */
+ CD_FLAGSMASK = 0xFFFF0000, /* Mask for extracting flags */
+
+ CD_FLAGS_SELECTEDONLY = 0x00010000 /* Copy only selected bytes */
+} copy_data_type;
+
+
/** Callback for "Copy packet bytes to clipboard" operation.
*
* @param w unused
* @param data unused
*/
-extern void copy_hex_cb(GtkWidget * w, gpointer data, int data_type);
+extern void copy_hex_cb(GtkWidget * w, gpointer data, copy_data_type data_type);
/** Redraw a given byte view window.
*