Get the NLPID value for ISIS from "nlpid.h", and report the NLPID value
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 13 Jan 2000 06:07:53 +0000 (06:07 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 13 Jan 2000 06:07:53 +0000 (06:07 +0000)
in ISIS packets with "nlpid_vals".

Report the NLPID value in CLNP packets with "nlpid_vals" as well.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1462 f5534014-38df-0310-8fa8-9805f1628bb7

packet-isis.c
packet-isis.h
packet-osi.c

index c6b515214de56c6c3b31ec0fa91311595e89f684..9a0feee18eda2f25a0391b650827258a93b9f4b6 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for ISO/OSI network and transport protocol packet disassembly, core
  * bits.
  *
- * $Id: packet-isis.c,v 1.1 1999/12/15 04:34:19 guy Exp $
+ * $Id: packet-isis.c,v 1.2 2000/01/13 06:07:52 guy Exp $
  * Stuart Stanley <stuarts@mxmail.net>
  *
  * Ethereal - Network traffic analyzer
@@ -39,6 +39,7 @@
 #include <string.h>
 #include <glib.h>
 #include "packet.h"
+#include "nlpid.h"
 #include "packet-isis.h"
 #include "packet-isis-lsp.h"
 #include "packet-isis-hello.h"
@@ -58,10 +59,6 @@ static int hf_isis_user_eco = -1;
 
 static gint ett_isis = -1;
 
-static const value_string irpd_vals[] = {
-       { ISIS_IRPD, "correct(0x83)" },
-       { 0,            NULL} };
-
 static const value_string isis_vals[] = {
        { ISIS_TYPE_L1_HELLO,   "L1 HELLO"},
        { ISIS_TYPE_L2_HELLO,   "L2 HELLO"},
@@ -202,9 +199,7 @@ dissect_isis(const u_char *pd, int offset, frame_data *fd,
                ti = proto_tree_add_item(tree, proto_isis, offset, 
                        fd->cap_len - offset, NULL );
                isis_tree = proto_item_add_subtree(ti, ett_isis);
-               proto_tree_add_item_format(isis_tree, hf_isis_irpd, offset, 1,
-                       ihdr->isis_irpd, 
-                       "Intradomain Routing Protocol Discrimintator: 0x%02x",
+               proto_tree_add_item(isis_tree, hf_isis_irpd, offset, 1,
                        ihdr->isis_irpd );
                proto_tree_add_item(isis_tree, hf_isis_header_length,
                        offset + 1, 1, ihdr->isis_header_length );
@@ -309,7 +304,7 @@ proto_register_isis(void) {
        static hf_register_info hf[] = {
                { &hf_isis_irpd,
                { "Intradomain Routing Protocol Discriminator", "isis.irpd",    
-                 FT_UINT8, BASE_DEC, VALS(irpd_vals), 0xff, "" }},
+                 FT_UINT8, BASE_HEX, VALS(nlpid_vals), 0x0, "" }},
 
                { &hf_isis_header_length,
                { "HDR Length",         "isis.hdr_len", FT_UINT8, BASE_DEC, 
index f40bf9e445ee4ea3e9f24f31be43216df2e769c3..9ebc600a288db83ce2525f8977c8058497a00647 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-isis.h
  * Defines and such for core isis protcol decode.
  *
- * $Id: packet-isis.h,v 1.1 1999/12/15 04:34:19 guy Exp $
+ * $Id: packet-isis.h,v 1.2 2000/01/13 06:07:52 guy Exp $
  * Stuart Stanley <stuarts@mxmail.net>
  *
  * Ethereal - Network traffic analyzer
 #ifndef _PACKET_ISIS_H
 #define _PACKET_ISIS_H
 
-/* 
- * the IntraDomain Routing Protocol Descriminator is an achitectueral constant
- * set to 0x83 for all packets.
- */
-#define ISIS_IRPD      0x83
-
 /*
  * The version we support is 1
  */
index 59d332efd69149e095ee236eebf6f3fc318788b6..180c46105e69a7ef48b9dcfca20cd6e5c6764cfe 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-osi.c
  * Routines for ISO/OSI network and transport protocol packet disassembly
  *
- * $Id: packet-osi.c,v 1.15 2000/01/13 05:41:24 guy Exp $
+ * $Id: packet-osi.c,v 1.16 2000/01/13 06:07:53 guy Exp $
  * Laurent Deniel <deniel@worldnet.fr>
  *
  * Ethereal - Network traffic analyzer
@@ -1469,9 +1469,7 @@ void dissect_clnp(const u_char *pd, int offset, frame_data *fd,
   if (tree) {
     ti = proto_tree_add_item(tree, proto_clnp, offset, clnp.cnf_hdr_len, NULL);
     clnp_tree = proto_item_add_subtree(ti, ett_clnp);
-    proto_tree_add_item_format(clnp_tree, hf_clnp_id, offset, 1, 
-                              clnp.cnf_proto_id,
-                              "Protocol identifier: 0x%02x", 
+    proto_tree_add_item(clnp_tree, hf_clnp_id, offset, 1, 
                               clnp.cnf_proto_id);
     proto_tree_add_item(clnp_tree, hf_clnp_length, offset +  1, 1, 
                        clnp.cnf_hdr_len); 
@@ -1643,7 +1641,7 @@ void proto_register_clnp(void)
 {
   static hf_register_info hf[] = {
     { &hf_clnp_id,
-      { "Protocol identifier", "clnp.id",      FT_UINT8, BASE_DEC, NULL, 0x0,
+      { "Protocol identifier", "clnp.id",      FT_UINT8, BASE_HEX, VALS(nlpid_vals), 0x0,
        "" }},
 
     { &hf_clnp_length,