diff options
author | Guy Harris <guy@alum.mit.edu> | 2002-01-13 20:35:12 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2002-01-13 20:35:12 +0000 |
commit | 0a03b0f73ef7595d7281097c94cccefa13059f7e (patch) | |
tree | c255fb8cb7e40c899ad998c9846d1dabb5bb9562 /ipproto.c | |
parent | 649cc279d6dad12744f67a23fa335e9ee2f55627 (diff) | |
download | wireshark-0a03b0f73ef7595d7281097c94cccefa13059f7e.tar.gz wireshark-0a03b0f73ef7595d7281097c94cccefa13059f7e.tar.bz2 wireshark-0a03b0f73ef7595d7281097c94cccefa13059f7e.zip |
Add a preferences page for the name resolution flags.
Separate the preferences value for those flags and the name resolution
code's value into separate variables; this means that the resolution
code no longer depends on the preferences code, and may let us
eventually have the current setting and the preference setting differ
(so that a user can temporarily override the preference setting without
causing subsequent saves of the preferences to save the temporary
value).
Add routines to create various types of widgets for preferences, and to
fetch the values for "enumerated" preferences, and use them both in the
code to handle hardwired preference pages and table-driven preference
pages.
svn path=/trunk/; revision=4536
Diffstat (limited to 'ipproto.c')
-rw-r--r-- | ipproto.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -1,7 +1,7 @@ /* ipproto.c * Routines for converting IPv4 protocol/v6 nxthdr field into string * - * $Id: ipproto.c,v 1.15 2001/11/13 23:55:29 gram Exp $ + * $Id: ipproto.c,v 1.16 2002/01/13 20:35:08 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -42,7 +42,7 @@ #include "ipproto.h" #include "packet.h" -#include "prefs.h" +#include "resolv.h" #include "packet-ip.h" static const value_string ipproto_val[] = { @@ -102,7 +102,11 @@ const char *ipprotostr(int proto) { goto ok; #ifdef HAVE_GETPROTOBYNUMBER - if (prefs.name_resolve) { + /* + * XXX - have another flag for resolving network-layer + * protocol names? + */ + if (g_resolv_flags != 0) { pe = getprotobynumber(proto); if (pe) { s = pe->p_name; |