diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-11-13 23:01:34 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-11-14 07:02:11 +0000 |
commit | 0e1b78c22a21b81865ab0ab8f5d3ac79c6b03629 (patch) | |
tree | 18e49dd951c9b60dec644bd8e5a4b538dfe4fc20 /wiretap/vwr.c | |
parent | 68c0002584601b6e66ff8b38676d5c71f4c48c60 (diff) |
All Veriwave files and packets use WTAP_ENCAP_IXVERIWAVE.
We set the file encapsulation to WTAP_ENCAP_IXVERIWAVE when we open the
file; we don't need to update it when we read packets. and we don't need
to set the per-packet encapsulation because it's set to the file
encapsulation for us by wtap_read() and wtap_seek_read().
Change-Id: I2f123e3fb0d505334f3451685290bdbae77a598b
Reviewed-on: https://code.wireshark.org/review/30622
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap/vwr.c')
-rw-r--r-- | wiretap/vwr.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/wiretap/vwr.c b/wiretap/vwr.c index 8725ba9c3c..d5b93fad0f 100644 --- a/wiretap/vwr.c +++ b/wiretap/vwr.c @@ -871,17 +871,6 @@ static gboolean vwr_read(wtap *wth, int *err, gchar **err_info, gint64 *data_off wth->rec_data, vwr, IS_TX, log_mode, err, err_info)) return FALSE; - /* If the per-file encapsulation isn't known, set it to this packet's encapsulation. */ - /* If it *is* known, and it isn't this packet's encapsulation, set it to */ - /* WTAP_ENCAP_PER_PACKET, as this file doesn't have a single encapsulation for all */ - /* packets in the file. */ - if (wth->file_encap == WTAP_ENCAP_UNKNOWN) - wth->file_encap = wth->rec.rec_header.packet_header.pkt_encap; - else { - if (wth->file_encap != wth->rec.rec_header.packet_header.pkt_encap) - wth->file_encap = WTAP_ENCAP_PER_PACKET; - } - return TRUE; } @@ -1693,7 +1682,6 @@ static gboolean vwr_read_s2_W_rec(vwr_t *vwr, wtap_rec *record, record->ts.secs = (time_t)s_sec; record->ts.nsecs = (int)(s_usec * 1000); - record->rec_header.packet_header.pkt_encap = WTAP_ENCAP_IXVERIWAVE; record->rec_type = REC_TYPE_PACKET; record->presence_flags = WTAP_HAS_TS; @@ -1874,7 +1862,6 @@ static gboolean vwr_read_s3_W_rec(vwr_t *vwr, wtap_rec *record, record->ts.secs = (time_t)s_sec; record->ts.nsecs = (int)(s_usec * 1000); - record->rec_header.packet_header.pkt_encap = WTAP_ENCAP_IXVERIWAVE; record->rec_type = REC_TYPE_PACKET; record->presence_flags = WTAP_HAS_TS; @@ -2206,7 +2193,6 @@ static gboolean vwr_read_s3_W_rec(vwr_t *vwr, wtap_rec *record, record->ts.secs = (time_t)s_sec; record->ts.nsecs = (int)(s_usec * 1000); - record->rec_header.packet_header.pkt_encap = WTAP_ENCAP_IXVERIWAVE; record->rec_type = REC_TYPE_PACKET; record->presence_flags = WTAP_HAS_TS; @@ -2716,7 +2702,6 @@ static gboolean vwr_read_rec_data_ethernet(vwr_t *vwr, wtap_rec *record, record->ts.secs = (time_t)s_sec; record->ts.nsecs = (int)(s_usec * 1000); - record->rec_header.packet_header.pkt_encap = WTAP_ENCAP_IXVERIWAVE; record->rec_type = REC_TYPE_PACKET; record->presence_flags = WTAP_HAS_TS; |