aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/5views.c
diff options
context:
space:
mode:
Diffstat (limited to 'wiretap/5views.c')
-rw-r--r--wiretap/5views.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/wiretap/5views.c b/wiretap/5views.c
index db377b1570..c30571096c 100644
--- a/wiretap/5views.c
+++ b/wiretap/5views.c
@@ -297,6 +297,7 @@ _5views_read_header(wtap *wth, FILE_T fh, t_5VW_TimeStamped_Header *hdr,
hdr->Utc = pletoh32(&hdr->Utc);
hdr->NanoSecondes = pletoh32(&hdr->NanoSecondes);
+ phdr->rec_type = REC_TYPE_PACKET;
phdr->presence_flags = WTAP_HAS_TS;
phdr->ts.secs = hdr->Utc;
phdr->ts.nsecs = hdr->NanoSecondes;
@@ -370,6 +371,12 @@ static gboolean _5views_dump(wtap_dumper *wdh,
_5views_dump_t *_5views = (_5views_dump_t *)wdh->priv;
t_5VW_TimeStamped_Header HeaderFrame;
+ /* We can only write packet records. */
+ if (phdr->rec_type != REC_TYPE_PACKET) {
+ *err = WTAP_ERR_REC_TYPE_UNSUPPORTED;
+ return FALSE;
+ }
+
/* Don't write out something bigger than we can read. */
if (phdr->caplen > WTAP_MAX_PACKET_SIZE) {
*err = WTAP_ERR_PACKET_TOO_LARGE;