Removed trailing whitespaces from .h and .c files using the
[obnox/wireshark/wip.git] / packet-isis-lsp.c
index b0ec31e622ab7b929402e725793369f65d6568ec..be7f2f2af25725187b7e1b05a616d95098c2f741 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.23 2001/12/26 21:37:21 guy Exp $
+ * $Id: packet-isis-lsp.c,v 1.33 2002/08/04 09:08:03 jmayer Exp $
  * Stuart Stanley <stuarts@mxmail.net>
  *
  * Ethereal - Network traffic analyzer
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #include <stdio.h>
 #include <string.h>
 #include <glib.h>
 
-#ifdef HAVE_NET_INET_H
-#include <net/inet.h>
-#endif
-
 #include "epan/ipv4.h"
-#include "packet.h"
+#include <epan/packet.h>
 #include "packet-osi.h"
 #include "packet-ipv6.h"
 #include "packet-isis.h"
 #include "packet-isis-clv.h"
 #include "packet-isis-lsp.h"
-#include "resolv.h"
+#include <epan/resolv.h>
 
 /* lsp packets */
 static int hf_isis_lsp_pdu_length = -1;
@@ -97,62 +89,43 @@ static const value_string isis_lsp_istype_vals[] = {
  * Predclare dissectors for use in clv dissection.
  */
 static void dissect_lsp_prefix_neighbors_clv(tvbuff_t *tvb, 
-       packet_info *pinfo, proto_tree *tree, int offset, 
-       int id_length, int length);
+       proto_tree *tree, int offset, int id_length, int length);
 static void dissect_lsp_partition_dis_clv(tvbuff_t *tvb, 
-       packet_info *pinfo, proto_tree *tree, int offset, 
-       int id_length, int length);
+       proto_tree *tree, int offset, int id_length, int length);
 static void dissect_lsp_mt_is_reachability_clv(tvbuff_t *tvb, 
-       packet_info *pinfo, proto_tree *tree, int offset, 
-       int id_length, int length);
+       proto_tree *tree, int offset, int id_length, int length);
 static void dissect_lsp_ext_is_reachability_clv(tvbuff_t *tvb, 
-       packet_info *pinfo, proto_tree *tree, int offset, 
-       int id_length, int length);
+       proto_tree *tree, int offset, int id_length, int length);
 static void dissect_lsp_l2_is_neighbors_clv(tvbuff_t *tvb, 
-       packet_info *pinfo, proto_tree *tree, int offset, 
-       int id_length, int length);
+       proto_tree *tree, int offset, int id_length, int length);
 static void dissect_lsp_l1_es_neighbors_clv(tvbuff_t *tvb, 
-       packet_info *pinfo, proto_tree *tree, int offset, 
-       int id_length, int length);
+       proto_tree *tree, int offset, int id_length, int length);
 static void dissect_lsp_l1_is_neighbors_clv(tvbuff_t *tvb, 
-       packet_info *pinfo, proto_tree *tree, int offset, 
-       int id_length, int length);
+       proto_tree *tree, int offset, int id_length, int length);
 static void dissect_lsp_area_address_clv(tvbuff_t *tvb, 
-       packet_info *pinfo, proto_tree *tree, int offset, 
-       int id_length, int length);
+       proto_tree *tree, int offset, int id_length, int length);
 static void dissect_lsp_l2_auth_clv(tvbuff_t *tvb, 
-       packet_info *pinfo, proto_tree *tree, int offset, 
-       int id_length, int length);
+       proto_tree *tree, int offset, int id_length, int length);
 static void dissect_lsp_l1_auth_clv(tvbuff_t *tvb, 
-       packet_info *pinfo, proto_tree *tree, int offset, 
-       int id_length, int length);
+       proto_tree *tree, int offset, int id_length, int length);
 static void dissect_lsp_ipv6_int_addr_clv(tvbuff_t *tvb, 
-       packet_info *pinfo, proto_tree *tree, int offset, 
-       int id_length, int length);
+       proto_tree *tree, int offset, int id_length, int length);
 static void dissect_lsp_ip_int_addr_clv(tvbuff_t *tvb, 
-       packet_info *pinfo, proto_tree *tree, int offset, 
-       int id_length, int length);
+       proto_tree *tree, int offset, int id_length, int length);
 static void dissect_lsp_te_router_id_clv(tvbuff_t *tvb, 
-       packet_info *pinfo, proto_tree *tree, int offset, 
-       int id_length, int length);
+       proto_tree *tree, int offset, int id_length, int length);
 static void dissect_lsp_hostname_clv(tvbuff_t *tvb, 
-       packet_info *pinfo, proto_tree *tree, int offset, 
-       int id_length, int length);
+       proto_tree *tree, int offset, int id_length, int length);
 static void dissect_lsp_mt_clv(tvbuff_t *tvb, 
-       packet_info *pinfo, proto_tree *tree, int offset, 
-       int id_length, int length);
+       proto_tree *tree, int offset, int id_length, int length);
 static void dissect_lsp_nlpid_clv(tvbuff_t *tvb, 
-       packet_info *pinfo, proto_tree *tree, int offset, 
-       int id_length, int length);
+       proto_tree *tree, int offset, int id_length, int length);
 static void dissect_lsp_ipv6_reachability_clv(tvbuff_t *tvb, 
-       packet_info *pinfo, proto_tree *tree, int offset, 
-       int id_length, int length);
+       proto_tree *tree, int offset, int id_length, int length);
 static void dissect_lsp_ext_ip_reachability_clv(tvbuff_t *tvb, 
-       packet_info *pinfo, proto_tree *tree, int offset, 
-       int id_length, int length);
+       proto_tree *tree, int offset, int id_length, int length);
 static void dissect_lsp_ip_reachability_clv(tvbuff_t *tvb, 
-       packet_info *pinfo, proto_tree *tree, int offset, 
-       int id_length, int length);
+       proto_tree *tree, int offset, int id_length, int length);
 
 
 
@@ -405,7 +378,6 @@ static const isis_clv_handle_t clv_l2_lsp_opts[] = {
  *
  * Input:
  *     tvbuff_t * : tvbuffer for packet data
- *     packet_info * : info for current packet
  *     proto_tree * : protocol display tree to fill out.  May be NULL
  *     int : offset into packet data where we are.
  *     guint8 : value of the metric.
@@ -416,8 +388,8 @@ static const isis_clv_handle_t clv_l2_lsp_opts[] = {
  *     void, but we will add to proto tree if !NULL.
  */
 static void 
-dissect_metric(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
-       int offset, guint8 value, char *pstr, int force_supported ) 
+dissect_metric(tvbuff_t *tvb, proto_tree *tree,        int offset, guint8 value,
+       char *pstr, int force_supported ) 
 {
        int s;
 
@@ -443,7 +415,6 @@ dissect_metric(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
  *
  * Input:
  *     tvbuff_t * : tvbuffer for packet data
- *     packet_info * : info for current packet
  *     proto_tree * : proto tree to build on (may be null)
  *     int : current offset into packet data
  *     int : length of IDs in packet.
@@ -453,9 +424,8 @@ dissect_metric(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
  *     void, will modify proto_tree if not null.
  */
 static void 
-dissect_lsp_ip_reachability_clv(tvbuff_t *tvb, 
-       packet_info *pinfo, proto_tree *tree, int offset, 
-       int id_length, int length)
+dissect_lsp_ip_reachability_clv(tvbuff_t *tvb, proto_tree *tree, int offset, 
+       int id_length _U_, int length)
 {
        proto_item      *ti;
        proto_tree      *ntree = NULL;
@@ -476,7 +446,7 @@ dissect_lsp_ip_reachability_clv(tvbuff_t *tvb,
          
        while ( length > 0 ) {
                if (length<12) {
-                       isis_dissect_unknown(tvb, pinfo, tree, offset,
+                       isis_dissect_unknown(tvb, tree, offset,
                                "short IP reachability (%d vs 12)", length );
                        return;
                }
@@ -564,7 +534,6 @@ dissect_lsp_ip_reachability_clv(tvbuff_t *tvb,
  *
  * Input:
  *   tvbuff_t * : tvbuffer for packet data
- *   packet_info * : info for current packet
  *   proto_tree * : proto tree to build on (may be null)
  *   int : current offset into packet data
  *   int : length of IDs in packet.
@@ -574,9 +543,8 @@ dissect_lsp_ip_reachability_clv(tvbuff_t *tvb,
  *   void, will modify proto_tree if not null.
  */
 static void 
-dissect_lsp_ext_ip_reachability_clv(tvbuff_t *tvb, 
-       packet_info *pinfo, proto_tree *tree, int offset, 
-       int id_length, int length)
+dissect_lsp_ext_ip_reachability_clv(tvbuff_t *tvb, proto_tree *tree,
+       int offset, int id_length _U_, int length)
 {
        proto_item *pi = NULL;
        proto_tree *subtree = NULL;
@@ -593,7 +561,7 @@ dissect_lsp_ext_ip_reachability_clv(tvbuff_t *tvb,
                bit_length = ctrl_info & 0x3f;
                byte_length = (bit_length + 7) / 8;
                tvb_memcpy (tvb, prefix, offset+5, byte_length);
-               pi = proto_tree_add_text (tree, tvb, offset, 0,
+               pi = proto_tree_add_text (tree, tvb, offset, -1,
                        "IPv4 prefix: %s/%d", 
                        ip_to_str (prefix),
                        bit_length );
@@ -623,7 +591,6 @@ dissect_lsp_ext_ip_reachability_clv(tvbuff_t *tvb,
  *
  * Input:
  *   tvbuff_t * : tvbuffer for packet data
- *   packet_info * : info for current packet
  *   proto_tree * : proto tree to build on (may be null)
  *   int : current offset into packet data
  *   int : length of IDs in packet.
@@ -633,9 +600,8 @@ dissect_lsp_ext_ip_reachability_clv(tvbuff_t *tvb,
  *   void, will modify proto_tree if not null.
  */
 static void 
-dissect_lsp_ipv6_reachability_clv(tvbuff_t *tvb, 
-       packet_info *pinfo, proto_tree *tree, int offset, 
-       int id_length, int length)
+dissect_lsp_ipv6_reachability_clv(tvbuff_t *tvb, proto_tree *tree, int offset, 
+       int id_length _U_, int length)
 {
        proto_item        *ti;
        proto_tree        *ntree = NULL;
@@ -653,7 +619,7 @@ dissect_lsp_ipv6_reachability_clv(tvbuff_t *tvb,
                bit_length = tvb_get_guint8(tvb, offset+5);
                byte_length = (bit_length + 7) / 8;
                tvb_memcpy (tvb, prefix.s6_addr, offset+6, byte_length);
-               ti = proto_tree_add_text (tree, tvb, offset, 0,
+               ti = proto_tree_add_text (tree, tvb, offset, -1,
                        "IP prefix: %s /%d", 
                        ip6_to_str (&prefix),
                        bit_length );
@@ -694,7 +660,6 @@ dissect_lsp_ipv6_reachability_clv(tvbuff_t *tvb,
  *
  * Input:
  *     tvbuff_t * : tvbuffer for packet data
- *     packet_info * : info for current packet
  *     proto_tree * : proto tree to build on (may be null)
  *     int : current offset into packet data
  *     int : length of IDs in packet.
@@ -704,11 +669,10 @@ dissect_lsp_ipv6_reachability_clv(tvbuff_t *tvb,
  *     void, will modify proto_tree if not null.
  */
 static void 
-dissect_lsp_nlpid_clv(tvbuff_t *tvb, 
-       packet_info *pinfo, proto_tree *tree, int offset, 
-       int id_length, int length)
+dissect_lsp_nlpid_clv(tvbuff_t *tvb, proto_tree *tree, int offset, 
+       int id_length _U_, int length)
 {
-       isis_dissect_nlpid_clv(tvb, pinfo, tree, offset, length);
+       isis_dissect_nlpid_clv(tvb, tree, offset, length);
 }
 
 /*
@@ -719,23 +683,20 @@ dissect_lsp_nlpid_clv(tvbuff_t *tvb,
  *     clv common one.
  *
  * Input:
- *     u_char * : packet data
+ *      tvbuff_t * : tvbuffer for packet data
+ *      proto_tree * : proto tree to build on (may be null)
  *     int : current offset into packet data
  *     guint : length of this clv
  *     int : length of IDs in packet.
- *     frame_data * : frame data
- *     proto_tree * : proto tree to build on (may be null)
  *
  * Output:
  *     void, will modify proto_tree if not null.
  */
 static void 
-dissect_lsp_mt_clv(tvbuff_t *tvb, 
-       packet_info *pinfo, proto_tree *tree, int offset, 
-       int id_length, int length)
+dissect_lsp_mt_clv(tvbuff_t *tvb, proto_tree *tree, int offset, 
+       int id_length _U_, int length)
 {
-       isis_dissect_mt_clv(tvb, pinfo, tree, offset, length,
-                           hf_isis_lsp_clv_mt );
+       isis_dissect_mt_clv(tvb, tree, offset, length, hf_isis_lsp_clv_mt );
 }
 
 /*
@@ -747,7 +708,6 @@ dissect_lsp_mt_clv(tvbuff_t *tvb,
  *
  * Input:
  *      tvbuff_t * : tvbuffer for packet data
- *      packet_info * : info for current packet
  *      proto_tree * : proto tree to build on (may be null)
  *      int : current offset into packet data
  *      int : length of IDs in packet.
@@ -757,11 +717,10 @@ dissect_lsp_mt_clv(tvbuff_t *tvb,
  *      void, will modify proto_tree if not null.
  */
 static void 
-dissect_lsp_hostname_clv(tvbuff_t *tvb, 
-       packet_info *pinfo, proto_tree *tree, int offset, 
-       int id_length, int length)
+dissect_lsp_hostname_clv(tvbuff_t *tvb, proto_tree *tree, int offset, 
+       int id_length _U_, int length)
 {
-        isis_dissect_hostname_clv(tvb, pinfo, tree, offset, length);
+        isis_dissect_hostname_clv(tvb, tree, offset, length);
 }
 
 
@@ -774,7 +733,6 @@ dissect_lsp_hostname_clv(tvbuff_t *tvb,
  *
  * Input:
  *      tvbuff_t * : tvbuffer for packet data
- *      packet_info * : info for current packet
  *      proto_tree * : proto tree to build on (may be null)
  *      int : current offset into packet data
  *      int : length of IDs in packet.
@@ -784,11 +742,10 @@ dissect_lsp_hostname_clv(tvbuff_t *tvb,
  *      void, will modify proto_tree if not null.
  */
 static void 
-dissect_lsp_te_router_id_clv(tvbuff_t *tvb, 
-       packet_info *pinfo, proto_tree *tree, int offset, 
-       int id_length, int length)
+dissect_lsp_te_router_id_clv(tvbuff_t *tvb, proto_tree *tree, int offset, 
+       int id_length _U_, int length)
 {
-        isis_dissect_te_router_id_clv(tvb, pinfo, tree, offset, length,
+        isis_dissect_te_router_id_clv(tvb, tree, offset, length,
                 hf_isis_lsp_clv_te_router_id );
 }
 
@@ -802,7 +759,6 @@ dissect_lsp_te_router_id_clv(tvbuff_t *tvb,
  *
  * Input:
  *     tvbuff_t * : tvbuffer for packet data
- *     packet_info * : info for current packet
  *     proto_tree * : proto tree to build on (may be null)
  *     int : current offset into packet data
  *     int : length of IDs in packet.
@@ -812,11 +768,10 @@ dissect_lsp_te_router_id_clv(tvbuff_t *tvb,
  *     void, will modify proto_tree if not null.
  */
 static void 
-dissect_lsp_ip_int_addr_clv(tvbuff_t *tvb, 
-       packet_info *pinfo, proto_tree *tree, int offset, 
-       int id_length, int length)
+dissect_lsp_ip_int_addr_clv(tvbuff_t *tvb, proto_tree *tree, int offset, 
+       int id_length _U_, int length)
 {
-       isis_dissect_ip_int_clv(tvb, pinfo, tree, offset, length,
+       isis_dissect_ip_int_clv(tvb, tree, offset, length,
                hf_isis_lsp_clv_ipv4_int_addr );
 }
 
@@ -829,7 +784,6 @@ dissect_lsp_ip_int_addr_clv(tvbuff_t *tvb,
  *
  * Input:
  *   tvbuff_t * : tvbuffer for packet data
- *   packet_info * : info for current packet
  *   proto_tree * : proto tree to build on (may be null)
  *   int : current offset into packet data
  *   int : length of IDs in packet.
@@ -839,11 +793,10 @@ dissect_lsp_ip_int_addr_clv(tvbuff_t *tvb,
  *   void, will modify proto_tree if not null.
  */
 static void 
-dissect_lsp_ipv6_int_addr_clv(tvbuff_t *tvb, 
-       packet_info *pinfo, proto_tree *tree, int offset, 
-       int id_length, int length)
+dissect_lsp_ipv6_int_addr_clv(tvbuff_t *tvb, proto_tree *tree, int offset, 
+       int id_length _U_, int length)
 {
-       isis_dissect_ipv6_int_clv(tvb, pinfo, tree, offset, length,
+       isis_dissect_ipv6_int_clv(tvb, tree, offset, length,
                hf_isis_lsp_clv_ipv6_int_addr );
 }
 
@@ -856,7 +809,6 @@ dissect_lsp_ipv6_int_addr_clv(tvbuff_t *tvb,
  *
  * Input:
  *     tvbuff_t * : tvbuffer for packet data
- *     packet_info * : info for current packet
  *     proto_tree * : proto tree to build on (may be null)
  *     int : current offset into packet data
  *     int : length of IDs in packet.
@@ -866,11 +818,10 @@ dissect_lsp_ipv6_int_addr_clv(tvbuff_t *tvb,
  *     void, will modify proto_tree if not null.
  */
 static void 
-dissect_lsp_l1_auth_clv(tvbuff_t *tvb, 
-       packet_info *pinfo, proto_tree *tree, int offset, 
-       int id_length, int length)
+dissect_lsp_l1_auth_clv(tvbuff_t *tvb, proto_tree *tree, int offset, 
+       int id_length _U_, int length)
 {
-       isis_dissect_authentication_clv(tvb, pinfo, tree, offset, length,
+       isis_dissect_authentication_clv(tvb, tree, offset, length,
                "Per area authentication" );
 }
 
@@ -883,7 +834,6 @@ dissect_lsp_l1_auth_clv(tvbuff_t *tvb,
  *
  * Input:
  *     tvbuff_t * : tvbuffer for packet data
- *     packet_info * : info for current packet
  *     proto_tree * : proto tree to build on (may be null)
  *     int : current offset into packet data
  *     int : length of IDs in packet.
@@ -893,11 +843,10 @@ dissect_lsp_l1_auth_clv(tvbuff_t *tvb,
  *     void, will modify proto_tree if not null.
  */
 static void 
-dissect_lsp_l2_auth_clv(tvbuff_t *tvb, 
-       packet_info *pinfo, proto_tree *tree, int offset, 
-       int id_length, int length)
+dissect_lsp_l2_auth_clv(tvbuff_t *tvb, proto_tree *tree, int offset, 
+       int id_length _U_, int length)
 {
-       isis_dissect_authentication_clv(tvb, pinfo, tree, offset, length,
+       isis_dissect_authentication_clv(tvb, tree, offset, length,
                "Per domain authentication" );
 }
 
@@ -910,7 +859,6 @@ dissect_lsp_l2_auth_clv(tvbuff_t *tvb,
  *
  * Input:
  *     tvbuff_t * : tvbuffer for packet data
- *     packet_info * : info for current packet
  *     proto_tree * : protocol display tree to fill out.  May be NULL
  *     int : offset into packet data where we are.
  *     int : length of IDs in packet.
@@ -920,11 +868,10 @@ dissect_lsp_l2_auth_clv(tvbuff_t *tvb,
  *      void, but we will add to proto tree if !NULL.
  */
 static void 
-dissect_lsp_area_address_clv(tvbuff_t *tvb, 
-       packet_info *pinfo, proto_tree *tree, int offset, 
-       int id_length, int length)
+dissect_lsp_area_address_clv(tvbuff_t *tvb, proto_tree *tree, int offset, 
+       int id_length _U_, int length)
 {
-       isis_dissect_area_address_clv(tvb, pinfo, tree, offset, length);
+       isis_dissect_area_address_clv(tvb, tree, offset, length);
 }
 
 /*
@@ -941,7 +888,6 @@ dissect_lsp_area_address_clv(tvbuff_t *tvb,
  *
  * Input:
  *     tvbuff_t * : tvbuffer for packet data
- *     packet_info * : info for current packet
  *     proto_tree * : protocol display tree to fill out.  May be NULL
  *     int : offset into packet data where we are.
  *     int : length of IDs in packet.
@@ -953,9 +899,8 @@ dissect_lsp_area_address_clv(tvbuff_t *tvb,
  *      void, but we will add to proto tree if !NULL.
  */
 static void 
-dissect_lsp_eis_neighbors_clv_inner(tvbuff_t *tvb, packet_info *pinfo,
-       proto_tree *tree, int offset,
-       int length, int id_length, int show_virtual, int is_eis)
+dissect_lsp_eis_neighbors_clv_inner(tvbuff_t *tvb, proto_tree *tree,
+       int offset, int length, int id_length, int show_virtual, int is_eis)
 {
        proto_item      *ti;
        proto_tree      *ntree = NULL;
@@ -967,7 +912,7 @@ dissect_lsp_eis_neighbors_clv_inner(tvbuff_t *tvb, packet_info *pinfo,
                        if ( show_virtual ) {
                                /* virtual path flag */
                                proto_tree_add_text ( tree, tvb, offset, 1, 
-                                  tvb_get_guint8(tvb, offset) ? "IsNotVirtual" : "IsVirtual" );
+                                  tvb_get_guint8(tvb, offset) ? "IsVirtual" : "IsNotVirtual" );
                        } else {
                                proto_tree_add_text ( tree, tvb, offset, 1, 
                                        "Reserved value 0x%02x, must == 0",
@@ -981,7 +926,7 @@ dissect_lsp_eis_neighbors_clv_inner(tvbuff_t *tvb, packet_info *pinfo,
 
        while ( length > 0 ) {
                if (length<tlen) {
-                       isis_dissect_unknown(tvb, pinfo, tree, offset,
+                       isis_dissect_unknown(tvb, tree, offset,
                                "short E/IS reachability (%d vs %d)", length,
                                tlen );
                        return;
@@ -1049,7 +994,6 @@ dissect_lsp_eis_neighbors_clv_inner(tvbuff_t *tvb, packet_info *pinfo,
  *
  * Input:
  *     tvbuff_t * : tvbuffer for packet data
- *     packet_info * : info for current packet
  *     proto_tree * : protocol display tree to fill out.  May be NULL
  *     int : offset into packet data where we are.
  *     int : length of IDs in packet.
@@ -1059,11 +1003,10 @@ dissect_lsp_eis_neighbors_clv_inner(tvbuff_t *tvb, packet_info *pinfo,
  *      void, but we will add to proto tree if !NULL.
  */
 static void 
-dissect_lsp_l1_is_neighbors_clv(tvbuff_t *tvb, 
-       packet_info *pinfo, proto_tree *tree, int offset, 
+dissect_lsp_l1_is_neighbors_clv(tvbuff_t *tvb, proto_tree *tree, int offset, 
        int id_length, int length)
 {
-       dissect_lsp_eis_neighbors_clv_inner(tvb, pinfo, tree, offset,
+       dissect_lsp_eis_neighbors_clv_inner(tvb, tree, offset,
                length, id_length, TRUE, FALSE);
 }
 
@@ -1076,7 +1019,6 @@ dissect_lsp_l1_is_neighbors_clv(tvbuff_t *tvb,
  *
  * Input:
  *     tvbuff_t * : tvbuffer for packet data
- *     packet_info * : info for current packet
  *     proto_tree * : protocol display tree to fill out.  May be NULL
  *     int : offset into packet data where we are.
  *     int : length of IDs in packet.
@@ -1086,11 +1028,10 @@ dissect_lsp_l1_is_neighbors_clv(tvbuff_t *tvb,
  *      void, but we will add to proto tree if !NULL.
  */
 static void 
-dissect_lsp_l1_es_neighbors_clv(tvbuff_t *tvb, 
-       packet_info *pinfo, proto_tree *tree, int offset, 
+dissect_lsp_l1_es_neighbors_clv(tvbuff_t *tvb, proto_tree *tree, int offset, 
        int id_length, int length)
 {
-       dissect_lsp_eis_neighbors_clv_inner(tvb, pinfo, tree, offset,
+       dissect_lsp_eis_neighbors_clv_inner(tvb, tree, offset,
                length, id_length, TRUE, TRUE);
 }
 
@@ -1104,7 +1045,6 @@ dissect_lsp_l1_es_neighbors_clv(tvbuff_t *tvb,
  *
  * Input:
  *     tvbuff_t * : tvbuffer for packet data
- *     packet_info * : info for current packet
  *     proto_tree * : protocol display tree to fill out.  May be NULL
  *     int : offset into packet data where we are.
  *     int : length of IDs in packet.
@@ -1114,11 +1054,10 @@ dissect_lsp_l1_es_neighbors_clv(tvbuff_t *tvb,
  *      void, but we will add to proto tree if !NULL.
  */
 static void 
-dissect_lsp_l2_is_neighbors_clv(tvbuff_t *tvb, 
-       packet_info *pinfo, proto_tree *tree, int offset, 
+dissect_lsp_l2_is_neighbors_clv(tvbuff_t *tvb, proto_tree *tree, int offset, 
        int id_length, int length)
 {
-       dissect_lsp_eis_neighbors_clv_inner(tvb, pinfo, tree, offset,
+       dissect_lsp_eis_neighbors_clv_inner(tvb, tree, offset,
                length, id_length, FALSE, FALSE);
 }
 
@@ -1133,7 +1072,6 @@ dissect_lsp_l2_is_neighbors_clv(tvbuff_t *tvb,
  *
  * Input:
  *   tvbuff_t * : tvbuffer for packet data
- *   packet_info * : info for current packet
  *   proto_tree * : protocol display tree to fill out.
  *   int : offset into packet data where we are (beginning of the sub_clv value).
  *
@@ -1141,7 +1079,7 @@ dissect_lsp_l2_is_neighbors_clv(tvbuff_t *tvb,
  *   void
  */
 static void
-dissect_subclv_admin_group (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) {
+dissect_subclv_admin_group (tvbuff_t *tvb, proto_tree *tree, int offset) {
        proto_item *ti;
        proto_tree *ntree;
        guint32    clv_value;
@@ -1170,21 +1108,19 @@ dissect_subclv_admin_group (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
  *   for dissect the maximum link bandwidth sub-CLV (code 9).
  *
  * Input:
- *   u_char * : packet data
- *   int : offset into packet data where we are (beginning of the sub_clv value).
+ *   tvbuff_t * : tvbuffer for packet data
  *   proto_tree * : protocol display tree to fill out.
+ *   int : offset into packet data where we are (beginning of the sub_clv value).
  *
  * Output:
  *   void
  */
 static void
-dissect_subclv_max_bw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
+dissect_subclv_max_bw(tvbuff_t *tvb, proto_tree *tree, int offset)
 {
-       guint32 ui;
        gfloat  bw;
 
-       ui = tvb_get_ntohl(tvb, offset);
-       memcpy (&bw, &ui, 4);
+       bw = tvb_get_ntohieee_float(tvb, offset);
        proto_tree_add_text (tree, tvb, offset-2, 6,
                "Maximum link bandwidth : %.2f Mbps", bw*8/1000000 );
 }
@@ -1198,21 +1134,19 @@ dissect_subclv_max_bw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int o
  *   for dissect the reservable link bandwidth sub-CLV (code 10).
  *
  * Input:
- *   u_char * : packet data
- *   int : offset into packet data where we are (beginning of the sub_clv value).
+ *   tvbuff_t * : tvbuffer for packet data
  *   proto_tree * : protocol display tree to fill out.
+ *   int : offset into packet data where we are (beginning of the sub_clv value).
  *
  * Output:
  *   void
  */
 static void
-dissect_subclv_rsv_bw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
+dissect_subclv_rsv_bw(tvbuff_t *tvb, proto_tree *tree, int offset)
 {
-       guint32 ui;
        gfloat  bw;
 
-       ui = tvb_get_ntohl(tvb, offset);
-       memcpy (&bw, &ui, 4);
+       bw = tvb_get_ntohieee_float(tvb, offset);
        proto_tree_add_text (tree, tvb, offset-2, 6,
                "Reservable link bandwidth: %.2f Mbps", bw*8/1000000 );
 }
@@ -1226,19 +1160,18 @@ dissect_subclv_rsv_bw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int o
  *   for dissect the unreserved bandwidth sub-CLV (code 11).
  *
  * Input:
- *   u_char * : packet data
- *   int : offset into packet data where we are (beginning of the sub_clv value).
+ *   tvbuff_t * : tvbuffer for packet data
  *   proto_tree * : protocol display tree to fill out.
+ *   int : offset into packet data where we are (beginning of the sub_clv value).
  *
  * Output:
  *   void
  */
 static void
-dissect_subclv_unrsv_bw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
+dissect_subclv_unrsv_bw(tvbuff_t *tvb, proto_tree *tree, int offset)
 {
        proto_item *ti;
        proto_tree *ntree;
-       guint32    ui;
        gfloat     bw;
        int        i;
 
@@ -1246,8 +1179,7 @@ dissect_subclv_unrsv_bw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int
        ntree = proto_item_add_subtree (ti, ett_isis_lsp_subclv_unrsv_bw);
 
        for (i = 0 ; i < 8 ; i++) {
-               ui = tvb_get_ntohl(tvb, offset);;
-               memcpy (&bw, &ui, 4);
+               bw = tvb_get_ntohieee_float(tvb, offset+4*i);
                proto_tree_add_text (ntree, tvb, offset+4*i, 4,
                        "priority level %d: %.2f Mbps", i, bw*8/1000000 );
        }
@@ -1264,7 +1196,6 @@ dissect_subclv_unrsv_bw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int
  *
  * Input:
  *   tvbuff_t * : tvbuffer for packet data
- *   packet_info * : info for current packet
  *   proto_tree * : protocol display tree to fill out.  May be NULL
  *   int : offset into packet data where we are.
  *   int : length of IDs in packet.
@@ -1274,9 +1205,8 @@ dissect_subclv_unrsv_bw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int
  *   void, but we will add to proto tree if !NULL.
  */
 static void 
-dissect_lsp_ext_is_reachability_clv(tvbuff_t *tvb, 
-       packet_info *pinfo, proto_tree *tree, int offset, 
-       int id_length, int length)
+dissect_lsp_ext_is_reachability_clv(tvbuff_t *tvb, proto_tree *tree,
+       int offset, int id_length _U_, int length)
 {
        proto_item *ti;
        proto_tree *ntree = NULL;
@@ -1287,7 +1217,7 @@ dissect_lsp_ext_is_reachability_clv(tvbuff_t *tvb,
        if (!tree) return;
 
        while (length > 0) {
-               ti = proto_tree_add_text (tree, tvb, offset, 0,
+               ti = proto_tree_add_text (tree, tvb, offset, -1,
                        "IS neighbor: %s",
                        print_system_id (tvb_get_ptr(tvb, offset, 7), 7) );
                ntree = proto_item_add_subtree (ti, 
@@ -1307,7 +1237,7 @@ dissect_lsp_ext_is_reachability_clv(tvbuff_t *tvb,
                                clv_len  = tvb_get_guint8(tvb, offset+12+i);
                                switch (clv_code) {
                                case 3 :
-                                       dissect_subclv_admin_group(tvb, pinfo, ntree, offset+13+i);
+                                       dissect_subclv_admin_group(tvb, ntree, offset+13+i);
                                        break;
                                case 6 :
                                        proto_tree_add_text (ntree, tvb, offset+11+i, 6,
@@ -1318,13 +1248,13 @@ dissect_lsp_ext_is_reachability_clv(tvbuff_t *tvb,
                                                "IPv4 neighbor address: %s", ip_to_str (tvb_get_ptr(tvb, offset+13+i, 4)) );
                                        break;
                                case 9 :
-                                       dissect_subclv_max_bw (tvb, pinfo, ntree, offset+13+i);
+                                       dissect_subclv_max_bw (tvb, ntree, offset+13+i);
                                        break;
                                case 10:
-                                       dissect_subclv_rsv_bw (tvb, pinfo, ntree, offset+13+i);
+                                       dissect_subclv_rsv_bw (tvb, ntree, offset+13+i);
                                        break;
                                case 11:
-                                       dissect_subclv_unrsv_bw (tvb, pinfo, ntree, offset+13+i);
+                                       dissect_subclv_unrsv_bw (tvb, ntree, offset+13+i);
                                        break;
                                case 18:
                                        proto_tree_add_text (ntree, tvb, offset+11+i, 5,
@@ -1361,9 +1291,9 @@ dissect_lsp_ext_is_reachability_clv(tvbuff_t *tvb,
 
 
 
-static void dissect_lsp_mt_is_reachability_clv(tvbuff_t *tvb, 
-       packet_info *pinfo, proto_tree *tree, int offset, 
-       int id_length, int length)
+static void
+dissect_lsp_mt_is_reachability_clv(tvbuff_t *tvb, proto_tree *tree, int offset, 
+       int id_length _U_, int length)
 {
        proto_item *ti;
        proto_tree *ntree = NULL;
@@ -1406,7 +1336,7 @@ static void dissect_lsp_mt_is_reachability_clv(tvbuff_t *tvb,
                                       mt_desc,
                                       mt_block&0xfff ); 
 
-               ti = proto_tree_add_text (tree, tvb, offset+2, 0,
+               ti = proto_tree_add_text (tree, tvb, offset+2, -1,
                        "IS neighbor: %s",
                        print_system_id(tvb_get_ptr(tvb, offset+2, 7), 7) );
              
@@ -1441,7 +1371,6 @@ static void dissect_lsp_mt_is_reachability_clv(tvbuff_t *tvb,
  *
  * Input:
  *     tvbuff_t * : tvbuffer for packet data
- *     packet_info * : info for current packet
  *     proto_tree * : protocol display tree to fill out.  May be NULL
  *     int : offset into packet data where we are.
  *     int : length of IDs in packet.
@@ -1451,13 +1380,12 @@ static void dissect_lsp_mt_is_reachability_clv(tvbuff_t *tvb,
  *      void, but we will add to proto tree if !NULL.
  */
 static void 
-dissect_lsp_partition_dis_clv(tvbuff_t *tvb, 
-       packet_info *pinfo, proto_tree *tree, int offset, 
+dissect_lsp_partition_dis_clv(tvbuff_t *tvb, proto_tree *tree, int offset, 
        int id_length, int length)
 {
        if ( length < id_length ) {
-               isis_dissect_unknown(tvb, pinfo, tree, offset,
-                               "short lsp parition DIS(%d vs %d)", length,
+               isis_dissect_unknown(tvb, tree, offset,
+                               "short lsp partition DIS(%d vs %d)", length,
                                id_length );
                return;
        }
@@ -1472,8 +1400,8 @@ dissect_lsp_partition_dis_clv(tvbuff_t *tvb,
        length -= id_length;
        offset += id_length;
        if ( length > 0 ){
-               isis_dissect_unknown(tvb, pinfo, tree, offset,
-                               "Long lsp parition DIS, %d left over", length );
+               isis_dissect_unknown(tvb, tree, offset,
+                               "Long lsp partition DIS, %d left over", length );
                return;
        }
 }
@@ -1488,7 +1416,6 @@ dissect_lsp_partition_dis_clv(tvbuff_t *tvb,
  *
  * Input:
  *     tvbuff_t * : tvbuffer for packet data
- *     packet_info * : info for current packet
  *     proto_tree * : protocol display tree to fill out.  May be NULL
  *     int : offset into packet data where we are.
  *     int : length of IDs in packet.
@@ -1498,26 +1425,25 @@ dissect_lsp_partition_dis_clv(tvbuff_t *tvb,
  *      void, but we will add to proto tree if !NULL.
  */
 static void 
-dissect_lsp_prefix_neighbors_clv(tvbuff_t *tvb, 
-       packet_info *pinfo, proto_tree *tree, int offset, 
-       int id_length, int length)
+dissect_lsp_prefix_neighbors_clv(tvbuff_t *tvb, proto_tree *tree, int offset, 
+       int id_length _U_, int length)
 {
        char *sbuf;
        int mylen;
 
        if ( length < 4 ) {
-               isis_dissect_unknown(tvb, pinfo, tree, offset,
+               isis_dissect_unknown(tvb, tree, offset,
                        "Short lsp prefix neighbors (%d vs 4)", length );
                return;
        }
        if ( tree ) {
-               dissect_metric (tvb, pinfo, tree, offset,
+               dissect_metric (tvb, tree, offset,
                        tvb_get_guint8(tvb, offset), "Default", TRUE );
-               dissect_metric (tvb, pinfo, tree, offset+1,
+               dissect_metric (tvb, tree, offset+1,
                        tvb_get_guint8(tvb, offset+1), "Delay", FALSE );
-               dissect_metric (tvb, pinfo, tree, offset+2,
+               dissect_metric (tvb, tree, offset+2,
                        tvb_get_guint8(tvb, offset+2), "Expense", FALSE );
-               dissect_metric (tvb, pinfo, tree, offset+3,
+               dissect_metric (tvb, tree, offset+3,
                        tvb_get_guint8(tvb, offset+3), "Error", FALSE );
        }
        offset += 4;
@@ -1526,12 +1452,12 @@ dissect_lsp_prefix_neighbors_clv(tvbuff_t *tvb,
                mylen = tvb_get_guint8(tvb, offset);
                length--;
                if (length<=0) {
-                       isis_dissect_unknown(tvb, pinfo, tree, offset,
+                       isis_dissect_unknown(tvb, tree, offset,
                                "Zero payload space after length in prefix neighbor" );
                        return;
                }
                if ( mylen > length) {
-                       isis_dissect_unknown(tvb, pinfo, tree, offset,
+                       isis_dissect_unknown(tvb, tree, offset,
                                "Interal length of prefix neighbor too long (%d vs %d)", 
                                mylen, length );
                        return;
@@ -1560,7 +1486,6 @@ dissect_lsp_prefix_neighbors_clv(tvbuff_t *tvb,
  *
  * Input:
  *     tvbuff_t * : tvbuffer for packet data
- *     packet_info * : info for current packet
  *     proto_tree * : tree to display into. REQUIRED
  *     int : offset into packet data where we are.
  *     char * : title string
@@ -1570,8 +1495,8 @@ dissect_lsp_prefix_neighbors_clv(tvbuff_t *tvb,
  *      void, but we will add to proto tree
  */
 void
-isis_lsp_decode_lsp_id(tvbuff_t *tvb, packet_info *pinfo, 
-       proto_tree *tree, int offset, char *tstr, int id_length)
+isis_lsp_decode_lsp_id(tvbuff_t *tvb, proto_tree *tree, int offset,
+       char *tstr, int id_length)
 {
        proto_tree_add_text(tree, tvb, offset, id_length + 2,
                "%s: %s.%02x-%02x", tstr,
@@ -1589,7 +1514,6 @@ isis_lsp_decode_lsp_id(tvbuff_t *tvb, packet_info *pinfo,
  *
  * Input:
  *     tvbuff_t * : tvbuffer for packet data
- *     packet_info * : info for current packet
  *     proto_tree * : protocol display tree to add to.  May be NULL.
  *     int offset : our offset into packet data.
  *     int : LSP type, a la packet-isis.h ISIS_TYPE_* values
@@ -1600,8 +1524,8 @@ isis_lsp_decode_lsp_id(tvbuff_t *tvb, packet_info *pinfo,
  *      void, but we will add to proto tree if !NULL.
  */
 void 
-isis_dissect_isis_lsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
-       int offset, int lsp_type, int header_length, int id_length)
+isis_dissect_isis_lsp(tvbuff_t *tvb, proto_tree *tree, int offset,
+       int lsp_type, int header_length, int id_length)
 {
        proto_item      *ti;
        proto_tree      *lsp_tree = NULL;
@@ -1610,8 +1534,8 @@ isis_dissect_isis_lsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
        int             inx, q, some, value, len;
 
        if (tree) {
-               ti = proto_tree_add_text(tree, tvb, offset,
-                   tvb_length_remaining(tvb, offset), PROTO_STRING_LSP);
+               ti = proto_tree_add_text(tree, tvb, offset, -1,
+                   PROTO_STRING_LSP);
                lsp_tree = proto_item_add_subtree(ti, ett_isis_lsp);
        }
 
@@ -1629,7 +1553,7 @@ isis_dissect_isis_lsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
        offset += 2;
 
        if (tree) {
-               isis_lsp_decode_lsp_id(tvb, pinfo, lsp_tree, offset, 
+               isis_lsp_decode_lsp_id(tvb, lsp_tree, offset, 
                        "LSP ID", id_length);
        }
        offset += id_length + 2;
@@ -1682,7 +1606,7 @@ isis_dissect_isis_lsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
 
        len = pdu_length - header_length;
        if (len < 0) {
-               isis_dissect_unknown(tvb, pinfo, tree, offset,
+               isis_dissect_unknown(tvb, tree, offset,
                        "packet header length %d went beyond packet",
                         header_length );
                return;
@@ -1692,11 +1616,11 @@ isis_dissect_isis_lsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
         * our list of valid ones!
         */
        if (lsp_type == ISIS_TYPE_L1_LSP){
-               isis_dissect_clvs(tvb, pinfo, lsp_tree, offset,
+               isis_dissect_clvs(tvb, lsp_tree, offset,
                        clv_l1_lsp_opts, len, id_length, 
                        ett_isis_lsp_clv_unknown );
        } else {
-               isis_dissect_clvs(tvb, pinfo, lsp_tree, offset,
+               isis_dissect_clvs(tvb, lsp_tree, offset,
                        clv_l2_lsp_opts, len, id_length, 
                        ett_isis_lsp_clv_unknown );
        }
@@ -1743,6 +1667,10 @@ isis_register_lsp(int proto_isis) {
                { &hf_isis_lsp_clv_te_router_id,
                { "Traffic Engineering Router ID", "isis.lsp.clv_te_router_id", FT_IPv4,
                   BASE_NONE, NULL, 0x0, "", HFILL }},
+
+               { &hf_isis_lsp_clv_mt,
+               { "MT-ID                     ", "isis.lsp.clv_mt",
+                       FT_UINT16, BASE_HEX, NULL, 0x0, "", HFILL }},
        };
        static gint *ett[] = {
                &ett_isis_lsp,