summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-04-22 22:22:00 -0700
committerGuy Harris <guy@alum.mit.edu>2017-04-23 05:22:38 +0000
commita4eb68be97346edaaeca22381cfe3787ed9b78b8 (patch)
tree58fa1d97d37c32b8ec0fd0f102e82b6c264bf1e6
parent5e74b318fd9bfe14ca1bb2269a72dd29c5e28de9 (diff)
downloadwireshark-a4eb68be97346edaaeca22381cfe3787ed9b78b8.tar.gz
Rename some routines to better reflect what they do.
In TShark, rename load_cap_file() to read_cap_file(); this is TShark, not Wireshark, so you're not "loading" a file to be manipulated through the GUI. In TFShark, rename it to "read_file()"; not only are we not loading it, it's not even necessarily a capture file. Change-Id: I122b46ecd8cb7de9c1e1c249ba6c08fdeb93f7e2 Reviewed-on: https://code.wireshark.org/review/21291 Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r--tfshark.c6
-rw-r--r--tshark.c10
2 files changed, 8 insertions, 8 deletions
diff --git a/tfshark.c b/tfshark.c
index d42cdaf09c..b58d71dd9a 100644
--- a/tfshark.c
+++ b/tfshark.c
@@ -136,7 +136,7 @@ static output_fields_t* output_fields = NULL;
/* The line separator used between packets, changeable via the -S option */
static const char *separator = "";
-static int load_cap_file(capture_file *, int, gint64);
+static int read_file(capture_file *, int, gint64);
static gboolean process_packet_single_pass(capture_file *cf,
epan_dissect_t *edt, gint64 offset, struct wtap_pkthdr *whdr,
const guchar *pd, guint tap_flags);
@@ -981,7 +981,7 @@ main(int argc, char *argv[])
/* Process the packets in the file */
TRY {
/* XXX - for now there is only 1 packet */
- err = load_cap_file(&cfile, 1, 0);
+ err = read_file(&cfile, 1, 0);
}
CATCH(OutOfMemoryError) {
fprintf(stderr,
@@ -1295,7 +1295,7 @@ local_wtap_read(capture_file *cf, struct wtap_pkthdr* file_phdr _U_, int *err, g
}
static int
-load_cap_file(capture_file *cf, int max_packet_count, gint64 max_byte_count)
+read_file(capture_file *cf, int max_packet_count, gint64 max_byte_count)
{
guint32 framenum;
int err;
diff --git a/tshark.c b/tshark.c
index e3dc19add5..269d1d2c42 100644
--- a/tshark.c
+++ b/tshark.c
@@ -228,7 +228,7 @@ static char *output_file_name;
#endif /* HAVE_LIBPCAP */
-static int load_cap_file(capture_file *, char *, int, gboolean, int, gint64);
+static int read_cap_file(capture_file *, char *, int, gboolean, int, gint64);
static gboolean process_packet_single_pass(capture_file *cf,
epan_dissect_t *edt, gint64 offset, struct wtap_pkthdr *whdr,
const guchar *pd, guint tap_flags);
@@ -1948,14 +1948,14 @@ main(int argc, char *argv[])
}
/* Process the packets in the file */
- tshark_debug("tshark: invoking load_cap_file() to process the packets");
+ tshark_debug("tshark: invoking read_cap_file() to process the packets");
TRY {
#ifdef HAVE_LIBPCAP
- err = load_cap_file(&cfile, global_capture_opts.save_file, out_file_type, out_file_name_res,
+ err = read_cap_file(&cfile, global_capture_opts.save_file, out_file_type, out_file_name_res,
global_capture_opts.has_autostop_packets ? global_capture_opts.autostop_packets : 0,
global_capture_opts.has_autostop_filesize ? global_capture_opts.autostop_filesize : 0);
#else
- err = load_cap_file(&cfile, output_file_name, out_file_type, out_file_name_res, 0, 0);
+ err = read_cap_file(&cfile, output_file_name, out_file_type, out_file_name_res, 0, 0);
#endif
}
CATCH(OutOfMemoryError) {
@@ -2942,7 +2942,7 @@ process_packet_second_pass(capture_file *cf, epan_dissect_t *edt,
}
static int
-load_cap_file(capture_file *cf, char *save_file, int out_file_type,
+read_cap_file(capture_file *cf, char *save_file, int out_file_type,
gboolean out_file_name_res, int max_packet_count, gint64 max_byte_count)
{
gint linktype;