summaryrefslogtreecommitdiff
path: root/ui/qt/packet_list_model.cpp
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-05-24 11:28:30 -0700
committerGuy Harris <guy@alum.mit.edu>2014-05-24 18:31:25 +0000
commit6db77b000fe58173eeed23b91b32c92c681feda2 (patch)
tree5113821a7f5e1b43734eccf94783d37962b37712 /ui/qt/packet_list_model.cpp
parent33ae4cb024e36192ff7c6fa1d3d6bdcce9b25b7a (diff)
downloadwireshark-6db77b000fe58173eeed23b91b32c92c681feda2.tar.gz
Allow wtap_read() and wtap_seek_read() to return records other than packets.
Add a "record type" field to "struct wtap_pkthdr"; currently, it can be REC_TYPE_PACKET, for a record containing a packet, or REC_TYPE_FILE_TYPE_SPECIFIC, for records containing file-type-specific data. Modify code that reads packets to be able to handle non-packet records, even if that just means ignoring them. Rename some routines to indicate that they handle more than just packets. We don't yet have any libwiretap code that supplies records other than REC_TYPE_PACKET or that supporting writing records other than REC_TYPE_PACKET, or any code to support plugins for handling REC_TYPE_FILE_TYPE_SPECIFIC records; this is just the first step for bug 8590. Change-Id: Idb40b78f17c2c3aea72031bcd252abf9bc11c813 Reviewed-on: https://code.wireshark.org/review/1773 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui/qt/packet_list_model.cpp')
-rw-r--r--ui/qt/packet_list_model.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/qt/packet_list_model.cpp b/ui/qt/packet_list_model.cpp
index a6b68f51bd..1d7a764561 100644
--- a/ui/qt/packet_list_model.cpp
+++ b/ui/qt/packet_list_model.cpp
@@ -221,9 +221,9 @@ QVariant PacketListModel::data(const QModelIndex &index, int role) const
memset(&phdr, 0, sizeof(struct wtap_pkthdr));
buffer_init(&buf, 1500);
- if (!cap_file_ || !cf_read_frame_r(cap_file_, fdata, &phdr, &buf)) {
+ if (!cap_file_ || !cf_read_record_r(cap_file_, fdata, &phdr, &buf)) {
/*
- * Error reading the frame.
+ * Error reading the record.
*
* Don't set the color filter for now (we might want
* to colorize it in some fashion to warn that the
@@ -247,7 +247,7 @@ QVariant PacketListModel::data(const QModelIndex &index, int role) const
// record->colorized = TRUE;
}
buffer_free(&buf);
- return QVariant(); /* error reading the frame */
+ return QVariant(); /* error reading the record */
}
create_proto_tree = (color_filters_used() && enable_color_) ||