diff options
author | Guy Harris <gharris@sonic.net> | 2021-02-20 00:13:37 -0800 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2021-02-20 01:36:26 -0800 |
commit | 1f595c435c1476a24e2b443a768185ac2503087a (patch) | |
tree | d608bd80e5b357c5b11270089629dec883aabc5f /wiretap/wtap-int.h | |
parent | c80c16759ba23e29c70ec8fbe62e0a9870685a66 (diff) |
BER: get rid of WTAP_FILE_TYPE_SUBTYPE_BER.
Save a copy of the pathname used to open a file in the wtap structure.
This allows the BER file reader to put a pointer to it in the
pseudo-header; it also would allow file readers to attempt to read
"associated" files that have the same name as the file, but with a
different extension.
Instead of having cf_open() special-case BER files, and calling a
routine in the BER dissector to specify the file name to the dissector,
have separate dissectors for "dissect packet payload as BER" and
"dissect a file as BER", and have the latter get the pathname of the
file from the pseudo-header and determine the ASN.1 syntax from that.
(Side-effect - this means that you can now dissect a BER file, and have
the syntax be determined by the file extension, in TShark as well; the
above cf_open() special-casing was *not* done in TShark, so it didn't
work before. Now the application code doesn't need to do any of that,
so it works in TShark as well as Wireshark.)
Diffstat (limited to 'wiretap/wtap-int.h')
-rw-r--r-- | wiretap/wtap-int.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/wiretap/wtap-int.h b/wiretap/wtap-int.h index 8af29422b2..43d612f1be 100644 --- a/wiretap/wtap-int.h +++ b/wiretap/wtap-int.h @@ -48,6 +48,8 @@ struct wtap { GArray *nrb_hdrs; /**< holds the Name Res Block's comment/custom_opts, or NULL */ GArray *dsbs; /**< An array of DSBs (of type wtap_block_t), or NULL if not supported. */ + char *pathname; /**< File pathname; might just be "-" */ + void *priv; /* this one holds per-file state and is free'd automatically by wtap_close() */ void *wslua_data; /* this one holds wslua state info and is not free'd */ |