More updates from Hannes Gredler.
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 7 Jun 2001 19:13:35 +0000 (19:13 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 7 Jun 2001 19:13:35 +0000 (19:13 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3522 f5534014-38df-0310-8fa8-9805f1628bb7

AUTHORS
packet-isis-lsp.c
packet-isis-lsp.h

diff --git a/AUTHORS b/AUTHORS
index 8385c137a584cea98c43f43eb1ae8c8a9f5fccc7..9f776604fe444ac987f328eaa582b4920574e8be 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -589,9 +589,8 @@ Michal Melerowicz <Michal.Melerowicz@nokia.com> {
 
 Hannes Gredler <hannes@juniper.net> {
        OSI network layer over PPP support
-       Many ISIS enhancements
+       Many IS-IS enhancements
        Juniper Networks vendor ID in RADIUS dissector
-       hmac-md5 authentication support for IS-IS
 }
 
 Inoue <inoue@ainet.or.jp> {
index 8b6eb3ae1e44b015bc269c6ca3384e12f3a7e52b..e4524c5b5d678326ae5d9dc42b601410b9157c69 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-isis-lsp.c
  * Routines for decoding isis lsp packets and their CLVs
  *
- * $Id: packet-isis-lsp.c,v 1.14 2001/05/23 18:44:59 guy Exp $
+ * $Id: packet-isis-lsp.c,v 1.15 2001/06/07 19:13:35 guy Exp $
  * Stuart Stanley <stuarts@mxmail.net>
  *
  * Ethereal - Network traffic analyzer
@@ -414,24 +414,42 @@ dissect_lsp_ip_reachability_clv(const u_char *pd, int offset,
                        memcpy(&src, &pd[offset+4], 4);
                        memcpy(&mask, &pd[offset+8], 4);
                        ti = proto_tree_add_text ( tree, NullTVB, offset, 12, 
-                               "IP prefix: %s (%s) : %s",
-                               get_hostname(src), ip_to_str((guint8*)&src),
+                               "IPv4 prefix: %s : %s",
+                               ip_to_str((guint8*)&src),
                                ip_to_str((guint8*)&mask) );
                        ntree = proto_item_add_subtree(ti, 
                                ett_isis_lsp_clv_ip_reachability);
 
                        proto_tree_add_text (ntree, NullTVB, offset, 1,
-                               "Default Metric: %s %s %d:%d",
-                               ISIS_LSP_CLV_METRIC_SUPPORTED(pd[offset]) ? "External" : "Internal",
-                               ISIS_LSP_CLV_METRIC_RESERVED(pd[offset]) ? "(reserved bit != 0)" : "",
+                               "Default Metric: %d, %s, Distribution: %s",
                                ISIS_LSP_CLV_METRIC_VALUE(pd[offset]),
-                               pd[offset] );
-                       dissect_metric ( ntree, offset + 1, pd[offset+1], 
-                               "Delay", FALSE );
-                       dissect_metric ( ntree, offset + 2, pd[offset+2], 
-                               "Expense",FALSE );
-                       dissect_metric ( ntree, offset + 3, pd[offset+3], 
-                               "Error", FALSE );
+                               ISIS_LSP_CLV_METRIC_IE(pd[offset]) ? "External" : "Internal",
+                               ISIS_LSP_CLV_METRIC_UPDOWN(pd[offset]) ? "down" : "up");
+
+
+                       if (ISIS_LSP_CLV_METRIC_SUPPORTED(pd[offset+1])) {
+                         proto_tree_add_text (ntree, NullTVB, offset+1, 1, "Delay Metric:   Not supported");
+                                              } else {
+                          proto_tree_add_text (ntree, NullTVB, offset+1, 1, "Delay Metric:   %d, %s",
+                                              ISIS_LSP_CLV_METRIC_VALUE(pd[offset+1]),
+                                              ISIS_LSP_CLV_METRIC_IE(pd[offset+1]) ? "External" : "Internal");
+                                              }
+
+                        if (ISIS_LSP_CLV_METRIC_SUPPORTED(pd[offset+2])) {
+                          proto_tree_add_text (ntree, NullTVB, offset+2, 1, "Expense Metric: Not supported");
+                       } else {
+                          proto_tree_add_text (ntree, NullTVB, offset+2, 1, "Exense Metric:  %d, %s",
+                                               ISIS_LSP_CLV_METRIC_VALUE(pd[offset+2]),
+                                              ISIS_LSP_CLV_METRIC_IE(pd[offset+2]) ? "External" : "Internal");
+                       }
+
+                        if (ISIS_LSP_CLV_METRIC_SUPPORTED(pd[offset+3])) {
+                          proto_tree_add_text (ntree, NullTVB, offset+3, 1, "Error Metric:   Not supported");
+                       } else {
+                          proto_tree_add_text (ntree, NullTVB, offset+3, 1, "Error Metric:   %d, %s",
+                                               ISIS_LSP_CLV_METRIC_VALUE(pd[offset+3]),
+                                              ISIS_LSP_CLV_METRIC_IE(pd[offset+3]) ? "External" : "Internal");
+                       }
                }
                offset += 12;
                length -= 12;
@@ -845,15 +863,40 @@ dissect_lsp_eis_neighbors_clv_inner(const u_char *pd, int offset,
                        }
                        ntree = proto_item_add_subtree(ti, 
                                ett_isis_lsp_clv_is_neighbors);
-                       dissect_metric ( ntree, offset, pd[offset], "Default", 
-                               TRUE );
-                       dissect_metric ( ntree, offset + 1, pd[offset+1], 
-                               "Delay", FALSE );
-                       dissect_metric ( ntree, offset + 2, pd[offset+2], 
-                               "Expense",FALSE );
-                       dissect_metric ( ntree, offset + 3, pd[offset+3], 
-                               "Error", FALSE );
 
+
+
+                        proto_tree_add_text (ntree, NullTVB, offset, 1,
+                                            "Default Metric: %d, %s",
+                                            ISIS_LSP_CLV_METRIC_VALUE(pd[offset]),
+                                            ISIS_LSP_CLV_METRIC_IE(pd[offset]) ? "External" : "Internal");
+                                           
+                       if (ISIS_LSP_CLV_METRIC_SUPPORTED(pd[offset+1])) {
+                          proto_tree_add_text (ntree, NullTVB, offset+1, 1, "Delay Metric:   Not supported");
+                       } else {
+                          proto_tree_add_text (ntree, NullTVB, offset+1, 1, "Delay Metric:   %d, %s",
+                                             ISIS_LSP_CLV_METRIC_VALUE(pd[offset+1]),
+                                            ISIS_LSP_CLV_METRIC_IE(pd[offset+1]) ? "External" : "Internal");
+                       }
+
+
+                        if (ISIS_LSP_CLV_METRIC_SUPPORTED(pd[offset+2])) {
+                          proto_tree_add_text (ntree, NullTVB, offset+2, 1, "Expense Metric: Not supported");
+                        } else {
+                          proto_tree_add_text (ntree, NullTVB, offset+2, 1, "Expense Metric: %d, %s",
+                                              ISIS_LSP_CLV_METRIC_VALUE(pd[offset+2]),
+                                              ISIS_LSP_CLV_METRIC_IE(pd[offset+2]) ? "External" : "Internal");
+                        }
+
+                        if (ISIS_LSP_CLV_METRIC_SUPPORTED(pd[offset+3])) {
+                          proto_tree_add_text (ntree, NullTVB, offset+3, 1, "Error Metric:   Not supported");
+                        } else {
+                          proto_tree_add_text (ntree, NullTVB, offset+3, 1, "Error Metric:   %d, %s",
+                                              ISIS_LSP_CLV_METRIC_VALUE(pd[offset+3]),
+                                              ISIS_LSP_CLV_METRIC_IE(pd[offset+3]) ? "External" : "Internal");
+                        }
+        
+                       
 /* this is redundant information
                        Proto_tree_add_text ( ntree, NullTVB, offset + 4, id_length, 
                                "Neighbour ID: %s",
@@ -1002,7 +1045,7 @@ dissect_subclv_max_bw (const u_char *pd, int offset, proto_tree *tree) {
        ui = pntohl (&pd[offset]);
        memcpy (&bw, &ui, 4);
        proto_tree_add_text (tree, NullTVB, offset-2, 6,
-               "Maximum link bandwidth : %f bytes/second", bw );
+               "Maximum link bandwidth : %.2f Mbps", bw*8/1000000 );
 }
 
 /*
@@ -1029,7 +1072,7 @@ dissect_subclv_rsv_bw (const u_char *pd, int offset, proto_tree *tree) {
        ui = pntohl (&pd[offset]);
        memcpy (&bw, &ui, 4);
        proto_tree_add_text (tree, NullTVB, offset-2, 6,
-               "Reservable link bandwidth: %f bytes/second", bw );
+               "Reservable link bandwidth: %.2f Mbps", bw*8/1000000 );
 }
 
 /*
@@ -1063,7 +1106,7 @@ dissect_subclv_unrsv_bw (const u_char *pd, int offset, proto_tree *tree) {
                ui = pntohl (&pd[offset]);
                memcpy (&bw, &ui, 4);
                proto_tree_add_text (ntree, NullTVB, offset+4*i, 4,
-                       "priority level %d: %f bytes/second", i, bw );
+                       "priority level %d: %.2f Mbps", i, bw*8/1000000 );
        }
 }
 
@@ -1408,7 +1451,7 @@ isis_dissect_isis_lsp(int lsp_type, int header_length, int id_length,
                        inx++;
                }
                if (!some) { 
-                       strcat ( sbuf, "<none set!>" );
+                       strcat ( sbuf, "default-only" );
                }
                proto_tree_add_text(lsp_tree, NullTVB, offset + 18, 1, 
                        "Type block(0x%02x): P:%d, Supported metric(s): %s, OL:%d, istype:%s",
index 865d568fab34973557dabe00dc3010e99a77f96b..d33272c924d0c968ffbc82c5b901ed940f404b2e 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-isis-lsp.h
  * Defines and such for LSP and their CLV decodes
  *
- * $Id: packet-isis-lsp.h,v 1.5 2001/05/14 18:40:15 guy Exp $
+ * $Id: packet-isis-lsp.h,v 1.6 2001/06/07 19:13:35 guy Exp $
  * Stuart Stanley <stuarts@mxmail.net>
  *
  * Ethereal - Network traffic analyzer
@@ -50,7 +50,9 @@
 #define ISIS_LSP_TYPE_LEVEL_2          3
 
 #define ISIS_LSP_CLV_METRIC_SUPPORTED(x)       ((x)&0xf0)
+#define ISIS_LSP_CLV_METRIC_IE(x)               ((x)&0x20)
 #define ISIS_LSP_CLV_METRIC_RESERVED(x)                ((x)&0x40)
+#define ISIS_LSP_CLV_METRIC_UPDOWN(x)           ((x)&0x40)
 #define ISIS_LSP_CLV_METRIC_VALUE(x)           ((x)&0x3f)
 
 /*