#include "cfile.h"
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
/** Return values from functions that only can succeed or fail. */
typedef enum {
typedef void (*cf_callback_t) (gint event, gpointer data, gpointer user_data);
+typedef struct {
+ const char *string;
+ size_t string_len;
+ capture_file *cf;
+ gboolean frame_matched;
+ field_info *finfo;
+} match_data;
+
extern void
cf_callback_add(cf_callback_t func, gpointer user_data);
*/
gulong cf_get_computed_elapsed(void);
-/**
- * The coloring rules have changed, redo coloring
- *
- * @param cf the capture file
- */
-void cf_colorize_packets(capture_file *cf);
-
/**
* "Something" has changed, rescan all packets.
*
*/
cf_read_status_t cf_retap_packets(capture_file *cf);
-/**
- * The time format has changed, rescan all packets.
- *
- * @param cf the capture file
- */
-void cf_change_time_formats(capture_file *cf);
-
/**
* Adjust timestamp precision if auto is selected.
*
gboolean cf_find_packet_protocol_tree(capture_file *cf, const char *string,
search_direction dir);
+/**
+ * Find field with a label that contains text string cfile->sfilter.
+ *
+ * @param cf the capture file
+ * @param tree the protocol tree
+ * @param mdata the first field (mdata->finfo) that matched the string
+ * @return TRUE if a packet was found, FALSE otherwise
+ */
+extern gboolean cf_find_string_protocol_tree(capture_file *cf, proto_tree *tree,
+ match_data *mdata);
+
/**
* Find packet whose summary line contains a specified text string.
*
/**
* GoTo Packet in first row.
*
- * @param cf the capture file
* @return TRUE if the first row exists, FALSE otherwise
*/
-gboolean cf_goto_top_frame(capture_file *cf);
+gboolean cf_goto_top_frame(void);
/**
* GoTo Packet in last row.
*
- * @param cf the capture file
* @return TRUE if last row exists, FALSE otherwise
*/
-gboolean cf_goto_bottom_frame(capture_file *cf);
+gboolean cf_goto_bottom_frame(void);
/**
* GoTo Packet with the given row.
void read_keytab_file(const char *);
#endif
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#endif /* file.h */