Glib docs recommend using the slice API if you know you won't need to realloc.
[metze/wireshark/wip.git] / packet-range.h
index 0a00af2e2e63e1406de6aba341d794407de5c3f8..ac9cada687c9ace4c5c7c8bd47628d0cc63c3d03 100644 (file)
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
 #ifndef __PACKET_RANGE_H__
 #define __PACKET_RANGE_H__
 
-#include <glib.h>
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
 
-#include <epan/frame_data.h>
+#include <glib.h>
 
 #include <epan/range.h>
 
+#include "cfile.h"
+
+
 extern guint32  curr_selected_frame;
 
 typedef enum {
@@ -49,6 +54,7 @@ typedef struct packet_range_tag {
     packet_range_e  process;            /* which range to process */
     gboolean        process_filtered;   /* captured or filtered packets */
     gboolean        remove_ignored;     /* remove ignored packets */
+    gboolean        include_dependents;        /* True if packets which are dependents of others should be processed */
 
     /* user specified range(s) and, if null, error status */
     range_t         *user_range;
@@ -58,17 +64,17 @@ typedef struct packet_range_tag {
     guint32  selected_packet;       /* the currently selected packet */
 
     /* current packet counts (captured) */
-    /* cfile.count */               /* packets in capture file */
-    /* cfile.marked_count */        /* packets marked */
-    guint32  mark_range_cnt;        /* packets in marked range */
-    guint32  user_range_cnt;        /* packets in user specified range */
-    guint32  ignored_cnt;           /* packets ignored */
-    guint32  ignored_marked_cnt;    /* packets ignored and marked */
-    guint32  ignored_mark_range_cnt;/* packets ignored in marked range */
-    guint32  ignored_user_range_cnt;/* packets ignored in user specified range */
+    capture_file *cf;                     /* Associated capture file. */
+    guint32       mark_range_cnt;         /* packets in marked range */
+    guint32       user_range_cnt;         /* packets in user specified range */
+    guint32       ignored_cnt;            /* packets ignored */
+    guint32       ignored_marked_cnt;     /* packets ignored and marked */
+    guint32       ignored_mark_range_cnt; /* packets ignored in marked range */
+    guint32       ignored_user_range_cnt; /* packets ignored in user specified range */
 
     /* current packet counts (displayed) */
     guint32  displayed_cnt;
+    guint32  displayed_plus_dependents_cnt;
     guint32  displayed_marked_cnt;
     guint32  displayed_mark_range_cnt;
     guint32  displayed_user_range_cnt;
@@ -90,7 +96,7 @@ typedef enum {
 } range_process_e;
 
 /* init the range structure */
-extern void packet_range_init(packet_range_t *range);
+extern void packet_range_init(packet_range_t *range, capture_file *cf);
 
 /* check whether the packet range is OK */
 extern convert_ret_t packet_range_check(packet_range_t *range);
@@ -107,4 +113,8 @@ extern range_process_e packet_range_process_packet(packet_range_t *range, frame_
 /* convert user given string to the internal user specified range representation */
 extern void packet_range_convert_str(packet_range_t *range, const gchar *es);
 
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
 #endif /* __PACKET_RANGE_H__ */