aboutsummaryrefslogtreecommitdiffstats
path: root/frame_tvbuff.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-11-30 16:30:19 -0800
committerGuy Harris <guy@alum.mit.edu>2014-12-01 00:31:03 +0000
commit846bb5394812c39359dfdbbf7e8755a7e3cf5326 (patch)
tree70dcf5a08a04abe66c1ef766ce15c634e87a6cf2 /frame_tvbuff.c
parent35b1bc5ec61260bc1890a2c991cdb7218946ae1f (diff)
Add a Buffer to wtap_pkthdr to hold file-type-specific packet metadata.
For example, this can be used for pcap-ng options not mapped to file-type-independent metadata values. Change-Id: I398b324c62c1cc1cc61eb5e9631de00481b4aadc Reviewed-on: https://code.wireshark.org/review/5549 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'frame_tvbuff.c')
-rw-r--r--frame_tvbuff.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/frame_tvbuff.c b/frame_tvbuff.c
index 71670eb23b..2e3019c7e3 100644
--- a/frame_tvbuff.c
+++ b/frame_tvbuff.c
@@ -74,7 +74,7 @@ frame_cache(struct tvb_frame *frame_tvb)
{
struct wtap_pkthdr phdr; /* Packet header */
- memset(&phdr, 0, sizeof(struct wtap_pkthdr));
+ wtap_phdr_init(&phdr);
if (frame_tvb->buf == NULL) {
frame_tvb->buf = (struct Buffer *) g_malloc(sizeof(struct Buffer));
@@ -87,6 +87,8 @@ frame_cache(struct tvb_frame *frame_tvb)
}
frame_tvb->tvb.real_data = ws_buffer_start_ptr(frame_tvb->buf) + frame_tvb->offset;
+
+ wtap_phdr_cleanup(&phdr);
}
static void