diff options
author | Michael Mann <mmann78@netscape.net> | 2016-06-01 10:11:46 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2016-06-01 22:58:06 +0000 |
commit | 614d09af132be967b89103efb85721fa043929c9 (patch) | |
tree | 2be3f9f0b52f80b40fd3bb98ced1c3251ac95af9 /tshark.c | |
parent | dcf7ac4aa6e2c4fe64d8d81ab628a98ecb4e66bb (diff) |
Add data structures necessary to support multiple Name Resolution blocks.
This doesn't try to use any data from multiple Name Resolution blocks, it
just converts single Name Resolution block usage into a GArray, so the
potential is there to then use/support multiple Name Resolution blocks
within a file format (like pcapng)
Change-Id: Ib0b584af0bd263f183bd6d31ba18275ab0577d0c
Reviewed-on: https://code.wireshark.org/review/15684
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'tshark.c')
-rw-r--r-- | tshark.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -3235,7 +3235,7 @@ load_cap_file(capture_file *cf, char *save_file, int out_file_type, guint tap_flags; GArray *shb_hdrs = NULL; wtapng_iface_descriptions_t *idb_inf = NULL; - wtap_optionblock_t nrb_hdr = NULL; + GArray *nrb_hdrs = NULL; struct wtap_pkthdr phdr; Buffer buf; epan_dissect_t *edt = NULL; @@ -3266,7 +3266,7 @@ load_cap_file(capture_file *cf, char *save_file, int out_file_type, tshark_debug("tshark: snapshot_length = %d", snapshot_length); shb_hdrs = wtap_file_get_shb_for_new_file(cf->wth); - nrb_hdr = wtap_file_get_nrb_for_new_file(cf->wth); + nrb_hdrs = wtap_file_get_nrb_for_new_file(cf->wth); /* If we don't have an application name add Tshark */ wtap_optionblock_get_option_string(g_array_index(shb_hdrs, wtap_optionblock_t, 0), OPT_SHB_USERAPPL, &shb_user_appl); @@ -3292,10 +3292,10 @@ load_cap_file(capture_file *cf, char *save_file, int out_file_type, if (strcmp(save_file, "-") == 0) { /* Write to the standard output. */ pdh = wtap_dump_open_stdout_ng(out_file_type, linktype, - snapshot_length, FALSE /* compressed */, shb_hdrs, idb_inf, nrb_hdr, &err); + snapshot_length, FALSE /* compressed */, shb_hdrs, idb_inf, nrb_hdrs, &err); } else { pdh = wtap_dump_open_ng(save_file, out_file_type, linktype, - snapshot_length, FALSE /* compressed */, shb_hdrs, idb_inf, nrb_hdr, &err); + snapshot_length, FALSE /* compressed */, shb_hdrs, idb_inf, nrb_hdrs, &err); } } @@ -3514,7 +3514,7 @@ load_cap_file(capture_file *cf, char *save_file, int out_file_type, } wtap_dump_close(pdh, &err); wtap_optionblock_array_free(shb_hdrs); - wtap_optionblock_free(nrb_hdr); + wtap_optionblock_array_free(nrb_hdrs); exit(2); } } @@ -3629,7 +3629,7 @@ load_cap_file(capture_file *cf, char *save_file, int out_file_type, } wtap_dump_close(pdh, &err); wtap_optionblock_array_free(shb_hdrs); - wtap_optionblock_free(nrb_hdr); + wtap_optionblock_array_free(nrb_hdrs); exit(2); } } @@ -3746,7 +3746,7 @@ out: g_free(save_file_string); wtap_optionblock_array_free(shb_hdrs); - wtap_optionblock_free(nrb_hdr); + wtap_optionblock_array_free(nrb_hdrs); return err; } |