diff options
author | Richard Sharpe <sharpe@ns.aus.com> | 2000-03-26 07:59:47 +0000 |
---|---|---|
committer | Richard Sharpe <sharpe@ns.aus.com> | 2000-03-26 07:59:47 +0000 |
commit | 73927243e74356ee055a1b77f0c3a23eb78e7d89 (patch) | |
tree | de283e9866105b64d62714793192259378e4cc84 /packet.c | |
parent | e987dcca02acb6fd6e70ef4362866e9adbf72729 (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.c | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -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; } |