aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2016-06-01 10:11:46 -0400
committerMichael Mann <mmann78@netscape.net>2016-06-01 22:58:06 +0000
commit614d09af132be967b89103efb85721fa043929c9 (patch)
tree2be3f9f0b52f80b40fd3bb98ced1c3251ac95af9 /file.c
parentdcf7ac4aa6e2c4fe64d8d81ab628a98ecb4e66bb (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 'file.c')
-rw-r--r--file.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/file.c b/file.c
index 907b43f872..393fc5ed02 100644
--- a/file.c
+++ b/file.c
@@ -4491,13 +4491,13 @@ cf_save_records(capture_file *cf, const char *fname, guint save_format,
GArray *shb_hdrs = NULL;
wtapng_iface_descriptions_t *idb_inf = NULL;
- wtap_optionblock_t nrb_hdr = NULL;
+ GArray *nrb_hdrs = NULL;
int encap;
/* XXX: what free's this shb_hdr? */
shb_hdrs = wtap_file_get_shb_for_new_file(cf->wth);
idb_inf = wtap_file_get_idb_info(cf->wth);
- nrb_hdr = wtap_file_get_nrb_for_new_file(cf->wth);
+ nrb_hdrs = wtap_file_get_nrb_for_new_file(cf->wth);
/* Determine what file encapsulation type we should use. */
encap = wtap_dump_file_encap_type(cf->linktypes);
@@ -4512,10 +4512,10 @@ cf_save_records(capture_file *cf, const char *fname, guint save_format,
from which we're reading the packets that we're writing!) */
fname_new = g_strdup_printf("%s~", fname);
pdh = wtap_dump_open_ng(fname_new, save_format, encap, cf->snap,
- compressed, shb_hdrs, idb_inf, nrb_hdr, &err);
+ compressed, shb_hdrs, idb_inf, nrb_hdrs, &err);
} else {
pdh = wtap_dump_open_ng(fname, save_format, encap, cf->snap,
- compressed, shb_hdrs, idb_inf, nrb_hdr, &err);
+ compressed, shb_hdrs, idb_inf, nrb_hdrs, &err);
}
g_free(idb_inf);
idb_inf = NULL;
@@ -4714,7 +4714,7 @@ cf_export_specified_packets(capture_file *cf, const char *fname,
save_callback_args_t callback_args;
GArray *shb_hdrs = NULL;
wtapng_iface_descriptions_t *idb_inf = NULL;
- wtap_optionblock_t nrb_hdr = NULL;
+ GArray *nrb_hdrs = NULL;
int encap;
cf_callback_invoke(cf_cb_file_export_specified_packets_started, (gpointer)fname);
@@ -4729,7 +4729,7 @@ cf_export_specified_packets(capture_file *cf, const char *fname,
/* XXX: what free's this shb_hdr? */
shb_hdrs = wtap_file_get_shb_for_new_file(cf->wth);
idb_inf = wtap_file_get_idb_info(cf->wth);
- nrb_hdr = wtap_file_get_nrb_for_new_file(cf->wth);
+ nrb_hdrs = wtap_file_get_nrb_for_new_file(cf->wth);
/* Determine what file encapsulation type we should use. */
encap = wtap_dump_file_encap_type(cf->linktypes);
@@ -4744,10 +4744,10 @@ cf_export_specified_packets(capture_file *cf, const char *fname,
from which we're reading the packets that we're writing!) */
fname_new = g_strdup_printf("%s~", fname);
pdh = wtap_dump_open_ng(fname_new, save_format, encap, cf->snap,
- compressed, shb_hdrs, idb_inf, nrb_hdr, &err);
+ compressed, shb_hdrs, idb_inf, nrb_hdrs, &err);
} else {
pdh = wtap_dump_open_ng(fname, save_format, encap, cf->snap,
- compressed, shb_hdrs, idb_inf, nrb_hdr, &err);
+ compressed, shb_hdrs, idb_inf, nrb_hdrs, &err);
}
g_free(idb_inf);
idb_inf = NULL;