Witness: first guess
[metze/wireshark/wip.git] / cfile.h
diff --git a/cfile.h b/cfile.h
index f600850811c1a21d81d1c96f5bf5a6495356b5fb..5f4516f14629be6b350fe2efb3c97e62fa551765 100644 (file)
--- a/cfile.h
+++ b/cfile.h
 #ifndef __CFILE_H__
 #define __CFILE_H__
 
+#include <epan/epan.h>
+#include <epan/column-info.h>
 #include <epan/dfilter/dfilter.h>
 #include <epan/frame_data.h>
-#include "frame_data_sequence.h"
+#include <epan/frame_data_sequence.h>
+#include <wiretap/wtap.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -54,20 +57,16 @@ typedef enum {
   SD_BACKWARD
 } search_direction;
 
-/*
- * We store the frame_data structures in a radix tree, with 1024
- * elements per level.  The leaf nodes are arrays of 1024 frame_data
- * structures; the nodes above them are arrays of 1024 pointers to
- * the nodes below them.  The capture_file structure has a pointer
- * to the root node.
- *
- * As frame numbers are 32 bits, and as 1024 is 2^10, that gives us
- * up to 4 levels of tree.
- */
-#define LOG2_NODES_PER_LEVEL   10
-#define NODES_PER_LEVEL                (1<<LOG2_NODES_PER_LEVEL)
+#ifdef WANT_PACKET_EDITOR
+/* XXX, where this struct should go? */
+typedef struct {
+  struct wtap_pkthdr phdr; /**< Modified packet header */
+  char *pd;                /**< Modified packet data */
+} modified_frame_data;
+#endif
 
 typedef struct _capture_file {
+  epan_t      *epan;
   file_state   state;           /* Current state of capture file */
   gchar       *filename;        /* Name of capture file */
   gchar       *source;          /* Temp file source, e.g. "Pipe from elsewhere" */
@@ -123,10 +122,19 @@ typedef struct _capture_file {
   GTree       *edited_frames;   /* BST with modified frames */
 #endif
   gpointer     window;         /* Top-level window associated with file */
+  GTree       *frames_user_comments;   /* BST with user comments for frames (key = frame_data) */
+  gulong       computed_elapsed;
+
+  guint32      cum_bytes;
+  const frame_data *ref;
+  frame_data  *prev_dis;
+  frame_data  *prev_cap;
 } capture_file;
 
 extern void cap_file_init(capture_file *cf);
 
+extern const char *cap_file_get_interface_name(void *data, guint32 interface_id);
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */