summaryrefslogtreecommitdiff
path: root/epan/packet.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/packet.c')
-rw-r--r--epan/packet.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/epan/packet.c b/epan/packet.c
index 00d90d40a5..cad51e756d 100644
--- a/epan/packet.c
+++ b/epan/packet.c
@@ -403,6 +403,23 @@ get_data_source_tvb(const struct data_source *src)
}
/*
+ * Find and return the tvb associated with the given data source name
+ */
+tvbuff_t *
+get_data_source_tvb_by_name(packet_info *pinfo, const char *name)
+{
+ GSList *source = pinfo->data_src;
+ for (source = pinfo->data_src; source; source = source->next) {
+ struct data_source *this_source = (struct data_source *)source;
+ if (this_source->name && strcmp(this_source->name, name) == 0) {
+ return this_source->tvb;
+ }
+ }
+ return NULL;
+}
+
+
+/*
* Free up a frame's list of data sources.
*/
void