aboutsummaryrefslogtreecommitdiffstats
path: root/capchild/capture_session.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2019-04-06 19:42:23 -0700
committerAnders Broman <a.broman58@gmail.com>2019-04-08 07:58:16 +0000
commit0771cf73cd2d4111727555a83f5401aa768cb849 (patch)
tree8ac5efb92e5b740a45decf1dd450d9eae23b71c8 /capchild/capture_session.h
parentbbc8cbfb9c0f4b43834af43e518de085cc39fd6b (diff)
Use a single wtap_rec and Buffer for an entire capture session.
That way we aren't allocating memory, reading packets from a batch, and freeing the memory for each batch of packets delivered by dumpcap; we do the allocation when the capture starts and the freeing when it finishes. Change-Id: If012ab865f3a99d869535ad10827ad8680c1b10c Reviewed-on: https://code.wireshark.org/review/32766 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'capchild/capture_session.h')
-rw-r--r--capchild/capture_session.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/capchild/capture_session.h b/capchild/capture_session.h
index 65a7d48fa0..93ddabb147 100644
--- a/capchild/capture_session.h
+++ b/capchild/capture_session.h
@@ -52,6 +52,8 @@ typedef struct _capture_session {
guint32 count; /**< Total number of frames captured */
capture_options *capture_opts; /**< options for this capture */
capture_file *cf; /**< handle to cfile */
+ wtap_rec rec; /**< record we're reading packet metadata into */
+ Buffer buf; /**< Buffer we're reading packet data into */
struct wtap *wtap; /**< current wtap file */
struct _info_data *cap_data_info; /**< stats for this capture */
} capture_session;