aboutsummaryrefslogtreecommitdiffstats
path: root/frame_tvbuff.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-12-03 21:01:18 -0800
committerGuy Harris <guy@alum.mit.edu>2017-12-04 05:02:18 +0000
commit1834dca3654ccec238bae130715871be3d8fa344 (patch)
tree5f1de666575b16f58be5a2f7b4e40cc5b93c02dc /frame_tvbuff.c
parent02944c412b4d9d7661c0a2b3eb9df44d632878ee (diff)
Move the parts of a capture_file used by libwireshark to a new structure.
Embed one of those structures in a capture_file, and have a struct epan_session point to that structure rather than to a capture_file. Pass that structure to the routines that fetch data that libwireshark uses when dissecting. That separates the stuff that libwireshark expects from the stuff that it doesn't look at. Change-Id: Ia3cd28efb9622476437a2ce32204597fae720877 Reviewed-on: https://code.wireshark.org/review/24692 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'frame_tvbuff.c')
-rw-r--r--frame_tvbuff.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/frame_tvbuff.c b/frame_tvbuff.c
index e050aea113..caa5af8e13 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.wth != frame_tvb->wth)
+ if (cfile.frame_set_info.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.wth && cfile.wth->random_fh) {
- frame_tvb->wth = cfile.wth;
+ if (cfile.frame_set_info.wth && cfile.frame_set_info.wth->random_fh) {
+ frame_tvb->wth = cfile.frame_set_info.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.wth && cfile.wth->random_fh) {
- frame_tvb->wth = cfile.wth;
+ if (cfile.frame_set_info.wth && cfile.frame_set_info.wth->random_fh) {
+ frame_tvb->wth = cfile.frame_set_info.wth;
frame_tvb->file_off = fd->file_off;
frame_tvb->offset = 0;
} else