diff options
author | Michael Mann <mmann78@netscape.net> | 2014-05-08 22:59:19 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2014-05-09 03:04:39 +0000 |
commit | 1abeb277f5e6bd27fbaebfecc8184e37ba9d008a (patch) | |
tree | 8cc6eaa5a6982454a00adc600fa4aab02bec3d73 /capinfos.c | |
parent | aa3a968eb6e85c47014a4cec4a2b955357b0e77f (diff) | |
download | wireshark-1abeb277f5e6bd27fbaebfecc8184e37ba9d008a.tar.gz |
Refactor Wiretap
Start of refactoring Wiretap and breaking structures down into "generally useful fields for dissection" and "capture specific". Since this in intended as a "base" for Wiretap and Filetap, the "wft" prefix is used for "common" functionality.
The "architectural" changes can be found in cfile.h, wtap.h, wtap-int.h and (new file) wftap-int.h. Most of the other (painstaking) changes were really just the result of compiling those new architecture changes.
bug:9607
Change-Id: Ife858a61760d7a8a03be073546c0e7e582cab2ae
Reviewed-on: https://code.wireshark.org/review/1485
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'capinfos.c')
-rw-r--r-- | capinfos.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/capinfos.c b/capinfos.c index bad557e2dd..dc2a2c9faf 100644 --- a/capinfos.c +++ b/capinfos.c @@ -408,7 +408,7 @@ time_string(time_t timer, capture_info *cf_info, gboolean want_lf) g_snprintf(time_string_buf, 20, "%lu%s", (unsigned long)timer, lf); return time_string_buf; } else { - time_string_ctime = ctime(&timer); + time_string_ctime = asctime(localtime(&timer)); if (time_string_ctime == NULL) { g_snprintf(time_string_buf, 20, "Not representable%s", lf); return time_string_buf; @@ -800,7 +800,7 @@ print_stats_table(const gchar *filename, capture_info *cf_info) } static int -process_cap_file(wtap *wth, const char *filename) +process_cap_file(wftap *wth, const char *filename) { int status = 0; int err; @@ -868,7 +868,7 @@ process_cap_file(wtap *wth, const char *filename) } /* Per-packet encapsulation */ - if (wtap_file_encap(wth) == WTAP_ENCAP_PER_PACKET) { + if (wftap_file_encap(wth) == WTAP_ENCAP_PER_PACKET) { if ((phdr->pkt_encap > 0) && (phdr->pkt_encap < WTAP_NUM_ENCAP_TYPES)) { cf_info.encap_counts[phdr->pkt_encap] += 1; } else { @@ -905,7 +905,7 @@ process_cap_file(wtap *wth, const char *filename) } /* File size */ - size = wtap_file_size(wth, &err); + size = wftap_file_size(wth, &err); if (size == -1) { fprintf(stderr, "capinfos: Can't get size of \"%s\": %s.\n", @@ -917,14 +917,14 @@ process_cap_file(wtap *wth, const char *filename) cf_info.filesize = size; /* File Type */ - cf_info.file_type = wtap_file_type_subtype(wth); - cf_info.iscompressed = wtap_iscompressed(wth); + cf_info.file_type = wftap_file_type_subtype(wth); + cf_info.iscompressed = wftap_iscompressed(wth); /* File Encapsulation */ - cf_info.file_encap = wtap_file_encap(wth); + cf_info.file_encap = wftap_file_encap(wth); /* Packet size limit (snaplen) */ - cf_info.snaplen = wtap_snapshot_length(wth); + cf_info.snaplen = wftap_snapshot_length(wth); if (cf_info.snaplen > 0) cf_info.snap_set = TRUE; else @@ -1098,7 +1098,7 @@ hash_to_str(const unsigned char *hash, size_t length, char *str) { int main(int argc, char *argv[]) { - wtap *wth; + wftap *wth; int err; gchar *err_info; int opt; |