diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-08-10 19:08:40 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-08-11 02:09:15 +0000 |
commit | 08cbe559b3c82c4e152c3b8df2f6f6f1fe3d51a0 (patch) | |
tree | 69312aaa10e79c42055b5ae69d803b97e6cf34ca /wiretap/wtap.c | |
parent | f4ac2635647d389db83b369ed72054627ddab1af (diff) |
Add support for reading and writing the new if_hardware IDB option.
Support for writing it in live captures will come later; this change,
but not that one, will be backported so older versions of Wireshark
won't remove it when writing a file out.
Change-Id: I9fd4067991acfd2d18c03d0a373ce8337a9f3a76
Reviewed-on: https://code.wireshark.org/review/29064
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap/wtap.c')
-rw-r--r-- | wiretap/wtap.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/wiretap/wtap.c b/wiretap/wtap.c index de5ab7192b..259d3bf3f1 100644 --- a/wiretap/wtap.c +++ b/wiretap/wtap.c @@ -203,6 +203,13 @@ wtap_get_debug_if_descr(const wtap_block_t if_descr, wtap_encap_short_string(if_descr_mand->wtap_encap), line_end); + if (wtap_block_get_string_option_value(if_descr, OPT_IDB_HARDWARE, &tmp_content) == WTAP_OPTTYPE_SUCCESS) { + g_string_append_printf(info, + "%*cHardware = %s%s", indent, ' ', + tmp_content ? tmp_content : "NONE", + line_end); + } + if (wtap_block_get_uint64_option_value(if_descr, OPT_IDB_SPEED, &tmp64) == WTAP_OPTTYPE_SUCCESS) { g_string_append_printf(info, "%*cSpeed = %" G_GINT64_MODIFIER "u%s", indent, ' ', |