Removed trailing whitespaces from .h and .c files using the
[obnox/wireshark/wip.git] / packet-giop.c
index 0ad3f0fc6089530508c7c92f346483e2c2ee3773..6709c9afdd6084493a478553a2759ef8781dc347 100644 (file)
@@ -9,7 +9,7 @@
  * Frank Singleton <frank.singleton@ericsson.com>
  * Trevor Shepherd <eustrsd@am1.ericsson.se>
  *
- * $Id: packet-giop.c,v 1.57 2002/02/27 00:30:22 guy Exp $
+ * $Id: packet-giop.c,v 1.62 2002/08/02 23:35:49 jmayer Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
 # include "config.h"
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #include <string.h>
 #include <stdio.h>
 #include <errno.h>
@@ -328,7 +324,7 @@ static void decode_IIOP_IOR_profile(tvbuff_t *tvb, packet_info *pinfo, proto_tre
                                     guint32 boundary, gboolean new_endianess, gchar *repobuf,
                                     gboolean store_flag);
 
-static void decode_ServiceContextList(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int *offset,
+static void decode_ServiceContextList(tvbuff_t *tvb, proto_tree *tree, int *offset,
                                       gboolean stream_is_be, guint32 boundary);
 
 static void decode_TaggedProfile(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int *offset,
@@ -342,8 +338,7 @@ static void decode_SystemExceptionReplyBody (tvbuff_t *tvb, proto_tree *tree, gi
                                              guint32 boundary);
 
 static void dissect_tk_objref_params(tvbuff_t *tvb, proto_tree *tree, gint *offset, 
-                                     gboolean stream_is_big_endian, guint32 boundary,
-                                     MessageHeader * header);
+                                     gboolean stream_is_big_endian, guint32 boundary);
 
 static void dissect_tk_struct_params(tvbuff_t *tvb, proto_tree *tree, gint *offset, 
                                      gboolean stream_is_big_endian, guint32 boundary,
@@ -354,8 +349,7 @@ static void dissect_tk_union_params(tvbuff_t *tvb, proto_tree *tree, gint *offse
                                     MessageHeader * header );
  
 static void dissect_tk_enum_params(tvbuff_t *tvb, proto_tree *tree, gint *offset, 
-                                   gboolean stream_is_big_endian, guint32 boundary,
-                                   MessageHeader * header);
+                                   gboolean stream_is_big_endian, guint32 boundary);
 
 static void dissect_tk_sequence_params(tvbuff_t *tvb, proto_tree *tree, gint *offset, 
                                       gboolean stream_is_big_endian, guint32 boundary,
@@ -382,12 +376,10 @@ static void dissect_tk_value_box_params(tvbuff_t *tvb, proto_tree *tree, gint *o
                                        MessageHeader * header);
 
 static void dissect_tk_native_params(tvbuff_t *tvb, proto_tree *tree, gint *offset, 
-                                    gboolean stream_is_big_endian, guint32 boundary,
-                                    MessageHeader * header);
+                                    gboolean stream_is_big_endian, guint32 boundary);
 
 static void dissect_tk_abstract_interface_params(tvbuff_t *tvb, proto_tree *tree, gint *offset, 
-                                                gboolean stream_is_big_endian, guint32 boundary,
-                                                MessageHeader * header);
+                                                gboolean stream_is_big_endian, guint32 boundary);
 
 
 static void dissect_typecode_string_param(tvbuff_t *tvb, proto_tree *tree, gint *offset, 
@@ -1992,63 +1984,18 @@ guint8 get_CDR_char(tvbuff_t *tvb, int *offset) {
 
 gdouble get_CDR_double(tvbuff_t *tvb, int *offset, gboolean stream_is_big_endian, int boundary) {
 
-  guint8 sign;
-  guint8 e1,e2,f1,f2,f3,f4,f5,f6,f7;
   gdouble val;
-  guint16 exp;
-  guint32 fract0, fract1;
-  gdouble d_fract;             
-  
 
   /* double values must be aligned on a 8 byte boundary */
 
   while( ( (*offset + boundary) % 8) != 0)
          ++(*offset);
 
+  val = (stream_is_big_endian) ? tvb_get_ntohieee_double (tvb, *offset) :
+                                 tvb_get_letohieee_double (tvb, *offset);
 
-  if(stream_is_big_endian) {    
-    e1  = get_CDR_octet(tvb,offset);
-    sign = e1 >> 7;                    /* sign value */
-    e1 &= 0x7f;                /* bottom 7 bits */
-    f1  = get_CDR_octet(tvb,offset);
-    e2 = f1 >> 4;
-    f1 &= 0x0f;                /* bottom 4 bits */
-    f2  = get_CDR_octet(tvb,offset);
-    f3  = get_CDR_octet(tvb,offset);
-    f4  = get_CDR_octet(tvb,offset);
-    f5  = get_CDR_octet(tvb,offset);
-    f6  = get_CDR_octet(tvb,offset);
-    f7  = get_CDR_octet(tvb,offset);
-
-  } else {
-
-    f7  = get_CDR_octet(tvb,offset);
-    f6  = get_CDR_octet(tvb,offset);
-    f5  = get_CDR_octet(tvb,offset);
-    f4  = get_CDR_octet(tvb,offset);
-    f3  = get_CDR_octet(tvb,offset);
-    f2  = get_CDR_octet(tvb,offset);
-    f1  = get_CDR_octet(tvb,offset);
-    e2 = f1 >> 4;
-    f1 &= 0x0f;                /* bottom 4 bits */
-    e1  = get_CDR_octet(tvb,offset);
-    sign = e1 >> 7;                    /* sign value */
-    e1 &= 0x7f;                /* bottom 7 bits */
-
-  }
-
-  exp = (e1 << 4) + e2;
-
-  /* Now lets do some 52 bit math with 32 bit constraint */
-
-  fract0 = f7 + (f6 << 8) + (f5 << 16) + (f4 << 24); /* lower 32 bits of fractional part */
-  fract1 = f3 + (f2 << 8) + (f1 << 16);              /* top 20 bits of fractional part   */
-
-  d_fract = (fract1 / (pow(2,20))) + (fract0 / (pow(2,52))); /* 52 bits represent a fraction */
-
-  val = pow(-1,sign) * pow(2,(exp - 1023)) * (1 + d_fract);
-
-  return val;          /* FIX rounding ?? */
+  *offset += 8;
+  return val;
 
 }
 
@@ -2285,50 +2232,18 @@ void get_CDR_fixed(tvbuff_t *tvb, gchar **seq, gint *offset, guint32 digits, gin
 
 gfloat get_CDR_float(tvbuff_t *tvb, int *offset, gboolean stream_is_big_endian, int boundary) {
   
-  guint8 sign;
-  guint8 e1,e2,f1,f2,f3;
   gfloat val;
-  guint8 exp;
-  guint32 fract;
-  gdouble d_fract;             
   
   /* float values must be aligned on a 4 byte boundary */
 
   while( ( (*offset + boundary) % 4) != 0)
     ++(*offset);
 
-  if(stream_is_big_endian) {    
-    e1  = get_CDR_octet(tvb,offset);
-    sign = e1 >> 7;                    /* sign value */
-    e1 &= 0x7f;                /* bottom 7 bits */
-    f1  = get_CDR_octet(tvb,offset);
-    e2 = f1 >> 7;
-    f1 &= 0x7f;                /* bottom 7 bits */
-    f2  = get_CDR_octet(tvb,offset);
-    f3  = get_CDR_octet(tvb,offset);
-
-  } else {
-
-    f3  = get_CDR_octet(tvb,offset);
-    f2  = get_CDR_octet(tvb,offset);
-    f1  = get_CDR_octet(tvb,offset);
-    e2 = f1 >> 7;
-    f1 &= 0x7f;                /* bottom 7 bits */
-    e1  = get_CDR_octet(tvb,offset);
-    sign = e1 >> 7;                    /* sign value */
-    e1 &= 0x7f;                /* bottom 7 bits */
+  val = (stream_is_big_endian) ? tvb_get_ntohieee_float (tvb, *offset) :
+                                 tvb_get_letohieee_float (tvb, *offset);
 
-  }
-
-
-  exp = (e1 << 1) + e2;
-  fract = f3 + (f2 << 8) + (f1 << 16);
-
-  d_fract = fract / (pow(2,23)); /* 23 bits represent a fraction */
-
-  val = pow(-1,sign) * pow(2,(exp - 127)) * (1 + d_fract);
-
-  return val;          /* FIX rounding ?? */
+  *offset += 4;
+  return val;
 
 }
 
@@ -2406,17 +2321,17 @@ guint8 get_CDR_octet(tvbuff_t *tvb, int *offset) {
  * This function also increments offset by len. 
  */
 
-void get_CDR_octet_seq(tvbuff_t *tvb, gchar **seq, int *offset, int len) {
+void get_CDR_octet_seq(tvbuff_t *tvb, gchar **seq, int *offset, guint32 len) {
 
-  if (! tvb_bytes_exist(tvb, *offset,len)) {
-    /*
-     * Generate an exception, and stop processing.
-     * We do that now, rather than after allocating the buffer, so we
-     * don't have to worry about freeing the buffer.
-     * XXX - would we be better off using a cleanup routine?
-     */
-    tvb_get_guint8(tvb, *offset + len);
-  }
+  /*
+   * Make sure that the entire sequence of octets is in the buffer before
+   * allocating the buffer, so that we don't have to worry about freeing
+   * the buffer, and so that we don't try to allocate a buffer bigger
+   * than the data we'll actually be copying, and thus don't run the risk
+   * of crashing if the buffer is *so* big that we fail to allocate it
+   * and "g_new0()" aborts.
+   */
+  tvb_ensure_bytes_exist(tvb, *offset, len);
 
   /*
    * XXX - should we just allocate "len" bytes, and have "get_CDR_string()"
@@ -2553,7 +2468,7 @@ guint32 get_CDR_typeCode(tvbuff_t *tvb, proto_tree *tree, gint *offset,
   case tk_Principal: /* empty parameter list */
     break;
   case tk_objref: /* complex parameter list */
-    dissect_tk_objref_params(tvb, tree, offset, stream_is_big_endian, boundary, header );
+    dissect_tk_objref_params(tvb, tree, offset, stream_is_big_endian, boundary);
     break;
   case tk_struct: /* complex parameter list */
     dissect_tk_struct_params(tvb, tree, offset, stream_is_big_endian, boundary, header );
@@ -2562,7 +2477,7 @@ guint32 get_CDR_typeCode(tvbuff_t *tvb, proto_tree *tree, gint *offset,
     dissect_tk_union_params(tvb, tree, offset, stream_is_big_endian, boundary, header );
     break;
   case tk_enum: /* complex parameter list */
-    dissect_tk_enum_params(tvb, tree, offset, stream_is_big_endian, boundary, header );
+    dissect_tk_enum_params(tvb, tree, offset, stream_is_big_endian, boundary);
     break;
 
   case tk_string: /* simple parameter list */
@@ -2622,10 +2537,10 @@ guint32 get_CDR_typeCode(tvbuff_t *tvb, proto_tree *tree, gint *offset,
     dissect_tk_value_box_params(tvb, tree, offset, stream_is_big_endian, boundary, header );
     break;
   case tk_native: /* complex parameter list */
-    dissect_tk_native_params(tvb, tree, offset, stream_is_big_endian, boundary, header );
+    dissect_tk_native_params(tvb, tree, offset, stream_is_big_endian, boundary);
     break;
   case tk_abstract_interface: /* complex parameter list */
-    dissect_tk_abstract_interface_params(tvb, tree, offset, stream_is_big_endian, boundary, header );
+    dissect_tk_abstract_interface_params(tvb, tree, offset, stream_is_big_endian, boundary );
     break;
   default:
     g_warning("giop: Unknown TCKind %u \n", val);
@@ -2718,9 +2633,9 @@ guint16 get_CDR_ushort(tvbuff_t *tvb, int *offset, gboolean stream_is_big_endian
  * Wchar is not supported for GIOP 1.0.
  */
 
-gint8 get_CDR_wchar(tvbuff_t *tvb, gchar **seq, int *offset, MessageHeader * header) {
+gint get_CDR_wchar(tvbuff_t *tvb, gchar **seq, int *offset, MessageHeader * header) {
   
-  gint8 slength;
+  gint slength;
   gchar *raw_wstring;
 
   /* CORBA chapter 15:
@@ -2846,7 +2761,7 @@ guint32 get_CDR_wstring(tvbuff_t *tvb, gchar **seq, int *offset, gboolean stream
 
 static void
 dissect_target_address(tvbuff_t * tvb, packet_info *pinfo, int *offset, proto_tree * tree, 
-                      MessageHeader * header, gboolean stream_is_big_endian)
+                      gboolean stream_is_big_endian)
 {
    guint16 discriminant;
    gchar *object_key;
@@ -2906,11 +2821,11 @@ dissect_target_address(tvbuff_t * tvb, packet_info *pinfo, int *offset, proto_tr
 }
 
 static void
-dissect_reply_body (tvbuff_t *tvb, u_int offset, packet_info *pinfo,
+dissect_reply_body (tvbuff_t *tvb, guint offset, packet_info *pinfo,
                    proto_tree *tree, gboolean stream_is_big_endian,
                    guint32 reply_status, MessageHeader *header, proto_tree *clnp_tree) {
 
-  u_int sequence_length;
+  guint sequence_length;
   gboolean exres = FALSE;              /* result of trying explicit dissectors */
   gchar * repoid = NULL;       /* Repositor ID looked up from  objkey */
   
@@ -3071,7 +2986,7 @@ dissect_reply_body (tvbuff_t *tvb, u_int offset, packet_info *pinfo,
  */
 
 static void dissect_giop_reply (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
-                               proto_tree * clnp_tree, MessageHeader * header,
+                               MessageHeader * header,
                                gboolean stream_is_big_endian) {
 
   guint32 offset = 0;
@@ -3095,7 +3010,7 @@ static void dissect_giop_reply (tvbuff_t * tvb, packet_info * pinfo, proto_tree
    * Decode IOP::ServiceContextList
    */
   
-  decode_ServiceContextList(tvb, pinfo, reply_tree, &offset,stream_is_big_endian, GIOP_HEADER_SIZE);
+  decode_ServiceContextList(tvb, reply_tree, &offset,stream_is_big_endian, GIOP_HEADER_SIZE);
 
   request_id = get_CDR_ulong(tvb, &offset, stream_is_big_endian,GIOP_HEADER_SIZE);
 
@@ -3155,11 +3070,11 @@ static void dissect_giop_reply (tvbuff_t * tvb, packet_info * pinfo, proto_tree
  */
 
 static void dissect_giop_reply_1_2 (tvbuff_t * tvb, packet_info * pinfo,
-                                   proto_tree * tree, proto_tree * clnp_tree,
+                                   proto_tree * tree,
                                    MessageHeader * header,
                                    gboolean stream_is_big_endian) {
 
-  u_int offset = 0;
+  guint offset = 0;
   guint32 request_id;
   guint32 reply_status;
   proto_tree *reply_tree = NULL;
@@ -3202,7 +3117,7 @@ static void dissect_giop_reply_1_2 (tvbuff_t * tvb, packet_info * pinfo,
    * Decode IOP::ServiceContextList
    */
 
-  decode_ServiceContextList(tvb, pinfo, reply_tree, &offset,stream_is_big_endian, GIOP_HEADER_SIZE);
+  decode_ServiceContextList(tvb, reply_tree, &offset,stream_is_big_endian, GIOP_HEADER_SIZE);
 
   /*
    * GIOP 1.2 Reply body must fall on an 8 octet alignment.
@@ -3236,10 +3151,10 @@ static void dissect_giop_reply_1_2 (tvbuff_t * tvb, packet_info * pinfo,
 
 
 static void dissect_giop_cancel_request (tvbuff_t * tvb, packet_info * pinfo,
-                       proto_tree * tree, proto_tree * clnp_tree,
-                       MessageHeader * header, gboolean stream_is_big_endian) {
+                       proto_tree * tree,
+                       gboolean stream_is_big_endian) {
 
-  u_int offset = 0;
+  guint offset = 0;
   guint32 request_id;
   proto_tree *cancel_request_tree = NULL;
   proto_item *tf;
@@ -3279,7 +3194,7 @@ static void dissect_giop_cancel_request (tvbuff_t * tvb, packet_info * pinfo,
  */
 static void
 dissect_giop_request_1_1 (tvbuff_t * tvb, packet_info * pinfo,
-                       proto_tree * tree, proto_tree * clnp_tree,
+                       proto_tree * tree,
                        MessageHeader * header, gboolean stream_is_big_endian)
 {
   guint32 offset = 0;
@@ -3320,7 +3235,7 @@ dissect_giop_request_1_1 (tvbuff_t * tvb, packet_info * pinfo,
    * Decode IOP::ServiceContextList
    */
   
-  decode_ServiceContextList(tvb, pinfo, request_tree, &offset,stream_is_big_endian, GIOP_HEADER_SIZE);
+  decode_ServiceContextList(tvb, request_tree, &offset,stream_is_big_endian, GIOP_HEADER_SIZE);
 
 
   request_id = get_CDR_ulong(tvb, &offset, stream_is_big_endian,GIOP_HEADER_SIZE);
@@ -3509,7 +3424,7 @@ dissect_giop_request_1_1 (tvbuff_t * tvb, packet_info * pinfo,
  */
 static void
 dissect_giop_request_1_2 (tvbuff_t * tvb, packet_info * pinfo,
-                       proto_tree * tree, proto_tree * clnp_tree,
+                       proto_tree * tree,
                        MessageHeader * header, gboolean stream_is_big_endian)
 {
   guint32 offset = 0;
@@ -3561,7 +3476,7 @@ dissect_giop_request_1_2 (tvbuff_t * tvb, packet_info * pinfo,
    }
   g_free(reserved);
 
-  dissect_target_address(tvb, pinfo, &offset, request_tree, header, stream_is_big_endian);
+  dissect_target_address(tvb, pinfo, &offset, request_tree, stream_is_big_endian);
 
   /* length of operation string */ 
   len = get_CDR_string(tvb, &operation, &offset, stream_is_big_endian,GIOP_HEADER_SIZE);
@@ -3596,7 +3511,7 @@ dissect_giop_request_1_2 (tvbuff_t * tvb, packet_info * pinfo,
    * Decode IOP::ServiceContextList
    */
 
-  decode_ServiceContextList(tvb, pinfo, request_tree, &offset,  stream_is_big_endian, GIOP_HEADER_SIZE);
+  decode_ServiceContextList(tvb, request_tree, &offset,  stream_is_big_endian, GIOP_HEADER_SIZE);
 
   /*
    * GIOP 1.2 Request body must fall on an 8 octet alignment, taking into
@@ -3703,7 +3618,7 @@ dissect_giop_locate_request( tvbuff_t * tvb, packet_info * pinfo,
   }
   else     /* GIOP 1.2 and higher */
   {
-      dissect_target_address(tvb, pinfo, &offset, locate_request_tree, header,
+      dissect_target_address(tvb, pinfo, &offset, locate_request_tree, 
                             stream_is_big_endian);
 
   }
@@ -3788,7 +3703,7 @@ dissect_giop_locate_reply( tvbuff_t * tvb, packet_info * pinfo,
 
 static void
 dissect_giop_fragment( tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
-                       MessageHeader * header, gboolean stream_is_big_endian)
+                       gboolean stream_is_big_endian)
 {
   guint32 offset = 0;
   guint32 request_id;
@@ -3823,15 +3738,15 @@ dissect_giop_fragment( tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
 /* Main entry point */
 
 gboolean dissect_giop (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) {
-  u_int offset = 0;
+  guint offset = 0;
   MessageHeader header;
   tvbuff_t *giop_header_tvb;
   tvbuff_t *payload_tvb;
 
   proto_tree *clnp_tree = NULL;
   proto_item *ti;
-  u_int message_size;
-  u_int minor_version;
+  guint message_size;
+  guint minor_version;
   gboolean stream_is_big_endian;
 
 
@@ -3981,12 +3896,12 @@ gboolean dissect_giop (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) {
     case Request:
       if(header.GIOP_version.minor < 2)
       {
-          dissect_giop_request_1_1 (payload_tvb, pinfo, tree, clnp_tree,
+          dissect_giop_request_1_1 (payload_tvb, pinfo, tree,
                                     &header, stream_is_big_endian);
       }
       else
       {    
-           dissect_giop_request_1_2 (payload_tvb, pinfo, tree, clnp_tree,
+           dissect_giop_request_1_2 (payload_tvb, pinfo, tree,
                                     &header, stream_is_big_endian);
       }
       
@@ -3996,18 +3911,18 @@ gboolean dissect_giop (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) {
     case Reply:
       if(header.GIOP_version.minor < 2)
        {
-           dissect_giop_reply (payload_tvb, pinfo, tree, clnp_tree, &header,
+           dissect_giop_reply (payload_tvb, pinfo, tree, &header,
                               stream_is_big_endian);
        }
       else
         {
-          dissect_giop_reply_1_2 (payload_tvb, pinfo, tree, clnp_tree,
+          dissect_giop_reply_1_2 (payload_tvb, pinfo, tree,
                                   &header, stream_is_big_endian);
        }
       break;
     case CancelRequest:
-        dissect_giop_cancel_request(payload_tvb, pinfo, tree, clnp_tree,
-                                   &header, stream_is_big_endian);
+        dissect_giop_cancel_request(payload_tvb, pinfo, tree,
+                                   stream_is_big_endian);
        break;
     case LocateRequest:
        dissect_giop_locate_request(payload_tvb, pinfo, tree, &header,
@@ -4018,7 +3933,7 @@ gboolean dissect_giop (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) {
                                  stream_is_big_endian);
        break;
     case Fragment:
-        dissect_giop_fragment(payload_tvb, pinfo, tree, &header,
+        dissect_giop_fragment(payload_tvb, pinfo, tree,
                              stream_is_big_endian);
         break; 
     default:
@@ -4683,6 +4598,7 @@ static void decode_IIOP_IOR_profile(tvbuff_t *tvb, packet_info *pinfo, proto_tre
 
 
 
+#if 0
 void dissect_SID_BI_DIR_IIOP(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int *offset,
                               MessageHeader *header, gchar *operation, guint32 boundary) {
 
@@ -4690,7 +4606,7 @@ void dissect_SID_BI_DIR_IIOP(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
 
 };
 
-
+#endif
 
 
 /*
@@ -4722,7 +4638,7 @@ void dissect_SID_BI_DIR_IIOP(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
 
 
 
-void decode_ServiceContextList(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ptree, int *offset,
+void decode_ServiceContextList(tvbuff_t *tvb, proto_tree *ptree, int *offset,
                               gboolean stream_is_be, guint32 boundary) {
 
   guint32 seqlen;              /* sequence length  */
@@ -4872,8 +4788,7 @@ static void decode_SystemExceptionReplyBody (tvbuff_t *tvb, proto_tree *tree, gi
  */
 
 static void dissect_tk_objref_params(tvbuff_t *tvb, proto_tree *tree, gint *offset, 
-                                    gboolean stream_is_big_endian, guint32 boundary,
-                                    MessageHeader * header) {
+                                    gboolean stream_is_big_endian, guint32 boundary) {
 
   guint32  new_boundary;             /* new boundary for encapsulation */
   gboolean new_stream_is_big_endian; /* new endianness for encapsulation */
@@ -5000,8 +4915,7 @@ static void dissect_tk_union_params(tvbuff_t *tvb, proto_tree *tree, gint *offse
 
 
 static void dissect_tk_enum_params(tvbuff_t *tvb, proto_tree *tree, gint *offset, 
-                                  gboolean stream_is_big_endian, guint32 boundary,
-                                  MessageHeader * header) {
+                                  gboolean stream_is_big_endian, guint32 boundary) {
 
   guint32  new_boundary;             /* new boundary for encapsulation */
   gboolean new_stream_is_big_endian; /* new endianness for encapsulation */
@@ -5259,8 +5173,7 @@ static void dissect_tk_value_box_params(tvbuff_t *tvb, proto_tree *tree, gint *o
 
 
 static void dissect_tk_native_params(tvbuff_t *tvb, proto_tree *tree, gint *offset, 
-                                    gboolean stream_is_big_endian, guint32 boundary,
-                                    MessageHeader * header) {
+                                    gboolean stream_is_big_endian, guint32 boundary) {
 
   guint32  new_boundary;             /* new boundary for encapsulation */
   gboolean new_stream_is_big_endian; /* new endianness for encapsulation */
@@ -5284,8 +5197,7 @@ static void dissect_tk_native_params(tvbuff_t *tvb, proto_tree *tree, gint *offs
 
 
 static void dissect_tk_abstract_interface_params(tvbuff_t *tvb, proto_tree *tree, gint *offset, 
-                                                gboolean stream_is_big_endian, guint32 boundary,
-                                                MessageHeader * header) {
+                                                gboolean stream_is_big_endian, guint32 boundary) {
 
   guint32  new_boundary;              /* new boundary for encapsulation */
   gboolean new_stream_is_big_endian;  /* new endianness for encapsulation */