diff options
author | Guy Harris <guy@alum.mit.edu> | 2017-12-07 19:31:43 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2017-12-08 03:32:25 +0000 |
commit | 797d2f6a87607b146a2ef62e1ff501031dce8212 (patch) | |
tree | 7c18adbd5b86d5f2843dd760f6fa492f7c05fef4 /frame_tvbuff.c | |
parent | 0baa4458c5780b143ad4479d387202ddf4add06f (diff) |
Move the frame_set stuff back into the capture_file structure.
libwireshark now expects an epan_t to be created with a pointer to a
"packet provider" structure; that structure is opaque within
libwireshark, and a pointer to it is passed to the callbacks that
provide interface names, interface, descriptions, user comments, and
packet time stamps, and that set user comments. The code that calls
epan_new() is expected to provide those callbacks, and to define the
structure, which can be used by the providers. If none of the callbacks
need that extra information, the "packet provider" structure can be
null.
Have a "file" packet provider for all the programs that provide packets
from a file.
Change-Id: I4b5709a3dd7b098ebd7d2a7d95bcdd7b5903c1a0
Reviewed-on: https://code.wireshark.org/review/24731
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'frame_tvbuff.c')
-rw-r--r-- | frame_tvbuff.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/frame_tvbuff.c b/frame_tvbuff.c index caa5af8e13..f2ad3e606b 100644 --- a/frame_tvbuff.c +++ b/frame_tvbuff.c @@ -39,7 +39,7 @@ frame_read(struct tvb_frame *frame_tvb, struct wtap_pkthdr *phdr, Buffer *buf) gchar *err_info; /* sanity check, capture file was closed? */ - if (cfile.frame_set_info.wth != frame_tvb->wth) + if (cfile.provider.wth != frame_tvb->wth) return FALSE; /* XXX, what if phdr->caplen isn't equal to @@ -208,8 +208,8 @@ frame_tvbuff_new(const frame_data *fd, const guint8 *buf) frame_tvb = (struct tvb_frame *) tvb; /* XXX, wtap_can_seek() */ - if (cfile.frame_set_info.wth && cfile.frame_set_info.wth->random_fh) { - frame_tvb->wth = cfile.frame_set_info.wth; + if (cfile.provider.wth && cfile.provider.wth->random_fh) { + frame_tvb->wth = cfile.provider.wth; frame_tvb->file_off = fd->file_off; frame_tvb->offset = 0; } else @@ -309,8 +309,8 @@ file_tvbuff_new(const frame_data *fd, const guint8 *buf) frame_tvb = (struct tvb_frame *) tvb; /* XXX, wtap_can_seek() */ - if (cfile.frame_set_info.wth && cfile.frame_set_info.wth->random_fh) { - frame_tvb->wth = cfile.frame_set_info.wth; + if (cfile.provider.wth && cfile.provider.wth->random_fh) { + frame_tvb->wth = cfile.provider.wth; frame_tvb->file_off = fd->file_off; frame_tvb->offset = 0; } else |