diff options
author | Guy Harris <guy@alum.mit.edu> | 1998-10-20 05:31:03 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 1998-10-20 05:31:03 +0000 |
commit | 0bb16cb9896ae50620085a0664942f44c9a16c6d (patch) | |
tree | 094fae93546e221f008e70f4eb6d582b1014a466 /packet.h | |
parent | 7867e7441dc1c34cbb08ab54d6c2839041c88471 (diff) | |
download | wireshark-0bb16cb9896ae50620085a0664942f44c9a16c6d.tar.gz wireshark-0bb16cb9896ae50620085a0664942f44c9a16c6d.tar.bz2 wireshark-0bb16cb9896ae50620085a0664942f44c9a16c6d.zip |
Add a "val_to_str()" routine that calls "match_strval()" and, if
it returns NULL, formats the value with the format passed in as
an argument, and returns a pointer to that static buffer.
Change several "match_strval()" calls to use "val_to_str()".
In "dissect_ospf()", use "match_strval()" to look up the packet
type, and use "Unknown" if it doesn't find a match.
svn path=/trunk/; revision=66
Diffstat (limited to 'packet.h')
-rw-r--r-- | packet.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1,7 +1,7 @@ /* packet.h * Definitions for packet disassembly structures and routines * - * $Id: packet.h,v 1.20 1998/10/16 06:46:55 guy Exp $ + * $Id: packet.h,v 1.21 1998/10/20 05:31:03 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -486,6 +486,7 @@ GtkWidget* add_item_to_tree(GtkWidget *, gint, gint, gchar *, ...) #else GtkWidget* add_item_to_tree(GtkWidget *, gint, gint, gchar *, ...); #endif +gchar* val_to_str(guint32 val, value_string *vs, char *fmt); gchar* match_strval(guint32, value_string*); /* Routines in packet.c */ |