aboutsummaryrefslogtreecommitdiffstats
path: root/ipproto.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2002-01-13 20:35:12 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2002-01-13 20:35:12 +0000
commit3aba21ff1354e09a8a455914166e74b2f5b57dcd (patch)
treec255fb8cb7e40c899ad998c9846d1dabb5bb9562 /ipproto.c
parent797a90d9e5d81b08ed8fda46042ec7515655ac68 (diff)
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4536 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'ipproto.c')
-rw-r--r--ipproto.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/ipproto.c b/ipproto.c
index 1496c480cb..af82bbd73c 100644
--- a/ipproto.c
+++ b/ipproto.c
@@ -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;