diff options
author | Guy Harris <guy@alum.mit.edu> | 2013-11-08 09:53:01 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2013-11-08 09:53:01 +0000 |
commit | 853da2eb9ba1732b37d3f47319bc94471d9c0e16 (patch) | |
tree | 94f8afdae71f496fe638550f9e2cea926195b8ee /wiretap/ngsniffer.c | |
parent | 5cec175b071b85c7cd392350e2fcc246dc20d41d (diff) | |
download | wireshark-853da2eb9ba1732b37d3f47319bc94471d9c0e16.tar.gz |
The "file types" we have are actually combinations of types and
subtypes, e.g. Network Monitor version 1 and Network Monitor version 2
are separate "file types", even though they both come from Network
Monitor.
Rename various functions, #defines, and variables appropriately.
svn path=/trunk/; revision=53166
Diffstat (limited to 'wiretap/ngsniffer.c')
-rw-r--r-- | wiretap/ngsniffer.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/wiretap/ngsniffer.c b/wiretap/ngsniffer.c index 044426e146..a1d34cd6b0 100644 --- a/wiretap/ngsniffer.c +++ b/wiretap/ngsniffer.c @@ -653,9 +653,9 @@ ngsniffer_open(wtap *wth, int *err, gchar **err_info) /* compressed or uncompressed Sniffer file? */ if (version.format != 1) { - wth->file_type = WTAP_FILE_NGSNIFFER_COMPRESSED; + wth->file_type_subtype = WTAP_FILE_TYPE_SUBTYPE_NGSNIFFER_COMPRESSED; } else { - wth->file_type = WTAP_FILE_NGSNIFFER_UNCOMPRESSED; + wth->file_type_subtype = WTAP_FILE_TYPE_SUBTYPE_NGSNIFFER_UNCOMPRESSED; } /* Set encap type before reading header records because the @@ -2487,7 +2487,7 @@ ng_file_read(void *buffer, unsigned int nbytes, wtap *wth, gboolean is_random, comp_stream = &ngsniffer->seq; } - if (wth->file_type == WTAP_FILE_NGSNIFFER_UNCOMPRESSED) { + if (wth->file_type_subtype == WTAP_FILE_TYPE_SUBTYPE_NGSNIFFER_UNCOMPRESSED) { errno = WTAP_ERR_CANT_READ; copied_bytes = file_read(buffer, copybytes, infile); if ((unsigned int) copied_bytes != copybytes) @@ -2655,7 +2655,7 @@ ng_file_skip_seq(wtap *wth, gint64 delta, int *err, gchar **err_info) ngsniffer = (ngsniffer_t *)wth->priv; - if (wth->file_type == WTAP_FILE_NGSNIFFER_UNCOMPRESSED) { + if (wth->file_type_subtype == WTAP_FILE_TYPE_SUBTYPE_NGSNIFFER_UNCOMPRESSED) { ngsniffer->seq.uncomp_offset += delta; return file_skip(wth->fh, delta, err); } @@ -2700,7 +2700,7 @@ ng_file_seek_rand(wtap *wth, gint64 offset, int *err, gchar **err_info) ngsniffer = (ngsniffer_t *)wth->priv; - if (wth->file_type == WTAP_FILE_NGSNIFFER_UNCOMPRESSED) { + if (wth->file_type_subtype == WTAP_FILE_TYPE_SUBTYPE_NGSNIFFER_UNCOMPRESSED) { if (file_seek(wth->random_fh, offset, SEEK_SET, err) == -1) return FALSE; return TRUE; |