aboutsummaryrefslogtreecommitdiffstats
path: root/packet.c
diff options
context:
space:
mode:
authorRichard Sharpe <sharpe@ns.aus.com>2000-03-26 07:59:47 +0000
committerRichard Sharpe <sharpe@ns.aus.com>2000-03-26 07:59:47 +0000
commit73927243e74356ee055a1b77f0c3a23eb78e7d89 (patch)
treede283e9866105b64d62714793192259378e4cc84 /packet.c
parente987dcca02acb6fd6e70ef4362866e9adbf72729 (diff)
Adding definitions of routines ... Will want to get rid of malloc and use
the glib equivalents ... svn path=/trunk/; revision=1750
Diffstat (limited to 'packet.c')
-rw-r--r--packet.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/packet.c b/packet.c
index 4182e1c54b..d40c8adba0 100644
--- a/packet.c
+++ b/packet.c
@@ -1,7 +1,7 @@
/* packet.c
* Routines for packet disassembly
*
- * $Id: packet.c,v 1.67 2000/03/26 06:57:40 sharpe Exp $
+ * $Id: packet.c,v 1.68 2000/03/26 07:59:47 sharpe Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -42,6 +42,7 @@
#include <glib.h>
#include <stdio.h>
+#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <ctype.h>
@@ -1188,8 +1189,17 @@ p_add_proto_data(frame_data *fd, int proto, void *proto_data)
void *
p_get_proto_data(frame_data *fd, int proto)
{
+ frame_proto_data temp;
+ GSList *item;
- return(NULL);
+ temp.proto = proto;
+ temp.proto_data = NULL;
+
+ item = g_slist_find_custom(fd->pfd, (gpointer *)&temp, p_compare);
+
+ if (item) return (void *)item->data;
+
+ return NULL;
}