#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);
* @param cf the capture file to be opened
* @param fname the filename to be opened
* @param is_tempfile is this a temporary file?
+ * @param err error code
* @return one of cf_status_t
*/
cf_status_t cf_open(capture_file *cf, const char *fname, gboolean is_tempfile, int *err);
* return a non-null value. The returned value should not be freed.
*
* @param cf the capture file
- * @param source the source description. this will be copied internally.
*/
const gchar *cf_get_tempfile_source(capture_file *cf);
* Set the number of packets in the capture file.
*
* @param cf the capture file
- * @param the number of packets in the capture file
+ * @param packet_count the number of packets in the capture file
*/
void cf_set_packet_count(capture_file *cf, int packet_count);
*/
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.
* Unselect all packets, if any.
*
* @param cf the capture file
- * @param row the row to select
*/
void cf_unselect_packet(capture_file *cf);
* Unselect all protocol tree fields, if any.
*
* @param cf the capture file
- * @param row the row to select
*/
void cf_unselect_field(capture_file *cf);
* NULL, a temporary file name is generated and *out_filename is set
* to point to the generated file name
* @param in_file_count the number of input files to merge
- * @param in_filnames array of input filenames
+ * @param in_filenames array of input filenames
* @param file_type the output filetype
* @param do_append FALSE to merge chronologically, TRUE simply append
* @return one of cf_status_t
void read_keytab_file(const char *);
#endif
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#endif /* file.h */