diff options
author | Jakub Zawadzki <darkjames-ws@darkjames.pl> | 2013-07-21 18:38:03 +0000 |
---|---|---|
committer | Jakub Zawadzki <darkjames-ws@darkjames.pl> | 2013-07-21 18:38:03 +0000 |
commit | 28e9dcc4a9261a61b16dfd9a2051205289beb926 (patch) | |
tree | 69465d340a5472a87467c43de32fd9f6a3035b1a /rawshark.c | |
parent | 9e7b6f1a69c516579ffd4618f89e20559d738666 (diff) | |
download | wireshark-28e9dcc4a9261a61b16dfd9a2051205289beb926.tar.gz |
Some work on multi file dissection
- make init_dissection/cleanup_dissection private for libwireshark
- implement epan_new(), epan_free()
- pass epan_t to epan_dissect*
svn path=/trunk/; revision=50761
Diffstat (limited to 'rawshark.c')
-rw-r--r-- | rawshark.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/rawshark.c b/rawshark.c index cb1d70f26f..01149007c0 100644 --- a/rawshark.c +++ b/rawshark.c @@ -1060,7 +1060,7 @@ process_packet(capture_file *cf, gint64 offset, struct wtap_pkthdr *whdr, /* The protocol tree will be "visible", i.e., printed, only if we're printing packet details, which is true if we're in verbose mode ("verbose" is true). */ - epan_dissect_init(&edt, create_proto_tree, FALSE); + epan_dissect_init(&edt, cf->epan, create_proto_tree, FALSE); /* If we're running a read filter, prime the epan_dissect_t with that filter. */ @@ -1573,10 +1573,9 @@ raw_cf_open(capture_file *cf, const char *fname) /* The open succeeded. Fill in the information for this file. */ - /* Cleanup all data structures used for dissection. */ - cleanup_dissection(); - /* Initialize all data structures used for dissection. */ - init_dissection(); + /* Create new epan session for dissection. */ + epan_free(cf->epan); + cf->epan = epan_new(); cf->wth = NULL; cf->f_datalen = 0; /* not used, but set it anyway */ |