path: root/cfile.h
diff options
authorGuy Harris <guy@alum.mit.edu>2003-08-29 04:03:46 +0000
committerGuy Harris <guy@alum.mit.edu>2003-08-29 04:03:46 +0000
commit1cf6565adc2cc5eb7d51bb4ed9d44d0944d2361d (patch)
tree3b1ce973a5f1d1270672807ce6c88cbcdef63dce /cfile.h
parent6fc18311a67219ed55c788a829b85e0a0bcb79a0 (diff)
Get rid of the EBCDIC stuff in the find dialog - it's not supported yet,
so we shouldn't torment the users by offering it. Check the string type and convert it to an internal representation in the GUI code; have the search code deal only with the internal representation. Save the case-sensitivity flag, and the indication of where string searches look, along with other search parameters. Upper-casify the string, for case-insensitive searches, in the GUI code; don't save the upper-casified string, so it doesn't SHOUT at you when you next pop up a "find" dialog. Convert the hex value string to raw binary data in the GUI code, rather than doing so in the search code. Check that it's a valid string. Connect the signals to the radio buttons after the pointers have been attached to various GUI items - the signal handlers expect some of those pointers to be attached, and aren't happy if they're not. Have "find_packet()" contain a framework for searching, but not contain the matching code; instead, pass it a pointer to a matching routine and an opaque pointer to be passed to the matching routine. Have all the routines that do different types of searching have their own matching routines, and use the common "find_packet()" code, rather than duplicating that code. Search for the Info column by column type, not by name (the user can change the name). When matching on the protocol tree, don't format the entire protocol tree into a big buffer - just have a routine that matches the text representation of a protocol tree item against a string, and, if it finds a match, sets a "we found a match flag" and returns; have that routine not bother doing any more work if that flag is set. (Unfortunately, you can't abort "g_node_children_foreach()" in the middle of a traversal.) Free the generated display filter code after a find-by-display-filter finishes. svn path=/trunk/; revision=8306
Diffstat (limited to 'cfile.h')
1 files changed, 16 insertions, 5 deletions
diff --git a/cfile.h b/cfile.h
index f6939e39f0..f2e8b29e85 100644
--- a/cfile.h
+++ b/cfile.h
@@ -1,7 +1,7 @@
/* cfile.h
* capture_file definition & GUI-independent manipulation
- * $Id: cfile.h,v 1.2 2003/07/22 23:08:47 guy Exp $
+ * $Id: cfile.h,v 1.3 2003/08/29 04:03:45 guy Exp $
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -33,6 +33,14 @@ typedef enum {
FILE_READ_DONE /* Read completed */
} file_state;
+/* Character set for text search. */
+typedef enum {
+ /* add EBCDIC when it's implemented */
+} search_charset_t;
typedef struct _capture_file {
file_state state; /* Current state of capture file */
int filed; /* File descriptor of capture file */
@@ -64,10 +72,13 @@ typedef struct _capture_file {
gchar *cfilter; /* Capture filter string */
gchar *sfilter; /* Search filter string */
- gboolean sbackward; /* TRUE if search is backward, FALSE if forward */
- gboolean hex; /* TRUE is Hex search is being performed */
- gboolean ascii; /* TRUE is ASCII search is being performed */
- char *ftype; /* Find Frame String Type */
+ gboolean sbackward; /* TRUE if search is backward, FALSE if forward */
+ gboolean hex; /* TRUE is raw data search is being performed */
+ gboolean ascii; /* TRUE is text search is being performed */
+ search_charset_t scs_type; /* Character set for text search */
+ gboolean case_type; /* TRUE if case-insensitive text search */
+ gboolean decode_data; /* TRUE if searching protocol tree text */
+ gboolean summary_data; /* TRUE if searching Info column text */
union wtap_pseudo_header pseudo_header; /* Packet pseudo_header */
guint8 pd[WTAP_MAX_PACKET_SIZE]; /* Packet data */
GMemChunk *plist_chunk; /* Memory chunk for frame_data structures */