aboutsummaryrefslogtreecommitdiffstats
path: root/epan/proto.c
diff options
context:
space:
mode:
authorTomas Kukosa <tomas.kukosa@siemens.com>2005-12-06 11:45:55 +0000
committerTomas Kukosa <tomas.kukosa@siemens.com>2005-12-06 11:45:55 +0000
commita5bfb48c2f4a3081115018932877f86fb6b01ff3 (patch)
treefcbe2ba42190e9e170f5ad9c4ff7ebab64d19b99 /epan/proto.c
parenta3ed89556a77fae53dbe1634e4e8f0b265a93092 (diff)
OBJECT IDENTIFIER name resolution moved to oid_resolv.c
svn path=/trunk/; revision=16699
Diffstat (limited to 'epan/proto.c')
-rw-r--r--epan/proto.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/epan/proto.c b/epan/proto.c
index 10d743320c..6cce739965 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -36,6 +36,7 @@
#include "ptvcursor.h"
#include "strutil.h"
#include "addr_resolv.h"
+#include "oid_resolv.h"
#include "plugins.h"
#include "proto.h"
#include "epan_dissect.h"
@@ -3336,6 +3337,7 @@ proto_item_fill_label(field_info *fi, gchar *label_str)
guint32 integer;
ipv4_addr *ipv4;
guint32 n_addr; /* network-order IPv4 address */
+ const gchar *name;
int ret; /*tmp return value */
switch(hfinfo->type) {
@@ -3502,9 +3504,16 @@ proto_item_fill_label(field_info *fi, gchar *label_str)
case FT_OID:
bytes = fvalue_get(&fi->value);
- ret = g_snprintf(label_str, ITEM_LABEL_LENGTH,
- "%s: %s", hfinfo->name,
- oid_to_str(bytes, fvalue_length(&fi->value)));
+ name = (oid_resolv_enabled()) ? get_oid_name(bytes, fvalue_length(&fi->value)) : NULL;
+ if (name) {
+ ret = g_snprintf(label_str, ITEM_LABEL_LENGTH,
+ "%s: %s (%s)", hfinfo->name,
+ oid_to_str(bytes, fvalue_length(&fi->value)), name);
+ } else {
+ ret = g_snprintf(label_str, ITEM_LABEL_LENGTH,
+ "%s: %s", hfinfo->name,
+ oid_to_str(bytes, fvalue_length(&fi->value)));
+ }
if ((ret == -1) || (ret >= ITEM_LABEL_LENGTH))
label_str[ITEM_LABEL_LENGTH - 1] = '\0';
break;