White space changes.
[obnox/wireshark/wip.git] / file.h
diff --git a/file.h b/file.h
index 841f6eb4039bb175bdf774608942e917c171ab16..facf0f1d40d76796108c9f959c836a9317769722 100644 (file)
--- a/file.h
+++ b/file.h
@@ -34,6 +34,9 @@
 
 #include "cfile.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
 
 /** Return values from functions that only can succeed or fail. */
 typedef enum {
@@ -71,6 +74,14 @@ 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);
 
@@ -83,6 +94,7 @@ cf_callback_remove(cf_callback_t func);
  * @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);
@@ -216,7 +228,6 @@ void cf_set_tempfile_source(capture_file *cf, gchar *source);
  * 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);
 
@@ -232,7 +243,7 @@ int cf_get_packet_count(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);
 
@@ -312,13 +323,6 @@ void cf_reftime_packets(capture_file *cf);
  */
 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.
  *
@@ -334,13 +338,6 @@ void cf_redissect_packets(capture_file *cf);
  */
 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.
  *
@@ -404,6 +401,17 @@ cf_print_status_t cf_write_carrays_packets(capture_file *cf, print_args_t *print
 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.
  *
@@ -471,18 +479,16 @@ gboolean cf_find_packet_time_reference(capture_file *cf, search_direction dir);
 /**
  * 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.
@@ -515,7 +521,6 @@ void cf_select_packet(capture_file *cf, int row);
  * Unselect all packets, if any.
  *
  * @param cf the capture file
- * @param row the row to select
  */
 void cf_unselect_packet(capture_file *cf);
 
@@ -523,7 +528,6 @@ 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);
 
@@ -567,7 +571,7 @@ void cf_unignore_frame(capture_file *cf, frame_data *frame);
  * 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
@@ -580,4 +584,8 @@ cf_merge_files(char **out_filename, int in_file_count,
 void read_keytab_file(const char *);
 #endif
 
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
 #endif /* file.h */