aboutsummaryrefslogtreecommitdiffstats
path: root/epan/frame_data.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/frame_data.c')
-rw-r--r--epan/frame_data.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/epan/frame_data.c b/epan/frame_data.c
index 46a6698f9d..4d150f1a27 100644
--- a/epan/frame_data.c
+++ b/epan/frame_data.c
@@ -38,6 +38,7 @@
index and opaque pointer. */
typedef struct _frame_proto_data {
int proto;
+ guint8 key;
void *proto_data;
} frame_proto_data;
@@ -60,11 +61,12 @@ p_compare(gconstpointer a, gconstpointer b)
}
void
-p_add_proto_data(frame_data *fd, int proto, void *proto_data)
+p_add_proto_data(frame_data *fd, int proto, guint8 key, void *proto_data)
{
frame_proto_data *p1 = (frame_proto_data *)wmem_alloc(wmem_file_scope(), sizeof(frame_proto_data));
p1->proto = proto;
+ p1->proto = key;
p1->proto_data = proto_data;
/* Add it to the GSLIST */
@@ -75,12 +77,13 @@ p_add_proto_data(frame_data *fd, int proto, void *proto_data)
}
void *
-p_get_proto_data(frame_data *fd, int proto)
+p_get_proto_data(frame_data *fd, int proto, guint8 key)
{
frame_proto_data temp, *p1;
GSList *item;
temp.proto = proto;
+ temp.proto = key;
temp.proto_data = NULL;
item = g_slist_find_custom(fd->pfd, (gpointer *)&temp, p_compare);
@@ -95,12 +98,13 @@ p_get_proto_data(frame_data *fd, int proto)
}
void
-p_remove_proto_data(frame_data *fd, int proto)
+p_remove_proto_data(frame_data *fd, int proto, guint8 key)
{
frame_proto_data temp;
GSList *item;
temp.proto = proto;
+ temp.proto = key;
temp.proto_data = NULL;
item = g_slist_find_custom(fd->pfd, (gpointer *)&temp, p_compare);