diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-05-24 17:04:44 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-05-25 00:05:07 +0000 |
commit | 318cf8a6782d8911c7c2891c395062f98eb0a316 (patch) | |
tree | c078f54d1ac8b39bb0b8bbe99226394bbcb98055 /epan/epan.c | |
parent | 6dffc3b7e364b7446c30db54d2193476a5f0fa93 (diff) |
Add support for dissecting non-packet records.
Add a dissector table indexed by the file type, and, for the
file-type-specific records, have the frame dissector skip the usual
pseudo-header processing, as the pseudo-header has a file-type-specific
record subtype in it, and call the dissector for that file type's
records.
Change-Id: Ibe97cf6340ffb0dabc08f355891bc346391b91f9
Reviewed-on: https://code.wireshark.org/review/1782
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/epan.c')
-rw-r--r-- | epan/epan.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/epan/epan.c b/epan/epan.c index ae5ea320f6..1dcdcd1fdb 100644 --- a/epan/epan.c +++ b/epan/epan.c @@ -325,14 +325,15 @@ epan_dissect_fake_protocols(epan_dissect_t *edt, const gboolean fake_protocols) } void -epan_dissect_run(epan_dissect_t *edt, struct wtap_pkthdr *phdr, - tvbuff_t *tvb, frame_data *fd, column_info *cinfo) +epan_dissect_run(epan_dissect_t *edt, int file_type_subtype, + struct wtap_pkthdr *phdr, tvbuff_t *tvb, frame_data *fd, + column_info *cinfo) { #ifdef HAVE_LUA wslua_prime_dfilter(edt); /* done before entering wmem scope */ #endif wmem_enter_packet_scope(); - dissect_record(edt, phdr, tvb, fd, cinfo); + dissect_record(edt, file_type_subtype, phdr, tvb, fd, cinfo); /* free all memory allocated */ ep_free_all(); @@ -340,12 +341,13 @@ epan_dissect_run(epan_dissect_t *edt, struct wtap_pkthdr *phdr, } void -epan_dissect_run_with_taps(epan_dissect_t *edt, struct wtap_pkthdr *phdr, - tvbuff_t *tvb, frame_data *fd, column_info *cinfo) +epan_dissect_run_with_taps(epan_dissect_t *edt, int file_type_subtype, + struct wtap_pkthdr *phdr, tvbuff_t *tvb, frame_data *fd, + column_info *cinfo) { wmem_enter_packet_scope(); tap_queue_init(edt); - dissect_record(edt, phdr, tvb, fd, cinfo); + dissect_record(edt, file_type_subtype, phdr, tvb, fd, cinfo); tap_push_tapped_queue(edt); /* free all memory allocated */ |