Indentation & whitespace cleanup (including: "4 space tabs" ==> spaces)
authorwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 10 May 2010 15:54:57 +0000 (15:54 +0000)
committerwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 10 May 2010 15:54:57 +0000 (15:54 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32735 f5534014-38df-0310-8fa8-9805f1628bb7

68 files changed:
epan/dissectors/packet-acap.c
epan/dissectors/packet-acn.c
epan/dissectors/packet-actrace.c
epan/dissectors/packet-afs.c
epan/dissectors/packet-agentx.c
epan/dissectors/packet-aim-admin.c
epan/dissectors/packet-aim-adverts.c
epan/dissectors/packet-aim-chat.c
epan/dissectors/packet-aim-chatnav.c
epan/dissectors/packet-aim-icq.c
epan/dissectors/packet-aim-invitation.c
epan/dissectors/packet-aim-popup.c
epan/dissectors/packet-aim-signon.c
epan/dissectors/packet-aim-sst.c
epan/dissectors/packet-aim-userlookup.c
epan/dissectors/packet-aim.c
epan/dissectors/packet-airopeek.c
epan/dissectors/packet-ajp13.c
epan/dissectors/packet-ansi_637.c
epan/dissectors/packet-arcnet.c
epan/dissectors/packet-artnet.c
epan/dissectors/packet-aruba-erm.c
epan/dissectors/packet-atalk.c
epan/dissectors/packet-atm.c
epan/dissectors/packet-ayiya.c
epan/dissectors/packet-bacapp.c
epan/dissectors/packet-bfd.c
epan/dissectors/packet-bootp.c
epan/dissectors/packet-bpdu.c
epan/dissectors/packet-brdwlk.c
epan/dissectors/packet-bssap.c
epan/dissectors/packet-dcerpc-bossvr.c
epan/dissectors/packet-dcerpc-cds_clerkserver.c
epan/dissectors/packet-dcerpc-cprpc_server.c
epan/dissectors/packet-dcerpc-dtsprovider.c
epan/dissectors/packet-dcerpc-dtsstime_req.c
epan/dissectors/packet-dcerpc-epm.c
epan/dissectors/packet-dcerpc-mgmt.c
epan/dissectors/packet-dcerpc-rep_proc.c
epan/dissectors/packet-dcerpc-roverride.c
epan/dissectors/packet-dcerpc-rpriv.c
epan/dissectors/packet-dcerpc-rs_attr.c
epan/dissectors/packet-dcerpc-rs_pgo.c
epan/dissectors/packet-dcerpc-rs_repadm.c
epan/dissectors/packet-dcerpc-rs_replist.c
epan/dissectors/packet-dcerpc-rs_unix.c
epan/dissectors/packet-dcerpc-rsec_login.c
epan/dissectors/packet-dcerpc-spoolss.c
epan/dissectors/packet-dcerpc-tkn4int.c
epan/dissectors/packet-dcerpc-trksvr.c
epan/dissectors/packet-dcom-dispatch.c
epan/dissectors/packet-dcom-remact.c
epan/dissectors/packet-dcom-remunkn.c
epan/dissectors/packet-dhcpv6.c
epan/dissectors/packet-gsm_a_gm.c
epan/dissectors/packet-gsm_a_rr.c
epan/dissectors/packet-gsm_sms.c
epan/dissectors/packet-gtp.c
epan/dissectors/packet-gtpv2.c
epan/dissectors/packet-isns.c
epan/dissectors/packet-pim.c
epan/dissectors/packet-ptp.c
epan/dissectors/packet-rsvp.c
epan/dissectors/packet-sctp.c
epan/dissectors/packet-sdp.c
epan/dissectors/packet-sqloracle.c
epan/dissectors/packet-tds.c
epan/dissectors/packet-usb.c

index f4b659a3f3eef284b980ba29538a6fbf051bf113..269b7352abfc9cce66447862ed4fcfe31eb6b9ab 100644 (file)
@@ -46,9 +46,9 @@ static gint ett_acap_reqresp = -1;
 static void
 dissect_acap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 {
-    gboolean        is_request;
-    proto_tree      *acap_tree, *reqresp_tree;
-    proto_item      *ti, *hidden_item;
+       gboolean        is_request;
+       proto_tree      *acap_tree, *reqresp_tree;
+       proto_item      *ti, *hidden_item;
        gint                    offset = 0;
        const guchar    *line;
        gint                    next_offset;
@@ -159,33 +159,33 @@ dissect_acap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 void
 proto_register_acap(void)
 {
-  static hf_register_info hf[] = {
-    { &hf_acap_response,
-      { "Response",           "acap.response",
-       FT_BOOLEAN, BASE_NONE, NULL, 0x0,
-       "TRUE if ACAP response", HFILL }},
-
-    { &hf_acap_request,
-      { "Request",            "acap.request",
-       FT_BOOLEAN, BASE_NONE, NULL, 0x0,
-       "TRUE if ACAP request", HFILL }}
-  };
-  static gint *ett[] = {
-    &ett_acap,
-    &ett_acap_reqresp,
-  };
-
-  proto_acap = proto_register_protocol("Application Configuration Access Protocol",
-                                      "ACAP", "acap");
-  proto_register_field_array(proto_acap, hf, array_length(hf));
-  proto_register_subtree_array(ett, array_length(ett));
+       static hf_register_info hf[] = {
+               { &hf_acap_response,
+                 { "Response",           "acap.response",
+                   FT_BOOLEAN, BASE_NONE, NULL, 0x0,
+                   "TRUE if ACAP response", HFILL }},
+
+               { &hf_acap_request,
+                 { "Request",            "acap.request",
+                   FT_BOOLEAN, BASE_NONE, NULL, 0x0,
+                   "TRUE if ACAP request", HFILL }}
+       };
+       static gint *ett[] = {
+               &ett_acap,
+               &ett_acap_reqresp,
+       };
+
+       proto_acap = proto_register_protocol("Application Configuration Access Protocol",
+                                            "ACAP", "acap");
+       proto_register_field_array(proto_acap, hf, array_length(hf));
+       proto_register_subtree_array(ett, array_length(ett));
 }
 
 void
 proto_reg_handoff_acap(void)
 {
-  dissector_handle_t acap_handle;
+       dissector_handle_t acap_handle;
 
-  acap_handle = create_dissector_handle(dissect_acap, proto_acap);
-  dissector_add("tcp.port", TCP_PORT_ACAP, acap_handle);
+       acap_handle = create_dissector_handle(dissect_acap, proto_acap);
+       dissector_add("tcp.port", TCP_PORT_ACAP, acap_handle);
 }
index 383a44eefa4956f63f7748ac29dc8793fdc63c3f..f09173e8941fcb4f4b195da08c7eab736bbb69d7 100644 (file)
@@ -344,9 +344,9 @@ static gboolean
 dissect_acn_heur( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
 {
   /* This is a heuristic dissector, which means we get all the UDP
-        * traffic not sent to a known dissector and not claimed by
-        * a heuristic dissector called before us!
-        */
+   * traffic not sent to a known dissector and not claimed by
+   * a heuristic dissector called before us!
+   */
 
   /* abort if not enabled! */
   if (!global_acn_heur) return FALSE;
@@ -476,59 +476,59 @@ acn_add_address(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int off
   ip_address_type = tvb_get_guint8(tvb, offset);
 
   switch (ip_address_type) {
-  case ACN_ADDR_NULL:
-    proto_tree_add_item(tree, hf_acn_ip_address_type, tvb, offset, 1, FALSE);
-    offset += 1;
-    break;
-  case ACN_ADDR_IPV4:
-    /* Build tree and add type*/
-    pi = proto_tree_add_text(tree, tvb, offset, 7, "%s", label);
-    addr_tree = proto_item_add_subtree(pi, ett_acn_address);
-    proto_tree_add_item(addr_tree, hf_acn_ip_address_type, tvb, offset, 1, FALSE);
-    offset +=1;
-    /* Add port */
-    port = tvb_get_ntohs(tvb, offset);
-    proto_tree_add_item(addr_tree, hf_acn_port, tvb, offset, 2, FALSE);
-    offset += 2;
-    /* Add Address */
-    proto_tree_add_item(addr_tree, hf_acn_ipv4, tvb, offset, 4, FALSE);
-    /* Append port and address to tree item */
-    IPv4 = tvb_get_ipv4(tvb, offset);
-    SET_ADDRESS(&addr, AT_IPv4, sizeof(IPv4), &IPv4);
-    proto_item_append_text(pi, " %s, Port %d", ep_address_to_str(&addr), port);
-    offset += 4;
-    break;
-  case ACN_ADDR_IPV6:
-    /* Build tree and add type*/
-    pi = proto_tree_add_text(tree, tvb, offset, 19, "%s", label);
-    addr_tree = proto_item_add_subtree(pi, ett_acn_address);
-    proto_tree_add_item(addr_tree, hf_acn_ip_address_type, tvb, offset, 1, FALSE);
-    offset +=1;
-    /* Add port */
-    port = tvb_get_ntohs(tvb, offset);
-    proto_tree_add_item(addr_tree, hf_acn_port, tvb, offset, 2, FALSE);
-    offset += 2;
-    /* Add Address */
-    proto_tree_add_item(addr_tree, hf_acn_ipv6, tvb, offset, 16, FALSE);
-    /* Append port and address to tree item */
-    tvb_get_ipv6(tvb, offset, &IPv6);
-    SET_ADDRESS(&addr, AT_IPv6, sizeof(struct e_in6_addr), &IPv6);
-    proto_item_append_text(pi, " %s, Port %d", ep_address_to_str(&addr), port);
-    offset += 16;
-    break;
-  case ACN_ADDR_IPPORT:
-    /* Build tree and add type*/
-    pi = proto_tree_add_text(tree, tvb, offset, 3, "%s", label);
-    addr_tree = proto_item_add_subtree(pi, ett_acn_address);
-    proto_tree_add_item(addr_tree, hf_acn_ip_address_type, tvb, offset, 1, FALSE);
-    offset +=1;
-    /* Add port */
-    port = tvb_get_ntohs(tvb, offset);
-    proto_tree_add_item(addr_tree, hf_acn_port, tvb, offset, 2, FALSE);
-    /* Append port to tree item */
-    proto_item_append_text(pi, " %s Port %d", ep_address_to_str(&addr), port);
-    offset += 2;
-    break;
+    case ACN_ADDR_NULL:
+      proto_tree_add_item(tree, hf_acn_ip_address_type, tvb, offset, 1, FALSE);
+      offset += 1;
+      break;
+    case ACN_ADDR_IPV4:
+      /* Build tree and add type*/
+      pi = proto_tree_add_text(tree, tvb, offset, 7, "%s", label);
+      addr_tree = proto_item_add_subtree(pi, ett_acn_address);
+      proto_tree_add_item(addr_tree, hf_acn_ip_address_type, tvb, offset, 1, FALSE);
+      offset +=1;
+      /* Add port */
+      port = tvb_get_ntohs(tvb, offset);
+      proto_tree_add_item(addr_tree, hf_acn_port, tvb, offset, 2, FALSE);
+      offset += 2;
+      /* Add Address */
+      proto_tree_add_item(addr_tree, hf_acn_ipv4, tvb, offset, 4, FALSE);
+      /* Append port and address to tree item */
+      IPv4 = tvb_get_ipv4(tvb, offset);
+      SET_ADDRESS(&addr, AT_IPv4, sizeof(IPv4), &IPv4);
+      proto_item_append_text(pi, " %s, Port %d", ep_address_to_str(&addr), port);
+      offset += 4;
+      break;
+    case ACN_ADDR_IPV6:
+      /* Build tree and add type*/
+      pi = proto_tree_add_text(tree, tvb, offset, 19, "%s", label);
+      addr_tree = proto_item_add_subtree(pi, ett_acn_address);
+      proto_tree_add_item(addr_tree, hf_acn_ip_address_type, tvb, offset, 1, FALSE);
+      offset +=1;
+      /* Add port */
+      port = tvb_get_ntohs(tvb, offset);
+      proto_tree_add_item(addr_tree, hf_acn_port, tvb, offset, 2, FALSE);
+      offset += 2;
+      /* Add Address */
+      proto_tree_add_item(addr_tree, hf_acn_ipv6, tvb, offset, 16, FALSE);
+      /* Append port and address to tree item */
+      tvb_get_ipv6(tvb, offset, &IPv6);
+      SET_ADDRESS(&addr, AT_IPv6, sizeof(struct e_in6_addr), &IPv6);
+      proto_item_append_text(pi, " %s, Port %d", ep_address_to_str(&addr), port);
+      offset += 16;
+      break;
+    case ACN_ADDR_IPPORT:
+      /* Build tree and add type*/
+      pi = proto_tree_add_text(tree, tvb, offset, 3, "%s", label);
+      addr_tree = proto_item_add_subtree(pi, ett_acn_address);
+      proto_tree_add_item(addr_tree, hf_acn_ip_address_type, tvb, offset, 1, FALSE);
+      offset +=1;
+      /* Add port */
+      port = tvb_get_ntohs(tvb, offset);
+      proto_tree_add_item(addr_tree, hf_acn_port, tvb, offset, 2, FALSE);
+      /* Append port to tree item */
+      proto_item_append_text(pi, " %s Port %d", ep_address_to_str(&addr), port);
+      offset += 2;
+      break;
   }
   return offset;
 }
@@ -1199,189 +1199,189 @@ dissect_acn_dmp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int off
   end_offset = data_offset + data_length;
 
   switch (vector) {
-  case ACN_DMP_VECTOR_UNKNOWN:
-    break;
-  case ACN_DMP_VECTOR_GET_PROPERTY:
-    /* Rip trough property address */
-    while (data_offset < end_offset) {
-      old_offset = data_offset;
-      data_offset = acn_add_dmp_address(tvb, pinfo, pdu_tree, data_offset, &adt);
-      if (old_offset == data_offset) break;
-    }
-    break;
-  case ACN_DMP_VECTOR_SET_PROPERTY:
-    /* Rip through Property Address-Data pairs                                 */
-    /* But, in reality, this generally won't work as we have know way of       */
-    /* calculating the next Address-Data pair                                  */
-    while (data_offset < end_offset) {
-      old_offset = data_offset;
-      data_offset = acn_add_dmp_address(tvb, pinfo, pdu_tree, data_offset, &adt);
-      if (old_offset == data_offset) break;
+    case ACN_DMP_VECTOR_UNKNOWN:
+      break;
+    case ACN_DMP_VECTOR_GET_PROPERTY:
+      /* Rip trough property address */
+      while (data_offset < end_offset) {
+        old_offset = data_offset;
+        data_offset = acn_add_dmp_address(tvb, pinfo, pdu_tree, data_offset, &adt);
+        if (old_offset == data_offset) break;
+      }
+      break;
+    case ACN_DMP_VECTOR_SET_PROPERTY:
+      /* Rip through Property Address-Data pairs                                 */
+      /* But, in reality, this generally won't work as we have know way of       */
+      /* calculating the next Address-Data pair                                  */
+      while (data_offset < end_offset) {
+        old_offset = data_offset;
+        data_offset = acn_add_dmp_address(tvb, pinfo, pdu_tree, data_offset, &adt);
+        if (old_offset == data_offset) break;
 
-      adt.data_length = data_length - (data_offset - old_offset);
-      old_offset = data_offset;
-      data_offset = acn_add_dmp_data(tvb, pinfo, pdu_tree, data_offset, &adt);
-      if (old_offset == data_offset) break;
-    }
-    break;
-  case ACN_DMP_VECTOR_GET_PROPERTY_REPLY:
-    /* Rip through Property Address-Data pairs */
-    /* But, in reality, this generally won't work as we have know way of       */
-    /* calculating the next Address-Data pair                                  */
-    while (data_offset < end_offset) {
-      old_offset = data_offset;
-      data_offset = acn_add_dmp_address(tvb, pinfo, pdu_tree, data_offset, &adt);
-      if (old_offset == data_offset) break;
+        adt.data_length = data_length - (data_offset - old_offset);
+        old_offset = data_offset;
+        data_offset = acn_add_dmp_data(tvb, pinfo, pdu_tree, data_offset, &adt);
+        if (old_offset == data_offset) break;
+      }
+      break;
+    case ACN_DMP_VECTOR_GET_PROPERTY_REPLY:
+      /* Rip through Property Address-Data pairs */
+      /* But, in reality, this generally won't work as we have know way of       */
+      /* calculating the next Address-Data pair                                  */
+      while (data_offset < end_offset) {
+        old_offset = data_offset;
+        data_offset = acn_add_dmp_address(tvb, pinfo, pdu_tree, data_offset, &adt);
+        if (old_offset == data_offset) break;
 
-      adt.data_length = data_length - (data_offset - old_offset);
-      old_offset = data_offset;
-      data_offset = acn_add_dmp_data(tvb, pinfo, pdu_tree, data_offset, &adt);
-      if (old_offset == data_offset) break;
-    }
-    break;
-  case ACN_DMP_VECTOR_EVENT:
-    /* Rip through Property Address-Data pairs */
-    /* But, in reality, this generally won't work as we have know way of       */
-    /* calculating the next Address-Data pair                                  */
-    while (data_offset < end_offset) {
-      old_offset = data_offset;
-      data_offset = acn_add_dmp_address(tvb, pinfo, pdu_tree, data_offset, &adt);
-      if (old_offset == data_offset) break;
+        adt.data_length = data_length - (data_offset - old_offset);
+        old_offset = data_offset;
+        data_offset = acn_add_dmp_data(tvb, pinfo, pdu_tree, data_offset, &adt);
+        if (old_offset == data_offset) break;
+      }
+      break;
+    case ACN_DMP_VECTOR_EVENT:
+      /* Rip through Property Address-Data pairs */
+      /* But, in reality, this generally won't work as we have know way of       */
+      /* calculating the next Address-Data pair                                  */
+      while (data_offset < end_offset) {
+        old_offset = data_offset;
+        data_offset = acn_add_dmp_address(tvb, pinfo, pdu_tree, data_offset, &adt);
+        if (old_offset == data_offset) break;
 
-      adt.data_length = data_length - (data_offset - old_offset);
-      old_offset = data_offset;
-      data_offset = acn_add_dmp_data(tvb, pinfo, pdu_tree, data_offset, &adt);
-      if (old_offset == data_offset) break;
-    }
-    break;
-  case ACN_DMP_VECTOR_MAP_PROPERTY:
-    /* Virtual Address type */
-    data_offset = acn_add_dmp_address_type(tvb, pinfo, pdu_tree, data_offset, &adt2);
-    /* Rip through Actual-Virtual Address Pairs */
-    while (data_offset < end_offset) {
-      /* actual */
-      old_offset = data_offset;
-      data_offset = acn_add_dmp_address(tvb, pinfo, pdu_tree, data_offset, &adt);
-      if (old_offset == data_offset) break;
-      D = ACN_DMP_ADT_EXTRACT_D(adt.flags);
-      switch (D) {
-        case ACN_DMP_ADT_D_NS:
-          address_count = 1;
-          break;
-        case ACN_DMP_ADT_D_RS:
-          address_count = 1;
-          break;
-        case ACN_DMP_ADT_D_RE:
-          address_count = adt.count;
-          break;
-        /*case ACN_DMP_ADT_D_RM: */
-        default:
-          /* OUCH */
-          return pdu_start + pdu_length;
-          break;
+        adt.data_length = data_length - (data_offset - old_offset);
+        old_offset = data_offset;
+        data_offset = acn_add_dmp_data(tvb, pinfo, pdu_tree, data_offset, &adt);
+        if (old_offset == data_offset) break;
       }
+      break;
+    case ACN_DMP_VECTOR_MAP_PROPERTY:
+      /* Virtual Address type */
+      data_offset = acn_add_dmp_address_type(tvb, pinfo, pdu_tree, data_offset, &adt2);
+      /* Rip through Actual-Virtual Address Pairs */
+      while (data_offset < end_offset) {
+        /* actual */
+        old_offset = data_offset;
+        data_offset = acn_add_dmp_address(tvb, pinfo, pdu_tree, data_offset, &adt);
+        if (old_offset == data_offset) break;
+        D = ACN_DMP_ADT_EXTRACT_D(adt.flags);
+        switch (D) {
+          case ACN_DMP_ADT_D_NS:
+            address_count = 1;
+            break;
+          case ACN_DMP_ADT_D_RS:
+            address_count = 1;
+            break;
+          case ACN_DMP_ADT_D_RE:
+            address_count = adt.count;
+            break;
+            /*case ACN_DMP_ADT_D_RM: */
+          default:
+            /* OUCH */
+            return pdu_start + pdu_length;
+            break;
+        }
 
-      /* virtual */
-      while (address_count > 0) {
-        data_offset = acn_add_dmp_address(tvb, pinfo, pdu_tree, data_offset, &adt2);
-        address_count--;
+        /* virtual */
+        while (address_count > 0) {
+          data_offset = acn_add_dmp_address(tvb, pinfo, pdu_tree, data_offset, &adt2);
+          address_count--;
+        }
       }
-    }
-    break;
-  case ACN_DMP_VECTOR_UNMAP_PROPERTY:
-    /* Rip trough Actaul Proptery Address */
-    while (data_offset < end_offset) {
-      old_offset = data_offset;
-      data_offset = acn_add_dmp_address(tvb, pinfo, pdu_tree, data_offset, &adt);
-      if (old_offset == data_offset) break;
-    }
-    break;
-  case ACN_DMP_VECTOR_SUBSCRIBE:
-    /* Rip trough Proptery Address */
-    while (data_offset < end_offset) {
-      old_offset = data_offset;
-      data_offset = acn_add_dmp_address(tvb, pinfo, pdu_tree, data_offset, &adt);
-      if (old_offset == data_offset) break;
-    }
-    break;
-  case ACN_DMP_VECTOR_UNSUBSCRIBE:
-    /* Rip trough Proptery Address */
-    while (data_offset < end_offset) {
-      old_offset = data_offset;
-      data_offset = acn_add_dmp_address(tvb, pinfo, pdu_tree, data_offset, &adt);
-      if (old_offset == data_offset) break;
-    }
-    break;
-  case ACN_DMP_VECTOR_GET_PROPERTY_FAIL:
-    /* Rip trough Address-Reason Code Pairs */
-    while (data_offset < end_offset) {
-      old_offset = data_offset;
-      data_offset = acn_add_dmp_address(tvb, pinfo, pdu_tree, data_offset, &adt);
-      if (old_offset == data_offset) break;
+      break;
+    case ACN_DMP_VECTOR_UNMAP_PROPERTY:
+      /* Rip trough Actaul Proptery Address */
+      while (data_offset < end_offset) {
+        old_offset = data_offset;
+        data_offset = acn_add_dmp_address(tvb, pinfo, pdu_tree, data_offset, &adt);
+        if (old_offset == data_offset) break;
+      }
+      break;
+    case ACN_DMP_VECTOR_SUBSCRIBE:
+      /* Rip trough Proptery Address */
+      while (data_offset < end_offset) {
+        old_offset = data_offset;
+        data_offset = acn_add_dmp_address(tvb, pinfo, pdu_tree, data_offset, &adt);
+        if (old_offset == data_offset) break;
+      }
+      break;
+    case ACN_DMP_VECTOR_UNSUBSCRIBE:
+      /* Rip trough Proptery Address */
+      while (data_offset < end_offset) {
+        old_offset = data_offset;
+        data_offset = acn_add_dmp_address(tvb, pinfo, pdu_tree, data_offset, &adt);
+        if (old_offset == data_offset) break;
+      }
+      break;
+    case ACN_DMP_VECTOR_GET_PROPERTY_FAIL:
+      /* Rip trough Address-Reason Code Pairs */
+      while (data_offset < end_offset) {
+        old_offset = data_offset;
+        data_offset = acn_add_dmp_address(tvb, pinfo, pdu_tree, data_offset, &adt);
+        if (old_offset == data_offset) break;
 
-      adt.data_length = data_length - (data_offset - old_offset);
-      old_offset = data_offset;
-      data_offset = acn_add_dmp_reason_codes(tvb, pinfo, pdu_tree, data_offset, &adt);
-      if (old_offset == data_offset) break;
-    }
-    break;
-  case ACN_DMP_VECTOR_SET_PROPERTY_FAIL:
-    /* Rip trough Address-Reason Code Pairs */
-    while (data_offset < end_offset) {
-      old_offset = data_offset;
-      data_offset = acn_add_dmp_address(tvb, pinfo, pdu_tree, data_offset, &adt);
-      if (old_offset == data_offset) break;
+        adt.data_length = data_length - (data_offset - old_offset);
+        old_offset = data_offset;
+        data_offset = acn_add_dmp_reason_codes(tvb, pinfo, pdu_tree, data_offset, &adt);
+        if (old_offset == data_offset) break;
+      }
+      break;
+    case ACN_DMP_VECTOR_SET_PROPERTY_FAIL:
+      /* Rip trough Address-Reason Code Pairs */
+      while (data_offset < end_offset) {
+        old_offset = data_offset;
+        data_offset = acn_add_dmp_address(tvb, pinfo, pdu_tree, data_offset, &adt);
+        if (old_offset == data_offset) break;
 
-      adt.data_length = data_length - (data_offset - old_offset);
-      old_offset = data_offset;
-      data_offset = acn_add_dmp_reason_codes(tvb, pinfo, pdu_tree, data_offset, &adt);
-      if (old_offset == data_offset) break;
-    }
-    break;
-  case ACN_DMP_VECTOR_MAP_PROPERTY_FAIL:
-    /* Rip trough Address-Reason Code Pairs */
-    while (data_offset < end_offset) {
-      old_offset = data_offset;
-      data_offset = acn_add_dmp_address(tvb, pinfo, pdu_tree, data_offset, &adt);
-      if (old_offset == data_offset) break;
+        adt.data_length = data_length - (data_offset - old_offset);
+        old_offset = data_offset;
+        data_offset = acn_add_dmp_reason_codes(tvb, pinfo, pdu_tree, data_offset, &adt);
+        if (old_offset == data_offset) break;
+      }
+      break;
+    case ACN_DMP_VECTOR_MAP_PROPERTY_FAIL:
+      /* Rip trough Address-Reason Code Pairs */
+      while (data_offset < end_offset) {
+        old_offset = data_offset;
+        data_offset = acn_add_dmp_address(tvb, pinfo, pdu_tree, data_offset, &adt);
+        if (old_offset == data_offset) break;
 
-      adt.data_length = data_length - (data_offset - old_offset);
-      old_offset = data_offset;
-      data_offset = acn_add_dmp_reason_codes(tvb, pinfo, pdu_tree, data_offset, &adt);
-      if (old_offset == data_offset) break;
-    }
-    break;
-  case ACN_DMP_VECTOR_SUBSCRIBE_ACCEPT:
-    /* Rip through Property Addrsses */
-    while (data_offset < end_offset) {
-      old_offset = data_offset;
-      data_offset = acn_add_dmp_address(tvb, pinfo, pdu_tree, data_offset, &adt);
-      if (old_offset == data_offset) break;
-    }
-    break;
-  case ACN_DMP_VECTOR_SUBSCRIBE_REJECT:
-    /* Rip trough Address-Reason Code Pairs */
-    while (data_offset < end_offset) {
-      old_offset = data_offset;
-      data_offset = acn_add_dmp_address(tvb, pinfo, pdu_tree, data_offset, &adt);
-      if (old_offset == data_offset) break;
+        adt.data_length = data_length - (data_offset - old_offset);
+        old_offset = data_offset;
+        data_offset = acn_add_dmp_reason_codes(tvb, pinfo, pdu_tree, data_offset, &adt);
+        if (old_offset == data_offset) break;
+      }
+      break;
+    case ACN_DMP_VECTOR_SUBSCRIBE_ACCEPT:
+      /* Rip through Property Addrsses */
+      while (data_offset < end_offset) {
+        old_offset = data_offset;
+        data_offset = acn_add_dmp_address(tvb, pinfo, pdu_tree, data_offset, &adt);
+        if (old_offset == data_offset) break;
+      }
+      break;
+    case ACN_DMP_VECTOR_SUBSCRIBE_REJECT:
+      /* Rip trough Address-Reason Code Pairs */
+      while (data_offset < end_offset) {
+        old_offset = data_offset;
+        data_offset = acn_add_dmp_address(tvb, pinfo, pdu_tree, data_offset, &adt);
+        if (old_offset == data_offset) break;
 
-      adt.data_length = data_length - (data_offset - old_offset);
-      old_offset = data_offset;
-      data_offset = acn_add_dmp_reason_codes(tvb, pinfo, pdu_tree, data_offset, &adt);
-      if (old_offset == data_offset) break;
-    }
-    break;
-  case ACN_DMP_VECTOR_ALLOCATE_MAP:
-    /* No data for this */
-    break;
-  case ACN_DMP_VECTOR_ALLOCATE_MAP_REPLY:
-    /* Single reason code  */
-    proto_tree_add_item(pdu_tree, hf_acn_dmp_reason_code, tvb, data_offset, 1, FALSE);
-    data_offset++;
-  case ACN_DMP_VECTOR_DEALLOCATE_MAP:
-    /* No data for this */
-    break;
+        adt.data_length = data_length - (data_offset - old_offset);
+        old_offset = data_offset;
+        data_offset = acn_add_dmp_reason_codes(tvb, pinfo, pdu_tree, data_offset, &adt);
+        if (old_offset == data_offset) break;
+      }
+      break;
+    case ACN_DMP_VECTOR_ALLOCATE_MAP:
+      /* No data for this */
+      break;
+    case ACN_DMP_VECTOR_ALLOCATE_MAP_REPLY:
+      /* Single reason code  */
+      proto_tree_add_item(pdu_tree, hf_acn_dmp_reason_code, tvb, data_offset, 1, FALSE);
+      data_offset++;
+    case ACN_DMP_VECTOR_DEALLOCATE_MAP:
+      /* No data for this */
+      break;
   }
 
   return pdu_start + pdu_length;
@@ -1493,47 +1493,47 @@ dissect_acn_sdt_wrapped_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
   end_offset = data_offset + data_length;
 
   switch (vector) {
-  case ACN_SDT_VECTOR_ACK:
-    proto_tree_add_item(pdu_tree, hf_acn_reliable_sequence_number, tvb, data_offset, 4, FALSE);
-    data_offset += 4;
-    break;
-  case ACN_SDT_VECTOR_CHANNEL_PARAMS:
-    data_offset = acn_add_channel_parameter(tvb, pinfo, pdu_tree, data_offset);
-    data_offset = acn_add_address(tvb, pinfo, pdu_tree, data_offset, "Ad-hoc Address:");
-    data_offset = acn_add_expiry(tvb, pinfo, pdu_tree, data_offset, "Ad-hoc Expiry:");
-   break;
-  case ACN_SDT_VECTOR_LEAVE:
-    /* nothing more */
-    break;
-  case ACN_SDT_VECTOR_CONNECT:
-    /* Protocol ID item */
-    proto_tree_add_item(pdu_tree, hf_acn_protocol_id, tvb, data_offset, 4, FALSE);
-    data_offset += 4;
-    break;
-  case ACN_SDT_VECTOR_CONNECT_ACCEPT:
-    /* Protocol ID item */
-    proto_tree_add_item(pdu_tree, hf_acn_protocol_id, tvb, data_offset, 4, FALSE);
-    data_offset += 4;
-    break;
-  case ACN_SDT_VECTOR_CONNECT_REFUSE:
-    /* Protocol ID item */
-    proto_tree_add_item(pdu_tree, hf_acn_protocol_id, tvb, data_offset, 4, FALSE);
-    data_offset += 4;
-    proto_tree_add_item(pdu_tree, hf_acn_refuse_code, tvb, data_offset, 1, FALSE);
-    data_offset++;
-    break;
-  case ACN_SDT_VECTOR_DISCONNECT:
-    /* Protocol ID item */
-    proto_tree_add_item(pdu_tree, hf_acn_protocol_id, tvb, data_offset, 4, FALSE);
-    data_offset += 4;
-    break;
-  case ACN_SDT_VECTOR_DISCONNECTING:
-    /* Protocol ID item */
-    proto_tree_add_item(pdu_tree, hf_acn_protocol_id, tvb, data_offset, 4, FALSE);
-    data_offset += 4;
-    proto_tree_add_item(pdu_tree, hf_acn_reason_code, tvb, data_offset, 1, FALSE);
-    data_offset++;
-    break;
+    case ACN_SDT_VECTOR_ACK:
+      proto_tree_add_item(pdu_tree, hf_acn_reliable_sequence_number, tvb, data_offset, 4, FALSE);
+      data_offset += 4;
+      break;
+    case ACN_SDT_VECTOR_CHANNEL_PARAMS:
+      data_offset = acn_add_channel_parameter(tvb, pinfo, pdu_tree, data_offset);
+      data_offset = acn_add_address(tvb, pinfo, pdu_tree, data_offset, "Ad-hoc Address:");
+      data_offset = acn_add_expiry(tvb, pinfo, pdu_tree, data_offset, "Ad-hoc Expiry:");
+      break;
+    case ACN_SDT_VECTOR_LEAVE:
+      /* nothing more */
+      break;
+    case ACN_SDT_VECTOR_CONNECT:
+      /* Protocol ID item */
+      proto_tree_add_item(pdu_tree, hf_acn_protocol_id, tvb, data_offset, 4, FALSE);
+      data_offset += 4;
+      break;
+    case ACN_SDT_VECTOR_CONNECT_ACCEPT:
+      /* Protocol ID item */
+      proto_tree_add_item(pdu_tree, hf_acn_protocol_id, tvb, data_offset, 4, FALSE);
+      data_offset += 4;
+      break;
+    case ACN_SDT_VECTOR_CONNECT_REFUSE:
+      /* Protocol ID item */
+      proto_tree_add_item(pdu_tree, hf_acn_protocol_id, tvb, data_offset, 4, FALSE);
+      data_offset += 4;
+      proto_tree_add_item(pdu_tree, hf_acn_refuse_code, tvb, data_offset, 1, FALSE);
+      data_offset++;
+      break;
+    case ACN_SDT_VECTOR_DISCONNECT:
+      /* Protocol ID item */
+      proto_tree_add_item(pdu_tree, hf_acn_protocol_id, tvb, data_offset, 4, FALSE);
+      data_offset += 4;
+      break;
+    case ACN_SDT_VECTOR_DISCONNECTING:
+      /* Protocol ID item */
+      proto_tree_add_item(pdu_tree, hf_acn_protocol_id, tvb, data_offset, 4, FALSE);
+      data_offset += 4;
+      proto_tree_add_item(pdu_tree, hf_acn_reason_code, tvb, data_offset, 1, FALSE);
+      data_offset++;
+      break;
 
   }
 
@@ -1671,20 +1671,20 @@ dissect_acn_sdt_client_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
   end_offset = data_offset + data_length;
 
   switch (protocol_id) {
-  case ACN_PROTOCOL_ID_SDT:
-    while (data_offset < end_offset) {
-      old_offset = data_offset;
-      data_offset = dissect_acn_sdt_wrapped_pdu(tvb, pinfo, pdu_tree, data_offset, &pdu_offsets);
-      if (old_offset == data_offset) break;
-    }
-    break;
-  case ACN_PROTOCOL_ID_DMP:
-    while (data_offset < end_offset) {
-      old_offset = data_offset;
-      data_offset = dissect_acn_dmp_pdu(tvb, pinfo, pdu_tree, data_offset, &pdu_offsets);
-      if (data_offset == old_offset) break;
-    }
-    break;
+    case ACN_PROTOCOL_ID_SDT:
+      while (data_offset < end_offset) {
+        old_offset = data_offset;
+        data_offset = dissect_acn_sdt_wrapped_pdu(tvb, pinfo, pdu_tree, data_offset, &pdu_offsets);
+        if (old_offset == data_offset) break;
+      }
+      break;
+    case ACN_PROTOCOL_ID_DMP:
+      while (data_offset < end_offset) {
+        old_offset = data_offset;
+        data_offset = dissect_acn_dmp_pdu(tvb, pinfo, pdu_tree, data_offset, &pdu_offsets);
+        if (data_offset == old_offset) break;
+      }
+      break;
   }
   return pdu_start + pdu_length;
 }
@@ -1884,11 +1884,11 @@ dissect_acn_dmx_data_pdu(guint32 protocol_id, tvbuff_t *tvb, packet_info *pinfo,
   switch (vector) {
     case ACN_DMP_VECTOR_SET_PROPERTY:
       dmx_start_code = tvb_get_ntohs(tvb, data_offset);
-         if(protocol_id==ACN_PROTOCOL_ID_DMX_2){
+      if(protocol_id==ACN_PROTOCOL_ID_DMX_2){
         proto_tree_add_item(pdu_tree, hf_acn_dmx_2_first_property_address, tvb, data_offset, 2, FALSE);
-         } else{
+      } else{
         proto_tree_add_item(pdu_tree, hf_acn_dmx_start_code, tvb, data_offset, 2, FALSE);
-         }
+      }
       data_offset += 2;
       proto_tree_add_item(pdu_tree, hf_acn_dmx_increment, tvb, data_offset, 2, FALSE);
       data_offset += 2;
@@ -2122,48 +2122,48 @@ dissect_acn_dmx_pdu(guint32 protocol_id, tvbuff_t *tvb, packet_info *pinfo, prot
 
   /* process based on vector */
   switch (vector) {
-  case 0x02:
-    if(protocol_id==ACN_PROTOCOL_ID_DMX_2){
-      proto_tree_add_item(pdu_tree, hf_acn_dmx_source_name, tvb, data_offset, 64, FALSE);
-      data_offset += 64;
-       } else{
-      proto_tree_add_item(pdu_tree, hf_acn_dmx_source_name, tvb, data_offset, 32, FALSE);
-      data_offset += 32;
-    }
-
-    priority = tvb_get_guint8(tvb, data_offset);
-    proto_tree_add_item(pdu_tree, hf_acn_dmx_priority, tvb, data_offset, 1, FALSE);
-    data_offset += 1;
+    case 0x02:
+      if(protocol_id==ACN_PROTOCOL_ID_DMX_2){
+        proto_tree_add_item(pdu_tree, hf_acn_dmx_source_name, tvb, data_offset, 64, FALSE);
+        data_offset += 64;
+      } else{
+        proto_tree_add_item(pdu_tree, hf_acn_dmx_source_name, tvb, data_offset, 32, FALSE);
+        data_offset += 32;
+      }
 
-       if(protocol_id==ACN_PROTOCOL_ID_DMX_2){
-      proto_tree_add_item(pdu_tree, hf_acn_dmx_2_reserved, tvb, data_offset, 2, FALSE);
-      data_offset += 2;
-    }
+      priority = tvb_get_guint8(tvb, data_offset);
+      proto_tree_add_item(pdu_tree, hf_acn_dmx_priority, tvb, data_offset, 1, FALSE);
+      data_offset += 1;
 
-    sequence = tvb_get_guint8(tvb, data_offset);
-    proto_tree_add_item(pdu_tree, hf_acn_dmx_sequence_number, tvb, data_offset, 1, FALSE);
-    data_offset += 1;
+      if(protocol_id==ACN_PROTOCOL_ID_DMX_2){
+        proto_tree_add_item(pdu_tree, hf_acn_dmx_2_reserved, tvb, data_offset, 2, FALSE);
+        data_offset += 2;
+      }
 
-    if(protocol_id==ACN_PROTOCOL_ID_DMX_2){
-      option_flags = tvb_get_guint8(tvb, data_offset);
-      pi = proto_tree_add_uint(pdu_tree, hf_acn_dmx_2_options, tvb, data_offset, 1, option_flags);
-      flag_tree = proto_item_add_subtree(pi, ett_acn_dmx_2_options);
-      proto_tree_add_item(flag_tree, hf_acn_dmx_2_option_p, tvb, data_offset, 1, FALSE);
-      proto_tree_add_item(flag_tree, hf_acn_dmx_2_option_s, tvb, data_offset, 1, FALSE);
+      sequence = tvb_get_guint8(tvb, data_offset);
+      proto_tree_add_item(pdu_tree, hf_acn_dmx_sequence_number, tvb, data_offset, 1, FALSE);
       data_offset += 1;
-    }
 
-    universe = tvb_get_ntohs(tvb, data_offset);
-    proto_tree_add_item(pdu_tree, hf_acn_dmx_universe       , tvb, data_offset, 2, FALSE);
-    data_offset += 2;
+      if(protocol_id==ACN_PROTOCOL_ID_DMX_2){
+        option_flags = tvb_get_guint8(tvb, data_offset);
+        pi = proto_tree_add_uint(pdu_tree, hf_acn_dmx_2_options, tvb, data_offset, 1, option_flags);
+        flag_tree = proto_item_add_subtree(pi, ett_acn_dmx_2_options);
+        proto_tree_add_item(flag_tree, hf_acn_dmx_2_option_p, tvb, data_offset, 1, FALSE);
+        proto_tree_add_item(flag_tree, hf_acn_dmx_2_option_s, tvb, data_offset, 1, FALSE);
+        data_offset += 1;
+      }
 
-    /* add universe to info */
-    col_append_fstr(pinfo->cinfo,COL_INFO, ", Universe %d, Seq %3d", universe, sequence );
-    proto_item_append_text(ti, ", Universe: %d, Priority: %d", universe, priority);
+      universe = tvb_get_ntohs(tvb, data_offset);
+      proto_tree_add_item(pdu_tree, hf_acn_dmx_universe       , tvb, data_offset, 2, FALSE);
+      data_offset += 2;
 
-    data_offset = dissect_acn_dmx_data_pdu(protocol_id, tvb, pinfo, pdu_tree, data_offset, &pdu_offsets);
+      /* add universe to info */
+      col_append_fstr(pinfo->cinfo,COL_INFO, ", Universe %d, Seq %3d", universe, sequence );
+      proto_item_append_text(ti, ", Universe: %d, Priority: %d", universe, priority);
 
-    break;
+      data_offset = dissect_acn_dmx_data_pdu(protocol_id, tvb, pinfo, pdu_tree, data_offset, &pdu_offsets);
+
+      break;
   }
   return pdu_start + pdu_length;
 }
@@ -2276,133 +2276,133 @@ dissect_acn_sdt_base_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, in
 
   /* process based on vector */
   switch (vector) {
-  case ACN_SDT_VECTOR_UNKNOWN:
-    break;
-  case ACN_SDT_VECTOR_REL_WRAP:
-  case ACN_SDT_VECTOR_UNREL_WRAP:
-    proto_tree_add_item(pdu_tree, hf_acn_channel_number, tvb, data_offset, 2, FALSE);
-    data_offset += 2;
-    proto_tree_add_item(pdu_tree, hf_acn_total_sequence_number, tvb, data_offset, 4, FALSE);
-    data_offset += 4;
-    proto_tree_add_item(pdu_tree, hf_acn_reliable_sequence_number, tvb, data_offset, 4, FALSE);
-    data_offset += 4;
-    proto_tree_add_item(pdu_tree, hf_acn_oldest_available_wrapper, tvb, data_offset, 4, FALSE);
-    data_offset += 4;
-    proto_tree_add_item(pdu_tree, hf_acn_first_memeber_to_ack, tvb, data_offset, 2, FALSE);
-    data_offset += 2;
-    proto_tree_add_item(pdu_tree, hf_acn_last_memeber_to_ack, tvb, data_offset, 2, FALSE);
-    data_offset += 2;
-    proto_tree_add_item(pdu_tree, hf_acn_mak_threshold, tvb, data_offset, 2, FALSE);
-    data_offset += 2;
+    case ACN_SDT_VECTOR_UNKNOWN:
+      break;
+    case ACN_SDT_VECTOR_REL_WRAP:
+    case ACN_SDT_VECTOR_UNREL_WRAP:
+      proto_tree_add_item(pdu_tree, hf_acn_channel_number, tvb, data_offset, 2, FALSE);
+      data_offset += 2;
+      proto_tree_add_item(pdu_tree, hf_acn_total_sequence_number, tvb, data_offset, 4, FALSE);
+      data_offset += 4;
+      proto_tree_add_item(pdu_tree, hf_acn_reliable_sequence_number, tvb, data_offset, 4, FALSE);
+      data_offset += 4;
+      proto_tree_add_item(pdu_tree, hf_acn_oldest_available_wrapper, tvb, data_offset, 4, FALSE);
+      data_offset += 4;
+      proto_tree_add_item(pdu_tree, hf_acn_first_memeber_to_ack, tvb, data_offset, 2, FALSE);
+      data_offset += 2;
+      proto_tree_add_item(pdu_tree, hf_acn_last_memeber_to_ack, tvb, data_offset, 2, FALSE);
+      data_offset += 2;
+      proto_tree_add_item(pdu_tree, hf_acn_mak_threshold, tvb, data_offset, 2, FALSE);
+      data_offset += 2;
 
-    while (data_offset < end_offset) {
-      old_offset = data_offset;
-      data_offset = dissect_acn_sdt_client_pdu(tvb, pinfo, pdu_tree, data_offset, &pdu_offsets);
-      if (data_offset == old_offset) break;
-    }
-    break;
-  case ACN_SDT_VECTOR_CHANNEL_PARAMS:
-    break;
-  case ACN_SDT_VECTOR_JOIN:
-    proto_tree_add_item(pdu_tree, hf_acn_cid, tvb, data_offset, 16, FALSE);
-    data_offset += 16;
-    proto_tree_add_item(pdu_tree, hf_acn_member_id, tvb, data_offset, 2, FALSE);
-    data_offset += 2;
-    proto_tree_add_item(pdu_tree, hf_acn_channel_number, tvb, data_offset, 2, FALSE);
-    data_offset += 2;
-    proto_tree_add_item(pdu_tree, hf_acn_reciprocal_channel, tvb, data_offset, 2, FALSE);
-    data_offset += 2;
-    proto_tree_add_item(pdu_tree, hf_acn_total_sequence_number, tvb, data_offset, 4, FALSE);
-    data_offset += 4;
-    proto_tree_add_item(pdu_tree, hf_acn_reliable_sequence_number, tvb, data_offset, 4, FALSE);
-    data_offset += 4;
-    data_offset = acn_add_address(tvb, pinfo, pdu_tree, data_offset, "Destination Address:");
-    data_offset = acn_add_channel_parameter(tvb, pinfo, pdu_tree, data_offset);
-    data_offset = acn_add_expiry(tvb, pinfo, pdu_tree, data_offset, "Ad-hoc Expiry:");
-    break;
-  case ACN_SDT_VECTOR_JOIN_REFUSE:
-    pi = proto_tree_add_item(pdu_tree, hf_acn_cid, tvb, data_offset, 16, FALSE);
-    data_offset += 16;
-    proto_item_append_text(pi, "(Leader)");
-    proto_tree_add_item(pdu_tree, hf_acn_channel_number, tvb, data_offset, 2, FALSE);
-    data_offset += 2;
-    proto_tree_add_item(pdu_tree, hf_acn_member_id, tvb, data_offset, 2, FALSE);
-    data_offset += 2;
-    proto_tree_add_item(pdu_tree, hf_acn_reliable_sequence_number, tvb, data_offset, 4, FALSE);
-    data_offset += 4;
-    proto_tree_add_item(pdu_tree, hf_acn_refuse_code, tvb, data_offset, 1, FALSE);
-    data_offset ++;
-    break;
-  case ACN_SDT_VECTOR_JOIN_ACCEPT:
-    pi = proto_tree_add_item(pdu_tree, hf_acn_cid, tvb, data_offset, 16, FALSE);
-    data_offset += 16;
-    proto_item_append_text(pi, "(Leader)");
-    proto_tree_add_item(pdu_tree, hf_acn_channel_number, tvb, data_offset, 2, FALSE);
-    data_offset += 2;
-    proto_tree_add_item(pdu_tree, hf_acn_member_id, tvb, data_offset, 2, FALSE);
-    data_offset += 2;
-    proto_tree_add_item(pdu_tree, hf_acn_reliable_sequence_number, tvb, data_offset, 4, FALSE);
-    data_offset += 4;
-    proto_tree_add_item(pdu_tree, hf_acn_reciprocal_channel, tvb, data_offset, 2, FALSE);
-    data_offset += 2;
-    break;
-  case ACN_SDT_VECTOR_LEAVE:
-    break;
-  case ACN_SDT_VECTOR_LEAVING:
-    pi = proto_tree_add_item(pdu_tree, hf_acn_cid, tvb, data_offset, 16, FALSE);
-    data_offset += 16;
-    proto_item_append_text(pi, "(Leader)");
-    proto_tree_add_item(pdu_tree, hf_acn_channel_number, tvb, data_offset, 2, FALSE);
-    data_offset += 2;
-    proto_tree_add_item(pdu_tree, hf_acn_member_id, tvb, data_offset, 2, FALSE);
-    data_offset += 2;
-    proto_tree_add_item(pdu_tree, hf_acn_reliable_sequence_number, tvb, data_offset, 4, FALSE);
-    data_offset += 4;
-    proto_tree_add_item(pdu_tree, hf_acn_reason_code, tvb, data_offset, 1, FALSE);
-    offset++;
-    break;
-  case ACN_SDT_VECTOR_CONNECT:
-    break;
-  case ACN_SDT_VECTOR_CONNECT_ACCEPT:
-    break;
-  case ACN_SDT_VECTOR_CONNECT_REFUSE:
-    break;
-  case ACN_SDT_VECTOR_DISCONNECT:
-    break;
-  case ACN_SDT_VECTOR_DISCONNECTING:
-    break;
-  case ACN_SDT_VECTOR_ACK:
-    break;
-  case ACN_SDT_VECTOR_NAK:
-    pi = proto_tree_add_item(pdu_tree, hf_acn_cid, tvb, data_offset, 16, FALSE);
-    data_offset += 16;
-    proto_item_append_text(pi, "(Leader)");
-    proto_tree_add_item(pdu_tree, hf_acn_channel_number, tvb, data_offset, 2, FALSE);
-    data_offset += 2;
-    proto_tree_add_item(pdu_tree, hf_acn_member_id, tvb, data_offset, 2, FALSE);
-    data_offset += 2;
-    proto_tree_add_item(pdu_tree, hf_acn_reliable_sequence_number, tvb, data_offset, 4, FALSE);
-    data_offset += 4;
-    proto_tree_add_item(pdu_tree, hf_acn_first_missed_sequence, tvb, data_offset, 4, FALSE);
-    data_offset += 4;
-    proto_tree_add_item(pdu_tree, hf_acn_last_missed_sequence, tvb, data_offset, 4, FALSE);
-    data_offset += 4;
-    break;
-  case ACN_SDT_VECTOR_GET_SESSION:
-    proto_tree_add_item(pdu_tree, hf_acn_cid, tvb, data_offset, 16, FALSE);
-    data_offset += 16;
-    break;
-  case ACN_SDT_VECTOR_SESSIONS:
-    member_id = tvb_get_ntohs(tvb, data_offset);
-    switch (member_id) {
-    case 0:
-      data_offset = acn_add_channel_owner_info_block(tvb, pinfo, pdu_tree, data_offset);
+      while (data_offset < end_offset) {
+        old_offset = data_offset;
+        data_offset = dissect_acn_sdt_client_pdu(tvb, pinfo, pdu_tree, data_offset, &pdu_offsets);
+        if (data_offset == old_offset) break;
+      }
       break;
-    case 1:
-      data_offset = acn_add_channel_member_info_block(tvb, pinfo, pdu_tree, data_offset);
+    case ACN_SDT_VECTOR_CHANNEL_PARAMS:
+      break;
+    case ACN_SDT_VECTOR_JOIN:
+      proto_tree_add_item(pdu_tree, hf_acn_cid, tvb, data_offset, 16, FALSE);
+      data_offset += 16;
+      proto_tree_add_item(pdu_tree, hf_acn_member_id, tvb, data_offset, 2, FALSE);
+      data_offset += 2;
+      proto_tree_add_item(pdu_tree, hf_acn_channel_number, tvb, data_offset, 2, FALSE);
+      data_offset += 2;
+      proto_tree_add_item(pdu_tree, hf_acn_reciprocal_channel, tvb, data_offset, 2, FALSE);
+      data_offset += 2;
+      proto_tree_add_item(pdu_tree, hf_acn_total_sequence_number, tvb, data_offset, 4, FALSE);
+      data_offset += 4;
+      proto_tree_add_item(pdu_tree, hf_acn_reliable_sequence_number, tvb, data_offset, 4, FALSE);
+      data_offset += 4;
+      data_offset = acn_add_address(tvb, pinfo, pdu_tree, data_offset, "Destination Address:");
+      data_offset = acn_add_channel_parameter(tvb, pinfo, pdu_tree, data_offset);
+      data_offset = acn_add_expiry(tvb, pinfo, pdu_tree, data_offset, "Ad-hoc Expiry:");
+      break;
+    case ACN_SDT_VECTOR_JOIN_REFUSE:
+      pi = proto_tree_add_item(pdu_tree, hf_acn_cid, tvb, data_offset, 16, FALSE);
+      data_offset += 16;
+      proto_item_append_text(pi, "(Leader)");
+      proto_tree_add_item(pdu_tree, hf_acn_channel_number, tvb, data_offset, 2, FALSE);
+      data_offset += 2;
+      proto_tree_add_item(pdu_tree, hf_acn_member_id, tvb, data_offset, 2, FALSE);
+      data_offset += 2;
+      proto_tree_add_item(pdu_tree, hf_acn_reliable_sequence_number, tvb, data_offset, 4, FALSE);
+      data_offset += 4;
+      proto_tree_add_item(pdu_tree, hf_acn_refuse_code, tvb, data_offset, 1, FALSE);
+      data_offset ++;
+      break;
+    case ACN_SDT_VECTOR_JOIN_ACCEPT:
+      pi = proto_tree_add_item(pdu_tree, hf_acn_cid, tvb, data_offset, 16, FALSE);
+      data_offset += 16;
+      proto_item_append_text(pi, "(Leader)");
+      proto_tree_add_item(pdu_tree, hf_acn_channel_number, tvb, data_offset, 2, FALSE);
+      data_offset += 2;
+      proto_tree_add_item(pdu_tree, hf_acn_member_id, tvb, data_offset, 2, FALSE);
+      data_offset += 2;
+      proto_tree_add_item(pdu_tree, hf_acn_reliable_sequence_number, tvb, data_offset, 4, FALSE);
+      data_offset += 4;
+      proto_tree_add_item(pdu_tree, hf_acn_reciprocal_channel, tvb, data_offset, 2, FALSE);
+      data_offset += 2;
+      break;
+    case ACN_SDT_VECTOR_LEAVE:
+      break;
+    case ACN_SDT_VECTOR_LEAVING:
+      pi = proto_tree_add_item(pdu_tree, hf_acn_cid, tvb, data_offset, 16, FALSE);
+      data_offset += 16;
+      proto_item_append_text(pi, "(Leader)");
+      proto_tree_add_item(pdu_tree, hf_acn_channel_number, tvb, data_offset, 2, FALSE);
+      data_offset += 2;
+      proto_tree_add_item(pdu_tree, hf_acn_member_id, tvb, data_offset, 2, FALSE);
+      data_offset += 2;
+      proto_tree_add_item(pdu_tree, hf_acn_reliable_sequence_number, tvb, data_offset, 4, FALSE);
+      data_offset += 4;
+      proto_tree_add_item(pdu_tree, hf_acn_reason_code, tvb, data_offset, 1, FALSE);
+      offset++;
+      break;
+    case ACN_SDT_VECTOR_CONNECT:
+      break;
+    case ACN_SDT_VECTOR_CONNECT_ACCEPT:
+      break;
+    case ACN_SDT_VECTOR_CONNECT_REFUSE:
+      break;
+    case ACN_SDT_VECTOR_DISCONNECT:
+      break;
+    case ACN_SDT_VECTOR_DISCONNECTING:
+      break;
+    case ACN_SDT_VECTOR_ACK:
+      break;
+    case ACN_SDT_VECTOR_NAK:
+      pi = proto_tree_add_item(pdu_tree, hf_acn_cid, tvb, data_offset, 16, FALSE);
+      data_offset += 16;
+      proto_item_append_text(pi, "(Leader)");
+      proto_tree_add_item(pdu_tree, hf_acn_channel_number, tvb, data_offset, 2, FALSE);
+      data_offset += 2;
+      proto_tree_add_item(pdu_tree, hf_acn_member_id, tvb, data_offset, 2, FALSE);
+      data_offset += 2;
+      proto_tree_add_item(pdu_tree, hf_acn_reliable_sequence_number, tvb, data_offset, 4, FALSE);
+      data_offset += 4;
+      proto_tree_add_item(pdu_tree, hf_acn_first_missed_sequence, tvb, data_offset, 4, FALSE);
+      data_offset += 4;
+      proto_tree_add_item(pdu_tree, hf_acn_last_missed_sequence, tvb, data_offset, 4, FALSE);
+      data_offset += 4;
+      break;
+    case ACN_SDT_VECTOR_GET_SESSION:
+      proto_tree_add_item(pdu_tree, hf_acn_cid, tvb, data_offset, 16, FALSE);
+      data_offset += 16;
+      break;
+    case ACN_SDT_VECTOR_SESSIONS:
+      member_id = tvb_get_ntohs(tvb, data_offset);
+      switch (member_id) {
+        case 0:
+          data_offset = acn_add_channel_owner_info_block(tvb, pinfo, pdu_tree, data_offset);
+          break;
+        case 1:
+          data_offset = acn_add_channel_member_info_block(tvb, pinfo, pdu_tree, data_offset);
+          break;
+      }
       break;
-    }
-    break;
   }
 
   return pdu_start + pdu_length;
@@ -2497,10 +2497,59 @@ dissect_acn_root_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int of
 
   /* process based on protocol_id */
   switch (protocol_id) {
-  case ACN_PROTOCOL_ID_DMX:
-  case ACN_PROTOCOL_ID_DMX_2:
-    if (global_acn_dmx_enable) {
-      proto_item_append_text(ti,": Root DMX");
+    case ACN_PROTOCOL_ID_DMX:
+    case ACN_PROTOCOL_ID_DMX_2:
+      if (global_acn_dmx_enable) {
+        proto_item_append_text(ti,": Root DMX");
+
+        /* Set header offset */
+        if (pdu_flags & ACN_PDU_FLAG_H) {
+          /* use new values */
+          header_offset = offset;
+          last_pdu_offsets->header = offset;
+          offset += 16;
+          pdu_flvh_length += 16;
+        } else {
+          /* use last values */
+          header_offset = last_pdu_offsets->header;
+        }
+        /* offset should now be pointing to data (if one exists) */
+
+        /* get Header (CID) 16 bytes */
+        tvb_get_guid(tvb, header_offset, &guid, FALSE);
+        proto_item_append_text(ti, ", Src: %s", guid_to_str(&guid));
+
+        /* add cid to info */
+        col_add_fstr(pinfo->cinfo,COL_INFO, "CID %s", guid_to_str(&guid));
+
+        proto_tree_add_item(pdu_tree, hf_acn_cid, tvb, header_offset, 16, FALSE);
+        header_offset += 16;
+
+        /* Adjust data */
+        if (pdu_flags & ACN_PDU_FLAG_D) {
+          /* use new values */
+          data_offset = offset;
+          data_length = pdu_length - pdu_flvh_length;
+          last_pdu_offsets->data = offset;
+          last_pdu_offsets->data_length = data_length;
+        } else {
+          /* use last values */
+          data_offset = last_pdu_offsets->data;
+          data_length = last_pdu_offsets->data_length;
+        }
+        end_offset = data_offset + data_length;
+
+        /* adjust for what we used */
+        while (data_offset < end_offset) {
+          old_offset = data_offset;
+          data_offset = dissect_acn_dmx_pdu(protocol_id, tvb, pinfo, pdu_tree, data_offset, &pdu_offsets);
+          if (data_offset == old_offset) break;
+        }
+      }
+      break;
+    case ACN_PROTOCOL_ID_SDT:
+      /* Adjust header */
+      proto_item_append_text(ti,": Root SDT");
 
       /* Set header offset */
       if (pdu_flags & ACN_PDU_FLAG_H) {
@@ -2519,9 +2568,6 @@ dissect_acn_root_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int of
       tvb_get_guid(tvb, header_offset, &guid, FALSE);
       proto_item_append_text(ti, ", Src: %s", guid_to_str(&guid));
 
-      /* add cid to info */
-      col_add_fstr(pinfo->cinfo,COL_INFO, "CID %s", guid_to_str(&guid));
-
       proto_tree_add_item(pdu_tree, hf_acn_cid, tvb, header_offset, 16, FALSE);
       header_offset += 16;
 
@@ -2542,56 +2588,10 @@ dissect_acn_root_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int of
       /* adjust for what we used */
       while (data_offset < end_offset) {
         old_offset = data_offset;
-        data_offset = dissect_acn_dmx_pdu(protocol_id, tvb, pinfo, pdu_tree, data_offset, &pdu_offsets);
+        data_offset = dissect_acn_sdt_base_pdu(tvb, pinfo, pdu_tree, data_offset, &pdu_offsets);
         if (data_offset == old_offset) break;
       }
-    }
-    break;
-  case ACN_PROTOCOL_ID_SDT:
-    /* Adjust header */
-    proto_item_append_text(ti,": Root SDT");
-
-    /* Set header offset */
-    if (pdu_flags & ACN_PDU_FLAG_H) {
-      /* use new values */
-      header_offset = offset;
-      last_pdu_offsets->header = offset;
-      offset += 16;
-      pdu_flvh_length += 16;
-    } else {
-      /* use last values */
-      header_offset = last_pdu_offsets->header;
-    }
-    /* offset should now be pointing to data (if one exists) */
-
-    /* get Header (CID) 16 bytes */
-    tvb_get_guid(tvb, header_offset, &guid, FALSE);
-    proto_item_append_text(ti, ", Src: %s", guid_to_str(&guid));
-
-    proto_tree_add_item(pdu_tree, hf_acn_cid, tvb, header_offset, 16, FALSE);
-    header_offset += 16;
-
-    /* Adjust data */
-    if (pdu_flags & ACN_PDU_FLAG_D) {
-      /* use new values */
-      data_offset = offset;
-      data_length = pdu_length - pdu_flvh_length;
-      last_pdu_offsets->data = offset;
-      last_pdu_offsets->data_length = data_length;
-    } else {
-      /* use last values */
-      data_offset = last_pdu_offsets->data;
-      data_length = last_pdu_offsets->data_length;
-    }
-    end_offset = data_offset + data_length;
-
-    /* adjust for what we used */
-    while (data_offset < end_offset) {
-      old_offset = data_offset;
-      data_offset = dissect_acn_sdt_base_pdu(tvb, pinfo, pdu_tree, data_offset, &pdu_offsets);
-      if (data_offset == old_offset) break;
-    }
-    break;
+      break;
   }
 
   return pdu_start + pdu_length;
@@ -2976,13 +2976,13 @@ void proto_register_acn(void)
         FT_UINT8, BASE_DEC, NULL, 0x0,
         "DMX Options", HFILL }
     },
-       
+
     { &hf_acn_dmx_2_option_p,
       { "Preview Data", "acn.dmx.option_p",
         FT_BOOLEAN, 8, NULL, ACN_DMX_OPTION_P,
         "Preview Data flag", HFILL }
     },
-       
+
     { &hf_acn_dmx_2_option_s,
       { "Stream Terminated", "acn.dmx.option_s",
         FT_BOOLEAN, 8, NULL, ACN_DMX_OPTION_S,
index 964c131ed4e477f5e34b4316148cca8573d33bfc..985934404cb27e86399a2bbdda70e72229336c0e 100644 (file)
@@ -77,17 +77,17 @@ static dissector_handle_t lapd_handle;
 #define ACTRACE_CAS_SOURCE_TABLE       2
 
 static const value_string actrace_cas_source_vals[] = {
-    {ACTRACE_CAS_SOURCE_DSP, "DSP"},
-    {ACTRACE_CAS_SOURCE_USER, "User"},
-    {ACTRACE_CAS_SOURCE_TABLE, "Table"},
-    {0,   NULL }
+       {ACTRACE_CAS_SOURCE_DSP, "DSP"},
+       {ACTRACE_CAS_SOURCE_USER, "User"},
+       {ACTRACE_CAS_SOURCE_TABLE, "Table"},
+       {0,   NULL }
 };
 
 static const value_string actrace_cas_source_vals_short[] = {
-    {ACTRACE_CAS_SOURCE_DSP, "D"},
-    {ACTRACE_CAS_SOURCE_USER, "U"},
-    {ACTRACE_CAS_SOURCE_TABLE, "T"},
-    {0,   NULL }
+       {ACTRACE_CAS_SOURCE_DSP, "D"},
+       {ACTRACE_CAS_SOURCE_USER, "U"},
+       {ACTRACE_CAS_SOURCE_TABLE, "T"},
+       {0,   NULL }
 };
 
 #define ACTRACE_CAS_EV_11 17
@@ -99,120 +99,120 @@ static const value_string actrace_cas_source_vals_short[] = {
 #define ACTRACE_CAS_EV_FIRST_DIGIT 63
 
 static const value_string actrace_cas_event_ab_vals[] = {
-    {ACTRACE_CAS_EV_11, "11"},
-    {ACTRACE_CAS_EV_10, "10"},
-    {ACTRACE_CAS_EV_01, "01"},
-    {ACTRACE_CAS_EV_00, "00"},
-    {0, NULL}
+       {ACTRACE_CAS_EV_11, "11"},
+       {ACTRACE_CAS_EV_10, "10"},
+       {ACTRACE_CAS_EV_01, "01"},
+       {ACTRACE_CAS_EV_00, "00"},
+       {0, NULL}
 };
 
 static const value_string actrace_cas_mf_vals[] = {
-    {32, "1"},
-    {33, "2"},
-    {34, "3"},
-    {35, "4"},
-    {36, "5"},
-    {37, "6"},
-    {38, "7"},
-    {39, "8"},
-    {40, "9"},
-    {41, "0"},
-    {42, "A"},
-    {43, "B"},
-    {44, "C"},
-    {45, "*"},
-    {46, "#"},
-    {0, NULL}
+       {32, "1"},
+       {33, "2"},
+       {34, "3"},
+       {35, "4"},
+       {36, "5"},
+       {37, "6"},
+       {38, "7"},
+       {39, "8"},
+       {40, "9"},
+       {41, "0"},
+       {42, "A"},
+       {43, "B"},
+       {44, "C"},
+       {45, "*"},
+       {46, "#"},
+       {0, NULL}
 };
 
 static const value_string actrace_cas_event_vals[] = {
-    {0, "FUNCTION0"},
-    {1, "FUNCTION1"},
-    {2, "FUNCTION2"},
-    {3, "FUNCTION3"},
-    {4, "EV_PLACE_CALL"},
-    {5, "EV_TIMER_EXPIRED1"},
-    {6, "EV_TIMER_EXPIRED2"},
-    {7, "EV_TIMER_EXPIRED3"},
-    {8, "EV_TIMER_EXPIRED4"},
-    {9, "EV_TIMER_EXPIRED5"},
-    {10, "EV_TIMER_EXPIRED6"},
-    {11, "EV_TIMER_EXPIRED7"},
-    {12, "EV_TIMER_EXPIRED8"},
-    {13, "EV_ANSWER"},
-    {14, "EV_DIAL_TONE_DETECTED"},
-    {15, "EV_DIAL_ENDED"},
-    {16, "EV_DISCONNECT"},
-    {ACTRACE_CAS_EV_11, "EV_CAS_1_1"},
-    {ACTRACE_CAS_EV_10, "EV_CAS_1_0"},
-    {ACTRACE_CAS_EV_01, "EV_CAS_0_1"},
-    {ACTRACE_CAS_EV_00, "EV_CAS_0_0"},
-    {21, "EV_RB_TONE_STARTED"},
-    {22, "EV_RB_TONE_STOPPED"},
-    {23, "EV_BUSY_TONE"},
-    {24, "EV_FAST_BUSY_TONE"},
-    {25, "EV_HELLO_DETECTED"},
-    {26, "EV_DIAL_TONE_STOPPED"},
-    {27, "EV_DISCONNECT_INCOMING"},
-    {28, "EV_RELEASE_CALL"},
-    {29, "EV_DIALED_NUM_DETECTED"},
-    {30, "EV_COUNTER1_EXPIRED"},
-    {31, "EV_COUNTER2_EXPIRED"},
-    {32, "EV_MFRn_1"},
-    {33, "EV_MFRn_2"},
-    {34, "EV_MFRn_3"},
-    {35, "EV_MFRn_4"},
-    {36, "EV_MFRn_5"},
-    {37, "EV_MFRn_6"},
-    {38, "EV_MFRn_7"},
-    {39, "EV_MFRn_8"},
-    {40, "EV_MFRn_9"},
-    {41, "EV_MFRn_10"},
-    {42, "EV_MFRn_11"},
-    {43, "EV_MFRn_12"},
-    {44, "EV_MFRn_13"},
-    {45, "EV_MFRn_14"},
-    {46, "EV_MFRn_15"},
-    {47, "EV_MFRn_1_STOPED"},
-    {48, "EV_MFRn_2_STOPED"},
-    {49, "EV_MFRn_3_STOPED"},
-    {50, "EV_MFRn_4_STOPED"},
-    {51, "EV_MFRn_5_STOPED"},
-    {52, "EV_MFRn_6_STOPED"},
-    {53, "EV_MFRn_7_STOPED"},
-    {54, "EV_MFRn_8_STOPED"},
-    {55, "EV_MFRn_9_STOPED"},
-    {56, "EV_MFRn_10_STOPED"},
-    {57, "EV_MFRn_11_STOPED"},
-    {58, "EV_MFRn_12_STOPED"},
-    {59, "EV_MFRn_13_STOPED"},
-    {60, "EV_MFRn_14_STOPED"},
-    {61, "EV_MFRn_15_STOPED"},
-    {62, "EV_ANI_NUM_DETECTED"},
-    {ACTRACE_CAS_EV_FIRST_DIGIT, "EV_FIRST_DIGIT"},
-    {64, "EV_END_OF_MF_DIGIT"},
-    {65, "EV_ACCEPT"},
-    {66, "EV_REJECT_BUSY"},
-    {67, "EV_REJECT_CONGESTION"},
-    {68, "EV_REJECT_UNALLOCATED"},
-    {69, "EV_REJECT_RESERVE1"},
-    {70, "EV_REJECT_RESERVE2"},
-    {71, "EV_NO_ANI"},
-    {1010, "EV_TIMER_EXPIRED10"},
-    {1020, "EV_DEBOUNCE_TIMER_EXPIRED"},
-    {1030, "EV_INTER_DIGIT_TIMER_EXPIRED"},
-    {100, "EV_INIT_CHANNEL"},
-    {101, "EV_BUSY_TONE_STOPPED"},
-    {102, "EV_FAST_BUSY_TONE_STOPPED"},
-    {103, "EV_TO_USER"},
-    {104, "SEND_FIRST_DIGIT"},
-    {110, "EV_CLOSE_CHANNEL"},
-    {111, "EV_OPEN_CHANNEL"},
-    {112, "EV_FAIL_DIAL"},
-    {113, "EV_FAIL_SEND_CAS"},
-    {114, "EV_ALARM"},
-    {ACTRACE_CAS_EV_DTMF, "EV_DTMF"},
-    {0, NULL}
+       {0, "FUNCTION0"},
+       {1, "FUNCTION1"},
+       {2, "FUNCTION2"},
+       {3, "FUNCTION3"},
+       {4, "EV_PLACE_CALL"},
+       {5, "EV_TIMER_EXPIRED1"},
+       {6, "EV_TIMER_EXPIRED2"},
+       {7, "EV_TIMER_EXPIRED3"},
+       {8, "EV_TIMER_EXPIRED4"},
+       {9, "EV_TIMER_EXPIRED5"},
+       {10, "EV_TIMER_EXPIRED6"},
+       {11, "EV_TIMER_EXPIRED7"},
+       {12, "EV_TIMER_EXPIRED8"},
+       {13, "EV_ANSWER"},
+       {14, "EV_DIAL_TONE_DETECTED"},
+       {15, "EV_DIAL_ENDED"},
+       {16, "EV_DISCONNECT"},
+       {ACTRACE_CAS_EV_11, "EV_CAS_1_1"},
+       {ACTRACE_CAS_EV_10, "EV_CAS_1_0"},
+       {ACTRACE_CAS_EV_01, "EV_CAS_0_1"},
+       {ACTRACE_CAS_EV_00, "EV_CAS_0_0"},
+       {21, "EV_RB_TONE_STARTED"},
+       {22, "EV_RB_TONE_STOPPED"},
+       {23, "EV_BUSY_TONE"},
+       {24, "EV_FAST_BUSY_TONE"},
+       {25, "EV_HELLO_DETECTED"},
+       {26, "EV_DIAL_TONE_STOPPED"},
+       {27, "EV_DISCONNECT_INCOMING"},
+       {28, "EV_RELEASE_CALL"},
+       {29, "EV_DIALED_NUM_DETECTED"},
+       {30, "EV_COUNTER1_EXPIRED"},
+       {31, "EV_COUNTER2_EXPIRED"},
+       {32, "EV_MFRn_1"},
+       {33, "EV_MFRn_2"},
+       {34, "EV_MFRn_3"},
+       {35, "EV_MFRn_4"},
+       {36, "EV_MFRn_5"},
+       {37, "EV_MFRn_6"},
+       {38, "EV_MFRn_7"},
+       {39, "EV_MFRn_8"},
+       {40, "EV_MFRn_9"},
+       {41, "EV_MFRn_10"},
+       {42, "EV_MFRn_11"},
+       {43, "EV_MFRn_12"},
+       {44, "EV_MFRn_13"},
+       {45, "EV_MFRn_14"},
+       {46, "EV_MFRn_15"},
+       {47, "EV_MFRn_1_STOPED"},
+       {48, "EV_MFRn_2_STOPED"},
+       {49, "EV_MFRn_3_STOPED"},
+       {50, "EV_MFRn_4_STOPED"},
+       {51, "EV_MFRn_5_STOPED"},
+       {52, "EV_MFRn_6_STOPED"},
+       {53, "EV_MFRn_7_STOPED"},
+       {54, "EV_MFRn_8_STOPED"},
+       {55, "EV_MFRn_9_STOPED"},
+       {56, "EV_MFRn_10_STOPED"},
+       {57, "EV_MFRn_11_STOPED"},
+       {58, "EV_MFRn_12_STOPED"},
+       {59, "EV_MFRn_13_STOPED"},
+       {60, "EV_MFRn_14_STOPED"},
+       {61, "EV_MFRn_15_STOPED"},
+       {62, "EV_ANI_NUM_DETECTED"},
+       {ACTRACE_CAS_EV_FIRST_DIGIT, "EV_FIRST_DIGIT"},
+       {64, "EV_END_OF_MF_DIGIT"},
+       {65, "EV_ACCEPT"},
+       {66, "EV_REJECT_BUSY"},
+       {67, "EV_REJECT_CONGESTION"},
+       {68, "EV_REJECT_UNALLOCATED"},
+       {69, "EV_REJECT_RESERVE1"},
+       {70, "EV_REJECT_RESERVE2"},
+       {71, "EV_NO_ANI"},
+       {1010, "EV_TIMER_EXPIRED10"},
+       {1020, "EV_DEBOUNCE_TIMER_EXPIRED"},
+       {1030, "EV_INTER_DIGIT_TIMER_EXPIRED"},
+       {100, "EV_INIT_CHANNEL"},
+       {101, "EV_BUSY_TONE_STOPPED"},
+       {102, "EV_FAST_BUSY_TONE_STOPPED"},
+       {103, "EV_TO_USER"},
+       {104, "SEND_FIRST_DIGIT"},
+       {110, "EV_CLOSE_CHANNEL"},
+       {111, "EV_OPEN_CHANNEL"},
+       {112, "EV_FAIL_DIAL"},
+       {113, "EV_FAIL_SEND_CAS"},
+       {114, "EV_ALARM"},
+       {ACTRACE_CAS_EV_DTMF, "EV_DTMF"},
+       {0, NULL}
 };
 
 #define SEND_CAS 2
@@ -222,56 +222,56 @@ static const value_string actrace_cas_event_vals[] = {
 #define SEND_DEST_NUM 4
 
 static const value_string actrace_cas_function_vals[] = {
-    {0, "NILL"},
-    {1, "SET_TIMER"},
-    {SEND_CAS, "SEND_CAS"},
-    {SEND_EVENT, "SEND_EVENT"},
-    {SEND_DEST_NUM, "SEND_DEST_NUM"},
-    {5, "DEL_TIMER"},
-    {6, "START_COLLECT"},
-    {7, "STOP_COLLECT"},
-    {SEND_MF, "SEND_MF"},
-    {9, "STOP_DIAL_MF"},
-    {10, "SET_COUNTER"},
-    {11, "DEC_COUNTER"},
-    {12, "SEND_PROG_TON"},
-    {CHANGE_COLLECT_TYPE, "CHANGE_COLLECT_TYPE"},
-    {14, "GENERATE_CAS_EV"},
-    {0, NULL}
+       {0, "NILL"},
+       {1, "SET_TIMER"},
+       {SEND_CAS, "SEND_CAS"},
+       {SEND_EVENT, "SEND_EVENT"},
+       {SEND_DEST_NUM, "SEND_DEST_NUM"},
+       {5, "DEL_TIMER"},
+       {6, "START_COLLECT"},
+       {7, "STOP_COLLECT"},
+       {SEND_MF, "SEND_MF"},
+       {9, "STOP_DIAL_MF"},
+       {10, "SET_COUNTER"},
+       {11, "DEC_COUNTER"},
+       {12, "SEND_PROG_TON"},
+       {CHANGE_COLLECT_TYPE, "CHANGE_COLLECT_TYPE"},
+       {14, "GENERATE_CAS_EV"},
+       {0, NULL}
 };
 
 static const value_string actrace_cas_pstn_event_vals[] = {
-    {64, "acEV_PSTN_INTERNAL_ERROR"},
-    {65, "acEV_PSTN_CALL_CONNECTED"},
-    {66, "acEV_PSTN_INCOMING_CALL_DETECTED"},
-    {67, "acEV_PSTN_CALL_DISCONNECTED"},
-    {68, "acEV_PSTN_CALL_RELEASED"},
-    {69, "acEV_PSTN_REMOTE_ALERTING"},
-    {70, "acEV_PSTN_STARTED"},
-    {71, "acEV_PSTN_WARNING"},
-    {72, "acEV_ISDN_PROGRESS_INDICATION"},
-    {73, "acEV_PSTN_PROCEEDING_INDICATION"},
-    {74, "acEV_PSTN_ALARM"},
-    {75, "acEV_RESERVED"},
-    {76, "acEV_PSTN_LINE_INFO"},
-    {77, "acEV_PSTN_LOOP_CONFIRM"},
-    {78, "acEV_PSTN_RESTART_CONFIRM"},
-    {84, "acEV_ISDN_SETUP_ACK_IN"},
-    {85, "acEV_PSTN_CALL_INFORMATION"},
-    {128, "acEV_CAS_SEIZURE_DETECTED"},
-    {129, "acEV_CAS_CHANNEL_BLOCKED"},
-    {130, "acEV_CAS_PROTOCOL_STARTED"},
-    {131, "acEV_PSTN_CALL_STATE_RESPONSE"},
-    {132, "acEV_CAS_SEIZURE_ACK"},
-    {0, NULL}
+       {64, "acEV_PSTN_INTERNAL_ERROR"},
+       {65, "acEV_PSTN_CALL_CONNECTED"},
+       {66, "acEV_PSTN_INCOMING_CALL_DETECTED"},
+       {67, "acEV_PSTN_CALL_DISCONNECTED"},
+       {68, "acEV_PSTN_CALL_RELEASED"},
+       {69, "acEV_PSTN_REMOTE_ALERTING"},
+       {70, "acEV_PSTN_STARTED"},
+       {71, "acEV_PSTN_WARNING"},
+       {72, "acEV_ISDN_PROGRESS_INDICATION"},
+       {73, "acEV_PSTN_PROCEEDING_INDICATION"},
+       {74, "acEV_PSTN_ALARM"},
+       {75, "acEV_RESERVED"},
+       {76, "acEV_PSTN_LINE_INFO"},
+       {77, "acEV_PSTN_LOOP_CONFIRM"},
+       {78, "acEV_PSTN_RESTART_CONFIRM"},
+       {84, "acEV_ISDN_SETUP_ACK_IN"},
+       {85, "acEV_PSTN_CALL_INFORMATION"},
+       {128, "acEV_CAS_SEIZURE_DETECTED"},
+       {129, "acEV_CAS_CHANNEL_BLOCKED"},
+       {130, "acEV_CAS_PROTOCOL_STARTED"},
+       {131, "acEV_PSTN_CALL_STATE_RESPONSE"},
+       {132, "acEV_CAS_SEIZURE_ACK"},
+       {0, NULL}
 };
 
 static const value_string actrace_cas_collect_type_vals[] = {
-    {0, "COLLECT_TYPE_ADDRESS"},
-    {1, "COLLECT_TYPE_ANI"},
-    {2, "COLLECT_TYPE_SOURCE_CATEGORY"},
-    {3, "COLLECT_TYPE_LINE_CATEGORY"},
-    {0, NULL}
+       {0, "COLLECT_TYPE_ADDRESS"},
+       {1, "COLLECT_TYPE_ANI"},
+       {2, "COLLECT_TYPE_SOURCE_CATEGORY"},
+       {3, "COLLECT_TYPE_LINE_CATEGORY"},
+       {0, NULL}
 };
 
 #define SEND_TYPE_ADDRESS 1
@@ -282,126 +282,126 @@ static const value_string actrace_cas_collect_type_vals[] = {
 #define SEND_TYPE_TRANSFER_CAPABILITY 6
 
 static const value_string actrace_cas_send_type_vals[] = {
-    {SEND_TYPE_ADDRESS, "ADDRESS"},
-    {SEND_TYPE_SPECIFIC, "SPECIFIC"},
-    {SEND_TYPE_INTER_EXCHANGE_SWITCH, "INTER_EXCHANGE_SWITCH"},
-    {SEND_TYPE_ANI, "ANI"},
-    {SEND_TYPE_SOURCE_CATEGORY, "SOURCE_CATEGORY"},
-    {SEND_TYPE_TRANSFER_CAPABILITY, "TRANSFER_CAPABILITY"},
-    {0, NULL}
+       {SEND_TYPE_ADDRESS, "ADDRESS"},
+       {SEND_TYPE_SPECIFIC, "SPECIFIC"},
+       {SEND_TYPE_INTER_EXCHANGE_SWITCH, "INTER_EXCHANGE_SWITCH"},
+       {SEND_TYPE_ANI, "ANI"},
+       {SEND_TYPE_SOURCE_CATEGORY, "SOURCE_CATEGORY"},
+       {SEND_TYPE_TRANSFER_CAPABILITY, "TRANSFER_CAPABILITY"},
+       {0, NULL}
 };
 
 static const value_string actrace_cas_cause_vals[] = {
-    {1, "UNASSIGNED_NUMBER"},
-    {2, "NO_ROUTE_TO_TRANSIT_NET"},
-    {3, "NO_ROUTE_TO_DESTINATION"},
-    {6, "CHANNEL_UNACCEPTABLE"},
-    {7, "CALL_AWARDED_AND"},
-    {8, "PREEMPTION"},
-    {16, "NORMAL_CALL_CLEAR"},
-    {17, "USER_BUSY"},
-    {18, "NO_USER_RESPONDING"},
-    {19, "NO_ANSWER_FROM_USER_ALERTED"},
-    {20, "ACCEPT_DONE"},
-    {21, "CALL_REJECTED"},
-    {22, "NUMBER_CHANGED"},
-    {26, "NON_SELECTED_USER_CLEARING"},
-    {27, "DEST_OUT_OF_ORDER"},
-    {28, "INVALID_NUMBER_FORMAT"},
-    {29, "FACILITY_REJECT"},
-    {30, "RESPONSE_TO_STATUS_ENQUIRY"},
-    {31, "NORMAL_UNSPECIFIED"},
-    {32, "CIRCUIT_CONGESTION"},
-    {33, "USER_CONGESTION"},
-    {34, "NO_CIRCUIT_AVAILABLE"},
-    {38, "NETWORK_OUT_OF_ORDER"},
-    {41, "NETWORK_TEMPORARY_FAILURE"},
-    {42, "NETWORK_CONGESTION"},
-    {43, "ACCESS_INFORMATION_DISCARDED"},
-    {44, "REQUESTED_CIRCUIT_NOT_AVAILABLE"},
-    {47, "RESOURCE_UNAVAILABLE_UNSPECIFIED"},
-    {39, "PERM_FR_MODE_CONN_OUT_OF_S"},
-    {40, "PERM_FR_MODE_CONN_OPERATIONAL"},
-    {46, "PRECEDENCE_CALL_BLOCKED"},
-    {49, "QUALITY_OF_SERVICE_UNAVAILABLE"},
-    {50, "REQUESTED_FAC_NOT_SUBSCRIBED"},
-    {57, "BC_NOT_AUTHORIZED"},
-    {58, "BC_NOT_PRESENTLY_AVAILABLE"},
-    {63, "SERVICE_NOT_AVAILABLE"},
-    {53, "CUG_OUT_CALLS_BARRED"},
-    {55, "CUG_INC_CALLS_BARRED"},
-    {62, "ACCES_INFO_SUBS_CLASS_INCONS"},
-    {65, "BC_NOT_IMPLEMENTED"},
-    {66, "CHANNEL_TYPE_NOT_IMPLEMENTED"},
-    {69, "REQUESTED_FAC_NOT_IMPLEMENTED"},
-    {70, "ONLY_RESTRICTED_INFO_BEARER"},
-    {79, "SERVICE_NOT_IMPLEMENTED_UNSPECIFIED"},
-    {81, "INVALID_CALL_REF"},
-    {82, "IDENTIFIED_CHANNEL_NOT_EXIST"},
-    {83, "SUSPENDED_CALL_BUT_CALL_ID_NOT_EXIST"},
-    {84, "CALL_ID_IN_USE"},
-    {85, "NO_CALL_SUSPENDED"},
-    {86, "CALL_HAVING_CALL_ID_CLEARED"},
-    {88, "INCOMPATIBLE_DESTINATION"},
-    {91, "INVALID_TRANSIT_NETWORK_SELECTION"},
-    {95, "INVALID_MESSAGE_UNSPECIFIED"},
-    {87, "NOT_CUG_MEMBER"},
-    {90, "CUG_NON_EXISTENT"},
-    {96, "MANDATORY_IE_MISSING"},
-    {97, "MESSAGE_TYPE_NON_EXISTENT"},
-    {98, "MESSAGE_STATE_INCONSISTENCY"},
-    {99, "NON_EXISTENT_IE"},
-    {100, "INVALID_IE_CONTENT"},
-    {101, "MESSAGE_NOT_COMPATIBLE"},
-    {102, "RECOVERY_ON_TIMER_EXPIRY"},
-    {111, "PROTOCOL_ERROR_UNSPECIFIED"},
-    {127, "INTERWORKING_UNSPECIFIED"},
-    {128, "ACU_CAUSE_ACU_BAD_ADDRESS"},
-    {129, "ACU_CAUSE_ACU_BAD_SERVICE"},
-    {130, "ACU_CAUSE_ACU_COLLISION"},
-    {131, "ACU_CAUSE_ACU_FAC_REJECTED"},
-    {255, "ACU_NETWORK_CAUSE_NIL"},
-    {200, "C_ALREADY_BLOCKED"},
-    {201, "C_CHANNEL_BLOCKED"},
-    {202, "C_BLOCKING_DONE"},
-    {203, "C_ALREADY_UNBLOCKED"},
-    {204, "C_UNBLOCKING_DONE"},
-    {260, "CLRN_MFRn_A4"},
-    {261, "CLRN_MFRn_B1"},
-    {262, "CLRN_MFRn_B2"},
-    {263, "CLRN_MFRn_B3"},
-    {264, "CLRN_MFRn_B4"},
-    {265, "CLRN_MFRn_B5"},
-    {266, "CLRN_MFRn_B6"},
-    {267, "CLRN_MFRn_B7"},
-    {268, "CLRN_MFRn_B8"},
-    {269, "CLRN_MFRn_B9"},
-    {270, "CLRN_MFRn_B10"},
-    {271, "CLRN_MFRn_B11"},
-    {272, "CLRN_MFRn_B12"},
-    {273, "CLRN_MFRn_B13"},
-    {274, "CLRN_MFRn_B14"},
-    {275, "CLRN_MFRn_B15"},
-    {300, "ACURC_BUSY"},
-    {301, "ACURC_NOPROCEED"},
-    {302, "ACURC_NOANSWER"},
-    {303, "ACURC_NOAUTOANSWER"},
-    {304, "ACURC_CONGESTED"},
-    {305, "ACURC_INCOMING"},
-    {306, "ACURC_NOLINE"},
-    {307, "ACURC_ERRNUM"},
-    {308, "ACURC_INHNUM"},
-    {309, "ACURC_2MNUM"},
-    {310, "ACURC_HUNGUP"},
-    {311, "ACURC_NETWORK_ERROR"},
-    {312, "ACURC_TIMEOUT"},
-    {313, "ACURC_BAD_SERVICE"},
-    {314, "ACURC_INTERNAL"},
-    {315, "ACURC_OK"},
-    {316, "ACURC_BL_TIMEOUT"},
-    {317, "ACURC_IN_CALL"},
-    {318, "ACURC_CLEAR_RQ"},
-    {0, NULL}
+       {1, "UNASSIGNED_NUMBER"},
+       {2, "NO_ROUTE_TO_TRANSIT_NET"},
+       {3, "NO_ROUTE_TO_DESTINATION"},
+       {6, "CHANNEL_UNACCEPTABLE"},
+       {7, "CALL_AWARDED_AND"},
+       {8, "PREEMPTION"},
+       {16, "NORMAL_CALL_CLEAR"},
+       {17, "USER_BUSY"},
+       {18, "NO_USER_RESPONDING"},
+       {19, "NO_ANSWER_FROM_USER_ALERTED"},
+       {20, "ACCEPT_DONE"},
+       {21, "CALL_REJECTED"},
+       {22, "NUMBER_CHANGED"},
+       {26, "NON_SELECTED_USER_CLEARING"},
+       {27, "DEST_OUT_OF_ORDER"},
+       {28, "INVALID_NUMBER_FORMAT"},
+       {29, "FACILITY_REJECT"},
+       {30, "RESPONSE_TO_STATUS_ENQUIRY"},
+       {31, "NORMAL_UNSPECIFIED"},
+       {32, "CIRCUIT_CONGESTION"},
+       {33, "USER_CONGESTION"},
+       {34, "NO_CIRCUIT_AVAILABLE"},
+       {38, "NETWORK_OUT_OF_ORDER"},
+       {41, "NETWORK_TEMPORARY_FAILURE"},
+       {42, "NETWORK_CONGESTION"},
+       {43, "ACCESS_INFORMATION_DISCARDED"},
+       {44, "REQUESTED_CIRCUIT_NOT_AVAILABLE"},
+       {47, "RESOURCE_UNAVAILABLE_UNSPECIFIED"},
+       {39, "PERM_FR_MODE_CONN_OUT_OF_S"},
+       {40, "PERM_FR_MODE_CONN_OPERATIONAL"},
+       {46, "PRECEDENCE_CALL_BLOCKED"},
+       {49, "QUALITY_OF_SERVICE_UNAVAILABLE"},
+       {50, "REQUESTED_FAC_NOT_SUBSCRIBED"},
+       {57, "BC_NOT_AUTHORIZED"},
+       {58, "BC_NOT_PRESENTLY_AVAILABLE"},
+       {63, "SERVICE_NOT_AVAILABLE"},
+       {53, "CUG_OUT_CALLS_BARRED"},
+       {55, "CUG_INC_CALLS_BARRED"},
+       {62, "ACCES_INFO_SUBS_CLASS_INCONS"},
+       {65, "BC_NOT_IMPLEMENTED"},
+       {66, "CHANNEL_TYPE_NOT_IMPLEMENTED"},
+       {69, "REQUESTED_FAC_NOT_IMPLEMENTED"},
+       {70, "ONLY_RESTRICTED_INFO_BEARER"},
+       {79, "SERVICE_NOT_IMPLEMENTED_UNSPECIFIED"},
+       {81, "INVALID_CALL_REF"},
+       {82, "IDENTIFIED_CHANNEL_NOT_EXIST"},
+       {83, "SUSPENDED_CALL_BUT_CALL_ID_NOT_EXIST"},
+       {84, "CALL_ID_IN_USE"},
+       {85, "NO_CALL_SUSPENDED"},
+       {86, "CALL_HAVING_CALL_ID_CLEARED"},
+       {88, "INCOMPATIBLE_DESTINATION"},
+       {91, "INVALID_TRANSIT_NETWORK_SELECTION"},
+       {95, "INVALID_MESSAGE_UNSPECIFIED"},
+       {87, "NOT_CUG_MEMBER"},
+       {90, "CUG_NON_EXISTENT"},
+       {96, "MANDATORY_IE_MISSING"},
+       {97, "MESSAGE_TYPE_NON_EXISTENT"},
+       {98, "MESSAGE_STATE_INCONSISTENCY"},
+       {99, "NON_EXISTENT_IE"},
+       {100, "INVALID_IE_CONTENT"},
+       {101, "MESSAGE_NOT_COMPATIBLE"},
+       {102, "RECOVERY_ON_TIMER_EXPIRY"},
+       {111, "PROTOCOL_ERROR_UNSPECIFIED"},
+       {127, "INTERWORKING_UNSPECIFIED"},
+       {128, "ACU_CAUSE_ACU_BAD_ADDRESS"},
+       {129, "ACU_CAUSE_ACU_BAD_SERVICE"},
+       {130, "ACU_CAUSE_ACU_COLLISION"},
+       {131, "ACU_CAUSE_ACU_FAC_REJECTED"},
+       {255, "ACU_NETWORK_CAUSE_NIL"},
+       {200, "C_ALREADY_BLOCKED"},
+       {201, "C_CHANNEL_BLOCKED"},
+       {202, "C_BLOCKING_DONE"},
+       {203, "C_ALREADY_UNBLOCKED"},
+       {204, "C_UNBLOCKING_DONE"},
+       {260, "CLRN_MFRn_A4"},
+       {261, "CLRN_MFRn_B1"},
+       {262, "CLRN_MFRn_B2"},
+       {263, "CLRN_MFRn_B3"},
+       {264, "CLRN_MFRn_B4"},
+       {265, "CLRN_MFRn_B5"},
+       {266, "CLRN_MFRn_B6"},
+       {267, "CLRN_MFRn_B7"},
+       {268, "CLRN_MFRn_B8"},
+       {269, "CLRN_MFRn_B9"},
+       {270, "CLRN_MFRn_B10"},
+       {271, "CLRN_MFRn_B11"},
+       {272, "CLRN_MFRn_B12"},
+       {273, "CLRN_MFRn_B13"},
+       {274, "CLRN_MFRn_B14"},
+       {275, "CLRN_MFRn_B15"},
+       {300, "ACURC_BUSY"},
+       {301, "ACURC_NOPROCEED"},
+       {302, "ACURC_NOANSWER"},
+       {303, "ACURC_NOAUTOANSWER"},
+       {304, "ACURC_CONGESTED"},
+       {305, "ACURC_INCOMING"},
+       {306, "ACURC_NOLINE"},
+       {307, "ACURC_ERRNUM"},
+       {308, "ACURC_INHNUM"},
+       {309, "ACURC_2MNUM"},
+       {310, "ACURC_HUNGUP"},
+       {311, "ACURC_NETWORK_ERROR"},
+       {312, "ACURC_TIMEOUT"},
+       {313, "ACURC_BAD_SERVICE"},
+       {314, "ACURC_INTERNAL"},
+       {315, "ACURC_OK"},
+       {316, "ACURC_BL_TIMEOUT"},
+       {317, "ACURC_IN_CALL"},
+       {318, "ACURC_CLEAR_RQ"},
+       {0, NULL}
 };
 
 /* ISDN */
@@ -409,9 +409,9 @@ static const value_string actrace_cas_cause_vals[] = {
 #define BLADE_TO_PSTN  0x49644443
 
 static const value_string actrace_isdn_direction_vals[] = {
-    {PSTN_TO_BLADE, "Blade <-- PSTN"},
-    {BLADE_TO_PSTN, "Blade --> PSTN"},
-    {0, NULL}
+       {PSTN_TO_BLADE, "Blade <-- PSTN"},
+       {BLADE_TO_PSTN, "Blade --> PSTN"},
+       {0, NULL}
 };
 
 /*
@@ -439,7 +439,7 @@ static int is_actrace(tvbuff_t *tvb, gint offset);
  */
 static void dissect_actrace_cas(tvbuff_t *tvb, packet_info *pinfo, proto_tree *actrace_tree);
 static void dissect_actrace_isdn(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
-                                 proto_tree *actrace_tree);
+                                proto_tree *actrace_tree);
 
 /************************************************************************
  * dissect_actrace - The dissector for the AudioCodes Trace prtocol
@@ -526,7 +526,7 @@ static void dissect_actrace_cas(tvbuff_t *tvb, packet_info *pinfo, proto_tree *a
        proto_tree_add_int(actrace_tree, hf_actrace_cas_function, tvb, offset, 4, function);
        offset += 4;
 
-       col_append_fstr(pinfo->cinfo, COL_INFO, "%s|%d|%s|%d|%s|", 
+       col_append_fstr(pinfo->cinfo, COL_INFO, "%s|%d|%s|%d|%s|",
                        val_to_str(source, actrace_cas_source_vals_short, "ukn"),
                        curr_state,
                        val_to_str(event, actrace_cas_event_vals, "%d"),
@@ -538,24 +538,24 @@ static void dissect_actrace_cas(tvbuff_t *tvb, packet_info *pinfo, proto_tree *a
        {
                case SEND_EVENT:
                        proto_tree_add_text(actrace_tree, tvb, offset, 4,
-                               "Parameter 0: %s", val_to_str(par0, 
+                               "Parameter 0: %s", val_to_str(par0,
                                actrace_cas_pstn_event_vals, "Unknown (%d)"));
-                       col_append_fstr(pinfo->cinfo, COL_INFO, "%s|", 
+                       col_append_fstr(pinfo->cinfo, COL_INFO, "%s|",
                                        val_to_str(par0, actrace_cas_pstn_event_vals, "%d"));
                        break;
                case CHANGE_COLLECT_TYPE:
                        proto_tree_add_text(actrace_tree, tvb, offset, 4,
-                               "Parameter 0: %s", val_to_str(par0, 
+                               "Parameter 0: %s", val_to_str(par0,
                                actrace_cas_collect_type_vals, "Unknown (%d)"));
-                       col_append_fstr(pinfo->cinfo, COL_INFO, "%s|", 
+                       col_append_fstr(pinfo->cinfo, COL_INFO, "%s|",
                                        val_to_str(par0, actrace_cas_collect_type_vals, "%d"));
                        break;
                case SEND_MF:
                case SEND_DEST_NUM:
                        proto_tree_add_text(actrace_tree, tvb, offset, 4,
-                               "Parameter 0: %s", val_to_str(par0, 
+                               "Parameter 0: %s", val_to_str(par0,
                                actrace_cas_send_type_vals, "Unknown (%d)"));
-                       col_append_fstr(pinfo->cinfo, COL_INFO, "%s|", 
+                       col_append_fstr(pinfo->cinfo, COL_INFO, "%s|",
                                        val_to_str(par0, actrace_cas_send_type_vals, "%d"));
                        break;
                default:
@@ -568,7 +568,7 @@ static void dissect_actrace_cas(tvbuff_t *tvb, packet_info *pinfo, proto_tree *a
        if (function == SEND_EVENT) {
                proto_tree_add_text(actrace_tree, tvb, offset, 4,
                        "Parameter 1: %s", val_to_str(par1, actrace_cas_cause_vals, "Unknown (%d)"));
-               col_append_fstr(pinfo->cinfo, COL_INFO, "%s|", 
+               col_append_fstr(pinfo->cinfo, COL_INFO, "%s|",
                                val_to_str(par1, actrace_cas_cause_vals, "%d"));
        } else {
                proto_tree_add_int(actrace_tree, hf_actrace_cas_par1, tvb, offset, 4, par1);
@@ -628,7 +628,7 @@ static void dissect_actrace_cas(tvbuff_t *tvb, packet_info *pinfo, proto_tree *a
                                frame_label = ep_strdup("DTMF/MF: sending DNIS");
                        } else if (par0 == SEND_TYPE_ANI ) {
                                frame_label = ep_strdup("DTMF/MF: sending ANI");
-                       } 
+                       }
                }
        }
 
@@ -648,7 +648,7 @@ static void dissect_actrace_cas(tvbuff_t *tvb, packet_info *pinfo, proto_tree *a
 
 /* Dissect an individual actrace ISDN message */
 static void dissect_actrace_isdn(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
-                                 proto_tree *actrace_tree)
+                                proto_tree *actrace_tree)
 {
        /* Declare variables */
        gint len;
@@ -668,7 +668,7 @@ static void dissect_actrace_isdn(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
        offset = 44;
        proto_tree_add_int(actrace_tree, hf_actrace_isdn_length, tvb, offset, 2, len);
 
-       
+
        /* if it is a q931 packet (we don't want LAPD packets for Voip Graph) add tap info */
        if (len > 4) {
                /* Initialise packet info for passing to tap */
@@ -694,7 +694,7 @@ static void dissect_actrace_isdn(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
 
 /*
  * is_actrace - A function for determining whether there is a
- *              AudioCodes packet at offset in tvb. The packet could be 
+ *              AudioCodes packet at offset in tvb. The packet could be
  *                             a CAS, ISDN or other Trunk protocol. Here we are only
  *                             trying to decode CAS or ISDN protocols
  *
@@ -712,14 +712,14 @@ static int is_actrace(tvbuff_t *tvb, gint offset)
        gint32 source, isdn_header;
 
        tvb_len = tvb_reported_length(tvb);
-       
-       /* is a CAS packet? 
-        * the CAS messages are 48 byte fixed and the source should be 0,1 or 2 (DSP, User or Table) 
+
+       /* is a CAS packet?
+        * the CAS messages are 48 byte fixed and the source should be 0,1 or 2 (DSP, User or Table)
         */
        source = tvb_get_ntohl(tvb, offset+4);
        if ( (tvb_len == 48) && ((source > -1) && (source <3)) )
                return ACTRACE_CAS;
-       /* is ISDN packet? 
+       /* is ISDN packet?
         * the ISDN packets have 0x49446463 for packets from PSTN to the Blade and
         * 0x49644443 for packets from the Blade to the PSTN at offset 4
         */
@@ -732,82 +732,82 @@ static int is_actrace(tvbuff_t *tvb, gint offset)
 /* Register all the bits needed with the filtering engine */
 void proto_register_actrace(void)
 {
-    static hf_register_info hf[] =
-    {
-               /* CAS */
-               { &hf_actrace_cas_time,
-                       { "Time", "actrace.cas.time", FT_INT32, BASE_DEC, NULL, 0x0,
-              "Capture Time", HFILL }},
-               { &hf_actrace_cas_source,
-                       { "Source", "actrace.cas.source", FT_INT32, BASE_DEC, VALS(actrace_cas_source_vals), 0x0,
-              NULL, HFILL }},
-               { &hf_actrace_cas_current_state,
-                       { "Current State", "actrace.cas.curr_state", FT_INT32, BASE_DEC, NULL, 0x0,
-              NULL, HFILL }},
-               { &hf_actrace_cas_event,
-                       { "Event", "actrace.cas.event", FT_INT32, BASE_DEC, VALS(actrace_cas_event_vals), 0x0,
-              "New Event", HFILL }},
-               { &hf_actrace_cas_next_state,
-                       { "Next State", "actrace.cas.next_state", FT_INT32, BASE_DEC, NULL, 0x0,
-              NULL, HFILL }},
-               { &hf_actrace_cas_function,
-                       { "Function", "actrace.cas.function", FT_INT32, BASE_DEC, VALS(actrace_cas_function_vals), 0x0,
-              NULL, HFILL }},
-               { &hf_actrace_cas_par0,
-                       { "Parameter 0", "actrace.cas.par0", FT_INT32, BASE_DEC, NULL, 0x0,
-              NULL, HFILL }},
-               { &hf_actrace_cas_par1,
-                       { "Parameter 1", "actrace.cas.par1", FT_INT32, BASE_DEC, NULL, 0x0,
-              NULL, HFILL }},
-               { &hf_actrace_cas_par2,
-                       { "Parameter 2", "actrace.cas.par2", FT_INT32, BASE_DEC, NULL, 0x0,
-              NULL, HFILL }},
-               { &hf_actrace_cas_trunk,
-                       { "Trunk Number", "actrace.cas.trunk", FT_INT32, BASE_DEC, NULL, 0x0,
-              NULL, HFILL }},
-               { &hf_actrace_cas_bchannel,
-                       { "BChannel", "actrace.cas.bchannel", FT_INT32, BASE_DEC, NULL, 0x0,
-              NULL, HFILL }},
-               { &hf_actrace_cas_connection_id,
-                       { "Connection ID", "actrace.cas.conn_id", FT_INT32, BASE_DEC, NULL, 0x0,
-              NULL, HFILL }},
-
-               /* ISDN */
-               { &hf_actrace_isdn_trunk,
-                       { "Trunk Number", "actrace.isdn.trunk", FT_INT16, BASE_DEC, NULL, 0x0,
-              NULL, HFILL }},
-               { &hf_actrace_isdn_direction,
-                       { "Direction", "actrace.isdn.dir", FT_INT32, BASE_DEC, VALS(actrace_isdn_direction_vals), 0x0,
-              NULL, HFILL }},
-               { &hf_actrace_isdn_length,
-                       { "Length", "actrace.isdn.length", FT_INT16, BASE_DEC, NULL, 0x0,
-              NULL, HFILL }},  
-    };
-
-    static gint *ett[] =
-    {
-        &ett_actrace,
-    };
-
-    module_t *actrace_module;
-
-    /* Register protocol */
-    proto_actrace = proto_register_protocol("AudioCodes Trunk Trace", "ACtrace", "actrace");
-    proto_register_field_array(proto_actrace, hf, array_length(hf));
-    proto_register_subtree_array(ett, array_length(ett));
-
-    /* Register our configuration options */
-    actrace_module = prefs_register_protocol(proto_actrace, proto_reg_handoff_actrace);
-
-    prefs_register_uint_preference(actrace_module, "udp_port",
-                                   "AudioCodes Trunk Trace UDP port",
-                                   "Set the UDP port for AudioCodes Trunk Traces."
-                                   "Use http://x.x.x.x/TrunkTraces to enable the traces in the Blade",
-                                   10, &global_actrace_udp_port);
-
-    prefs_register_obsolete_preference(actrace_module, "display_dissect_tree");
-
-    actrace_tap = register_tap("actrace");
+       static hf_register_info hf[] =
+               {
+                       /* CAS */
+                       { &hf_actrace_cas_time,
+                         { "Time", "actrace.cas.time", FT_INT32, BASE_DEC, NULL, 0x0,
+                           "Capture Time", HFILL }},
+                       { &hf_actrace_cas_source,
+                         { "Source", "actrace.cas.source", FT_INT32, BASE_DEC, VALS(actrace_cas_source_vals), 0x0,
+                           NULL, HFILL }},
+                       { &hf_actrace_cas_current_state,
+                         { "Current State", "actrace.cas.curr_state", FT_INT32, BASE_DEC, NULL, 0x0,
+                           NULL, HFILL }},
+                       { &hf_actrace_cas_event,
+                         { "Event", "actrace.cas.event", FT_INT32, BASE_DEC, VALS(actrace_cas_event_vals), 0x0,
+                           "New Event", HFILL }},
+                       { &hf_actrace_cas_next_state,
+                         { "Next State", "actrace.cas.next_state", FT_INT32, BASE_DEC, NULL, 0x0,
+                           NULL, HFILL }},
+                       { &hf_actrace_cas_function,
+                         { "Function", "actrace.cas.function", FT_INT32, BASE_DEC, VALS(actrace_cas_function_vals), 0x0,
+                           NULL, HFILL }},
+                       { &hf_actrace_cas_par0,
+                         { "Parameter 0", "actrace.cas.par0", FT_INT32, BASE_DEC, NULL, 0x0,
+                           NULL, HFILL }},
+                       { &hf_actrace_cas_par1,
+                         { "Parameter 1", "actrace.cas.par1", FT_INT32, BASE_DEC, NULL, 0x0,
+                           NULL, HFILL }},
+                       { &hf_actrace_cas_par2,
+                         { "Parameter 2", "actrace.cas.par2", FT_INT32, BASE_DEC, NULL, 0x0,
+                           NULL, HFILL }},
+                       { &hf_actrace_cas_trunk,
+                         { "Trunk Number", "actrace.cas.trunk", FT_INT32, BASE_DEC, NULL, 0x0,
+                           NULL, HFILL }},
+                       { &hf_actrace_cas_bchannel,
+                         { "BChannel", "actrace.cas.bchannel", FT_INT32, BASE_DEC, NULL, 0x0,
+                           NULL, HFILL }},
+                       { &hf_actrace_cas_connection_id,
+                         { "Connection ID", "actrace.cas.conn_id", FT_INT32, BASE_DEC, NULL, 0x0,
+                           NULL, HFILL }},
+
+                       /* ISDN */
+                       { &hf_actrace_isdn_trunk,
+                         { "Trunk Number", "actrace.isdn.trunk", FT_INT16, BASE_DEC, NULL, 0x0,
+                           NULL, HFILL }},
+                       { &hf_actrace_isdn_direction,
+                         { "Direction", "actrace.isdn.dir", FT_INT32, BASE_DEC, VALS(actrace_isdn_direction_vals), 0x0,
+                           NULL, HFILL }},
+                       { &hf_actrace_isdn_length,
+                         { "Length", "actrace.isdn.length", FT_INT16, BASE_DEC, NULL, 0x0,
+                           NULL, HFILL }},
+               };
+
+       static gint *ett[] =
+               {
+                       &ett_actrace,
+               };
+
+       module_t *actrace_module;
+
+       /* Register protocol */
+       proto_actrace = proto_register_protocol("AudioCodes Trunk Trace", "ACtrace", "actrace");
+       proto_register_field_array(proto_actrace, hf, array_length(hf));
+       proto_register_subtree_array(ett, array_length(ett));
+
+       /* Register our configuration options */
+       actrace_module = prefs_register_protocol(proto_actrace, proto_reg_handoff_actrace);
+
+       prefs_register_uint_preference(actrace_module, "udp_port",
+                                      "AudioCodes Trunk Trace UDP port",
+                                      "Set the UDP port for AudioCodes Trunk Traces."
+                                      "Use http://x.x.x.x/TrunkTraces to enable the traces in the Blade",
+                                      10, &global_actrace_udp_port);
+
+       prefs_register_obsolete_preference(actrace_module, "display_dissect_tree");
+
+       actrace_tap = register_tap("actrace");
 }
 
 /* The registration hand-off routine */
index 8ca5090f584b95f90bb9f387cb2e346b125f32a8..a311f226ed5c0893ef41b1dbbf90915357bf20d5 100644 (file)
@@ -1362,18 +1362,18 @@ static void dissect_backup_request(tvbuff_t *tvb, struct rxinfo *rxinfo,
 static gint
 afs_equal(gconstpointer v, gconstpointer w)
 {
-  const struct afs_request_key *v1 = (const struct afs_request_key *)v;
-  const struct afs_request_key *v2 = (const struct afs_request_key *)w;
+       const struct afs_request_key *v1 = (const struct afs_request_key *)v;
+       const struct afs_request_key *v2 = (const struct afs_request_key *)w;
 
-  if (v1 -> conversation == v2 -> conversation &&
-      v1 -> epoch == v2 -> epoch &&
-      v1 -> cid == v2 -> cid &&
-      v1 -> callnumber == v2 -> callnumber ) {
+       if (v1 -> conversation == v2 -> conversation &&
+           v1 -> epoch == v2 -> epoch &&
+           v1 -> cid == v2 -> cid &&
+           v1 -> callnumber == v2 -> callnumber ) {
 
-    return 1;
-  }
+               return 1;
+       }
 
-  return 0;
+       return 0;
 }
 
 static guint
index a3e330914faf767430463fc0d9ec947a57930944..b41a08ca38fc4dd8fddd8723f8c535ac529c78ee 100644 (file)
@@ -128,25 +128,25 @@ static gint ett_remcap = -1;
 
 
 static const value_string type_values [] = {
-       { AGENTX_OPEN_PDU,              "Open-PDU" },
-        { AGENTX_CLOSE_PDU,            "Close-PDU" },
-        { AGENTX_REGISTER_PDU,                 "Register-PDU" },
-        { AGENTX_UNREGISTER_PDU,       "Unregister-PDU" },
-        { AGENTX_GET_PDU,              "Get-PDU" },
-        { AGENTX_GETNEXT_PDU,          "GetNext-PDU" },
-        { AGENTX_GETBULK_PDU,          "GetBulk-PDU" },
-        { AGENTX_TESTSET_PDU,          "TestSet-PDU" },
-        { AGENTX_COMMITSET_PDU,        "CommitSet-PDU" },
-        { AGENTX_UNDOSET_PDU,          "UndoSet-PDU" },
-        { AGENTX_CLEANUPSET_PDU,       "CleanupSet-PDU" },
-        { AGENTX_NOTIFY_PDU,           "Notify-PDU" },
-        { AGENTX_PING_PDU,             "Ping-PDU" },
-        { AGENTX_INDEX_ALLOC_PDU,      "IndexAllocate-PDU" },
-        { AGENTX_INDEX_DEALLOC_PDU,    "IndexDeallocate-PDU" },
-        { AGENTX_ADD_AGENT_CAPS_PDU,   "AddAgentCaps-PDU" },
-        { AGENTX_REM_AGENT_CAPS_PDU,   "RemoveAgentCaps-PDU" },
-        { AGENTX_RESPONSE_PDU,                 "Response-PDU" },
-        { 0, NULL }
+       { AGENTX_OPEN_PDU,              "Open-PDU" },
+       { AGENTX_CLOSE_PDU,             "Close-PDU" },
+       { AGENTX_REGISTER_PDU,          "Register-PDU" },
+       { AGENTX_UNREGISTER_PDU,        "Unregister-PDU" },
+       { AGENTX_GET_PDU,               "Get-PDU" },
+       { AGENTX_GETNEXT_PDU,           "GetNext-PDU" },
+       { AGENTX_GETBULK_PDU,           "GetBulk-PDU" },
+       { AGENTX_TESTSET_PDU,           "TestSet-PDU" },
+       { AGENTX_COMMITSET_PDU,         "CommitSet-PDU" },
+       { AGENTX_UNDOSET_PDU,           "UndoSet-PDU" },
+       { AGENTX_CLEANUPSET_PDU,        "CleanupSet-PDU" },
+       { AGENTX_NOTIFY_PDU,            "Notify-PDU" },
+       { AGENTX_PING_PDU,              "Ping-PDU" },
+       { AGENTX_INDEX_ALLOC_PDU,       "IndexAllocate-PDU" },
+       { AGENTX_INDEX_DEALLOC_PDU,     "IndexDeallocate-PDU" },
+       { AGENTX_ADD_AGENT_CAPS_PDU,    "AddAgentCaps-PDU" },
+       { AGENTX_REM_AGENT_CAPS_PDU,    "RemoveAgentCaps-PDU" },
+       { AGENTX_RESPONSE_PDU,          "Response-PDU" },
+       { 0, NULL }
 };
 
 
@@ -420,32 +420,32 @@ static int dissect_varbind(tvbuff_t *tvb, proto_tree *tree, int offset, int len,
 
        switch(vtag)
        {
-               case  VB_OID:
+               case  VB_OID:
                        tlen += dissect_object_id(tvb, subtree, offset + tlen + 4, flags);
-               break;
+                       break;
 
-               case  VB_OPAQUE:
-               case  VB_OSTR:
-               case  VB_IPADDR:
+               case  VB_OPAQUE:
+               case  VB_OSTR:
+               case  VB_IPADDR:
                        tlen += dissect_octet_string(tvb, subtree,offset + tlen + 4,flags);
-               break;
+                       break;
 
-               case  VB_TIMETICK:
-               case  VB_COUNTER32:
-               case  VB_INT:
-               case  VB_GAUGE32:
+               case  VB_TIMETICK:
+               case  VB_COUNTER32:
+               case  VB_INT:
+               case  VB_GAUGE32:
                        tlen += dissect_val32(tvb, subtree,offset + tlen + 4, flags);
-               break;
+                       break;
 
-               case  VB_COUNTER64:
+               case  VB_COUNTER64:
                        tlen += dissect_val64(tvb, subtree,offset + tlen + 4, flags);
-               break;
+                       break;
 
-               case  VB_NULL:
-               case  VB_NOSUCHOBJ:
-               case  VB_NOSUCHINST:
-               case  VB_ENDOFMIB:
-               break;
+               case  VB_NULL:
+               case  VB_NOSUCHOBJ:
+               case  VB_NOSUCHINST:
+               case  VB_ENDOFMIB:
+                       break;
        }
        return tlen + 4;
 }
@@ -453,7 +453,7 @@ static int dissect_varbind(tvbuff_t *tvb, proto_tree *tree, int offset, int len,
 static void dissect_response_pdu(tvbuff_t *tvb, proto_tree *tree,int offset,int len, char flags)
 {
        proto_item* item;
-        proto_tree* subtree;
+       proto_tree* subtree;
        gboolean little_endian = !(flags & NETWORK_BYTE_ORDER);
        guint32 r_uptime;
 
@@ -495,42 +495,42 @@ static void dissect_getnext_pdu(tvbuff_t *tvb, proto_tree *tree,int offset,int l
 static void dissect_get_pdu(tvbuff_t *tvb, proto_tree *tree,int offset,int len, char flags)
 {
        proto_item* item;
-        proto_tree* subtree;
+       proto_tree* subtree;
 
        item = proto_tree_add_text(tree, tvb, offset, len, "Get-PDU");
        subtree = proto_item_add_subtree(item, ett_get);
 
        if(flags & NON_DEFAULT_CONTEXT) {
-                /* show context */
-                offset += dissect_octet_string(tvb, subtree, offset, flags);
-        }
+               /* show context */
+               offset += dissect_octet_string(tvb, subtree, offset, flags);
+       }
 
        while(len >= offset) {
-                offset += dissect_search_range(tvb, subtree, offset, flags);
+               offset += dissect_search_range(tvb, subtree, offset, flags);
                offset += 4; /* skip 0 end dword */
-        }
+       }
 }
 
 static void dissect_getbulk_pdu(tvbuff_t *tvb, proto_tree *tree,int offset,int len, char flags)
 {
        proto_item* item;
-        proto_tree* subtree;
+       proto_tree* subtree;
        gboolean little_endian = !(flags & NETWORK_BYTE_ORDER);
 
        item = proto_tree_add_text(tree, tvb, offset, len, "GetBulk-PDU");
        subtree = proto_item_add_subtree(item, ett_getbulk);
 
        if(flags & NON_DEFAULT_CONTEXT) {
-                /* show context */
-                offset += dissect_octet_string(tvb, subtree, offset, flags);
-        }
+               /* show context */
+               offset += dissect_octet_string(tvb, subtree, offset, flags);
+       }
 
-       proto_tree_add_item(subtree, hf_gbulk_nrepeat,  tvb, offset, 2, little_endian);
-       proto_tree_add_item(subtree, hf_gbulk_mrepeat,  tvb, offset + 2, 2, little_endian);
+       proto_tree_add_item(subtree, hf_gbulk_nrepeat,  tvb, offset, 2, little_endian);
+       proto_tree_add_item(subtree, hf_gbulk_mrepeat,  tvb, offset + 2, 2, little_endian);
        offset+=4;
 
        while(len >= offset) {
-                offset += dissect_search_range(tvb, subtree, offset, flags);
+               offset += dissect_search_range(tvb, subtree, offset, flags);
        }
 }
 
@@ -559,7 +559,7 @@ static void dissect_open_pdu(tvbuff_t *tvb, proto_tree *tree,int offset,int len,
 static void dissect_close_pdu(tvbuff_t *tvb, proto_tree *tree,int offset,int len)
 {
        proto_item* item;
-        proto_tree* subtree;
+       proto_tree* subtree;
        guint8 reason;
 
        item = proto_tree_add_text(tree, tvb, offset, len, "Close-PDU");
@@ -575,17 +575,18 @@ static void dissect_close_pdu(tvbuff_t *tvb, proto_tree *tree,int offset,int len
 
 static void dissect_register_pdu(tvbuff_t *tvb, proto_tree *tree,int offset,int len, char flags)
 {
+
        proto_item* item;
-        proto_tree* subtree;
+       proto_tree* subtree;
        gboolean little_endian = !(flags & NETWORK_BYTE_ORDER);
 
        item = proto_tree_add_text(tree, tvb, offset, len, "Register-PDU");
        subtree = proto_item_add_subtree(item, ett_register);
 
        if(flags & NON_DEFAULT_CONTEXT) {
-                /* show context */
-                offset += dissect_octet_string(tvb, subtree, offset, flags);
-        }
+               /* show context */
+               offset += dissect_octet_string(tvb, subtree, offset, flags);
+       }
 
        proto_tree_add_item(subtree, hf_reg_timeout, tvb, offset, 1, FALSE);
        proto_tree_add_item(subtree, hf_reg_prio, tvb, offset+1, 1, FALSE);
@@ -607,44 +608,44 @@ static void dissect_register_pdu(tvbuff_t *tvb, proto_tree *tree,int offset,int
 static void dissect_unregister_pdu(tvbuff_t *tvb, proto_tree *tree,int offset,int len, char flags)
 {
        proto_item* item;
-        proto_tree* subtree;
+       proto_tree* subtree;
        gboolean little_endian = !(flags & NETWORK_BYTE_ORDER);
 
        item = proto_tree_add_text(tree, tvb, offset, len, "Unregister-PDU");
        subtree = proto_item_add_subtree(item, ett_unregister);
 
        if(flags & NON_DEFAULT_CONTEXT) {
-                /* show context */
-                offset += dissect_octet_string(tvb, subtree, offset, flags);
-        }
-
-        proto_tree_add_item(subtree, hf_unreg_timeout, tvb, offset, 1, FALSE);
-        proto_tree_add_item(subtree, hf_unreg_prio, tvb, offset+1, 1, FALSE);
-        proto_tree_add_item(subtree, hf_unreg_rsid, tvb, offset+2, 1, FALSE);
-        offset+=4;
-
-        /* Region */
-        offset += dissect_object_id(tvb, subtree, offset, flags);
-
-        if(len > offset) {
-               /* Upper bound (opt) */
-                proto_tree_add_item(subtree, hf_unreg_ubound, tvb, offset, 4, little_endian);
-                offset += 4;
-        }
+               /* show context */
+               offset += dissect_octet_string(tvb, subtree, offset, flags);
+       }
+
+       proto_tree_add_item(subtree, hf_unreg_timeout, tvb, offset, 1, FALSE);
+       proto_tree_add_item(subtree, hf_unreg_prio, tvb, offset+1, 1, FALSE);
+       proto_tree_add_item(subtree, hf_unreg_rsid, tvb, offset+2, 1, FALSE);
+       offset+=4;
+
+       /* Region */
+       offset += dissect_object_id(tvb, subtree, offset, flags);
+
+       if(len > offset) {
+               /* Upper bound (opt) */
+               proto_tree_add_item(subtree, hf_unreg_ubound, tvb, offset, 4, little_endian);
+               offset += 4;
+       }
 }
 
 static void dissect_testset_pdu(tvbuff_t *tvb, proto_tree *tree,int offset,int len, char flags)
 {
        proto_item* item;
-        proto_tree* subtree;
+       proto_tree* subtree;
 
        item = proto_tree_add_text(tree, tvb, offset, len, "Testset-PDU");
        subtree = proto_item_add_subtree(item, ett_testset);
 
        if(flags & NON_DEFAULT_CONTEXT) {
-                /* show context */
-                offset += dissect_octet_string(tvb, subtree, offset, flags);
-        }
+               /* show context */
+               offset += dissect_octet_string(tvb, subtree, offset, flags);
+       }
 
        while(len > offset) {
                offset += dissect_varbind(tvb, subtree, offset, len, flags);
@@ -654,47 +655,47 @@ static void dissect_testset_pdu(tvbuff_t *tvb, proto_tree *tree,int offset,int l
 static void dissect_notify_pdu(tvbuff_t *tvb, proto_tree *tree,int offset,int len, char flags)
 {
        proto_item* item;
-        proto_tree* subtree;
+       proto_tree* subtree;
 
        item = proto_tree_add_text(tree, tvb, offset, len, "Notify-PDU");
        subtree = proto_item_add_subtree(item, ett_notify);
 
        if(flags & NON_DEFAULT_CONTEXT) {
-                /* show context */
-                offset += dissect_octet_string(tvb, subtree, offset, flags);
-        }
+               /* show context */
+               offset += dissect_octet_string(tvb, subtree, offset, flags);
+       }
 
        while(len > offset) {
-                offset += dissect_varbind(tvb, subtree, offset, len, flags);
-        }
+               offset += dissect_varbind(tvb, subtree, offset, len, flags);
+       }
 }
 
 static void dissect_ping_pdu(tvbuff_t *tvb, proto_tree *tree,int offset,int len, char flags)
 {
        proto_item* item;
-        proto_tree* subtree;
+       proto_tree* subtree;
 
        item = proto_tree_add_text(tree, tvb, offset, len, "Ping-PDU");
        subtree = proto_item_add_subtree(item, ett_ping);
 
        if(flags & NON_DEFAULT_CONTEXT) {
-                /* show context */
-                offset += dissect_octet_string(tvb, subtree, offset, flags);
-        }
+               /* show context */
+               offset += dissect_octet_string(tvb, subtree, offset, flags);
+       }
 }
 
 static void dissect_idx_alloc_pdu(tvbuff_t *tvb, proto_tree *tree,int offset,int len, char flags)
 {
        proto_item* item;
-        proto_tree* subtree;
+       proto_tree* subtree;
 
        item = proto_tree_add_text(tree, tvb, offset, len, "IndexAllocate-PDU");
        subtree = proto_item_add_subtree(item, ett_idxalloc);
 
        if(flags & NON_DEFAULT_CONTEXT) {
-                /* show context */
-                offset += dissect_octet_string(tvb, subtree, offset, flags);
-        }
+               /* show context */
+               offset += dissect_octet_string(tvb, subtree, offset, flags);
+       }
 
        while(len > offset) {
                offset += dissect_varbind(tvb, subtree, offset, len, flags);
@@ -704,34 +705,34 @@ static void dissect_idx_alloc_pdu(tvbuff_t *tvb, proto_tree *tree,int offset,int
 
 static void dissect_idx_dealloc_pdu(tvbuff_t *tvb, proto_tree *tree,int offset,int len, char flags)
 {
-        proto_item* item;
-        proto_tree* subtree;
+       proto_item* item;
+       proto_tree* subtree;
 
        item = proto_tree_add_text(tree, tvb, offset, len, "IndexDeallocate-PDU");
        subtree = proto_item_add_subtree(item, ett_idxdalloc);
 
-        if(flags & NON_DEFAULT_CONTEXT) {
-                /* show context */
-                offset += dissect_octet_string(tvb, subtree, offset, flags);
-        }
+       if(flags & NON_DEFAULT_CONTEXT) {
+               /* show context */
+               offset += dissect_octet_string(tvb, subtree, offset, flags);
+       }
 
-        while(len > offset) {
-                offset += dissect_varbind(tvb, subtree, offset, len, flags);
-        }
+       while(len > offset) {
+               offset += dissect_varbind(tvb, subtree, offset, len, flags);
+       }
 }
 
 static void dissect_add_caps_pdu(tvbuff_t *tvb, proto_tree *tree,int offset,int len, char flags)
 {
        proto_item* item;
-        proto_tree* subtree;
+       proto_tree* subtree;
 
        item = proto_tree_add_text(tree, tvb, offset, len, "AddAgentCaps-PDU");
        subtree = proto_item_add_subtree(item, ett_addcap);
 
        if(flags & NON_DEFAULT_CONTEXT) {
-                /* show context */
-                offset += dissect_octet_string(tvb, subtree, offset, flags);
-        }
+               /* show context */
+               offset += dissect_octet_string(tvb, subtree, offset, flags);
+       }
 
        offset += dissect_object_id(tvb, subtree, offset, flags);
 
@@ -740,18 +741,18 @@ static void dissect_add_caps_pdu(tvbuff_t *tvb, proto_tree *tree,int offset,int
 
 static void dissect_rem_caps_pdu(tvbuff_t *tvb, proto_tree *tree,int offset,int len, char flags)
 {
-        proto_item* item;
-        proto_tree* subtree;
+       proto_item* item;
+       proto_tree* subtree;
 
        item = proto_tree_add_text(tree, tvb, offset, len, "RemoveAgentCaps-PDU");
        subtree = proto_item_add_subtree(item, ett_remcap);
 
-        if(flags & NON_DEFAULT_CONTEXT) {
-                /* show context */
-                offset += dissect_octet_string(tvb, subtree, offset, flags);
-        }
+       if(flags & NON_DEFAULT_CONTEXT) {
+               /* show context */
+               offset += dissect_octet_string(tvb, subtree, offset, flags);
+       }
 
-        offset += dissect_object_id(tvb, subtree, offset, flags);
+       offset += dissect_object_id(tvb, subtree, offset, flags);
 }
 
 
@@ -779,8 +780,7 @@ static guint get_agentx_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offse
        return plen + 20;
 }
 
-static void dissect_agentx_pdu(tvbuff_t *tvb, packet_info *pinfo,
-    proto_tree *tree)
+static void dissect_agentx_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 {
        int offset = 0;
        proto_tree* agentx_tree ,*pdu_hdr_tree;
@@ -804,11 +804,11 @@ static void dissect_agentx_pdu(tvbuff_t *tvb, packet_info *pinfo,
        NORLEL(flags, packet_id, tvb, 12); offset+=4;
        NORLEL(flags, payload_len, tvb, 16); offset+=4;
 
-    col_set_str(pinfo->cinfo, COL_PROTOCOL, "AgentX");
+       col_set_str(pinfo->cinfo, COL_PROTOCOL, "AgentX");
 
-    col_add_fstr(pinfo->cinfo, COL_INFO, "%s: sid=%d, tid=%d, packid=%d, plen=%d",
-                       val_to_str(type,type_values,"unknown"),
-                       session_id,trans_id,packet_id,payload_len);
+       col_add_fstr(pinfo->cinfo, COL_INFO, "%s: sid=%d, tid=%d, packid=%d, plen=%d",
+                    val_to_str(type,type_values,"unknown"),
+                    session_id,trans_id,packet_id,payload_len);
 
 
        if(!tree)
@@ -816,7 +816,7 @@ static void dissect_agentx_pdu(tvbuff_t *tvb, packet_info *pinfo,
 
        /*t_item = proto_tree_add_item(tree, proto_agentx, tvb, 0, -1, FALSE);*/
        t_item = proto_tree_add_protocol_format(tree, proto_agentx, tvb, 0, -1,
-                "Agent Extensibility (AgentX) Protocol: %s, sid=%d, tid=%d, packid=%d, plen=%d",
+                       "Agent Extensibility (AgentX) Protocol: %s, sid=%d, tid=%d, packid=%d, plen=%d",
                        val_to_str(type,type_values,"unknown"),
                        session_id,trans_id,packet_id,payload_len);
        agentx_tree = proto_item_add_subtree(t_item, ett_agentx);
@@ -839,65 +839,65 @@ static void dissect_agentx_pdu(tvbuff_t *tvb, packet_info *pinfo,
                dissect_open_pdu(tvb, pdu_hdr_tree, offset,payload_len,flags);
                break;
 
-               case AGENTX_CLOSE_PDU:
+               case AGENTX_CLOSE_PDU:
                dissect_close_pdu(tvb, pdu_hdr_tree, offset,payload_len);
                break;
 
-               case AGENTX_REGISTER_PDU:
+               case AGENTX_REGISTER_PDU:
                dissect_register_pdu(tvb, pdu_hdr_tree, offset,payload_len,flags);
                break;
 
-               case AGENTX_UNREGISTER_PDU:
+               case AGENTX_UNREGISTER_PDU:
                dissect_unregister_pdu(tvb, pdu_hdr_tree, offset,payload_len,flags);
                break;
 
-               case AGENTX_GET_PDU:
+               case AGENTX_GET_PDU:
                dissect_get_pdu(tvb, pdu_hdr_tree, offset,payload_len,flags);
                break;
 
-               case AGENTX_GETNEXT_PDU:
+               case AGENTX_GETNEXT_PDU:
                dissect_getnext_pdu(tvb, pdu_hdr_tree, offset,payload_len,flags);
                break;
 
-                       case AGENTX_GETBULK_PDU:
+               case AGENTX_GETBULK_PDU:
                dissect_getbulk_pdu(tvb, pdu_hdr_tree, offset,payload_len,flags);
                break;
 
-               case AGENTX_TESTSET_PDU:
+               case AGENTX_TESTSET_PDU:
                dissect_testset_pdu(tvb, pdu_hdr_tree, offset,payload_len,flags);
                break;
 
-               case AGENTX_COMMITSET_PDU:
-               case AGENTX_UNDOSET_PDU:
-               case AGENTX_CLEANUPSET_PDU:
+               case AGENTX_COMMITSET_PDU:
+               case AGENTX_UNDOSET_PDU:
+               case AGENTX_CLEANUPSET_PDU:
                        /* there is no parameters */
                break;
 
-               case AGENTX_NOTIFY_PDU:
+               case AGENTX_NOTIFY_PDU:
                dissect_notify_pdu(tvb, pdu_hdr_tree, offset,payload_len,flags);
                break;
 
-               case AGENTX_PING_PDU:
+               case AGENTX_PING_PDU:
                dissect_ping_pdu(tvb, pdu_hdr_tree, offset,payload_len,flags);
                break;
 
-               case AGENTX_INDEX_ALLOC_PDU:
+               case AGENTX_INDEX_ALLOC_PDU:
                dissect_idx_alloc_pdu(tvb, pdu_hdr_tree, offset,payload_len,flags);
                break;
 
-               case AGENTX_INDEX_DEALLOC_PDU:
+               case AGENTX_INDEX_DEALLOC_PDU:
                dissect_idx_dealloc_pdu(tvb, pdu_hdr_tree, offset,payload_len,flags);
                break;
 
-               case AGENTX_ADD_AGENT_CAPS_PDU:
+               case AGENTX_ADD_AGENT_CAPS_PDU:
                dissect_add_caps_pdu(tvb, pdu_hdr_tree, offset,payload_len,flags);
                break;
 
-               case AGENTX_REM_AGENT_CAPS_PDU:
+               case AGENTX_REM_AGENT_CAPS_PDU:
                dissect_rem_caps_pdu(tvb, pdu_hdr_tree, offset,payload_len,flags);
                break;
 
-               case AGENTX_RESPONSE_PDU:
+               case AGENTX_RESPONSE_PDU:
                dissect_response_pdu(tvb, pdu_hdr_tree, offset, payload_len, flags);
                break;
        }
@@ -912,179 +912,179 @@ static void dissect_agentx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 void
 proto_register_agentx(void)
 {
-  static hf_register_info hf[] = {
+       static hf_register_info hf[] = {
 
-    { &hf_version,
-      { "Version", "agentx.version", FT_UINT8, BASE_DEC, NULL, 0x0,
-        "header version", HFILL }},
+               { &hf_version,
+                 { "Version", "agentx.version", FT_UINT8, BASE_DEC, NULL, 0x0,
+                   "header version", HFILL }},
 
-    { &hf_type,
-      { "Type", "agentx.type", FT_UINT8, BASE_DEC, VALS(type_values), 0x0,
-        "header type", HFILL }},
+               { &hf_type,
+                 { "Type", "agentx.type", FT_UINT8, BASE_DEC, VALS(type_values), 0x0,
+                   "header type", HFILL }},
 
-    { &hf_flags,
-      { "Flags", "agentx.flags", FT_UINT8, BASE_DEC, NULL, 0x0,
-        "header type", HFILL }},
+               { &hf_flags,
+                 { "Flags", "agentx.flags", FT_UINT8, BASE_DEC, NULL, 0x0,
+                   "header type", HFILL }},
 
-    { &hf_session_id,
-      { "sessionID", "agentx.session_id", FT_UINT32, BASE_DEC, NULL, 0x0,
-        "Session ID", HFILL }},
+               { &hf_session_id,
+                 { "sessionID", "agentx.session_id", FT_UINT32, BASE_DEC, NULL, 0x0,
+                   "Session ID", HFILL }},
 
-    { &hf_trans_id,
-      { "TransactionID", "agentx.transaction_id", FT_UINT32, BASE_DEC, NULL, 0x0,
-        "Transaction ID", HFILL }},
+               { &hf_trans_id,
+                 { "TransactionID", "agentx.transaction_id", FT_UINT32, BASE_DEC, NULL, 0x0,
+                   "Transaction ID", HFILL }},
 
-    { &hf_packet_id,
-      { "PacketID", "agentx.packet_id", FT_UINT32, BASE_DEC, NULL, 0x0,
-        "Packet ID", HFILL }},
+               { &hf_packet_id,
+                 { "PacketID", "agentx.packet_id", FT_UINT32, BASE_DEC, NULL, 0x0,
+                   "Packet ID", HFILL }},
 
-    { &hf_payload_len,
-      { "Payload length", "agentx.payload_len", FT_UINT32, BASE_DEC, NULL, 0x0,
-        NULL, HFILL }},
+               { &hf_payload_len,
+                 { "Payload length", "agentx.payload_len", FT_UINT32, BASE_DEC, NULL, 0x0,
+                   NULL, HFILL }},
 
-    { &hf_ostring,
-      { "Octet String", "agentx.ostring", FT_STRING, BASE_NONE, NULL, 0x0,
-        NULL, HFILL }},
+               { &hf_ostring,
+                 { "Octet String", "agentx.ostring", FT_STRING, BASE_NONE, NULL, 0x0,
+                   NULL, HFILL }},
 
-    { &hf_ostring_len,
-      { "OString len", "agentx.ostring_len", FT_UINT32, BASE_DEC, NULL, 0x0,
-        "Octet String Length", HFILL }},
+               { &hf_ostring_len,
+                 { "OString len", "agentx.ostring_len", FT_UINT32, BASE_DEC, NULL, 0x0,
+                   "Octet String Length", HFILL }},
 
-    { &hf_oid_sub,
-      { "Number subids", "agentx.n_subid", FT_UINT8, BASE_DEC, NULL, 0x0,
-        NULL, HFILL }},
+               { &hf_oid_sub,
+                 { "Number subids", "agentx.n_subid", FT_UINT8, BASE_DEC, NULL, 0x0,
+                   NULL, HFILL }},
 
-    { &hf_oid_prefix,
-      { "OID prefix", "agentx.oid_prefix", FT_UINT8, BASE_DEC, NULL, 0x0,
-        NULL, HFILL }},
-
-    { &hf_oid_include,
-      { "OID include", "agentx.oid_include", FT_UINT8, BASE_DEC, NULL, 0x0,
-        NULL, HFILL }},
-
-    { &hf_oid_str,
-      { "OID", "agentx.oid", FT_STRING, BASE_NONE, NULL, 0x0,
-        NULL, HFILL }},
-
-    { &hf_resp_uptime,
-      { "sysUpTime", "agentx.r.uptime", FT_UINT32, BASE_DEC, NULL, 0x0,
-        NULL, HFILL }},
-
-    { &hf_resp_error,
-      { "Resp. error", "agentx.r.error", FT_UINT16, BASE_DEC, VALS(resp_errors), 0x0,
-        "response error", HFILL }},
-
-    { &hf_resp_index,
-      { "Resp. index", "agentx.r.index", FT_UINT16, BASE_DEC, NULL, 0x0,
-        "response index", HFILL }},
-
-    { &hf_vtag,
-      { "Variable type", "agentx.v.tag", FT_UINT16, BASE_DEC, VALS(vtag_values), 0x0,
-        "vtag", HFILL }},
-
-    { &hf_val32,
-      { "Value(32)", "agentx.v.val32", FT_UINT32, BASE_DEC, NULL, 0x0,
-        "val32", HFILL }},
-
-    { &hf_val64,
-      { "Value(64)", "agentx.v.val64", FT_UINT64, BASE_DEC, NULL, 0x0,
-        "val64", HFILL }},
-
-    { &hf_open_timeout,
-      { "Timeout", "agentx.o.timeout", FT_UINT8, BASE_DEC, NULL, 0x0,
-        "open timeout", HFILL }},
-
-    { &hf_close_reason,
-      { "Reason", "agentx.c.reason", FT_UINT8, BASE_DEC, VALS(close_reasons), 0x0,
-        "close reason", HFILL }},
-
-    { &hf_reg_timeout,
-      { "Timeout", "agentx.r.timeout", FT_UINT8, BASE_DEC, NULL, 0x0,
-        "Register timeout", HFILL }},
-
-    { &hf_reg_prio,
-      { "Priority", "agentx.r.priority", FT_UINT8, BASE_DEC, NULL, 0x0,
-        "Register Priority", HFILL }},
-
-    { &hf_reg_rsid,
-      { "Range_subid", "agentx.r.range_subid", FT_UINT8, BASE_DEC, NULL, 0x0,
-        "Register range_subid", HFILL }},
-
-    { &hf_reg_ubound,
-      { "Upper bound", "agentx.r.upper_bound", FT_UINT32, BASE_DEC, NULL, 0x0,
-        "Register upper bound", HFILL }},
-
-    { &hf_unreg_timeout,
-      { "Timeout", "agentx.u.timeout", FT_UINT8, BASE_DEC, NULL, 0x0,
-        "Unregister timeout", HFILL }},
-
-    { &hf_unreg_prio,
-      { "Priority", "agentx.u.priority", FT_UINT8, BASE_DEC, NULL, 0x0,
-        "Unregister Priority", HFILL }},
-
-    { &hf_unreg_rsid,
-      { "Range_subid", "agentx.u.range_subid", FT_UINT8, BASE_DEC, NULL, 0x0,
-        "Unregister range_subid", HFILL }},
-
-    { &hf_unreg_ubound,
-      { "Upper bound", "agentx.u.upper_bound", FT_UINT32, BASE_DEC, NULL, 0x0,
-        "Register upper bound", HFILL }},
-
-    { &hf_gbulk_nrepeat,
-      { "Repeaters", "agentx.gb.nrepeat", FT_UINT16, BASE_DEC, NULL, 0x0,
-        "getBulk Num. repeaters", HFILL }},
-
-    { &hf_gbulk_mrepeat,
-      { "Max Repetition", "agentx.gb.mrepeat", FT_UINT16, BASE_DEC, NULL, 0x0,
-        "getBulk Max repetition", HFILL }},
-
-
-    /* Add more fields here */
-
-  };
-
-  static gint *ett[] = {
-       &ett_agentx,
-       &ett_pdu_hdr,
-       &ett_get,
-       &ett_getnext,
-       &ett_search_range,
-       &ett_obj_ident,
-       &ett_response,
-       &ett_valrep,
-       &ett_open,
-       &ett_close,
-       &ett_register,
-       &ett_unregister,
-       &ett_getbulk,
-       &ett_testset,
-       &ett_commitset,
-       &ett_undoset,
-       &ett_cleanupset,
-       &ett_notify,
-       &ett_ping,
-       &ett_idxalloc,
-       &ett_idxdalloc,
-       &ett_addcap,
-       &ett_remcap,
-  };
-
-
-  module_t *agentx_module;
-
-  proto_agentx = proto_register_protocol("AgentX",
-                                      "AgentX", "agentx");
-
-  proto_register_field_array(proto_agentx, hf, array_length(hf));
-  proto_register_subtree_array(ett, array_length(ett));
-
-  agentx_module = prefs_register_protocol(proto_agentx, proto_reg_handoff_agentx);
-
-  prefs_register_uint_preference(agentx_module, "tcp.agentx_port",
-                                "AgentX listener TCP Port",
-                                "Set the TCP port for AgentX"
-                                "(if other than the default of 705)",
-                                10, &global_agentx_tcp_port);
+               { &hf_oid_prefix,
+                 { "OID prefix", "agentx.oid_prefix", FT_UINT8, BASE_DEC, NULL, 0x0,
+                   NULL, HFILL }},
+
+               { &hf_oid_include,
+                 { "OID include", "agentx.oid_include", FT_UINT8, BASE_DEC, NULL, 0x0,
+                   NULL, HFILL }},
+
+               { &hf_oid_str,
+                 { "OID", "agentx.oid", FT_STRING, BASE_NONE, NULL, 0x0,
+                   NULL, HFILL }},
+
+               { &hf_resp_uptime,
+                 { "sysUpTime", "agentx.r.uptime", FT_UINT32, BASE_DEC, NULL, 0x0,
+                   NULL, HFILL }},
+
+               { &hf_resp_error,
+                 { "Resp. error", "agentx.r.error", FT_UINT16, BASE_DEC, VALS(resp_errors), 0x0,
+                   "response error", HFILL }},
+
+               { &hf_resp_index,
+                 { "Resp. index", "agentx.r.index", FT_UINT16, BASE_DEC, NULL, 0x0,
+                   "response index", HFILL }},
+
+               { &hf_vtag,
+                 { "Variable type", "agentx.v.tag", FT_UINT16, BASE_DEC, VALS(vtag_values), 0x0,
+                   "vtag", HFILL }},
+
+               { &hf_val32,
+                 { "Value(32)", "agentx.v.val32", FT_UINT32, BASE_DEC, NULL, 0x0,
+                   "val32", HFILL }},
+
+               { &hf_val64,
+                 { "Value(64)", "agentx.v.val64", FT_UINT64, BASE_DEC, NULL, 0x0,
+                   "val64", HFILL }},
+
+               { &hf_open_timeout,
+                 { "Timeout", "agentx.o.timeout", FT_UINT8, BASE_DEC, NULL, 0x0,
+                   "open timeout", HFILL }},
+
+               { &hf_close_reason,
+                 { "Reason", "agentx.c.reason", FT_UINT8, BASE_DEC, VALS(close_reasons), 0x0,
+                   "close reason", HFILL }},
+
+               { &hf_reg_timeout,
+                 { "Timeout", "agentx.r.timeout", FT_UINT8, BASE_DEC, NULL, 0x0,
+                   "Register timeout", HFILL }},
+
+               { &hf_reg_prio,
+                 { "Priority", "agentx.r.priority", FT_UINT8, BASE_DEC, NULL, 0x0,
+                   "Register Priority", HFILL }},
+
+               { &hf_reg_rsid,
+                 { "Range_subid", "agentx.r.range_subid", FT_UINT8, BASE_DEC, NULL, 0x0,
+                   "Register range_subid", HFILL }},
+
+               { &hf_reg_ubound,
+                 { "Upper bound", "agentx.r.upper_bound", FT_UINT32, BASE_DEC, NULL, 0x0,
+                   "Register upper bound", HFILL }},
+
+               { &hf_unreg_timeout,
+                 { "Timeout", "agentx.u.timeout", FT_UINT8, BASE_DEC, NULL, 0x0,
+                   "Unregister timeout", HFILL }},
+
+               { &hf_unreg_prio,
+                 { "Priority", "agentx.u.priority", FT_UINT8, BASE_DEC, NULL, 0x0,
+                   "Unregister Priority", HFILL }},
+
+               { &hf_unreg_rsid,
+                 { "Range_subid", "agentx.u.range_subid", FT_UINT8, BASE_DEC, NULL, 0x0,
+                   "Unregister range_subid", HFILL }},
+
+               { &hf_unreg_ubound,
+                 { "Upper bound", "agentx.u.upper_bound", FT_UINT32, BASE_DEC, NULL, 0x0,
+                   "Register upper bound", HFILL }},
+
+               { &hf_gbulk_nrepeat,
+                 { "Repeaters", "agentx.gb.nrepeat", FT_UINT16, BASE_DEC, NULL, 0x0,
+                   "getBulk Num. repeaters", HFILL }},
+
+               { &hf_gbulk_mrepeat,
+                 { "Max Repetition", "agentx.gb.mrepeat", FT_UINT16, BASE_DEC, NULL, 0x0,
+                   "getBulk Max repetition", HFILL }},
+
+
+               /* Add more fields here */
+
+       };
+
+       static gint *ett[] = {
+               &ett_agentx,
+               &ett_pdu_hdr,
+               &ett_get,
+               &ett_getnext,
+               &ett_search_range,
+               &ett_obj_ident,
+               &ett_response,
+               &ett_valrep,
+               &ett_open,
+               &ett_close,
+               &ett_register,
+               &ett_unregister,
+               &ett_getbulk,
+               &ett_testset,
+               &ett_commitset,
+               &ett_undoset,
+               &ett_cleanupset,
+               &ett_notify,
+               &ett_ping,
+               &ett_idxalloc,
+               &ett_idxdalloc,
+               &ett_addcap,
+               &ett_remcap,
+       };
+
+
+       module_t *agentx_module;
+
+       proto_agentx = proto_register_protocol("AgentX",
+                                              "AgentX", "agentx");
+
+       proto_register_field_array(proto_agentx, hf, array_length(hf));
+       proto_register_subtree_array(ett, array_length(ett));
+
+       agentx_module = prefs_register_protocol(proto_agentx, proto_reg_handoff_agentx);
+
+       prefs_register_uint_preference(agentx_module, "tcp.agentx_port",
+                                      "AgentX listener TCP Port",
+                                      "Set the TCP port for AgentX"
+                                      "(if other than the default of 705)",
+                                      10, &global_agentx_tcp_port);
 }
 
 /* The registration hand-off routine */
@@ -1096,13 +1096,13 @@ proto_reg_handoff_agentx(void)
        static guint agentx_tcp_port;
 
        if(!agentx_prefs_initialized) {
-                agentx_handle = create_dissector_handle(dissect_agentx, proto_agentx);
-                agentx_prefs_initialized = TRUE;
-        }
-        else {
-                dissector_delete("tcp.port", agentx_tcp_port, agentx_handle);
-        }
-
-        agentx_tcp_port = global_agentx_tcp_port;
+               agentx_handle = create_dissector_handle(dissect_agentx, proto_agentx);
+               agentx_prefs_initialized = TRUE;
+       }
+       else {
+               dissector_delete("tcp.port", agentx_tcp_port, agentx_handle);
+       }
+
+       agentx_tcp_port = global_agentx_tcp_port;
        dissector_add("tcp.port", agentx_tcp_port, agentx_handle);
 }
index 239dd2864864df8f8682993aec2b3968270fb1f1..0b5b2255324c32ae87cabcea71bd254ef5a81493 100644 (file)
@@ -59,41 +59,41 @@ static int hf_admin_confirm_status = -1;
 /* Initialize the subtree pointers */
 static gint ett_aim_admin          = -1;
 
-static int dissect_aim_admin_accnt_info_req(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *admin_tree) 
+static int dissect_aim_admin_accnt_info_req(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *admin_tree)
 {
-       proto_tree_add_item(admin_tree, hf_admin_acctinfo_code, tvb, 0, 2, tvb_get_ntohs(tvb, 0)); 
+       proto_tree_add_item(admin_tree, hf_admin_acctinfo_code, tvb, 0, 2, tvb_get_ntohs(tvb, 0));
        proto_tree_add_text(admin_tree, tvb, 2, 2, "Unknown");
        return 4;
 }
 
-static int dissect_aim_admin_accnt_info_repl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *admin_tree) 
+static int dissect_aim_admin_accnt_info_repl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *admin_tree)
 {
        int offset = 0;
        proto_tree_add_uint(admin_tree, hf_admin_acctinfo_permissions, tvb, offset, 2, tvb_get_ntohs(tvb, offset)); offset+=2;
        return dissect_aim_tlv_list(tvb, pinfo, offset, admin_tree, client_tlvs);
 }
 
-static int dissect_aim_admin_info_change_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *admin_tree) 
+static int dissect_aim_admin_info_change_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *admin_tree)
 {
        return dissect_aim_tlv_sequence(tvb, pinfo, 0, admin_tree, client_tlvs);
 }
 
-static int dissect_aim_admin_cfrm_repl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *admin_tree) 
+static int dissect_aim_admin_cfrm_repl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *admin_tree)
 {
-       int offset = 0; 
+       int offset = 0;
        proto_tree_add_uint(admin_tree, hf_admin_confirm_status, tvb, offset, 2, tvb_get_ntohs(tvb, offset)); offset+=2;
        return dissect_aim_tlv_sequence(tvb, pinfo, offset, admin_tree, client_tlvs);
 }
 
 static const aim_subtype aim_fnac_family_admin[] = {
-  { 0x0001, "Error", dissect_aim_snac_error },
-  { 0x0002, "Request Account Information", dissect_aim_admin_accnt_info_req },
-  { 0x0003, "Requested Account Information", dissect_aim_admin_accnt_info_repl },
-  { 0x0004, "Infochange Request", dissect_aim_admin_info_change_req },
-  { 0x0005, "Infochange Reply", dissect_aim_admin_accnt_info_repl },
-  { 0x0006, "Account Confirm Request", NULL },
-  { 0x0007, "Account Confirm Reply", dissect_aim_admin_cfrm_repl},
-  { 0, NULL, NULL }
+       { 0x0001, "Error", dissect_aim_snac_error },
+       { 0x0002, "Request Account Information", dissect_aim_admin_accnt_info_req },
+       { 0x0003, "Requested Account Information", dissect_aim_admin_accnt_info_repl },
+       { 0x0004, "Infochange Request", dissect_aim_admin_info_change_req },
+       { 0x0005, "Infochange Reply", dissect_aim_admin_accnt_info_repl },
+       { 0x0006, "Account Confirm Request", NULL },
+       { 0x0007, "Account Confirm Reply", dissect_aim_admin_cfrm_repl},
+       { 0, NULL, NULL }
 };
 
 /* Register the protocol with Wireshark */
@@ -102,33 +102,33 @@ proto_register_aim_admin(void)
 {
 
 /* Setup list of header fields */
-  static hf_register_info hf[] = {
-         { &hf_admin_acctinfo_code,
+       static hf_register_info hf[] = {
+               { &hf_admin_acctinfo_code,
                  { "Account Information Request Code", "aim_admin.acctinfo.code", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL },
-         },
-         { &hf_admin_acctinfo_permissions,
+               },
+               { &hf_admin_acctinfo_permissions,
                  { "Account Permissions", "aim_admin.acctinfo.permissions", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL },
-         }, 
-         { &hf_admin_confirm_status,
+               },
+               { &hf_admin_confirm_status,
                  { "Confirmation status", "aim_admin.confirm_status", FT_UINT16, BASE_HEX, VALS(confirm_statusses), 0x0, NULL, HFILL },
-                                                                                                                                                                        },
-  };
+               },
+       };
 
 /* Setup protocol subtree array */
-  static gint *ett[] = {
-    &ett_aim_admin,
-  };
+       static gint *ett[] = {
+               &ett_aim_admin,
+       };
 
 /* Register the protocol name and description */
-  proto_aim_admin = proto_register_protocol("AIM Administrative", "AIM Administration", "aim_admin");
+       proto_aim_admin = proto_register_protocol("AIM Administrative", "AIM Administration", "aim_admin");
 
 /* Required function calls to register the header fields and subtrees used */
-  proto_register_field_array(proto_aim_admin, hf, array_length(hf));
-  proto_register_subtree_array(ett, array_length(ett));
+       proto_register_field_array(proto_aim_admin, hf, array_length(hf));
+       proto_register_subtree_array(ett, array_length(ett));
 }
 
 void
 proto_reg_handoff_aim_admin(void)
 {
-  aim_init_family(proto_aim_admin, ett_aim_admin, FAMILY_ADMIN, aim_fnac_family_admin);
+       aim_init_family(proto_aim_admin, ett_aim_admin, FAMILY_ADMIN, aim_fnac_family_admin);
 }
index d8425443229fcd7323fc65d6b113ed4d4101716a..905ceab63e1aa84d3224aff0e53ed94d208384fe 100644 (file)
 #define FAMILY_ADVERTS    0x0005
 
 static const aim_subtype aim_fnac_family_adverts[] = {
-  { 0x0001, "Error", dissect_aim_snac_error },
-  { 0x0002, "Request", NULL },
+       { 0x0001, "Error", dissect_aim_snac_error },
+       { 0x0002, "Request", NULL },
        /* FIXME: */
-       /* From other sources, I understand this response contains 
+       /* From other sources, I understand this response contains
         * a GIF file, haven't actually seen one though. And this
         * family appears to be deprecated, so we might never find out.. */
-  { 0x0003, "Data (GIF)", NULL },
-  { 0, NULL, NULL }
+       { 0x0003, "Data (GIF)", NULL },
+       { 0, NULL, NULL }
 };
 
 /* Initialize the protocol and registered fields */
@@ -62,26 +62,27 @@ proto_register_aim_adverts(void)
 {
 
 /* Setup list of header fields */
-/*FIXME
-  static hf_register_info hf[] = {
-  };*/
+#if 0 /*FIXME*/
+       static hf_register_info hf[] = {
+       };
+#endif
 
 /* Setup protocol subtree array */
-  static gint *ett[] = {
-    &ett_aim_adverts,
-  };
+       static gint *ett[] = {
+               &ett_aim_adverts,
+       };
 
 /* Register the protocol name and description */
-  proto_aim_adverts = proto_register_protocol("AIM Advertisements", "AIM Advertisements", "aim_adverts");
+       proto_aim_adverts = proto_register_protocol("AIM Advertisements", "AIM Advertisements", "aim_adverts");
 
 /* Required function calls to register the header fields and subtrees used */
 /*FIXME
   proto_register_field_array(proto_aim_adverts, hf, array_length(hf));*/
-  proto_register_subtree_array(ett, array_length(ett));
+       proto_register_subtree_array(ett, array_length(ett));
 }
 
 void
 proto_reg_handoff_aim_adverts(void)
 {
-  aim_init_family(proto_aim_adverts, ett_aim_adverts, FAMILY_ADVERTS, aim_fnac_family_adverts);
+       aim_init_family(proto_aim_adverts, ett_aim_adverts, FAMILY_ADVERTS, aim_fnac_family_adverts);
 }
index a29e91d0ca19fca36a3aa18b8bc6a1417f1230c5..446cf2640c15e7774d9e1f3562016e466c42db8a 100644 (file)
@@ -92,11 +92,11 @@ static int dissect_aim_chat_outgoing_msg(tvbuff_t *tvb, packet_info *pinfo, prot
        buddyname_length = aim_get_buddyname( buddyname, tvb, 30, 31 );
 
        /* channel message from client */
-       aim_get_message( msg, tvb, 40 + buddyname_length, tvb_length(tvb) 
+       aim_get_message( msg, tvb, 40 + buddyname_length, tvb_length(tvb)
                                         - 40 - buddyname_length );
 
        col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", msg);
-       
+
        return tvb_length(tvb);
 }
 
@@ -107,19 +107,19 @@ static int dissect_aim_chat_incoming_msg(tvbuff_t *tvb, packet_info *pinfo, prot
        guchar *msg;
        /* channel message to client */
        int buddyname_length;
-       
+
        buddyname=ep_alloc(MAX_BUDDYNAME_LENGTH+1);
        msg=ep_alloc(1000);
        buddyname_length = aim_get_buddyname( buddyname, tvb, 30, 31 );
 
-       aim_get_message( msg, tvb, 36 + buddyname_length, tvb_length(tvb) 
+       aim_get_message( msg, tvb, 36 + buddyname_length, tvb_length(tvb)
                                         - 36 - buddyname_length );
 
        col_append_fstr(pinfo->cinfo, COL_INFO, "from: %s", buddyname);
        col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", msg);
 
        if(chat_tree) {
-               proto_tree_add_text(chat_tree, tvb, 31, buddyname_length, 
+               proto_tree_add_text(chat_tree, tvb, 31, buddyname_length,
                                                        "Screen Name: %s",
                                                        format_text(buddyname, buddyname_length));
        }
@@ -127,15 +127,15 @@ static int dissect_aim_chat_incoming_msg(tvbuff_t *tvb, packet_info *pinfo, prot
 }
 
 static const aim_subtype aim_fnac_family_chat[] = {
-  { 0x0001, "Error", dissect_aim_snac_error },
-  { 0x0002, "Room Info Update", NULL },
-  { 0x0003, "User Join", dissect_aim_chat_userinfo_list },
-  { 0x0004, "User Leave", dissect_aim_chat_userinfo_list },
-  { 0x0005, "Outgoing Message", dissect_aim_chat_outgoing_msg },
-  { 0x0006, "Incoming Message", dissect_aim_chat_incoming_msg },
-  { 0x0007, "Evil Request", NULL },
-  { 0x0008, "Evil Reply", NULL },
-  { 0, NULL, NULL }
+       { 0x0001, "Error", dissect_aim_snac_error },
+       { 0x0002, "Room Info Update", NULL },
+       { 0x0003, "User Join", dissect_aim_chat_userinfo_list },
+       { 0x0004, "User Leave", dissect_aim_chat_userinfo_list },
+       { 0x0005, "Outgoing Message", dissect_aim_chat_outgoing_msg },
+       { 0x0006, "Incoming Message", dissect_aim_chat_incoming_msg },
+       { 0x0007, "Evil Request", NULL },
+       { 0x0008, "Evil Reply", NULL },
+       { 0, NULL, NULL }
 };
 
 /* Register the protocol with Wireshark */
@@ -144,26 +144,27 @@ proto_register_aim_chat(void)
 {
 
 /* Setup list of header fields */
-/*FIXME
-  static hf_register_info hf[] = {
-  };*/
+#if 0 /* FIXME */
+       static hf_register_info hf[] = {
+       };
+#endif
 
 /* Setup protocol subtree array */
-  static gint *ett[] = {
-    &ett_aim_chat,
-  };
+       static gint *ett[] = {
+               &ett_aim_chat,
+       };
 
 /* Register the protocol name and description */
-  proto_aim_chat = proto_register_protocol("AIM Chat Service", "AIM Chat", "aim_chat");
+       proto_aim_chat = proto_register_protocol("AIM Chat Service", "AIM Chat", "aim_chat");
 
 /* Required function calls to register the header fields and subtrees used */
 /*FIXME
   proto_register_field_array(proto_aim_chat, hf, array_length(hf));*/
-  proto_register_subtree_array(ett, array_length(ett));
+       proto_register_subtree_array(ett, array_length(ett));
 }
 
 void
 proto_reg_handoff_aim_chat(void)
 {
-  aim_init_family(proto_aim_chat, ett_aim_chat, FAMILY_CHAT, aim_fnac_family_chat);
+       aim_init_family(proto_aim_chat, ett_aim_chat, FAMILY_CHAT, aim_fnac_family_chat);
 }
index 4ba4ede72334a061b648ecd22a4be2bcae0506e0..1e74ec1897b72a4e5eefe08b1e2ea6ff354b3935 100644 (file)
 #define FAMILY_CHAT_NAV   0x000D
 
 static const aim_subtype aim_fnac_family_chatnav[] = {
-  { 0x0001, "Error", dissect_aim_snac_error },
-  { 0x0002, "Request Limits", NULL },
-  { 0x0003, "Request Exchange", NULL },
-  { 0x0004, "Request Room Information", NULL },
-  { 0x0005, "Request Extended Room Information", NULL },
-  { 0x0006, "Request Member List", NULL },
-  { 0x0007, "Search Room", NULL },
-  { 0x0008, "Create", NULL },
-  { 0x0009, "Info", NULL },
-  { 0, NULL, NULL }
+       { 0x0001, "Error", dissect_aim_snac_error },
+       { 0x0002, "Request Limits", NULL },
+       { 0x0003, "Request Exchange", NULL },
+       { 0x0004, "Request Room Information", NULL },
+       { 0x0005, "Request Extended Room Information", NULL },
+       { 0x0006, "Request Member List", NULL },
+       { 0x0007, "Search Room", NULL },
+       { 0x0008, "Create", NULL },
+       { 0x0009, "Info", NULL },
+       { 0, NULL, NULL }
 };
 
 /* Initialize the protocol and registered fields */
@@ -63,21 +63,22 @@ proto_register_aim_chatnav(void)
 {
 
 /* Setup list of header fields */
-/*FIXME
-  static hf_register_info hf[] = {
-  };*/
+#if 0 /*FIXME*/
+       static hf_register_info hf[] = {
+       };
+#endif
 
 /* Setup protocol subtree array */
-  static gint *ett[] = {
-    &ett_aim_chatnav,
-  };
+       static gint *ett[] = {
+               &ett_aim_chatnav,
+       };
 /* Register the protocol name and description */
-  proto_aim_chatnav = proto_register_protocol("AIM Chat Navigation", "AIM ChatNav", "aim_chatnav");
+       proto_aim_chatnav = proto_register_protocol("AIM Chat Navigation", "AIM ChatNav", "aim_chatnav");
 
 /* Required function calls to register the header fields and subtrees used */
 /*FIXME
   proto_register_field_array(proto_aim_chatnav, hf, array_length(hf));*/
-  proto_register_subtree_array(ett, array_length(ett));
+       proto_register_subtree_array(ett, array_length(ett));
 }
 
 void
index 8b7e4c0170746bc10780104c40a1f32bd40586cd..5d6df9a07673af305476af0a2d7c572d23a1daa0 100644 (file)
 
 
 #define ICQ_CLI_OFFLINE_MESSAGE_REQ    0x003c
-#define ICQ_CLI_DELETE_OFFLINE_MSGS            0x003e
-#define ICQ_SRV_OFFLINE_MSGS                   0x0041
-#define ICQ_SRV_END_OF_OFFLINE_MSGS            0x0042
-#define ICQ_CLI_META_INFO_REQ                  0x07d0
-#define ICQ_SRV_META_INFO_REPL                 0x07da
+#define ICQ_CLI_DELETE_OFFLINE_MSGS    0x003e
+#define ICQ_SRV_OFFLINE_MSGS           0x0041
+#define ICQ_SRV_END_OF_OFFLINE_MSGS    0x0042
+#define ICQ_CLI_META_INFO_REQ          0x07d0
+#define ICQ_SRV_META_INFO_REPL         0x07da
 
 static const value_string aim_icq_data_types[] = {
-  { ICQ_CLI_OFFLINE_MESSAGE_REQ, "Offline Message Request" },
-  { ICQ_SRV_OFFLINE_MSGS, "Offline Messages Reply" },
-  { ICQ_SRV_END_OF_OFFLINE_MSGS, "End Of Offline Messages Reply" },
-  { ICQ_CLI_DELETE_OFFLINE_MSGS, "Delete Offline Messages Request" },
-  { ICQ_CLI_META_INFO_REQ, "Metainfo Request" },
-  { ICQ_SRV_META_INFO_REPL, "Metainfo Reply" },
-  { 0, NULL }
+       { ICQ_CLI_OFFLINE_MESSAGE_REQ, "Offline Message Request" },
+       { ICQ_SRV_OFFLINE_MSGS, "Offline Messages Reply" },
+       { ICQ_SRV_END_OF_OFFLINE_MSGS, "End Of Offline Messages Reply" },
+       { ICQ_CLI_DELETE_OFFLINE_MSGS, "Delete Offline Messages Request" },
+       { ICQ_CLI_META_INFO_REQ, "Metainfo Request" },
+       { ICQ_SRV_META_INFO_REPL, "Metainfo Reply" },
+       { 0, NULL }
 };
 
 
@@ -63,8 +63,8 @@ static int dissect_aim_tlv_value_icq(proto_item *ti, guint16 subtype, tvbuff_t *
 #define TLV_ICQ_META_DATA                        0x0001
 
 static const aim_tlv icq_tlv[] = {
-   { TLV_ICQ_META_DATA, "Encapsulated ICQ Meta Data", dissect_aim_tlv_value_icq },
-   { 0, NULL, NULL },
+       { TLV_ICQ_META_DATA, "Encapsulated ICQ Meta Data", dissect_aim_tlv_value_icq },
+       { 0, NULL, NULL },
 };
 
 /* Initialize the protocol and registered fields */
@@ -202,12 +202,12 @@ static int dissect_aim_icq_tlv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
 }
 
 static const aim_subtype aim_fnac_family_icq[] = {
-  { 0x0001, "Error", dissect_aim_snac_error },
-  { 0x0002, "ICQ Request", dissect_aim_icq_tlv },
-  { 0x0003, "ICQ Response", dissect_aim_icq_tlv },
-  { 0x0006, "Auth Request", NULL },
-  { 0x0007, "Auth Response", NULL },
-  { 0, NULL, NULL }
+       { 0x0001, "Error", dissect_aim_snac_error },
+       { 0x0002, "ICQ Request", dissect_aim_icq_tlv },
+       { 0x0003, "ICQ Response", dissect_aim_icq_tlv },
+       { 0x0006, "Auth Request", NULL },
+       { 0x0007, "Auth Response", NULL },
+       { 0, NULL, NULL }
 };
 
 
@@ -217,43 +217,43 @@ proto_register_aim_icq(void)
 {
 
 /* Setup list of header fields */
-  static hf_register_info hf[] = {
-         { &hf_icq_tlv_data_chunk_size,
-           { "Data chunk size", "aim_icq.chunk_size", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL },
-         },
-         { &hf_icq_tlv_request_owner_uid,
-           { "Owner UID", "aim_icq.owner_uid", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL},
-         },
-         { &hf_icq_tlv_request_type,
-           {"Request Type", "aim_icq.request_type", FT_UINT16, BASE_DEC, VALS(aim_icq_data_types), 0x0, NULL, HFILL},
-         },
-         { &hf_icq_tlv_request_seq_num,
-           {"Request Sequence Number", "aim_icq.request_seq_number", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL},
-         },
-         { &hf_icq_dropped_msg_flag,
-               {"Dropped messages flag", "aim_icq.offline_msgs.dropped_flag", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL },
-         },
-         { &hf_icq_meta_subtype,
-               {"Meta Request Subtype", "aim_icq.subtype", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL },
-         },
-  };
+       static hf_register_info hf[] = {
+               { &hf_icq_tlv_data_chunk_size,
+                 { "Data chunk size", "aim_icq.chunk_size", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL },
+               },
+               { &hf_icq_tlv_request_owner_uid,
+                 { "Owner UID", "aim_icq.owner_uid", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL},
+               },
+               { &hf_icq_tlv_request_type,
+                 {"Request Type", "aim_icq.request_type", FT_UINT16, BASE_DEC, VALS(aim_icq_data_types), 0x0, NULL, HFILL},
+               },
+               { &hf_icq_tlv_request_seq_num,
+                 {"Request Sequence Number", "aim_icq.request_seq_number", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL},
+               },
+               { &hf_icq_dropped_msg_flag,
+                 {"Dropped messages flag", "aim_icq.offline_msgs.dropped_flag", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL },
+               },
+               { &hf_icq_meta_subtype,
+                 {"Meta Request Subtype", "aim_icq.subtype", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL },
+               },
+       };
 
 /* Setup protocol subtree array */
-  static gint *ett[] = {
-    &ett_aim_icq,
-       &ett_aim_icq_tlv
-  };
+       static gint *ett[] = {
+               &ett_aim_icq,
+               &ett_aim_icq_tlv
+       };
 
 /* Register the protocol name and description */
-  proto_aim_icq = proto_register_protocol("AIM ICQ", "AIM ICQ", "aim_icq");
+       proto_aim_icq = proto_register_protocol("AIM ICQ", "AIM ICQ", "aim_icq");
 
 /* Required function calls to register the header fields and subtrees used */
-  proto_register_field_array(proto_aim_icq, hf, array_length(hf));
-  proto_register_subtree_array(ett, array_length(ett));
+       proto_register_field_array(proto_aim_icq, hf, array_length(hf));
+       proto_register_subtree_array(ett, array_length(ett));
 }
 
 void
 proto_reg_handoff_aim_icq(void)
 {
-  aim_init_family(proto_aim_icq, ett_aim_icq, FAMILY_ICQ, aim_fnac_family_icq);
+       aim_init_family(proto_aim_icq, ett_aim_icq, FAMILY_ICQ, aim_fnac_family_icq);
 }
index 0dedfa1667f36e5a8fc29420ae65c0cdf23bdca4..58463537c4ec4f066252a7fc8e61290b29df1f95 100644 (file)
@@ -64,19 +64,19 @@ proto_register_aim_invitation(void)
 {
 
 /* Setup protocol subtree array */
-  static gint *ett[] = {
-    &ett_aim_invitation,
-  };
+       static gint *ett[] = {
+               &ett_aim_invitation,
+       };
 
 /* Register the protocol name and description */
-  proto_aim_invitation = proto_register_protocol("AIM Invitation Service", "AIM Invitation", "aim_invitation");
+       proto_aim_invitation = proto_register_protocol("AIM Invitation Service", "AIM Invitation", "aim_invitation");
 
 /* Required function calls to register the header fields and subtrees used */
-  proto_register_subtree_array(ett, array_length(ett));
+       proto_register_subtree_array(ett, array_length(ett));
 }
 
 void
 proto_reg_handoff_aim_invitation(void)
 {
-  aim_init_family(proto_aim_invitation, ett_aim_invitation, FAMILY_INVITATION, aim_fnac_family_invitation);
+       aim_init_family(proto_aim_invitation, ett_aim_invitation, FAMILY_INVITATION, aim_fnac_family_invitation);
 }
index 286293ec30016674a5c90875afc96243f389e056..38acf2b891f01663f21b123855fe032a7a06ace1 100644 (file)
@@ -68,9 +68,9 @@ static int dissect_aim_popup(tvbuff_t *tvb, packet_info *pinfo, proto_tree *popu
 }
 
 static const aim_subtype aim_fnac_family_popup[] = {
-  { 0x0001, "Error", dissect_aim_snac_error },
-  { 0x0002, "Display Popup Message Server Command" , dissect_aim_popup },
-  { 0, NULL, NULL }
+       { 0x0001, "Error", dissect_aim_snac_error },
+       { 0x0002, "Display Popup Message Server Command" , dissect_aim_popup },
+       { 0, NULL, NULL }
 };
 
 
@@ -80,19 +80,19 @@ proto_register_aim_popup(void)
 {
 
 /* Setup protocol subtree array */
-  static gint *ett[] = {
-    &ett_aim_popup,
-  };
+       static gint *ett[] = {
+               &ett_aim_popup,
+       };
 
 /* Register the protocol name and description */
-  proto_aim_popup = proto_register_protocol("AIM Popup", "AIM Popup", "aim_popup");
+       proto_aim_popup = proto_register_protocol("AIM Popup", "AIM Popup", "aim_popup");
 
 /* Required function calls to register the header fields and subtrees used */
-  proto_register_subtree_array(ett, array_length(ett));
+       proto_register_subtree_array(ett, array_length(ett));
 }
 
 void
 proto_reg_handoff_aim_popup(void)
 {
-  aim_init_family(proto_aim_popup, ett_aim_popup, FAMILY_POPUP, aim_fnac_family_popup);
+       aim_init_family(proto_aim_popup, ett_aim_popup, FAMILY_POPUP, aim_fnac_family_popup);
 }
index cde554bdf9b0197f9c0a3dd96402daecf018f28b..9d4b0f324d13f56ddb66e0c6bdb60b1d99b9e1bc 100644 (file)
@@ -51,7 +51,7 @@ static int hf_aim_signon_challenge = -1;
 /* Initialize the subtree pointers */
 static gint ett_aim_signon   = -1;
 
-static int dissect_aim_snac_signon_logon(tvbuff_t *tvb, packet_info *pinfo, 
+static int dissect_aim_snac_signon_logon(tvbuff_t *tvb, packet_info *pinfo,
                                          proto_tree *tree)
 {
        int offset = 0;
@@ -61,19 +61,19 @@ static int dissect_aim_snac_signon_logon(tvbuff_t *tvb, packet_info *pinfo,
        return offset;
 }
 
-static int dissect_aim_snac_signon_logon_reply(tvbuff_t *tvb, 
-                                               packet_info *pinfo, 
-                                               proto_tree *tree)
+static int dissect_aim_snac_signon_logon_reply(tvbuff_t *tvb,
+                                              packet_info *pinfo,
+                                              proto_tree *tree)
 {
        int offset = 0;
-    while (tvb_length_remaining(tvb, offset) > 0) {
-      offset = dissect_aim_tlv(tvb, pinfo, offset, tree, client_tlvs);
-    }
+       while (tvb_length_remaining(tvb, offset) > 0) {
+               offset = dissect_aim_tlv(tvb, pinfo, offset, tree, client_tlvs);
+       }
        return offset;
 }
 
-static int dissect_aim_snac_signon_signon(tvbuff_t *tvb, packet_info *pinfo, 
-                                          proto_tree *tree)
+static int dissect_aim_snac_signon_signon(tvbuff_t *tvb, packet_info *pinfo,
+                                         proto_tree *tree)
 {
        guint8 buddyname_length = 0;
        int offset = 0;
@@ -90,7 +90,7 @@ static int dissect_aim_snac_signon_signon(tvbuff_t *tvb, packet_info *pinfo,
        buddyname_length = aim_get_buddyname( buddyname, tvb, offset, offset + 1 );
 
        col_append_fstr(pinfo->cinfo, COL_INFO, " Username: %s",
-                                       format_text(buddyname, buddyname_length));
+                       format_text(buddyname, buddyname_length));
 
        if(tree) {
                offset+=dissect_aim_buddyname(tvb, pinfo, offset, tree);
@@ -99,9 +99,9 @@ static int dissect_aim_snac_signon_signon(tvbuff_t *tvb, packet_info *pinfo,
        return offset;
 }
 
-static int dissect_aim_snac_signon_signon_reply(tvbuff_t *tvb, 
-                                                                                               packet_info *pinfo _U_, 
-                                                                                               proto_tree *tree)
+static int dissect_aim_snac_signon_signon_reply(tvbuff_t *tvb,
+                                               packet_info *pinfo _U_,
+                                               proto_tree *tree)
 {
        int offset = 0;
        guint16 challenge_length = 0;
@@ -157,13 +157,13 @@ proto_register_aim_signon(void)
        /* Setup list of header fields */
        static hf_register_info hf[] = {
                { &hf_aim_infotype,
-                       { "Infotype", "aim_signon.infotype", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }
+                 { "Infotype", "aim_signon.infotype", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }
                },
                { &hf_aim_signon_challenge_len,
-                       { "Signon challenge length", "aim_signon.challengelen", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }
+                 { "Signon challenge length", "aim_signon.challengelen", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }
                },
                { &hf_aim_signon_challenge,
-                       { "Signon challenge", "aim_signon.challenge", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }
+                 { "Signon challenge", "aim_signon.challenge", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }
                },
        };
 
index cfd87958638b67ab3c259a24da62bee144a09088..aa25f3d8b8ee382633bf0bbecc0ef2b3f0e1f5ef 100644 (file)
@@ -141,12 +141,12 @@ static int dissect_aim_sst_buddy_up_req (tvbuff_t *tvb, packet_info *pinfo _U_,
 }
 
 static const aim_subtype aim_fnac_family_sst[] = {
-  { 0x0001, "Error", dissect_aim_snac_error },
-  { 0x0002, "Upload Buddy Icon Request", dissect_aim_sst_buddy_up_req },
-  { 0x0003, "Upload Buddy Icon Reply", dissect_aim_sst_buddy_up_repl },
-  { 0x0004, "Download Buddy Icon Request", dissect_aim_sst_buddy_down_req },
-  { 0x0005, "Download Buddy Icon Reply", dissect_aim_sst_buddy_down_repl },
-  { 0, NULL, NULL }
+       { 0x0001, "Error", dissect_aim_snac_error },
+       { 0x0002, "Upload Buddy Icon Request", dissect_aim_sst_buddy_up_req },
+       { 0x0003, "Upload Buddy Icon Reply", dissect_aim_sst_buddy_up_repl },
+       { 0x0004, "Download Buddy Icon Request", dissect_aim_sst_buddy_down_req },
+       { 0x0005, "Download Buddy Icon Reply", dissect_aim_sst_buddy_down_repl },
+       { 0, NULL, NULL }
 };
 
 
@@ -156,42 +156,42 @@ proto_register_aim_sst(void)
 {
 
 /* Setup list of header fields */
-  static hf_register_info hf[] = {
-         { &hf_aim_sst_md5_hash,
+       static hf_register_info hf[] = {
+               { &hf_aim_sst_md5_hash,
                  { "MD5 Hash", "aim_sst.md5", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL },
-         }, 
-         { &hf_aim_sst_md5_hash_size,
+               },
+               { &hf_aim_sst_md5_hash_size,
                  { "MD5 Hash Size", "aim_sst.md5.size", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL },
-         },
-         { &hf_aim_sst_unknown,
+               },
+               { &hf_aim_sst_unknown,
                  { "Unknown Data", "aim_sst.unknown", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL },
-         },
-         { &hf_aim_sst_ref_num,
+               },
+               { &hf_aim_sst_ref_num,
                  { "Reference Number", "aim_sst.ref_num", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL },
-         },
-         { &hf_aim_sst_icon_size,
+               },
+               { &hf_aim_sst_icon_size,
                  { "Icon Size", "aim_sst.icon_size", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL },
-         },
-         { &hf_aim_sst_icon,
+               },
+               { &hf_aim_sst_icon,
                  { "Icon", "aim_sst.icon", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL },
-         },
-  };
+               },
+       };
 
 /* Setup protocol subtree array */
-  static gint *ett[] = {
-    &ett_aim_sst,
-  };
+       static gint *ett[] = {
+               &ett_aim_sst,
+       };
 
 /* Register the protocol name and description */
-  proto_aim_sst = proto_register_protocol("AIM Server Side Themes", "AIM SST", "aim_sst");
+       proto_aim_sst = proto_register_protocol("AIM Server Side Themes", "AIM SST", "aim_sst");
 
 /* Required function calls to register the header fields and subtrees used */
-  proto_register_field_array(proto_aim_sst, hf, array_length(hf));
-  proto_register_subtree_array(ett, array_length(ett));
+       proto_register_field_array(proto_aim_sst, hf, array_length(hf));
+       proto_register_subtree_array(ett, array_length(ett));
 }
 
 void
 proto_reg_handoff_aim_sst(void)
 {
-  aim_init_family(proto_aim_sst, ett_aim_sst, FAMILY_SST, aim_fnac_family_sst);
+       aim_init_family(proto_aim_sst, ett_aim_sst, FAMILY_SST, aim_fnac_family_sst);
 }
index 87d9ada8f94d99cb3a7b0a1afcaf6dcc2b148200..0230231a733ccb40d330d5a4bb55266ac2928201 100644 (file)
@@ -48,8 +48,8 @@ static gint ett_aim_userlookup = -1;
 
 static int dissect_aim_userlookup_search(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *lookup_tree)
 {
-         proto_tree_add_item(lookup_tree, hf_aim_userlookup_email, tvb, 0, tvb_length(tvb), FALSE);
-         return tvb_length(tvb);
+       proto_tree_add_item(lookup_tree, hf_aim_userlookup_email, tvb, 0, tvb_length(tvb), FALSE);
+       return tvb_length(tvb);
 }
 
 
@@ -59,10 +59,10 @@ static int dissect_aim_userlookup_result(tvbuff_t *tvb, packet_info *pinfo, prot
 }
 
 static const aim_subtype aim_fnac_family_userlookup[] = {
-  { 0x0001, "Error", dissect_aim_snac_error },
-  { 0x0002, "Search for user by email address", dissect_aim_userlookup_search },
-  { 0x0003, "Search results", dissect_aim_userlookup_result },
-  { 0, NULL, NULL }
+       { 0x0001, "Error", dissect_aim_snac_error },
+       { 0x0002, "Search for user by email address", dissect_aim_userlookup_search },
+       { 0x0003, "Search results", dissect_aim_userlookup_result },
+       { 0, NULL, NULL }
 };
 
 /* Register the protocol with Wireshark */
@@ -71,26 +71,26 @@ proto_register_aim_userlookup(void)
 {
 
 /* Setup list of header fields */
-  static hf_register_info hf[] = {
-         { &hf_aim_userlookup_email,
+       static hf_register_info hf[] = {
+               { &hf_aim_userlookup_email,
                  { "Email address looked for", "aim_lookup.email", FT_STRING, BASE_NONE, NULL, 0, "Email address", HFILL }
-         },
-  };
+               },
+       };
 
 /* Setup protocol subtree array */
-  static gint *ett[] = {
-    &ett_aim_userlookup,
-  };
+       static gint *ett[] = {
+               &ett_aim_userlookup,
+       };
 /* Register the protocol name and description */
-  proto_aim_userlookup = proto_register_protocol("AIM User Lookup", "AIM User Lookup", "aim_lookup");
+       proto_aim_userlookup = proto_register_protocol("AIM User Lookup", "AIM User Lookup", "aim_lookup");
 
 /* Required function calls to register the header fields and subtrees used */
-  proto_register_field_array(proto_aim_userlookup, hf, array_length(hf));
-  proto_register_subtree_array(ett, array_length(ett));
+       proto_register_field_array(proto_aim_userlookup, hf, array_length(hf));
+       proto_register_subtree_array(ett, array_length(ett));
 }
 
 void
 proto_reg_handoff_aim_userlookup(void)
 {
-  aim_init_family(proto_aim_userlookup, ett_aim_userlookup, FAMILY_USERLOOKUP, aim_fnac_family_userlookup);
+       aim_init_family(proto_aim_userlookup, ett_aim_userlookup, FAMILY_USERLOOKUP, aim_fnac_family_userlookup);
 }
index cea188518f61755c9b2e8de1bcb828ecfff49a11..715db6ae20c8617a58f161a50f8d7ec547193320 100644 (file)
 #define FAMILY_ALL_ERROR_NOT_WHILE_ON_AOL              0x0018
 
 static const value_string aim_flap_channels[] = {
-    { CHANNEL_NEW_CONN, "New Connection" },
-    { CHANNEL_SNAC_DATA, "SNAC Data" },
-    { CHANNEL_FLAP_ERR, "FLAP-Level Error" },
-    { CHANNEL_CLOSE_CONN, "Close Connection" },
-    { CHANNEL_KEEP_ALIVE, "Keep Alive" },
-    { 0, NULL }
+       { CHANNEL_NEW_CONN, "New Connection" },
+       { CHANNEL_SNAC_DATA, "SNAC Data" },
+       { CHANNEL_FLAP_ERR, "FLAP-Level Error" },
+       { CHANNEL_CLOSE_CONN, "Close Connection" },
+       { CHANNEL_KEEP_ALIVE, "Keep Alive" },
+       { 0, NULL }
 };
 
 static const value_string aim_snac_errors[] = {
-  { FAMILY_ALL_ERROR_INVALID_HEADER, "Invalid SNAC Header" },
-  { FAMILY_ALL_ERROR_SERVER_RATE_LIMIT_EXCEEDED, "Server rate limit exceeded" },
-  { FAMILY_ALL_ERROR_CLIENT_RATE_LIMIT_EXCEEDED, "Client rate limit exceeded" },
-  { FAMILY_ALL_ERROR_RECIPIENT_NOT_LOGGED_IN, "Recipient not logged in" },
-  { FAMILY_ALL_ERROR_REQUESTED_SERVICE_UNAVAILABLE, "Requested service unavailable" },
-  { FAMILY_ALL_ERROR_REQUESTED_SERVICE_NOT_DEFINED, "Requested service not defined" },
-  { FAMILY_ALL_ERROR_OBSOLETE_SNAC, "Obsolete SNAC issued" },
-  { FAMILY_ALL_ERROR_NOT_SUPPORTED_BY_SERVER, "Not supported by server" },
-  { FAMILY_ALL_ERROR_NOT_SUPPORTED_BY_CLIENT, "Not supported by client" },
-  { FAMILY_ALL_ERROR_REFUSED_BY_CLIENT, "Refused by client" },
-  { FAMILY_ALL_ERROR_REPLY_TOO_BIG, "Reply too big" },
-  { FAMILY_ALL_ERROR_RESPONSES_LOST, "Responses lost" },
-  { FAMILY_ALL_ERROR_REQUEST_DENIED, "Request denied" },
-  { FAMILY_ALL_ERROR_INCORRECT_SNAC_FORMAT, "Incorrect SNAC format" },
-  { FAMILY_ALL_ERROR_INSUFFICIENT_RIGHTS, "Insufficient rights" },
-  { FAMILY_ALL_ERROR_RECIPIENT_BLOCKED, "Recipient blocked" },
-  { FAMILY_ALL_ERROR_SENDER_TOO_EVIL, "Sender too evil" },
-  { FAMILY_ALL_ERROR_RECEIVER_TOO_EVIL, "Receiver too evil" },
-  { FAMILY_ALL_ERROR_USER_TEMP_UNAVAILABLE, "User temporarily unavailable" },
-  { FAMILY_ALL_ERROR_NO_MATCH, "No match" },
-  { FAMILY_ALL_ERROR_LIST_OVERFLOW, "List overflow" },
-  { FAMILY_ALL_ERROR_REQUEST_AMBIGUOUS, "Request ambiguous" },
-  { FAMILY_ALL_ERROR_SERVER_QUEUE_FULL, "Server queue full" },
-  { FAMILY_ALL_ERROR_NOT_WHILE_ON_AOL, "Not while on AOL" },
-  { 0, NULL }
+       { FAMILY_ALL_ERROR_INVALID_HEADER, "Invalid SNAC Header" },
+       { FAMILY_ALL_ERROR_SERVER_RATE_LIMIT_EXCEEDED, "Server rate limit exceeded" },
+       { FAMILY_ALL_ERROR_CLIENT_RATE_LIMIT_EXCEEDED, "Client rate limit exceeded" },
+       { FAMILY_ALL_ERROR_RECIPIENT_NOT_LOGGED_IN, "Recipient not logged in" },
+       { FAMILY_ALL_ERROR_REQUESTED_SERVICE_UNAVAILABLE, "Requested service unavailable" },
+       { FAMILY_ALL_ERROR_REQUESTED_SERVICE_NOT_DEFINED, "Requested service not defined" },
+       { FAMILY_ALL_ERROR_OBSOLETE_SNAC, "Obsolete SNAC issued" },
+       { FAMILY_ALL_ERROR_NOT_SUPPORTED_BY_SERVER, "Not supported by server" },
+       { FAMILY_ALL_ERROR_NOT_SUPPORTED_BY_CLIENT, "Not supported by client" },
+       { FAMILY_ALL_ERROR_REFUSED_BY_CLIENT, "Refused by client" },
+       { FAMILY_ALL_ERROR_REPLY_TOO_BIG, "Reply too big" },
+       { FAMILY_ALL_ERROR_RESPONSES_LOST, "Responses lost" },
+       { FAMILY_ALL_ERROR_REQUEST_DENIED, "Request denied" },
+       { FAMILY_ALL_ERROR_INCORRECT_SNAC_FORMAT, "Incorrect SNAC format" },
+       { FAMILY_ALL_ERROR_INSUFFICIENT_RIGHTS, "Insufficient rights" },
+       { FAMILY_ALL_ERROR_RECIPIENT_BLOCKED, "Recipient blocked" },
+       { FAMILY_ALL_ERROR_SENDER_TOO_EVIL, "Sender too evil" },
+       { FAMILY_ALL_ERROR_RECEIVER_TOO_EVIL, "Receiver too evil" },
+       { FAMILY_ALL_ERROR_USER_TEMP_UNAVAILABLE, "User temporarily unavailable" },
+       { FAMILY_ALL_ERROR_NO_MATCH, "No match" },
+       { FAMILY_ALL_ERROR_LIST_OVERFLOW, "List overflow" },
+       { FAMILY_ALL_ERROR_REQUEST_AMBIGUOUS, "Request ambiguous" },
+       { FAMILY_ALL_ERROR_SERVER_QUEUE_FULL, "Server queue full" },
+       { FAMILY_ALL_ERROR_NOT_WHILE_ON_AOL, "Not while on AOL" },
+       { 0, NULL }
 };
 
 #define AIM_CLIENT_TLV_SCREEN_NAME             0x0001
@@ -172,59 +172,59 @@ static const value_string aim_snac_errors[] = {
 #define AIM_CLIENT_TLV_FIRST_MESSAGE_SENT      0x0145
 
 const aim_tlv client_tlvs[] = {
-  { AIM_CLIENT_TLV_SCREEN_NAME, "Screen name", dissect_aim_tlv_value_string },
-  { AIM_CLIENT_TLV_NEW_ROASTED_PASSWORD, "Roasted password array", dissect_aim_tlv_value_bytes  },
-  { AIM_CLIENT_TLV_OLD_ROASTED_PASSWORD, "Old roasted password array", dissect_aim_tlv_value_bytes  },
-  { AIM_CLIENT_TLV_CLIENT_ID_STRING, "Client id string (name, version)", dissect_aim_tlv_value_string },
-  { AIM_CLIENT_TLV_CLIENT_ID, "Client id number", dissect_aim_tlv_value_uint16 },
-  { AIM_CLIENT_TLV_CLIENT_MAJOR_VERSION, "Client major version", dissect_aim_tlv_value_uint16 },
-  { AIM_CLIENT_TLV_CLIENT_MINOR_VERSION, "Client minor version", dissect_aim_tlv_value_uint16 },
-  { AIM_CLIENT_TLV_CLIENT_LESSER_VERSION, "Client lesser version", dissect_aim_tlv_value_uint16 },
-  { AIM_CLIENT_TLV_CLIENT_BUILD_NUMBER, "Client build number", dissect_aim_tlv_value_uint16 },
-  { AIM_CLIENT_TLV_PASSWORD_MD5, "Password Hash (MD5)", dissect_aim_tlv_value_bytes },
-  { AIM_CLIENT_TLV_CLIENT_DISTRIBUTION_NUM, "Client distribution number", dissect_aim_tlv_value_uint32 },
-  { AIM_CLIENT_TLV_CLIENT_LANGUAGE, "Client language", dissect_aim_tlv_value_string },
-  { AIM_CLIENT_TLV_CLIENT_COUNTRY, "Client country", dissect_aim_tlv_value_string },
-  { AIM_CLIENT_TLV_BOS_SERVER_STRING, "BOS server string", dissect_aim_tlv_value_string },
-  { AIM_CLIENT_TLV_AUTH_COOKIE, "Authorization cookie", dissect_aim_tlv_value_bytes },
-  { AIM_CLIENT_TLV_ERRORURL, "Error URL", dissect_aim_tlv_value_string },
-  { AIM_CLIENT_TLV_ERRORCODE, "Error Code", dissect_aim_tlv_value_uint16 },
-  { AIM_CLIENT_TLV_DISCONNECT_REASON, "Disconnect Reason", dissect_aim_tlv_value_uint16 },
-  { AIM_CLIENT_TLV_RECONNECT_HOST, "Reconnect Hostname", dissect_aim_tlv_value_string },
-  { AIM_CLIENT_TLV_URL, "URL", dissect_aim_tlv_value_string },
-  { AIM_CLIENT_TLV_DEBUG_DATA, "Debug Data", dissect_aim_tlv_value_uint16 },
-  { AIM_CLIENT_TLV_EMAILADDR, "Account Email address", dissect_aim_tlv_value_string },
-  { AIM_CLIENT_TLV_REGSTATUS, "Registration Status", dissect_aim_tlv_value_uint16 },
-  { AIM_CLIENT_TLV_LATESTBETABUILD, "Latest Beta Build", dissect_aim_tlv_value_uint32 },
-  { AIM_CLIENT_TLV_LATESTBETAURL, "Latest Beta URL", dissect_aim_tlv_value_string },
-  { AIM_CLIENT_TLV_LATESTBETAINFO, "Latest Beta Info", dissect_aim_tlv_value_string },
-  { AIM_CLIENT_TLV_LATESTBETANAME, "Latest Beta Name", dissect_aim_tlv_value_string },
-  { AIM_CLIENT_TLV_LATESTRELEASEBUILD, "Latest Release Build", dissect_aim_tlv_value_uint32 },
-  { AIM_CLIENT_TLV_LATESTRELEASEURL, "Latest Release URL", dissect_aim_tlv_value_string },
-  { AIM_CLIENT_TLV_LATESTRELEASEINFO, "Latest Release Info", dissect_aim_tlv_value_string  },
-  { AIM_CLIENT_TLV_LATESTRELEASENAME, "Latest Release Name", dissect_aim_tlv_value_string },
-  { AIM_CLIENT_TLV_BETA_DIGEST_SIG, "Beta Digest Signature (MD5)" , dissect_aim_tlv_value_bytes },
-  { AIM_CLIENT_TLV_RELEASE_DIGEST_SIG, "Release Digest Signature (MD5)", dissect_aim_tlv_value_bytes },
-  { AIM_CLIENT_TLV_CLIENTUSESSI, "Use SSI", dissect_aim_tlv_value_uint8 },
-  { AIM_CLIENT_TLV_FAMILY_ID, "Service (SNAC Family) ID", dissect_aim_tlv_value_uint16 },
-  { AIM_CLIENT_TLV_CHANGE_PASSWORD_URL, "Change password url", dissect_aim_tlv_value_string },
-  { AIM_CLIENT_TLV_AWAITING_AUTH, "Awaiting Authorization", dissect_aim_tlv_value_bytes },
-  { AIM_CLIENT_TLV_MEMBERS, "Members of this Group", dissect_aim_tlv_value_bytes },
-  { AIM_CLIENT_TLV_VISIBILITY_BITS, "Bitfield", dissect_aim_tlv_value_bytes },
-  { AIM_CLIENT_TLV_PRIVACY, "Privacy Settings" , dissect_aim_tlv_value_uint8 },
-  { AIM_CLIENT_TLV_VISIBLE_CLASS, "Visible To Classes", dissect_aim_tlv_value_userclass },
-  { AIM_CLIENT_TLV_VISIBLE_MISC, "Allow Others to See Data", dissect_aim_tlv_value_bytes },
-  { AIM_CLIENT_TLV_ICQ2K_SHORTCUT, "ICQ2K Shortcut List", dissect_aim_tlv_value_string },
-  { AIM_CLIENT_TLV_FIRST_LOADED_TIME, "First Time Buddy Was Added (Unix Timestamp)" , dissect_aim_tlv_value_uint32 },
-  { AIM_CLIENT_TLV_BUDDY_ICON_MD5SUM, "MD5SUM of Current Buddy Icon", dissect_aim_tlv_value_bytes },
-  { AIM_CLIENT_TLV_GIVEN_NAME, "Locally Specified Buddy Name", dissect_aim_tlv_value_string },
-  { AIM_CLIENT_TLV_LOCAL_EMAIL, "Locally Specified Buddy Email", dissect_aim_tlv_value_string },
-  { AIM_CLIENT_TLV_LOCAL_SMS, "Locally Specified Buddy SMS", dissect_aim_tlv_value_string },
-  { AIM_CLIENT_TLV_LOCAL_COMMENT, "Locally Specified Buddy Comment", dissect_aim_tlv_value_string },
-  { AIM_CLIENT_TLV_LOCAL_PERSONAL_ALERT, "Personal Alert for Buddy", dissect_aim_tlv_value_uint16 },
-  { AIM_CLIENT_TLV_LOCAL_PERSONAL_SOUND, "Personal Sound for Buddy", dissect_aim_tlv_value_string },
-  { AIM_CLIENT_TLV_FIRST_MESSAGE_SENT, "First Time Message Sent to Buddy (Unix Timestamp)", dissect_aim_tlv_value_uint32 },
-  { 0, NULL, NULL }
+       { AIM_CLIENT_TLV_SCREEN_NAME, "Screen name", dissect_aim_tlv_value_string },
+       { AIM_CLIENT_TLV_NEW_ROASTED_PASSWORD, "Roasted password array", dissect_aim_tlv_value_bytes  },
+       { AIM_CLIENT_TLV_OLD_ROASTED_PASSWORD, "Old roasted password array", dissect_aim_tlv_value_bytes  },
+       { AIM_CLIENT_TLV_CLIENT_ID_STRING, "Client id string (name, version)", dissect_aim_tlv_value_string },
+       { AIM_CLIENT_TLV_CLIENT_ID, "Client id number", dissect_aim_tlv_value_uint16 },
+       { AIM_CLIENT_TLV_CLIENT_MAJOR_VERSION, "Client major version", dissect_aim_tlv_value_uint16 },
+       { AIM_CLIENT_TLV_CLIENT_MINOR_VERSION, "Client minor version", dissect_aim_tlv_value_uint16 },
+       { AIM_CLIENT_TLV_CLIENT_LESSER_VERSION, "Client lesser version", dissect_aim_tlv_value_uint16 },
+       { AIM_CLIENT_TLV_CLIENT_BUILD_NUMBER, "Client build number", dissect_aim_tlv_value_uint16 },
+       { AIM_CLIENT_TLV_PASSWORD_MD5, "Password Hash (MD5)", dissect_aim_tlv_value_bytes },
+       { AIM_CLIENT_TLV_CLIENT_DISTRIBUTION_NUM, "Client distribution number", dissect_aim_tlv_value_uint32 },
+       { AIM_CLIENT_TLV_CLIENT_LANGUAGE, "Client language", dissect_aim_tlv_value_string },
+       { AIM_CLIENT_TLV_CLIENT_COUNTRY, "Client country", dissect_aim_tlv_value_string },
+       { AIM_CLIENT_TLV_BOS_SERVER_STRING, "BOS server string", dissect_aim_tlv_value_string },
+       { AIM_CLIENT_TLV_AUTH_COOKIE, "Authorization cookie", dissect_aim_tlv_value_bytes },
+       { AIM_CLIENT_TLV_ERRORURL, "Error URL", dissect_aim_tlv_value_string },
+       { AIM_CLIENT_TLV_ERRORCODE, "Error Code", dissect_aim_tlv_value_uint16 },
+       { AIM_CLIENT_TLV_DISCONNECT_REASON, "Disconnect Reason", dissect_aim_tlv_value_uint16 },
+       { AIM_CLIENT_TLV_RECONNECT_HOST, "Reconnect Hostname", dissect_aim_tlv_value_string },
+       { AIM_CLIENT_TLV_URL, "URL", dissect_aim_tlv_value_string },
+       { AIM_CLIENT_TLV_DEBUG_DATA, "Debug Data", dissect_aim_tlv_value_uint16 },
+       { AIM_CLIENT_TLV_EMAILADDR, "Account Email address", dissect_aim_tlv_value_string },
+       { AIM_CLIENT_TLV_REGSTATUS, "Registration Status", dissect_aim_tlv_value_uint16 },
+       { AIM_CLIENT_TLV_LATESTBETABUILD, "Latest Beta Build", dissect_aim_tlv_value_uint32 },
+       { AIM_CLIENT_TLV_LATESTBETAURL, "Latest Beta URL", dissect_aim_tlv_value_string },
+       { AIM_CLIENT_TLV_LATESTBETAINFO, "Latest Beta Info", dissect_aim_tlv_value_string },
+       { AIM_CLIENT_TLV_LATESTBETANAME, "Latest Beta Name", dissect_aim_tlv_value_string },
+       { AIM_CLIENT_TLV_LATESTRELEASEBUILD, "Latest Release Build", dissect_aim_tlv_value_uint32 },
+       { AIM_CLIENT_TLV_LATESTRELEASEURL, "Latest Release URL", dissect_aim_tlv_value_string },
+       { AIM_CLIENT_TLV_LATESTRELEASEINFO, "Latest Release Info", dissect_aim_tlv_value_string  },
+       { AIM_CLIENT_TLV_LATESTRELEASENAME, "Latest Release Name", dissect_aim_tlv_value_string },
+       { AIM_CLIENT_TLV_BETA_DIGEST_SIG, "Beta Digest Signature (MD5)" , dissect_aim_tlv_value_bytes },
+       { AIM_CLIENT_TLV_RELEASE_DIGEST_SIG, "Release Digest Signature (MD5)", dissect_aim_tlv_value_bytes },
+       { AIM_CLIENT_TLV_CLIENTUSESSI, "Use SSI", dissect_aim_tlv_value_uint8 },
+       { AIM_CLIENT_TLV_FAMILY_ID, "Service (SNAC Family) ID", dissect_aim_tlv_value_uint16 },
+       { AIM_CLIENT_TLV_CHANGE_PASSWORD_URL, "Change password url", dissect_aim_tlv_value_string },
+       { AIM_CLIENT_TLV_AWAITING_AUTH, "Awaiting Authorization", dissect_aim_tlv_value_bytes },
+       { AIM_CLIENT_TLV_MEMBERS, "Members of this Group", dissect_aim_tlv_value_bytes },
+       { AIM_CLIENT_TLV_VISIBILITY_BITS, "Bitfield", dissect_aim_tlv_value_bytes },
+       { AIM_CLIENT_TLV_PRIVACY, "Privacy Settings" , dissect_aim_tlv_value_uint8 },
+       { AIM_CLIENT_TLV_VISIBLE_CLASS, "Visible To Classes", dissect_aim_tlv_value_userclass },
+       { AIM_CLIENT_TLV_VISIBLE_MISC, "Allow Others to See Data", dissect_aim_tlv_value_bytes },
+       { AIM_CLIENT_TLV_ICQ2K_SHORTCUT, "ICQ2K Shortcut List", dissect_aim_tlv_value_string },
+       { AIM_CLIENT_TLV_FIRST_LOADED_TIME, "First Time Buddy Was Added (Unix Timestamp)" , dissect_aim_tlv_value_uint32 },
+       { AIM_CLIENT_TLV_BUDDY_ICON_MD5SUM, "MD5SUM of Current Buddy Icon", dissect_aim_tlv_value_bytes },
+       { AIM_CLIENT_TLV_GIVEN_NAME, "Locally Specified Buddy Name", dissect_aim_tlv_value_string },
+       { AIM_CLIENT_TLV_LOCAL_EMAIL, "Locally Specified Buddy Email", dissect_aim_tlv_value_string },
+       { AIM_CLIENT_TLV_LOCAL_SMS, "Locally Specified Buddy SMS", dissect_aim_tlv_value_string },
+       { AIM_CLIENT_TLV_LOCAL_COMMENT, "Locally Specified Buddy Comment", dissect_aim_tlv_value_string },
+       { AIM_CLIENT_TLV_LOCAL_PERSONAL_ALERT, "Personal Alert for Buddy", dissect_aim_tlv_value_uint16 },
+       { AIM_CLIENT_TLV_LOCAL_PERSONAL_SOUND, "Personal Sound for Buddy", dissect_aim_tlv_value_string },
+       { AIM_CLIENT_TLV_FIRST_MESSAGE_SENT, "First Time Message Sent to Buddy (Unix Timestamp)", dissect_aim_tlv_value_uint32 },
+       { 0, NULL, NULL }
 };
 
 
@@ -253,26 +253,26 @@ static int dissect_aim_tlv_value_client_short_capabilities(proto_item *ti, guint
 #define AIM_ONLINEBUDDY_GEOCOUNTRY     0x002a
 
 const aim_tlv onlinebuddy_tlvs[] = {
-  { AIM_ONLINEBUDDY_USERCLASS, "User class", dissect_aim_tlv_value_userclass },
-  { AIM_ONLINEBUDDY_ONSINCE, "Online since", dissect_aim_tlv_value_uint32 },
-  { AIM_ONLINEBUDDY_IDLETIME, "Idle time (sec)", dissect_aim_tlv_value_uint16 },
-  { AIM_ONLINEBUDDY_MEMBERSINCE, "Member since", dissect_aim_tlv_value_time },
-  { AIM_ONLINEBUDDY_STATUS, "Online status", dissect_aim_tlv_value_userstatus },
-  { AIM_ONLINEBUDDY_IPADDR, "User IP Address", dissect_aim_tlv_value_ipv4 },
-  { AIM_ONLINEBUDDY_DCINFO, "DC Info", dissect_aim_tlv_value_dcinfo},
-  { AIM_ONLINEBUDDY_CAPINFO, "Capability Info", dissect_aim_tlv_value_client_capabilities },
-  { AIM_ONLINEBUDDY_TIMEUPDATE, "Time update", dissect_aim_tlv_value_bytes },
-  { AIM_ONLINEBUDDY_SESSIONLEN, "Session Length (sec)", dissect_aim_tlv_value_uint32 },
-  { AIM_ONLINEBUDDY_ICQSESSIONLEN, "ICQ Session Length (sec)", dissect_aim_tlv_value_uint32 },
-  { AIM_ONLINEBUDDY_MYINSTANCENUM, "Client instance number", dissect_aim_tlv_value_uint8 },
-  { AIM_ONLINEBUDDY_SHORTCAPS, "Short Capabilities", dissect_aim_tlv_value_client_short_capabilities },
-  { AIM_ONLINEBUDDY_BARTINFO, "BART Info", dissect_aim_tlv_value_bytes },
-  { AIM_ONLINEBUDDY_NICKFLAGS2, "Upper bytes of Nick Flags", dissect_aim_tlv_value_bytes },
-  { AIM_ONLINEBUDDY_BUDDYFEEDTIME, "Last Buddy Feed update", dissect_aim_tlv_value_time },
-  { AIM_ONLINEBUDDY_SIGTIME, "Profile set time", dissect_aim_tlv_value_time },
-  { AIM_ONLINEBUDDY_AWAYTIME, "Away set time", dissect_aim_tlv_value_time },
-  { AIM_ONLINEBUDDY_GEOCOUNTRY, "Country code", dissect_aim_tlv_value_string },
-  { 0, NULL, NULL }
+       { AIM_ONLINEBUDDY_USERCLASS, "User class", dissect_aim_tlv_value_userclass },
+       { AIM_ONLINEBUDDY_ONSINCE, "Online since", dissect_aim_tlv_value_uint32 },
+       { AIM_ONLINEBUDDY_IDLETIME, "Idle time (sec)", dissect_aim_tlv_value_uint16 },
+       { AIM_ONLINEBUDDY_MEMBERSINCE, "Member since", dissect_aim_tlv_value_time },
+       { AIM_ONLINEBUDDY_STATUS, "Online status", dissect_aim_tlv_value_userstatus },
+       { AIM_ONLINEBUDDY_IPADDR, "User IP Address", dissect_aim_tlv_value_ipv4 },
+       { AIM_ONLINEBUDDY_DCINFO, "DC Info", dissect_aim_tlv_value_dcinfo},
+       { AIM_ONLINEBUDDY_CAPINFO, "Capability Info", dissect_aim_tlv_value_client_capabilities },
+       { AIM_ONLINEBUDDY_TIMEUPDATE, "Time update", dissect_aim_tlv_value_bytes },
+       { AIM_ONLINEBUDDY_SESSIONLEN, "Session Length (sec)", dissect_aim_tlv_value_uint32 },
+       { AIM_ONLINEBUDDY_ICQSESSIONLEN, "ICQ Session Length (sec)", dissect_aim_tlv_value_uint32 },
+       { AIM_ONLINEBUDDY_MYINSTANCENUM, "Client instance number", dissect_aim_tlv_value_uint8 },
+       { AIM_ONLINEBUDDY_SHORTCAPS, "Short Capabilities", dissect_aim_tlv_value_client_short_capabilities },
+       { AIM_ONLINEBUDDY_BARTINFO, "BART Info", dissect_aim_tlv_value_bytes },
+       { AIM_ONLINEBUDDY_NICKFLAGS2, "Upper bytes of Nick Flags", dissect_aim_tlv_value_bytes },
+       { AIM_ONLINEBUDDY_BUDDYFEEDTIME, "Last Buddy Feed update", dissect_aim_tlv_value_time },
+       { AIM_ONLINEBUDDY_SIGTIME, "Profile set time", dissect_aim_tlv_value_time },
+       { AIM_ONLINEBUDDY_AWAYTIME, "Away set time", dissect_aim_tlv_value_time },
+       { AIM_ONLINEBUDDY_GEOCOUNTRY, "Country code", dissect_aim_tlv_value_string },
+       { 0, NULL, NULL }
 };
 
 #define DC_DISABLED            0x0000
@@ -290,9 +290,9 @@ static const value_string dc_types[] = {
        { 0, NULL },
 };
 
-#define PROTO_VERSION_ICQ98            0x0004
-#define PROTO_VERSION_ICQ99            0x0006
-#define PROTO_VERSION_ICQ2K            0x0007
+#define PROTO_VERSION_ICQ98    0x0004
+#define PROTO_VERSION_ICQ99    0x0006
+#define PROTO_VERSION_ICQ2K    0x0007
 #define PROTO_VERSION_ICQ2K1   0x0008
 #define PROTO_VERSION_ICQLITE  0x0009
 #define PROTO_VERSION_ICQ2K3B  0x000A
@@ -312,8 +312,8 @@ static GList *families = NULL;
 #define AIM_MOTD_TLV_MOTD                                         0x000B
 
 const aim_tlv motd_tlvs[] = {
-  { AIM_MOTD_TLV_MOTD, "Message of the day message", dissect_aim_tlv_value_string },
-  { 0, NULL, NULL }
+       { AIM_MOTD_TLV_MOTD, "Message of the day message", dissect_aim_tlv_value_string },
+       { 0, NULL, NULL }
 };
 
 #define CLASS_UNCONFIRMED            0x00000001
@@ -343,8 +343,8 @@ const aim_tlv motd_tlvs[] = {
 #define FNAC_TLV_FAMILY_VERSION  0x0001
 
 static const aim_tlv fnac_tlvs[] = {
-  { FNAC_TLV_FAMILY_VERSION, "SNAC Family Version", dissect_aim_tlv_value_uint16 },
-  { 0, NULL, NULL }
+       { FNAC_TLV_FAMILY_VERSION, "SNAC Family Version", dissect_aim_tlv_value_uint16 },
+       { 0, NULL, NULL }
 };
 
 #define SSI_OP_RESULT_SUCCESS            0
@@ -363,21 +363,21 @@ static const aim_tlv fnac_tlvs[] = {
 #define SSI_OP_RESULT_TIMEOUT            26
 
 static const value_string aim_ssi_result_codes[] = {
-  { SSI_OP_RESULT_SUCCESS, "Success" },
-  { SSI_OP_RESULT_DB_ERROR, "Some kind of database error" },
-  { SSI_OP_RESULT_NOT_FOUND, "Item was not found for an update or delete" },
-  { SSI_OP_RESULT_ALREADY_EXISTS, "Item already exists for an insert" },
-  { SSI_OP_RESULT_UNAVAILABLE, "Server or database is not available" },
-  { SSI_OP_RESULT_BAD_REQUEST, "Request was not formed well" },
-  { SSI_OP_RESULT_DB_TIME_OUT, "Database timed out" },
-  { SSI_OP_RESULT_OVER_ROW_LIMIT, "Too many items of this class for an insert" },
-  { SSI_OP_RESULT_NOT_EXECUTED, "Not executed due to other error in same request" },
-  { SSI_OP_RESULT_AUTH_REQUIRED, "Buddy List authorization required" },
-  { SSI_OP_RESULT_BAD_LOGINID, "Bad loginId" },
-  { SSI_OP_RESULT_OVER_BUDDY_LIMIT, "Too many buddies" },
-  { SSI_OP_RESULT_INSERT_SMART_GROUP, "Attempt to added a Buddy to a smart group" },
-  { SSI_OP_RESULT_TIMEOUT, "General timeout" },
-  { 0, NULL }
+       { SSI_OP_RESULT_SUCCESS, "Success" },
+       { SSI_OP_RESULT_DB_ERROR, "Some kind of database error" },
+       { SSI_OP_RESULT_NOT_FOUND, "Item was not found for an update or delete" },
+       { SSI_OP_RESULT_ALREADY_EXISTS, "Item already exists for an insert" },
+       { SSI_OP_RESULT_UNAVAILABLE, "Server or database is not available" },
+       { SSI_OP_RESULT_BAD_REQUEST, "Request was not formed well" },
+       { SSI_OP_RESULT_DB_TIME_OUT, "Database timed out" },
+       { SSI_OP_RESULT_OVER_ROW_LIMIT, "Too many items of this class for an insert" },
+       { SSI_OP_RESULT_NOT_EXECUTED, "Not executed due to other error in same request" },
+       { SSI_OP_RESULT_AUTH_REQUIRED, "Buddy List authorization required" },
+       { SSI_OP_RESULT_BAD_LOGINID, "Bad loginId" },
+       { SSI_OP_RESULT_OVER_BUDDY_LIMIT, "Too many buddies" },
+       { SSI_OP_RESULT_INSERT_SMART_GROUP, "Attempt to added a Buddy to a smart group" },
+       { SSI_OP_RESULT_TIMEOUT, "General timeout" },
+       { 0, NULL }
 };
 
 static dissector_table_t subdissector_table;
@@ -516,78 +516,78 @@ aim_get_buddyname( guchar *name, tvbuff_t *tvb, int len_offset, int name_offset)
 void
 aim_get_message( guchar *msg, tvbuff_t *tvb, int msg_offset, int msg_length)
 {
-  int i,j,c;
-  int bracket = FALSE;
-  int max, tagchars = 0;
-  int new_offset = msg_offset;
-  int new_length = msg_length;
-
-
-  /* make sure nothing bigger than 1000 bytes is printed */
-  if( msg_length > 999 ) return;
-
-  memset( msg, '\0', 1000);
-  i = 0;
-  c = 0;
-
-  /* loop until HTML tag is reached - quick&dirty way to find start of message
-   * (it is nearly impossible to find the correct start offset for all client versions) */
-  while( (tagchars < 6) && (new_length > 5) )
-  {
-     j = tvb_get_guint8(tvb, new_offset);
-     if( ( (j == '<') && (tagchars == 0) ) ||
-         ( (j == 'h') && (tagchars == 1) ) ||
-         ( (j == 'H') && (tagchars == 1) ) ||
-         ( (j == 't') && (tagchars == 2) ) ||
-         ( (j == 'T') && (tagchars == 2) ) ||
-         ( (j == 'm') && (tagchars == 3) ) ||
-         ( (j == 'M') && (tagchars == 3) ) ||
-         ( (j == 'l') && (tagchars == 4) ) ||
-         ( (j == 'L') && (tagchars == 4) ) ||
-         ( (j == '>') && (tagchars == 5) ) ) tagchars++;
-     new_offset++;
-     new_length--;
-  }
-
-  /* set offset and length of message to after the first HTML tag */
-  msg_offset = new_offset;
-  msg_length = new_length;
-  max = msg_length - 1;
-  tagchars = 0;
-
-  /* find the rest of the message until either a </html> is reached or the end of the frame.
-   * All other HTML tags are stripped to display only the raw message (printable characters) */
-  while( (c < max) && (tagchars < 7) )
-  {
-     j = tvb_get_guint8(tvb, msg_offset+c);
-
-
-     /* make sure this is an HTML tag by checking the order of the chars */
-     if( ( (j == '<') && (tagchars == 0) ) ||
-         ( (j == '/') && (tagchars == 1) ) ||
-         ( (j == 'h') && (tagchars == 2) ) ||
-         ( (j == 'H') && (tagchars == 2) ) ||
-         ( (j == 't') && (tagchars == 3) ) ||
-         ( (j == 'T') && (tagchars == 3) ) ||
-         ( (j == 'm') && (tagchars == 4) ) ||
-         ( (j == 'M') && (tagchars == 4) ) ||
-         ( (j == 'l') && (tagchars == 5) ) ||
-         ( (j == 'L') && (tagchars == 5) ) ||
-         ( (j == '>') && (tagchars == 6) ) ) tagchars++;
+       int i,j,c;
+       int bracket = FALSE;
+       int max, tagchars = 0;
+       int new_offset = msg_offset;
+       int new_length = msg_length;
+
+
+       /* make sure nothing bigger than 1000 bytes is printed */
+       if( msg_length > 999 ) return;
+
+       memset( msg, '\0', 1000);
+       i = 0;
+       c = 0;
+
+       /* loop until HTML tag is reached - quick&dirty way to find start of message
+        * (it is nearly impossible to find the correct start offset for all client versions) */
+       while( (tagchars < 6) && (new_length > 5) )
+       {
+               j = tvb_get_guint8(tvb, new_offset);
+               if( ( (j == '<') && (tagchars == 0) ) ||
+                   ( (j == 'h') && (tagchars == 1) ) ||
+                   ( (j == 'H') && (tagchars == 1) ) ||
+                   ( (j == 't') && (tagchars == 2) ) ||
+                   ( (j == 'T') && (tagchars == 2) ) ||
+                   ( (j == 'm') && (tagchars == 3) ) ||
+                   ( (j == 'M') && (tagchars == 3) ) ||
+                   ( (j == 'l') && (tagchars == 4) ) ||
+                   ( (j == 'L') && (tagchars == 4) ) ||
+                   ( (j == '>') && (tagchars == 5) ) ) tagchars++;
+               new_offset++;
+               new_length--;
+       }
+
+       /* set offset and length of message to after the first HTML tag */
+       msg_offset = new_offset;
+       msg_length = new_length;
+       max = msg_length - 1;
+       tagchars = 0;
+
+       /* find the rest of the message until either a </html> is reached or the end of the frame.
+        * All other HTML tags are stripped to display only the raw message (printable characters) */
+       while( (c < max) && (tagchars < 7) )
+       {
+               j = tvb_get_guint8(tvb, msg_offset+c);
+
+
+               /* make sure this is an HTML tag by checking the order of the chars */
+               if( ( (j == '<') && (tagchars == 0) ) ||
+                   ( (j == '/') && (tagchars == 1) ) ||
+                   ( (j == 'h') && (tagchars == 2) ) ||
+                   ( (j == 'H') && (tagchars == 2) ) ||
+                   ( (j == 't') && (tagchars == 3) ) ||
+                   ( (j == 'T') && (tagchars == 3) ) ||
+                   ( (j == 'm') && (tagchars == 4) ) ||
+                   ( (j == 'M') && (tagchars == 4) ) ||
+                   ( (j == 'l') && (tagchars == 5) ) ||
+                   ( (j == 'L') && (tagchars == 5) ) ||
+                   ( (j == '>') && (tagchars == 6) ) ) tagchars++;
 
 #ifdef STRIP_TAGS
-     if( j == '<' ) bracket = TRUE;
-     if( j == '>' ) bracket = FALSE;
-     if( (isprint(j) ) && (bracket == FALSE) && (j != '>'))
+               if( j == '<' ) bracket = TRUE;
+               if( j == '>' ) bracket = FALSE;
+               if( (isprint(j) ) && (bracket == FALSE) && (j != '>'))
 #else
-     if( isprint(j) )
+                       if( isprint(j) )
 #endif
-     {
-       msg[i] = j;
-       i++;
-     }
-     c++;
-  }
+                       {
+                               msg[i] = j;
+                               i++;
+                       }
+               c++;
+       }
 }
 
 void
@@ -676,89 +676,89 @@ static void
 dissect_aim_snac(tvbuff_t *tvb, packet_info *pinfo, int offset,
                 proto_tree *aim_tree, proto_tree *root_tree)
 {
-    guint16 family_id;
-    guint16 subtype_id;
-    guint16 flags;
-    guint32 id;
-    proto_item *ti1;
-    struct aiminfo aiminfo;
-    proto_tree *aim_tree_fnac = NULL;
-    tvbuff_t *subtvb;
-    int orig_offset;
-    const aim_subtype *subtype;
-    proto_tree *family_tree = NULL;
-    const aim_family *family;
-    void* pd_save;
-
-    orig_offset = offset;
-    family_id = tvb_get_ntohs(tvb, offset);
-    family = aim_get_family(family_id);
-    offset += 2;
-    subtype_id = tvb_get_ntohs(tvb, offset);
-    subtype = aim_get_subtype(family_id, subtype_id);
-    offset += 2;
-    flags = tvb_get_ntohs(tvb, offset);
-    offset += 2;
-    id = tvb_get_ntohl(tvb, offset);
-    offset += 4;
-
-
-    if( aim_tree )
-    {
-       offset = orig_offset;
-       ti1 = proto_tree_add_text(aim_tree, tvb, 6, 10,
-                                 "FNAC: Family: %s (0x%04x), Subtype: %s (0x%04x)",
-                                 family ? family->name : "Unknown", family_id,
-                                 (subtype && subtype->name) ? subtype->name : "Unknown", subtype_id);
-       aim_tree_fnac = proto_item_add_subtree(ti1, ett_aim_fnac);
-
-       proto_tree_add_uint_format_value (aim_tree_fnac, hf_aim_fnac_family,
-                                         tvb, offset, 2, family_id, "%s (0x%04x)",
-                                         family ? family->name : "Unknown", family_id);
+       guint16 family_id;
+       guint16 subtype_id;
+       guint16 flags;
+       guint32 id;
+       proto_item *ti1;
+       struct aiminfo aiminfo;
+       proto_tree *aim_tree_fnac = NULL;
+       tvbuff_t *subtvb;
+       int orig_offset;
+       const aim_subtype *subtype;
+       proto_tree *family_tree = NULL;
+       const aim_family *family;
+       void* pd_save;
+
+       orig_offset = offset;
+       family_id = tvb_get_ntohs(tvb, offset);
+       family = aim_get_family(family_id);
+       offset += 2;
+       subtype_id = tvb_get_ntohs(tvb, offset);
+       subtype = aim_get_subtype(family_id, subtype_id);
        offset += 2;
+       flags = tvb_get_ntohs(tvb, offset);
+       offset += 2;
+       id = tvb_get_ntohl(tvb, offset);
+       offset += 4;
 
-       proto_tree_add_uint_format_value (aim_tree_fnac, hf_aim_fnac_subtype,
-                                         tvb, offset, 2, subtype_id, "%s (0x%04x)",
+
+       if( aim_tree )
+       {
+               offset = orig_offset;
+               ti1 = proto_tree_add_text(aim_tree, tvb, 6, 10,
+                                         "FNAC: Family: %s (0x%04x), Subtype: %s (0x%04x)",
+                                         family ? family->name : "Unknown", family_id,
                                          (subtype && subtype->name) ? subtype->name : "Unknown", subtype_id);
+               aim_tree_fnac = proto_item_add_subtree(ti1, ett_aim_fnac);
 
-       offset += 2;
+               proto_tree_add_uint_format_value (aim_tree_fnac, hf_aim_fnac_family,
+                                                 tvb, offset, 2, family_id, "%s (0x%04x)",
+                                                 family ? family->name : "Unknown", family_id);
+               offset += 2;
 
-       ti1 = proto_tree_add_uint(aim_tree_fnac, hf_aim_fnac_flags, tvb, offset,
-                                 2, flags);
+               proto_tree_add_uint_format_value (aim_tree_fnac, hf_aim_fnac_subtype,
+                                                 tvb, offset, 2, subtype_id, "%s (0x%04x)",
+                                                 (subtype && subtype->name) ? subtype->name : "Unknown", subtype_id);
 
-       offset = dissect_aim_fnac_flags(tvb, offset, 2, ti1, flags);
+               offset += 2;
 
-       proto_tree_add_uint(aim_tree_fnac, hf_aim_fnac_id, tvb, offset,
-                           4, id);
-       offset += 4;
-    }
+               ti1 = proto_tree_add_uint(aim_tree_fnac, hf_aim_fnac_flags, tvb, offset,
+                                         2, flags);
 
-    if(flags & FNAC_FLAG_CONTAINS_VERSION)
-    {
-       guint16 len = tvb_get_ntohs(tvb, offset);
-       int oldoffset;
-       offset+=2;
-       oldoffset = offset;
+               offset = dissect_aim_fnac_flags(tvb, offset, 2, ti1, flags);
 
-       while(offset < oldoffset + len) {
-           offset = dissect_aim_tlv(tvb, pinfo, offset, aim_tree, fnac_tlvs);
+               proto_tree_add_uint(aim_tree_fnac, hf_aim_fnac_id, tvb, offset,
+                                   4, id);
+               offset += 4;
        }
-    }
 
-    subtvb = tvb_new_subset_remaining(tvb, offset);
-    aiminfo.tcpinfo = pinfo->private_data;
-    aiminfo.family = family_id;
-    aiminfo.subtype = subtype_id;
-    pd_save = pinfo->private_data;
-    pinfo->private_data = &aiminfo;
+       if(flags & FNAC_FLAG_CONTAINS_VERSION)
+       {
+               guint16 len = tvb_get_ntohs(tvb, offset);
+               int oldoffset;
+               offset+=2;
+               oldoffset = offset;
+
+               while(offset < oldoffset + len) {
+                       offset = dissect_aim_tlv(tvb, pinfo, offset, aim_tree, fnac_tlvs);
+               }
+       }
 
-    if (family)
-       col_set_str(pinfo->cinfo, COL_PROTOCOL, family->name);
+       subtvb = tvb_new_subset_remaining(tvb, offset);
+       aiminfo.tcpinfo = pinfo->private_data;
+       aiminfo.family = family_id;
+       aiminfo.subtype = subtype_id;
+       pd_save = pinfo->private_data;
+       pinfo->private_data = &aiminfo;
+
+       if (family)
+               col_set_str(pinfo->cinfo, COL_PROTOCOL, family->name);
 
        if(subtype && family)
        {
-                col_set_str(pinfo->cinfo, COL_INFO, family->name);
-                col_append_fstr(pinfo->cinfo, COL_INFO, ", %s", subtype->name);
+               col_set_str(pinfo->cinfo, COL_INFO, family->name);
+               col_append_fstr(pinfo->cinfo, COL_INFO, ", %s", subtype->name);
        } else {
                col_set_str(pinfo->cinfo, COL_INFO, "SNAC data");
 
@@ -770,20 +770,20 @@ dissect_aim_snac(tvbuff_t *tvb, packet_info *pinfo, int offset,
                col_append_fstr(pinfo->cinfo, COL_INFO, ", Subtype: 0x%04x", subtype_id);
        }
 
-    if(aim_tree && family)
-    {
-       proto_item *ti = proto_tree_add_item(root_tree, family->proto_id, subtvb, 0, -1, FALSE);
-       family_tree = proto_item_add_subtree(ti, family->ett);
-       if(subtype)
-           proto_item_append_text(ti, ", %s", subtype->name);
-    }
+       if(aim_tree && family)
+       {
+               proto_item *ti = proto_tree_add_item(root_tree, family->proto_id, subtvb, 0, -1, FALSE);
+               family_tree = proto_item_add_subtree(ti, family->ett);
+               if(subtype)
+                       proto_item_append_text(ti, ", %s", subtype->name);
+       }
 
-    if(tvb_length_remaining(tvb, offset) > 0 && subtype && subtype->dissector)
-    {
-       subtype->dissector(subtvb, pinfo, family_tree);
-    }
+       if(tvb_length_remaining(tvb, offset) > 0 && subtype && subtype->dissector)
+       {
+               subtype->dissector(subtvb, pinfo, family_tree);
+       }
 
-    pinfo->private_data = pd_save;
+       pinfo->private_data = pd_save;
 }
 
 static void
@@ -830,7 +830,7 @@ dissect_aim_unknown_channel(tvbuff_t *tvb, packet_info *pinfo, int offset,
 
 int
 dissect_aim_buddyname(tvbuff_t *tvb, packet_info *pinfo _U_, int offset,
-                      proto_tree *tree)
+                     proto_tree *tree)
 {
        guint8 buddyname_length = 0;
        proto_item *ti = NULL;
@@ -1312,72 +1312,72 @@ int
 dissect_aim_tlv(tvbuff_t *tvb, packet_info *pinfo _U_, int offset,
                proto_tree *tree, const aim_tlv *tlv)
 {
-  guint16 valueid;
-  guint16 length;
-  int i = 0;
-  const aim_tlv *tmp;
-  const char *desc;
-  proto_item *ti1;
-  proto_tree *tlv_tree;
-  int orig_offset;
-
-  /* Record the starting offset so we can reuse it at the second pass */
-  orig_offset = offset;
-
-  /* Get the value ID */
-  valueid = tvb_get_ntohs(tvb, offset);
-  offset += 2;
-
-  /* Figure out which entry applies from the tlv list */
-  tmp = tlv;
-  while (tmp[i].valueid) {
-    if (tmp[i].valueid == valueid) {
-      /* We found a match */
-      break;
-    }
-    i++;
-  }
-
-  /* At this point, we are either pointing at the correct record, or
-     we didn't find the record, and are pointing at the last item in the
-     list */
-
-  length = tvb_get_ntohs(tvb, offset);
-  offset += 2;
-  offset += length;
-
-  if (tree) {
-    offset = orig_offset;
-
-    if (tmp[i].desc != NULL)
-      desc = tmp[i].desc;
-    else
-      desc = "Unknown";
-
-    ti1 = proto_tree_add_text(tree, tvb, offset, length + 4, "TLV: %s", desc);
-
-    tlv_tree = proto_item_add_subtree(ti1, ett_aim_tlv);
-
-    proto_tree_add_text(tlv_tree, tvb, offset, 2,
-                       "Value ID: %s (0x%04x)", desc, valueid);
-    offset += 2;
-
-    proto_tree_add_text(tlv_tree, tvb, offset, 2,
-                       "Length: %d", length);
-    offset += 2;
-
-    ti1 = proto_tree_add_text(tlv_tree, tvb, offset, length,
-                             "Value");
-
-    if (tmp[i].dissector) {
-      tmp[i].dissector(ti1, valueid, tvb_new_subset(tvb, offset, length, length), pinfo);
-    }
-
-    offset += length;
-  }
-
-  /* Return the new length */
-  return offset;
+       guint16 valueid;
+       guint16 length;
+       int i = 0;
+       const aim_tlv *tmp;
+       const char *desc;
+       proto_item *ti1;
+       proto_tree *tlv_tree;
+       int orig_offset;
+
+       /* Record the starting offset so we can reuse it at the second pass */
+       orig_offset = offset;
+
+       /* Get the value ID */
+       valueid = tvb_get_ntohs(tvb, offset);
+       offset += 2;
+
+       /* Figure out which entry applies from the tlv list */
+       tmp = tlv;
+       while (tmp[i].valueid) {
+               if (tmp[i].valueid == valueid) {
+                       /* We found a match */
+                       break;
+               }
+               i++;
+       }
+
+       /* At this point, we are either pointing at the correct record, or
+          we didn't find the record, and are pointing at the last item in the
+          list */
+
+       length = tvb_get_ntohs(tvb, offset);
+       offset += 2;
+       offset += length;
+
+       if (tree) {
+               offset = orig_offset;
+
+               if (tmp[i].desc != NULL)
+                       desc = tmp[i].desc;
+               else
+                       desc = "Unknown";
+
+               ti1 = proto_tree_add_text(tree, tvb, offset, length + 4, "TLV: %s", desc);
+
+               tlv_tree = proto_item_add_subtree(ti1, ett_aim_tlv);
+
+               proto_tree_add_text(tlv_tree, tvb, offset, 2,
+                                   "Value ID: %s (0x%04x)", desc, valueid);
+               offset += 2;
+
+               proto_tree_add_text(tlv_tree, tvb, offset, 2,
+                                   "Length: %d", length);
+               offset += 2;
+
+               ti1 = proto_tree_add_text(tlv_tree, tvb, offset, length,
+                                         "Value");
+
+               if (tmp[i].dissector) {
+                       tmp[i].dissector(ti1, valueid, tvb_new_subset(tvb, offset, length, length), pinfo);
+               }
+
+               offset += length;
+       }
+
+       /* Return the new length */
+       return offset;
 }
 
 int
@@ -1426,64 +1426,64 @@ get_aim_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset)
 static void
 dissect_aim_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 {
-  /* Header fields */
-  unsigned char  hdr_channel;           /* channel ID */
-  unsigned short hdr_sequence_no;       /* Internal frame sequence number, not needed */
-  unsigned short hdr_data_field_length; /* length of data within frame */
+       /* Header fields */
+       unsigned char  hdr_channel;           /* channel ID */
+       unsigned short hdr_sequence_no;       /* Internal frame sequence number, not needed */
+       unsigned short hdr_data_field_length; /* length of data within frame */
 
-  int offset=0;
+       int offset=0;
 
 /* Set up structures we will need to add the protocol subtree and manage it */
-  proto_item *ti;
-  proto_tree *aim_tree = NULL;
+       proto_item *ti;
+       proto_tree *aim_tree = NULL;
 
 /* Make entries in Protocol column and Info column on summary display */
-  col_set_str(pinfo->cinfo, COL_PROTOCOL, "AIM");
+       col_set_str(pinfo->cinfo, COL_PROTOCOL, "AIM");
 
-  col_set_str(pinfo->cinfo, COL_INFO, "AOL Instant Messenger");
+       col_set_str(pinfo->cinfo, COL_INFO, "AOL Instant Messenger");
 
-  /* get relevant header information */
-  offset += 1;          /* XXX - put the identifier into the tree? */
-  hdr_channel           = tvb_get_guint8(tvb, offset);
-  offset += 1;
-  hdr_sequence_no       = tvb_get_ntohs(tvb, offset);
-  offset += 2;
-  hdr_data_field_length = tvb_get_ntohs(tvb, offset);
-  offset += 2;
+       /* get relevant header information */
+       offset += 1;          /* XXX - put the identifier into the tree? */
+       hdr_channel           = tvb_get_guint8(tvb, offset);
+       offset += 1;
+       hdr_sequence_no       = tvb_get_ntohs(tvb, offset);
+       offset += 2;
+       hdr_data_field_length = tvb_get_ntohs(tvb, offset);
+       offset += 2;
 
 /* In the interest of speed, if "tree" is NULL, don't do any work not
    necessary to generate protocol tree items. */
-  if (tree) {
-    ti = proto_tree_add_item(tree, proto_aim, tvb, 0, -1, FALSE);
-    aim_tree = proto_item_add_subtree(ti, ett_aim);
-    proto_tree_add_uint(aim_tree, hf_aim_cmd_start, tvb, 0, 1, '*');
-    proto_tree_add_item(aim_tree, hf_aim_channel, tvb, 1, 1, FALSE);
-    proto_tree_add_uint(aim_tree, hf_aim_seqno, tvb, 2, 2, hdr_sequence_no);
-    proto_tree_add_uint(aim_tree, hf_aim_data_len, tvb, 4, 2, hdr_data_field_length);
-
-  }
-
-  switch(hdr_channel)
-  {
-    case CHANNEL_NEW_CONN:
-      dissect_aim_newconn(tvb, pinfo, offset, aim_tree);
-      break;
-    case CHANNEL_SNAC_DATA:
-      dissect_aim_snac(tvb, pinfo, offset, aim_tree, tree);
-      break;
-    case CHANNEL_FLAP_ERR:
-      dissect_aim_flap_err(tvb, pinfo, offset, aim_tree);
-      break;
-    case CHANNEL_CLOSE_CONN:
-      dissect_aim_close_conn(tvb, pinfo, offset, aim_tree);
-      break;
-    case CHANNEL_KEEP_ALIVE:
-     dissect_aim_keep_alive(tvb, pinfo, offset, aim_tree);
-     break;
-    default:
-      dissect_aim_unknown_channel(tvb, pinfo, offset, aim_tree);
-      break;
-  }
+       if (tree) {
+               ti = proto_tree_add_item(tree, proto_aim, tvb, 0, -1, FALSE);
+               aim_tree = proto_item_add_subtree(ti, ett_aim);
+               proto_tree_add_uint(aim_tree, hf_aim_cmd_start, tvb, 0, 1, '*');
+               proto_tree_add_item(aim_tree, hf_aim_channel, tvb, 1, 1, FALSE);
+               proto_tree_add_uint(aim_tree, hf_aim_seqno, tvb, 2, 2, hdr_sequence_no);
+               proto_tree_add_uint(aim_tree, hf_aim_data_len, tvb, 4, 2, hdr_data_field_length);
+
+       }
+
+       switch(hdr_channel)
+       {
+       case CHANNEL_NEW_CONN:
+               dissect_aim_newconn(tvb, pinfo, offset, aim_tree);
+               break;
+       case CHANNEL_SNAC_DATA:
+               dissect_aim_snac(tvb, pinfo, offset, aim_tree, tree);
+               break;
+       case CHANNEL_FLAP_ERR:
+               dissect_aim_flap_err(tvb, pinfo, offset, aim_tree);
+               break;
+       case CHANNEL_CLOSE_CONN:
+               dissect_aim_close_conn(tvb, pinfo, offset, aim_tree);
+               break;
+       case CHANNEL_KEEP_ALIVE:
+               dissect_aim_keep_alive(tvb, pinfo, offset, aim_tree);
+               break;
+       default:
+               dissect_aim_unknown_channel(tvb, pinfo, offset, aim_tree);
+               break;
+       }
 
 }
 
@@ -1517,234 +1517,234 @@ proto_register_aim(void)
 {
 
 /* Setup list of header fields */
-  static hf_register_info hf[] = {
-       { &hf_aim_cmd_start,
-               { "Command Start", "aim.cmd_start", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }
-       },
-       { &hf_aim_channel,
-               { "Channel ID", "aim.channel", FT_UINT8, BASE_HEX, VALS(aim_flap_channels), 0x0, NULL, HFILL }
-       },
-       { &hf_aim_seqno,
-               { "Sequence Number", "aim.seqno", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }
-       },
-       { &hf_aim_version,
-               { "Protocol Version", "aim.version", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL },
-       },
-       { &hf_aim_data_len,
-               { "Data Field Length", "aim.datalen", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }
-       },
-       { &hf_aim_data,
-               { "Data", "aim.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
-       },
-       { &hf_aim_signon_challenge_len,
-               { "Signon challenge length", "aim.signon.challengelen", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }
-       },
-       { &hf_aim_signon_challenge,
-               { "Signon challenge", "aim.signon.challenge", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }
-       },
-       { &hf_aim_fnac_family,
-               { "FNAC Family ID", "aim.fnac.family", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }
-       },
-       { &hf_aim_fnac_subtype,
-               { "FNAC Subtype ID", "aim.fnac.subtype", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }
-       },
-       { &hf_aim_fnac_flags,
-               { "FNAC Flags", "aim.fnac.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }
-       },
-       { &hf_aim_fnac_id,
-               { "FNAC ID", "aim.fnac.id", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }
-       },
-       { &hf_aim_infotype,
-               { "Infotype", "aim.infotype", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }
-       },
-       { &hf_aim_buddyname_len,
-               { "Buddyname len", "aim.buddynamelen", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
-       },
-       { &hf_aim_buddyname,
-               { "Buddy Name", "aim.buddyname", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }
-       },
-       { &hf_aim_tlvcount,
-               { "TLV Count", "aim.tlvcount", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL },
-       },
-       { &hf_aim_snac_error,
-               { "SNAC Error", "aim.snac.error", FT_UINT16, BASE_HEX, VALS(aim_snac_errors), 0x0, NULL, HFILL },
-       },
-       { &hf_aim_userclass_unconfirmed,
-               { "AOL Unconfirmed account flag", "aim.userclass.unconfirmed", FT_BOOLEAN, 32, TFS(&tfs_set_notset), CLASS_UNCONFIRMED, NULL, HFILL },
-       },
-       { &hf_aim_userclass_administrator,
-               { "AOL Administrator flag", "aim.userclass.administrator", FT_BOOLEAN, 32, TFS(&tfs_set_notset), CLASS_ADMINISTRATOR, NULL, HFILL },
-       },
-       { &hf_aim_userclass_aol,
-               { "AOL Staff User Flag", "aim.userclass.staff", FT_BOOLEAN, 32, TFS(&tfs_set_notset), CLASS_AOL, NULL, HFILL },
-       },
-       { &hf_aim_userclass_commercial,
-               { "AOL commercial account flag", "aim.userclass.commercial", FT_BOOLEAN, 32, TFS(&tfs_set_notset), CLASS_COMMERCIAL, NULL, HFILL },
-       },
-       { &hf_aim_userclass_aim,
-               { "AIM user flag", "aim.userclass.free", FT_BOOLEAN, 32, TFS(&tfs_set_notset), CLASS_AIM, NULL, HFILL },
-       },
-       { &hf_aim_userclass_away,
-               { "AOL away status flag", "aim.userclass.away", FT_BOOLEAN, 32, TFS(&tfs_set_notset), CLASS_AWAY, NULL, HFILL },
-       },
-       { &hf_aim_userclass_icq,
-               { "ICQ user sign", "aim.userclass.icq", FT_BOOLEAN, 32, TFS(&tfs_set_notset), CLASS_ICQ, NULL, HFILL },
-       },
-       { &hf_aim_userclass_wireless,
-               { "AOL wireless user", "aim.userclass.wireless", FT_BOOLEAN, 32, TFS(&tfs_set_notset), CLASS_WIRELESS, NULL, HFILL },
-       },
-       { &hf_aim_userclass_unknown100,
-               { "Unknown bit", "aim.userclass.unknown100", FT_BOOLEAN, 32, TFS(&tfs_set_notset), CLASS_UNKNOWN100, NULL, HFILL },
-       },
-       { &hf_aim_userclass_imf,
-               { "Using IM Forwarding", "aim.userclass.imf", FT_BOOLEAN, 32, TFS(&tfs_set_notset), CLASS_IMF, NULL, HFILL },
-       },
-       { &hf_aim_userclass_bot,
-               { "Bot User", "aim.userclass.bot", FT_BOOLEAN, 32, TFS(&tfs_set_notset), CLASS_BOT, NULL, HFILL },
-       },
-       { &hf_aim_userclass_unknown800,
-               { "Unknown bit", "aim.userclass.unknown800", FT_BOOLEAN, 32, TFS(&tfs_set_notset), CLASS_UNKNOWN800, NULL, HFILL },
-       },
-       { &hf_aim_userclass_one_way_wireless,
-               { "One Way Wireless Device", "aim.userclass.one_way_wireless", FT_BOOLEAN, 32, TFS(&tfs_set_notset), CLASS_ONE_WAY_WIRELESS, NULL, HFILL },
-       },
-       { &hf_aim_userclass_unknown2000,
-               { "Unknown bit", "aim.userclass.unknown2000", FT_BOOLEAN, 32, TFS(&tfs_set_notset), CLASS_UNKNOWN2000, NULL, HFILL },
-       },
-       { &hf_aim_userclass_unknown4000,
-               { "Unknown bit", "aim.userclass.unknown4000", FT_BOOLEAN, 32, TFS(&tfs_set_notset), CLASS_UNKNOWN4000, NULL, HFILL },
-       },
-       { &hf_aim_userclass_unknown8000,
-               { "Unknown bit", "aim.userclass.unknown8000", FT_BOOLEAN, 32, TFS(&tfs_set_notset), CLASS_UNKNOWN8000, NULL, HFILL },
-       },
-       { &hf_aim_userclass_unknown10000,
-               { "Unknown bit", "aim.userclass.unknown10000", FT_BOOLEAN, 32, TFS(&tfs_set_notset), CLASS_UNKNOWN10000, NULL, HFILL },
-       },
-       { &hf_aim_userclass_unknown20000,
-               { "Unknown bit", "aim.userclass.unknown20000", FT_BOOLEAN, 32, TFS(&tfs_set_notset), CLASS_UNKNOWN20000, NULL, HFILL },
-       },
-       { &hf_aim_userclass_no_knock_knock,
-               { "Do not display the 'not on Buddy List' knock-knock", "aim.userclass.no_knock_knock", FT_BOOLEAN, 32, TFS(&tfs_set_notset), CLASS_NO_KNOCK_KNOCK, NULL, HFILL },
-       },
-       { &hf_aim_userclass_forward_mobile,
-               { "Forward to mobile if not active", "aim.userclass.forward_mobile", FT_BOOLEAN, 32, TFS(&tfs_set_notset), CLASS_FORWARD_MOBILE, NULL, HFILL },
-       },
-       { &hf_aim_nickinfo_caps,
-               { "Client capabilities", "aim.nickinfo.caps", FT_GUID, BASE_NONE, NULL, 0x0, NULL, HFILL },
-       },
-       { &hf_aim_nickinfo_short_caps,
-               { "Short client capabilities", "aim.nickinfo.short_caps", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL },
-       },
-       { &hf_aim_fnac_flag_next_is_related,
-               { "Followed By SNAC with related information", "aim.fnac.flags.next_is_related", FT_BOOLEAN, 16, TFS(&tfs_set_notset), FNAC_FLAG_NEXT_IS_RELATED, NULL, HFILL },
-       },
-       { &hf_aim_fnac_flag_contains_version,
-               { "Contains Version of Family this SNAC is in", "aim.fnac.flags.contains_version", FT_BOOLEAN, 16, TFS(&tfs_set_notset), FNAC_FLAG_CONTAINS_VERSION, NULL, HFILL },
-       },
-       { &hf_aim_userinfo_warninglevel,
-               { "Warning Level", "aim.userinfo.warninglevel", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL },
-       },
-       { &hf_aim_messageblock_featuresdes,
-               { "Features", "aim.messageblock.featuresdes", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL },
-       },
-       { &hf_aim_messageblock_featureslen,
-               { "Features Length", "aim.messageblock.featureslen", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL },
-       },
-       { &hf_aim_messageblock_features,
-               { "Features", "aim.messageblock.features", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL },
-       },
-       { &hf_aim_messageblock_info,
-               { "Block info", "aim.messageblock.info", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL },
-       },
-       { &hf_aim_messageblock_len,
-               { "Block length", "aim.messageblock.length", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL },
-       },
-       { &hf_aim_messageblock_charset,
-               { "Block Character set", "aim.messageblock.charset", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL },
-       },
-       { &hf_aim_messageblock_charsubset,
-               { "Block Character subset", "aim.messageblock.charsubset", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL },
-       },
-       { &hf_aim_messageblock_message,
-               { "Message", "aim.messageblock.message", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL },
-       },
-       { &hf_aim_dcinfo_ip,
-               { "Internal IP address", "aim.dcinfo.addr", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL },
-       },
-       { &hf_aim_dcinfo_tcpport,
-               { "TCP Port", "aim.dcinfo.tcpport", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL },
-       },
-       { &hf_aim_dcinfo_type,
-               { "Type", "aim.dcinfo.type", FT_UINT8, BASE_HEX, VALS(dc_types), 0x0, NULL, HFILL },
-       },
-       { &hf_aim_dcinfo_proto_version,
-               { "Protocol Version", "aim.dcinfo.proto_version", FT_UINT16, BASE_DEC, VALS(protocol_versions), 0x0, NULL, HFILL },
-       },
-       { &hf_aim_dcinfo_auth_cookie,
-               { "Authorization Cookie", "aim.dcinfo.auth_cookie", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL },
-       },
-       { &hf_aim_dcinfo_webport,
-               { "Web Front Port", "aim.dcinfo.webport", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL },
-       },
-       { &hf_aim_dcinfo_client_future,
-               { "Client Futures", "aim.dcinfo.client_futures", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL },
-       },
-       { &hf_aim_dcinfo_last_info_update,
-               { "Last Info Update", "aim.dcinfo.last_info_update", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL },
-       },
-       { &hf_aim_dcinfo_last_ext_info_update,
-               { "Last Extended Info Update", "aim.dcinfo.last_ext_info_update", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL },
-       },
-       { &hf_aim_dcinfo_last_ext_status_update,
-               { "Last Extended Status Update", "aim.dcinfo.last_ext_status_update", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL },
-       },
-       { &hf_aim_dcinfo_unknown,
-               { "Unknown", "aim.dcinfo.unknown", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL },
-       },
-       { &hf_aim_ssi_result_code,
-         { "Last SSI operation result code", "aim.ssi.code", FT_UINT16, BASE_HEX, VALS(aim_ssi_result_codes), 0x0, NULL, HFILL },
-       }
-  };
-
-  /* Setup protocol subtree array */
-  static gint *ett[] = {
-         &ett_aim,
-         &ett_aim_dcinfo,
-         &ett_aim_fnac,
-         &ett_aim_fnac_flags,
-         &ett_aim_tlv,
-         &ett_aim_buddyname,
-         &ett_aim_userclass,
-         &ett_aim_messageblock,
-         &ett_aim_nickinfo_caps,
-         &ett_aim_nickinfo_short_caps,
-         &ett_aim_string08_array
-  };
-  module_t *aim_module;
-
-  /* Register the protocol name and description */
-  proto_aim = proto_register_protocol("AOL Instant Messenger", "AIM", "aim");
-
-  /* Required function calls to register the header fields and subtrees used */
-  proto_register_field_array(proto_aim, hf, array_length(hf));
-  proto_register_subtree_array(ett, array_length(ett));
-
-  aim_module = prefs_register_protocol(proto_aim, NULL);
-
-  prefs_register_bool_preference(aim_module, "desegment",
-                                "Reassemble AIM messages spanning multiple TCP segments",
-                                "Whether the AIM dissector should reassemble messages spanning multiple TCP segments."
-                                " To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.",
-                                &aim_desegment);
-
-  subdissector_table = register_dissector_table("aim.family", "Family ID", FT_UINT16, BASE_HEX);
+       static hf_register_info hf[] = {
+               { &hf_aim_cmd_start,
+                 { "Command Start", "aim.cmd_start", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }
+               },
+               { &hf_aim_channel,
+                 { "Channel ID", "aim.channel", FT_UINT8, BASE_HEX, VALS(aim_flap_channels), 0x0, NULL, HFILL }
+               },
+               { &hf_aim_seqno,
+                 { "Sequence Number", "aim.seqno", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }
+               },
+               { &hf_aim_version,
+                 { "Protocol Version", "aim.version", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL },
+               },
+               { &hf_aim_data_len,
+                 { "Data Field Length", "aim.datalen", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }
+               },
+               { &hf_aim_data,
+                 { "Data", "aim.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
+               },
+               { &hf_aim_signon_challenge_len,
+                 { "Signon challenge length", "aim.signon.challengelen", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }
+               },
+               { &hf_aim_signon_challenge,
+                 { "Signon challenge", "aim.signon.challenge", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }
+               },
+               { &hf_aim_fnac_family,
+                 { "FNAC Family ID", "aim.fnac.family", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }
+               },
+               { &hf_aim_fnac_subtype,
+                 { "FNAC Subtype ID", "aim.fnac.subtype", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }
+               },
+               { &hf_aim_fnac_flags,
+                 { "FNAC Flags", "aim.fnac.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }
+               },
+               { &hf_aim_fnac_id,
+                 { "FNAC ID", "aim.fnac.id", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }
+               },
+               { &hf_aim_infotype,
+                 { "Infotype", "aim.infotype", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }
+               },
+               { &hf_aim_buddyname_len,
+                 { "Buddyname len", "aim.buddynamelen", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
+               },
+               { &hf_aim_buddyname,
+                 { "Buddy Name", "aim.buddyname", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }
+               },
+               { &hf_aim_tlvcount,
+                 { "TLV Count", "aim.tlvcount", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL },
+               },
+               { &hf_aim_snac_error,
+                 { "SNAC Error", "aim.snac.error", FT_UINT16, BASE_HEX, VALS(aim_snac_errors), 0x0, NULL, HFILL },
+               },
+               { &hf_aim_userclass_unconfirmed,
+                 { "AOL Unconfirmed account flag", "aim.userclass.unconfirmed", FT_BOOLEAN, 32, TFS(&tfs_set_notset), CLASS_UNCONFIRMED, NULL, HFILL },
+               },
+               { &hf_aim_userclass_administrator,
+                 { "AOL Administrator flag", "aim.userclass.administrator", FT_BOOLEAN, 32, TFS(&tfs_set_notset), CLASS_ADMINISTRATOR, NULL, HFILL },
+               },
+               { &hf_aim_userclass_aol,
+                 { "AOL Staff User Flag", "aim.userclass.staff", FT_BOOLEAN, 32, TFS(&tfs_set_notset), CLASS_AOL, NULL, HFILL },
+               },
+               { &hf_aim_userclass_commercial,
+                 { "AOL commercial account flag", "aim.userclass.commercial", FT_BOOLEAN, 32, TFS(&tfs_set_notset), CLASS_COMMERCIAL, NULL, HFILL },
+               },
+               { &hf_aim_userclass_aim,
+                 { "AIM user flag", "aim.userclass.free", FT_BOOLEAN, 32, TFS(&tfs_set_notset), CLASS_AIM, NULL, HFILL },
+               },
+               { &hf_aim_userclass_away,
+                 { "AOL away status flag", "aim.userclass.away", FT_BOOLEAN, 32, TFS(&tfs_set_notset), CLASS_AWAY, NULL, HFILL },
+               },
+               { &hf_aim_userclass_icq,
+                 { "ICQ user sign", "aim.userclass.icq", FT_BOOLEAN, 32, TFS(&tfs_set_notset), CLASS_ICQ, NULL, HFILL },
+               },
+               { &hf_aim_userclass_wireless,
+                 { "AOL wireless user", "aim.userclass.wireless", FT_BOOLEAN, 32, TFS(&tfs_set_notset), CLASS_WIRELESS, NULL, HFILL },
+               },
+               { &hf_aim_userclass_unknown100,
+                 { "Unknown bit", "aim.userclass.unknown100", FT_BOOLEAN, 32, TFS(&tfs_set_notset), CLASS_UNKNOWN100, NULL, HFILL },
+               },
+               { &hf_aim_userclass_imf,
+                 { "Using IM Forwarding", "aim.userclass.imf", FT_BOOLEAN, 32, TFS(&tfs_set_notset), CLASS_IMF, NULL, HFILL },
+               },
+               { &hf_aim_userclass_bot,
+                 { "Bot User", "aim.userclass.bot", FT_BOOLEAN, 32, TFS(&tfs_set_notset), CLASS_BOT, NULL, HFILL },
+               },
+               { &hf_aim_userclass_unknown800,
+                 { "Unknown bit", "aim.userclass.unknown800", FT_BOOLEAN, 32, TFS(&tfs_set_notset), CLASS_UNKNOWN800, NULL, HFILL },
+               },
+               { &hf_aim_userclass_one_way_wireless,
+                 { "One Way Wireless Device", "aim.userclass.one_way_wireless", FT_BOOLEAN, 32, TFS(&tfs_set_notset), CLASS_ONE_WAY_WIRELESS, NULL, HFILL },
+               },
+               { &hf_aim_userclass_unknown2000,
+                 { "Unknown bit", "aim.userclass.unknown2000", FT_BOOLEAN, 32, TFS(&tfs_set_notset), CLASS_UNKNOWN2000, NULL, HFILL },
+               },
+               { &hf_aim_userclass_unknown4000,
+                 { "Unknown bit", "aim.userclass.unknown4000", FT_BOOLEAN, 32, TFS(&tfs_set_notset), CLASS_UNKNOWN4000, NULL, HFILL },
+               },
+               { &hf_aim_userclass_unknown8000,
+                 { "Unknown bit", "aim.userclass.unknown8000", FT_BOOLEAN, 32, TFS(&tfs_set_notset), CLASS_UNKNOWN8000, NULL, HFILL },
+               },
+               { &hf_aim_userclass_unknown10000,
+                 { "Unknown bit", "aim.userclass.unknown10000", FT_BOOLEAN, 32, TFS(&tfs_set_notset), CLASS_UNKNOWN10000, NULL, HFILL },
+               },
+               { &hf_aim_userclass_unknown20000,
+                 { "Unknown bit", "aim.userclass.unknown20000", FT_BOOLEAN, 32, TFS(&tfs_set_notset), CLASS_UNKNOWN20000, NULL, HFILL },
+               },
+               { &hf_aim_userclass_no_knock_knock,
+                 { "Do not display the 'not on Buddy List' knock-knock", "aim.userclass.no_knock_knock", FT_BOOLEAN, 32, TFS(&tfs_set_notset), CLASS_NO_KNOCK_KNOCK, NULL, HFILL },
+               },
+               { &hf_aim_userclass_forward_mobile,
+                 { "Forward to mobile if not active", "aim.userclass.forward_mobile", FT_BOOLEAN, 32, TFS(&tfs_set_notset), CLASS_FORWARD_MOBILE, NULL, HFILL },
+               },
+               { &hf_aim_nickinfo_caps,
+                 { "Client capabilities", "aim.nickinfo.caps", FT_GUID, BASE_NONE, NULL, 0x0, NULL, HFILL },
+               },
+               { &hf_aim_nickinfo_short_caps,
+                 { "Short client capabilities", "aim.nickinfo.short_caps", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL },
+               },
+               { &hf_aim_fnac_flag_next_is_related,
+                 { "Followed By SNAC with related information", "aim.fnac.flags.next_is_related", FT_BOOLEAN, 16, TFS(&tfs_set_notset), FNAC_FLAG_NEXT_IS_RELATED, NULL, HFILL },
+               },
+               { &hf_aim_fnac_flag_contains_version,
+                 { "Contains Version of Family this SNAC is in", "aim.fnac.flags.contains_version", FT_BOOLEAN, 16, TFS(&tfs_set_notset), FNAC_FLAG_CONTAINS_VERSION, NULL, HFILL },
+               },
+               { &hf_aim_userinfo_warninglevel,
+                 { "Warning Level", "aim.userinfo.warninglevel", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL },
+               },
+               { &hf_aim_messageblock_featuresdes,
+                 { "Features", "aim.messageblock.featuresdes", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL },
+               },
+               { &hf_aim_messageblock_featureslen,
+                 { "Features Length", "aim.messageblock.featureslen", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL },
+               },
+               { &hf_aim_messageblock_features,
+                 { "Features", "aim.messageblock.features", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL },
+               },
+               { &hf_aim_messageblock_info,
+                 { "Block info", "aim.messageblock.info", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL },
+               },
+               { &hf_aim_messageblock_len,
+                 { "Block length", "aim.messageblock.length", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL },
+               },
+               { &hf_aim_messageblock_charset,
+                 { "Block Character set", "aim.messageblock.charset", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL },
+               },
+               { &hf_aim_messageblock_charsubset,
+                 { "Block Character subset", "aim.messageblock.charsubset", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL },
+               },
+               { &hf_aim_messageblock_message,
+                 { "Message", "aim.messageblock.message", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL },
+               },
+               { &hf_aim_dcinfo_ip,
+                 { "Internal IP address", "aim.dcinfo.addr", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL },
+               },
+               { &hf_aim_dcinfo_tcpport,
+                 { "TCP Port", "aim.dcinfo.tcpport", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL },
+               },
+               { &hf_aim_dcinfo_type,
+                 { "Type", "aim.dcinfo.type", FT_UINT8, BASE_HEX, VALS(dc_types), 0x0, NULL, HFILL },
+               },
+               { &hf_aim_dcinfo_proto_version,
+                 { "Protocol Version", "aim.dcinfo.proto_version", FT_UINT16, BASE_DEC, VALS(protocol_versions), 0x0, NULL, HFILL },
+               },
+               { &hf_aim_dcinfo_auth_cookie,
+                 { "Authorization Cookie", "aim.dcinfo.auth_cookie", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL },
+               },
+               { &hf_aim_dcinfo_webport,
+                 { "Web Front Port", "aim.dcinfo.webport", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL },
+               },
+               { &hf_aim_dcinfo_client_future,
+                 { "Client Futures", "aim.dcinfo.client_futures", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL },
+               },
+               { &hf_aim_dcinfo_last_info_update,
+                 { "Last Info Update", "aim.dcinfo.last_info_update", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL },
+               },
+               { &hf_aim_dcinfo_last_ext_info_update,
+                 { "Last Extended Info Update", "aim.dcinfo.last_ext_info_update", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL },
+               },
+               { &hf_aim_dcinfo_last_ext_status_update,
+                 { "Last Extended Status Update", "aim.dcinfo.last_ext_status_update", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL },
+               },
+               { &hf_aim_dcinfo_unknown,
+                 { "Unknown", "aim.dcinfo.unknown", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL },
+               },
+               { &hf_aim_ssi_result_code,
+                 { "Last SSI operation result code", "aim.ssi.code", FT_UINT16, BASE_HEX, VALS(aim_ssi_result_codes), 0x0, NULL, HFILL },
+               }
+       };
+
+       /* Setup protocol subtree array */
+       static gint *ett[] = {
+               &ett_aim,
+               &ett_aim_dcinfo,
+               &ett_aim_fnac,
+               &ett_aim_fnac_flags,
+               &ett_aim_tlv,
+               &ett_aim_buddyname,
+               &ett_aim_userclass,
+               &ett_aim_messageblock,
+               &ett_aim_nickinfo_caps,
+               &ett_aim_nickinfo_short_caps,
+               &ett_aim_string08_array
+       };
+       module_t *aim_module;
+
+       /* Register the protocol name and description */
+       proto_aim = proto_register_protocol("AOL Instant Messenger", "AIM", "aim");
+
+       /* Required function calls to register the header fields and subtrees used */
+       proto_register_field_array(proto_aim, hf, array_length(hf));
+       proto_register_subtree_array(ett, array_length(ett));
+
+       aim_module = prefs_register_protocol(proto_aim, NULL);
+
+       prefs_register_bool_preference(aim_module, "desegment",
+                                      "Reassemble AIM messages spanning multiple TCP segments",
+                                      "Whether the AIM dissector should reassemble messages spanning multiple TCP segments."
+                                      " To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.",
+                                      &aim_desegment);
+
+       subdissector_table = register_dissector_table("aim.family", "Family ID", FT_UINT16, BASE_HEX);
 }
 
 void
 proto_reg_handoff_aim(void)
 {
-  dissector_handle_t aim_handle;
+       dissector_handle_t aim_handle;
 
-  aim_handle = new_create_dissector_handle(dissect_aim, proto_aim);
-  dissector_add("tcp.port", TCP_PORT_AIM, aim_handle);
+       aim_handle = new_create_dissector_handle(dissect_aim, proto_aim);
+       dissector_add("tcp.port", TCP_PORT_AIM, aim_handle);
 }
index 7f79678538d9cabdc25dbfb0ac7dc960525e676f..b4ab7e239ca5371cb6b3831a8b55a3a61cadd794 100644 (file)
@@ -87,37 +87,37 @@ void
 proto_register_airopeek(void)
 {
   static hf_register_info hf[] = {
-       { &hf_airopeek_unknown1,
-           { "Unknown1",      "airopeek.unknown1", FT_BYTES, BASE_NONE, NULL,
-             0x0, NULL, HFILL }},
+    { &hf_airopeek_unknown1,
+      { "Unknown1",      "airopeek.unknown1", FT_BYTES, BASE_NONE, NULL,
+        0x0, NULL, HFILL }},
 
-       { &hf_airopeek_unknown2,
-           { "caplength1",      "airopeek.unknown2", FT_UINT16, BASE_DEC, NULL,
-             0x0, NULL, HFILL }},
+    { &hf_airopeek_unknown2,
+      { "caplength1",      "airopeek.unknown2", FT_UINT16, BASE_DEC, NULL,
+        0x0, NULL, HFILL }},
 
-       { &hf_airopeek_unknown3,
-           { "caplength2",      "airopeek.unknown3", FT_UINT16, BASE_DEC, NULL,
-             0x0, NULL, HFILL }},
+    { &hf_airopeek_unknown3,
+      { "caplength2",      "airopeek.unknown3", FT_UINT16, BASE_DEC, NULL,
+        0x0, NULL, HFILL }},
 
-       { &hf_airopeek_unknown4,
-           { "Unknown4",      "airopeek.unknown4", FT_BYTES, BASE_NONE, NULL,
-             0x0, NULL, HFILL }},
+    { &hf_airopeek_unknown4,
+      { "Unknown4",      "airopeek.unknown4", FT_BYTES, BASE_NONE, NULL,
+        0x0, NULL, HFILL }},
 
-       { &hf_airopeek_unknown5,
-           { "Unknown5",      "airopeek.unknown5", FT_BYTES, BASE_NONE, NULL,
-             0x0, NULL, HFILL }},
+    { &hf_airopeek_unknown5,
+      { "Unknown5",      "airopeek.unknown5", FT_BYTES, BASE_NONE, NULL,
+        0x0, NULL, HFILL }},
 
-       { &hf_airopeek_unknown6,
-           { "Unknown6",      "airopeek.unknown6", FT_BYTES, BASE_NONE, NULL,
-             0x0, NULL, HFILL }},
+    { &hf_airopeek_unknown6,
+      { "Unknown6",      "airopeek.unknown6", FT_BYTES, BASE_NONE, NULL,
+        0x0, NULL, HFILL }},
 
-       { &hf_airopeek_timestamp,
-           { "Timestamp?",       "airopeek.timestamp", FT_UINT32, BASE_DEC, NULL,
-             0x0, NULL, HFILL }},
+    { &hf_airopeek_timestamp,
+      { "Timestamp?",       "airopeek.timestamp", FT_UINT32, BASE_DEC, NULL,
+        0x0, NULL, HFILL }},
 
-       { &hf_airopeek_channel,
-           { "Channel",       "airopeek.channel", FT_UINT8, BASE_DEC, NULL,
-             0x0, NULL, HFILL }},
+    { &hf_airopeek_channel,
+      { "Channel",       "airopeek.channel", FT_UINT8, BASE_DEC, NULL,
+        0x0, NULL, HFILL }},
 
   };
   static gint *ett[] = {
@@ -125,7 +125,7 @@ proto_register_airopeek(void)
   };
 
   proto_airopeek = proto_register_protocol(
-       "Airopeek encapsulated IEEE 802.11", "AIROPEEK", "airopeek");
+    "Airopeek encapsulated IEEE 802.11", "AIROPEEK", "airopeek");
   proto_register_field_array(proto_airopeek, hf, array_length(hf));
   proto_register_subtree_array(ett, array_length(ett));
 }
index 8351e756cd5f1a84451d617f67dba493d5f32153..3d6f221e10acfcf59af1206665f3921fca665abb 100644 (file)
@@ -225,7 +225,7 @@ static gint ett_ajp13 = -1;
 
 typedef struct ajp13_conv_data {
   int content_length;
-  gboolean was_get_body_chunk; /* XXX - not used */
+  gboolean was_get_body_chunk;  /* XXX - not used */
 } ajp13_conv_data;
 
 typedef struct ajp13_frame_data {
@@ -388,13 +388,12 @@ display_rsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ajp13_tree, ajp13_con
     }
 
   } else if (mcode == 6) {
-       guint16 rlen;
-       rlen = tvb_get_ntohs(tvb, pos);
-       cd->content_length = rlen;
+    guint16 rlen;
+    rlen = tvb_get_ntohs(tvb, pos);
+    cd->content_length = rlen;
     if (ajp13_tree)
       proto_tree_add_item(ajp13_tree, hf_ajp13_rlen, tvb, pos, 2, 0);
     pos+=2;
-       
 
   } else if ( mcode == 9 ) {
 
index 193f0b10655171de7221221cd7aec7f129f21cd2..7d7d8c93e9976eb6bd8b56032924f21cefe5799d 100644 (file)
@@ -273,7 +273,7 @@ char_def_alphabet_ext_decode(unsigned char value)
     }
 }
 
-static gunichar 
+static gunichar
 char_def_alphabet_decode(unsigned char value)
 {
     if (value < GN_CHAR_ALPHABET_SIZE)
@@ -322,7 +322,7 @@ decode_7_bits(tvbuff_t *tvb, guint32 *offset, guint8 num_fields, guint8 *last_oc
 
     if (num_fields == 0)
     {
-               return 0;
+        return 0;
     }
 
     /* saved_offset = *offset; */
@@ -395,7 +395,7 @@ decode_7_bits(tvbuff_t *tvb, guint32 *offset, guint8 num_fields, guint8 *last_oc
     buf[i] = '\0';
     *last_bit = bit;
     *last_oct = (bit == 1) ? oct : oct2;
-       return i;
+    return i;
 }
 
 /* PARAM FUNCTIONS */
@@ -453,13 +453,13 @@ tele_param_msg_status(tvbuff_t *tvb, proto_tree *tree, guint len, guint32 offset
     guint8     msg_status_code;
     const gchar *str = NULL;
 
-    /* Chceck if the exact length */  
+    /* Chceck if the exact length */
     EXACT_DATA_CHECK(len, 1);
-   
+
     /* get the status octet? */
 
     oct = tvb_get_guint8(tvb, offset);
-   
+
 
     /* error class filter */
     proto_tree_add_item(tree, hf_ansi_637_tele_msg_status,tvb, offset, 1, FALSE);
@@ -483,9 +483,9 @@ tele_param_msg_status(tvbuff_t *tvb, proto_tree *tree, guint len, guint32 offset
                         "%s :  Erorr Class: %s",
                         ansi_637_bigbuf,
                         str);
-       
 
-        
+
+
     msg_status_code = (oct & 0x3f);
 
     if (error_class == 0x00){
@@ -517,9 +517,9 @@ tele_param_msg_status(tvbuff_t *tvb, proto_tree *tree, guint len, guint32 offset
         proto_tree_add_text(tree, tvb, offset, 1,
                             "%s :  Message status code: %s",
                             ansi_637_bigbuf,
-                            str);   
+                            str);
     }
-  
+
     if (error_class == 0x03){
         switch (msg_status_code)
         {
@@ -557,7 +557,7 @@ tele_param_user_data(tvbuff_t *tvb, proto_tree *tree, guint len, guint32 offset)
     guint32    i , out_len;
     const gchar        *str = NULL;
 
-    /*add more translation UCS  , IA5 , latin ,  latin \ hebrew ,gsm 7BIT*/ 
+    /*add more translation UCS  , IA5 , latin ,  latin \ hebrew ,gsm 7BIT*/
     proto_item *ucs2_item;
     gchar *utf8_text = NULL;
     GIConv cd;
@@ -700,32 +700,32 @@ tele_param_user_data(tvbuff_t *tvb, proto_tree *tree, guint len, guint32 offset)
                ansi_637_bigbuf);
        }
     }
-       else if (encoding == 0x03)/* IA5 */
-       {
-            i = (num_fields * 7) - 3;
-            required_octs = (i / 8) + ((i % 8) ? 1 : 0);
+    else if (encoding == 0x03)/* IA5 */
+    {
+        i = (num_fields * 7) - 3;
+        required_octs = (i / 8) + ((i % 8) ? 1 : 0);
 
-            if (required_octs + used > len)
-            {
-                proto_tree_add_text(tree, tvb, offset, 1,
-                                    "Missing %d octet(s) for number of fields",
-                                    (required_octs + used) - len);
+        if (required_octs + used > len)
+        {
+            proto_tree_add_text(tree, tvb, offset, 1,
+                                "Missing %d octet(s) for number of fields",
+                                (required_octs + used) - len);
 
-                return;
-            }
+            return;
+        }
 
-            bit = 3;
-            saved_offset = offset;
-            out_len = decode_7_bits(tvb, &offset, num_fields, &oct, &bit, ansi_637_bigbuf);
-            IA5_7BIT_decode(ia5_637_bigbuf, ansi_637_bigbuf, out_len);
+        bit = 3;
+        saved_offset = offset;
+        out_len = decode_7_bits(tvb, &offset, num_fields, &oct, &bit, ansi_637_bigbuf);
+        IA5_7BIT_decode(ia5_637_bigbuf, ansi_637_bigbuf, out_len);
 
-            proto_tree_add_text(tree, tvb, saved_offset, offset - saved_offset,
-                                "Encoded user data: %s",
-                                ia5_637_bigbuf);
-       }
-       /*TODO UCS else if (encoding == 0x04)
-       {
-       }*/
+        proto_tree_add_text(tree, tvb, saved_offset, offset - saved_offset,
+                            "Encoded user data: %s",
+                            ia5_637_bigbuf);
+    }
+    /*TODO UCS else if (encoding == 0x04)
+      {
+      }*/
     else if (encoding == 0x07)/* Latin/Hebrew */
     {
         saved_offset = offset - 1;
@@ -733,7 +733,7 @@ tele_param_user_data(tvbuff_t *tvb, proto_tree *tree, guint len, guint32 offset)
         {
             oct = tvb_get_guint8(tvb, saved_offset);
             oct2 = tvb_get_guint8(tvb, saved_offset + 1);;
-            ansi_637_bigbuf[i] = ((oct & 0x07) << 5) | ((oct2 & 0xf8) >> 3);                   
+            ansi_637_bigbuf[i] = ((oct & 0x07) << 5) | ((oct2 & 0xf8) >> 3);
             saved_offset++;
         }
 
@@ -774,7 +774,7 @@ tele_param_user_data(tvbuff_t *tvb, proto_tree *tree, guint len, guint32 offset)
             else
             {
                 ucs2_item = proto_tree_add_text(tree, tvb, offset, num_fields, "%s", "Failed on iso-8859-1 contact Wireshark developers");
-            }                  
+            }
             if(utf8_text)
                 g_free(utf8_text);
             g_iconv_close(cd);
@@ -2336,10 +2336,10 @@ proto_reg_handoff_ansi_637(void)
 
     ansi_637_tele_handle = create_dissector_handle(dissect_ansi_637_tele, proto_ansi_637_tele);
     ansi_637_trans_handle = create_dissector_handle(dissect_ansi_637_trans, proto_ansi_637_trans);
-       ansi_637_trans_app_handle = create_dissector_handle(dissect_ansi_637_trans_app, proto_ansi_637_trans);
+    ansi_637_trans_app_handle = create_dissector_handle(dissect_ansi_637_trans_app, proto_ansi_637_trans);
 
-       /* Dissect messages embedded in SIP */
-       dissector_add_string("media_type","application/vnd.3gpp2.sms", ansi_637_trans_handle);
+    /* Dissect messages embedded in SIP */
+    dissector_add_string("media_type","application/vnd.3gpp2.sms", ansi_637_trans_handle);
     /*
      * register for all known teleservices
      * '-1' is to stop before trailing '0' entry
index df572531a29ea11ed8aa3277fd17c99a6ab33bbf..58498461298018e7f10a5a5166cac497268bef10 100644 (file)
  * modify it under the terms of the GNU General Public License
  * as published by the Free Software Foundation; either version 2
  * of the License, or (at your option) any later version.
- * 
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -213,7 +213,7 @@ dissect_arcnet_common (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
          after it are padding. */
          proto_tree_add_uint (arcnet_tree, hf_arcnet_exception_flag, tvb, offset, 1,
                             split_flag);
-      offset++;  
+      offset++;
 
       proto_tree_add_text (arcnet_tree, tvb, offset, 2, "Padding");
       offset += 2;
@@ -224,12 +224,12 @@ dissect_arcnet_common (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
 
       /* And after that comes the real split flag. */
       split_flag = tvb_get_guint8 (tvb, offset);
-    } 
+    }
 
     proto_tree_add_uint (arcnet_tree, hf_arcnet_split_flag, tvb, offset, 1,
                           split_flag);
     offset++;
-                         
+
     proto_tree_add_item (arcnet_tree, hf_arcnet_sequence, tvb, offset, 2, FALSE);
     offset += 2;
 
@@ -238,7 +238,7 @@ dissect_arcnet_common (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
 
   /* Set the length of the ARCNET header protocol tree item. */
   proto_item_set_len(ti, offset);
-  
+
   next_tvb = tvb_new_subset_remaining (tvb, offset);
 
   if (!dissector_try_port (arcnet_dissector_table, protID,
@@ -260,7 +260,7 @@ dissect_arcnet_common (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
 static void
 dissect_arcnet (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
 {
-       dissect_arcnet_common (tvb, pinfo, tree, FALSE, TRUE);
+  dissect_arcnet_common (tvb, pinfo, tree, FALSE, TRUE);
 }
 
 /*
@@ -271,7 +271,7 @@ dissect_arcnet (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
 static void
 dissect_arcnet_linux (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
 {
-       dissect_arcnet_common (tvb, pinfo, tree, TRUE, FALSE);
+  dissect_arcnet_common (tvb, pinfo, tree, TRUE, FALSE);
 }
 
 static const value_string arcnet_prot_id_vals[] = {
index 8cf50d38cde49678133cd514a83279a987c8644d..8e4b4b09e12d3653d21586485a73cf6ab3de3ff1 100644 (file)
@@ -790,7 +790,7 @@ dissect_artnet_output(tvbuff_t *tvb, guint offset, proto_tree *tree)
                            offset,
                            length,
                            FALSE);
-                                                                                                                
+
   si = proto_item_add_subtree(hi, ett_artnet);
 
   row_count = (length/global_disp_col_count) + ((length%global_disp_col_count) == 0 ? 0 : 1);
@@ -820,9 +820,9 @@ dissect_artnet_output(tvbuff_t *tvb, guint offset, proto_tree *tree)
         ptr += g_snprintf(ptr, (gulong)(sizeof string - strlen(string)), chan_format[global_disp_chan_val_type], v);
       }
     }
-    
+
     proto_tree_add_none_format(si,hf_artnet_output_dmx_data, tvb,
-                               offset+(r*global_disp_col_count), c, 
+                               offset+(r*global_disp_col_count), c,
                                string_format[global_disp_chan_nr_type], (r*global_disp_col_count)+1, string);
     ptr = string;
   }
@@ -1256,16 +1256,16 @@ dissect_artnet_rdm(tvbuff_t *tvb, guint offset, proto_tree *tree,  packet_info *
 
   size = tvb_reported_length_remaining(tvb, offset);
 
-  save_info=col_get_writable(pinfo->cinfo); 
+  save_info=col_get_writable(pinfo->cinfo);
   col_set_writable(pinfo->cinfo, FALSE);
 
   if (!next_tvb)
     next_tvb = tvb_new_subset_remaining(tvb, offset);
+
   call_dissector(rdm_handle, next_tvb, pinfo, tree);
 
   col_set_writable(pinfo->cinfo, save_info);
-  
+
   size = tvb_reported_length_remaining(tvb, offset) - size;
 
   return offset + size;
@@ -1484,8 +1484,8 @@ dissect_artnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
         size = dissect_artnet_address( tvb, offset, si );
         size -= offset;
 
-        proto_item_set_len(si, size); 
-      }        
+        proto_item_set_len(si, size);
+      }
       break;
 
     case ARTNET_OP_INPUT:
@@ -1498,7 +1498,7 @@ dissect_artnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
                                  FALSE);
 
         si = proto_item_add_subtree(hi, ett_artnet);
-        
+
         size = dissect_artnet_input( tvb, offset, si );
         size -= offset;
 
@@ -1516,11 +1516,11 @@ dissect_artnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
                                  FALSE);
 
         si = proto_item_add_subtree(hi, ett_artnet);
-        
+
         size = dissect_artnet_video_setup( tvb, offset, si );
         size -= offset;
 
-        proto_item_set_len(si, size); 
+        proto_item_set_len(si, size);
       }
       break;
 
@@ -1595,7 +1595,7 @@ dissect_artnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
         proto_item_set_len(si, size);
       }
       break;
-    
+
     case ARTNET_OP_TOD_REQUEST:
       if (tree) {
         hi = proto_tree_add_item(artnet_tree,
@@ -2665,8 +2665,8 @@ proto_register_artnet(void) {
                                 10,&global_udp_port_artnet);
 
   prefs_register_enum_preference(artnet_module, "dmx_disp_chan_val_type",
-            "DMX Display channel value type", 
-            "The way DMX values are displayed", 
+            "DMX Display channel value type",
+            "The way DMX values are displayed",
                                 &global_disp_chan_val_type,
                                 disp_chan_val_types, FALSE);
 
@@ -2700,6 +2700,6 @@ proto_reg_handoff_artnet(void) {
   }
 
   udp_port_artnet = global_udp_port_artnet;
-  
+
   dissector_add("udp.port",global_udp_port_artnet,artnet_handle);
 }
index bab9c02efcb35c053dcc4a950ee234d0a24fc501..6983aecaee44652db088d15abbdec723610ccb74 100644 (file)
@@ -149,7 +149,7 @@ proto_reg_handoff_aruba_erm(void)
         initialized = TRUE;
     } else {
         range_foreach(aruba_erm_port_range, range_delete_callback);
-       g_free(aruba_erm_port_range);
+        g_free(aruba_erm_port_range);
     }
 
     aruba_erm_port_range = range_copy(global_aruba_erm_port_range);
index d49c3134f1bbe2182904993c8bdd517848ac52ec..e1ec7ddec1191146cbeefaf043d66991cd0f3873 100644 (file)
@@ -96,17 +96,17 @@ static dissector_handle_t ddp_handle;
 
 /* flags for ATP options (and control byte)
 */
-#define ATP_XO          0x20 /* (1<<5)          eXactly Once mode */
-#define ATP_EOM         0x10 /* (1<<4)          End Of Message */
-#define ATP_STS         0x08 /* (1<<3)          Transaction Status */
+#define ATP_XO          0x20 /* (1<<5)     eXactly Once mode  */
+#define ATP_EOM         0x10 /* (1<<4)     End Of Message     */
+#define ATP_STS         0x08 /* (1<<3)     Transaction Status */
 
 /* function codes
 */
 #define ATP_FUNCMASK    (3<<6)          /* mask all but function */
 
-#define ATP_TREQ        1 /* (1<<6)        Trans. REQuest */
-#define ATP_TRESP       2 /* (2<<6)        Trans. RESPonse */
-#define ATP_TREL        3 /* (3<<6)        Trans. RELease */
+#define ATP_TREQ        1    /* (1<<6)     Trans. REQuest  */
+#define ATP_TRESP       2    /* (2<<6)     Trans. RESPonse */
+#define ATP_TREL        3    /* (3<<6)     Trans. RELease  */
 
 /* ------------------------- */
 static dissector_handle_t asp_handle;
@@ -142,7 +142,7 @@ static int hf_zip_function = -1;
 static int hf_zip_atp_function = -1;
 static int hf_zip_start_index = -1;
 static int hf_zip_count = -1;
-static int hf_zip_zero_value   = -1;
+static int hf_zip_zero_value = -1;
 
 static int hf_zip_network_count = -1;
 static int hf_zip_network = -1;
@@ -214,14 +214,14 @@ static gint ett_zip_network_list = -1;
 static int proto_asp            = -1;
 static int hf_asp_func          = -1;
 static int hf_asp_error         = -1;
-static int hf_asp_socket       = -1;
-static int hf_asp_version      = -1;
-static int hf_asp_session_id   = -1;
-static int hf_asp_zero_value   = -1;
-static int hf_asp_init_error   = -1;
-static int hf_asp_attn_code    = -1;
-static int hf_asp_seq          = -1;
-static int hf_asp_size         = -1;
+static int hf_asp_socket        = -1;
+static int hf_asp_version       = -1;
+static int hf_asp_session_id    = -1;
+static int hf_asp_zero_value    = -1;
+static int hf_asp_init_error    = -1;
+static int hf_asp_attn_code     = -1;
+static int hf_asp_seq           = -1;
+static int hf_asp_size          = -1;
 
 /* status stuff same for asp and afp */
 static int hf_asp_server_name = -1;
@@ -232,24 +232,24 @@ static int hf_asp_server_icon = -1;
 static int hf_asp_server_directory = -1;
 
 static int hf_asp_server_flag = -1;
-static int hf_asp_server_flag_copyfile = -1;
-static int hf_asp_server_flag_passwd   = -1;
+static int hf_asp_server_flag_copyfile  = -1;
+static int hf_asp_server_flag_passwd    = -1;
 static int hf_asp_server_flag_no_save_passwd = -1;
-static int hf_asp_server_flag_srv_msg  = -1;
-static int hf_asp_server_flag_srv_sig  = -1;
-static int hf_asp_server_flag_tcpip    = -1;
-static int hf_asp_server_flag_notify   = -1;
-static int hf_asp_server_flag_reconnect        = -1;
-static int hf_asp_server_flag_directory        = -1;
+static int hf_asp_server_flag_srv_msg   = -1;
+static int hf_asp_server_flag_srv_sig   = -1;
+static int hf_asp_server_flag_tcpip     = -1;
+static int hf_asp_server_flag_notify    = -1;
+static int hf_asp_server_flag_reconnect = -1;
+static int hf_asp_server_flag_directory = -1;
 static int hf_asp_server_flag_utf8_name = -1;
 static int hf_asp_server_flag_fast_copy = -1;
-static int hf_asp_server_signature     = -1;
+static int hf_asp_server_signature      = -1;
 static int hf_asp_server_utf8_name_len  = -1;
 static int hf_asp_server_utf8_name      = -1;
 
-static int hf_asp_server_addr_len      = -1;
-static int hf_asp_server_addr_type     = -1;
-static int hf_asp_server_addr_value    = -1;
+static int hf_asp_server_addr_len       = -1;
+static int hf_asp_server_addr_type      = -1;
+static int hf_asp_server_addr_value     = -1;
 
 static gint ett_asp_status = -1;
 static gint ett_asp_uams   = -1;
@@ -263,11 +263,11 @@ static gint ett_asp_status_server_flag = -1;
 typedef struct {
   guint32 conversation;
   guint8  src[4];
-  guint16      seq;
+  guint16 seq;
 } asp_request_key;
 
 typedef struct {
-  guint8       value;  /* command for asp, bitmap for atp */
+  guint8  value;        /* command for asp, bitmap for atp */
 } asp_request_val;
 
 static GHashTable *asp_request_hash = NULL;
@@ -408,14 +408,14 @@ static dissector_handle_t data_handle;
  *
  * Assumes the argument is in host byte order.
  */
-#define ddp_hops(x)    ( ( x >> 10) & 0x3C )
-#define ddp_len(x)             ( x & 0x03ff )
+#define ddp_hops(x)     ( ( x >> 10) & 0x3C )
+#define ddp_len(x)      ( x & 0x03ff )
 typedef struct _e_ddp {
-  guint16      hops_len; /* combines pad, hops, and len */
-  guint16      sum,dnet,snet;
-  guint8       dnode,snode;
-  guint8       dport,sport;
-  guint8       type;
+  guint16       hops_len; /* combines pad, hops, and len */
+  guint16       sum,dnet,snet;
+  guint8        dnode,snode;
+  guint8        dport,sport;
+  guint8        type;
 } e_ddp;
 
 #define DDP_HEADER_SIZE 13
@@ -472,69 +472,69 @@ static const value_string atp_trel_timer_vals[] = {
 /*
 */
 static const value_string asp_func_vals[] = {
-  {ASPFUNC_CLOSE,      "CloseSession" },
-  {ASPFUNC_CMD,                "Command" },
-  {ASPFUNC_STAT,       "GetStatus" },
-  {ASPFUNC_OPEN,       "OpenSession" },
-  {ASPFUNC_TICKLE,     "Tickle" },
-  {ASPFUNC_WRITE,      "Write" },
-  {ASPFUNC_WRTCONT,    "Write Cont" },
-  {ASPFUNC_ATTN,       "Attention" },
-  {0,                  NULL } };
+  {ASPFUNC_CLOSE,       "CloseSession" },
+  {ASPFUNC_CMD,         "Command" },
+  {ASPFUNC_STAT,        "GetStatus" },
+  {ASPFUNC_OPEN,        "OpenSession" },
+  {ASPFUNC_TICKLE,      "Tickle" },
+  {ASPFUNC_WRITE,       "Write" },
+  {ASPFUNC_WRTCONT,     "Write Cont" },
+  {ASPFUNC_ATTN,        "Attention" },
+  {0,                   NULL } };
 
 const value_string asp_error_vals[] = {
-  {AFP_OK              , "success"},
-  {ASPERR_NOSESS       , "no more sessions available"},
-  {ASPERR_SESSCLOS     , "session closed (ASP)" },
-  {AFPERR_ACCESS       , "permission denied" },
-  {AFPERR_AUTHCONT     , "logincont" },
-  {AFPERR_BADUAM       , "uam doesn't exist" },
-  {AFPERR_BADVERS      , "bad afp version number" },
-  {AFPERR_BITMAP       , "invalid bitmap" },
-  {AFPERR_CANTMOVE     , "can't move file" },
-  {AFPERR_DENYCONF     , "file synchronization locks conflict" },
-  {AFPERR_DIRNEMPT     , "directory not empty" },
-  {AFPERR_DFULL                , "disk full" },
-  {AFPERR_EOF          , "end of file" },
-  {AFPERR_BUSY         , "FileBusy" },
-  {AFPERR_FLATVOL      , "volume doesn't support directories" },
-  {AFPERR_NOITEM       , "ItemNotFound" },
-  {AFPERR_LOCK         , "LockErr" },
-  {AFPERR_MISC         , "misc. err" },
-  {AFPERR_NLOCK        , "no more locks" },
-  {AFPERR_NOSRVR       , "no response by server at that address" },
-  {AFPERR_EXIST                , "object already exists" },
-  {AFPERR_NOOBJ                , "object not found" },
-  {AFPERR_PARAM                , "parameter error" },
-  {AFPERR_NORANGE      , "no range lock" },
-  {AFPERR_RANGEOVR     , "range overlap" },
-  {AFPERR_SESSCLOS     , "session closed" },
-  {AFPERR_NOTAUTH      , "user not authenticated" },
-  {AFPERR_NOOP         , "command not supported" },
-  {AFPERR_BADTYPE      , "object is the wrong type" },
-  {AFPERR_NFILE                , "too many files open" },
-  {AFPERR_SHUTDOWN     , "server is going down" },
-  {AFPERR_NORENAME     , "can't rename" },
-  {AFPERR_NODIR                , "couldn't find directory" },
-  {AFPERR_ITYPE                , "wrong icon type" },
-  {AFPERR_VLOCK                , "volume locked" },
-  {AFPERR_OLOCK        , "object locked" },
-  {AFPERR_CTNSHRD      , "share point contains a share point" },
-  {AFPERR_NOID         , "file thread not found" },
-  {AFPERR_EXISTID      , "file already has an id" },
-  {AFPERR_DIFFVOL      , "different volume" },
-  {AFPERR_CATCHNG      , "catalog has changed" },
-  {AFPERR_SAMEOBJ      , "source file == destination file" },
-  {AFPERR_BADID        , "non-existent file id" },
-  {AFPERR_PWDSAME      , "same password/can't change password" },
-  {AFPERR_PWDSHORT     , "password too short" },
-  {AFPERR_PWDEXPR      , "password expired" },
-  {AFPERR_INSHRD       , "folder being shared is inside a shared folder." },
-  {AFPERR_INTRASH   , "shared folder in trash." },
-  {AFPERR_PWDCHNG   , "password needs to be changed" },
-  {AFPERR_PWDPOLCY  , "password fails policy check" },
-  {AFPERR_USRLOGIN  , "user already logged on" },
-  {0,                  NULL } };
+  {AFP_OK               , "success"},
+  {ASPERR_NOSESS        , "no more sessions available"},
+  {ASPERR_SESSCLOS      , "session closed (ASP)" },
+  {AFPERR_ACCESS        , "permission denied" },
+  {AFPERR_AUTHCONT      , "logincont" },
+  {AFPERR_BADUAM        , "uam doesn't exist" },
+  {AFPERR_BADVERS       , "bad afp version number" },
+  {AFPERR_BITMAP        , "invalid bitmap" },
+  {AFPERR_CANTMOVE      , "can't move file" },
+  {AFPERR_DENYCONF      , "file synchronization locks conflict" },
+  {AFPERR_DIRNEMPT      , "directory not empty" },
+  {AFPERR_DFULL         , "disk full" },
+  {AFPERR_EOF           , "end of file" },
+  {AFPERR_BUSY          , "FileBusy" },
+  {AFPERR_FLATVOL       , "volume doesn't support directories" },
+  {AFPERR_NOITEM        , "ItemNotFound" },
+  {AFPERR_LOCK          , "LockErr" },
+  {AFPERR_MISC          , "misc. err" },
+  {AFPERR_NLOCK         , "no more locks" },
+  {AFPERR_NOSRVR        , "no response by server at that address" },
+  {AFPERR_EXIST         , "object already exists" },
+  {AFPERR_NOOBJ         , "object not found" },
+  {AFPERR_PARAM         , "parameter error" },
+  {AFPERR_NORANGE       , "no range lock" },
+  {AFPERR_RANGEOVR      , "range overlap" },
+  {AFPERR_SESSCLOS      , "session closed" },
+  {AFPERR_NOTAUTH       , "user not authenticated" },
+  {AFPERR_NOOP          , "command not supported" },
+  {AFPERR_BADTYPE       , "object is the wrong type" },
+  {AFPERR_NFILE         , "too many files open" },
+  {AFPERR_SHUTDOWN      , "server is going down" },
+  {AFPERR_NORENAME      , "can't rename" },
+  {AFPERR_NODIR         , "couldn't find directory" },
+  {AFPERR_ITYPE         , "wrong icon type" },
+  {AFPERR_VLOCK         , "volume locked" },
+  {AFPERR_OLOCK         , "object locked" },
+  {AFPERR_CTNSHRD       , "share point contains a share point" },
+  {AFPERR_NOID          , "file thread not found" },
+  {AFPERR_EXISTID       , "file already has an id" },
+  {AFPERR_DIFFVOL       , "different volume" },
+  {AFPERR_CATCHNG       , "catalog has changed" },
+  {AFPERR_SAMEOBJ       , "source file == destination file" },
+  {AFPERR_BADID         , "non-existent file id" },
+  {AFPERR_PWDSAME       , "same password/can't change password" },
+  {AFPERR_PWDSHORT      , "password too short" },
+  {AFPERR_PWDEXPR       , "password expired" },
+  {AFPERR_INSHRD        , "folder being shared is inside a shared folder." },
+  {AFPERR_INTRASH       , "shared folder in trash." },
+  {AFPERR_PWDCHNG       , "password needs to be changed" },
+  {AFPERR_PWDPOLCY      , "password fails policy check" },
+  {AFPERR_USRLOGIN      , "user already logged on" },
+  {0,                   NULL } };
 
 /*
  * XXX - do this with an FT_UINT_STRING?
@@ -623,7 +623,7 @@ dissect_rtmp_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
 
   if (check_col(pinfo->cinfo, COL_INFO))
     col_add_fstr(pinfo->cinfo, COL_INFO, "Net: %u  Node Len: %u  Node: %u",
-               net, nodelen_bits, node);
+                 net, nodelen_bits, node);
 
   if (tree) {
     ti = proto_tree_add_item(tree, proto_rtmp, tvb, offset, -1, FALSE);
@@ -631,9 +631,9 @@ dissect_rtmp_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
 
     proto_tree_add_uint(rtmp_tree, hf_rtmp_net, tvb, offset, 2, net);
     proto_tree_add_uint(rtmp_tree, hf_rtmp_node_len, tvb, offset+2, 1,
-                       nodelen_bits);
+                        nodelen_bits);
     proto_tree_add_uint(rtmp_tree, hf_rtmp_node, tvb, offset+3, nodelen,
-                       node);
+                        node);
     offset += 3 + nodelen;
 
     i = 1;
@@ -649,32 +649,32 @@ dissect_rtmp_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
       if (tuple_dist & 0x80) {
         tuple_range_end = tvb_get_ntohs(tvb, offset+3);
         tuple_item = proto_tree_add_text(rtmp_tree, tvb, offset, 6,
-                       "Tuple %d:  Range Start: %u  Dist: %u  Range End: %u",
-                       i, tuple_net, tuple_dist&0x7F, tuple_range_end);
+                                         "Tuple %d:  Range Start: %u  Dist: %u  Range End: %u",
+                                         i, tuple_net, tuple_dist&0x7F, tuple_range_end);
       } else {
         tuple_item = proto_tree_add_text(rtmp_tree, tvb, offset, 3,
-                       "Tuple %d:  Net: %u  Dist: %u",
-                       i, tuple_net, tuple_dist);
+                                         "Tuple %d:  Net: %u  Dist: %u",
+                                         i, tuple_net, tuple_dist);
       }
       tuple_tree = proto_item_add_subtree(tuple_item, ett_rtmp_tuple);
 
       if (tuple_dist & 0x80) {
         proto_tree_add_uint(tuple_tree, hf_rtmp_tuple_range_start, tvb, offset, 2,
-                       tuple_net);
+                            tuple_net);
       } else {
         proto_tree_add_uint(tuple_tree, hf_rtmp_tuple_net, tvb, offset, 2,
-                       tuple_net);
+                            tuple_net);
       }
       proto_tree_add_uint(tuple_tree, hf_rtmp_tuple_dist, tvb, offset+2, 1,
-                       tuple_dist & 0x7F);
+                          tuple_dist & 0x7F);
 
       if (tuple_dist & 0x80) {
         /*
          * Extended network tuple.
          */
         proto_tree_add_item(tuple_tree, hf_rtmp_tuple_range_end, tvb, offset+3, 2,
-                               FALSE);
-       offset += 6;
+                            FALSE);
+        offset += 6;
       } else
         offset += 3;
 
@@ -709,10 +709,10 @@ dissect_nbp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
     nbp_tree = proto_item_add_subtree(ti, ett_nbp);
 
     info_item = proto_tree_add_uint_format(nbp_tree, hf_nbp_info, tvb, offset, 1,
-               info,
-               "Info: 0x%01X  Operation: %s  Count: %u", info,
-               val_to_str(op, nbp_op_vals, "Unknown (0x%01X)"),
-               count);
+                info,
+                "Info: 0x%01X  Operation: %s  Count: %u", info,
+                val_to_str(op, nbp_op_vals, "Unknown (0x%01X)"),
+                count);
     nbp_info_tree = proto_item_add_subtree(info_item, ett_nbp_info);
     proto_tree_add_uint(nbp_info_tree, hf_nbp_op, tvb, offset, 1, info);
     proto_tree_add_uint(nbp_info_tree, hf_nbp_count, tvb, offset, 1, info);
@@ -724,7 +724,7 @@ dissect_nbp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
       int soffset = offset;
 
       node_item = proto_tree_add_text(nbp_tree, tvb, offset, -1,
-                       "Node %u", i+1);
+                                      "Node %u", i+1);
       node_tree = proto_item_add_subtree(node_item, ett_nbp_node);
 
       proto_tree_add_item(node_tree, hf_nbp_node_net, tvb, offset, 2, FALSE);
@@ -868,7 +868,7 @@ dissect_atp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
     }
     if (query) {
       proto_tree_add_text(atp_tree, tvb, offset +1, 1,
-                         "Bitmap: 0x%02x  %u packet(s) max", bitmap, nbe);
+                          "Bitmap: 0x%02x  %u packet(s) max", bitmap, nbe);
     }
     else {
       proto_tree_add_item(atp_tree, hf_atp_bitmap, tvb, offset +1, 1, FALSE);
@@ -895,14 +895,14 @@ dissect_atp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
 
     hdr = ATP_HDRSIZE -1;
     if (frag_number != 0)
-      hdr += 4;        /* asp header */
+      hdr += 4; /* asp header */
     len = tvb_reported_length_remaining(tvb, hdr);
     fd_head = fragment_add_seq_check(tvb, hdr, pinfo, tid,
-                                    atp_fragment_table,
-                                    atp_reassembled_table,
-                                    frag_number,
-                                    len,
-                                    more_fragment);
+                                     atp_fragment_table,
+                                     atp_reassembled_table,
+                                     frag_number,
+                                     len,
+                                     more_fragment);
     new_tvb = process_reassembled_data(tvb, ATP_HDRSIZE -1, pinfo,
                                        "Reassembled ATP", fd_head, &atp_frag_items,
                                        NULL, atp_tree);
@@ -966,8 +966,8 @@ dissect_atp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
 static gint
 dissect_asp_reply_get_status(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, gint offset)
 {
-  proto_tree      *sub_tree;
-  proto_item   *ti;
+  proto_tree    *sub_tree;
+  proto_item    *ti;
 
   guint16 ofs;
   guint16 flag;
@@ -976,7 +976,7 @@ dissect_asp_reply_get_status(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *
   guint16 adr_ofs = 0;
   guint16 dir_ofs = 0;
   guint16 utf_ofs = 0;
-  guint8       nbe;
+  guint8  nbe;
   guint   len;
   guint   i;
 
@@ -1108,7 +1108,7 @@ dissect_asp_reply_get_status(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *
       len = tvb_get_guint8(tvb, ofs);
       type =  tvb_get_guint8(tvb, ofs +1);
       switch (type) {
-      case 1:  /* IP */
+      case 1:   /* IP */
         ip = tvb_get_ptr(tvb, ofs+2, 4);
         ti = proto_tree_add_text(adr_tree, tvb, ofs, len, "ip %s", ip_to_str(ip));
         break;
@@ -1278,7 +1278,7 @@ static struct aspinfo *
 get_transaction(tvbuff_t *tvb, packet_info *pinfo)
 {
   struct aspinfo *aspinfo = pinfo->private_data;
-  conversation_t       *conversation;
+  conversation_t *conversation;
   asp_request_key request_key, *new_request_key;
   asp_request_val *request_val;
   guint8 fn;
@@ -1446,7 +1446,7 @@ dissect_asp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     case ASPFUNC_WRTCONT:
       proto_tree_add_item(asp_tree, hf_asp_zero_value, tvb, offset, 4, FALSE);
       /* fall */
-    case ASPFUNC_ATTN: /* FIXME capture and spec disagree */
+    case ASPFUNC_ATTN:  /* FIXME capture and spec disagree */
     default:
       proto_item_set_len(asp_tree, 4);
       offset += 4;
@@ -1499,7 +1499,7 @@ dissect_atp_zip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     proto_tree_add_item(zip_tree, hf_zip_atp_function, tvb, offset, 1, FALSE);
     offset++;
     switch(fn) {
-    case 7:    /* start_index = 0 */
+    case 7:     /* start_index = 0 */
     case 8:
     case 9:
       proto_tree_add_item(zip_tree, hf_zip_zero_value, tvb, offset, 1, FALSE);
@@ -1666,7 +1666,7 @@ dissect_ddp_zip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
 static void
 dissect_ddp_short(tvbuff_t *tvb, packet_info *pinfo, guint8 dnode,
-                 guint8 snode, proto_tree *tree)
+                  guint8 snode, proto_tree *tree)
 {
   guint16 len;
   guint8  dport;
@@ -1682,7 +1682,7 @@ dissect_ddp_short(tvbuff_t *tvb, packet_info *pinfo, guint8 dnode,
 
   if (tree) {
     ti = proto_tree_add_item(tree, proto_ddp, tvb, 0, DDP_SHORT_HEADER_SIZE,
-                            FALSE);
+                             FALSE);
     ddp_tree = proto_item_add_subtree(ti, ett_ddp);
   }
   len = tvb_get_ntohs(tvb, 0);
@@ -1766,37 +1766,37 @@ dissect_ddp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
   if (tree) {
     ti = proto_tree_add_item(tree, proto_ddp, tvb, 0, DDP_HEADER_SIZE,
-                            FALSE);
+                             FALSE);
     ddp_tree = proto_item_add_subtree(ti, ett_ddp);
 
     hidden_item = proto_tree_add_string(ddp_tree, hf_ddp_src, tvb,
-                                4, 3, atalk_addr_to_str(&src));
+                                        4, 3, atalk_addr_to_str(&src));
     PROTO_ITEM_SET_HIDDEN(hidden_item);
 
     hidden_item = proto_tree_add_string(ddp_tree, hf_ddp_dst, tvb,
-                                6, 3, atalk_addr_to_str(&dst));
+                                        6, 3, atalk_addr_to_str(&dst));
     PROTO_ITEM_SET_HIDDEN(hidden_item);
 
     proto_tree_add_uint(ddp_tree, hf_ddp_hopcount,   tvb, 0, 1,
-                       ddp_hops(ddp.hops_len));
+                        ddp_hops(ddp.hops_len));
     proto_tree_add_uint(ddp_tree, hf_ddp_len,        tvb, 0, 2,
-                       ddp_len(ddp.hops_len));
+                        ddp_len(ddp.hops_len));
     proto_tree_add_uint(ddp_tree, hf_ddp_checksum,   tvb, 2,  2,
-                       ddp.sum);
+                        ddp.sum);
     proto_tree_add_uint(ddp_tree, hf_ddp_dst_net,    tvb, 4,  2,
-                       ddp.dnet);
+                        ddp.dnet);
     proto_tree_add_uint(ddp_tree, hf_ddp_src_net,    tvb, 6,  2,
-                       ddp.snet);
+                        ddp.snet);
     proto_tree_add_uint(ddp_tree, hf_ddp_dst_node,   tvb, 8,  1,
-                       ddp.dnode);
+                        ddp.dnode);
     proto_tree_add_uint(ddp_tree, hf_ddp_src_node,   tvb, 9,  1,
-                       ddp.snode);
+                        ddp.snode);
     proto_tree_add_uint(ddp_tree, hf_ddp_dst_socket, tvb, 10, 1,
-                       ddp.dport);
+                        ddp.dport);
     proto_tree_add_uint(ddp_tree, hf_ddp_src_socket, tvb, 11, 1,
-                       ddp.sport);
+                        ddp.sport);
     proto_tree_add_uint(ddp_tree, hf_ddp_type,       tvb, 12, 1,
-                       ddp.type);
+                        ddp.type);
   }
 
   new_tvb = tvb_new_subset_remaining(tvb, DDP_HEADER_SIZE);
@@ -1901,197 +1901,197 @@ proto_register_atalk(void)
 {
   static hf_register_info hf_llap[] = {
     { &hf_llap_dst,
-      { "Destination Node",    "llap.dst",     FT_UINT8,  BASE_DEC, NULL, 0x0,
-       NULL, HFILL }},
+      { "Destination Node",     "llap.dst",     FT_UINT8,  BASE_DEC, NULL, 0x0,
+        NULL, HFILL }},
 
     { &hf_llap_src,
-      { "Source Node",         "llap.src",     FT_UINT8,  BASE_DEC, NULL, 0x0,
-       NULL, HFILL }},
+      { "Source Node",          "llap.src",     FT_UINT8,  BASE_DEC, NULL, 0x0,
+        NULL, HFILL }},
 
     { &hf_llap_type,
-      { "Type",                        "llap.type",    FT_UINT8,  BASE_HEX, VALS(llap_type_vals), 0x0,
-       NULL, HFILL }},
+      { "Type",                 "llap.type",    FT_UINT8,  BASE_HEX, VALS(llap_type_vals), 0x0,
+        NULL, HFILL }},
   };
 
   static hf_register_info hf_ddp[] = {
     { &hf_ddp_hopcount,
-      { "Hop count",           "ddp.hopcount", FT_UINT8,  BASE_DEC, NULL, 0x0,
-       NULL, HFILL }},
+      { "Hop count",            "ddp.hopcount", FT_UINT8,  BASE_DEC, NULL, 0x0,
+        NULL, HFILL }},
 
     { &hf_ddp_len,
-      { "Datagram length",     "ddp.len",      FT_UINT16, BASE_DEC, NULL, 0x0,
-       NULL, HFILL }},
+      { "Datagram length",      "ddp.len",      FT_UINT16, BASE_DEC, NULL, 0x0,
+        NULL, HFILL }},
 
     { &hf_ddp_checksum,
-      { "Checksum",            "ddp.checksum", FT_UINT16, BASE_DEC, NULL, 0x0,
-       NULL, HFILL }},
+      { "Checksum",             "ddp.checksum", FT_UINT16, BASE_DEC, NULL, 0x0,
+        NULL, HFILL }},
 
     { &hf_ddp_dst,
-      { "Destination address", "ddp.dst",      FT_STRING, BASE_NONE, NULL, 0x0,
-       NULL, HFILL }},
+      { "Destination address",  "ddp.dst",      FT_STRING, BASE_NONE, NULL, 0x0,
+        NULL, HFILL }},
 
     { &hf_ddp_dst_net,
-      { "Destination Net",     "ddp.dst.net",  FT_UINT16, BASE_DEC, NULL, 0x0,
-       NULL, HFILL }},
+      { "Destination Net",      "ddp.dst.net",  FT_UINT16, BASE_DEC, NULL, 0x0,
+        NULL, HFILL }},
 
     { &hf_ddp_src,
-      { "Source address",      "ddp.src",      FT_STRING, BASE_NONE, NULL, 0x0,
-       NULL, HFILL }},
+      { "Source address",       "ddp.src",      FT_STRING, BASE_NONE, NULL, 0x0,
+        NULL, HFILL }},
 
     { &hf_ddp_src_net,
-      { "Source Net",          "ddp.src.net",  FT_UINT16, BASE_DEC, NULL, 0x0,
-       NULL, HFILL }},
+      { "Source Net",           "ddp.src.net",  FT_UINT16, BASE_DEC, NULL, 0x0,
+        NULL, HFILL }},
 
     { &hf_ddp_dst_node,
-      { "Destination Node",    "ddp.dst.node", FT_UINT8,  BASE_DEC, NULL, 0x0,
-       NULL, HFILL }},
+      { "Destination Node",     "ddp.dst.node", FT_UINT8,  BASE_DEC, NULL, 0x0,
+        NULL, HFILL }},
 
     { &hf_ddp_src_node,
-      { "Source Node",         "ddp.src.node", FT_UINT8,  BASE_DEC, NULL, 0x0,
-       NULL, HFILL }},
+      { "Source Node",          "ddp.src.node", FT_UINT8,  BASE_DEC, NULL, 0x0,
+        NULL, HFILL }},
 
     { &hf_ddp_dst_socket,
-      { "Destination Socket",  "ddp.dst_socket", FT_UINT8,  BASE_DEC, NULL, 0x0,
-       NULL, HFILL }},
+      { "Destination Socket",   "ddp.dst_socket", FT_UINT8,  BASE_DEC, NULL, 0x0,
+        NULL, HFILL }},
 
     { &hf_ddp_src_socket,
-      { "Source Socket",               "ddp.src_socket", FT_UINT8,  BASE_DEC, NULL, 0x0,
-       NULL, HFILL }},
+      { "Source Socket",        "ddp.src_socket", FT_UINT8,  BASE_DEC, NULL, 0x0,
+        NULL, HFILL }},
 
     { &hf_ddp_type,
-      { "Protocol type",               "ddp.type",     FT_UINT8,  BASE_DEC, VALS(op_vals), 0x0,
-       NULL, HFILL }},
+      { "Protocol type",        "ddp.type",     FT_UINT8,  BASE_DEC, VALS(op_vals), 0x0,
+        NULL, HFILL }},
   };
 
   static hf_register_info hf_nbp[] = {
     { &hf_nbp_op,
-      { "Operation",           "nbp.op",       FT_UINT8,  BASE_DEC,
-               VALS(nbp_op_vals), 0xF0, NULL, HFILL }},
+      { "Operation",            "nbp.op",       FT_UINT8,  BASE_DEC,
+                VALS(nbp_op_vals), 0xF0, NULL, HFILL }},
     { &hf_nbp_info,
-      { "Info",                "nbp.info",     FT_UINT8,  BASE_HEX,
-               NULL, 0x0, NULL, HFILL }},
+      { "Info",         "nbp.info",     FT_UINT8,  BASE_HEX,
+                NULL, 0x0, NULL, HFILL }},
     { &hf_nbp_count,
-      { "Count",               "nbp.count",    FT_UINT8,  BASE_DEC,
-               NULL, 0x0F, NULL, HFILL }},
+      { "Count",                "nbp.count",    FT_UINT8,  BASE_DEC,
+                NULL, 0x0F, NULL, HFILL }},
     { &hf_nbp_node_net,
-      { "Network",             "nbp.net",      FT_UINT16,  BASE_DEC,
-               NULL, 0x0, NULL, HFILL }},
+      { "Network",              "nbp.net",      FT_UINT16,  BASE_DEC,
+                NULL, 0x0, NULL, HFILL }},
     { &hf_nbp_node_node,
-      { "Node",                "nbp.node",     FT_UINT8,  BASE_DEC,
-               NULL, 0x0, NULL, HFILL }},
+      { "Node",         "nbp.node",     FT_UINT8,  BASE_DEC,
+                NULL, 0x0, NULL, HFILL }},
     { &hf_nbp_node_port,
-      { "Port",                "nbp.port",     FT_UINT8,  BASE_DEC,
-               NULL, 0x0, NULL, HFILL }},
+      { "Port",         "nbp.port",     FT_UINT8,  BASE_DEC,
+                NULL, 0x0, NULL, HFILL }},
     { &hf_nbp_node_enum,
-      { "Enumerator",          "nbp.enum",     FT_UINT8,  BASE_DEC,
-               NULL, 0x0, NULL, HFILL }},
+      { "Enumerator",           "nbp.enum",     FT_UINT8,  BASE_DEC,
+                NULL, 0x0, NULL, HFILL }},
     { &hf_nbp_node_object,
-      { "Object",              "nbp.object",   FT_STRING,  BASE_NONE,
-               NULL, 0x0, NULL, HFILL }},
+      { "Object",               "nbp.object",   FT_STRING,  BASE_NONE,
+                NULL, 0x0, NULL, HFILL }},
     { &hf_nbp_node_type,
-      { "Type",                "nbp.type",     FT_STRING,  BASE_NONE,
-               NULL, 0x0, NULL, HFILL }},
+      { "Type",         "nbp.type",     FT_STRING,  BASE_NONE,
+                NULL, 0x0, NULL, HFILL }},
     { &hf_nbp_node_zone,
-      { "Zone",                "nbp.zone",     FT_STRING,  BASE_NONE,
-               NULL, 0x0, NULL, HFILL }},
+      { "Zone",         "nbp.zone",     FT_STRING,  BASE_NONE,
+                NULL, 0x0, NULL, HFILL }},
     { &hf_nbp_tid,
-      { "Transaction ID",              "nbp.tid",      FT_UINT8,  BASE_DEC,
-               NULL, 0x0, NULL, HFILL }}
+      { "Transaction ID",               "nbp.tid",      FT_UINT8,  BASE_DEC,
+                NULL, 0x0, NULL, HFILL }}
   };
 
   static hf_register_info hf_rtmp[] = {
     { &hf_rtmp_net,
-      { "Net",         "rtmp.net",     FT_UINT16,  BASE_DEC,
-               NULL, 0x0, NULL, HFILL }},
+      { "Net",          "rtmp.net",     FT_UINT16,  BASE_DEC,
+                NULL, 0x0, NULL, HFILL }},
     { &hf_rtmp_node,
-      { "Node",                "nbp.nodeid",   FT_UINT8,  BASE_DEC,
-               NULL, 0x0, NULL, HFILL }},
+      { "Node",         "nbp.nodeid",   FT_UINT8,  BASE_DEC,
+                NULL, 0x0, NULL, HFILL }},
     { &hf_rtmp_node_len,
-      { "Node Length",         "nbp.nodeid.length",    FT_UINT8,  BASE_DEC,
-               NULL, 0x0, NULL, HFILL }},
+      { "Node Length",          "nbp.nodeid.length",    FT_UINT8,  BASE_DEC,
+                NULL, 0x0, NULL, HFILL }},
     { &hf_rtmp_tuple_net,
-      { "Net",         "rtmp.tuple.net",       FT_UINT16,  BASE_DEC,
-               NULL, 0x0, NULL, HFILL }},
+      { "Net",          "rtmp.tuple.net",       FT_UINT16,  BASE_DEC,
+                NULL, 0x0, NULL, HFILL }},
     { &hf_rtmp_tuple_range_start,
-      { "Range Start",         "rtmp.tuple.range_start",       FT_UINT16,  BASE_DEC,
-               NULL, 0x0, NULL, HFILL }},
+      { "Range Start",          "rtmp.tuple.range_start",       FT_UINT16,  BASE_DEC,
+                NULL, 0x0, NULL, HFILL }},
     { &hf_rtmp_tuple_range_end,
-      { "Range End",           "rtmp.tuple.range_end", FT_UINT16,  BASE_DEC,
-               NULL, 0x0, NULL, HFILL }},
+      { "Range End",            "rtmp.tuple.range_end", FT_UINT16,  BASE_DEC,
+                NULL, 0x0, NULL, HFILL }},
     { &hf_rtmp_tuple_dist,
-      { "Distance",            "rtmp.tuple.dist",      FT_UINT16,  BASE_DEC,
-               NULL, 0x0, NULL, HFILL }},
+      { "Distance",             "rtmp.tuple.dist",      FT_UINT16,  BASE_DEC,
+                NULL, 0x0, NULL, HFILL }},
     { &hf_rtmp_function,
-      { "Function",            "rtmp.function",        FT_UINT8,  BASE_DEC,
-               VALS(rtmp_function_vals), 0x0, "Request Function", HFILL }}
+      { "Function",             "rtmp.function",        FT_UINT8,  BASE_DEC,
+                VALS(rtmp_function_vals), 0x0, "Request Function", HFILL }}
   };
 
   static hf_register_info hf_atp[] = {
     { &hf_atp_ctrlinfo,
-      { "Control info",                "atp.ctrlinfo", FT_UINT8,  BASE_HEX,
-               NULL, 0, "control info", HFILL }},
+      { "Control info",         "atp.ctrlinfo", FT_UINT8,  BASE_HEX,
+                NULL, 0, "control info", HFILL }},
 
     { &hf_atp_function,
-      { "Function",            "atp.function", FT_UINT8,  BASE_DEC,
-               VALS(atp_function_vals), ATP_FUNCMASK, "function code", HFILL }},
+      { "Function",             "atp.function", FT_UINT8,  BASE_DEC,
+                VALS(atp_function_vals), ATP_FUNCMASK, "function code", HFILL }},
 
 
     { &hf_atp_xo,
-      { "XO",          "atp.xo",       FT_BOOLEAN,  8,
-               NULL, ATP_XO, "Exactly-once flag", HFILL }},
+      { "XO",           "atp.xo",       FT_BOOLEAN,  8,
+                NULL, ATP_XO, "Exactly-once flag", HFILL }},
 
     { &hf_atp_eom,
-      { "EOM",         "atp.eom",      FT_BOOLEAN,  8,
-               NULL, ATP_EOM, "End-of-message", HFILL }},
+      { "EOM",          "atp.eom",      FT_BOOLEAN,  8,
+                NULL, ATP_EOM, "End-of-message", HFILL }},
 
     { &hf_atp_sts,
-      { "STS",         "atp.sts",      FT_BOOLEAN,  8,
-               NULL, ATP_STS, "Send transaction status", HFILL }},
+      { "STS",          "atp.sts",      FT_BOOLEAN,  8,
+                NULL, ATP_STS, "Send transaction status", HFILL }},
 
     { &hf_atp_treltimer,
-      { "TRel timer",          "atp.treltimer",        FT_UINT8,  BASE_DEC,
-               VALS(atp_trel_timer_vals), 0x07, NULL, HFILL }},
+      { "TRel timer",           "atp.treltimer",        FT_UINT8,  BASE_DEC,
+                VALS(atp_trel_timer_vals), 0x07, NULL, HFILL }},
 
     { &hf_atp_bitmap,
-      { "Bitmap",              "atp.bitmap",   FT_UINT8,  BASE_HEX,
-               NULL, 0x0, "Bitmap or sequence number", HFILL }},
+      { "Bitmap",               "atp.bitmap",   FT_UINT8,  BASE_HEX,
+                NULL, 0x0, "Bitmap or sequence number", HFILL }},
 
     { &hf_atp_tid,
-      { "TID",                 "atp.tid",      FT_UINT16,  BASE_DEC,
-               NULL, 0x0, "Transaction id", HFILL }},
+      { "TID",                  "atp.tid",      FT_UINT16,  BASE_DEC,
+                NULL, 0x0, "Transaction id", HFILL }},
     { &hf_atp_user_bytes,
-      { "User bytes",                  "atp.user_bytes",       FT_UINT32,  BASE_HEX,
-               NULL, 0x0, NULL, HFILL }},
+      { "User bytes",                   "atp.user_bytes",       FT_UINT32,  BASE_HEX,
+                NULL, 0x0, NULL, HFILL }},
 
     { &hf_atp_segment_overlap,
-      { "Segment overlap",     "atp.segment.overlap", FT_BOOLEAN, BASE_NONE,
-               NULL, 0x0, "Segment overlaps with other segments", HFILL }},
+      { "Segment overlap",      "atp.segment.overlap", FT_BOOLEAN, BASE_NONE,
+                NULL, 0x0, "Segment overlaps with other segments", HFILL }},
 
     { &hf_atp_segment_overlap_conflict,
       { "Conflicting data in segment overlap", "atp.segment.overlap.conflict",
-       FT_BOOLEAN, BASE_NONE,
-               NULL, 0x0, "Overlapping segments contained conflicting data", HFILL }},
+        FT_BOOLEAN, BASE_NONE,
+                NULL, 0x0, "Overlapping segments contained conflicting data", HFILL }},
 
     { &hf_atp_segment_multiple_tails,
       { "Multiple tail segments found", "atp.segment.multipletails",
-       FT_BOOLEAN, BASE_NONE,
-               NULL, 0x0, "Several tails were found when desegmenting the packet", HFILL }},
+        FT_BOOLEAN, BASE_NONE,
+                NULL, 0x0, "Several tails were found when desegmenting the packet", HFILL }},
 
     { &hf_atp_segment_too_long_segment,
-      { "Segment too long",    "atp.segment.toolongsegment", FT_BOOLEAN, BASE_NONE,
-               NULL, 0x0, "Segment contained data past end of packet", HFILL }},
+      { "Segment too long",     "atp.segment.toolongsegment", FT_BOOLEAN, BASE_NONE,
+                NULL, 0x0, "Segment contained data past end of packet", HFILL }},
 
     { &hf_atp_segment_error,
-      {"Desegmentation error", "atp.segment.error", FT_FRAMENUM, BASE_NONE,
-               NULL, 0x0, "Desegmentation error due to illegal segments", HFILL }},
+      {"Desegmentation error",  "atp.segment.error", FT_FRAMENUM, BASE_NONE,
+                NULL, 0x0, "Desegmentation error due to illegal segments", HFILL }},
 
     { &hf_atp_segment,
-      { "ATP Fragment",                "atp.fragment", FT_FRAMENUM, BASE_NONE,
-               NULL, 0x0, NULL, HFILL }},
+      { "ATP Fragment",         "atp.fragment", FT_FRAMENUM, BASE_NONE,
+                NULL, 0x0, NULL, HFILL }},
 
     { &hf_atp_segments,
-      { "ATP Fragments",       "atp.fragments", FT_NONE, BASE_NONE,
-               NULL, 0x0, NULL, HFILL }},
+      { "ATP Fragments",        "atp.fragments", FT_NONE, BASE_NONE,
+                NULL, 0x0, NULL, HFILL }},
 
     { &hf_atp_reassembled_in,
       { "Reassembled ATP in frame", "atp.reassembled_in", FT_FRAMENUM, BASE_NONE, NULL, 0x0,
@@ -2104,269 +2104,269 @@ proto_register_atalk(void)
 
   static hf_register_info hf_asp[] = {
     { &hf_asp_func,
-      { "asp function",                "asp.function", FT_UINT8,  BASE_DEC,
-               VALS(asp_func_vals), 0, NULL, HFILL }},
+      { "asp function",         "asp.function", FT_UINT8,  BASE_DEC,
+                VALS(asp_func_vals), 0, NULL, HFILL }},
 
     { &hf_asp_error,
-      { "asp error",           "asp.error",    FT_INT32,  BASE_DEC,
-               VALS(asp_error_vals), 0, "return error code", HFILL }},
+      { "asp error",            "asp.error",    FT_INT32,  BASE_DEC,
+                VALS(asp_error_vals), 0, "return error code", HFILL }},
 
     { &hf_asp_version,
-      { "Version",             "asp.version",  FT_UINT16,  BASE_HEX,
-               NULL, 0, "asp version", HFILL }},
+      { "Version",              "asp.version",  FT_UINT16,  BASE_HEX,
+                NULL, 0, "asp version", HFILL }},
 
     { &hf_asp_attn_code,
-      { "Attn code",           "asp.attn_code",        FT_UINT16,  BASE_HEX,
-               NULL, 0, "asp attention code", HFILL }},
+      { "Attn code",            "asp.attn_code",        FT_UINT16,  BASE_HEX,
+                NULL, 0, "asp attention code", HFILL }},
 
     { &hf_asp_init_error,
-      { "Error",               "asp.init_error",       FT_UINT16,  BASE_DEC,
-               NULL, 0, "asp init error", HFILL }},
+      { "Error",                "asp.init_error",       FT_UINT16,  BASE_DEC,
+                NULL, 0, "asp init error", HFILL }},
 
     { &hf_asp_session_id,
-      { "Session ID",          "asp.session_id", FT_UINT8,  BASE_DEC,
-               NULL, 0, "asp session id", HFILL }},
+      { "Session ID",           "asp.session_id", FT_UINT8,  BASE_DEC,
+                NULL, 0, "asp session id", HFILL }},
 
     { &hf_asp_socket,
-      { "Socket",              "asp.socket",   FT_UINT8,  BASE_DEC,
-               NULL, 0, "asp socket", HFILL }},
+      { "Socket",               "asp.socket",   FT_UINT8,  BASE_DEC,
+                NULL, 0, "asp socket", HFILL }},
 
     { &hf_asp_seq,
-      { "Sequence",            "asp.seq",      FT_UINT16,  BASE_DEC,
-               NULL, 0, "asp sequence number", HFILL }},
+      { "Sequence",             "asp.seq",      FT_UINT16,  BASE_DEC,
+                NULL, 0, "asp sequence number", HFILL }},
 
     { &hf_asp_size,
-      { "size",                "asp.size",     FT_UINT16,  BASE_DEC,
-               NULL, 0, "asp available size for reply", HFILL }},
+      { "size",         "asp.size",     FT_UINT16,  BASE_DEC,
+                NULL, 0, "asp available size for reply", HFILL }},
 
     { &hf_asp_zero_value,
       { "Pad (0)",         "asp.zero_value",
-       FT_BYTES, BASE_NONE, NULL, 0x0,
-       "Pad", HFILL }},
+        FT_BYTES, BASE_NONE, NULL, 0x0,
+        "Pad", HFILL }},
 
-       /* asp ,dsi, afp */
+        /* asp ,dsi, afp */
     { &hf_asp_server_name,
       { "Server name",         "asp.server_name",
-       FT_UINT_STRING, BASE_NONE, NULL, 0x0,
-       NULL, HFILL }},
+        FT_UINT_STRING, BASE_NONE, NULL, 0x0,
+        NULL, HFILL }},
 
     { &hf_asp_server_type,
       { "Server type",         "asp.server_type",
-       FT_UINT_STRING, BASE_NONE, NULL, 0x0,
-       NULL, HFILL }},
+        FT_UINT_STRING, BASE_NONE, NULL, 0x0,
+        NULL, HFILL }},
 
     { &hf_asp_server_vers,
       { "AFP version",         "asp.server_vers",
-       FT_UINT_STRING, BASE_NONE, NULL, 0x0,
-       NULL, HFILL }},
+        FT_UINT_STRING, BASE_NONE, NULL, 0x0,
+        NULL, HFILL }},
 
     { &hf_asp_server_uams,
       { "UAM",         "asp.server_uams",
-       FT_UINT_STRING, BASE_NONE, NULL, 0x0,
-       NULL, HFILL }},
+        FT_UINT_STRING, BASE_NONE, NULL, 0x0,
+        NULL, HFILL }},
 
     { &hf_asp_server_icon,
       { "Icon bitmap",         "asp.server_icon",
-       FT_BYTES, BASE_NONE, NULL, 0x0,
-       "Server icon bitmap", HFILL }},
+        FT_BYTES, BASE_NONE, NULL, 0x0,
+        "Server icon bitmap", HFILL }},
 
     { &hf_asp_server_directory,
       { "Directory service",         "asp.server_directory",
-       FT_UINT_STRING, BASE_NONE, NULL, 0x0,
-       "Server directory service", HFILL }},
+        FT_UINT_STRING, BASE_NONE, NULL, 0x0,
+        "Server directory service", HFILL }},
 
     { &hf_asp_server_signature,
       { "Server signature",         "asp.server_signature",
-       FT_BYTES, BASE_NONE, NULL, 0x0,
-       NULL, HFILL }},
+        FT_BYTES, BASE_NONE, NULL, 0x0,
+        NULL, HFILL }},
 
     { &hf_asp_server_flag,
       { "Flag",         "asp.server_flag",
-       FT_UINT16, BASE_HEX, NULL, 0x0,
-       "Server capabilities flag", HFILL }},
+        FT_UINT16, BASE_HEX, NULL, 0x0,
+        "Server capabilities flag", HFILL }},
     { &hf_asp_server_flag_copyfile,
       { "Support copyfile",      "asp.server_flag.copyfile",
-               FT_BOOLEAN, 16, NULL, AFPSRVRINFO_COPY,
-       "Server support copyfile", HFILL }},
+                FT_BOOLEAN, 16, NULL, AFPSRVRINFO_COPY,
+        "Server support copyfile", HFILL }},
     { &hf_asp_server_flag_passwd,
       { "Support change password",      "asp.server_flag.passwd",
-               FT_BOOLEAN, 16, NULL, AFPSRVRINFO_PASSWD,
-       "Server support change password", HFILL }},
+                FT_BOOLEAN, 16, NULL, AFPSRVRINFO_PASSWD,
+        "Server support change password", HFILL }},
     { &hf_asp_server_flag_no_save_passwd,
       { "Don't allow save password",      "asp.server_flag.no_save_passwd",
-               FT_BOOLEAN, 16, NULL, AFPSRVRINFO_NOSAVEPASSWD,
-       NULL, HFILL }},
+                FT_BOOLEAN, 16, NULL, AFPSRVRINFO_NOSAVEPASSWD,
+        NULL, HFILL }},
     { &hf_asp_server_flag_srv_msg,
       { "Support server message",      "asp.server_flag.srv_msg",
-               FT_BOOLEAN, 16, NULL, AFPSRVRINFO_SRVMSGS,
-       NULL, HFILL }},
+                FT_BOOLEAN, 16, NULL, AFPSRVRINFO_SRVMSGS,
+        NULL, HFILL }},
     { &hf_asp_server_flag_srv_sig,
       { "Support server signature",      "asp.server_flag.srv_sig",
-               FT_BOOLEAN, 16, NULL, AFPSRVRINFO_SRVSIGNATURE,
-       NULL, HFILL }},
+                FT_BOOLEAN, 16, NULL, AFPSRVRINFO_SRVSIGNATURE,
+        NULL, HFILL }},
     { &hf_asp_server_flag_tcpip,
       { "Support TCP/IP",      "asp.server_flag.tcpip",
-               FT_BOOLEAN, 16, NULL, AFPSRVRINFO_TCPIP,
-       "Server support TCP/IP", HFILL }},
+                FT_BOOLEAN, 16, NULL, AFPSRVRINFO_TCPIP,
+        "Server support TCP/IP", HFILL }},
     { &hf_asp_server_flag_notify,
       { "Support server notifications",      "asp.server_flag.notify",
-               FT_BOOLEAN, 16, NULL, AFPSRVRINFO_SRVNOTIFY,
-       "Server support notifications", HFILL }},
+                FT_BOOLEAN, 16, NULL, AFPSRVRINFO_SRVNOTIFY,
+        "Server support notifications", HFILL }},
     { &hf_asp_server_flag_reconnect,
       { "Support server reconnect",      "asp.server_flag.reconnect",
-               FT_BOOLEAN, 16, NULL, AFPSRVRINFO_SRVRECONNECT,
-       "Server support reconnect", HFILL }},
+                FT_BOOLEAN, 16, NULL, AFPSRVRINFO_SRVRECONNECT,
+        "Server support reconnect", HFILL }},
     { &hf_asp_server_flag_directory,
       { "Support directory services",      "asp.server_flag.directory",
-               FT_BOOLEAN, 16, NULL, AFPSRVRINFO_SRVDIRECTORY,
-       "Server support directory services", HFILL }},
+                FT_BOOLEAN, 16, NULL, AFPSRVRINFO_SRVDIRECTORY,
+        "Server support directory services", HFILL }},
     { &hf_asp_server_flag_utf8_name,
       { "Support UTF8 server name",      "asp.server_flag.utf8_name",
-               FT_BOOLEAN, 16, NULL, AFPSRVRINFO_SRVUTF8,
-       "Server support UTF8 server name", HFILL }},
+                FT_BOOLEAN, 16, NULL, AFPSRVRINFO_SRVUTF8,
+        "Server support UTF8 server name", HFILL }},
     { &hf_asp_server_flag_fast_copy,
       { "Support fast copy",      "asp.server_flag.fast_copy",
-               FT_BOOLEAN, 16, NULL, AFPSRVRINFO_FASTBOZO,
-       "Server support fast copy", HFILL }},
+                FT_BOOLEAN, 16, NULL, AFPSRVRINFO_FASTBOZO,
+        "Server support fast copy", HFILL }},
 
     { &hf_asp_server_addr_len,
       { "Length",          "asp.server_addr.len",
-       FT_UINT8, BASE_DEC, NULL, 0x0,
-       "Address length.", HFILL }},
+        FT_UINT8, BASE_DEC, NULL, 0x0,
+        "Address length.", HFILL }},
 
     { &hf_asp_server_addr_type,
       { "Type",          "asp.server_addr.type",
-       FT_UINT8, BASE_DEC, VALS(afp_server_addr_type_vals), 0x0,
-       "Address type.", HFILL }},
+        FT_UINT8, BASE_DEC, VALS(afp_server_addr_type_vals), 0x0,
+        "Address type.", HFILL }},
 
     { &hf_asp_server_addr_value,
       { "Value",          "asp.server_addr.value",
-       FT_BYTES, BASE_NONE, NULL, 0x0,
-       "Address value", HFILL }},
+        FT_BYTES, BASE_NONE, NULL, 0x0,
+        "Address value", HFILL }},
 
     { &hf_asp_server_utf8_name_len,
       { "Server name length",         "asp.server_utf8_name_len",
-       FT_UINT16, BASE_DEC, NULL, 0x0,
-       "UTF8 server name length", HFILL }},
+        FT_UINT16, BASE_DEC, NULL, 0x0,
+        "UTF8 server name length", HFILL }},
 
     { &hf_asp_server_utf8_name,
       { "Server name (UTF8)",         "asp.server_utf8_name",
-       FT_STRING, BASE_NONE, NULL, 0x0,
-       NULL, HFILL }},
+        FT_STRING, BASE_NONE, NULL, 0x0,
+        NULL, HFILL }},
   };
 
   static hf_register_info hf_zip[] = {
     { &hf_zip_function,
-      { "Function",    "zip.function", FT_UINT8,  BASE_DEC, VALS(zip_function_vals), 0x0,
-       "ZIP function", HFILL }},
+      { "Function",     "zip.function", FT_UINT8,  BASE_DEC, VALS(zip_function_vals), 0x0,
+        "ZIP function", HFILL }},
 
     { &hf_zip_zero_value,
       { "Pad (0)",      "zip.zero_value",FT_BYTES, BASE_NONE, NULL, 0x0,
-       "Pad", HFILL }},
+        "Pad", HFILL }},
 
     { &hf_zip_atp_function,
-      { "Function",    "zip.atp_function", FT_UINT8,  BASE_DEC, VALS(zip_atp_function_vals), 0x0,
-       NULL, HFILL }},
+      { "Function",     "zip.atp_function", FT_UINT8,  BASE_DEC, VALS(zip_atp_function_vals), 0x0,
+        NULL, HFILL }},
 
     { &hf_zip_start_index,
-      { "Start index", "zip.start_index", FT_UINT16, BASE_DEC, NULL, 0x0,
-       NULL, HFILL }},
+      { "Start index",  "zip.start_index", FT_UINT16, BASE_DEC, NULL, 0x0,
+        NULL, HFILL }},
 
     { &hf_zip_count,
-      { "Count",       "zip.count", FT_UINT16, BASE_DEC, NULL, 0x0,
-       NULL, HFILL }},
+      { "Count",        "zip.count", FT_UINT16, BASE_DEC, NULL, 0x0,
+        NULL, HFILL }},
 
     { &hf_zip_network_count,
-      { "Count",       "zip.network_count", FT_UINT8, BASE_DEC, NULL, 0x0,
-       NULL, HFILL }},
+      { "Count",        "zip.network_count", FT_UINT8, BASE_DEC, NULL, 0x0,
+        NULL, HFILL }},
     { &hf_zip_network,
       { "Network","zip.network", FT_UINT16, BASE_DEC, NULL, 0x0,
-       NULL, HFILL }},
+        NULL, HFILL }},
     { &hf_zip_network_start,
       { "Network start","zip.network_start", FT_UINT16, BASE_DEC, NULL, 0x0,
-       NULL, HFILL }},
+        NULL, HFILL }},
     { &hf_zip_network_end,
-      { "Network end", "zip.network_end", FT_UINT16, BASE_DEC, NULL, 0x0,
-       NULL, HFILL }},
+      { "Network end",  "zip.network_end", FT_UINT16, BASE_DEC, NULL, 0x0,
+        NULL, HFILL }},
 
     { &hf_zip_flags,
-      { "Flags",       "zip.flags", FT_BOOLEAN, 8, NULL, 0xC0,
-       NULL, HFILL }},
+      { "Flags",        "zip.flags", FT_BOOLEAN, 8, NULL, 0xC0,
+        NULL, HFILL }},
 
     { &hf_zip_last_flag,
-      { "Last Flag",   "zip.last_flag", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
-       "Non zero if contains last zone name in the zone list", HFILL }},
+      { "Last Flag",    "zip.last_flag", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
+        "Non zero if contains last zone name in the zone list", HFILL }},
 
     { &hf_zip_flags_zone_invalid,
-      { "Zone invalid",        "zip.flags.zone_invalid", FT_BOOLEAN, 8, NULL, 0x80,
-       NULL, HFILL }},
+      { "Zone invalid", "zip.flags.zone_invalid", FT_BOOLEAN, 8, NULL, 0x80,
+        NULL, HFILL }},
 
     { &hf_zip_flags_use_broadcast,
       { "Use broadcast","zip.flags.use_broadcast", FT_BOOLEAN, 8, NULL, 0x40,
-       NULL, HFILL }},
+        NULL, HFILL }},
 
     { &hf_zip_flags_only_one_zone,
       { "Only one zone","zip.flags.only_one_zone", FT_BOOLEAN, 8, NULL, 0x20,
-       NULL, HFILL }},
+        NULL, HFILL }},
 
     { &hf_zip_zone_name,
       { "Zone",         "zip.zone_name", FT_UINT_STRING, BASE_NONE, NULL, 0x0,
-       NULL, HFILL }},
+        NULL, HFILL }},
 
     { &hf_zip_default_zone,
       { "Default zone", "zip.default_zone",FT_UINT_STRING, BASE_NONE, NULL, 0x0,
-       NULL, HFILL }},
+        NULL, HFILL }},
 
     { &hf_zip_multicast_length,
-      { "Multicast length",    "zip.multicast_length", FT_UINT8,  BASE_DEC, NULL, 0x0,
-       "Multicast address length", HFILL }},
+      { "Multicast length",     "zip.multicast_length", FT_UINT8,  BASE_DEC, NULL, 0x0,
+        "Multicast address length", HFILL }},
 
     { &hf_zip_multicast_address,
       { "Multicast address", "zip.multicast_address",FT_BYTES, BASE_NONE, NULL, 0x0,
-       NULL, HFILL }},
+        NULL, HFILL }},
 
   };
 
   static hf_register_info hf_pap[] = {
     { &hf_pap_connid,
-      { "ConnID",      "pap.connid",   FT_UINT8,  BASE_DEC, NULL, 0x0,
-       "PAP connection ID", HFILL }},
+      { "ConnID",       "pap.connid",   FT_UINT8,  BASE_DEC, NULL, 0x0,
+        "PAP connection ID", HFILL }},
 
     { &hf_pap_function,
-      { "Function",    "pap.function", FT_UINT8,  BASE_DEC, VALS(pap_function_vals), 0x0,
-       "PAP function", HFILL }},
+      { "Function",     "pap.function", FT_UINT8,  BASE_DEC, VALS(pap_function_vals), 0x0,
+        "PAP function", HFILL }},
 
     { &hf_pap_socket,
-      { "Socket",      "pap.socket",   FT_UINT8,  BASE_DEC, NULL, 0x0,
-       "ATP responding socket number", HFILL }},
+      { "Socket",       "pap.socket",   FT_UINT8,  BASE_DEC, NULL, 0x0,
+        "ATP responding socket number", HFILL }},
 
     { &hf_pap_quantum,
-      { "Quantum",     "pap.quantum",  FT_UINT8,  BASE_DEC, NULL, 0x0,
-       "Flow quantum", HFILL }},
+      { "Quantum",      "pap.quantum",  FT_UINT8,  BASE_DEC, NULL, 0x0,
+        "Flow quantum", HFILL }},
 
     { &hf_pap_waittime,
-      { "Wait time",   "pap.quantum",  FT_UINT16,  BASE_DEC, NULL, 0x0,
-       NULL, HFILL }},
+      { "Wait time",    "pap.quantum",  FT_UINT16,  BASE_DEC, NULL, 0x0,
+        NULL, HFILL }},
 
     { &hf_pap_result,
-      { "Result",      "pap.quantum",  FT_UINT16,  BASE_DEC, NULL, 0x0,
-       NULL, HFILL }},
+      { "Result",       "pap.quantum",  FT_UINT16,  BASE_DEC, NULL, 0x0,
+        NULL, HFILL }},
 
     { &hf_pap_seq,
-      { "Sequence",    "pap.seq",      FT_UINT16,  BASE_DEC, NULL, 0x0,
-       "Sequence number", HFILL }},
+      { "Sequence",     "pap.seq",      FT_UINT16,  BASE_DEC, NULL, 0x0,
+        "Sequence number", HFILL }},
 
     { &hf_pap_status,
-      { "Status",      "pap.status",   FT_STRING,  BASE_NONE, NULL, 0x0,
-               "Printer status", HFILL }},
+      { "Status",       "pap.status",   FT_STRING,  BASE_NONE, NULL, 0x0,
+                "Printer status", HFILL }},
 
     { &hf_pap_eof,
-      { "EOF", "pap.eof", FT_BOOLEAN, BASE_NONE,
-               NULL, 0x0, NULL, HFILL }},
+      { "EOF",  "pap.eof", FT_BOOLEAN, BASE_NONE,
+                NULL, 0x0, NULL, HFILL }},
 
     { &hf_pap_pad,
-      { "Pad",         "pad.pad",              FT_NONE,   BASE_NONE, NULL, 0,
-               "Pad Byte",     HFILL }},
+      { "Pad",          "pad.pad",              FT_NONE,   BASE_NONE, NULL, 0,
+                "Pad Byte",     HFILL }},
 
   };
 
@@ -2432,14 +2432,14 @@ proto_register_atalk(void)
     &atp_defragment);
 
   proto_rtmp = proto_register_protocol("Routing Table Maintenance Protocol",
-                                      "RTMP", "rtmp");
+                                       "RTMP", "rtmp");
   proto_register_field_array(proto_rtmp, hf_rtmp, array_length(hf_rtmp));
 
   proto_register_subtree_array(ett, array_length(ett));
 
   /* subdissector code */
   ddp_dissector_table = register_dissector_table("ddp.type", "DDP packet type",
-                                                FT_UINT8, BASE_HEX);
+                                                 FT_UINT8, BASE_HEX);
 }
 
 void
index 958667a54fb6f15aa18300dd53528d53b61b38e7..2ec3c681af573a08848cebe13f62691a2f45c1d3 100644 (file)
@@ -82,104 +82,104 @@ static gint unknown_aal2_type = TRAF_UNKNOWN;
 /*
  * See
  *
- *     http://www.atmforum.org/atmforum/specs/approved.html
+ *      http://www.atmforum.org/atmforum/specs/approved.html
  *
  * for a number of ATM Forum specifications, e.g. the LAN Emulation
  * over ATM 1.0 spec, whence I got most of this.
  */
 
 /* LE Control opcodes */
-#define LE_CONFIGURE_REQUEST   0x0001
-#define LE_CONFIGURE_RESPONSE  0x0101
-#define LE_JOIN_REQUEST                0x0002
-#define LE_JOIN_RESPONSE       0x0102
-#define READY_QUERY            0x0003
-#define READY_IND              0x0103
-#define LE_REGISTER_REQUEST    0x0004
-#define LE_REGISTER_RESPONSE   0x0104
-#define LE_UNREGISTER_REQUEST  0x0005
-#define LE_UNREGISTER_RESPONSE 0x0105
-#define LE_ARP_REQUEST         0x0006
-#define LE_ARP_RESPONSE                0x0106
-#define LE_FLUSH_REQUEST       0x0007
-#define LE_FLUSH_RESPONSE      0x0107
-#define LE_NARP_REQUEST                0x0008
-#define LE_TOPOLOGY_REQUEST    0x0009
-#define LE_VERIFY_REQUEST      0x000A
-#define LE_VERIFY_RESPONSE     0x010A
+#define LE_CONFIGURE_REQUEST    0x0001
+#define LE_CONFIGURE_RESPONSE   0x0101
+#define LE_JOIN_REQUEST         0x0002
+#define LE_JOIN_RESPONSE        0x0102
+#define READY_QUERY             0x0003
+#define READY_IND               0x0103
+#define LE_REGISTER_REQUEST     0x0004
+#define LE_REGISTER_RESPONSE    0x0104
+#define LE_UNREGISTER_REQUEST   0x0005
+#define LE_UNREGISTER_RESPONSE  0x0105
+#define LE_ARP_REQUEST          0x0006
+#define LE_ARP_RESPONSE         0x0106
+#define LE_FLUSH_REQUEST        0x0007
+#define LE_FLUSH_RESPONSE       0x0107
+#define LE_NARP_REQUEST         0x0008
+#define LE_TOPOLOGY_REQUEST     0x0009
+#define LE_VERIFY_REQUEST       0x000A
+#define LE_VERIFY_RESPONSE      0x010A
 
 static const value_string le_control_opcode_vals[] = {
-       { LE_CONFIGURE_REQUEST,   "LE_CONFIGURE_REQUEST" },
-       { LE_CONFIGURE_RESPONSE,  "LE_CONFIGURE_RESPONSE" },
-       { LE_JOIN_REQUEST,        "LE_JOIN_REQUEST" },
-       { LE_JOIN_RESPONSE,       "LE_JOIN_RESPONSE" },
-       { READY_QUERY,            "READY_QUERY" },
-       { READY_IND,              "READY_IND" },
-       { LE_REGISTER_REQUEST,    "LE_REGISTER_REQUEST" },
-       { LE_REGISTER_RESPONSE,   "LE_REGISTER_RESPONSE" },
-       { LE_UNREGISTER_REQUEST,  "LE_UNREGISTER_REQUEST" },
-       { LE_UNREGISTER_RESPONSE, "LE_UNREGISTER_RESPONSE" },
-       { LE_ARP_REQUEST,         "LE_ARP_REQUEST" },
-       { LE_ARP_RESPONSE,        "LE_ARP_RESPONSE" },
-       { LE_FLUSH_REQUEST,       "LE_FLUSH_REQUEST" },
-       { LE_FLUSH_RESPONSE,      "LE_FLUSH_RESPONSE" },
-       { LE_NARP_REQUEST,        "LE_NARP_REQUEST" },
-       { LE_TOPOLOGY_REQUEST,    "LE_TOPOLOGY_REQUEST" },
-       { LE_VERIFY_REQUEST,      "LE_VERIFY_REQUEST" },
-       { LE_VERIFY_RESPONSE,     "LE_VERIFY_RESPONSE" },
-       { 0,                      NULL }
+  { LE_CONFIGURE_REQUEST,   "LE_CONFIGURE_REQUEST" },
+  { LE_CONFIGURE_RESPONSE,  "LE_CONFIGURE_RESPONSE" },
+  { LE_JOIN_REQUEST,        "LE_JOIN_REQUEST" },
+  { LE_JOIN_RESPONSE,       "LE_JOIN_RESPONSE" },
+  { READY_QUERY,            "READY_QUERY" },
+  { READY_IND,              "READY_IND" },
+  { LE_REGISTER_REQUEST,    "LE_REGISTER_REQUEST" },
+  { LE_REGISTER_RESPONSE,   "LE_REGISTER_RESPONSE" },
+  { LE_UNREGISTER_REQUEST,  "LE_UNREGISTER_REQUEST" },
+  { LE_UNREGISTER_RESPONSE, "LE_UNREGISTER_RESPONSE" },
+  { LE_ARP_REQUEST,         "LE_ARP_REQUEST" },
+  { LE_ARP_RESPONSE,        "LE_ARP_RESPONSE" },
+  { LE_FLUSH_REQUEST,       "LE_FLUSH_REQUEST" },
+  { LE_FLUSH_RESPONSE,      "LE_FLUSH_RESPONSE" },
+  { LE_NARP_REQUEST,        "LE_NARP_REQUEST" },
+  { LE_TOPOLOGY_REQUEST,    "LE_TOPOLOGY_REQUEST" },
+  { LE_VERIFY_REQUEST,      "LE_VERIFY_REQUEST" },
+  { LE_VERIFY_RESPONSE,     "LE_VERIFY_RESPONSE" },
+  { 0,                      NULL }
 };
 
 /* LE Control statuses */
 static const value_string le_control_status_vals[] = {
-       { 0,  "Success" },
-       { 1,  "Version not supported" },
-       { 2,  "Invalid request parameters" },
-       { 4,  "Duplicate LAN destination registration" },
-       { 5,  "Duplicate ATM address" },
-       { 6,  "Insufficient resources to grant request" },
-       { 7,  "Access denied" },
-       { 8,  "Invalid REQUESTOR-ID" },
-       { 9,  "Invalid LAN destination" },
-       { 10, "Invalid ATM address" },
-       { 20, "No configuration" },
-       { 21, "LE_CONFIGURE error" },
-       { 22, "Insufficient information" },
-       { 24, "TLV not found" },
-       { 0,  NULL }
+  { 0,  "Success" },
+  { 1,  "Version not supported" },
+  { 2,  "Invalid request parameters" },
+  { 4,  "Duplicate LAN destination registration" },
+  { 5,  "Duplicate ATM address" },
+  { 6,  "Insufficient resources to grant request" },
+  { 7,  "Access denied" },
+  { 8,  "Invalid REQUESTOR-ID" },
+  { 9,  "Invalid LAN destination" },
+  { 10, "Invalid ATM address" },
+  { 20, "No configuration" },
+  { 21, "LE_CONFIGURE error" },
+  { 22, "Insufficient information" },
+  { 24, "TLV not found" },
+  { 0,  NULL }
 };
 
 /* LE Control LAN destination tags */
-#define        TAG_NOT_PRESENT         0x0000
-#define        TAG_MAC_ADDRESS         0x0001
-#define        TAG_ROUTE_DESCRIPTOR    0x0002
+#define TAG_NOT_PRESENT         0x0000
+#define TAG_MAC_ADDRESS         0x0001
+#define TAG_ROUTE_DESCRIPTOR    0x0002
 
 static const value_string le_control_landest_tag_vals[] = {
-       { TAG_NOT_PRESENT,       "Not present" },
-       { TAG_MAC_ADDRESS,       "MAC address" },
-       { TAG_ROUTE_DESCRIPTOR,  "Route descriptor" },
-       { 0,                     NULL }
+  { TAG_NOT_PRESENT,       "Not present" },
+  { TAG_MAC_ADDRESS,       "MAC address" },
+  { TAG_ROUTE_DESCRIPTOR,  "Route descriptor" },
+  { 0,                     NULL }
 };
 
 /* LE Control LAN types */
-#define        LANT_UNSPEC     0x00
-#define        LANT_802_3      0x01
-#define        LANT_802_5      0x02
+#define LANT_UNSPEC     0x00
+#define LANT_802_3      0x01
+#define LANT_802_5      0x02
 
 static const value_string le_control_lan_type_vals[] = {
-       { LANT_UNSPEC, "Unspecified" },
-       { LANT_802_3,  "Ethernet/802.3" },
-       { LANT_802_5,  "802.5" },
-       { 0,           NULL }
+  { LANT_UNSPEC, "Unspecified" },
+  { LANT_802_3,  "Ethernet/802.3" },
+  { LANT_802_5,  "802.5" },
+  { 0,           NULL }
 };
 
 static const value_string le_control_frame_size_vals[] = {
-       { 0x00, "Unspecified" },
-       { 0x01, "1516/1528/1580/1592" },
-       { 0x02, "4544/4556/1580/1592" },
-       { 0x03, "9234/9246" },
-       { 0x04, "18190/18202" },
-       { 0,    NULL }
+  { 0x00, "Unspecified" },
+  { 0x01, "1516/1528/1580/1592" },
+  { 0x02, "4544/4556/1580/1592" },
+  { 0x03, "9234/9246" },
+  { 0x04, "18190/18202" },
+  { 0,    NULL }
 };
 
 static void
@@ -193,7 +193,7 @@ dissect_le_client(tvbuff_t *tvb, proto_tree *tree)
     lane_tree = proto_item_add_subtree(ti, ett_atm_lane);
 
     proto_tree_add_text(lane_tree, tvb, 0, 2, "LE Client: 0x%04X",
-                       tvb_get_ntohs(tvb, 0));
+                        tvb_get_ntohs(tvb, 0));
   }
 }
 
@@ -208,33 +208,33 @@ dissect_lan_destination(tvbuff_t *tvb, int offset, const char *type, proto_tree
   guint16 route_descriptor;
 
   td = proto_tree_add_text(tree, tvb, offset, 8, "%s LAN destination",
-                       type);
+                           type);
   dest_tree = proto_item_add_subtree(td, ett_atm_lane_lc_lan_dest);
   tag = tvb_get_ntohs(tvb, offset);
   proto_tree_add_text(dest_tree, tvb, offset, 2, "Tag: %s",
-       val_to_str(tag, le_control_landest_tag_vals,
-                               "Unknown (0x%04X)"));
+                      val_to_str(tag, le_control_landest_tag_vals,
+                                 "Unknown (0x%04X)"));
   offset += 2;
 
   switch (tag) {
 
   case TAG_MAC_ADDRESS:
     proto_tree_add_text(dest_tree, tvb, offset, 6, "MAC address: %s",
-                       ether_to_str(tvb_get_ptr(tvb, offset, 6)));
+                        ether_to_str(tvb_get_ptr(tvb, offset, 6)));
     break;
 
   case TAG_ROUTE_DESCRIPTOR:
     offset += 4;
     route_descriptor = tvb_get_ntohs(tvb, offset);
     trd = proto_tree_add_text(dest_tree, tvb, offset, 2, "Route descriptor: 0x%02X",
-                       route_descriptor);
+                              route_descriptor);
     rd_tree = proto_item_add_subtree(td, ett_atm_lane_lc_lan_dest_rd);
     proto_tree_add_text(rd_tree, tvb, offset, 2, "%s",
-           decode_numeric_bitfield(route_descriptor, 0xFFF0, 2*8,
-                       "LAN ID = %u"));
+                        decode_numeric_bitfield(route_descriptor, 0xFFF0, 2*8,
+                                                "LAN ID = %u"));
     proto_tree_add_text(rd_tree, tvb, offset, 2, "%s",
-           decode_numeric_bitfield(route_descriptor, 0x000F, 2*8,
-                       "Bridge number = %u"));
+                        decode_numeric_bitfield(route_descriptor, 0x000F, 2*8,
+                                                "Bridge number = %u"));
     break;
   }
 }
@@ -242,60 +242,60 @@ dissect_lan_destination(tvbuff_t *tvb, int offset, const char *type, proto_tree
 /*
  * TLV values in LE Control frames.
  */
-#define        TLV_TYPE(oui, ident)            (((oui) << 8) | (ident))
-
-#define        LE_CONTROL_TIMEOUT              TLV_TYPE(OUI_ATM_FORUM, 0x01)
-#define        LE_MAX_UNK_FRAME_COUNT          TLV_TYPE(OUI_ATM_FORUM, 0x02)
-#define        LE_MAX_UNK_FRAME_TIME           TLV_TYPE(OUI_ATM_FORUM, 0x03)
-#define        LE_VCC_TIMEOUT_PERIOD           TLV_TYPE(OUI_ATM_FORUM, 0x04)
-#define        LE_MAX_RETRY_COUNT              TLV_TYPE(OUI_ATM_FORUM, 0x05)
-#define        LE_AGING_TIME                   TLV_TYPE(OUI_ATM_FORUM, 0x06)
-#define        LE_FORWARD_DELAY_TIME           TLV_TYPE(OUI_ATM_FORUM, 0x07)
-#define        LE_EXPECTED_ARP_RESPONSE_TIME   TLV_TYPE(OUI_ATM_FORUM, 0x08)
-#define        LE_FLUSH_TIMEOUT                TLV_TYPE(OUI_ATM_FORUM, 0x09)
-#define        LE_PATH_SWITCHING_DELAY         TLV_TYPE(OUI_ATM_FORUM, 0x0A)
-#define        LE_LOCAL_SEGMENT_ID             TLV_TYPE(OUI_ATM_FORUM, 0x0B)
-#define        LE_MCAST_SEND_VCC_TYPE          TLV_TYPE(OUI_ATM_FORUM, 0x0C)
-#define        LE_MCAST_SEND_VCC_AVGRATE       TLV_TYPE(OUI_ATM_FORUM, 0x0D)
-#define        LE_MCAST_SEND_VCC_PEAKRATE      TLV_TYPE(OUI_ATM_FORUM, 0x0E)
-#define        LE_CONN_COMPLETION_TIMER        TLV_TYPE(OUI_ATM_FORUM, 0x0F)
-#define        LE_CONFIG_FRAG_INFO             TLV_TYPE(OUI_ATM_FORUM, 0x10)
-#define        LE_LAYER_3_ADDRESS              TLV_TYPE(OUI_ATM_FORUM, 0x11)
-#define        LE_ELAN_ID                      TLV_TYPE(OUI_ATM_FORUM, 0x12)
-#define        LE_SERVICE_CATEGORY             TLV_TYPE(OUI_ATM_FORUM, 0x13)
-#define        LE_LLC_MUXED_ATM_ADDRESS        TLV_TYPE(OUI_ATM_FORUM, 0x2B)
-#define        LE_X5_ADJUSTMENT                TLV_TYPE(OUI_ATM_FORUM, 0x2C)
-#define        LE_PREFERRED_LES                TLV_TYPE(OUI_ATM_FORUM, 0x2D)
+#define TLV_TYPE(oui, ident)            (((oui) << 8) | (ident))
+
+#define LE_CONTROL_TIMEOUT              TLV_TYPE(OUI_ATM_FORUM, 0x01)
+#define LE_MAX_UNK_FRAME_COUNT          TLV_TYPE(OUI_ATM_FORUM, 0x02)
+#define LE_MAX_UNK_FRAME_TIME           TLV_TYPE(OUI_ATM_FORUM, 0x03)
+#define LE_VCC_TIMEOUT_PERIOD           TLV_TYPE(OUI_ATM_FORUM, 0x04)
+#define LE_MAX_RETRY_COUNT              TLV_TYPE(OUI_ATM_FORUM, 0x05)
+#define LE_AGING_TIME                   TLV_TYPE(OUI_ATM_FORUM, 0x06)
+#define LE_FORWARD_DELAY_TIME           TLV_TYPE(OUI_ATM_FORUM, 0x07)
+#define LE_EXPECTED_ARP_RESPONSE_TIME   TLV_TYPE(OUI_ATM_FORUM, 0x08)
+#define LE_FLUSH_TIMEOUT                TLV_TYPE(OUI_ATM_FORUM, 0x09)
+#define LE_PATH_SWITCHING_DELAY         TLV_TYPE(OUI_ATM_FORUM, 0x0A)
+#define LE_LOCAL_SEGMENT_ID             TLV_TYPE(OUI_ATM_FORUM, 0x0B)
+#define LE_MCAST_SEND_VCC_TYPE          TLV_TYPE(OUI_ATM_FORUM, 0x0C)
+#define LE_MCAST_SEND_VCC_AVGRATE       TLV_TYPE(OUI_ATM_FORUM, 0x0D)
+#define LE_MCAST_SEND_VCC_PEAKRATE      TLV_TYPE(OUI_ATM_FORUM, 0x0E)
+#define LE_CONN_COMPLETION_TIMER        TLV_TYPE(OUI_ATM_FORUM, 0x0F)
+#define LE_CONFIG_FRAG_INFO             TLV_TYPE(OUI_ATM_FORUM, 0x10)
+#define LE_LAYER_3_ADDRESS              TLV_TYPE(OUI_ATM_FORUM, 0x11)
+#define LE_ELAN_ID                      TLV_TYPE(OUI_ATM_FORUM, 0x12)
+#define LE_SERVICE_CATEGORY             TLV_TYPE(OUI_ATM_FORUM, 0x13)
+#define LE_LLC_MUXED_ATM_ADDRESS        TLV_TYPE(OUI_ATM_FORUM, 0x2B)
+#define LE_X5_ADJUSTMENT                TLV_TYPE(OUI_ATM_FORUM, 0x2C)
+#define LE_PREFERRED_LES                TLV_TYPE(OUI_ATM_FORUM, 0x2D)
 
 static const value_string le_tlv_type_vals[] = {
-       { LE_CONTROL_TIMEOUT,           "Control Time-out" },
-       { LE_MAX_UNK_FRAME_COUNT,       "Maximum Unknown Frame Count" },
-       { LE_MAX_UNK_FRAME_TIME,        "Maximum Unknown Frame Time" },
-       { LE_VCC_TIMEOUT_PERIOD,        "VCC Time-out" },
-       { LE_MAX_RETRY_COUNT,           "Maximum Retry Count" },
-       { LE_AGING_TIME,                "Aging Time" },
-       { LE_FORWARD_DELAY_TIME,        "Forwarding Delay Time" },
-       { LE_EXPECTED_ARP_RESPONSE_TIME, "Expected LE_ARP Response Time" },
-       { LE_FLUSH_TIMEOUT,             "Flush Time-out" },
-       { LE_PATH_SWITCHING_DELAY,      "Path Switching Delay" },
-       { LE_LOCAL_SEGMENT_ID,          "Local Segment ID" },
-       { LE_MCAST_SEND_VCC_TYPE,       "Mcast Send VCC Type" },
-       { LE_MCAST_SEND_VCC_AVGRATE,    "Mcast Send VCC AvgRate" },
-       { LE_MCAST_SEND_VCC_PEAKRATE,   "Mcast Send VCC PeakRate" },
-       { LE_CONN_COMPLETION_TIMER,     "Connection Completion Timer" },
-       { LE_CONFIG_FRAG_INFO,          "Config Frag Info" },
-       { LE_LAYER_3_ADDRESS,           "Layer 3 Address" },
-       { LE_ELAN_ID,                   "ELAN ID" },
-       { LE_SERVICE_CATEGORY,          "Service Category" },
-       { LE_LLC_MUXED_ATM_ADDRESS,     "LLC-muxed ATM Address" },
-       { LE_X5_ADJUSTMENT,             "X5 Adjustment" },
-       { LE_PREFERRED_LES,             "Preferred LES" },
-       { 0,                            NULL },
+  { LE_CONTROL_TIMEOUT,           "Control Time-out" },
+  { LE_MAX_UNK_FRAME_COUNT,       "Maximum Unknown Frame Count" },
+  { LE_MAX_UNK_FRAME_TIME,        "Maximum Unknown Frame Time" },
+  { LE_VCC_TIMEOUT_PERIOD,        "VCC Time-out" },
+  { LE_MAX_RETRY_COUNT,           "Maximum Retry Count" },
+  { LE_AGING_TIME,                "Aging Time" },
+  { LE_FORWARD_DELAY_TIME,        "Forwarding Delay Time" },
+  { LE_EXPECTED_ARP_RESPONSE_TIME, "Expected LE_ARP Response Time" },
+  { LE_FLUSH_TIMEOUT,             "Flush Time-out" },
+  { LE_PATH_SWITCHING_DELAY,      "Path Switching Delay" },
+  { LE_LOCAL_SEGMENT_ID,          "Local Segment ID" },
+  { LE_MCAST_SEND_VCC_TYPE,       "Mcast Send VCC Type" },
+  { LE_MCAST_SEND_VCC_AVGRATE,    "Mcast Send VCC AvgRate" },
+  { LE_MCAST_SEND_VCC_PEAKRATE,   "Mcast Send VCC PeakRate" },
+  { LE_CONN_COMPLETION_TIMER,     "Connection Completion Timer" },
+  { LE_CONFIG_FRAG_INFO,          "Config Frag Info" },
+  { LE_LAYER_3_ADDRESS,           "Layer 3 Address" },
+  { LE_ELAN_ID,                   "ELAN ID" },
+  { LE_SERVICE_CATEGORY,          "Service Category" },
+  { LE_LLC_MUXED_ATM_ADDRESS,     "LLC-muxed ATM Address" },
+  { LE_X5_ADJUSTMENT,             "X5 Adjustment" },
+  { LE_PREFERRED_LES,             "Preferred LES" },
+  { 0,                            NULL },
 };
 
 static void
 dissect_le_control_tlvs(tvbuff_t *tvb, int offset, guint num_tlvs,
-                       proto_tree *tree)
+                        proto_tree *tree)
 {
   guint32 tlv_type;
   guint8 tlv_length;
@@ -306,10 +306,10 @@ dissect_le_control_tlvs(tvbuff_t *tvb, int offset, guint num_tlvs,
     tlv_type = tvb_get_ntohl(tvb, offset);
     tlv_length = tvb_get_guint8(tvb, offset+4);
     ttlv = proto_tree_add_text(tree, tvb, offset, 5+tlv_length, "TLV type: %s",
-       val_to_str(tlv_type, le_tlv_type_vals, "Unknown (0x%08x)"));
+                               val_to_str(tlv_type, le_tlv_type_vals, "Unknown (0x%08x)"));
     tlv_tree = proto_item_add_subtree(ttlv, ett_atm_lane_lc_tlv);
     proto_tree_add_text(tlv_tree, tvb, offset, 4, "TLV Type: %s",
-       val_to_str(tlv_type, le_tlv_type_vals, "Unknown (0x%08x)"));
+                        val_to_str(tlv_type, le_tlv_type_vals, "Unknown (0x%08x)"));
     proto_tree_add_text(tlv_tree, tvb, offset+4, 1, "TLV Length: %u", tlv_length);
     offset += 5+tlv_length;
     num_tlvs--;
@@ -329,17 +329,17 @@ dissect_le_configure_join_frame(tvbuff_t *tvb, int offset, proto_tree *tree)
   offset += 8;
 
   proto_tree_add_text(tree, tvb, offset, 20, "Source ATM Address: %s",
-                     tvb_bytes_to_str(tvb, offset, 20));
+                      tvb_bytes_to_str(tvb, offset, 20));
   offset += 20;
 
   proto_tree_add_text(tree, tvb, offset, 1, "LAN type: %s",
-       val_to_str(tvb_get_guint8(tvb, offset), le_control_lan_type_vals,
-                               "Unknown (0x%02X)"));
+                      val_to_str(tvb_get_guint8(tvb, offset), le_control_lan_type_vals,
+                                 "Unknown (0x%02X)"));
   offset += 1;
 
   proto_tree_add_text(tree, tvb, offset, 1, "Maximum frame size: %s",
-       val_to_str(tvb_get_guint8(tvb, offset), le_control_frame_size_vals,
-                               "Unknown (0x%02X)"));
+                      val_to_str(tvb_get_guint8(tvb, offset), le_control_frame_size_vals,
+                                 "Unknown (0x%02X)"));
   offset += 1;
 
   num_tlvs = tvb_get_guint8(tvb, offset);
@@ -351,14 +351,14 @@ dissect_le_configure_join_frame(tvbuff_t *tvb, int offset, proto_tree *tree)
   offset += 1;
 
   proto_tree_add_text(tree, tvb, offset, 20, "Target ATM Address: %s",
-                     tvb_bytes_to_str(tvb, offset, 20));
+                      tvb_bytes_to_str(tvb, offset, 20));
   offset += 20;
 
   if (name_size > 32)
     name_size = 32;
   if (name_size != 0) {
     proto_tree_add_text(tree, tvb, offset, name_size, "ELAN name: %s",
-                       tvb_bytes_to_str(tvb, offset, name_size));
+                        tvb_bytes_to_str(tvb, offset, name_size));
   }
   offset += 32;
 
@@ -377,7 +377,7 @@ dissect_le_registration_frame(tvbuff_t *tvb, int offset, proto_tree *tree)
   offset += 8;
 
   proto_tree_add_text(tree, tvb, offset, 20, "Source ATM Address: %s",
-                     tvb_bytes_to_str(tvb, offset, 20));
+                      tvb_bytes_to_str(tvb, offset, 20));
   offset += 20;
 
   /* Reserved */
@@ -405,7 +405,7 @@ dissect_le_arp_frame(tvbuff_t *tvb, int offset, proto_tree *tree)
   offset += 8;
 
   proto_tree_add_text(tree, tvb, offset, 20, "Source ATM Address: %s",
-                     tvb_bytes_to_str(tvb, offset, 20));
+                      tvb_bytes_to_str(tvb, offset, 20));
   offset += 20;
 
   /* Reserved */
@@ -419,7 +419,7 @@ dissect_le_arp_frame(tvbuff_t *tvb, int offset, proto_tree *tree)
   offset += 1;
 
   proto_tree_add_text(tree, tvb, offset, 20, "Target ATM Address: %s",
-                     tvb_bytes_to_str(tvb, offset, 20));
+                      tvb_bytes_to_str(tvb, offset, 20));
   offset += 20;
 
   /* Reserved */
@@ -444,7 +444,7 @@ dissect_le_verify_frame(tvbuff_t *tvb, int offset, proto_tree *tree)
   offset += 1;
 
   proto_tree_add_text(tree, tvb, offset, 20, "Target ATM Address: %s",
-                     tvb_bytes_to_str(tvb, offset, 20));
+                      tvb_bytes_to_str(tvb, offset, 20));
   offset += 20;
 
   /* Reserved */
@@ -463,14 +463,14 @@ dissect_le_flush_frame(tvbuff_t *tvb, int offset, proto_tree *tree)
   offset += 8;
 
   proto_tree_add_text(tree, tvb, offset, 20, "Source ATM Address: %s",
-                     tvb_bytes_to_str(tvb, offset, 20));
+                      tvb_bytes_to_str(tvb, offset, 20));
   offset += 20;
 
   /* Reserved */
   offset += 4;
 
   proto_tree_add_text(tree, tvb, offset, 20, "Target ATM Address: %s",
-                     tvb_bytes_to_str(tvb, offset, 20));
+                      tvb_bytes_to_str(tvb, offset, 20));
   offset += 20;
 
   /* Reserved */
@@ -495,32 +495,32 @@ dissect_le_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     lane_tree = proto_item_add_subtree(ti, ett_atm_lane);
 
     proto_tree_add_text(lane_tree, tvb, offset, 2, "Marker: 0x%04X",
-                       tvb_get_ntohs(tvb, offset));
+                        tvb_get_ntohs(tvb, offset));
   }
   offset += 2;
 
   if (tree) {
     proto_tree_add_text(lane_tree, tvb, offset, 1, "Protocol: 0x%02X",
-                       tvb_get_guint8(tvb, offset));
+                        tvb_get_guint8(tvb, offset));
   }
   offset += 1;
 
   if (tree) {
     proto_tree_add_text(lane_tree, tvb, offset, 1, "Version: 0x%02X",
-                       tvb_get_guint8(tvb, offset));
+                        tvb_get_guint8(tvb, offset));
   }
   offset += 1;
 
   opcode = tvb_get_ntohs(tvb, offset);
   if (check_col(pinfo->cinfo, COL_INFO)) {
     col_append_fstr(pinfo->cinfo, COL_INFO, ": %s",
-       val_to_str(opcode, le_control_opcode_vals,
-                               "Unknown opcode (0x%04X)"));
+                    val_to_str(opcode, le_control_opcode_vals,
+                               "Unknown opcode (0x%04X)"));
   }
   if (tree) {
     proto_tree_add_text(lane_tree, tvb, offset, 2, "Opcode: %s",
-       val_to_str(opcode, le_control_opcode_vals,
-                               "Unknown (0x%04X)"));
+                        val_to_str(opcode, le_control_opcode_vals,
+                                   "Unknown (0x%04X)"));
   }
   offset += 2;
 
@@ -533,22 +533,22 @@ dissect_le_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     if (opcode & 0x0100) {
       /* Response; decode status. */
       proto_tree_add_text(lane_tree, tvb, offset, 2, "Status: %s",
-       val_to_str(tvb_get_ntohs(tvb, offset), le_control_status_vals,
-                               "Unknown (0x%04X)"));
+                          val_to_str(tvb_get_ntohs(tvb, offset), le_control_status_vals,
+                                     "Unknown (0x%04X)"));
     }
     offset += 2;
 
     proto_tree_add_text(lane_tree, tvb, offset, 4, "Transaction ID: 0x%08X",
-                       tvb_get_ntohl(tvb, offset));
+                        tvb_get_ntohl(tvb, offset));
     offset += 4;
 
     proto_tree_add_text(lane_tree, tvb, offset, 2, "Requester LECID: 0x%04X",
-                       tvb_get_ntohs(tvb, offset));
+                        tvb_get_ntohs(tvb, offset));
     offset += 2;
 
     flags = tvb_get_ntohs(tvb, offset);
     tf = proto_tree_add_text(lane_tree, tvb, offset, 2, "Flags: 0x%04X",
-                       flags);
+                             flags);
     flags_tree = proto_item_add_subtree(tf, ett_atm_lane_lc_flags);
 
     switch (opcode) {
@@ -556,8 +556,8 @@ dissect_le_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     case LE_CONFIGURE_REQUEST:
     case LE_CONFIGURE_RESPONSE:
       proto_tree_add_text(flags_tree, tvb, offset, 2, "%s",
-       decode_boolean_bitfield(flags, 0x0002, 8*2,
-                               "V2 capable", "Not V2 capable"));
+                          decode_boolean_bitfield(flags, 0x0002, 8*2,
+                                                  "V2 capable", "Not V2 capable"));
       offset += 2;
       dissect_le_configure_join_frame(tvb, offset, lane_tree);
       break;
@@ -565,24 +565,24 @@ dissect_le_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     case LE_JOIN_REQUEST:
     case LE_JOIN_RESPONSE:
       proto_tree_add_text(flags_tree, tvb, offset, 2, "%s",
-       decode_boolean_bitfield(flags, 0x0002, 8*2,
-                               "V2 capable", "Not V2 capable"));
+                          decode_boolean_bitfield(flags, 0x0002, 8*2,
+                                                  "V2 capable", "Not V2 capable"));
       if (opcode == LE_JOIN_REQUEST) {
         proto_tree_add_text(flags_tree, tvb, offset, 2, "%s",
-               decode_boolean_bitfield(flags, 0x0004, 8*2,
-                               "Selective multicast", "No selective multicast"));
+                            decode_boolean_bitfield(flags, 0x0004, 8*2,
+                                                    "Selective multicast", "No selective multicast"));
       } else {
         proto_tree_add_text(flags_tree, tvb, offset, 2, "%s",
-               decode_boolean_bitfield(flags, 0x0008, 8*2,
-                               "V2 required", "V2 not required"));
+                            decode_boolean_bitfield(flags, 0x0008, 8*2,
+                                        "V2 required", "V2 not required"));
       }
       proto_tree_add_text(flags_tree, tvb, offset, 2, "%s",
-       decode_boolean_bitfield(flags, 0x0080, 8*2,
-                               "Proxy", "Not proxy"));
+        decode_boolean_bitfield(flags, 0x0080, 8*2,
+                                "Proxy", "Not proxy"));
       proto_tree_add_text(flags_tree, tvb, offset, 2, "%s",
-       decode_boolean_bitfield(flags, 0x0200, 8*2,
-                               "Exclude explorer frames",
-                               "Don't exclude explorer frames"));
+        decode_boolean_bitfield(flags, 0x0200, 8*2,
+                                "Exclude explorer frames",
+                                "Don't exclude explorer frames"));
       offset += 2;
       dissect_le_configure_join_frame(tvb, offset, lane_tree);
       break;
@@ -600,8 +600,8 @@ dissect_le_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     case LE_NARP_REQUEST:
       if (opcode != LE_NARP_REQUEST) {
         proto_tree_add_text(flags_tree, tvb, offset, 2, "%s",
-               decode_boolean_bitfield(flags, 0x0001, 8*2,
-                               "Remote address", "Local address"));
+                            decode_boolean_bitfield(flags, 0x0001, 8*2,
+                                                    "Remote address", "Local address"));
       }
       offset += 2;
       dissect_le_arp_frame(tvb, offset, lane_tree);
@@ -609,8 +609,8 @@ dissect_le_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
     case LE_TOPOLOGY_REQUEST:
       proto_tree_add_text(flags_tree, tvb, offset, 2, "%s",
-       decode_boolean_bitfield(flags, 0x0100, 8*2,
-                               "Topology change", "No topology change"));
+                          decode_boolean_bitfield(flags, 0x0100, 8*2,
+                                                  "Topology change", "No topology change"));
       offset += 2;
       /* 92 reserved bytes */
       break;
@@ -658,8 +658,8 @@ capture_lane(const union wtap_pseudo_header *pseudo_header, const guchar *pd,
 static void
 dissect_lane(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 {
-  tvbuff_t     *next_tvb;
-  tvbuff_t     *next_tvb_le_client;
+  tvbuff_t *next_tvb;
+  tvbuff_t *next_tvb_le_client;
 
   col_set_str(pinfo->cinfo, COL_PROTOCOL, "ATM LANE");
 
@@ -676,7 +676,7 @@ dissect_lane(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     dissect_le_client(tvb, tree);
 
     /* Dissect as Ethernet */
-    next_tvb_le_client = tvb_new_subset_remaining(tvb, 2);
+    next_tvb_le_client  = tvb_new_subset_remaining(tvb, 2);
     call_dissector(eth_withoutfcs_handle, next_tvb_le_client, pinfo, tree);
     break;
 
@@ -686,14 +686,14 @@ dissect_lane(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     dissect_le_client(tvb, tree);
 
     /* Dissect as Token-Ring */
-    next_tvb_le_client = tvb_new_subset_remaining(tvb, 2);
+    next_tvb_le_client  = tvb_new_subset_remaining(tvb, 2);
     call_dissector(tr_handle, next_tvb_le_client, pinfo, tree);
     break;
 
   default:
     /* Dump it as raw data. */
     col_set_str(pinfo->cinfo, COL_INFO, "Unknown LANE traffic type");
-    next_tvb           = tvb_new_subset_remaining(tvb, 0);
+    next_tvb            = tvb_new_subset_remaining(tvb, 0);
     call_dissector(data_handle,next_tvb, pinfo, tree);
     break;
   }
@@ -707,66 +707,66 @@ dissect_ilmi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
 /* AAL types */
 static const value_string aal_vals[] = {
-       { AAL_UNKNOWN,    "Unknown AAL" },
-       { AAL_1,          "AAL1" },
-       { AAL_2,          "AAL2" },
-       { AAL_3_4,        "AAL3/4" },
-       { AAL_5,          "AAL5" },
-       { AAL_USER,       "User AAL" },
-       { AAL_SIGNALLING, "Signalling AAL" },
-       { AAL_OAMCELL,    "OAM cell" },
-       { 0,              NULL }
+  { AAL_UNKNOWN,            "Unknown AAL" },
+  { AAL_1,                  "AAL1" },
+  { AAL_2,                  "AAL2" },
+  { AAL_3_4,                "AAL3/4" },
+  { AAL_5,                  "AAL5" },
+  { AAL_USER,               "User AAL" },
+  { AAL_SIGNALLING,         "Signalling AAL" },
+  { AAL_OAMCELL,            "OAM cell" },
+  { 0,              NULL }
 };
 
 /* AAL5 higher-level traffic types */
 static const value_string aal5_hltype_vals[] = {
-       { TRAF_UNKNOWN, "Unknown traffic type" },
-       { TRAF_LLCMX,   "LLC multiplexed" },
-       { TRAF_VCMX,    "VC multiplexed" },
-       { TRAF_LANE,    "LANE" },
-       { TRAF_ILMI,    "ILMI" },
-       { TRAF_FR,      "Frame Relay" },
-       { TRAF_SPANS,   "FORE SPANS" },
-       { TRAF_IPSILON, "Ipsilon" },
-       { 0,              NULL }
+  { TRAF_UNKNOWN,           "Unknown traffic type" },
+  { TRAF_LLCMX,             "LLC multiplexed" },
+  { TRAF_VCMX,              "VC multiplexed" },
+  { TRAF_LANE,              "LANE" },
+  { TRAF_ILMI,              "ILMI" },
+  { TRAF_FR,                "Frame Relay" },
+  { TRAF_SPANS,             "FORE SPANS" },
+  { TRAF_IPSILON,           "Ipsilon" },
+  { 0,              NULL }
 };
 
 /* Traffic subtypes for VC multiplexed traffic */
 static const value_string vcmx_type_vals[] = {
-       { TRAF_ST_UNKNOWN,        "Unknown VC multiplexed traffic type" },
-       { TRAF_ST_VCMX_802_3_FCS, "802.3 FCS" },
-       { TRAF_ST_VCMX_802_4_FCS, "802.4 FCS" },
-       { TRAF_ST_VCMX_802_5_FCS, "802.5 FCS" },
-       { TRAF_ST_VCMX_FDDI_FCS,  "FDDI FCS" },
-       { TRAF_ST_VCMX_802_6_FCS, "802.6 FCS" },
-       { TRAF_ST_VCMX_802_3,     "802.3" },
-       { TRAF_ST_VCMX_802_4,     "802.4" },
-       { TRAF_ST_VCMX_802_5,     "802.5" },
-       { TRAF_ST_VCMX_FDDI,      "FDDI" },
-       { TRAF_ST_VCMX_802_6,     "802.6" },
-       { TRAF_ST_VCMX_FRAGMENTS, "Fragments" },
-       { TRAF_ST_VCMX_BPDU,      "BPDU" },
-       { 0,                   NULL }
+  { TRAF_ST_UNKNOWN,        "Unknown VC multiplexed traffic type" },
+  { TRAF_ST_VCMX_802_3_FCS, "802.3 FCS" },
+  { TRAF_ST_VCMX_802_4_FCS, "802.4 FCS" },
+  { TRAF_ST_VCMX_802_5_FCS, "802.5 FCS" },
+  { TRAF_ST_VCMX_FDDI_FCS,  "FDDI FCS" },
+  { TRAF_ST_VCMX_802_6_FCS, "802.6 FCS" },
+  { TRAF_ST_VCMX_802_3,     "802.3" },
+  { TRAF_ST_VCMX_802_4,     "802.4" },
+  { TRAF_ST_VCMX_802_5,     "802.5" },
+  { TRAF_ST_VCMX_FDDI,      "FDDI" },
+  { TRAF_ST_VCMX_802_6,     "802.6" },
+  { TRAF_ST_VCMX_FRAGMENTS, "Fragments" },
+  { TRAF_ST_VCMX_BPDU,      "BPDU" },
+  { 0,                   NULL }
 };
 
 /* Traffic subtypes for LANE traffic */
 static const value_string lane_type_vals[] = {
-       { TRAF_ST_UNKNOWN,       "Unknown LANE traffic type" },
-       { TRAF_ST_LANE_LE_CTRL,  "LE Control" },
-       { TRAF_ST_LANE_802_3,    "802.3" },
-       { TRAF_ST_LANE_802_5,    "802.5" },
-       { TRAF_ST_LANE_802_3_MC, "802.3 multicast" },
-       { TRAF_ST_LANE_802_5_MC, "802.5 multicast" },
-        { 0,                     NULL }
+  { TRAF_ST_UNKNOWN,        "Unknown LANE traffic type" },
+  { TRAF_ST_LANE_LE_CTRL,   "LE Control" },
+  { TRAF_ST_LANE_802_3,     "802.3" },
+  { TRAF_ST_LANE_802_5,     "802.5" },
+  { TRAF_ST_LANE_802_3_MC,  "802.3 multicast" },
+  { TRAF_ST_LANE_802_5_MC,  "802.5 multicast" },
+  { 0,                     NULL }
 };
 
 /* Traffic subtypes for Ipsilon traffic */
 static const value_string ipsilon_type_vals[] = {
-       { TRAF_ST_UNKNOWN,     "Unknown Ipsilon traffic type" },
-       { TRAF_ST_IPSILON_FT0, "Flow type 0" },
-       { TRAF_ST_IPSILON_FT1, "Flow type 1" },
-       { TRAF_ST_IPSILON_FT2, "Flow type 2" },
-       { 0,                NULL }
+  { TRAF_ST_UNKNOWN,        "Unknown Ipsilon traffic type" },
+  { TRAF_ST_IPSILON_FT0,    "Flow type 0" },
+  { TRAF_ST_IPSILON_FT1,    "Flow type 1" },
+  { TRAF_ST_IPSILON_FT2,    "Flow type 2" },
+  { 0,                NULL }
 };
 
 void
@@ -798,7 +798,7 @@ capture_atm(const union wtap_pseudo_header *pseudo_header, const guchar *pd,
 /*
  * Charles Michael Heard's CRC-32 code, from
  *
- *     http://www.cell-relay.com/cell-relay/publications/software/CRC/32bitCRC.c.html
+ *      http://www.cell-relay.com/cell-relay/publications/software/CRC/32bitCRC.c.html
  *
  * with the CRC table initialized with values computed by
  * his "gen_crc_table()" routine, rather than by calling that routine
@@ -840,70 +840,70 @@ capture_atm(const union wtap_pseudo_header *pseudo_header, const guchar *pd,
 /*  by Avram Perez, Byte-wise CRC Calculations, IEEE Micro 3, 40 (1983).*/
 
 static const guint32 crc_table[256] = {
-       0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9,
-       0x130476dc, 0x17c56b6b, 0x1a864db2, 0x1e475005,
-       0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, 0x2b4bcb61,
-       0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd,
-       0x4c11db70, 0x48d0c6c7, 0x4593e01e, 0x4152fda9,
-       0x5f15adac, 0x5bd4b01b, 0x569796c2, 0x52568b75,
-       0x6a1936c8, 0x6ed82b7f, 0x639b0da6, 0x675a1011,
-       0x791d4014, 0x7ddc5da3, 0x709f7b7a, 0x745e66cd,
-       0x9823b6e0, 0x9ce2ab57, 0x91a18d8e, 0x95609039,
-       0x8b27c03c, 0x8fe6dd8b, 0x82a5fb52, 0x8664e6e5,
-       0xbe2b5b58, 0xbaea46ef, 0xb7a96036, 0xb3687d81,
-       0xad2f2d84, 0xa9ee3033, 0xa4ad16ea, 0xa06c0b5d,
-       0xd4326d90, 0xd0f37027, 0xddb056fe, 0xd9714b49,
-       0xc7361b4c, 0xc3f706fb, 0xceb42022, 0xca753d95,
-       0xf23a8028, 0xf6fb9d9f, 0xfbb8bb46, 0xff79a6f1,
-       0xe13ef6f4, 0xe5ffeb43, 0xe8bccd9a, 0xec7dd02d,
-       0x34867077, 0x30476dc0, 0x3d044b19, 0x39c556ae,
-       0x278206ab, 0x23431b1c, 0x2e003dc5, 0x2ac12072,
-       0x128e9dcf, 0x164f8078, 0x1b0ca6a1, 0x1fcdbb16,
-       0x018aeb13, 0x054bf6a4, 0x0808d07d, 0x0cc9cdca,
-       0x7897ab07, 0x7c56b6b0, 0x71159069, 0x75d48dde,
-       0x6b93dddb, 0x6f52c06c, 0x6211e6b5, 0x66d0fb02,
-       0x5e9f46bf, 0x5a5e5b08, 0x571d7dd1, 0x53dc6066,
-       0x4d9b3063, 0x495a2dd4, 0x44190b0d, 0x40d816ba,
-       0xaca5c697, 0xa864db20, 0xa527fdf9, 0xa1e6e04e,
-       0xbfa1b04b, 0xbb60adfc, 0xb6238b25, 0xb2e29692,
-       0x8aad2b2f, 0x8e6c3698, 0x832f1041, 0x87ee0df6,
-       0x99a95df3, 0x9d684044, 0x902b669d, 0x94ea7b2a,
-       0xe0b41de7, 0xe4750050, 0xe9362689, 0xedf73b3e,
-       0xf3b06b3b, 0xf771768c, 0xfa325055, 0xfef34de2,
-       0xc6bcf05f, 0xc27dede8, 0xcf3ecb31, 0xcbffd686,
-       0xd5b88683, 0xd1799b34, 0xdc3abded, 0xd8fba05a,
-       0x690ce0ee, 0x6dcdfd59, 0x608edb80, 0x644fc637,
-       0x7a089632, 0x7ec98b85, 0x738aad5c, 0x774bb0eb,
-       0x4f040d56, 0x4bc510e1, 0x46863638, 0x42472b8f,
-       0x5c007b8a, 0x58c1663d, 0x558240e4, 0x51435d53,
-       0x251d3b9e, 0x21dc2629, 0x2c9f00f0, 0x285e1d47,
-       0x36194d42, 0x32d850f5, 0x3f9b762c, 0x3b5a6b9b,
-       0x0315d626, 0x07d4cb91, 0x0a97ed48, 0x0e56f0ff,
-       0x1011a0fa, 0x14d0bd4d, 0x19939b94, 0x1d528623,
-       0xf12f560e, 0xf5ee4bb9, 0xf8ad6d60, 0xfc6c70d7,
-       0xe22b20d2, 0xe6ea3d65, 0xeba91bbc, 0xef68060b,
-       0xd727bbb6, 0xd3e6a601, 0xdea580d8, 0xda649d6f,
-       0xc423cd6a, 0xc0e2d0dd, 0xcda1f604, 0xc960ebb3,
-       0xbd3e8d7e, 0xb9ff90c9, 0xb4bcb610, 0xb07daba7,
-       0xae3afba2, 0xaafbe615, 0xa7b8c0cc, 0xa379dd7b,
-       0x9b3660c6, 0x9ff77d71, 0x92b45ba8, 0x9675461f,
-       0x8832161a, 0x8cf30bad, 0x81b02d74, 0x857130c3,
-       0x5d8a9099, 0x594b8d2e, 0x5408abf7, 0x50c9b640,
-       0x4e8ee645, 0x4a4ffbf2, 0x470cdd2b, 0x43cdc09c,
-       0x7b827d21, 0x7f436096, 0x7200464f, 0x76c15bf8,
-       0x68860bfd, 0x6c47164a, 0x61043093, 0x65c52d24,
-       0x119b4be9, 0x155a565e, 0x18197087, 0x1cd86d30,
-       0x029f3d35, 0x065e2082, 0x0b1d065b, 0x0fdc1bec,
-       0x3793a651, 0x3352bbe6, 0x3e119d3f, 0x3ad08088,
-       0x2497d08d, 0x2056cd3a, 0x2d15ebe3, 0x29d4f654,
-       0xc5a92679, 0xc1683bce, 0xcc2b1d17, 0xc8ea00a0,
-       0xd6ad50a5, 0xd26c4d12, 0xdf2f6bcb, 0xdbee767c,
-       0xe3a1cbc1, 0xe760d676, 0xea23f0af, 0xeee2ed18,
-       0xf0a5bd1d, 0xf464a0aa, 0xf9278673, 0xfde69bc4,
-       0x89b8fd09, 0x8d79e0be, 0x803ac667, 0x84fbdbd0,
-       0x9abc8bd5, 0x9e7d9662, 0x933eb0bb, 0x97ffad0c,
-       0xafb010b1, 0xab710d06, 0xa6322bdf, 0xa2f33668,
-       0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4,
+  0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9,
+  0x130476dc, 0x17c56b6b, 0x1a864db2, 0x1e475005,
+  0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, 0x2b4bcb61,
+  0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd,
+  0x4c11db70, 0x48d0c6c7, 0x4593e01e, 0x4152fda9,
+  0x5f15adac, 0x5bd4b01b, 0x569796c2, 0x52568b75,
+  0x6a1936c8, 0x6ed82b7f, 0x639b0da6, 0x675a1011,
+  0x791d4014, 0x7ddc5da3, 0x709f7b7a, 0x745e66cd,
+  0x9823b6e0, 0x9ce2ab57, 0x91a18d8e, 0x95609039,
+  0x8b27c03c, 0x8fe6dd8b, 0x82a5fb52, 0x8664e6e5,
+  0xbe2b5b58, 0xbaea46ef, 0xb7a96036, 0xb3687d81,
+  0xad2f2d84, 0xa9ee3033, 0xa4ad16ea, 0xa06c0b5d,
+  0xd4326d90, 0xd0f37027, 0xddb056fe, 0xd9714b49,
+  0xc7361b4c, 0xc3f706fb, 0xceb42022, 0xca753d95,
+  0xf23a8028, 0xf6fb9d9f, 0xfbb8bb46, 0xff79a6f1,
+  0xe13ef6f4, 0xe5ffeb43, 0xe8bccd9a, 0xec7dd02d,
+  0x34867077, 0x30476dc0, 0x3d044b19, 0x39c556ae,
+  0x278206ab, 0x23431b1c, 0x2e003dc5, 0x2ac12072,
+  0x128e9dcf, 0x164f8078, 0x1b0ca6a1, 0x1fcdbb16,
+  0x018aeb13, 0x054bf6a4, 0x0808d07d, 0x0cc9cdca,
+  0x7897ab07, 0x7c56b6b0, 0x71159069, 0x75d48dde,
+  0x6b93dddb, 0x6f52c06c, 0x6211e6b5, 0x66d0fb02,
+  0x5e9f46bf, 0x5a5e5b08, 0x571d7dd1, 0x53dc6066,
+  0x4d9b3063, 0x495a2dd4, 0x44190b0d, 0x40d816ba,
+  0xaca5c697, 0xa864db20, 0xa527fdf9, 0xa1e6e04e,
+  0xbfa1b04b, 0xbb60adfc, 0xb6238b25, 0xb2e29692,
+  0x8aad2b2f, 0x8e6c3698, 0x832f1041, 0x87ee0df6,
+  0x99a95df3, 0x9d684044, 0x902b669d, 0x94ea7b2a,
+  0xe0b41de7, 0xe4750050, 0xe9362689, 0xedf73b3e,
+  0xf3b06b3b, 0xf771768c, 0xfa325055, 0xfef34de2,
+  0xc6bcf05f, 0xc27dede8, 0xcf3ecb31, 0xcbffd686,
+  0xd5b88683, 0xd1799b34, 0xdc3abded, 0xd8fba05a,
+  0x690ce0ee, 0x6dcdfd59, 0x608edb80, 0x644fc637,
+  0x7a089632, 0x7ec98b85, 0x738aad5c, 0x774bb0eb,
+  0x4f040d56, 0x4bc510e1, 0x46863638, 0x42472b8f,
+  0x5c007b8a, 0x58c1663d, 0x558240e4, 0x51435d53,
+  0x251d3b9e, 0x21dc2629, 0x2c9f00f0, 0x285e1d47,
+  0x36194d42, 0x32d850f5, 0x3f9b762c, 0x3b5a6b9b,
+  0x0315d626, 0x07d4cb91, 0x0a97ed48, 0x0e56f0ff,
+  0x1011a0fa, 0x14d0bd4d, 0x19939b94, 0x1d528623,
+  0xf12f560e, 0xf5ee4bb9, 0xf8ad6d60, 0xfc6c70d7,
+  0xe22b20d2, 0xe6ea3d65, 0xeba91bbc, 0xef68060b,
+  0xd727bbb6, 0xd3e6a601, 0xdea580d8, 0xda649d6f,
+  0xc423cd6a, 0xc0e2d0dd, 0xcda1f604, 0xc960ebb3,
+  0xbd3e8d7e, 0xb9ff90c9, 0xb4bcb610, 0xb07daba7,
+  0xae3afba2, 0xaafbe615, 0xa7b8c0cc, 0xa379dd7b,
+  0x9b3660c6, 0x9ff77d71, 0x92b45ba8, 0x9675461f,
+  0x8832161a, 0x8cf30bad, 0x81b02d74, 0x857130c3,
+  0x5d8a9099, 0x594b8d2e, 0x5408abf7, 0x50c9b640,
+  0x4e8ee645, 0x4a4ffbf2, 0x470cdd2b, 0x43cdc09c,
+  0x7b827d21, 0x7f436096, 0x7200464f, 0x76c15bf8,
+  0x68860bfd, 0x6c47164a, 0x61043093, 0x65c52d24,
+  0x119b4be9, 0x155a565e, 0x18197087, 0x1cd86d30,
+  0x029f3d35, 0x065e2082, 0x0b1d065b, 0x0fdc1bec,
+  0x3793a651, 0x3352bbe6, 0x3e119d3f, 0x3ad08088,
+  0x2497d08d, 0x2056cd3a, 0x2d15ebe3, 0x29d4f654,
+  0xc5a92679, 0xc1683bce, 0xcc2b1d17, 0xc8ea00a0,
+  0xd6ad50a5, 0xd26c4d12, 0xdf2f6bcb, 0xdbee767c,
+  0xe3a1cbc1, 0xe760d676, 0xea23f0af, 0xeee2ed18,
+  0xf0a5bd1d, 0xf464a0aa, 0xf9278673, 0xfde69bc4,
+  0x89b8fd09, 0x8d79e0be, 0x803ac667, 0x84fbdbd0,
+  0x9abc8bd5, 0x9e7d9662, 0x933eb0bb, 0x97ffad0c,
+  0xafb010b1, 0xab710d06, 0xa6322bdf, 0xa2f33668,
+  0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4,
 };
 
 static guint32
@@ -931,10 +931,10 @@ dissect_reassembled_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
   guint32      crc;
   guint32      calc_crc;
   gint         type;
-  /* 
+  /*
    * ATM dissector is used as "sub-dissector" for ATM pseudowires.
-   * In such cases, pinfo->private_data is used to pass info from/to 
-   * PW dissector to ATM dissector. For decoding normal ATM traffic 
+   * In such cases, pinfo->private_data is used to pass info from/to
+   * PW dissector to ATM dissector. For decoding normal ATM traffic
    * private_data should be NULL.
    */
   gboolean     pseudowire_mode = (NULL != pinfo->private_data);
@@ -946,34 +946,34 @@ dissect_reassembled_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
    */
   if (pinfo->pseudo_header->atm.aal == AAL_5) {
     proto_tree_add_text(atm_tree, tvb, 0, 0, "Traffic type: %s",
-               val_to_str(pinfo->pseudo_header->atm.type, aal5_hltype_vals,
-               "Unknown AAL5 traffic type (%u)"));
+                        val_to_str(pinfo->pseudo_header->atm.type, aal5_hltype_vals,
+                                   "Unknown AAL5 traffic type (%u)"));
     switch (pinfo->pseudo_header->atm.type) {
 
     case TRAF_VCMX:
       proto_tree_add_text(atm_tree, tvb, 0, 0, "VC multiplexed traffic type: %s",
-               val_to_str(pinfo->pseudo_header->atm.subtype,
-                       vcmx_type_vals, "Unknown VCMX traffic type (%u)"));
+                          val_to_str(pinfo->pseudo_header->atm.subtype,
+                                     vcmx_type_vals, "Unknown VCMX traffic type (%u)"));
       break;
 
     case TRAF_LANE:
       proto_tree_add_text(atm_tree, tvb, 0, 0, "LANE traffic type: %s",
-               val_to_str(pinfo->pseudo_header->atm.subtype,
-                       lane_type_vals, "Unknown LANE traffic type (%u)"));
+                          val_to_str(pinfo->pseudo_header->atm.subtype,
+                                     lane_type_vals, "Unknown LANE traffic type (%u)"));
       break;
 
     case TRAF_IPSILON:
       proto_tree_add_text(atm_tree, tvb, 0, 0, "Ipsilon traffic type: %s",
-               val_to_str(pinfo->pseudo_header->atm.subtype,
-                       ipsilon_type_vals, "Unknown Ipsilon traffic type (%u)"));
+                          val_to_str(pinfo->pseudo_header->atm.subtype,
+                                     ipsilon_type_vals, "Unknown Ipsilon traffic type (%u)"));
       break;
     }
   }
   if (!pseudowire_mode) {
     proto_tree_add_uint(atm_tree, hf_atm_vpi, tvb, 0, 0,
-               pinfo->pseudo_header->atm.vpi);
+                        pinfo->pseudo_header->atm.vpi);
     proto_tree_add_uint(atm_tree, hf_atm_vci, tvb, 0, 0,
-               pinfo->pseudo_header->atm.vci);
+                        pinfo->pseudo_header->atm.vci);
 
     /* Also show vpi/vci in info column */
     if (check_col(pinfo->cinfo, COL_INFO))
@@ -1003,15 +1003,15 @@ dissect_reassembled_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
        */
       if (tree) {
         proto_tree_add_text(atm_tree, tvb, 0, 0, "Cells: %u",
-               pinfo->pseudo_header->atm.cells);
+                            pinfo->pseudo_header->atm.cells);
         proto_tree_add_text(atm_tree, tvb, 0, 0, "AAL5 UU: 0x%02x",
-               pinfo->pseudo_header->atm.aal5t_u2u >> 8);
+                            pinfo->pseudo_header->atm.aal5t_u2u >> 8);
         proto_tree_add_text(atm_tree, tvb, 0, 0, "AAL5 CPI: 0x%02x",
-               pinfo->pseudo_header->atm.aal5t_u2u & 0xFF);
+                            pinfo->pseudo_header->atm.aal5t_u2u & 0xFF);
         proto_tree_add_text(atm_tree, tvb, 0, 0, "AAL5 len: %u",
-               pinfo->pseudo_header->atm.aal5t_len);
+                            pinfo->pseudo_header->atm.aal5t_len);
         proto_tree_add_text(atm_tree, tvb, 0, 0, "AAL5 CRC: 0x%08X",
-               pinfo->pseudo_header->atm.aal5t_chksum);
+                            pinfo->pseudo_header->atm.aal5t_chksum);
       }
     }
   } else {
@@ -1028,10 +1028,10 @@ dissect_reassembled_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
        * divide it by 48 to get the number of cells.
        */
       proto_tree_add_text(atm_tree, tvb, 0, 0, "Cells: %u",
-               reported_length/48);
+                          reported_length/48);
     }
     if ((pinfo->pseudo_header->atm.aal == AAL_5 ||
-       pinfo->pseudo_header->atm.aal == AAL_SIGNALLING) &&
+         pinfo->pseudo_header->atm.aal == AAL_SIGNALLING) &&
         length >= reported_length) {
       /*
        * XXX - what if the packet is truncated?  Can that happen?
@@ -1122,7 +1122,7 @@ dissect_reassembled_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
         if (tvb_length(next_tvb) > 7) /* sizeof(octet) */
         {
             guint8 octet[8];
-            tvb_memcpy(next_tvb, octet, 0, sizeof(octet)); 
+            tvb_memcpy(next_tvb, octet, 0, sizeof(octet));
 
             decoded = TRUE;
             if (octet[0] == 0xaa
@@ -1182,11 +1182,11 @@ dissect_reassembled_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
 
   case AAL_2:
     proto_tree_add_uint(atm_tree, hf_atm_cid, tvb, 0, 0,
-                       pinfo->pseudo_header->atm.aal2_cid);
+                        pinfo->pseudo_header->atm.aal2_cid);
     proto_item_append_text(atm_ti, " (vpi=%u vci=%u cid=%u)",
-                          pinfo->pseudo_header->atm.vpi,
-                          pinfo->pseudo_header->atm.vci,
-                          pinfo->pseudo_header->atm.aal2_cid);
+                           pinfo->pseudo_header->atm.vpi,
+                           pinfo->pseudo_header->atm.vci,
+                           pinfo->pseudo_header->atm.aal2_cid);
 
     if (pinfo->pseudo_header->atm.flags & ATM_AAL2_NOPHDR) {
       next_tvb = tvb;
@@ -1206,7 +1206,7 @@ dissect_reassembled_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
     switch (type) {
       case TRAF_UMTS_FP:
           call_dissector(fp_handle, next_tvb, pinfo, tree);
-         break;
+          break;
 
       default:
         if (tree) {
@@ -1229,7 +1229,7 @@ dissect_reassembled_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
 /*
  * Charles Michael Heard's HEC code, from
  *
- *     http://www.cell-relay.com/cell-relay/publications/software/CRC/32bitCRC.tutorial.html
+ *      http://www.cell-relay.com/cell-relay/publications/software/CRC/32bitCRC.tutorial.html
  *
  * with the syndrome and error position tables initialized with values
  * computed by his "gen_syndrome_table()" and "gen_err_posn_table()" routines,
@@ -1240,172 +1240,172 @@ dissect_reassembled_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
 #define COSET_LEADER    0x055               /* x^6 + x^4 + x^2 + 1  */
 
 static const guint8 syndrome_table[256] = {
-       0x00, 0x07, 0x0e, 0x09, 0x1c, 0x1b, 0x12, 0x15,
-       0x38, 0x3f, 0x36, 0x31, 0x24, 0x23, 0x2a, 0x2d,
-       0x70, 0x77, 0x7e, 0x79, 0x6c, 0x6b, 0x62, 0x65,
-       0x48, 0x4f, 0x46, 0x41, 0x54, 0x53, 0x5a, 0x5d,
-       0xe0, 0xe7, 0xee, 0xe9, 0xfc, 0xfb, 0xf2, 0xf5,
-       0xd8, 0xdf, 0xd6, 0xd1, 0xc4, 0xc3, 0xca, 0xcd,
-       0x90, 0x97, 0x9e, 0x99, 0x8c, 0x8b, 0x82, 0x85,
-       0xa8, 0xaf, 0xa6, 0xa1, 0xb4, 0xb3, 0xba, 0xbd,
-       0xc7, 0xc0, 0xc9, 0xce, 0xdb, 0xdc, 0xd5, 0xd2,
-       0xff, 0xf8, 0xf1, 0xf6, 0xe3, 0xe4, 0xed, 0xea,
-       0xb7, 0xb0, 0xb9, 0xbe, 0xab, 0xac, 0xa5, 0xa2,
-       0x8f, 0x88, 0x81, 0x86, 0x93, 0x94, 0x9d, 0x9a,
-       0x27, 0x20, 0x29, 0x2e, 0x3b, 0x3c, 0x35, 0x32,
-       0x1f, 0x18, 0x11, 0x16, 0x03, 0x04, 0x0d, 0x0a,
-       0x57, 0x50, 0x59, 0x5e, 0x4b, 0x4c, 0x45, 0x42,
-       0x6f, 0x68, 0x61, 0x66, 0x73, 0x74, 0x7d, 0x7a,
-       0x89, 0x8e, 0x87, 0x80, 0x95, 0x92, 0x9b, 0x9c,
-       0xb1, 0xb6, 0xbf, 0xb8, 0xad, 0xaa, 0xa3, 0xa4,
-       0xf9, 0xfe, 0xf7, 0xf0, 0xe5, 0xe2, 0xeb, 0xec,
-       0xc1, 0xc6, 0xcf, 0xc8, 0xdd, 0xda, 0xd3, 0xd4,
-       0x69, 0x6e, 0x67, 0x60, 0x75, 0x72, 0x7b, 0x7c,
-       0x51, 0x56, 0x5f, 0x58, 0x4d, 0x4a, 0x43, 0x44,
-       0x19, 0x1e, 0x17, 0x10, 0x05, 0x02, 0x0b, 0x0c,
-       0x21, 0x26, 0x2f, 0x28, 0x3d, 0x3a, 0x33, 0x34,
-       0x4e, 0x49, 0x40, 0x47, 0x52, 0x55, 0x5c, 0x5b,
-       0x76, 0x71, 0x78, 0x7f, 0x6a, 0x6d, 0x64, 0x63,
-       0x3e, 0x39, 0x30, 0x37, 0x22, 0x25, 0x2c, 0x2b,
-       0x06, 0x01, 0x08, 0x0f, 0x1a, 0x1d, 0x14, 0x13,
-       0xae, 0xa9, 0xa0, 0xa7, 0xb2, 0xb5, 0xbc, 0xbb,
-       0x96, 0x91, 0x98, 0x9f, 0x8a, 0x8d, 0x84, 0x83,
-       0xde, 0xd9, 0xd0, 0xd7, 0xc2, 0xc5, 0xcc, 0xcb,
-       0xe6, 0xe1, 0xe8, 0xef, 0xfa, 0xfd, 0xf4, 0xf3,
+  0x00, 0x07, 0x0e, 0x09, 0x1c, 0x1b, 0x12, 0x15,
+  0x38, 0x3f, 0x36, 0x31, 0x24, 0x23, 0x2a, 0x2d,
+  0x70, 0x77, 0x7e, 0x79, 0x6c, 0x6b, 0x62, 0x65,
+  0x48, 0x4f, 0x46, 0x41, 0x54, 0x53, 0x5a, 0x5d,
+  0xe0, 0xe7, 0xee, 0xe9, 0xfc, 0xfb, 0xf2, 0xf5,
+  0xd8, 0xdf, 0xd6, 0xd1, 0xc4, 0xc3, 0xca, 0xcd,
+  0x90, 0x97, 0x9e, 0x99, 0x8c, 0x8b, 0x82, 0x85,
+  0xa8, 0xaf, 0xa6, 0xa1, 0xb4, 0xb3, 0xba, 0xbd,
+  0xc7, 0xc0, 0xc9, 0xce, 0xdb, 0xdc, 0xd5, 0xd2,
+  0xff, 0xf8, 0xf1, 0xf6, 0xe3, 0xe4, 0xed, 0xea,
+  0xb7, 0xb0, 0xb9, 0xbe, 0xab, 0xac, 0xa5, 0xa2,
+  0x8f, 0x88, 0x81, 0x86, 0x93, 0x94, 0x9d, 0x9a,
+  0x27, 0x20, 0x29, 0x2e, 0x3b, 0x3c, 0x35, 0x32,
+  0x1f, 0x18, 0x11, 0x16, 0x03, 0x04, 0x0d, 0x0a,
+  0x57, 0x50, 0x59, 0x5e, 0x4b, 0x4c, 0x45, 0x42,
+  0x6f, 0x68, 0x61, 0x66, 0x73, 0x74, 0x7d, 0x7a,
+  0x89, 0x8e, 0x87, 0x80, 0x95, 0x92, 0x9b, 0x9c,
+  0xb1, 0xb6, 0xbf, 0xb8, 0xad, 0xaa, 0xa3, 0xa4,
+  0xf9, 0xfe, 0xf7, 0xf0, 0xe5, 0xe2, 0xeb, 0xec,
+  0xc1, 0xc6, 0xcf, 0xc8, 0xdd, 0xda, 0xd3, 0xd4,
+  0x69, 0x6e, 0x67, 0x60, 0x75, 0x72, 0x7b, 0x7c,
+  0x51, 0x56, 0x5f, 0x58, 0x4d, 0x4a, 0x43, 0x44,
+  0x19, 0x1e, 0x17, 0x10, 0x05, 0x02, 0x0b, 0x0c,
+  0x21, 0x26, 0x2f, 0x28, 0x3d, 0x3a, 0x33, 0x34,
+  0x4e, 0x49, 0x40, 0x47, 0x52, 0x55, 0x5c, 0x5b,
+  0x76, 0x71, 0x78, 0x7f, 0x6a, 0x6d, 0x64, 0x63,
+  0x3e, 0x39, 0x30, 0x37, 0x22, 0x25, 0x2c, 0x2b,
+  0x06, 0x01, 0x08, 0x0f, 0x1a, 0x1d, 0x14, 0x13,
+  0xae, 0xa9, 0xa0, 0xa7, 0xb2, 0xb5, 0xbc, 0xbb,
+  0x96, 0x91, 0x98, 0x9f, 0x8a, 0x8d, 0x84, 0x83,
+  0xde, 0xd9, 0xd0, 0xd7, 0xc2, 0xc5, 0xcc, 0xcb,
+  0xe6, 0xe1, 0xe8, 0xef, 0xfa, 0xfd, 0xf4, 0xf3,
 };
 
 #define NO_ERROR_DETECTED   -128
 #define UNCORRECTIBLE_ERROR  128
 
 static const int err_posn_table[256] = {
-       NO_ERROR_DETECTED,      39,
-       38,                     UNCORRECTIBLE_ERROR,
-       37,                     UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    31,
-       36,                     UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    8,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       30,                     UNCORRECTIBLE_ERROR,
-       35,                     UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    23,
-       7,                      UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       29,                     UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       34,                     UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       22,                     UNCORRECTIBLE_ERROR,
-       6,                      UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    0,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       28,                     UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       33,                     UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    10,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    12,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       21,                     UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    19,
-       5,                      UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    17,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    3,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    15,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       27,                     UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       32,                     UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       9,                      UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    24,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    1,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       11,                     UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       20,                     UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    13,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       18,                     UNCORRECTIBLE_ERROR,
-       4,                      UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       16,                     UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    25,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       2,                      UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       14,                     UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       26,                     UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
-       UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  NO_ERROR_DETECTED,      39,
+  38,                     UNCORRECTIBLE_ERROR,
+  37,                     UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    31,
+  36,                     UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    8,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  30,                     UNCORRECTIBLE_ERROR,
+  35,                     UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    23,
+  7,                      UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  29,                     UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  34,                     UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  22,                     UNCORRECTIBLE_ERROR,
+  6,                      UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    0,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  28,                     UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  33,                     UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    10,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    12,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  21,                     UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    19,
+  5,                      UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    17,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    3,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    15,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  27,                     UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  32,                     UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  9,                      UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    24,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    1,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  11,                     UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  20,                     UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    13,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  18,                     UNCORRECTIBLE_ERROR,
+  4,                      UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  16,                     UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    25,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  2,                      UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  14,                     UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  26,                     UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
+  UNCORRECTIBLE_ERROR,    UNCORRECTIBLE_ERROR,
 };
 
 /*
@@ -1434,113 +1434,113 @@ get_header_err(const guint8 *cell_header)
 }
 
 const value_string atm_pt_vals[] = {
-       { 0, "User data cell, congestion not experienced, SDU-type = 0" },
-       { 1, "User data cell, congestion not experienced, SDU-type = 1" },
-       { 2, "User data cell, congestion experienced, SDU-type = 0" },
-       { 3, "User data cell, congestion experienced, SDU-type = 1" },
-       { 4, "Segment OAM F5 flow related cell" },
-       { 5, "End-to-end OAM F5 flow related cell" },
-       { 6, "VC resource management cell" },
-       { 0, NULL }
+  { 0, "User data cell, congestion not experienced, SDU-type = 0" },
+  { 1, "User data cell, congestion not experienced, SDU-type = 1" },
+  { 2, "User data cell, congestion experienced, SDU-type = 0" },
+  { 3, "User data cell, congestion experienced, SDU-type = 1" },
+  { 4, "Segment OAM F5 flow related cell" },
+  { 5, "End-to-end OAM F5 flow related cell" },
+  { 6, "VC resource management cell" },
+  { 0, NULL }
 };
 
 /*
  * Charles Michael Heard's CRC-10 code, from
  *
- *     http://www.cell-relay.com/cell-relay/publications/software/CRC/crc10.html
+ *      http://www.cell-relay.com/cell-relay/publications/software/CRC/crc10.html
  *
  * with the CRC table initialized with values computed by
  * his "gen_byte_crc10_table()" routine, rather than by calling that
  * routine at run time, and with various data type cleanups.
  */
 static const guint16 byte_crc10_table[256] = {
-       0x0000, 0x0233, 0x0255, 0x0066, 0x0299, 0x00aa, 0x00cc, 0x02ff,
-       0x0301, 0x0132, 0x0154, 0x0367, 0x0198, 0x03ab, 0x03cd, 0x01fe,
-       0x0031, 0x0202, 0x0264, 0x0057, 0x02a8, 0x009b, 0x00fd, 0x02ce,
-       0x0330, 0x0103, 0x0165, 0x0356, 0x01a9, 0x039a, 0x03fc, 0x01cf,
-       0x0062, 0x0251, 0x0237, 0x0004, 0x02fb, 0x00c8, 0x00ae, 0x029d,
-       0x0363, 0x0150, 0x0136, 0x0305, 0x01fa, 0x03c9, 0x03af, 0x019c,
-       0x0053, 0x0260, 0x0206, 0x0035, 0x02ca, 0x00f9, 0x009f, 0x02ac,
-       0x0352, 0x0161, 0x0107, 0x0334, 0x01cb, 0x03f8, 0x039e, 0x01ad,
-       0x00c4, 0x02f7, 0x0291, 0x00a2, 0x025d, 0x006e, 0x0008, 0x023b,
-       0x03c5, 0x01f6, 0x0190, 0x03a3, 0x015c, 0x036f, 0x0309, 0x013a,
-       0x00f5, 0x02c6, 0x02a0, 0x0093, 0x026c, 0x005f, 0x0039, 0x020a,
-       0x03f4, 0x01c7, 0x01a1, 0x0392, 0x016d, 0x035e, 0x0338, 0x010b,
-       0x00a6, 0x0295, 0x02f3, 0x00c0, 0x023f, 0x000c, 0x006a, 0x0259,
-       0x03a7, 0x0194, 0x01f2, 0x03c1, 0x013e, 0x030d, 0x036b, 0x0158,
-       0x0097, 0x02a4, 0x02c2, 0x00f1, 0x020e, 0x003d, 0x005b, 0x0268,
-       0x0396, 0x01a5, 0x01c3, 0x03f0, 0x010f, 0x033c, 0x035a, 0x0169,
-       0x0188, 0x03bb, 0x03dd, 0x01ee, 0x0311, 0x0122, 0x0144, 0x0377,
-       0x0289, 0x00ba, 0x00dc, 0x02ef, 0x0010, 0x0223, 0x0245, 0x0076,
-       0x01b9, 0x038a, 0x03ec, 0x01df, 0x0320, 0x0113, 0x0175, 0x0346,
-       0x02b8, 0x008b, 0x00ed, 0x02de, 0x0021, 0x0212, 0x0274, 0x0047,
-       0x01ea, 0x03d9, 0x03bf, 0x018c, 0x0373, 0x0140, 0x0126, 0x0315,
-       0x02eb, 0x00d8, 0x00be, 0x028d, 0x0072, 0x0241, 0x0227, 0x0014,
-       0x01db, 0x03e8, 0x038e, 0x01bd, 0x0342, 0x0171, 0x0117, 0x0324,
-       0x02da, 0x00e9, 0x008f, 0x02bc, 0x0043, 0x0270, 0x0216, 0x0025,
-       0x014c, 0x037f, 0x0319, 0x012a, 0x03d5, 0x01e6, 0x0180, 0x03b3,
-       0x024d, 0x007e, 0x0018, 0x022b, 0x00d4, 0x02e7, 0x0281, 0x00b2,
-       0x017d, 0x034e, 0x0328, 0x011b, 0x03e4, 0x01d7, 0x01b1, 0x0382,
-       0x027c, 0x004f, 0x0029, 0x021a, 0x00e5, 0x02d6, 0x02b0, 0x0083,
-       0x012e, 0x031d, 0x037b, 0x0148, 0x03b7, 0x0184, 0x01e2, 0x03d1,
-       0x022f, 0x001c, 0x007a, 0x0249, 0x00b6, 0x0285, 0x02e3, 0x00d0,
-       0x011f, 0x032c, 0x034a, 0x0179, 0x0386, 0x01b5, 0x01d3, 0x03e0,
-       0x021e, 0x002d, 0x004b, 0x0278, 0x0087, 0x02b4, 0x02d2, 0x00e1,
+  0x0000, 0x0233, 0x0255, 0x0066, 0x0299, 0x00aa, 0x00cc, 0x02ff,
+  0x0301, 0x0132, 0x0154, 0x0367, 0x0198, 0x03ab, 0x03cd, 0x01fe,
+  0x0031, 0x0202, 0x0264, 0x0057, 0x02a8, 0x009b, 0x00fd, 0x02ce,
+  0x0330, 0x0103, 0x0165, 0x0356, 0x01a9, 0x039a, 0x03fc, 0x01cf,
+  0x0062, 0x0251, 0x0237, 0x0004, 0x02fb, 0x00c8, 0x00ae, 0x029d,
+  0x0363, 0x0150, 0x0136, 0x0305, 0x01fa, 0x03c9, 0x03af, 0x019c,
+  0x0053, 0x0260, 0x0206, 0x0035, 0x02ca, 0x00f9, 0x009f, 0x02ac,
+  0x0352, 0x0161, 0x0107, 0x0334, 0x01cb, 0x03f8, 0x039e, 0x01ad,
+  0x00c4, 0x02f7, 0x0291, 0x00a2, 0x025d, 0x006e, 0x0008, 0x023b,
+  0x03c5, 0x01f6, 0x0190, 0x03a3, 0x015c, 0x036f, 0x0309, 0x013a,
+  0x00f5, 0x02c6, 0x02a0, 0x0093, 0x026c, 0x005f, 0x0039, 0x020a,
+  0x03f4, 0x01c7, 0x01a1, 0x0392, 0x016d, 0x035e, 0x0338, 0x010b,
+  0x00a6, 0x0295, 0x02f3, 0x00c0, 0x023f, 0x000c, 0x006a, 0x0259,
+  0x03a7, 0x0194, 0x01f2, 0x03c1, 0x013e, 0x030d, 0x036b, 0x0158,
+  0x0097, 0x02a4, 0x02c2, 0x00f1, 0x020e, 0x003d, 0x005b, 0x0268,
+  0x0396, 0x01a5, 0x01c3, 0x03f0, 0x010f, 0x033c, 0x035a, 0x0169,
+  0x0188, 0x03bb, 0x03dd, 0x01ee, 0x0311, 0x0122, 0x0144, 0x0377,
+  0x0289, 0x00ba, 0x00dc, 0x02ef, 0x0010, 0x0223, 0x0245, 0x0076,
+  0x01b9, 0x038a, 0x03ec, 0x01df, 0x0320, 0x0113, 0x0175, 0x0346,
+  0x02b8, 0x008b, 0x00ed, 0x02de, 0x0021, 0x0212, 0x0274, 0x0047,
+  0x01ea, 0x03d9, 0x03bf, 0x018c, 0x0373, 0x0140, 0x0126, 0x0315,
+  0x02eb, 0x00d8, 0x00be, 0x028d, 0x0072, 0x0241, 0x0227, 0x0014,
+  0x01db, 0x03e8, 0x038e, 0x01bd, 0x0342, 0x0171, 0x0117, 0x0324,
+  0x02da, 0x00e9, 0x008f, 0x02bc, 0x0043, 0x0270, 0x0216, 0x0025,
+  0x014c, 0x037f, 0x0319, 0x012a, 0x03d5, 0x01e6, 0x0180, 0x03b3,
+  0x024d, 0x007e, 0x0018, 0x022b, 0x00d4, 0x02e7, 0x0281, 0x00b2,
+  0x017d, 0x034e, 0x0328, 0x011b, 0x03e4, 0x01d7, 0x01b1, 0x0382,
+  0x027c, 0x004f, 0x0029, 0x021a, 0x00e5, 0x02d6, 0x02b0, 0x0083,
+  0x012e, 0x031d, 0x037b, 0x0148, 0x03b7, 0x0184, 0x01e2, 0x03d1,
+  0x022f, 0x001c, 0x007a, 0x0249, 0x00b6, 0x0285, 0x02e3, 0x00d0,
+  0x011f, 0x032c, 0x034a, 0x0179, 0x0386, 0x01b5, 0x01d3, 0x03e0,
+  0x021e, 0x002d, 0x004b, 0x0278, 0x0087, 0x02b4, 0x02d2, 0x00e1,
 };
 
 /* update the data block's CRC-10 remainder one byte at a time */
 static guint16
 update_crc10_by_bytes(guint16 crc10_accum, const guint8 *data_blk_ptr,
-    int data_blk_size)
+                      int data_blk_size)
 {
   register int i;
 
   for (i = 0;  i < data_blk_size; i++) {
-      crc10_accum = ((crc10_accum << 8) & 0x3ff)
-                     ^ byte_crc10_table[( crc10_accum >> 2) & 0xff]
-                                                    ^ *data_blk_ptr++;
+    crc10_accum = ((crc10_accum << 8) & 0x3ff)
+      ^ byte_crc10_table[( crc10_accum >> 2) & 0xff]
+      ^ *data_blk_ptr++;
   }
   return crc10_accum;
 }
 
 static const value_string st_vals[] = {
-       { 2, "BOM" },
-       { 0, "COM" },
-       { 1, "EOM" },
-       { 3, "SSM" },
-       { 0, NULL }
+  { 2, "BOM" },
+  { 0, "COM" },
+  { 1, "EOM" },
+  { 3, "SSM" },
+  { 0, NULL }
 };
 
-#define OAM_TYPE_FM    1       /* Fault Management */
-#define OAM_TYPE_PM    2       /* Performance Management */
-#define OAM_TYPE_AD    8       /* Activation/Deactivation */
+#define OAM_TYPE_FM     1       /* Fault Management */
+#define OAM_TYPE_PM     2       /* Performance Management */
+#define OAM_TYPE_AD     8       /* Activation/Deactivation */
 
 static const value_string oam_type_vals[] = {
-       { OAM_TYPE_FM, "Fault Management" },
-       { OAM_TYPE_PM, "Performance Management" },
-       { OAM_TYPE_AD, "Activation/Deactivation" },
-       { 0,           NULL }
+  { OAM_TYPE_FM, "Fault Management" },
+  { OAM_TYPE_PM, "Performance Management" },
+  { OAM_TYPE_AD, "Activation/Deactivation" },
+  { 0,           NULL }
 };
 
 static const value_string ft_fm_vals[] = {
-       { 0, "Alarm Indication Signal" },
-       { 1, "Far End Receive Failure" },
-       { 8, "OAM Cell Loopback" },
-       { 4, "Continuity Check" },
-       { 0, NULL }
+  { 0, "Alarm Indication Signal" },
+  { 1, "Far End Receive Failure" },
+  { 8, "OAM Cell Loopback" },
+  { 4, "Continuity Check" },
+  { 0, NULL }
 };
 
 static const value_string ft_pm_vals[] = {
-       { 0, "Forward Monitoring" },
-       { 1, "Backward Reporting" },
-       { 2, "Monitoring and Reporting" },
-       { 0, NULL }
+  { 0, "Forward Monitoring" },
+  { 1, "Backward Reporting" },
+  { 2, "Monitoring and Reporting" },
+  { 0, NULL }
 };
 
 static const value_string ft_ad_vals[] = {
-       { 0, "Performance Monitoring" },
-       { 1, "Continuity Check" },
-       { 0, NULL }
+  { 0, "Performance Monitoring" },
+  { 1, "Continuity Check" },
+  { 0, NULL }
 };
 
 
@@ -1549,10 +1549,10 @@ static const value_string ft_ad_vals[] = {
  * OAM F4 is VCI 3 or 4 and PT 0X0.
  * OAM F5 is PT 10X.
  */
-gboolean atm_is_oam_cell(const guint16 vci, const guint8 pt) 
+gboolean atm_is_oam_cell(const guint16 vci, const guint8 pt)
 {
-       return  (((vci == 3 || vci == 4) && ((pt & 0x5) == 0)) 
-               || ((pt & 0x6) == 0x4));
+  return  (((vci == 3 || vci == 4) && ((pt & 0x5) == 0))
+           || ((pt & 0x6) == 0x4));
 }
 
 
@@ -1578,52 +1578,52 @@ dissect_atm_cell(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
 
   if (NULL == pwpd) {
     if (!nni) {
-          /* 
-           * FF: ITU-T I.361 (Section 2.2) defines the cell header format 
-           * and encoding at UNI reference point as:
-           * 
-           *  8 7 6 5 4 3 2 1
-           * +-+-+-+-+-+-+-+-+
-           * |  GFC  |  VPI  |
-           * +-+-+-+-+-+-+-+-+
-           * |  VPI  |  VCI  |
-           * +-+-+-+-+-+-+-+-+
-           * |      VCI      |
-           * +-+-+-+-+-+-+-+-+
-           * |  VCI  |  PT |C|
-           * +-+-+-+-+-+-+-+-+
-           * |   HEC (CRC)   |
-           * +-+-+-+-+-+-+-+-+
-           */
-          octet = tvb_get_guint8(tvb, 0);
-          proto_tree_add_text(atm_tree, tvb, 0, 1, "GFC: 0x%x", octet >> 4);
-          vpi = (octet & 0xF) << 4;
-          octet = tvb_get_guint8(tvb, 1);
-          vpi |= octet >> 4;
-          proto_tree_add_uint(atm_tree, hf_atm_vpi, tvb, 0, 2, vpi);
+      /*
+       * FF: ITU-T I.361 (Section 2.2) defines the cell header format
+       * and encoding at UNI reference point as:
+       *
+       *  8 7 6 5 4 3 2 1
+       * +-+-+-+-+-+-+-+-+
+       * |  GFC  |  VPI  |
+       * +-+-+-+-+-+-+-+-+
+       * |  VPI  |  VCI  |
+       * +-+-+-+-+-+-+-+-+
+       * |      VCI      |
+       * +-+-+-+-+-+-+-+-+
+       * |  VCI  |  PT |C|
+       * +-+-+-+-+-+-+-+-+
+       * |   HEC (CRC)   |
+       * +-+-+-+-+-+-+-+-+
+       */
+      octet = tvb_get_guint8(tvb, 0);
+      proto_tree_add_text(atm_tree, tvb, 0, 1, "GFC: 0x%x", octet >> 4);
+      vpi = (octet & 0xF) << 4;
+      octet = tvb_get_guint8(tvb, 1);
+      vpi |= octet >> 4;
+      proto_tree_add_uint(atm_tree, hf_atm_vpi, tvb, 0, 2, vpi);
     } else {
-          /* 
-           * FF: ITU-T I.361 (Section 2.3) defines the cell header format 
-           * and encoding at NNI reference point as:
-           * 
-           *  8 7 6 5 4 3 2 1
-           * +-+-+-+-+-+-+-+-+
-           * |      VPI      |
-           * +-+-+-+-+-+-+-+-+
-           * |  VPI  |  VCI  |
-           * +-+-+-+-+-+-+-+-+
-           * |      VCI      |
-           * +-+-+-+-+-+-+-+-+
-           * |  VCI  |  PT |C|
-           * +-+-+-+-+-+-+-+-+
-           * |   HEC (CRC)   |
-           * +-+-+-+-+-+-+-+-+
-           */
-          octet = tvb_get_guint8(tvb, 0);
-          vpi = octet << 4;
-          octet = tvb_get_guint8(tvb, 1);
-          vpi |= (octet & 0xF0) >> 4;
-          proto_tree_add_uint(atm_tree, hf_atm_vpi, tvb, 0, 2, vpi);
+      /*
+       * FF: ITU-T I.361 (Section 2.3) defines the cell header format
+       * and encoding at NNI reference point as:
+       *
+       *  8 7 6 5 4 3 2 1
+       * +-+-+-+-+-+-+-+-+
+       * |      VPI      |
+       * +-+-+-+-+-+-+-+-+
+       * |  VPI  |  VCI  |
+       * +-+-+-+-+-+-+-+-+
+       * |      VCI      |
+       * +-+-+-+-+-+-+-+-+
+       * |  VCI  |  PT |C|
+       * +-+-+-+-+-+-+-+-+
+       * |   HEC (CRC)   |
+       * +-+-+-+-+-+-+-+-+
+       */
+      octet = tvb_get_guint8(tvb, 0);
+      vpi = octet << 4;
+      octet = tvb_get_guint8(tvb, 1);
+      vpi |= (octet & 0xF0) >> 4;
+      proto_tree_add_uint(atm_tree, hf_atm_vpi, tvb, 0, 2, vpi);
     }
 
     vci = (octet & 0x0F) << 12;
@@ -1634,32 +1634,32 @@ dissect_atm_cell(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
     proto_tree_add_uint(atm_tree, hf_atm_vci, tvb, 1, 3, vci);
     pt = (octet >> 1) & 0x7;
     proto_tree_add_text(atm_tree, tvb, 3, 1, "Payload Type: %s",
-         val_to_str(pt, atm_pt_vals, "Unknown (%u)"));
+                        val_to_str(pt, atm_pt_vals, "Unknown (%u)"));
     proto_tree_add_text(atm_tree, tvb, 3, 1, "Cell Loss Priority: %s",
-       (octet & 0x01) ? "Low priority" : "High priority");
-  
+                        (octet & 0x01) ? "Low priority" : "High priority");
+
     if (!crc_stripped) {
-          /*
-           * FF: parse the Header Error Check (HEC).
-           */
-          ti = proto_tree_add_text(atm_tree, tvb, 4, 1, 
-                                   "Header Error Check: 0x%02x",
-                                   tvb_get_guint8(tvb, 4));
-          err = get_header_err(tvb_get_ptr(tvb, 0, 5));
-          if (err == NO_ERROR_DETECTED)
-                  proto_item_append_text(ti, " (correct)");
-          else if (err == UNCORRECTIBLE_ERROR)
-                  proto_item_append_text(ti, " (uncorrectable error)");
-          else
-                  proto_item_append_text(ti, " (error in bit %d)", err);
-          offset = 5;
+      /*
+       * FF: parse the Header Error Check (HEC).
+       */
+      ti = proto_tree_add_text(atm_tree, tvb, 4, 1,
+                               "Header Error Check: 0x%02x",
+                               tvb_get_guint8(tvb, 4));
+      err = get_header_err(tvb_get_ptr(tvb, 0, 5));
+      if (err == NO_ERROR_DETECTED)
+        proto_item_append_text(ti, " (correct)");
+      else if (err == UNCORRECTIBLE_ERROR)
+        proto_item_append_text(ti, " (uncorrectable error)");
+      else
+        proto_item_append_text(ti, " (error in bit %d)", err);
+      offset = 5;
     } else {
-          /*
-           * FF: in some encapsulation modes (e.g. RFC 4717, ATM N-to-One
-           * Cell Mode) the Header Error Check (HEC) field is stripped.
-           * So we do nothing here.
-           */
-          offset = 4;
+      /*
+       * FF: in some encapsulation modes (e.g. RFC 4717, ATM N-to-One
+       * Cell Mode) the Header Error Check (HEC) field is stripped.
+       * So we do nothing here.
+       */
+      offset = 4;
     }
   }
   else
@@ -1667,7 +1667,7 @@ dissect_atm_cell(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
     offset = 0; /* For PWs. Header is decoded by PW dissector.*/
     pwpd = pinfo->private_data;
     vpi = pwpd->vpi;
-    vci = pwpd->vci; 
+    vci = pwpd->vci;
     pt  = pwpd->pti;
   }
 
@@ -1692,15 +1692,15 @@ dissect_atm_cell(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
     octet = tvb_get_guint8(tvb, offset);
     proto_tree_add_text(aal_tree, tvb, offset, 1, "CSI: %u", octet >> 7);
     proto_tree_add_text(aal_tree, tvb, offset, 1, "Sequence Count: %u",
-               (octet >> 4) & 0x7);
+                        (octet >> 4) & 0x7);
     if (check_col(pinfo->cinfo, COL_INFO)) {
       col_add_fstr(pinfo->cinfo, COL_INFO, "Sequence count = %u",
-               (octet >> 4) & 0x7);
+                   (octet >> 4) & 0x7);
     }
     proto_tree_add_text(aal_tree, tvb, offset, 1, "CRC: 0x%x",
-               (octet >> 1) & 0x7);
+                        (octet >> 1) & 0x7);
     proto_tree_add_text(aal_tree, tvb, offset, 1, "Parity: %u",
-               octet & 0x1);
+                        octet & 0x1);
     offset++;
 
     proto_tree_add_text(aal_tree, tvb, offset, 47, "Payload");
@@ -1717,15 +1717,15 @@ dissect_atm_cell(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
     aal3_4_hdr = tvb_get_ntohs(tvb, offset);
     if (check_col(pinfo->cinfo, COL_INFO)) {
       col_add_fstr(pinfo->cinfo, COL_INFO, "%s, sequence number = %u",
-               val_to_str(aal3_4_hdr >> 14, st_vals, "Unknown (%u)"),
-               (aal3_4_hdr >> 10) & 0xF);
+                   val_to_str(aal3_4_hdr >> 14, st_vals, "Unknown (%u)"),
+                   (aal3_4_hdr >> 10) & 0xF);
     }
     proto_tree_add_text(aal_tree, tvb, offset, 2, "Segment Type: %s",
-               val_to_str(aal3_4_hdr >> 14, st_vals, "Unknown (%u)"));
+                        val_to_str(aal3_4_hdr >> 14, st_vals, "Unknown (%u)"));
     proto_tree_add_text(aal_tree, tvb, offset, 2, "Sequence Number: %u",
-               (aal3_4_hdr >> 10) & 0xF);
+                        (aal3_4_hdr >> 10) & 0xF);
     proto_tree_add_text(aal_tree, tvb, offset, 2, "Multiplex ID: %u",
-               aal3_4_hdr & 0x3FF);
+                        aal3_4_hdr & 0x3FF);
     offset += 2;
 
     proto_tree_add_text(aal_tree, tvb, offset, 44, "Information");
@@ -1733,13 +1733,13 @@ dissect_atm_cell(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
 
     aal3_4_trlr = tvb_get_ntohs(tvb, offset);
     proto_tree_add_text(aal_tree, tvb, offset, 2, "Length Indicator: %u",
-               (aal3_4_trlr >> 10) & 0x3F);
+                        (aal3_4_trlr >> 10) & 0x3F);
     length = tvb_length_remaining(tvb, 5);
     crc10 = update_crc10_by_bytes(0, tvb_get_ptr(tvb, 5, length),
-       length);
+                                  length);
     proto_tree_add_text(aal_tree, tvb, offset, 2, "CRC: 0x%03x (%s)",
-               aal3_4_trlr & 0x3FF,
-               (crc10 == 0) ? "correct" : "incorrect");
+                        aal3_4_trlr & 0x3FF,
+                        (crc10 == 0) ? "correct" : "incorrect");
     break;
 
   case AAL_OAMCELL:
@@ -1755,30 +1755,30 @@ dissect_atm_cell(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
     {
       if (check_col(pinfo->cinfo, COL_INFO))
         col_add_fstr(pinfo->cinfo, COL_INFO, "%s",
-               val_to_str(octet >> 4, oam_type_vals, "Unknown (%u)"));
+                     val_to_str(octet >> 4, oam_type_vals, "Unknown (%u)"));
     }
     proto_tree_add_text(aal_tree, tvb, offset, 1, "OAM Type: %s",
-               val_to_str(octet >> 4, oam_type_vals, "Unknown (%u)"));
+                        val_to_str(octet >> 4, oam_type_vals, "Unknown (%u)"));
     switch (octet >> 4) {
 
     case OAM_TYPE_FM:
       proto_tree_add_text(aal_tree, tvb, offset, 1, "Function Type: %s",
-               val_to_str(octet & 0x0F, ft_fm_vals, "Unknown (%u)"));
+                          val_to_str(octet & 0x0F, ft_fm_vals, "Unknown (%u)"));
       break;
 
     case OAM_TYPE_PM:
       proto_tree_add_text(aal_tree, tvb, offset, 1, "Function Type: %s",
-               val_to_str(octet & 0x0F, ft_pm_vals, "Unknown (%u)"));
+                          val_to_str(octet & 0x0F, ft_pm_vals, "Unknown (%u)"));
       break;
 
     case OAM_TYPE_AD:
       proto_tree_add_text(aal_tree, tvb, offset, 1, "Function Type: %s",
-               val_to_str(octet & 0x0F, ft_ad_vals, "Unknown (%u)"));
+                          val_to_str(octet & 0x0F, ft_ad_vals, "Unknown (%u)"));
       break;
 
     default:
       proto_tree_add_text(aal_tree, tvb, offset, 1, "Function Type: %u",
-               octet & 0x0F);
+                          octet & 0x0F);
       break;
     }
     offset += 1;
@@ -1788,11 +1788,11 @@ dissect_atm_cell(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
 
     length = tvb_length_remaining(tvb, 5);
     crc10 = update_crc10_by_bytes(0, tvb_get_ptr(tvb, 5, length),
-       length);
+                                  length);
     oam_crc = tvb_get_ntohs(tvb, offset);
     proto_tree_add_text(aal_tree, tvb, offset, 2, "CRC-10: 0x%03x (%s)",
-               oam_crc & 0x3FF,
-               (crc10 == 0) ? "correct" : "incorrect");
+                        oam_crc & 0x3FF,
+                        (crc10 == 0) ? "correct" : "incorrect");
     break;
 
   default:
@@ -1809,11 +1809,11 @@ dissect_atm_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
   proto_tree   *atm_tree = NULL;
   proto_item   *atm_ti = NULL;
   gboolean     pseudowire_mode = (NULL != pinfo->private_data);
-  
+
   if ( pinfo->pseudo_header->atm.aal == AAL_5 &&
-       pinfo->pseudo_header->atm.type == TRAF_LANE &&
-       dissect_lanesscop ) {
-       pinfo->pseudo_header->atm.aal = AAL_SIGNALLING;
+       pinfo->pseudo_header->atm.type == TRAF_LANE &&
+       dissect_lanesscop ) {
+    pinfo->pseudo_header->atm.aal = AAL_SIGNALLING;
   }
 
   col_set_str(pinfo->cinfo, COL_PROTOCOL, "ATM");
@@ -1838,12 +1838,12 @@ dissect_atm_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
   if (check_col(pinfo->cinfo, COL_INFO)) {
     if (pinfo->pseudo_header->atm.aal == AAL_5) {
       col_add_fstr(pinfo->cinfo, COL_INFO, "AAL5 %s",
-               val_to_str(pinfo->pseudo_header->atm.type, aal5_hltype_vals,
-                               "Unknown traffic type (%u)"));
+                   val_to_str(pinfo->pseudo_header->atm.type, aal5_hltype_vals,
+                              "Unknown traffic type (%u)"));
     } else {
       col_add_str(pinfo->cinfo, COL_INFO,
-               val_to_str(pinfo->pseudo_header->atm.aal, aal_vals,
-                       "Unknown AAL (%u)"));
+                  val_to_str(pinfo->pseudo_header->atm.aal, aal_vals,
+                             "Unknown AAL (%u)"));
     }
   }
 
@@ -1867,16 +1867,16 @@ dissect_atm_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
       default:
         /* Sniffers shouldn't provide anything other than 0 or 1. */
         proto_tree_add_text(atm_tree, tvb, 0, 0, "Channel: %u",
-               pinfo->pseudo_header->atm.channel);
+                            pinfo->pseudo_header->atm.channel);
         break;
       }
     }
 
     proto_tree_add_uint_format_value(atm_tree, hf_atm_aal, tvb, 0, 0,
-       pinfo->pseudo_header->atm.aal,
-       "%s",
-       val_to_str(pinfo->pseudo_header->atm.aal, aal_vals,
-         "Unknown AAL (%u)"));
+                                     pinfo->pseudo_header->atm.aal,
+                                     "%s",
+                                     val_to_str(pinfo->pseudo_header->atm.aal, aal_vals,
+                                                "Unknown AAL (%u)"));
   }
   if (pinfo->pseudo_header->atm.flags & ATM_RAW_CELL) {
     /* This is a single cell, with the cell header at the beginning. */
@@ -1885,9 +1885,9 @@ dissect_atm_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
     } else {
       proto_item_set_len(atm_ti, 5);
     }
-    dissect_atm_cell(tvb, pinfo, tree, atm_tree, 
-                    pinfo->pseudo_header->atm.aal, FALSE,
-                    pinfo->pseudo_header->atm.flags & ATM_NO_HEC);       
+    dissect_atm_cell(tvb, pinfo, tree, atm_tree,
+                     pinfo->pseudo_header->atm.aal, FALSE,
+                     pinfo->pseudo_header->atm.flags & ATM_NO_HEC);
   } else {
     /* This is a reassembled PDU. */
     dissect_reassembled_pdu(tvb, pinfo, tree, atm_tree, atm_ti, truncated);
@@ -1912,7 +1912,7 @@ dissect_atm_oam_cell(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   proto_tree   *atm_tree = NULL;
   proto_item   *atm_ti = NULL;
   gboolean     pseudowire_mode = (NULL != pinfo->private_data);
-  
+
   col_set_str(pinfo->cinfo, COL_PROTOCOL, "ATM");
 
   if (!pseudowire_mode) {
@@ -1929,102 +1929,102 @@ dissect_atm_oam_cell(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 void
 proto_register_atm(void)
 {
-       static hf_register_info hf[] = {
-               { &hf_atm_aal,
-               { "AAL",                "atm.aal", FT_UINT8, BASE_DEC, VALS(aal_vals), 0x0,
-                       NULL, HFILL }},
-
-               { &hf_atm_vpi,
-               { "VPI",                "atm.vpi", FT_UINT8, BASE_DEC, NULL, 0x0,
-                       NULL, HFILL }},
-
-               { &hf_atm_vci,
-               { "VCI",                "atm.vci", FT_UINT16, BASE_DEC, NULL, 0x0,
-                       NULL, HFILL }},
-
-               { &hf_atm_cid,
-               { "CID",                "atm.cid", FT_UINT8, BASE_DEC, NULL, 0x0,
-                       NULL, HFILL }},
-
-       };
-       static gint *ett[] = {
-               &ett_atm,
-               &ett_ilmi,
-               &ett_aal1,
-               &ett_aal3_4,
-               &ett_oamaal,
-               &ett_atm_lane,
-               &ett_atm_lane_lc_lan_dest,
-               &ett_atm_lane_lc_lan_dest_rd,
-               &ett_atm_lane_lc_flags,
-               &ett_atm_lane_lc_tlv,
-       };
-       
-       static enum_val_t unknown_aal2_options[] = { 
-         { "raw",     "Raw data", TRAF_UNKNOWN },
-         { "umts_fp", "UMTS FP",  TRAF_UMTS_FP },
-         { NULL, NULL, 0 }
-       };
-
-       module_t *atm_module;
-       
-       proto_atm = proto_register_protocol("Asynchronous Transfer Mode", "ATM", "atm");
-       proto_aal1 = proto_register_protocol("ATM AAL1", "AAL1", "aal1");
-       proto_aal3_4 = proto_register_protocol("ATM AAL3/4", "AAL3/4", "aal3_4");
-       proto_oamaal = proto_register_protocol("ATM OAM AAL", "OAM AAL", "oamaal");
-       proto_register_field_array(proto_atm, hf, array_length(hf));
-       proto_register_subtree_array(ett, array_length(ett));
-
-       proto_ilmi = proto_register_protocol("ILMI", "ILMI", "ilmi");
-
-       register_dissector("ilmi", dissect_ilmi, proto_ilmi);
-
-       proto_atm_lane = proto_register_protocol("ATM LAN Emulation",
-           "ATM LANE", "lane");
-
-       register_dissector("lane", dissect_lane, proto_atm_lane);
-       register_dissector("atm_untruncated", dissect_atm_untruncated, proto_atm);
-       register_dissector("atm_truncated", dissect_atm, proto_atm);
-       register_dissector("atm_oam_cell", dissect_atm_oam_cell, proto_oamaal);
-       
-       atm_module = prefs_register_protocol ( proto_atm, NULL );
-       prefs_register_bool_preference ( atm_module, "dissect_lane_as_sscop", "Dissect LANE as SSCOP",
-               "Autodection between LANE and SSCOP is hard. As default LANE is preferred",
-               &dissect_lanesscop);
-       prefs_register_enum_preference ( atm_module, "unknown_aal2_type",
-                                 "Decode unknown AAL2 traffic as",
-                                 "Type used to dissect unknown AAL2 traffic",
-                                 &unknown_aal2_type, unknown_aal2_options, FALSE);
+  static hf_register_info hf[] = {
+    { &hf_atm_aal,
+      { "AAL",          "atm.aal", FT_UINT8, BASE_DEC, VALS(aal_vals), 0x0,
+        NULL, HFILL }},
+
+    { &hf_atm_vpi,
+      { "VPI",          "atm.vpi", FT_UINT8, BASE_DEC, NULL, 0x0,
+        NULL, HFILL }},
+
+    { &hf_atm_vci,
+      { "VCI",          "atm.vci", FT_UINT16, BASE_DEC, NULL, 0x0,
+        NULL, HFILL }},
+
+    { &hf_atm_cid,
+      { "CID",          "atm.cid", FT_UINT8, BASE_DEC, NULL, 0x0,
+        NULL, HFILL }},
+
+  };
+  static gint *ett[] = {
+    &ett_atm,
+    &ett_ilmi,
+    &ett_aal1,
+    &ett_aal3_4,
+    &ett_oamaal,
+    &ett_atm_lane,
+    &ett_atm_lane_lc_lan_dest,
+    &ett_atm_lane_lc_lan_dest_rd,
+    &ett_atm_lane_lc_flags,
+    &ett_atm_lane_lc_tlv,
+  };
+
+  static enum_val_t unknown_aal2_options[] = {
+    { "raw",     "Raw data", TRAF_UNKNOWN },
+    { "umts_fp", "UMTS FP",  TRAF_UMTS_FP },
+    { NULL, NULL, 0 }
+  };
+
+  module_t *atm_module;
+
+  proto_atm = proto_register_protocol("Asynchronous Transfer Mode", "ATM", "atm");
+  proto_aal1 = proto_register_protocol("ATM AAL1", "AAL1", "aal1");
+  proto_aal3_4 = proto_register_protocol("ATM AAL3/4", "AAL3/4", "aal3_4");
+  proto_oamaal = proto_register_protocol("ATM OAM AAL", "OAM AAL", "oamaal");
+  proto_register_field_array(proto_atm, hf, array_length(hf));
+  proto_register_subtree_array(ett, array_length(ett));
+
+  proto_ilmi = proto_register_protocol("ILMI", "ILMI", "ilmi");
+
+  register_dissector("ilmi", dissect_ilmi, proto_ilmi);
+
+  proto_atm_lane = proto_register_protocol("ATM LAN Emulation",
+                                           "ATM LANE", "lane");
+
+  register_dissector("lane", dissect_lane, proto_atm_lane);
+  register_dissector("atm_untruncated", dissect_atm_untruncated, proto_atm);
+  register_dissector("atm_truncated", dissect_atm, proto_atm);
+  register_dissector("atm_oam_cell", dissect_atm_oam_cell, proto_oamaal);
+
+  atm_module = prefs_register_protocol ( proto_atm, NULL );
+  prefs_register_bool_preference ( atm_module, "dissect_lane_as_sscop", "Dissect LANE as SSCOP",
+                                   "Autodection between LANE and SSCOP is hard. As default LANE is preferred",
+                                   &dissect_lanesscop);
+  prefs_register_enum_preference ( atm_module, "unknown_aal2_type",
+                                   "Decode unknown AAL2 traffic as",
+                                   "Type used to dissect unknown AAL2 traffic",
+                                   &unknown_aal2_type, unknown_aal2_options, FALSE);
 
 }
 
 void
 proto_reg_handoff_atm(void)
 {
-       dissector_handle_t atm_handle, atm_untruncated_handle;
-
-       /*
-        * Get handles for the Ethernet, Token Ring, Frame Relay, LLC,
-        * SSCOP, LANE, and ILMI dissectors.
-        */
-       eth_withoutfcs_handle = find_dissector("eth_withoutfcs");
-       tr_handle = find_dissector("tr");
-       fr_handle = find_dissector("fr");
-       llc_handle = find_dissector("llc");
-       sscop_handle = find_dissector("sscop");
-       lane_handle = find_dissector("lane");
-       ilmi_handle = find_dissector("ilmi");
-       ppp_handle = find_dissector("ppp");
-       eth_handle = find_dissector("eth");
-       ip_handle = find_dissector("ip");
-       data_handle = find_dissector("data");
-       fp_handle = find_dissector("fp");
-
-       atm_handle = create_dissector_handle(dissect_atm, proto_atm);
-       dissector_add("wtap_encap", WTAP_ENCAP_ATM_PDUS, atm_handle);
-
-       atm_untruncated_handle = create_dissector_handle(dissect_atm_untruncated,
-           proto_atm);
-       dissector_add("wtap_encap", WTAP_ENCAP_ATM_PDUS_UNTRUNCATED,
-           atm_untruncated_handle);
+  dissector_handle_t atm_handle, atm_untruncated_handle;
+
+  /*
+   * Get handles for the Ethernet, Token Ring, Frame Relay, LLC,
+   * SSCOP, LANE, and ILMI dissectors.
+   */
+  eth_withoutfcs_handle = find_dissector("eth_withoutfcs");
+  tr_handle = find_dissector("tr");
+  fr_handle = find_dissector("fr");
+  llc_handle = find_dissector("llc");
+  sscop_handle = find_dissector("sscop");
+  lane_handle = find_dissector("lane");
+  ilmi_handle = find_dissector("ilmi");
+  ppp_handle = find_dissector("ppp");
+  eth_handle = find_dissector("eth");
+  ip_handle = find_dissector("ip");
+  data_handle = find_dissector("data");
+  fp_handle = find_dissector("fp");
+
+  atm_handle = create_dissector_handle(dissect_atm, proto_atm);
+  dissector_add("wtap_encap", WTAP_ENCAP_ATM_PDUS, atm_handle);
+
+  atm_untruncated_handle = create_dissector_handle(dissect_atm_untruncated,
+                                                   proto_atm);
+  dissector_add("wtap_encap", WTAP_ENCAP_ATM_PDUS_UNTRUNCATED,
+                atm_untruncated_handle);
 }
index ec6eba99ab2a7aa38057f61ca0e285c4c19103c5..1f72a15cdfd9595edfa5f33370054e5f8120b61d 100644 (file)
@@ -119,8 +119,8 @@ dissect_ayiya(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                proto_tree_add_bits_item(ayiya_tree, hf_auth_method, tvb, 16, 4, FALSE);
                proto_tree_add_bits_item(ayiya_tree, hf_opcode, tvb, 20, 4, FALSE);
                proto_tree_add_uint_format(ayiya_tree, hf_next_header, tvb,
-                                                                  3, 1, next_header, 
-                                                                  "Next header: %s (0x%02x)", 
+                                                                  3, 1, next_header,
+                                                                  "Next header: %s (0x%02x)",
                                                                   ipprotostr(next_header), next_header);
                tv.secs = tvb_get_ntohl(tvb, 4);
                tv.nsecs = 0;
@@ -140,76 +140,76 @@ dissect_ayiya(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 void
 proto_register_ayiya(void)
 {
-  static hf_register_info hf[] = {
-       { &hf_id_len,
-               { "Identity field length", "ayiya.idlen", FT_UINT8, 
-                       BASE_HEX, NULL, 0x0, NULL, HFILL
-               }
-       },
-       { &hf_id_type,
-               { "Identity field type", "ayiya.idtype", FT_UINT8, 
-                       BASE_HEX, VALS(identity_types), 0x0, NULL, HFILL
-               }
-       },
-       { &hf_sig_len,
-               { "Signature Length", "ayiya.siglen", FT_UINT8, 
-                       BASE_HEX, NULL, 0x0, NULL, HFILL
-               }
-       },
-       { &hf_hash_method,
-               { "Hash method", "ayiya.hashmethod", FT_UINT8, 
-                       BASE_HEX, VALS(hash_methods), 0x0, NULL, HFILL
-               }
-       },
-       { &hf_auth_method,
-               { "Authentication method", "ayiya.authmethod", FT_UINT8, 
-                       BASE_HEX, VALS(auth_methods), 0x0, NULL, HFILL
-               }
-       },
-       { &hf_opcode,
-               { "Operation Code", "ayiya.opcode", FT_UINT8, 
-                       BASE_HEX, VALS(opcodes), 0x0, NULL, HFILL
-               }
-       },
-       { &hf_next_header,
-               { "Next Header", "ayiya.nextheader", FT_UINT8, 
-                       BASE_HEX, NULL, 0x0, NULL, HFILL
-               }
-       },
-       { &hf_epoch,
-               { "Epoch", "ayiya.epoch", FT_ABSOLUTE_TIME, 
-                       ABSOLUTE_TIME_LOCAL, NULL, 0x0, NULL, HFILL
-               }
-       },
-       { &hf_identity,
-               { "Identity", "ayiya.identity", FT_BYTES, 
-                       BASE_NONE, NULL, 0x0, NULL, HFILL
-               }
-       },
-       { &hf_signature,
-               { "Signature", "ayiya.signature", FT_BYTES, 
-                       BASE_NONE, NULL, 0x0, NULL, HFILL
-               }
-       },
-  };
-  static gint *ett[] = {
-    &ett_ayiya,
-  };
-
-  proto_ayiya = proto_register_protocol("Anything in Anything Protocol",
-                                      "AYIYA", "ayiya");
-  register_dissector("ayiya", dissect_ayiya, proto_ayiya);
-  proto_register_field_array(proto_ayiya, hf, array_length(hf));
-  proto_register_subtree_array(ett, array_length(ett));
+       static hf_register_info hf[] = {
+               { &hf_id_len,
+                 { "Identity field length", "ayiya.idlen", FT_UINT8,
+                   BASE_HEX, NULL, 0x0, NULL, HFILL
+                 }
+               },
+               { &hf_id_type,
+                 { "Identity field type", "ayiya.idtype", FT_UINT8,
+                   BASE_HEX, VALS(identity_types), 0x0, NULL, HFILL
+                 }
+               },
+               { &hf_sig_len,
+                 { "Signature Length", "ayiya.siglen", FT_UINT8,
+                   BASE_HEX, NULL, 0x0, NULL, HFILL
+                 }
+               },
+               { &hf_hash_method,
+                 { "Hash method", "ayiya.hashmethod", FT_UINT8,
+                   BASE_HEX, VALS(hash_methods), 0x0, NULL, HFILL
+                 }
+               },
+               { &hf_auth_method,
+                 { "Authentication method", "ayiya.authmethod", FT_UINT8,
+                   BASE_HEX, VALS(auth_methods), 0x0, NULL, HFILL
+                 }
+               },
+               { &hf_opcode,
+                 { "Operation Code", "ayiya.opcode", FT_UINT8,
+                   BASE_HEX, VALS(opcodes), 0x0, NULL, HFILL
+                 }
+               },
+               { &hf_next_header,
+                 { "Next Header", "ayiya.nextheader", FT_UINT8,
+                   BASE_HEX, NULL, 0x0, NULL, HFILL
+                 }
+               },
+               { &hf_epoch,
+                 { "Epoch", "ayiya.epoch", FT_ABSOLUTE_TIME,
+                   ABSOLUTE_TIME_LOCAL, NULL, 0x0, NULL, HFILL
+                 }
+               },
+               { &hf_identity,
+                 { "Identity", "ayiya.identity", FT_BYTES,
+                   BASE_NONE, NULL, 0x0, NULL, HFILL
+                 }
+               },
+               { &hf_signature,
+                 { "Signature", "ayiya.signature", FT_BYTES,
+                   BASE_NONE, NULL, 0x0, NULL, HFILL
+                 }
+               },
+       };
+       static gint *ett[] = {
+               &ett_ayiya,
+       };
+
+       proto_ayiya = proto_register_protocol("Anything in Anything Protocol",
+                                             "AYIYA", "ayiya");
+       register_dissector("ayiya", dissect_ayiya, proto_ayiya);
+       proto_register_field_array(proto_ayiya, hf, array_length(hf));
+       proto_register_subtree_array(ett, array_length(ett));
 }
 
 void
 proto_reg_handoff_ayiya(void)
 {
-  dissector_handle_t ayiya_handle;
+       dissector_handle_t ayiya_handle;
 
-  ayiya_handle = find_dissector("ayiya");
-  dissector_add("udp.port", UDP_PORT_AYIYA, ayiya_handle);
-  
-  ip_dissector_table = find_dissector_table("ip.proto");
+       ayiya_handle = find_dissector("ayiya");
+       dissector_add("udp.port", UDP_PORT_AYIYA, ayiya_handle);
+
+       ip_dissector_table = find_dissector_table("ip.proto");
 }
index 88b04b72942df5963ef142ff1a4d618d7e1656c3..b28c0586b2070cfc30aeda447383309345eee751 100644 (file)
@@ -3900,11 +3900,11 @@ static const fragment_items msg_frag_items = {
 /* if BACnet uses the reserved values, then patch the corresponding values here, maximum 16 values are defined */
 static const guint MaxAPDUSize [] = { 50,128,206,480,1024,1476 };
 
-static guint 
+static guint
 fGetMaxAPDUSize(guint8 idx)
 {
        /* only 16 values are defined, so use & 0x0f */
-       /* check the size of the Array, deliver either the entry 
+       /* check the size of the Array, deliver either the entry
           or the first entry if idx is outside of the array (bug 3736 comment#7) */
        if ((idx & 0x0f) >= (gint)(sizeof(MaxAPDUSize)/sizeof(guint)))
                return MaxAPDUSize[0];
@@ -4384,9 +4384,9 @@ fWeekNDay (tvbuff_t *tvb, proto_tree *tree, guint offset)
        weekOfMonth = tvb_get_guint8(tvb, offset+tag_len+1);
        dayOfWeek = tvb_get_guint8(tvb, offset+tag_len+2);
        ti = proto_tree_add_text(tree, tvb, offset, lvt+tag_len, "%s %s, %s",
-                        val_to_str(month, months, "month (%d) not found"),
-                        val_to_str(weekOfMonth, weekofmonth, "week of month (%d) not found"),
-                        val_to_str(dayOfWeek, day_of_week, "day of week (%d) not found"));
+                                val_to_str(month, months, "month (%d) not found"),
+                                val_to_str(weekOfMonth, weekofmonth, "week of month (%d) not found"),
+                                val_to_str(dayOfWeek, day_of_week, "day of week (%d) not found"));
        subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
        fTagHeaderTree(tvb, subtree, offset, &tag_no, &tag_info, &lvt);
 
@@ -4505,17 +4505,17 @@ fTimeValue (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 static guint
 fCalendaryEntry (tvbuff_t *tvb, proto_tree *tree, guint offset)
 {
-    guint8 tag_no, tag_info;
-    guint32 lvt;
+       guint8 tag_no, tag_info;
+       guint32 lvt;
 
        switch (fTagNo(tvb, offset)) {
        case 0: /* Date */
                offset = fDate    (tvb, tree, offset, "Date: ");
                break;
        case 1: /* dateRange */
-        offset += fTagHeaderTree(tvb, tree, offset, &tag_no, &tag_info, &lvt);
+               offset += fTagHeaderTree(tvb, tree, offset, &tag_no, &tag_info, &lvt);
                offset = fDateRange (tvb, tree, offset);
-        offset += fTagHeaderTree(tvb, tree, offset, &tag_no, &tag_info, &lvt);
+               offset += fTagHeaderTree(tvb, tree, offset, &tag_no, &tag_info, &lvt);
                break;
        case 2: /* BACnetWeekNDay */
                offset = fWeekNDay (tvb, tree, offset);
@@ -4559,10 +4559,10 @@ static guint fTimeStamp (tvbuff_t *tvb, proto_tree *tree,
 static guint
 fClientCOV (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
-    if (tvb_reported_length_remaining(tvb, offset) > 0) {
-        offset = fApplicationTypes(tvb,pinfo,tree,offset, "increment: ");
-    }
-    return offset;
+       if (tvb_reported_length_remaining(tvb, offset) > 0) {
+               offset = fApplicationTypes(tvb,pinfo,tree,offset, "increment: ");
+       }
+       return offset;
 }
 
 static const value_string
@@ -4875,7 +4875,7 @@ fActionList (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
                if (tag_is_opening(tag_info)) {
                        ti = proto_tree_add_text(tree, tvb, offset, 1, "Action List");
                        subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
-                       offset += fTagHeaderTree (tvb, subtree, offset, 
+                       offset += fTagHeaderTree (tvb, subtree, offset,
                                &tag_no, &tag_info, &lvt);
                }
                switch (tag_no) {
@@ -5280,7 +5280,7 @@ fAbstractSyntaxNType (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
                /* Application Tags */
                switch (propertyIdentifier) {
                case 2: /* action */
-                       /* loop object is application tagged, 
+                       /* loop object is application tagged,
                                command object is context tagged */
                        if (tag_is_context_specific(tag_info)) {
                                /* BACnetActionList */
@@ -5421,19 +5421,19 @@ fPropertyValue (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offse
        guint32 lvt;
 
        if (tag_is_opening(tag_info)) {
-               offset += fTagHeaderTree(tvb, tree, offset, 
+               offset += fTagHeaderTree(tvb, tree, offset,
                        &tag_no, &tag_info, &lvt);
                offset = fAbstractSyntaxNType (tvb, pinfo, tree, offset);
                if (tvb_length_remaining(tvb, offset) > 0) {
-                       offset += fTagHeaderTree(tvb, tree, offset, 
+                       offset += fTagHeaderTree(tvb, tree, offset,
                                &tag_no, &tag_info, &lvt);
                }
        } else {
-               proto_tree_add_text(tree, tvb, offset, tvb_length(tvb) - offset, 
+               proto_tree_add_text(tree, tvb, offset, tvb_length(tvb) - offset,
                        "expected Opening Tag!"); \
                offset = tvb_length(tvb);
        }
-       
+
        return offset;
 }
 
@@ -5652,10 +5652,10 @@ fTimeSynchronizationRequest  (tvbuff_t *tvb, proto_tree *tree, guint offset)
 static guint
 fDateRange  (tvbuff_t *tvb, proto_tree *tree, guint offset)
 {
-    if (tvb_reported_length_remaining(tvb, offset) <= 0)
-        return offset;
-    offset = fDate (tvb,tree,offset,"Start Date: ");
-    return fDate (tvb, tree, offset, "End Date: ");
+       if (tvb_reported_length_remaining(tvb, offset) <= 0)
+               return offset;
+       offset = fDate (tvb,tree,offset,"Start Date: ");
+       return fDate (tvb, tree, offset, "End Date: ");
 }
 
 static guint
@@ -6358,7 +6358,7 @@ fEventParameter (tvbuff_t *tvb, proto_tree *tree, guint offset)
                        break;
                case 1: /* change-of-state */
                        while ((tvb_reported_length_remaining(tvb, offset) > 0)&&(offset>lastoffset)) {  /* exit loop if nothing happens inside */
-                       lastoffset = offset;
+                               lastoffset = offset;
                                switch (fTagNo(tvb, offset)) {
                                case 0:
                                        offset = fTimeSpan (tvb, tree, offset, "Time Delay");
@@ -6374,7 +6374,7 @@ fEventParameter (tvbuff_t *tvb, proto_tree *tree, guint offset)
                        break;
                case 2: /* change-of-value */
                        while ((tvb_reported_length_remaining(tvb, offset) > 0)&&(offset>lastoffset)) {  /* exit loop if nothing happens inside */
-                       lastoffset = offset;
+                               lastoffset = offset;
                                switch (fTagNo(tvb, offset)) {
                                case 0:
                                        offset = fTimeSpan   (tvb, tree, offset, "Time Delay");
@@ -6398,7 +6398,7 @@ fEventParameter (tvbuff_t *tvb, proto_tree *tree, guint offset)
                        break;
                case 3: /* command-failure */
                        while ((tvb_reported_length_remaining(tvb, offset) > 0)&&(offset>lastoffset)) {  /* exit loop if nothing happens inside */
-                       lastoffset = offset;
+                               lastoffset = offset;
                                switch (fTagNo(tvb, offset)) {
                                case 0:
                                        offset = fTimeSpan   (tvb, tree, offset, "Time Delay");
@@ -6412,7 +6412,7 @@ fEventParameter (tvbuff_t *tvb, proto_tree *tree, guint offset)
                        break;
                case 4: /* floating-limit */
                        while ((tvb_reported_length_remaining(tvb, offset) > 0)&&(offset>lastoffset)) {  /* exit loop if nothing happens inside */
-                       lastoffset = offset;
+                               lastoffset = offset;
                                switch (fTagNo(tvb, offset)) {
                                case 0:
                                        offset = fTimeSpan   (tvb, tree, offset, "Time Delay");
@@ -7461,12 +7461,12 @@ fSpecialEvent (tvbuff_t *tvb, packet_info *pinfo, proto_tree *subtree, guint off
 
                switch (tag_no) {
                case 0: /* calendaryEntry */
-            if (tag_is_opening(tag_info))
-            {
+                       if (tag_is_opening(tag_info))
+                       {
                                offset += fTagHeaderTree (tvb, subtree, offset, &tag_no, &tag_info, &lvt);
-                       offset = fCalendaryEntry (tvb, subtree, offset);
+                               offset = fCalendaryEntry (tvb, subtree, offset);
                                offset += fTagHeaderTree (tvb, subtree, offset, &tag_no, &tag_info, &lvt);
-            }
+                       }
                        break;
                case 1: /* calendarReference */
                        offset = fObjectIdentifier (tvb, pinfo, subtree, offset);
@@ -8323,12 +8323,12 @@ fSegmentAckPDU(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *bacapp_tree, g
 
 static guint fContextTaggedError(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
-    guint8 tag_info = 0;
-    guint8 parsed_tag = 0;
-    guint32 lvt = 0;
-    offset += fTagHeaderTree(tvb, tree, offset, &parsed_tag, &tag_info, &lvt);
-    offset = fError(tvb, pinfo, tree, offset);
-    return offset + fTagHeaderTree(tvb, tree, offset, &parsed_tag, &tag_info, &lvt);
+       guint8 tag_info = 0;
+       guint8 parsed_tag = 0;
+       guint32 lvt = 0;
+       offset += fTagHeaderTree(tvb, tree, offset, &parsed_tag, &tag_info, &lvt);
+       offset = fError(tvb, pinfo, tree, offset);
+       return offset + fTagHeaderTree(tvb, tree, offset, &parsed_tag, &tag_info, &lvt);
 }
 
 static guint
@@ -8356,7 +8356,7 @@ fConfirmedPrivateTransferError(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
                        break;
                case 3: /* errorParameters */
                        if (tag_is_opening(tag_info)) {
-                               tt = proto_tree_add_text(subtree, tvb, offset, 1, 
+                               tt = proto_tree_add_text(subtree, tvb, offset, 1,
                                        "error Parameters");
                                subtree = proto_item_add_subtree(tt, ett_bacapp_value);
                                propertyIdentifier = -1;
@@ -8457,36 +8457,36 @@ fWritePropertyMultipleError(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
 static guint
 fError (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
 {
-    offset = fApplicationTypesEnumeratedSplit (tvb, pinfo, tree, offset,
-               "error Class: ", BACnetErrorClass, 64);
-    return fApplicationTypesEnumeratedSplit (tvb, pinfo, tree, offset,
-               "error Code: ", BACnetErrorCode, 256);
+       offset = fApplicationTypesEnumeratedSplit (tvb, pinfo, tree, offset,
+                                                  "error Class: ", BACnetErrorClass, 64);
+       return fApplicationTypesEnumeratedSplit (tvb, pinfo, tree, offset,
+                                                "error Code: ", BACnetErrorCode, 256);
 }
 
 static guint
 fBACnetError (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, guint service)
 {
-    switch (service) {
-    case 8:  /* no break here !!!! */
-    case 9:
-        offset = fChangeListError (tvb, pinfo, tree, offset);
-        break;
-    case 10:
-        offset = fCreateObjectError (tvb, pinfo, tree, offset);
-        break;
-    case 16:
-        offset = fWritePropertyMultipleError (tvb, pinfo, tree, offset);
-        break;
-    case 18:
-        offset = fConfirmedPrivateTransferError (tvb,pinfo,tree,offset);
-        break;
-    case 22:
-        offset = fVTCloseError (tvb, pinfo, tree, offset);
-        break;
-    default:
-        return fError (tvb, pinfo, tree, offset);
-    }
-    return offset;
+       switch (service) {
+       case 8:  /* no break here !!!! */
+       case 9:
+               offset = fChangeListError (tvb, pinfo, tree, offset);
+               break;
+       case 10:
+               offset = fCreateObjectError (tvb, pinfo, tree, offset);
+               break;
+       case 16:
+               offset = fWritePropertyMultipleError (tvb, pinfo, tree, offset);
+               break;
+       case 18:
+               offset = fConfirmedPrivateTransferError (tvb,pinfo,tree,offset);
+               break;
+       case 22:
+               offset = fVTCloseError (tvb, pinfo, tree, offset);
+               break;
+       default:
+               return fError (tvb, pinfo, tree, offset);
+       }
+       return offset;
 }
 
 static guint
@@ -8717,7 +8717,7 @@ dissect_bacapp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
                ti = proto_tree_add_item(tree, proto_bacapp, tvb, offset, -1, FALSE);
                bacapp_tree = proto_item_add_subtree(ti, ett_bacapp);
-               
+
                if (!fragment)
                        offset = do_the_dissection(tvb,pinfo,bacapp_tree);
        }
@@ -9027,47 +9027,47 @@ fConvertXXXtoUTF8 (gchar *in, gsize *inbytesleft, gchar *out, gsize *outbyteslef
 static void
 uni_to_string(char * data, gsize str_length, char *dest_buf)
 {
-        gint i;
-        guint16 c_char;
-        gsize length_remaining = 0;
-
-        length_remaining = str_length;
-        dest_buf[0] = '\0';
-        if(str_length == 0)
-        {
-                return;
-        }
-        for ( i = 0; i < (gint) str_length; i++ )
-        {
-                c_char = data[i];
-                if (c_char<0x20 || c_char>0x7e)
-                {
-                        if (c_char != 0x00)
-                        {
-                                c_char = '.';
-                                dest_buf[i] = c_char & 0xff;
-                        }
-                        else
-                        {
-                                i--;
-                                str_length--;
-                        }
-                }
-                else
-                {
-                        dest_buf[i] = c_char & 0xff;
-                }
-                length_remaining--;
-
-                if(length_remaining==0)
-                {
-                        dest_buf[i+1] = '\0';
-                        return;
-                }
-        }
-        if (i < 0) {
-                i = 0;
-        }
-        dest_buf[i] = '\0';
-        return;
+       gint i;
+       guint16 c_char;
+       gsize length_remaining = 0;
+
+       length_remaining = str_length;
+       dest_buf[0] = '\0';
+       if(str_length == 0)
+       {
+               return;
+       }
+       for ( i = 0; i < (gint) str_length; i++ )
+       {
+               c_char = data[i];
+               if (c_char<0x20 || c_char>0x7e)
+               {
+                       if (c_char != 0x00)
+                       {
+                               c_char = '.';
+                               dest_buf[i] = c_char & 0xff;
+                       }
+                       else
+                       {
+                               i--;
+                               str_length--;
+                       }
+               }
+               else
+               {
+                       dest_buf[i] = c_char & 0xff;
+               }
+               length_remaining--;
+
+               if(length_remaining==0)
+               {
+                       dest_buf[i+1] = '\0';
+                       return;
+               }
+       }
+       if (i < 0) {
+               i = 0;
+       }
+       dest_buf[i] = '\0';
+       return;
 }
index 96e827851115da0e1eb31ce8241cc1bf8ef3c68a..00efd295bc2599bca694135202fbc2b79626bd62 100644 (file)
@@ -203,7 +203,7 @@ static gint ett_bfd_auth = -1;
  *    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  *    |                              ...                              |
  *    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- *      
+ *
  *    The format for Keyed MD5 and Meticulous Keyed MD5 authentication is:
  *     0                   1                   2                   3
  *     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
@@ -230,27 +230,28 @@ static gint ett_bfd_auth = -1;
  *    |                              ...                              |
  *    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  *
- *                          
+ *
  */
 
 
 /* Given the type of authentication being used, return the required length of
  * the authentication header
  */
-static guint8 get_bfd_required_auth_len(guint8 auth_type) 
+static guint8 get_bfd_required_auth_len(guint8 auth_type)
 {
     guint8 auth_len = 0;
+
     switch (auth_type) {
-       case BFD_AUTH_MD5:
-       case BFD_AUTH_MET_MD5:
-           auth_len = MD5_AUTH_LEN;
-           break;
-       case BFD_AUTH_SHA1:
-       case BFD_AUTH_MET_SHA1:
-           auth_len = SHA1_AUTH_LEN;
-           break;
-       default:
-           break;
+        case BFD_AUTH_MD5:
+        case BFD_AUTH_MET_MD5:
+            auth_len = MD5_AUTH_LEN;
+            break;
+        case BFD_AUTH_SHA1:
+        case BFD_AUTH_MET_SHA1:
+            auth_len = SHA1_AUTH_LEN;
+            break;
+        default:
+            break;
     }
     return auth_len;
 }
@@ -258,20 +259,20 @@ static guint8 get_bfd_required_auth_len(guint8 auth_type)
 /* Given the type of authentication being used, return the length of
  * checksum field
  */
-static guint8 get_bfd_checksum_len(guint8 auth_type) 
+static guint8 get_bfd_checksum_len(guint8 auth_type)
 {
     guint8 checksum_len = 0;
     switch (auth_type) {
-       case BFD_AUTH_MD5:
-       case BFD_AUTH_MET_MD5:
-           checksum_len = MD5_CHECKSUM_LEN;
-           break;
-       case BFD_AUTH_SHA1:
-       case BFD_AUTH_MET_SHA1:
-           checksum_len = SHA1_CHECKSUM_LEN;
-           break;
-       default:
-           break;
+        case BFD_AUTH_MD5:
+        case BFD_AUTH_MET_MD5:
+            checksum_len = MD5_CHECKSUM_LEN;
+            break;
+        case BFD_AUTH_SHA1:
+        case BFD_AUTH_MET_SHA1:
+            checksum_len = SHA1_CHECKSUM_LEN;
+            break;
+        default:
+            break;
     }
     return checksum_len;
 }
@@ -301,7 +302,7 @@ static void dissect_bfd_authentication(tvbuff_t *tvb, packet_info *pinfo, proto_
     proto_tree_add_item(auth_tree, hf_bfd_auth_key, tvb, offset + 2, 1, FALSE);
 
     switch (auth_type) {
-       case BFD_AUTH_SIMPLE: 
+       case BFD_AUTH_SIMPLE:
            password = tvb_get_ephemeral_string(tvb, offset+3, auth_len-3);
            proto_tree_add_string(auth_tree, hf_bfd_auth_password, tvb, offset+3,
                    auth_len-3, password);
@@ -360,31 +361,31 @@ static void dissect_bfd_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
     proto_tree *bfd_flags_tree;
 
     const char *sep;
-    
+
     col_set_str(pinfo->cinfo, COL_PROTOCOL, "BFD Control");
     col_clear(pinfo->cinfo, COL_INFO);
 
     bfd_version = ((tvb_get_guint8(tvb, 0) & 0xe0) >> 5);
     bfd_diag = (tvb_get_guint8(tvb, 0) & 0x1f);
     switch (bfd_version) {
-    case 0:
-       bfd_flags = tvb_get_guint8(tvb, 1 );
-        bfd_flags_h = (tvb_get_guint8(tvb, 1) & 0x80);
-        bfd_flags_d_v0 = (tvb_get_guint8(tvb, 1) & 0x40);
-        bfd_flags_p_v0 = (tvb_get_guint8(tvb, 1) & 0x20);
-        bfd_flags_f_v0 = (tvb_get_guint8(tvb, 1) & 0x10);
-       break;
-    case 1:
-    default:
-       bfd_sta = (tvb_get_guint8(tvb, 1) & 0xc0);
-        bfd_flags = (tvb_get_guint8(tvb, 1) & 0x3e);
-        bfd_flags_p = (tvb_get_guint8(tvb, 1) & 0x20);
-        bfd_flags_f = (tvb_get_guint8(tvb, 1) & 0x10);
-        bfd_flags_c = (tvb_get_guint8(tvb, 1) & 0x08);
-        bfd_flags_a = (tvb_get_guint8(tvb, 1) & 0x04);
-        bfd_flags_d = (tvb_get_guint8(tvb, 1) & 0x02);
-        bfd_flags_m = (tvb_get_guint8(tvb, 1) & 0x01);
-       break;
+        case 0:
+            bfd_flags = tvb_get_guint8(tvb, 1 );
+            bfd_flags_h = (tvb_get_guint8(tvb, 1) & 0x80);
+            bfd_flags_d_v0 = (tvb_get_guint8(tvb, 1) & 0x40);
+            bfd_flags_p_v0 = (tvb_get_guint8(tvb, 1) & 0x20);
+            bfd_flags_f_v0 = (tvb_get_guint8(tvb, 1) & 0x10);
+            break;
+        case 1:
+        default:
+            bfd_sta = (tvb_get_guint8(tvb, 1) & 0xc0);
+            bfd_flags = (tvb_get_guint8(tvb, 1) & 0x3e);
+            bfd_flags_p = (tvb_get_guint8(tvb, 1) & 0x20);
+            bfd_flags_f = (tvb_get_guint8(tvb, 1) & 0x10);
+            bfd_flags_c = (tvb_get_guint8(tvb, 1) & 0x08);
+            bfd_flags_a = (tvb_get_guint8(tvb, 1) & 0x04);
+            bfd_flags_d = (tvb_get_guint8(tvb, 1) & 0x02);
+            bfd_flags_m = (tvb_get_guint8(tvb, 1) & 0x01);
+            break;
     }
     bfd_detect_time_multiplier = tvb_get_guint8(tvb, 2);
     bfd_length = tvb_get_guint8(tvb, 3);
@@ -397,18 +398,18 @@ static void dissect_bfd_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
 
     if (check_col(pinfo->cinfo, COL_INFO)) {
        switch (bfd_version) {
-       case 0:
-            col_add_fstr(pinfo->cinfo, COL_INFO, "Diag: %s, Flags: 0x%02x",
-                     val_to_str(bfd_diag, bfd_control_v0_diag_values, "UNKNOWN"),
-                     bfd_flags);
-           break;
-       case 1:
-       default:
-            col_add_fstr(pinfo->cinfo, COL_INFO, "Diag: %s, State: %s, Flags: 0x%02x",
-                     val_to_str(bfd_diag, bfd_control_v1_diag_values, "UNKNOWN"),
-                     val_to_str(bfd_sta >> 6 , bfd_control_sta_values, "UNKNOWN"),
-                     bfd_flags);
-           break;
+            case 0:
+                col_add_fstr(pinfo->cinfo, COL_INFO, "Diag: %s, Flags: 0x%02x",
+                             val_to_str(bfd_diag, bfd_control_v0_diag_values, "UNKNOWN"),
+                             bfd_flags);
+                break;
+            case 1:
+            default:
+                col_add_fstr(pinfo->cinfo, COL_INFO, "Diag: %s, State: %s, Flags: 0x%02x",
+                             val_to_str(bfd_diag, bfd_control_v1_diag_values, "UNKNOWN"),
+                             val_to_str(bfd_sta >> 6 , bfd_control_sta_values, "UNKNOWN"),
+                             bfd_flags);
+                break;
        }
     }
 
@@ -425,57 +426,57 @@ static void dissect_bfd_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
                                  1, bfd_diag);
 
        switch (bfd_version) {
-       case 0:
-           break;
-       case 1:
-       default:
-            proto_tree_add_uint(bfd_tree, hf_bfd_sta, tvb, 1,
-                                1, bfd_sta);
-           
-           break;
+            case 0:
+                break;
+            case 1:
+            default:
+                proto_tree_add_uint(bfd_tree, hf_bfd_sta, tvb, 1,
+                                    1, bfd_sta);
+
+                break;
        }
        switch (bfd_version) {
-       case 0:
-            ti = proto_tree_add_text ( bfd_tree, tvb, 1, 1, "Message Flags: 0x%02x",
-                                      bfd_flags);
-           bfd_flags_tree = proto_item_add_subtree(ti, ett_bfd_flags);
-           proto_tree_add_boolean(bfd_flags_tree, hf_bfd_flags_h, tvb, 1, 1, bfd_flags_h);
-           proto_tree_add_boolean(bfd_flags_tree, hf_bfd_flags_d_v0, tvb, 1, 1, bfd_flags_d_v0);
-           proto_tree_add_boolean(bfd_flags_tree, hf_bfd_flags_p_v0, tvb, 1, 1, bfd_flags_p_v0);
-           proto_tree_add_boolean(bfd_flags_tree, hf_bfd_flags_f_v0, tvb, 1, 1, bfd_flags_f_v0);
-
-           sep = initial_sep;
-           APPEND_BOOLEAN_FLAG(bfd_flags_h, ti, "%sH");
-           APPEND_BOOLEAN_FLAG(bfd_flags_d_v0, ti, "%sD");
-           APPEND_BOOLEAN_FLAG(bfd_flags_p_v0, ti, "%sP");
-           APPEND_BOOLEAN_FLAG(bfd_flags_f_v0, ti, "%sF");
-           if (sep != initial_sep) {
-               proto_item_append_text (ti, ")");
-           }
-           break;
-       case 1:
-       default:
-            ti = proto_tree_add_text ( bfd_tree, tvb, 1, 1, "Message Flags: 0x%02x",
-                                      bfd_flags);
-           bfd_flags_tree = proto_item_add_subtree(ti, ett_bfd_flags);
-           proto_tree_add_boolean(bfd_flags_tree, hf_bfd_flags_p, tvb, 1, 1, bfd_flags_p);
-           proto_tree_add_boolean(bfd_flags_tree, hf_bfd_flags_f, tvb, 1, 1, bfd_flags_f);
-           proto_tree_add_boolean(bfd_flags_tree, hf_bfd_flags_c, tvb, 1, 1, bfd_flags_c);
-           proto_tree_add_boolean(bfd_flags_tree, hf_bfd_flags_a, tvb, 1, 1, bfd_flags_a);
-           proto_tree_add_boolean(bfd_flags_tree, hf_bfd_flags_d, tvb, 1, 1, bfd_flags_d);
-           proto_tree_add_boolean(bfd_flags_tree, hf_bfd_flags_m, tvb, 1, 1, bfd_flags_m);
-
-           sep = initial_sep;
-           APPEND_BOOLEAN_FLAG(bfd_flags_p, ti, "%sP");
-           APPEND_BOOLEAN_FLAG(bfd_flags_f, ti, "%sF");
-           APPEND_BOOLEAN_FLAG(bfd_flags_c, ti, "%sC");
-           APPEND_BOOLEAN_FLAG(bfd_flags_a, ti, "%sA");
-           APPEND_BOOLEAN_FLAG(bfd_flags_d, ti, "%sD");
-           APPEND_BOOLEAN_FLAG(bfd_flags_m, ti, "%sM");
-           if (sep != initial_sep) {
-               proto_item_append_text (ti, ")");
-           }
-           break;
+            case 0:
+                ti = proto_tree_add_text ( bfd_tree, tvb, 1, 1, "Message Flags: 0x%02x",
+                                           bfd_flags);
+                bfd_flags_tree = proto_item_add_subtree(ti, ett_bfd_flags);
+                proto_tree_add_boolean(bfd_flags_tree, hf_bfd_flags_h, tvb, 1, 1, bfd_flags_h);
+                proto_tree_add_boolean(bfd_flags_tree, hf_bfd_flags_d_v0, tvb, 1, 1, bfd_flags_d_v0);
+                proto_tree_add_boolean(bfd_flags_tree, hf_bfd_flags_p_v0, tvb, 1, 1, bfd_flags_p_v0);
+                proto_tree_add_boolean(bfd_flags_tree, hf_bfd_flags_f_v0, tvb, 1, 1, bfd_flags_f_v0);
+
+                sep = initial_sep;
+                APPEND_BOOLEAN_FLAG(bfd_flags_h, ti, "%sH");
+                APPEND_BOOLEAN_FLAG(bfd_flags_d_v0, ti, "%sD");
+                APPEND_BOOLEAN_FLAG(bfd_flags_p_v0, ti, "%sP");
+                APPEND_BOOLEAN_FLAG(bfd_flags_f_v0, ti, "%sF");
+                if (sep != initial_sep) {
+                    proto_item_append_text (ti, ")");
+                }
+                break;
+            case 1:
+            default:
+                ti = proto_tree_add_text ( bfd_tree, tvb, 1, 1, "Message Flags: 0x%02x",
+                                           bfd_flags);
+                bfd_flags_tree = proto_item_add_subtree(ti, ett_bfd_flags);
+                proto_tree_add_boolean(bfd_flags_tree, hf_bfd_flags_p, tvb, 1, 1, bfd_flags_p);
+                proto_tree_add_boolean(bfd_flags_tree, hf_bfd_flags_f, tvb, 1, 1, bfd_flags_f);
+                proto_tree_add_boolean(bfd_flags_tree, hf_bfd_flags_c, tvb, 1, 1, bfd_flags_c);
+                proto_tree_add_boolean(bfd_flags_tree, hf_bfd_flags_a, tvb, 1, 1, bfd_flags_a);
+                proto_tree_add_boolean(bfd_flags_tree, hf_bfd_flags_d, tvb, 1, 1, bfd_flags_d);
+                proto_tree_add_boolean(bfd_flags_tree, hf_bfd_flags_m, tvb, 1, 1, bfd_flags_m);
+
+                sep = initial_sep;
+                APPEND_BOOLEAN_FLAG(bfd_flags_p, ti, "%sP");
+                APPEND_BOOLEAN_FLAG(bfd_flags_f, ti, "%sF");
+                APPEND_BOOLEAN_FLAG(bfd_flags_c, ti, "%sC");
+                APPEND_BOOLEAN_FLAG(bfd_flags_a, ti, "%sA");
+                APPEND_BOOLEAN_FLAG(bfd_flags_d, ti, "%sD");
+                APPEND_BOOLEAN_FLAG(bfd_flags_m, ti, "%sM");
+                if (sep != initial_sep) {
+                    proto_item_append_text (ti, ")");
+                }
+                break;
        }
 
         proto_tree_add_uint_format_value(bfd_tree, hf_bfd_detect_time_multiplier, tvb, 2,
@@ -486,7 +487,7 @@ static void dissect_bfd_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
 
        proto_tree_add_uint_format_value(bfd_tree, hf_bfd_message_length, tvb, 3, 1, bfd_length,
                "%u bytes", bfd_length);
-        
+
         proto_tree_add_uint(bfd_tree, hf_bfd_my_discriminator, tvb, 4,
                                  4, bfd_my_discriminator);
 
@@ -577,13 +578,13 @@ void proto_register_bfd(void)
         { &hf_bfd_flags_p,
           { "Poll", "bfd.flags.p",
             FT_BOOLEAN, 6, TFS(&tfs_set_notset), 0x20,
-            "If set, the transmitting system is expecting a packet with the Final (F) bit in reply", 
+            "If set, the transmitting system is expecting a packet with the Final (F) bit in reply",
            HFILL }
         },
         { &hf_bfd_flags_f,
           { "Final", "bfd.flags.f",
             FT_BOOLEAN, 6, TFS(&tfs_set_notset), 0x10,
-            "If set, the transmitting system is replying to a packet with the Poll (P) bit set", 
+            "If set, the transmitting system is replying to a packet with the Poll (P) bit set",
            HFILL }
         },
         { &hf_bfd_flags_c,
index d666f2a8c19b83f5761cfe93bcbc91df34eb3336..30c1e91f01d113e1e3dc7f0a8d02db4ff1ef2275 100644 (file)
@@ -1342,7 +1342,7 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, int voff,
                        /* otherwise, it's opaque data */
                }
                break;
-               
+
        case 97:        /* Client Identifier (UUID) */
                if (optlen > 0)
                        byte = tvb_get_guint8(tvb, optoff);
@@ -2074,7 +2074,7 @@ bootp_dhcp_decode_agent_info(proto_tree *v_tree, tvbuff_t *tvb, int optoff,
        proto_item *vti;
        proto_tree *subtree = 0;
        guint8 tag, tag_len;
-       
+
        subopt = tvb_get_guint8(tvb, optoff);
        suboptoff++;
 
@@ -2395,7 +2395,7 @@ rfc3825_lci_to_fixpoint(const unsigned char lci[16], struct rfc3825_location_fix
                fixpoint->latitude = (((gint64)lci[0] & 3)<<32) | ((gint64)lci[1]<<24) | 
                                           ((gint64)lci[2]<<16) | ((gint64)lci[3]<<8)  | 
                                            (gint64)lci[4]      | ((gint64)0x3FFFFFFF<<34);
-               
+
        } else {
                /* Latitude is positive */
                fixpoint->latitude = (((gint64)lci[0] & 3)<<32) | ((gint64)lci[1]<<24) | 
@@ -2408,7 +2408,7 @@ rfc3825_lci_to_fixpoint(const unsigned char lci[16], struct rfc3825_location_fix
                fixpoint->longitude = (((gint64)lci[5] & 3)<<32) | ((gint64)lci[6]<<24) | 
                                            ((gint64)lci[7]<<16) | ((gint64)lci[8]<<8)  | 
                                             (gint64)lci[9]      | ((gint64)0x3FFFFFFF<<34);
-               
+
        } else {
                /* Longitude is positive */
                fixpoint->longitude = (((gint64)lci[5] & 3)<<32) | ((gint64)lci[6]<<24) | 
@@ -2422,7 +2422,7 @@ rfc3825_lci_to_fixpoint(const unsigned char lci[16], struct rfc3825_location_fix
                fixpoint->altitude = (((gint32)lci[11] & 0x3F)<<24) | ((gint32)lci[12]<<16) | 
                                     ((gint32)lci[13]<<8) | ((gint32)lci[14]) | 
                                      ((gint32)0x03<<30);
-               
+
        } else {
                /* Altitudee is positive */
                fixpoint->altitude = (((gint32)lci[11] & 0x3F)<<24) | ((gint32)lci[12]<<16) | 
@@ -2994,7 +2994,7 @@ dissect_vendor_cl_suboption(proto_tree *v_tree, tvbuff_t *tvb,
                                tvb_bytes_to_str(tvb, suboptoff, subopt_len),
                                subopt_len, plurality(subopt_len, "", "s"));
                        break;
-               
+
                case ipv4_list: 
                        ti = proto_tree_add_text(v_tree, tvb, optoff, 2,
                                        "Suboption %d %s", subopt, o125_cl_opt[subopt].text);
@@ -4581,7 +4581,7 @@ proto_register_bootp(void)
 
        /* register init routine to setup the custom bootp options */
        register_init_routine(&bootp_init_protocol);
-  
+
        /* Allow dissector to find be found by name. */
        register_dissector("bootp", dissect_bootp, proto_bootp);
 
index 34fd4ee0da251f0126f5cf1fab11244957e90212..8e9cd94791bcbda70e687e29c64290297e0e9d01 100644 (file)
@@ -160,8 +160,8 @@ static dissector_handle_t gmrp_handle;
 static dissector_handle_t data_handle;
 
 static const value_string protocol_id_vals[] = {
-       { 0, "Spanning Tree Protocol" },
-       { 0, NULL }
+  { 0, "Spanning Tree Protocol" },
+  { 0, NULL }
 };
 
 #define BPDU_TYPE_CONF                 0x00    /* STP Configuration BPDU */
@@ -169,10 +169,10 @@ static const value_string protocol_id_vals[] = {
 #define BPDU_TYPE_TOPOLOGY_CHANGE      0x80    /* STP TCN (Topology change notify) BPDU */
 
 static const value_string bpdu_type_vals[] = {
-       { BPDU_TYPE_CONF,            "Configuration" },
-       { BPDU_TYPE_RST,             "Rapid/Multiple Spanning Tree" },
-       { BPDU_TYPE_TOPOLOGY_CHANGE, "Topology Change Notification" },
-       { 0,                         NULL }
+  { BPDU_TYPE_CONF,            "Configuration" },
+  { BPDU_TYPE_RST,             "Rapid/Multiple Spanning Tree" },
+  { BPDU_TYPE_TOPOLOGY_CHANGE, "Topology Change Notification" },
+  { 0,                         NULL }
 };
 
 #define PROTO_VERSION_STP      0
@@ -184,27 +184,27 @@ static const value_string bpdu_type_vals[] = {
 #define MSTI_FORMAT_ALTERNATIVE        2
 
 static const value_string version_id_vals[] = {
-       { PROTO_VERSION_STP,    "Spanning Tree" },
-       { PROTO_VERSION_RSTP,   "Rapid Spanning Tree" },
-       { PROTO_VERSION_MSTP,   "Multiple Spanning Tree" },
-       { 0,                    NULL}
+  { PROTO_VERSION_STP, "Spanning Tree" },
+  { PROTO_VERSION_RSTP,        "Rapid Spanning Tree" },
+  { PROTO_VERSION_MSTP,        "Multiple Spanning Tree" },
+  { 0,                 NULL}
 };
 static const value_string role_vals[] = {
-       { 1, "Alternate or Backup" },
-       { 2, "Root" },
-       { 3, "Designated" },
-       { 0, NULL }
+  { 1, "Alternate or Backup" },
+  { 2, "Root" },
+  { 3, "Designated" },
+  { 0, NULL }
 };
 
 static const char initial_sep[] = " (";
 static const char cont_sep[] = ", ";
 
-#define APPEND_BOOLEAN_FLAG(flag, item, string) \
-       if(flag){                                                       \
-               if(item)                                                \
-                       proto_item_append_text(item, string, sep);      \
-               sep = cont_sep;                                         \
-       }
+#define APPEND_BOOLEAN_FLAG(flag, item, string)         \
+  if(flag){                                             \
+    if(item)                                           \
+      proto_item_append_text(item, string, sep);       \
+    sep = cont_sep;                                     \
+  }
 
 static void
 dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
@@ -241,7 +241,7 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   guint16 msti_bridge_identifier_priority, msti_port_identifier_priority;
   const guint8  *msti_bridge_identifier_mac;
   gchar   *msti_bridge_identifier_mac_str;
-  int  total_msti_length, offset, msti, msti_format;
+  int   total_msti_length, offset, msti, msti_format;
 
   proto_tree *bpdu_tree;
   proto_tree *mstp_tree, *msti_tree;
@@ -655,14 +655,14 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
          msti_format = MSTI_FORMAT_UNKNOWN;
          total_msti_length = 0;
        }
-         
+
       }
       set_actual_length(tvb, BPDU_MSTI + total_msti_length);
 
       mstp_item = proto_tree_add_text(bpdu_tree, tvb, BPDU_VERSION_3_LENGTH,
                                       -1, "MST Extension");
       mstp_tree = proto_item_add_subtree(mstp_item, ett_mstp);
-                                      
+
       proto_tree_add_item(mstp_tree, hf_bpdu_mst_config_format_selector, tvb,
                           BPDU_MST_CONFIG_FORMAT_SELECTOR, 1, FALSE);
       proto_tree_add_item(mstp_tree, hf_bpdu_mst_config_name, tvb,
@@ -864,7 +864,7 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
          proto_tree_add_uint(msti_tree, hf_bpdu_msti_port_identifier_priority, tvb,
                              offset+MSTI_PORT_IDENTIFIER_PRIORITY, 1,
                              msti_port_identifier_priority);
-                     
+
          proto_tree_add_item(msti_tree, hf_bpdu_msti_remaining_hops, tvb,
                              offset + MSTI_REMAINING_HOPS, 1, FALSE);
 
@@ -957,7 +957,7 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
          msti_port_identifier_priority = tvb_get_ntohs(tvb, offset+ALT_MSTI_PORT_IDENTIFIER);
          proto_tree_add_uint(msti_tree, hf_bpdu_msti_port_id, tvb, 
                              offset+ALT_MSTI_PORT_IDENTIFIER, 2, msti_port_identifier_priority);
+
          proto_tree_add_item(msti_tree, hf_bpdu_msti_remaining_hops, tvb,
                              offset + ALT_MSTI_REMAINING_HOPS, 1, FALSE);
 
index 994bc7db8a5d2d598124b588aa93eceb85161698..588f14a893b72f5b65fc438733ee3c5809ac4233 100644 (file)
 #define BRDWLK_HAS_PLEN        0x1
 
 #define FCM_DELIM_SOFC1         0x01
-#define FCM_DELIM_SOFI1                0x02
-#define FCM_DELIM_SOFI2                0x04
-#define FCM_DELIM_SOFI3                0x06
-#define FCM_DELIM_SOFN1                0x03
-#define FCM_DELIM_SOFN2                0x05
-#define FCM_DELIM_SOFN3                0x07
-#define FCM_DELIM_SOFF         0x08
+#define FCM_DELIM_SOFI1         0x02
+#define FCM_DELIM_SOFI2         0x04
+#define FCM_DELIM_SOFI3         0x06
+#define FCM_DELIM_SOFN1         0x03
+#define FCM_DELIM_SOFN2         0x05
+#define FCM_DELIM_SOFN3         0x07
+#define FCM_DELIM_SOFF          0x08
 #define FCM_DELIM_SOFC4         0x09
 #define FCM_DELIM_SOFI4         0x0A
 #define FCM_DELIM_SOFN4         0x0B
 
-#define FCM_DELIM_EOFT         0x01
-#define FCM_DELIM_EOFDT                0x02
-#define FCM_DELIM_EOFN         0x03
-#define FCM_DELIM_EOFA         0x04
+#define FCM_DELIM_EOFT          0x01
+#define FCM_DELIM_EOFDT         0x02
+#define FCM_DELIM_EOFN          0x03
+#define FCM_DELIM_EOFA          0x04
 #define FCM_DELIM_EOFNI         0x07
 #define FCM_DELIM_EOFDTI        0x06
 #define FCM_DELIM_EOFRT         0x0A
@@ -118,100 +118,100 @@ static dissector_handle_t fc_dissector_handle;
 
 
 static const true_false_string tfs_error_plp = {
-       "Packet Length is PRESENT",
-       "Packet length is NOT present"
+    "Packet Length is PRESENT",
+    "Packet length is NOT present"
 };
 static const true_false_string tfs_error_ef = {
-       "This is an Empty Frame",
-       "Frame is NOT empty"
+    "This is an Empty Frame",
+    "Frame is NOT empty"
 };
 static const true_false_string tfs_error_nd = {
-       "This Frame has NO Data",
-       "This frame carries data"
+    "This Frame has NO Data",
+    "This frame carries data"
 };
 static const true_false_string tfs_error_tr = {
-       "This frame is TRUNCATED",
-       "This frame is NOT truncated"
+    "This frame is TRUNCATED",
+    "This frame is NOT truncated"
 };
 static const true_false_string tfs_error_crc = {
-       "This Frame has a BAD FC CRC",
-       "This frame has a valid crc"
+    "This Frame has a BAD FC CRC",
+    "This frame has a valid crc"
 };
 static const true_false_string tfs_error_ff = {
-       "Fifo is Full",
-       "Fifo is NOT full"
+    "Fifo is Full",
+    "Fifo is NOT full"
 };
 static const true_false_string tfs_error_jumbo = {
-       "This is a JUMBO FC Frame",
-       "This is a NORMAL FC Frame"
+    "This is a JUMBO FC Frame",
+    "This is a NORMAL FC Frame"
 };
 static const true_false_string tfs_error_ctrl = {
-       "Ctrl Characters inside the frame",
-       "No ctrl chars inside the frame"
+    "Ctrl Characters inside the frame",
+    "No ctrl chars inside the frame"
 };
 
 static void
 dissect_brdwlk_err(proto_tree *parent_tree, tvbuff_t *tvb, int offset)
 {
-       proto_item *item=NULL;
-       proto_tree *tree=NULL;
-       guint8 flags;
-
-       flags = tvb_get_guint8 (tvb, offset);
-       if(parent_tree){
-               item=proto_tree_add_uint(parent_tree, hf_brdwlk_error, 
-                               tvb, offset, 1, flags);
-               tree=proto_item_add_subtree(item, ett_brdwlk_error);
-       }
-
-
-       proto_tree_add_boolean(tree, hf_brdwlk_error_plp, tvb, offset, 1, flags);
-       if (flags&0x01){
-               proto_item_append_text(item, "  Packet Length Present");
-       }
-       flags&=(~( 0x01 ));
-
-       proto_tree_add_boolean(tree, hf_brdwlk_error_ef, tvb, offset, 1, flags);
-       if (flags&0x02){
-               proto_item_append_text(item, "  Empty Frame");
-       }
-       flags&=(~( 0x02 ));
-
-       proto_tree_add_boolean(tree, hf_brdwlk_error_nd, tvb, offset, 1, flags);
-       if (flags&0x04){
-               proto_item_append_text(item, "  No Data");
-       }
-       flags&=(~( 0x04 ));
-
-       proto_tree_add_boolean(tree, hf_brdwlk_error_tr, tvb, offset, 1, flags);
-       if (flags&0x08){
-               proto_item_append_text(item, "  Truncated");
-       }
-       flags&=(~( 0x08 ));
-
-       proto_tree_add_boolean(tree, hf_brdwlk_error_badcrc, tvb, offset, 1, flags);
-       if (flags&0x10){
-               proto_item_append_text(item, "  Bad FC CRC");
-       }
-       flags&=(~( 0x10 ));
-
-       proto_tree_add_boolean(tree, hf_brdwlk_error_ff, tvb, offset, 1, flags);
-       if (flags&0x20){
-               proto_item_append_text(item, "  Fifo Full");
-       }
-       flags&=(~( 0x20 ));
-
-       proto_tree_add_boolean(tree, hf_brdwlk_error_jumbo, tvb, offset, 1, flags);
-       if (flags&0x40){
-               proto_item_append_text(item, "  Jumbo FC Frame");
-       }
-       flags&=(~( 0x40 ));
-
-       proto_tree_add_boolean(tree, hf_brdwlk_error_ctrl, tvb, offset, 1, flags);
-       if (flags&0x80){
-               proto_item_append_text(item, "  Ctrl Char Inside Frame");
-       }
-       flags&=(~( 0x80 ));
+    proto_item *item=NULL;
+    proto_tree *tree=NULL;
+    guint8 flags;
+
+    flags = tvb_get_guint8 (tvb, offset);
+    if(parent_tree){
+        item=proto_tree_add_uint(parent_tree, hf_brdwlk_error, 
+                                 tvb, offset, 1, flags);
+        tree=proto_item_add_subtree(item, ett_brdwlk_error);
+    }
+
+
+    proto_tree_add_boolean(tree, hf_brdwlk_error_plp, tvb, offset, 1, flags);
+    if (flags&0x01){
+        proto_item_append_text(item, "  Packet Length Present");
+    }
+    flags&=(~( 0x01 ));
+
+    proto_tree_add_boolean(tree, hf_brdwlk_error_ef, tvb, offset, 1, flags);
+    if (flags&0x02){
+        proto_item_append_text(item, "  Empty Frame");
+    }
+    flags&=(~( 0x02 ));
+
+    proto_tree_add_boolean(tree, hf_brdwlk_error_nd, tvb, offset, 1, flags);
+    if (flags&0x04){
+        proto_item_append_text(item, "  No Data");
+    }
+    flags&=(~( 0x04 ));
+
+    proto_tree_add_boolean(tree, hf_brdwlk_error_tr, tvb, offset, 1, flags);
+    if (flags&0x08){
+        proto_item_append_text(item, "  Truncated");
+    }
+    flags&=(~( 0x08 ));
+
+    proto_tree_add_boolean(tree, hf_brdwlk_error_badcrc, tvb, offset, 1, flags);
+    if (flags&0x10){
+        proto_item_append_text(item, "  Bad FC CRC");
+    }
+    flags&=(~( 0x10 ));
+
+    proto_tree_add_boolean(tree, hf_brdwlk_error_ff, tvb, offset, 1, flags);
+    if (flags&0x20){
+        proto_item_append_text(item, "  Fifo Full");
+    }
+    flags&=(~( 0x20 ));
+
+    proto_tree_add_boolean(tree, hf_brdwlk_error_jumbo, tvb, offset, 1, flags);
+    if (flags&0x40){
+        proto_item_append_text(item, "  Jumbo FC Frame");
+    }
+    flags&=(~( 0x40 ));
+
+    proto_tree_add_boolean(tree, hf_brdwlk_error_ctrl, tvb, offset, 1, flags);
+    if (flags&0x80){
+        proto_item_append_text(item, "  Ctrl Char Inside Frame");
+    }
+    flags&=(~( 0x80 ));
 }
 
 /* Code to actually dissect the packets */
@@ -337,8 +337,8 @@ dissect_brdwlk (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
         }
         packet_count = pkt_cnt;
 
-       error=tvb_get_guint8(tvb, offset+2);           
-       dissect_brdwlk_err(brdwlk_tree, tvb, offset+2);
+        error=tvb_get_guint8(tvb, offset+2);           
+        dissect_brdwlk_err(brdwlk_tree, tvb, offset+2);
 
         eof = tvb_get_guint8 (tvb, offset+3);
         if (eof != FCM_DELIM_EOFN) {
index 0e5971e185c31cd815ead34b039e1f43934b2580..9a24ec4ab98e729ea978d7e424d107c584de65e1 100644 (file)
@@ -1,8 +1,8 @@
 /* packet-bssap.c
  * Routines for Base Station Subsystem Application Part (BSSAP/BSAP) dissection
  * Specifications from 3GPP2 (www.3gpp2.org) and 3GPP (www.3gpp.org)
- *     IOS 4.0.1 (BSAP)
- *     GSM 08.06 (BSSAP)
+ *  IOS 4.0.1 (BSAP)
+ *  GSM 08.06 (BSSAP)
  *
  * Copyright 2003, Michael Lum <mlum [AT] telostech.com>
  * In association with Telos Technology Inc.
@@ -72,180 +72,180 @@ void proto_reg_handoff_bssap(void);
 
 /* Same as below but with names typed out */
 static const value_string bssap_pdu_type_values[] = {
-    { BSSAP_PDU_TYPE_BSSMAP,   "BSS Management" },
-    { BSSAP_PDU_TYPE_DTAP,     "Direct Transfer" },
-    { 0,                       NULL } };
+    { BSSAP_PDU_TYPE_BSSMAP,    "BSS Management" },
+    { BSSAP_PDU_TYPE_DTAP,  "Direct Transfer" },
+    { 0,            NULL } };
 
 static const value_string bsap_pdu_type_values[] = {
-    { BSSAP_PDU_TYPE_BSSMAP,   "BS Management" },
-    { BSSAP_PDU_TYPE_DTAP,     "Direct Transfer" },
-    { 0,                       NULL } };
+    { BSSAP_PDU_TYPE_BSSMAP,    "BS Management" },
+    { BSSAP_PDU_TYPE_DTAP,  "Direct Transfer" },
+    { 0,            NULL } };
 
 /* Same as above but in acronym for (for the Info column) */
 static const value_string bssap_pdu_type_acro_values[] = {
-    { BSSAP_PDU_TYPE_BSSMAP,   "BSSMAP" },
-    { BSSAP_PDU_TYPE_DTAP,     "DTAP" },
-    { 0,                       NULL } };
+    { BSSAP_PDU_TYPE_BSSMAP,    "BSSMAP" },
+    { BSSAP_PDU_TYPE_DTAP,  "DTAP" },
+    { 0,            NULL } };
 
 /* Same as above but in acronym for (for the Info column) */
 static const value_string bsap_pdu_type_acro_values[] = {
-    { BSSAP_PDU_TYPE_BSSMAP,   "BSMAP" },
-    { BSSAP_PDU_TYPE_DTAP,     "DTAP" },
-    { 0,                       NULL } };
+    { BSSAP_PDU_TYPE_BSSMAP,    "BSMAP" },
+    { BSSAP_PDU_TYPE_DTAP,  "DTAP" },
+    { 0,            NULL } };
 
-#define PARAMETER_DLCI         0x00
-#define PARAMETER_LENGTH       0x01
-#define PARAMETER_DATA         0x02
+#define PARAMETER_DLCI      0x00
+#define PARAMETER_LENGTH    0x01
+#define PARAMETER_DATA      0x02
 
-#define DLCI_LENGTH            1
-#define LENGTH_LENGTH          1
-#define DATA_LENGTH            1
+#define DLCI_LENGTH     1
+#define LENGTH_LENGTH       1
+#define DATA_LENGTH     1
 
-#define CC_MASK                        0xc0
-#define SPARE_MASK             0x38
-#define SAPI_MASK              0x07
+#define CC_MASK         0xc0
+#define SPARE_MASK      0x38
+#define SAPI_MASK       0x07
 
 static guint global_bssap_ssn = 98;
 
 static const value_string bssap_cc_values[] = {
-    { 0x00,            "not further specified" },
-    { 0x80,            "FACCH or SDCCH" },
-    { 0xc0,            "SACCH" },
-    { 0,               NULL } };
+    { 0x00,     "not further specified" },
+    { 0x80,     "FACCH or SDCCH" },
+    { 0xc0,     "SACCH" },
+    { 0,        NULL } };
 
 static const value_string bsap_cc_values[] = {
-    { 0x00,            "default for TIA/EIA/IS-2000" },
-    { 0,               NULL } };
+    { 0x00,     "default for TIA/EIA/IS-2000" },
+    { 0,        NULL } };
 
 static const value_string bssap_sapi_values[] = {
-    { 0x00,            "RR/MM/CC" },
-    { 0x03,            "SMS" },
-    { 0,               NULL } };
+    { 0x00,     "RR/MM/CC" },
+    { 0x03,     "SMS" },
+    { 0,        NULL } };
 
 static const value_string bsap_sapi_values[] = {
-    { 0x00,            "Not used" },
-    { 0,               NULL } };
-
-#define BSSAP_PAGING_REQUEST                           1
-#define BSSAP_PAGING_REJECT                                    2                                       /*  17.1.18 */
-#define BSSAP_DOWNLINK_TUNNEL_REQUEST          7                                       /*  17.1.4  */
-#define BSSAP_UPLINK_TUNNEL_REQUEST                    8                                       /*  17.1.23 */
-#define BSSAP_LOCATION_UPDATE_REQUEST          9                                       /*  17.1.11 */
-#define BSSAP_LOCATION_UPDATE_ACCEPT           10                                      /*  17.1.9  */
-#define BSSAP_LOCATION_UPDATE_REJECT           11                                      /*  17.1.10 */
-#define BSSAP_TMSI_REALLOCATION_COMPLETE       12                                      /*  17.1.22 */
-#define BSSAP_ALERT_REQUEST                                    13                                      /*  17.1.3  */
-#define BSSAP_ALERT_ACK                                                14                                      /*  17.1.1  */
-#define BSSAP_ALERT_REJECT                                     15                                      /*  17.1.2  */
-#define BSSAP_MS_ACTIVITY_INDICATION           16                                      /*  17.1.14 */
-#define BSSAP_GPRS_DETACH_INDICATION           17                                      /*  17.1.6  */
-#define BSSAP_GPRS_DETACH_ACK                          18                                      /*  17.1.5  */
-#define BSSAP_IMSI_DETACH_INDICATION           19                                      /*  17.1.8  */
-#define BSSAP_IMSI_DETACH_ACK                          20                                      /*  17.1.7  */
-#define BSSAP_RESET_INDICATION                         21                                      /*  17.1.21 */
-#define BSSAP_RESET_ACK                                                22                                      /*  17.1.20 */
-#define BSSAP_MS_INFORMATION_REQUEST           23                                      /*  17.1.15 */
-#define BSSAP_MS_INFORMATION_RESPONSE          24                                      /*  17.1.16 */
-#define BSSAP_MM_INFORMATION_REQUEST           26                                      /*  17.1.12 */
-#define BSSAP_MOBILE_STATUS                                    29                                      /*  17.1.13 */
-#define BSSAP_MS_UNREACHABLE                           31                                      /*  17.1.17 */
+    { 0x00,     "Not used" },
+    { 0,        NULL } };
+
+#define BSSAP_PAGING_REQUEST                1
+#define BSSAP_PAGING_REJECT                 2                   /*  17.1.18 */
+#define BSSAP_DOWNLINK_TUNNEL_REQUEST       7                   /*  17.1.4  */
+#define BSSAP_UPLINK_TUNNEL_REQUEST         8                   /*  17.1.23 */
+#define BSSAP_LOCATION_UPDATE_REQUEST       9                   /*  17.1.11 */
+#define BSSAP_LOCATION_UPDATE_ACCEPT        10                  /*  17.1.9  */
+#define BSSAP_LOCATION_UPDATE_REJECT        11                  /*  17.1.10 */
+#define BSSAP_TMSI_REALLOCATION_COMPLETE    12                  /*  17.1.22 */
+#define BSSAP_ALERT_REQUEST                 13                  /*  17.1.3  */
+#define BSSAP_ALERT_ACK                     14                  /*  17.1.1  */
+#define BSSAP_ALERT_REJECT                  15                  /*  17.1.2  */
+#define BSSAP_MS_ACTIVITY_INDICATION        16                  /*  17.1.14 */
+#define BSSAP_GPRS_DETACH_INDICATION        17                  /*  17.1.6  */
+#define BSSAP_GPRS_DETACH_ACK               18                  /*  17.1.5  */
+#define BSSAP_IMSI_DETACH_INDICATION        19                  /*  17.1.8  */
+#define BSSAP_IMSI_DETACH_ACK               20                  /*  17.1.7  */
+#define BSSAP_RESET_INDICATION              21                  /*  17.1.21 */
+#define BSSAP_RESET_ACK                     22                  /*  17.1.20 */
+#define BSSAP_MS_INFORMATION_REQUEST        23                  /*  17.1.15 */
+#define BSSAP_MS_INFORMATION_RESPONSE       24                  /*  17.1.16 */
+#define BSSAP_MM_INFORMATION_REQUEST        26                  /*  17.1.12 */
+#define BSSAP_MOBILE_STATUS                 29                  /*  17.1.13 */
+#define BSSAP_MS_UNREACHABLE                31                  /*  17.1.17 */
 
 static const value_string bssap_plus_message_type_values[] = {
-    { 0x00,                                                                    "Unassigned: treated as an unknown Message type." },
-    { BSSAP_PAGING_REQUEST,                                    "BSSAP+-PAGING-REQUEST" },                                                              /*  17.1.19 */
-    { BSSAP_PAGING_REJECT,                                     "BSSAP+-PAGING-REJECT" },                                                               /*  17.1.18 */
-    { 0x03,                                                                    "Unassigned: treated as an unknown Message type." },
-    { 0x04,                                                                    "Unassigned: treated as an unknown Message type." },
-    { 0x05,                                                                    "Unassigned: treated as an unknown Message type." },
-    { 0x06,                                                                    "Unassigned: treated as an unknown Message type." },
-    { BSSAP_DOWNLINK_TUNNEL_REQUEST,           "BSSAP+-DOWNLINK-TUNNEL-REQUEST" },                                             /*  17.1.4  */
-    { BSSAP_UPLINK_TUNNEL_REQUEST,                     "BSSAP+-UPLINK-TUNNEL-REQUEST" },                                               /*  17.1.23 */
-    { BSSAP_LOCATION_UPDATE_REQUEST,           "BSSAP+-LOCATION-UPDATE-REQUEST" },                                             /*  17.1.11 */
-    { BSSAP_LOCATION_UPDATE_ACCEPT,                    "BSSAP+-LOCATION-UPDATE-ACCEPT" },                                              /*  17.1.9  */
-    { BSSAP_LOCATION_UPDATE_REJECT,                    "BSSAP+-LOCATION-UPDATE-REJECT" },                                              /*  17.1.10 */
-    { BSSAP_TMSI_REALLOCATION_COMPLETE,                "BSSAP+-TMSI-REALLOCATION-COMPLETE" },                                  /*  17.1.22 */
-    { BSSAP_ALERT_REQUEST,                                     "BSSAP+-ALERT-REQUEST" },                                                               /*  17.1.3  */
-    { BSSAP_ALERT_ACK,                                         "BSSAP+-ALERT-ACK" },                                                                   /*  17.1.1  */
-    { BSSAP_ALERT_REJECT,                                      "BSSAP+-ALERT-REJECT" },                                                                /*  17.1.2  */
-    { BSSAP_MS_ACTIVITY_INDICATION,                    "BSSAP+-MS-ACTIVITY-INDICATION" },                                              /*  17.1.14 */
-    { BSSAP_GPRS_DETACH_INDICATION,                    "BSSAP+-GPRS-DETACH-INDICATION" },                                              /*  17.1.6  */
-    { BSSAP_GPRS_DETACH_ACK,                           "BSSAP+-GPRS-DETACH-ACK" },                                                             /*  17.1.5  */
-    { BSSAP_IMSI_DETACH_INDICATION,                    "BSSAP+-IMSI-DETACH-INDICATION" },                                              /*  17.1.8  */
-    { BSSAP_IMSI_DETACH_ACK,                           "BSSAP+-IMSI-DETACH-ACK" },                                                             /*  17.1.7  */
-    { BSSAP_RESET_INDICATION,                          "BSSAP+-RESET-INDICATION" },                                                    /*  17.1.21 */
-    { BSSAP_RESET_ACK,                                         "BSSAP+-RESET-ACK" },                                                                   /*  17.1.20 */
-    { BSSAP_MS_INFORMATION_REQUEST,                    "BSSAP+-MS-INFORMATION-REQUEST" },                                              /*  17.1.15 */
-    { BSSAP_MS_INFORMATION_RESPONSE,           "BSSAP+-MS-INFORMATION-RESPONSE" },                                             /*  17.1.16 */
-    { 0x19,                                                                    "Unassigned: treated as an unknown Message type." },
-    { BSSAP_MM_INFORMATION_REQUEST,                    "BSSAP+-MM-INFORMATION-REQUEST" },                                              /*  17.1.12 */
-    { BSSAP_MOBILE_STATUS,                                     "BSSAP+-MOBILE-STATUS" },                                                               /*  17.1.13 */
-    { 0x1e,                                                                    "Unassigned: treated as an unknown Message type." },
-    { BSSAP_MS_UNREACHABLE,                                    "BSSAP+-MS-UNREACHABLE" },                                                              /*  17.1.17 */
-    { 0,               NULL }
+    { 0x00,                                 "Unassigned: treated as an unknown Message type." },
+    { BSSAP_PAGING_REQUEST,                 "BSSAP+-PAGING-REQUEST" },                              /*  17.1.19 */
+    { BSSAP_PAGING_REJECT,                  "BSSAP+-PAGING-REJECT" },                               /*  17.1.18 */
+    { 0x03,                                 "Unassigned: treated as an unknown Message type." },
+    { 0x04,                                 "Unassigned: treated as an unknown Message type." },
+    { 0x05,                                 "Unassigned: treated as an unknown Message type." },
+    { 0x06,                                 "Unassigned: treated as an unknown Message type." },
+    { BSSAP_DOWNLINK_TUNNEL_REQUEST,        "BSSAP+-DOWNLINK-TUNNEL-REQUEST" },                     /*  17.1.4  */
+    { BSSAP_UPLINK_TUNNEL_REQUEST,          "BSSAP+-UPLINK-TUNNEL-REQUEST" },                       /*  17.1.23 */
+    { BSSAP_LOCATION_UPDATE_REQUEST,        "BSSAP+-LOCATION-UPDATE-REQUEST" },                     /*  17.1.11 */
+    { BSSAP_LOCATION_UPDATE_ACCEPT,         "BSSAP+-LOCATION-UPDATE-ACCEPT" },                      /*  17.1.9  */
+    { BSSAP_LOCATION_UPDATE_REJECT,         "BSSAP+-LOCATION-UPDATE-REJECT" },                      /*  17.1.10 */
+    { BSSAP_TMSI_REALLOCATION_COMPLETE,     "BSSAP+-TMSI-REALLOCATION-COMPLETE" },                  /*  17.1.22 */
+    { BSSAP_ALERT_REQUEST,                  "BSSAP+-ALERT-REQUEST" },                               /*  17.1.3  */
+    { BSSAP_ALERT_ACK,                      "BSSAP+-ALERT-ACK" },                                   /*  17.1.1  */
+    { BSSAP_ALERT_REJECT,                   "BSSAP+-ALERT-REJECT" },                                /*  17.1.2  */
+    { BSSAP_MS_ACTIVITY_INDICATION,         "BSSAP+-MS-ACTIVITY-INDICATION" },                      /*  17.1.14 */
+    { BSSAP_GPRS_DETACH_INDICATION,         "BSSAP+-GPRS-DETACH-INDICATION" },                      /*  17.1.6  */
+    { BSSAP_GPRS_DETACH_ACK,                "BSSAP+-GPRS-DETACH-ACK" },                             /*  17.1.5  */
+    { BSSAP_IMSI_DETACH_INDICATION,         "BSSAP+-IMSI-DETACH-INDICATION" },                      /*  17.1.8  */
+    { BSSAP_IMSI_DETACH_ACK,                "BSSAP+-IMSI-DETACH-ACK" },                             /*  17.1.7  */
+    { BSSAP_RESET_INDICATION,               "BSSAP+-RESET-INDICATION" },                            /*  17.1.21 */
+    { BSSAP_RESET_ACK,                      "BSSAP+-RESET-ACK" },                                   /*  17.1.20 */
+    { BSSAP_MS_INFORMATION_REQUEST,         "BSSAP+-MS-INFORMATION-REQUEST" },                      /*  17.1.15 */
+    { BSSAP_MS_INFORMATION_RESPONSE,        "BSSAP+-MS-INFORMATION-RESPONSE" },                     /*  17.1.16 */
+    { 0x19,                                 "Unassigned: treated as an unknown Message type." },
+    { BSSAP_MM_INFORMATION_REQUEST,         "BSSAP+-MM-INFORMATION-REQUEST" },                      /*  17.1.12 */
+    { BSSAP_MOBILE_STATUS,                  "BSSAP+-MOBILE-STATUS" },                               /*  17.1.13 */
+    { 0x1e,                                 "Unassigned: treated as an unknown Message type." },
+    { BSSAP_MS_UNREACHABLE,                 "BSSAP+-MS-UNREACHABLE" },                              /*  17.1.17 */
+    { 0,        NULL }
 };
 
-#define BSSAP_IMSI                                             1
-#define BSSAP_VLR_NUMBER                               2
-#define BSSAP_TMSI                                             3
-#define BSSAP_LOC_AREA_ID                              4
-#define BSSAP_CHANNEL_NEEDED                   5
-#define BSSAP_EMLPP_PRIORITY                   6
-#define BSSAP_TMSI_STATUS                              7
-#define BSSAP_GS_CAUSE                                 8
-#define BSSAP_SGSN_NUMBER                              9
-#define BSSAP_GPRS_LOC_UPD_TYPE                        0x0a
-#define BSSAP_GLOBAL_CN_ID                             0x0b
-#define BSSAP_MOBILE_STN_CLS_MRK1              0x0d
-#define BSSAP_MOBILE_ID                                        0x0e
-#define BSSAP_REJECT_CAUSE                             0x0f
-#define BSSAP_IMSI_DET_FROM_GPRS_SERV_TYPE             0x10
-#define BSSAP_IMSI_DET_FROM_NON_GPRS_SERV_TYPE 0x11
-#define BSSAP_INFO_REQ                                 0x12
-#define BSSAP_PTMSI                                            0x13
-#define BSSAP_IMEI                                             0x14
-#define BSSAP_IMEISV                                   0x15
-#define BSSAP_MM_INFORMATION                   0x17
-#define BSSAP_CELL_GBL_ID                              0x18
-#define BSSAP_LOC_INF_AGE                              0x19
-#define BSSAP_MOBILE_STN_STATE                 0x1a
-#define BSSAP_SERVICE_AREA_ID                  0x1e
-#define BSSAP_ERRONEOUS_MSG                            0x1b
-#define BSSAP_DLINK_TNL_PLD_CTR_AND_INF        0x1c
-#define BSSAP_ULINK_TNL_PLD_CTR_AND_INF        0x1d
+#define BSSAP_IMSI                      1
+#define BSSAP_VLR_NUMBER                2
+#define BSSAP_TMSI                      3
+#define BSSAP_LOC_AREA_ID               4
+#define BSSAP_CHANNEL_NEEDED            5
+#define BSSAP_EMLPP_PRIORITY            6
+#define BSSAP_TMSI_STATUS               7
+#define BSSAP_GS_CAUSE                  8
+#define BSSAP_SGSN_NUMBER               9
+#define BSSAP_GPRS_LOC_UPD_TYPE         0x0a
+#define BSSAP_GLOBAL_CN_ID              0x0b
+#define BSSAP_MOBILE_STN_CLS_MRK1       0x0d
+#define BSSAP_MOBILE_ID                 0x0e
+#define BSSAP_REJECT_CAUSE              0x0f
+#define BSSAP_IMSI_DET_FROM_GPRS_SERV_TYPE      0x10
+#define BSSAP_IMSI_DET_FROM_NON_GPRS_SERV_TYPE  0x11
+#define BSSAP_INFO_REQ                  0x12
+#define BSSAP_PTMSI                     0x13
+#define BSSAP_IMEI                      0x14
+#define BSSAP_IMEISV                    0x15
+#define BSSAP_MM_INFORMATION            0x17
+#define BSSAP_CELL_GBL_ID               0x18
+#define BSSAP_LOC_INF_AGE               0x19
+#define BSSAP_MOBILE_STN_STATE          0x1a
+#define BSSAP_SERVICE_AREA_ID           0x1e
+#define BSSAP_ERRONEOUS_MSG             0x1b
+#define BSSAP_DLINK_TNL_PLD_CTR_AND_INF 0x1c
+#define BSSAP_ULINK_TNL_PLD_CTR_AND_INF 0x1d
 
 
 
 static const value_string bssap_plus_ie_id_values[] = { 
-    { BSSAP_IMSI,                                                              "IMSI" },                                                                               /* 18.4.10 */
-    { BSSAP_VLR_NUMBER,                                                        "VLR number" },                                                                 /* 18.4.26 */ 
-    { BSSAP_TMSI,                                                              "TMSI" },                                                                               /* 18.4.23 */
-    { BSSAP_LOC_AREA_ID,                                               "Location area identifier" },                                   /* 18.4.14 */ 
-    { BSSAP_CHANNEL_NEEDED,                                            "Channel Needed" },                                                             /* 18.4.2  */ 
-    { BSSAP_EMLPP_PRIORITY,                                            "eMLPP Priority" },                                                             /* 18.4.4  */ 
-    { BSSAP_TMSI_STATUS,                                               "TMSI status" },                                                                /* 18.4.24 */ 
-    { BSSAP_GS_CAUSE,                                                  "Gs cause" },                                                                   /* 18.4.7  */ 
-    { BSSAP_SGSN_NUMBER,                                               "SGSN number" },                                                                /* 18.4.22 */ 
-    { BSSAP_GPRS_LOC_UPD_TYPE,                                 "GPRS location update type" },                                  /* 18.4.6  */ 
-    { BSSAP_GLOBAL_CN_ID,                                              "Global CN-Id" },                                                               /* 18.4.27 */ 
-    { 0x0c,                                                                            "Unassigned: treated as an unknown IEI." },             /* 18 and 16 */ 
-    { BSSAP_MOBILE_STN_CLS_MRK1,                               "Mobile station classmark 1" },                                 /* 18.4.18 */ 
-    { BSSAP_MOBILE_ID,                                                 "Mobile identity" },                                                    /* 18.4.17 */ 
-    { BSSAP_REJECT_CAUSE,                                              "Reject cause" },                                                               /* 18.4.21 */ 
-    { BSSAP_IMSI_DET_FROM_GPRS_SERV_TYPE,              "IMSI detach from GPRS service type" },                 /* 18.4.11 */ 
-    { BSSAP_IMSI_DET_FROM_NON_GPRS_SERV_TYPE,  "IMSI detach from non-GPRS service type" },             /* 18.4.12 */ 
-    { BSSAP_INFO_REQ,                                                  "Information requested" },                                              /* 18.4.13 */
-    { BSSAP_PTMSI,                                                             "PTMSI" },                                                                              /* 18.4.20 */
-    { BSSAP_IMEI,                                                              "IMEI" },                                                                               /* 18.4.8  */
-    { BSSAP_IMEISV,                                                            "IMEISV" },                                                                             /* 18.4.9 */
-    { 0x16,                                                                            "Unassigned: treated as an unknown IEI." },             /* 18 and 16 */ 
-    { BSSAP_MM_INFORMATION,                                            "MM information" },                                                             /* 18.4.16 */ 
-    { BSSAP_CELL_GBL_ID,                                               "Cell Global Identity" },                                               /* 18.4.1 */ 
-    { BSSAP_LOC_INF_AGE,                                               "Location information age" },                                   /* 18.4.15 */ 
-    { BSSAP_MOBILE_STN_STATE,                                  "Mobile station state" },                                               /* 18.4.19 */ 
-    { BSSAP_ERRONEOUS_MSG,                                             "Erroneous message" },                                                  /* 18.4.5 */ 
-    { BSSAP_DLINK_TNL_PLD_CTR_AND_INF,                 "Downlink Tunnel Payload Control and Info" },   /* 18.4.3 */ 
-    { BSSAP_ULINK_TNL_PLD_CTR_AND_INF,                 "Uplink Tunnel Payload Control and Info" },             /* 18.4.25 */ 
-    { BSSAP_SERVICE_AREA_ID,                                   "Service Area Identification" },                                /* 18.4.21b */ 
+    { BSSAP_IMSI,                               "IMSI" },                                       /* 18.4.10 */
+    { BSSAP_VLR_NUMBER,                         "VLR number" },                                 /* 18.4.26 */ 
+    { BSSAP_TMSI,                               "TMSI" },                                       /* 18.4.23 */
+    { BSSAP_LOC_AREA_ID,                        "Location area identifier" },                   /* 18.4.14 */ 
+    { BSSAP_CHANNEL_NEEDED,                     "Channel Needed" },                             /* 18.4.2  */ 
+    { BSSAP_EMLPP_PRIORITY,                     "eMLPP Priority" },                             /* 18.4.4  */ 
+    { BSSAP_TMSI_STATUS,                        "TMSI status" },                                /* 18.4.24 */ 
+    { BSSAP_GS_CAUSE,                           "Gs cause" },                                   /* 18.4.7  */ 
+    { BSSAP_SGSN_NUMBER,                        "SGSN number" },                                /* 18.4.22 */ 
+    { BSSAP_GPRS_LOC_UPD_TYPE,                  "GPRS location update type" },                  /* 18.4.6  */ 
+    { BSSAP_GLOBAL_CN_ID,                       "Global CN-Id" },                               /* 18.4.27 */ 
+    { 0x0c,                                     "Unassigned: treated as an unknown IEI." },     /* 18 and 16 */ 
+    { BSSAP_MOBILE_STN_CLS_MRK1,                "Mobile station classmark 1" },                 /* 18.4.18 */ 
+    { BSSAP_MOBILE_ID,                          "Mobile identity" },                            /* 18.4.17 */ 
+    { BSSAP_REJECT_CAUSE,                       "Reject cause" },                               /* 18.4.21 */ 
+    { BSSAP_IMSI_DET_FROM_GPRS_SERV_TYPE,       "IMSI detach from GPRS service type" },         /* 18.4.11 */ 
+    { BSSAP_IMSI_DET_FROM_NON_GPRS_SERV_TYPE,   "IMSI detach from non-GPRS service type" },     /* 18.4.12 */ 
+    { BSSAP_INFO_REQ,                           "Information requested" },                      /* 18.4.13 */
+    { BSSAP_PTMSI,                              "PTMSI" },                                      /* 18.4.20 */
+    { BSSAP_IMEI,                               "IMEI" },                                       /* 18.4.8  */
+    { BSSAP_IMEISV,                             "IMEISV" },                                     /* 18.4.9 */
+    { 0x16,                                     "Unassigned: treated as an unknown IEI." },     /* 18 and 16 */ 
+    { BSSAP_MM_INFORMATION,                     "MM information" },                             /* 18.4.16 */ 
+    { BSSAP_CELL_GBL_ID,                        "Cell Global Identity" },                       /* 18.4.1 */ 
+    { BSSAP_LOC_INF_AGE,                        "Location information age" },                   /* 18.4.15 */ 
+    { BSSAP_MOBILE_STN_STATE,                   "Mobile station state" },                       /* 18.4.19 */ 
+    { BSSAP_ERRONEOUS_MSG,                      "Erroneous message" },                          /* 18.4.5 */ 
+    { BSSAP_DLINK_TNL_PLD_CTR_AND_INF,          "Downlink Tunnel Payload Control and Info" },   /* 18.4.3 */ 
+    { BSSAP_ULINK_TNL_PLD_CTR_AND_INF,          "Uplink Tunnel Payload Control and Info" },     /* 18.4.25 */ 
+    { BSSAP_SERVICE_AREA_ID,                    "Service Area Identification" },                /* 18.4.21b */ 
     { 0,                NULL } 
 }; 
 
@@ -325,7 +325,7 @@ static int hf_bssap_cell_global_id = -1;
 /* Initialize the subtree pointers */
 static gint ett_bssap = -1;
 static gint ett_bssap_dlci = -1;
-static gint    ett_bssap_imsi = -1;
+static gint ett_bssap_imsi = -1;
 static gint ett_bssap_imsi_det_from_gprs_serv_type = -1;
 static gint ett_bssap_imsi_det_from_non_gprs_serv_type = -1;
 static gint ett_bssap_info_req = -1;
@@ -368,39 +368,39 @@ static dissector_handle_t bsap_dissector_handle;
 /*
  * Keep track of pdu_type so we can call appropriate sub-dissector
  */
-static guint8  pdu_type = 0xFF;
+static guint8   pdu_type = 0xFF;
 
-static gint    bssap_or_bsap_global = BSSAP_OR_BSAP_DEFAULT;
+static gint bssap_or_bsap_global = BSSAP_OR_BSAP_DEFAULT;
 
 static gint    gsm_or_lb_interface_global = GSM_OR_LB_INTERFACE_DEFAULT;
 
 static void
 dissect_bssap_unknown_message(tvbuff_t *message_tvb, proto_tree *bssap_tree)
 {
-       guint32 message_length;
+    guint32 message_length;
 
-       message_length = tvb_length(message_tvb);
+    message_length = tvb_length(message_tvb);
 
-       proto_tree_add_text(bssap_tree, message_tvb, 0, message_length,
-                           "Unknown message (%u byte%s)",
-                           message_length, plurality(message_length, "", "s"));
+    proto_tree_add_text(bssap_tree, message_tvb, 0, message_length,
+                "Unknown message (%u byte%s)",
+                message_length, plurality(message_length, "", "s"));
 }
 
 static void
 dissect_bssap_unknown_param(tvbuff_t *tvb, proto_tree *tree, guint8 type, guint16 length)
 {
-       proto_tree_add_text(tree, tvb, 0, length,
-                           "Unknown parameter 0x%x (%u byte%s)",
-                           type, length, plurality(length, "", "s"));
+    proto_tree_add_text(tree, tvb, 0, length,
+                "Unknown parameter 0x%x (%u byte%s)",
+                type, length, plurality(length, "", "s"));
 }
 
 static void
 dissect_bssap_data_param(tvbuff_t *tvb, packet_info *pinfo,
-                       proto_tree *bssap_tree, proto_tree *tree)
+            proto_tree *bssap_tree, proto_tree *tree)
 {
-       if ((pdu_type <= 0x01))
-       {
-               if (bssap_or_bsap_global == BSSAP)
+    if ((pdu_type <= 0x01))
+    {
+        if (bssap_or_bsap_global == BSSAP)
         {
             /* BSSAP */
             if((gsm_or_lb_interface_global == LB_INTERFACE) && (pdu_type == BSSAP_PDU_TYPE_BSSMAP))
@@ -434,48 +434,48 @@ dissect_bssap_data_param(tvbuff_t *tvb, packet_info *pinfo,
             if (dissector_try_port(bsap_dissector_table, pdu_type, tvb, pinfo, tree))
                 return;
         }
-       }
+    }
 
-       /* No sub-dissection occured, treat it as raw data */
-       call_dissector(data_handle, tvb, pinfo, bssap_tree);
+    /* No sub-dissection occured, treat it as raw data */
+    call_dissector(data_handle, tvb, pinfo, bssap_tree);
 }
 
 static void
 dissect_bssap_dlci_param(tvbuff_t *tvb, proto_tree *tree, guint16 length)
 {
-       proto_item      *dlci_item = 0;
-       proto_tree      *dlci_tree = 0;
-       guint8  oct;
-
-       dlci_item =
-               proto_tree_add_text(tree, tvb, 0, length,
-                                   "Data Link Connection Identifier");
-
-       dlci_tree = proto_item_add_subtree(dlci_item, ett_bssap_dlci);
-
-       oct = tvb_get_guint8(tvb, 0);
-
-       if (bssap_or_bsap_global == BSSAP)
-       {
-               proto_tree_add_uint(dlci_tree, hf_bssap_dlci_cc, tvb, 0, length, oct);
-               proto_tree_add_uint(dlci_tree, hf_bssap_dlci_spare, tvb, 0, length, oct);
-               proto_tree_add_uint(dlci_tree, hf_bssap_dlci_sapi, tvb, 0, length, oct);
-       }
-       else
-       {
-               proto_tree_add_uint(dlci_tree, hf_bsap_dlci_cc, tvb, 0, length, oct);
-               proto_tree_add_uint(dlci_tree, hf_bsap_dlci_rsvd, tvb, 0, length, oct);
-               proto_tree_add_uint(dlci_tree, hf_bsap_dlci_sapi, tvb, 0, length, oct);
-       }
+    proto_item  *dlci_item = 0;
+    proto_tree  *dlci_tree = 0;
+    guint8  oct;
+
+    dlci_item =
+        proto_tree_add_text(tree, tvb, 0, length,
+                    "Data Link Connection Identifier");
+
+    dlci_tree = proto_item_add_subtree(dlci_item, ett_bssap_dlci);
+
+    oct = tvb_get_guint8(tvb, 0);
+
+    if (bssap_or_bsap_global == BSSAP)
+    {
+        proto_tree_add_uint(dlci_tree, hf_bssap_dlci_cc, tvb, 0, length, oct);
+        proto_tree_add_uint(dlci_tree, hf_bssap_dlci_spare, tvb, 0, length, oct);
+        proto_tree_add_uint(dlci_tree, hf_bssap_dlci_sapi, tvb, 0, length, oct);
+    }
+    else
+    {
+        proto_tree_add_uint(dlci_tree, hf_bsap_dlci_cc, tvb, 0, length, oct);
+        proto_tree_add_uint(dlci_tree, hf_bsap_dlci_rsvd, tvb, 0, length, oct);
+        proto_tree_add_uint(dlci_tree, hf_bsap_dlci_sapi, tvb, 0, length, oct);
+    }
 }
 
 static void
 dissect_bssap_length_param(tvbuff_t *tvb, proto_tree *tree, guint16 length)
 {
-       guint8  data_length;
+    guint8  data_length;
 
-       data_length = tvb_get_guint8(tvb, 0);
-       proto_tree_add_uint(tree, hf_bssap_length, tvb, 0, length, data_length);
+    data_length = tvb_get_guint8(tvb, 0);
+    proto_tree_add_uint(tree, hf_bssap_length, tvb, 0, length, data_length);
 }
 
 /*
@@ -483,145 +483,145 @@ dissect_bssap_length_param(tvbuff_t *tvb, proto_tree *tree, guint16 length)
  */
 static guint16
 dissect_bssap_parameter(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bssap_tree,
-                      proto_tree *tree, guint8 parameter_type, gint offset,
-                      guint16 parameter_length)
+               proto_tree *tree, guint8 parameter_type, gint offset,
+               guint16 parameter_length)
 {
-       tvbuff_t *parameter_tvb;
-
-       parameter_tvb = tvb_new_subset(tvb, offset, parameter_length, parameter_length);
-
-       switch (parameter_type)
-       {
-       case PARAMETER_DLCI:
-               dissect_bssap_dlci_param(parameter_tvb, bssap_tree, parameter_length);
-               break;
-
-       case PARAMETER_LENGTH:
-               dissect_bssap_length_param(parameter_tvb, bssap_tree, parameter_length);
-               break;
+    tvbuff_t *parameter_tvb;
 
-       case PARAMETER_DATA:
-               dissect_bssap_data_param(parameter_tvb, pinfo, bssap_tree, tree);
-               break;
+    parameter_tvb = tvb_new_subset(tvb, offset, parameter_length, parameter_length);
 
-       default:
-               dissect_bssap_unknown_param(parameter_tvb, bssap_tree, parameter_type,
-                                           parameter_length);
-               break;
-       }
+    switch (parameter_type)
+    {
+    case PARAMETER_DLCI:
+        dissect_bssap_dlci_param(parameter_tvb, bssap_tree, parameter_length);
+        break;
+
+    case PARAMETER_LENGTH:
+        dissect_bssap_length_param(parameter_tvb, bssap_tree, parameter_length);
+        break;
+
+    case PARAMETER_DATA:
+        dissect_bssap_data_param(parameter_tvb, pinfo, bssap_tree, tree);
+        break;
+
+    default:
+        dissect_bssap_unknown_param(parameter_tvb, bssap_tree, parameter_type,
+                        parameter_length);
+        break;
+    }
 
-       return(parameter_length);
+    return(parameter_length);
 }
 
 static guint16
 dissect_bssap_var_parameter(tvbuff_t *tvb, packet_info *pinfo,
-                               proto_tree *bssap_tree, proto_tree *tree,
-                               guint8 parameter_type, gint offset)
+                proto_tree *bssap_tree, proto_tree *tree,
+                guint8 parameter_type, gint offset)
 {
-       guint16 parameter_length;
-       guint8  length_length;
+    guint16 parameter_length;
+    guint8  length_length;
 
-       parameter_length = tvb_get_guint8(tvb, offset);
-       length_length = LENGTH_LENGTH;
+    parameter_length = tvb_get_guint8(tvb, offset);
+    length_length = LENGTH_LENGTH;
 
-       offset += length_length;
+    offset += length_length;
 
-       dissect_bssap_parameter(tvb, pinfo, bssap_tree, tree, parameter_type,
-                               offset, parameter_length);
+    dissect_bssap_parameter(tvb, pinfo, bssap_tree, tree, parameter_type,
+                offset, parameter_length);
 
-       return(parameter_length + length_length);
+    return(parameter_length + length_length);
 }
 
 static void
 dissect_bssap_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bssap_tree,
-                    proto_tree *tree)
+             proto_tree *tree)
 {
-       gint    offset = 0;
-
-       /*
-        * Extract the PDU type
-        */
-       pdu_type = tvb_get_guint8(tvb, PDU_TYPE_OFFSET);
-       offset = PDU_TYPE_LENGTH;
-
-       if (bssap_tree)
-       {
-               /*
-                * add the message type to the protocol tree
-                */
-               proto_tree_add_uint(bssap_tree,
-                                   (bssap_or_bsap_global == BSSAP) ? hf_bssap_pdu_type : hf_bsap_pdu_type,
-                                   tvb, PDU_TYPE_OFFSET, PDU_TYPE_LENGTH, pdu_type);
-       }
-
-       /* Starting a new message dissection */
-
-       switch (pdu_type)
-       {
-       case BSSAP_PDU_TYPE_BSSMAP:
-               offset += dissect_bssap_parameter(tvb, pinfo, bssap_tree, tree,
-                                                 PARAMETER_LENGTH, offset,
-                                                 LENGTH_LENGTH);
-               offset += dissect_bssap_var_parameter(tvb, pinfo, bssap_tree, tree,
-                                                     PARAMETER_DATA,
-                                                     (offset - LENGTH_LENGTH));
-               break;
-
-       case BSSAP_PDU_TYPE_DTAP:
-               offset += dissect_bssap_parameter(tvb, pinfo, bssap_tree, tree,
-                                                 PARAMETER_DLCI,
-                                                 offset, DLCI_LENGTH);
-               offset += dissect_bssap_parameter(tvb, pinfo, bssap_tree, tree,
-                                                 PARAMETER_LENGTH, offset,
-                                                 LENGTH_LENGTH);
-               offset += dissect_bssap_var_parameter(tvb, pinfo, bssap_tree, tree,
-                                                     PARAMETER_DATA,
-                                                     (offset - LENGTH_LENGTH));
-               break;
-
-       default:
-               if (check_col(pinfo->cinfo, COL_INFO))
-               {
-                       col_append_fstr(pinfo->cinfo, COL_INFO, "%s ",
-                                       val_to_str(pdu_type, ((bssap_or_bsap_global == BSSAP) ?
-                                                             bssap_pdu_type_acro_values : bsap_pdu_type_acro_values),
-                                                  "Unknown"));
-
-               }
-
-               dissect_bssap_unknown_message(tvb, bssap_tree);
-               break;
-       }
+    gint    offset = 0;
+
+    /*
+     * Extract the PDU type
+     */
+    pdu_type = tvb_get_guint8(tvb, PDU_TYPE_OFFSET);
+    offset = PDU_TYPE_LENGTH;
+
+    if (bssap_tree)
+    {
+        /*
+         * add the message type to the protocol tree
+         */
+        proto_tree_add_uint(bssap_tree,
+                    (bssap_or_bsap_global == BSSAP) ? hf_bssap_pdu_type : hf_bsap_pdu_type,
+                    tvb, PDU_TYPE_OFFSET, PDU_TYPE_LENGTH, pdu_type);
+    }
+
+    /* Starting a new message dissection */
+
+    switch (pdu_type)
+    {
+    case BSSAP_PDU_TYPE_BSSMAP:
+        offset += dissect_bssap_parameter(tvb, pinfo, bssap_tree, tree,
+                          PARAMETER_LENGTH, offset,
+                          LENGTH_LENGTH);
+        offset += dissect_bssap_var_parameter(tvb, pinfo, bssap_tree, tree,
+                              PARAMETER_DATA,
+                              (offset - LENGTH_LENGTH));
+        break;
+
+    case BSSAP_PDU_TYPE_DTAP:
+        offset += dissect_bssap_parameter(tvb, pinfo, bssap_tree, tree,
+                          PARAMETER_DLCI,
+                          offset, DLCI_LENGTH);
+        offset += dissect_bssap_parameter(tvb, pinfo, bssap_tree, tree,
+                          PARAMETER_LENGTH, offset,
+                          LENGTH_LENGTH);
+        offset += dissect_bssap_var_parameter(tvb, pinfo, bssap_tree, tree,
+                              PARAMETER_DATA,
+                              (offset - LENGTH_LENGTH));
+        break;
+
+    default:
+        if (check_col(pinfo->cinfo, COL_INFO))
+        {
+            col_append_fstr(pinfo->cinfo, COL_INFO, "%s ",
+                    val_to_str(pdu_type, ((bssap_or_bsap_global == BSSAP) ?
+                                  bssap_pdu_type_acro_values : bsap_pdu_type_acro_values),
+                           "Unknown"));
+
+        }
+
+        dissect_bssap_unknown_message(tvb, bssap_tree);
+        break;
+    }
 }
 
 static void
 dissect_bssap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 {
-       proto_item      *bssap_item, *hidden_item;
-       proto_tree      *bssap_tree = NULL;
-
-       /*
-        * Make entry in the Protocol column on summary display
-        */
-       if (check_col(pinfo->cinfo, COL_PROTOCOL))
-       {
-               col_set_str(pinfo->cinfo, COL_PROTOCOL, ((bssap_or_bsap_global == BSSAP) ? "BSSAP" : "BSAP"));
-       }
-
-       if ( pinfo->sccp_info && pinfo->sccp_info->data.co.assoc  ) 
-               pinfo->sccp_info->data.co.assoc->payload = SCCP_PLOAD_BSSAP;
-
-       /*
-        * create the bssap protocol tree
-        */
-       hidden_item = proto_tree_add_item(tree, proto_bssap, tvb, 0, -1, FALSE);
-       PROTO_ITEM_SET_HIDDEN(hidden_item);
-       bssap_item = proto_tree_add_text(tree, tvb, 0, -1, (bssap_or_bsap_global == BSSAP) ? "BSSAP" : "BSAP");
-       bssap_tree = proto_item_add_subtree(bssap_item, ett_bssap);
-
-       /* dissect the message */
-
-       dissect_bssap_message(tvb, pinfo, bssap_tree, tree);
+    proto_item  *bssap_item, *hidden_item;
+    proto_tree  *bssap_tree = NULL;
+
+    /*
+     * Make entry in the Protocol column on summary display
+     */
+    if (check_col(pinfo->cinfo, COL_PROTOCOL))
+    {
+        col_set_str(pinfo->cinfo, COL_PROTOCOL, ((bssap_or_bsap_global == BSSAP) ? "BSSAP" : "BSAP"));
+    }
+
+    if ( pinfo->sccp_info && pinfo->sccp_info->data.co.assoc  ) 
+        pinfo->sccp_info->data.co.assoc->payload = SCCP_PLOAD_BSSAP;
+
+    /*
+     * create the bssap protocol tree
+     */
+    hidden_item = proto_tree_add_item(tree, proto_bssap, tvb, 0, -1, FALSE);
+    PROTO_ITEM_SET_HIDDEN(hidden_item);
+    bssap_item = proto_tree_add_text(tree, tvb, 0, -1, (bssap_or_bsap_global == BSSAP) ? "BSSAP" : "BSAP");
+    bssap_tree = proto_item_add_subtree(bssap_item, ett_bssap);
+
+    /* dissect the message */
+
+    dissect_bssap_message(tvb, pinfo, bssap_tree, tree);
 }
 
 
@@ -649,70 +649,70 @@ static dgt_set_t Dgt1_9_bcd = {
 static const char*
 unpack_digits(tvbuff_t *tvb, int offset,dgt_set_t *dgt,gboolean skip_first){
 
-       int length;
-       guint8 octet;
-       int i=0;
-       char *digit_str;
+    int length;
+    guint8 octet;
+    int i=0;
+    char *digit_str;
 
-       length = tvb_length(tvb);
-       if (length < offset)
-               return "";
-       digit_str = ep_alloc((length - offset)*2+1);
+    length = tvb_length(tvb);
+    if (length < offset)
+        return "";
+    digit_str = ep_alloc((length - offset)*2+1);
 
-       while ( offset < length ){
+    while ( offset < length ){
 
-               octet = tvb_get_guint8(tvb,offset);
-               if (!skip_first){
-                       digit_str[i] = dgt->out[octet & 0x0f]; 
-                       i++;
-               }
-               skip_first = FALSE;
+        octet = tvb_get_guint8(tvb,offset);
+        if (!skip_first){
+            digit_str[i] = dgt->out[octet & 0x0f]; 
+            i++;
+        }
+        skip_first = FALSE;
 
-               /*
-                * unpack second value in byte
-                */
-               octet = octet >> 4;
+        /*
+         * unpack second value in byte
+         */
+        octet = octet >> 4;
 
-               if (octet == 0x0f)      /* odd number bytes - hit filler */
-                       break;
+        if (octet == 0x0f)  /* odd number bytes - hit filler */
+            break;
 
-               digit_str[i] = dgt->out[octet & 0x0f]; 
-               i++;
-               offset++;
+        digit_str[i] = dgt->out[octet & 0x0f]; 
+        i++;
+        offset++;
 
-       }
-       digit_str[i]= '\0';
-       return digit_str;
+    }
+    digit_str[i]= '\0';
+    return digit_str;
 }
 
 static gboolean
 check_ie(tvbuff_t *tvb, proto_tree *tree, int *offset, guint8 expected_ie){
-       guint8  ie_type;
-       guint8  ie_len;
-
-       ie_type = tvb_get_guint8(tvb,*offset);
-       if (ie_type != expected_ie){
-               proto_tree_add_text(tree, tvb, *offset, 1, "Mandatory IE %s expected but IE %s Found",
-                       val_to_str(expected_ie,bssap_plus_ie_id_values,"Unknown %u"), val_to_str(ie_type,bssap_plus_ie_id_values,"Unknown %u"));
-               (*offset)++;
-               ie_len = tvb_get_guint8(tvb,*offset);
-               *offset = *offset + ie_len;
-               return FALSE;
-       }
+    guint8  ie_type;
+    guint8  ie_len;
+
+    ie_type = tvb_get_guint8(tvb,*offset);
+    if (ie_type != expected_ie){
+        proto_tree_add_text(tree, tvb, *offset, 1, "Mandatory IE %s expected but IE %s Found",
+            val_to_str(expected_ie,bssap_plus_ie_id_values,"Unknown %u"), val_to_str(ie_type,bssap_plus_ie_id_values,"Unknown %u"));
+        (*offset)++;
+        ie_len = tvb_get_guint8(tvb,*offset);
+        *offset = *offset + ie_len;
+        return FALSE;
+    }
 
-       return TRUE;
+    return TRUE;
 
 }
 
 static gboolean
 check_optional_ie(tvbuff_t *tvb, int offset, guint8 expected_ie){
-       guint8  ie_type;
+    guint8  ie_type;
 
-       ie_type = tvb_get_guint8(tvb,offset);
-       if (ie_type != expected_ie){
-               return FALSE;
-       }
-       return TRUE;
+    ie_type = tvb_get_guint8(tvb,offset);
+    if (ie_type != expected_ie){
+        return FALSE;
+    }
+    return TRUE;
 
 }
 
@@ -720,118 +720,118 @@ check_optional_ie(tvbuff_t *tvb, int offset, guint8 expected_ie){
 static int
 dissect_bssap_cell_global_id(tvbuff_t *tvb, proto_tree *tree, int offset)
 {
-       proto_item      *item = NULL;
-       proto_tree      *ie_tree = NULL;
-       proto_item      *cgi_item = NULL;
-       proto_tree      *cgi_tree = NULL;
-       guint8           ie_len;
-       
-       ie_len = tvb_get_guint8(tvb,offset+1);
-       item = proto_tree_add_item(tree, hf_bssap_cell_global_id_ie, tvb, offset, ie_len+2, FALSE);
-       ie_tree = proto_item_add_subtree(item, ett_bssap_cell_global_id);
-
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
-       offset++;
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
-       offset++;
-       /*
-        * The rest of the information element is coded as the the value part
-        * of the cell global id IE defined in 3GPP TS 48.018 (not including
-        * 3GPP TS 48.018 IEI and 3GPP TS 48.018 length indicator).
-        */
-       cgi_item= proto_tree_add_item(ie_tree, hf_bssap_cell_global_id, tvb, offset, ie_len, FALSE);
-       cgi_tree = proto_item_add_subtree(cgi_item, ett_bssap_cgi);
-       /*      octets 3-8 Octets 3 to 8 contain the value part (starting with octet 2) of the
-        *      Routing Area Identification IE defined in 3GPP TS 24.008, not
-        *      including 3GPP TS 24.008 IEI
-        */
-       de_gmm_rai(tvb, cgi_tree, offset, ie_len, NULL, 0);
-       /*      Octets 9 and 10 contain the value part (starting with octet 2) of the
-        *      Cell Identity IE defined in 3GPP TS 24.008, not including
-        *      3GPP TS 24.008 IEI
-        */
-       offset = offset + 6;
-       de_cell_id(tvb, cgi_tree, offset, ie_len, NULL, 0);
-       offset = offset + 2;
-
-       return offset;
+    proto_item  *item = NULL;
+    proto_tree  *ie_tree = NULL;
+    proto_item  *cgi_item = NULL;
+    proto_tree  *cgi_tree = NULL;
+    guint8           ie_len;
+    
+    ie_len = tvb_get_guint8(tvb,offset+1);
+    item = proto_tree_add_item(tree, hf_bssap_cell_global_id_ie, tvb, offset, ie_len+2, FALSE);
+    ie_tree = proto_item_add_subtree(item, ett_bssap_cell_global_id);
+
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
+    offset++;
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
+    offset++;
+    /*
+     * The rest of the information element is coded as the the value part
+     * of the cell global id IE defined in 3GPP TS 48.018 (not including
+     * 3GPP TS 48.018 IEI and 3GPP TS 48.018 length indicator).
+     */
+    cgi_item= proto_tree_add_item(ie_tree, hf_bssap_cell_global_id, tvb, offset, ie_len, FALSE);
+    cgi_tree = proto_item_add_subtree(cgi_item, ett_bssap_cgi);
+    /*  octets 3-8 Octets 3 to 8 contain the value part (starting with octet 2) of the
+     *  Routing Area Identification IE defined in 3GPP TS 24.008, not
+     *  including 3GPP TS 24.008 IEI
+     */
+    de_gmm_rai(tvb, cgi_tree, offset, ie_len, NULL, 0);
+    /*  Octets 9 and 10 contain the value part (starting with octet 2) of the
+     *  Cell Identity IE defined in 3GPP TS 24.008, not including
+     *  3GPP TS 24.008 IEI
+     */
+    offset = offset + 6;
+    de_cell_id(tvb, cgi_tree, offset, ie_len, NULL, 0);
+    offset = offset + 2;
+
+    return offset;
 
 }
 /* 18.4.2 Channel needed */
 static int
 dissect_bssap_channel_needed(tvbuff_t *tvb, proto_tree *tree, int offset)
 {
-       proto_item      *item = NULL;
-       proto_tree      *ie_tree = NULL;
-       guint8           ie_len;
-       
-       ie_len = tvb_get_guint8(tvb,offset+1);
-       item = proto_tree_add_item(tree, hf_bssap_channel_needed_ie, tvb, offset, ie_len+2, FALSE);
-       ie_tree = proto_item_add_subtree(item, ett_bssap_channel_needed);
-
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
-       offset++;
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
-       offset++;
-       /*
-        * The rest of the information element is coded as the IEI part and the
-        * value part of the Channel Needed IE defined in 3GPP TS 44.018.
-        * 10.5.2.8 Channel Needed
-        */
-       de_rr_chnl_needed(tvb, ie_tree, offset, ie_len, NULL, 0);
-
-       return offset + ie_len;
+    proto_item  *item = NULL;
+    proto_tree  *ie_tree = NULL;
+    guint8           ie_len;
+    
+    ie_len = tvb_get_guint8(tvb,offset+1);
+    item = proto_tree_add_item(tree, hf_bssap_channel_needed_ie, tvb, offset, ie_len+2, FALSE);
+    ie_tree = proto_item_add_subtree(item, ett_bssap_channel_needed);
+
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
+    offset++;
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
+    offset++;
+    /*
+     * The rest of the information element is coded as the IEI part and the
+     * value part of the Channel Needed IE defined in 3GPP TS 44.018.
+     * 10.5.2.8 Channel Needed
+     */
+    de_rr_chnl_needed(tvb, ie_tree, offset, ie_len, NULL, 0);
+
+    return offset + ie_len;
 
 }
 /* 18.4.3 Downlink Tunnel Payload Control and Info */
 static int
 dissect_bssap_dlink_tunnel_payload_control_and_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
 {
-       proto_item *item = NULL;
-       proto_tree *ie_tree = NULL;
-       tvbuff_t *next_tvb;
-       guint8 ie_len;
-       guint8 octet;
-       guint8 prot_disc;
-       
-       ie_len = tvb_get_guint8(tvb,offset+1);
-       item = proto_tree_add_item(tree, hf_bssap_dlink_tnl_pld_cntrl_amd_inf_ie, tvb, offset, ie_len+2, FALSE);
-       ie_tree = proto_item_add_subtree(item, ett_bssap_dlink_tnl_pld_cntrl_amd_inf);
-
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
-       offset++;
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
-       offset++;
-       /* Bit 8 Spare */
-       /* Bit 7 - 4
-        * TOM Protocol Discriminator: Identifies the protocol using tunnelling of non-GSM signalling.
-        * For coding, see 3GPP TS 44.064.
-        */
-
-       proto_tree_add_item(ie_tree, hf_bssap_tom_prot_disc, tvb, offset, 1, FALSE);
-       octet = tvb_get_guint8(tvb,offset);
-       prot_disc = (octet&0x78)>>3;
-
-       /* octet 3 bit 3 E: Cipher Request. When set to 1 indicates that the SGSN received the payload in ciphered form,
-        * when set to 0 indicates that the SGSN did not receive the payload in ciphered form.
-        */
-       proto_tree_add_item(ie_tree, hf_bssap_e_bit, tvb, offset, 1, FALSE);
-
-       /* octet 3 bit 2 - 1 
-        * Tunnel Priority: Indicates the priority of the Tunnel Payload. For coding, see Table 20.1: Association
-        * between Tunnel Priority and LLC SAPs.
-        */
-       proto_tree_add_item(ie_tree, hf_bssap_tunnel_prio, tvb, offset, 1, FALSE);
-       /* Tunnel payload */
-       next_tvb = tvb_new_subset(tvb, offset, ie_len-4, ie_len-4);
-
-       if ((prot_disc == 2)&&(rrlp_handle))
-               call_dissector(rrlp_handle, next_tvb, pinfo, ie_tree);
-       else
-               call_dissector(data_handle, next_tvb, pinfo, ie_tree);
-
-
-       return offset + ie_len;
+    proto_item *item = NULL;
+    proto_tree *ie_tree = NULL;
+    tvbuff_t *next_tvb;
+    guint8 ie_len;
+    guint8 octet;
+    guint8 prot_disc;
+    
+    ie_len = tvb_get_guint8(tvb,offset+1);
+    item = proto_tree_add_item(tree, hf_bssap_dlink_tnl_pld_cntrl_amd_inf_ie, tvb, offset, ie_len+2, FALSE);
+    ie_tree = proto_item_add_subtree(item, ett_bssap_dlink_tnl_pld_cntrl_amd_inf);
+
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
+    offset++;
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
+    offset++;
+    /* Bit 8 Spare */
+    /* Bit 7 - 4
+     * TOM Protocol Discriminator: Identifies the protocol using tunnelling of non-GSM signalling.
+     * For coding, see 3GPP TS 44.064.
+     */
+
+    proto_tree_add_item(ie_tree, hf_bssap_tom_prot_disc, tvb, offset, 1, FALSE);
+    octet = tvb_get_guint8(tvb,offset);
+    prot_disc = (octet&0x78)>>3;
+
+    /* octet 3 bit 3 E: Cipher Request. When set to 1 indicates that the SGSN received the payload in ciphered form,
+     * when set to 0 indicates that the SGSN did not receive the payload in ciphered form.
+     */
+    proto_tree_add_item(ie_tree, hf_bssap_e_bit, tvb, offset, 1, FALSE);
+
+    /* octet 3 bit 2 - 1 
+     * Tunnel Priority: Indicates the priority of the Tunnel Payload. For coding, see Table 20.1: Association
+     * between Tunnel Priority and LLC SAPs.
+     */
+    proto_tree_add_item(ie_tree, hf_bssap_tunnel_prio, tvb, offset, 1, FALSE);
+    /* Tunnel payload */
+    next_tvb = tvb_new_subset(tvb, offset, ie_len-4, ie_len-4);
+
+    if ((prot_disc == 2)&&(rrlp_handle))
+        call_dissector(rrlp_handle, next_tvb, pinfo, ie_tree);
+    else
+        call_dissector(data_handle, next_tvb, pinfo, ie_tree);
+
+
+    return offset + ie_len;
 
 }
 
@@ -840,65 +840,65 @@ dissect_bssap_dlink_tunnel_payload_control_and_info(tvbuff_t *tvb, packet_info *
 static const value_string bssap_call_priority_values[] = { 
     { 0x00,             "No priority applied" },
     { 0x01,             "Call priority level 4" }, 
-    { 0x02,             "Call priority level 3" },      
-    { 0x03,             "Call priority level 2" },      
-    { 0x04,             "Call priority level 1" },      
-    { 0x05,             "Call priority level 0" },      
-    { 0x06,             "Call priority level B" },      
-    { 0x07,             "Call priority level A" },      
+    { 0x02,             "Call priority level 3" },   
+    { 0x03,             "Call priority level 2" },   
+    { 0x04,             "Call priority level 1" },   
+    { 0x05,             "Call priority level 0" },   
+    { 0x06,             "Call priority level B" },   
+    { 0x07,             "Call priority level A" },   
     { 0,                NULL } 
 };
 static int
 dissect_bssap_emlpp_priority(tvbuff_t *tvb, proto_tree *tree, int offset)
 {
-       proto_item      *item = NULL;
-       proto_tree      *ie_tree = NULL;
-       guint8 ie_len;
-       
-       ie_len = tvb_get_guint8(tvb,offset+1);
-       item = proto_tree_add_item(tree, hf_bssap_emlpp_prio_ie, tvb, offset, ie_len+2, FALSE);
-       ie_tree = proto_item_add_subtree(item, ett_bssap_emlpp_prio);
-
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
-       offset++;
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
-       offset++;
-       /*      The rest of the information element is coded as the value part of
-               the eMLPP-Priority IE defined in 3GPP TS 48.008 (not including
-               3GPP TS 48.008 IEI and 3GPP TS 48.008 length indicator).
-               3.2.2.56 eMLPP Priority
-               The call priority field (bit 3 to 1 of octet 2) is coded in the same way 
-               as the call priority field (bit 3 to 1 of octet 5) in the Descriptive group
-               or broadcast call reference information element as defined in 3GPP TS 24.008.
-        */
-       proto_tree_add_item(ie_tree, hf_bssap_call_priority, tvb, offset, ie_len, FALSE);
-
-       return offset + ie_len;
+    proto_item  *item = NULL;
+    proto_tree  *ie_tree = NULL;
+    guint8 ie_len;
+    
+    ie_len = tvb_get_guint8(tvb,offset+1);
+    item = proto_tree_add_item(tree, hf_bssap_emlpp_prio_ie, tvb, offset, ie_len+2, FALSE);
+    ie_tree = proto_item_add_subtree(item, ett_bssap_emlpp_prio);
+
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
+    offset++;
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
+    offset++;
+    /*  The rest of the information element is coded as the value part of
+        the eMLPP-Priority IE defined in 3GPP TS 48.008 (not including
+        3GPP TS 48.008 IEI and 3GPP TS 48.008 length indicator).
+        3.2.2.56 eMLPP Priority
+        The call priority field (bit 3 to 1 of octet 2) is coded in the same way 
+        as the call priority field (bit 3 to 1 of octet 5) in the Descriptive group
+        or broadcast call reference information element as defined in 3GPP TS 24.008.
+     */
+    proto_tree_add_item(ie_tree, hf_bssap_call_priority, tvb, offset, ie_len, FALSE);
+
+    return offset + ie_len;
 
 }
 /* 18.4.5 Erroneous message */
-       /* Erroneous message including the message type. */
+    /* Erroneous message including the message type. */
 
 static int
 dissect_bssap_gprs_erroneous_msg(tvbuff_t *tvb, proto_tree *tree, int offset)
 {
-       proto_item      *item = NULL;
-       proto_tree      *ie_tree = NULL;
-       guint8 ie_len;
-       
-       ie_len = tvb_get_guint8(tvb,offset+1);
-       item = proto_tree_add_item(tree, hf_bssap_gprs_erroneous_msg_ie, tvb, offset, ie_len+2, FALSE);
-       ie_tree = proto_item_add_subtree(item, ett_bssap_erroneous_msg);
+    proto_item  *item = NULL;
+    proto_tree  *ie_tree = NULL;
+    guint8 ie_len;
+    
+    ie_len = tvb_get_guint8(tvb,offset+1);
+    item = proto_tree_add_item(tree, hf_bssap_gprs_erroneous_msg_ie, tvb, offset, ie_len+2, FALSE);
+    ie_tree = proto_item_add_subtree(item, ett_bssap_erroneous_msg);
 
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
-       offset++;
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
-       offset++;
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
+    offset++;
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
+    offset++;
 
-       /* Erroneous message including the message type. */
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie_data, tvb, offset, ie_len, FALSE);
+    /* Erroneous message including the message type. */
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie_data, tvb, offset, ie_len, FALSE);
 
-       return offset + ie_len;
+    return offset + ie_len;
 
 }
 
@@ -906,131 +906,131 @@ dissect_bssap_gprs_erroneous_msg(tvbuff_t *tvb, proto_tree *tree, int offset)
 static const value_string bssap_plus_GPRS_loc_upd_type_values[] = { 
     { 0x00,             "Shall not be sent in this version of the protocol. If received, shall be treated as '00000010'." },
     { 0x01,             "IMSI attach" }, 
-    { 0x02,             "Normal location update" },     
+    { 0x02,             "Normal location update" },  
     { 0,                NULL } 
 }; 
 /* 18.4.6 GPRS location update type */
 static int
 dissect_bssap_gprs_location_update_type(tvbuff_t *tvb, proto_tree *tree, int offset)
 {
-       proto_item      *item = NULL;
-       proto_tree      *ie_tree = NULL;
-       guint8 ie_len;
-       
-       ie_len = tvb_get_guint8(tvb,offset+1);
-       item = proto_tree_add_item(tree, hf_bssap_gprs_loc_upd_type_ie, tvb, offset, ie_len+2, FALSE);
-       ie_tree = proto_item_add_subtree(item, ett_bssap_gprs_loc_upd);
-
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
-       offset++;
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
-       offset++;
-       
-       /* GPRS location update type value (octet 3) */
-       proto_tree_add_item(ie_tree, hf_bssap_gprs_loc_upd_type, tvb, offset, ie_len, FALSE);
-       
-       return offset + ie_len;
+    proto_item  *item = NULL;
+    proto_tree  *ie_tree = NULL;
+    guint8 ie_len;
+    
+    ie_len = tvb_get_guint8(tvb,offset+1);
+    item = proto_tree_add_item(tree, hf_bssap_gprs_loc_upd_type_ie, tvb, offset, ie_len+2, FALSE);
+    ie_tree = proto_item_add_subtree(item, ett_bssap_gprs_loc_upd);
+
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
+    offset++;
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
+    offset++;
+    
+    /* GPRS location update type value (octet 3) */
+    proto_tree_add_item(ie_tree, hf_bssap_gprs_loc_upd_type, tvb, offset, ie_len, FALSE);
+    
+    return offset + ie_len;
 }
 
 /* Gs Cause value (octet 3) */
 static const value_string bssap_Gs_cause_values[] = { 
 
-    { 0x00,            "Normal, unspecified in this version of the protocol." },
-    { 0x01,            "IMSI detached for GPRS services" },
-    { 0x02,            "IMSI detached for GPRS and non-GPRS services" },
-    { 0x03,            "IMSI unknown" },
-    { 0x04,            "IMSI detached for non-GPRS services" },
-    { 0x05,            "IMSI implicitly detached for non-GPRS services" },
-    { 0x06,            "MS unreachable" },
-    { 0x07,            "Message not compatible with the protocol state" },
-    { 0x08,            "Missing mandatory information element" },
-    { 0x09,            "Invalid mandatory information" },
-    { 0x0a,            "Conditional IE error" },
-    { 0x0b,            "Semantically incorrect message" },
-    { 0x0c,            "Message unknown" },
-    { 0x0d,            "Address error" },
-    { 0x0e,            "TOM functionality not supported" },
-    { 0x0f,            "Ciphering request cannot be accommodated" },
-    { 0,               NULL } 
+    { 0x00,     "Normal, unspecified in this version of the protocol." },
+    { 0x01,     "IMSI detached for GPRS services" },
+    { 0x02,     "IMSI detached for GPRS and non-GPRS services" },
+    { 0x03,     "IMSI unknown" },
+    { 0x04,     "IMSI detached for non-GPRS services" },
+    { 0x05,     "IMSI implicitly detached for non-GPRS services" },
+    { 0x06,     "MS unreachable" },
+    { 0x07,     "Message not compatible with the protocol state" },
+    { 0x08,     "Missing mandatory information element" },
+    { 0x09,     "Invalid mandatory information" },
+    { 0x0a,     "Conditional IE error" },
+    { 0x0b,     "Semantically incorrect message" },
+    { 0x0c,     "Message unknown" },
+    { 0x0d,     "Address error" },
+    { 0x0e,     "TOM functionality not supported" },
+    { 0x0f,     "Ciphering request cannot be accommodated" },
+    { 0,        NULL } 
 }; 
 
 /* 18.4.7 Gs cause */
 static int
 dissect_bssap_Gs_cause(tvbuff_t *tvb, proto_tree *tree, int offset)
 {
-       proto_item      *item = NULL;
-       proto_tree      *ie_tree = NULL;
-       guint8 ie_len;
-       
-       ie_len = tvb_get_guint8(tvb,offset+1);
-       item = proto_tree_add_item(tree, hf_bssap_Gs_cause_ie, tvb, offset, ie_len+2, FALSE);
-       ie_tree = proto_item_add_subtree(item, ett_bassp_Gs_cause);
+    proto_item  *item = NULL;
+    proto_tree  *ie_tree = NULL;
+    guint8 ie_len;
+    
+    ie_len = tvb_get_guint8(tvb,offset+1);
+    item = proto_tree_add_item(tree, hf_bssap_Gs_cause_ie, tvb, offset, ie_len+2, FALSE);
+    ie_tree = proto_item_add_subtree(item, ett_bassp_Gs_cause);
 
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
-       offset++;
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
-       offset++;
-       /* Gs Cause value (octet 3) */
-       proto_tree_add_item(ie_tree, hf_bssap_Gs_cause, tvb, offset, ie_len, FALSE);
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
+    offset++;
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
+    offset++;
+    /* Gs Cause value (octet 3) */
+    proto_tree_add_item(ie_tree, hf_bssap_Gs_cause, tvb, offset, ie_len, FALSE);
 
 
-       return offset + ie_len;
+    return offset + ie_len;
 
 }
 /* 18.4.8 IMEI */
 static int
 dissect_bssap_imei(tvbuff_t *tvb, proto_tree *tree, int offset)
 {
-       proto_item *item = NULL;
-       proto_tree *ie_tree = NULL;
-       guint8 ie_len;
-       tvbuff_t *ie_tvb;
-       const char *digit_str;
-
-       ie_len = tvb_get_guint8(tvb,offset+1);
-       item = proto_tree_add_item(tree, hf_bssap_imei_ie, tvb, offset, ie_len+2, FALSE);
-       ie_tree = proto_item_add_subtree(item, ett_bassp_imei);
-
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
-       offset++;
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
-       offset++;
-       /* The IMEI is coded as a sequence of BCD digits, compressed two into each octet.
-        * The IMEI consists of 15 digits (see 3GPP TS 23.003).
-        */
-       ie_tvb = tvb_new_subset(tvb, offset, ie_len, ie_len);
-       digit_str = unpack_digits(ie_tvb, 0, &Dgt1_9_bcd, FALSE);
-       proto_tree_add_string(ie_tree, hf_bssap_imei, ie_tvb, 0, -1, digit_str);
-
-       return offset + ie_len;
+    proto_item *item = NULL;
+    proto_tree *ie_tree = NULL;
+    guint8 ie_len;
+    tvbuff_t *ie_tvb;
+    const char *digit_str;
+
+    ie_len = tvb_get_guint8(tvb,offset+1);
+    item = proto_tree_add_item(tree, hf_bssap_imei_ie, tvb, offset, ie_len+2, FALSE);
+    ie_tree = proto_item_add_subtree(item, ett_bassp_imei);
+
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
+    offset++;
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
+    offset++;
+    /* The IMEI is coded as a sequence of BCD digits, compressed two into each octet.
+     * The IMEI consists of 15 digits (see 3GPP TS 23.003).
+     */
+    ie_tvb = tvb_new_subset(tvb, offset, ie_len, ie_len);
+    digit_str = unpack_digits(ie_tvb, 0, &Dgt1_9_bcd, FALSE);
+    proto_tree_add_string(ie_tree, hf_bssap_imei, ie_tvb, 0, -1, digit_str);
+
+    return offset + ie_len;
 
 }
 /* 18.4.9 IMEISV */
 static int
 dissect_bssap_imesiv(tvbuff_t *tvb, proto_tree *tree, int offset)
 {
-       proto_item *item = NULL;
-       proto_tree *ie_tree = NULL;
-       guint8 ie_len;
-       tvbuff_t *ie_tvb;
-       const char *digit_str;
-       
-       ie_len = tvb_get_guint8(tvb,offset+1);
-       item = proto_tree_add_item(tree, hf_bssap_imesiv_ie, tvb, offset, ie_len+2, FALSE);
-       ie_tree = proto_item_add_subtree(item, ett_bassp_imesiv);
-
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
-       offset++;
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
-       offset++;
-       /*      The IMEISV is coded as a sequence of BCD digits, compressed two into each octet.
-        *      The IMEISV consists of 16 digits (see 3GPP TS 23.003).
-        */
-       ie_tvb = tvb_new_subset(tvb, offset, ie_len, ie_len);
-       digit_str = unpack_digits(ie_tvb, 0, &Dgt1_9_bcd, FALSE);
-       proto_tree_add_string(ie_tree, hf_bssap_imeisv, ie_tvb, 0, -1, digit_str);
-
-       return offset + ie_len;
+    proto_item *item = NULL;
+    proto_tree *ie_tree = NULL;
+    guint8 ie_len;
+    tvbuff_t *ie_tvb;
+    const char *digit_str;
+    
+    ie_len = tvb_get_guint8(tvb,offset+1);
+    item = proto_tree_add_item(tree, hf_bssap_imesiv_ie, tvb, offset, ie_len+2, FALSE);
+    ie_tree = proto_item_add_subtree(item, ett_bassp_imesiv);
+
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
+    offset++;
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
+    offset++;
+    /*  The IMEISV is coded as a sequence of BCD digits, compressed two into each octet.
+     *  The IMEISV consists of 16 digits (see 3GPP TS 23.003).
+     */
+    ie_tvb = tvb_new_subset(tvb, offset, ie_len, ie_len);
+    digit_str = unpack_digits(ie_tvb, 0, &Dgt1_9_bcd, FALSE);
+    proto_tree_add_string(ie_tree, hf_bssap_imeisv, ie_tvb, 0, -1, digit_str);
+
+    return offset + ie_len;
 
 }
 /* 18.4.10 IMSI 
@@ -1043,32 +1043,32 @@ dissect_bssap_imesiv(tvbuff_t *tvb, proto_tree *tree, int offset)
 static int
 dissect_bssap_imsi(tvbuff_t *tvb, proto_tree *tree, int offset)
 {
-       proto_item *item = NULL;
-       proto_tree *ie_tree = NULL;
-       guint8 ie_len;
-       tvbuff_t *ie_tvb;
-       const char *digit_str;
-       
-       ie_len = tvb_get_guint8(tvb,offset+1);
-       item = proto_tree_add_item(tree, hf_bssap_imsi_ie, tvb, offset, ie_len+2, FALSE);
-       ie_tree = proto_item_add_subtree(item, ett_bssap_imsi);
-
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
-       offset++;
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
-       offset++;
-       ie_tvb = tvb_new_subset(tvb, offset, ie_len,ie_len);
-       digit_str = unpack_digits(ie_tvb, 0, &Dgt1_9_bcd, TRUE);
-       proto_tree_add_string(ie_tree, hf_bssap_imsi, ie_tvb, 0, -1, digit_str);
-       
-       return offset + ie_len;
+    proto_item *item = NULL;
+    proto_tree *ie_tree = NULL;
+    guint8 ie_len;
+    tvbuff_t *ie_tvb;
+    const char *digit_str;
+    
+    ie_len = tvb_get_guint8(tvb,offset+1);
+    item = proto_tree_add_item(tree, hf_bssap_imsi_ie, tvb, offset, ie_len+2, FALSE);
+    ie_tree = proto_item_add_subtree(item, ett_bssap_imsi);
+
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
+    offset++;
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
+    offset++;
+    ie_tvb = tvb_new_subset(tvb, offset, ie_len,ie_len);
+    digit_str = unpack_digits(ie_tvb, 0, &Dgt1_9_bcd, TRUE);
+    proto_tree_add_string(ie_tree, hf_bssap_imsi, ie_tvb, 0, -1, digit_str);
+    
+    return offset + ie_len;
 
 }
 static const value_string bssap_imsi_det_from_gprs_serv_type_values[] _U_ = { 
-    { 0x00,            "Interpreted as reserved in this version of the protocol" },
-    { 0x01,            "Network initiated IMSI detach from GPRS service" }, 
-    { 0x02,            "MS initiated IMSI detach from GPRS service" },
-    { 0x03,            "GPRS services not allowed" },
+    { 0x00,     "Interpreted as reserved in this version of the protocol" },
+    { 0x01,     "Network initiated IMSI detach from GPRS service" }, 
+    { 0x02,     "MS initiated IMSI detach from GPRS service" },
+    { 0x03,     "GPRS services not allowed" },
     { 0,                NULL } 
 }; 
 
@@ -1076,302 +1076,302 @@ static const value_string bssap_imsi_det_from_gprs_serv_type_values[] _U_ = {
 static int
 dissect_bssap_imsi_det_from_gprs_serv_type(tvbuff_t *tvb, proto_tree *tree, int offset)
 {
-       proto_item      *item = NULL;
-       proto_tree      *ie_tree = NULL;
-       guint8 ie_len;
-       
-       ie_len = tvb_get_guint8(tvb,offset+1);
-       item = proto_tree_add_item(tree, hf_bssap_imsi_det_from_gprs_serv_type_ie, tvb, offset, ie_len+2, FALSE);
-       ie_tree = proto_item_add_subtree(item, ett_bssap_imsi_det_from_gprs_serv_type);
+    proto_item  *item = NULL;
+    proto_tree  *ie_tree = NULL;
+    guint8 ie_len;
+    
+    ie_len = tvb_get_guint8(tvb,offset+1);
+    item = proto_tree_add_item(tree, hf_bssap_imsi_det_from_gprs_serv_type_ie, tvb, offset, ie_len+2, FALSE);
+    ie_tree = proto_item_add_subtree(item, ett_bssap_imsi_det_from_gprs_serv_type);
 
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
-       offset++;
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
-       offset++;
-       /* IMSI detach from GPRS service type value (octet 3)*/
-       proto_tree_add_item(ie_tree, hf_bssap_imsi_det_from_gprs_serv_type, tvb, offset, ie_len, FALSE);
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
+    offset++;
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
+    offset++;
+    /* IMSI detach from GPRS service type value (octet 3)*/
+    proto_tree_add_item(ie_tree, hf_bssap_imsi_det_from_gprs_serv_type, tvb, offset, ie_len, FALSE);
 
 
-       return offset + ie_len;
+    return offset + ie_len;
 
 }
 /* 18.4.12 IMSI detach from non-GPRS service type */
 static int
 dissect_bssap_imsi_det_from_non_gprs_serv_type(tvbuff_t *tvb, proto_tree *tree, int offset)
 {
-       proto_item      *item = NULL;
-       proto_tree      *ie_tree = NULL;
-       guint8 ie_len;
-       
-       ie_len = tvb_get_guint8(tvb,offset+1);
-       item = proto_tree_add_item(tree, hf_bssap_imsi_det_from_non_gprs_serv_type_ie, tvb, offset, ie_len+2, FALSE);
-       ie_tree = proto_item_add_subtree(item, ett_bssap_imsi_det_from_non_gprs_serv_type);
+    proto_item  *item = NULL;
+    proto_tree  *ie_tree = NULL;
+    guint8 ie_len;
+    
+    ie_len = tvb_get_guint8(tvb,offset+1);
+    item = proto_tree_add_item(tree, hf_bssap_imsi_det_from_non_gprs_serv_type_ie, tvb, offset, ie_len+2, FALSE);
+    ie_tree = proto_item_add_subtree(item, ett_bssap_imsi_det_from_non_gprs_serv_type);
 
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
-       offset++;
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
-       offset++;
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie_data, tvb, offset, ie_len, FALSE);
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
+    offset++;
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
+    offset++;
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie_data, tvb, offset, ie_len, FALSE);
 
 
-       return offset + ie_len;
+    return offset + ie_len;
 
 }
 static const value_string bssap_info_req_values[] = { 
-    { 0x00,            "Interpreted as Not supported in this version of the protocol." },
-    { 0x01,            "PTMSI" }, 
-    { 0x02,            "IMEI" },
-    { 0x03,            "IMEISV" },
-    { 0x04,            "PTMSI and IMEI" },
-    { 0x05,            "PTMSI and IMEISV" },
-    { 0x06,            "IMEI and IMEISV" },
-    { 0x07,            "PTMSI, IMEI, and IMEISV" },
-    { 0x08,            "Mobile location information" },
-    { 0x09,            "TMSI" },
+    { 0x00,     "Interpreted as Not supported in this version of the protocol." },
+    { 0x01,     "PTMSI" }, 
+    { 0x02,     "IMEI" },
+    { 0x03,     "IMEISV" },
+    { 0x04,     "PTMSI and IMEI" },
+    { 0x05,     "PTMSI and IMEISV" },
+    { 0x06,     "IMEI and IMEISV" },
+    { 0x07,     "PTMSI, IMEI, and IMEISV" },
+    { 0x08,     "Mobile location information" },
+    { 0x09,     "TMSI" },
     { 0,                NULL } 
 }; 
 /* 18.4.13 Information requested */
 static int
 dissect_bssap_info_req(tvbuff_t *tvb, proto_tree *tree, int offset)
 {
-       proto_item      *item = NULL;
-       proto_tree      *ie_tree = NULL;
-       guint8 ie_len;
-       
-       ie_len = tvb_get_guint8(tvb,offset+1);
-       item = proto_tree_add_item(tree, hf_bssap_info_req_ie, tvb, offset, ie_len+2, FALSE);
-       ie_tree = proto_item_add_subtree(item, ett_bssap_info_req);
+    proto_item  *item = NULL;
+    proto_tree  *ie_tree = NULL;
+    guint8 ie_len;
+    
+    ie_len = tvb_get_guint8(tvb,offset+1);
+    item = proto_tree_add_item(tree, hf_bssap_info_req_ie, tvb, offset, ie_len+2, FALSE);
+    ie_tree = proto_item_add_subtree(item, ett_bssap_info_req);
 
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
-       offset++;
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
-       offset++;
-       /*Information requested value (octet 3) */
-       proto_tree_add_item(ie_tree, hf_bssap_info_req, tvb, offset, ie_len, FALSE);
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
+    offset++;
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
+    offset++;
+    /*Information requested value (octet 3) */
+    proto_tree_add_item(ie_tree, hf_bssap_info_req, tvb, offset, ie_len, FALSE);
 
 
-       return offset + ie_len;
+    return offset + ie_len;
 
 }
 /* 18.4.14 Location area identifier */
 static int
 dissect_bssap_loc_area_id(tvbuff_t *tvb, proto_tree *tree, int offset)
 {
-       proto_item      *item = NULL;
-       proto_tree      *ie_tree = NULL;
-       guint8 ie_len;
-       
-       ie_len = tvb_get_guint8(tvb,offset+1);
-       item = proto_tree_add_item(tree, hf_bssap_loc_area_id_ie, tvb, offset, ie_len+2, FALSE);
-       ie_tree = proto_item_add_subtree(item, ett_bssap_loc_area_id);
-
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
-       offset++;
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
-       offset++;
-       /*      The rest of the information element is coded as the value part of
-        *      the location area identifier IE defined in 3GPP TS 48.018 (not
-        *      including 3GPP TS 48.018 IEI and 3GPP TS 48.018 length
-        *      indicator).
-        */
-       de_lai(tvb, ie_tree, offset, ie_len, NULL, 0);
-
-       return offset + ie_len;
+    proto_item  *item = NULL;
+    proto_tree  *ie_tree = NULL;
+    guint8 ie_len;
+    
+    ie_len = tvb_get_guint8(tvb,offset+1);
+    item = proto_tree_add_item(tree, hf_bssap_loc_area_id_ie, tvb, offset, ie_len+2, FALSE);
+    ie_tree = proto_item_add_subtree(item, ett_bssap_loc_area_id);
+
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
+    offset++;
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
+    offset++;
+    /*  The rest of the information element is coded as the value part of
+     *  the location area identifier IE defined in 3GPP TS 48.018 (not
+     *  including 3GPP TS 48.018 IEI and 3GPP TS 48.018 length
+     *  indicator).
+     */
+    de_lai(tvb, ie_tree, offset, ie_len, NULL, 0);
+
+    return offset + ie_len;
 
 }
 /* 18.4.15 Location information age */
 static int
 dissect_bssap_location_information_age(tvbuff_t *tvb, proto_tree *tree, int offset)
 {
-       proto_item      *item = NULL;
-       proto_tree      *ie_tree = NULL;
-       guint8 ie_len;
-       
-       ie_len = tvb_get_guint8(tvb,offset+1);
-       item = proto_tree_add_item(tree, hf_bssap_loc_inf_age_ie, tvb, offset, ie_len+2, FALSE);
-       ie_tree = proto_item_add_subtree(item, ett_bssap_loc_inf_age);
-
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
-       offset++;
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
-       offset++;
-       /* The rest of the IE is coded as the value part of the
-        * AgeOfLocationInformation as specified in 3GPP TS 29.002.:
-        *   AgeOfLocationInformation ::= INTEGER (0..32767)
-        * -- the value represents the elapsed time in minutes since the last
-        * -- network contact of the mobile station (i.e. the actuality of the
-        * -- location information).
-        * -- value '0' indicates that the MS is currently in contact with the
-        * -- network
-        * -- value '32767' indicates that the location information is at least
-        * -- 32767 minutes old
-        */
-       proto_tree_add_item(ie_tree, hf_bssap_loc_inf_age, tvb, offset, ie_len, FALSE);
-
-
-       return offset + ie_len;
+    proto_item  *item = NULL;
+    proto_tree  *ie_tree = NULL;
+    guint8 ie_len;
+    
+    ie_len = tvb_get_guint8(tvb,offset+1);
+    item = proto_tree_add_item(tree, hf_bssap_loc_inf_age_ie, tvb, offset, ie_len+2, FALSE);
+    ie_tree = proto_item_add_subtree(item, ett_bssap_loc_inf_age);
+
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
+    offset++;
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
+    offset++;
+    /* The rest of the IE is coded as the value part of the
+     * AgeOfLocationInformation as specified in 3GPP TS 29.002.:
+     *   AgeOfLocationInformation ::= INTEGER (0..32767)
+     * -- the value represents the elapsed time in minutes since the last
+     * -- network contact of the mobile station (i.e. the actuality of the
+     * -- location information).
+     * -- value '0' indicates that the MS is currently in contact with the
+     * -- network
+     * -- value '32767' indicates that the location information is at least
+     * -- 32767 minutes old
+     */
+    proto_tree_add_item(ie_tree, hf_bssap_loc_inf_age, tvb, offset, ie_len, FALSE);
+
+
+    return offset + ie_len;
 
 }
 /* 18.4.16 MM information */
 static int
 dissect_bssap_MM_information(tvbuff_t *tvb, proto_tree *tree, int offset)
 {
-       proto_item      *item = NULL;
-       proto_tree      *ie_tree = NULL;
-       guint8 ie_len;
-       
-       ie_len = tvb_get_guint8(tvb,offset+1);
-       item = proto_tree_add_item(tree, hf_bssap_mm_information_ie, tvb, offset, ie_len+2, FALSE);
-       ie_tree = proto_item_add_subtree(item, ett_bssap_mm_information);
-
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
-       offset++;
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
-       offset++;
-       /* User information: This field is composed of one or more of the
-        *      information elements of the MM information message as defined
-        *      3GPP TS 24.008, excluding the Protocol discriminator, Skip
-        *      indicator and Message type. This field includes the IEI and length
-        *      indicatior of the other information elements.
-        */
-       dtap_mm_mm_info(tvb, ie_tree, offset, ie_len);
-       
-
-       return offset + ie_len;
+    proto_item  *item = NULL;
+    proto_tree  *ie_tree = NULL;
+    guint8 ie_len;
+    
+    ie_len = tvb_get_guint8(tvb,offset+1);
+    item = proto_tree_add_item(tree, hf_bssap_mm_information_ie, tvb, offset, ie_len+2, FALSE);
+    ie_tree = proto_item_add_subtree(item, ett_bssap_mm_information);
+
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
+    offset++;
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
+    offset++;
+    /* User information: This field is composed of one or more of the
+     *  information elements of the MM information message as defined
+     *  3GPP TS 24.008, excluding the Protocol discriminator, Skip
+     *  indicator and Message type. This field includes the IEI and length
+     *  indicatior of the other information elements.
+     */
+    dtap_mm_mm_info(tvb, ie_tree, offset, ie_len);
+    
+
+    return offset + ie_len;
 
 }
 /* 18.4.17 Mobile identity */
 static int
 dissect_bssap_mobile_id(tvbuff_t *tvb, proto_tree *tree, int offset)
 {
-       proto_item      *item = NULL;
-       proto_tree      *ie_tree = NULL;
-       guint ie_len;
-       
-       ie_len = tvb_get_guint8(tvb,offset+1);
-       item = proto_tree_add_item(tree, hf_bssap_mobile_id_ie, tvb, offset, ie_len+2, FALSE);
-       ie_tree = proto_item_add_subtree(item, ett_bssap_mobile_id);
-
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
-       offset++;
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
-       offset++;
-       /*      The rest of the information element is coded as the value part of
-        *      the mobile identity IE defined in 3GPP TS 24.008 (not including
-        *      3GPP TS 24.008 IEI and 3GPP TS 24.008 length indicator).
-        */
-       de_mid(tvb, ie_tree, offset, ie_len, NULL, 0);
-
-
-       return offset + ie_len;
+    proto_item  *item = NULL;
+    proto_tree  *ie_tree = NULL;
+    guint ie_len;
+    
+    ie_len = tvb_get_guint8(tvb,offset+1);
+    item = proto_tree_add_item(tree, hf_bssap_mobile_id_ie, tvb, offset, ie_len+2, FALSE);
+    ie_tree = proto_item_add_subtree(item, ett_bssap_mobile_id);
+
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
+    offset++;
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
+    offset++;
+    /*  The rest of the information element is coded as the value part of
+     *  the mobile identity IE defined in 3GPP TS 24.008 (not including
+     *  3GPP TS 24.008 IEI and 3GPP TS 24.008 length indicator).
+     */
+    de_mid(tvb, ie_tree, offset, ie_len, NULL, 0);
+
+
+    return offset + ie_len;
 
 }
 /* 18.4.18 Mobile station classmark 1 */
 static int
 dissect_bssap_mobile_stn_cls_mrk1(tvbuff_t *tvb, proto_tree *tree, int offset)
 {
-       proto_item      *item = NULL;
-       proto_tree      *ie_tree = NULL;
-       guint8 ie_len;
-       
-       ie_len = tvb_get_guint8(tvb,offset+1);
-       item = proto_tree_add_item(tree, hf_bssap_mobile_stn_cls_mrk1_ie, tvb, offset, ie_len+2, FALSE);
-       ie_tree = proto_item_add_subtree(item, ett_bssap_mobile_stn_cls_mrk1);
-
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
-       offset++;
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
-       offset++;
-       /*      The rest of the information element is coded as the value part of
-        *      the mobile station classmark 1 IE defined in 3GPP TS 24.008 (not
-        *      including 3GPP TS 24.008 IEI)
-        */
-       de_ms_cm_1(tvb, ie_tree, offset, ie_len, NULL, 0);
-
-       return offset + ie_len;
+    proto_item  *item = NULL;
+    proto_tree  *ie_tree = NULL;
+    guint8 ie_len;
+    
+    ie_len = tvb_get_guint8(tvb,offset+1);
+    item = proto_tree_add_item(tree, hf_bssap_mobile_stn_cls_mrk1_ie, tvb, offset, ie_len+2, FALSE);
+    ie_tree = proto_item_add_subtree(item, ett_bssap_mobile_stn_cls_mrk1);
+
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
+    offset++;
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
+    offset++;
+    /*  The rest of the information element is coded as the value part of
+     *  the mobile station classmark 1 IE defined in 3GPP TS 24.008 (not
+     *  including 3GPP TS 24.008 IEI)
+     */
+    de_ms_cm_1(tvb, ie_tree, offset, ie_len, NULL, 0);
+
+    return offset + ie_len;
 
 }
 /* 18.4.19 Mobile station state */
 static const value_string bssap_mobile_station_state_values[] = { 
-    { 0x00,            "IDLE or PMM-DETACHED" },
-    { 0x01,            "STANDBY or PMM-IDLE, 0 PDP contexts active" }, 
-    { 0x02,            "STANDBY or PMM-IDLE, 1 or more PDP contexts active" },
-    { 0x03,            "SUSPENDED, 0 PDP contexts active" },
-    { 0x04,            "SUSPENDED, 1 or more PDP contexts active" },
-    { 0x05,            "READY or PMM-CONNECTED, 0 PDP contexts active" },
-    { 0x06,            "READY or PMM-CONNECTED, 1 or more PDP contexts active" },
-    { 0x07,            "IMSI unknown" },
-    { 0x08,            "Information requested not supported" },
+    { 0x00,     "IDLE or PMM-DETACHED" },
+    { 0x01,     "STANDBY or PMM-IDLE, 0 PDP contexts active" }, 
+    { 0x02,     "STANDBY or PMM-IDLE, 1 or more PDP contexts active" },
+    { 0x03,     "SUSPENDED, 0 PDP contexts active" },
+    { 0x04,     "SUSPENDED, 1 or more PDP contexts active" },
+    { 0x05,     "READY or PMM-CONNECTED, 0 PDP contexts active" },
+    { 0x06,     "READY or PMM-CONNECTED, 1 or more PDP contexts active" },
+    { 0x07,     "IMSI unknown" },
+    { 0x08,     "Information requested not supported" },
     { 0,                NULL } 
 };
 static int
 dissect_bssap_mobile_station_state(tvbuff_t *tvb, proto_tree *tree, int offset)
 {
-       proto_item      *item = NULL;
-       proto_tree      *ie_tree = NULL;
-       guint8 ie_len;
-       
-       ie_len = tvb_get_guint8(tvb,offset+1);
-       item = proto_tree_add_item(tree, hf_bssap_mobile_station_state_ie, tvb, offset, ie_len+2, FALSE);
-       ie_tree = proto_item_add_subtree(item, ett_bssap_mobile_station_state);
-
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
-       offset++;
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
-       offset++;
-       /* Mobile station state value (octet 3) */
-       proto_tree_add_item(ie_tree, hf_bssap_mobile_station_state, tvb, offset, ie_len, FALSE);
-
-       return offset + ie_len;
+    proto_item  *item = NULL;
+    proto_tree  *ie_tree = NULL;
+    guint8 ie_len;
+    
+    ie_len = tvb_get_guint8(tvb,offset+1);
+    item = proto_tree_add_item(tree, hf_bssap_mobile_station_state_ie, tvb, offset, ie_len+2, FALSE);
+    ie_tree = proto_item_add_subtree(item, ett_bssap_mobile_station_state);
+
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
+    offset++;
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
+    offset++;
+    /* Mobile station state value (octet 3) */
+    proto_tree_add_item(ie_tree, hf_bssap_mobile_station_state, tvb, offset, ie_len, FALSE);
+
+    return offset + ie_len;
 
 }
 /* 18.4.20 PTMSI */
 static int
 dissect_bssap_ptmsi(tvbuff_t *tvb, proto_tree *tree, int offset)
 {
-       proto_item      *item = NULL;
-       proto_tree      *ie_tree = NULL;
-       guint8 ie_len;
-       
-       ie_len = tvb_get_guint8(tvb,offset+1);
-       item = proto_tree_add_item(tree, hf_bssap_ptmsi_ie, tvb, offset, ie_len+2, FALSE);
-       ie_tree = proto_item_add_subtree(item, ett_bssap_ptmsi);
-
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
-       offset++;
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
-       offset++;
-       /* The PTMSI consists of 4 octets. It can be coded using a full hexadecimal representation
-        * (see 3GPP TS 23.003).
-        */
-       proto_tree_add_item(ie_tree, hf_bssap_ptmsi, tvb, offset, ie_len, FALSE);
-
-       return offset + ie_len;
+    proto_item  *item = NULL;
+    proto_tree  *ie_tree = NULL;
+    guint8 ie_len;
+    
+    ie_len = tvb_get_guint8(tvb,offset+1);
+    item = proto_tree_add_item(tree, hf_bssap_ptmsi_ie, tvb, offset, ie_len+2, FALSE);
+    ie_tree = proto_item_add_subtree(item, ett_bssap_ptmsi);
+
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
+    offset++;
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
+    offset++;
+    /* The PTMSI consists of 4 octets. It can be coded using a full hexadecimal representation
+     * (see 3GPP TS 23.003).
+     */
+    proto_tree_add_item(ie_tree, hf_bssap_ptmsi, tvb, offset, ie_len, FALSE);
+
+    return offset + ie_len;
 
 }
 /* 18.4.21 Reject cause */
 static int
 dissect_bssap_reject_cause(tvbuff_t *tvb, proto_tree *tree, int offset)
 {
-       proto_item      *item = NULL;
-       proto_tree      *ie_tree = NULL;
-       guint8 ie_len;
-       
-       ie_len = tvb_get_guint8(tvb,offset+1);
-       item = proto_tree_add_item(tree, hf_bssap_reject_cause_ie, tvb, offset, ie_len+2, FALSE);
-       ie_tree = proto_item_add_subtree(item, ett_bssap_reject_cause);
-
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
-       offset++;
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
-       offset++;
-       /*      The rest of the information element is coded as the value part of
-        *      the reject cause IE defined in 3GPP TS 24.008, not including
-        *      3GPP TS 24.008 IEI.
-        */
-       de_rej_cause(tvb, ie_tree, offset, ie_len, NULL, 0);
-
-       return offset + ie_len;
+    proto_item  *item = NULL;
+    proto_tree  *ie_tree = NULL;
+    guint8 ie_len;
+    
+    ie_len = tvb_get_guint8(tvb,offset+1);
+    item = proto_tree_add_item(tree, hf_bssap_reject_cause_ie, tvb, offset, ie_len+2, FALSE);
+    ie_tree = proto_item_add_subtree(item, ett_bssap_reject_cause);
+
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
+    offset++;
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
+    offset++;
+    /*  The rest of the information element is coded as the value part of
+     *  the reject cause IE defined in 3GPP TS 24.008, not including
+     *  3GPP TS 24.008 IEI.
+     */
+    de_rej_cause(tvb, ie_tree, offset, ie_len, NULL, 0);
+
+    return offset + ie_len;
 
 }
 
@@ -1379,25 +1379,25 @@ dissect_bssap_reject_cause(tvbuff_t *tvb, proto_tree *tree, int offset)
 static int
 dissect_bssap_service_area_id(tvbuff_t *tvb, proto_tree *tree, int offset)
 {
-       proto_item      *item = NULL;
-       proto_tree      *ie_tree = NULL;
-       guint8 ie_len;
-       
-       ie_len = tvb_get_guint8(tvb,offset+1);
-       item = proto_tree_add_item(tree, hf_bssap_service_area_id_ie, tvb, offset, ie_len+2, FALSE);
-       ie_tree = proto_item_add_subtree(item, ett_bssap_service_area_id);
-
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
-       offset++;
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
-       offset++;
-       /*      The rest of the information element is coded as the the value part
-        *      of the SAI IE defined in 3GPP TS 25.413 (not including
-        *      3GPP TS 25.413 IEI and 3GPP TS 25.413 length indicator).
-        */
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie_data, tvb, offset, ie_len, FALSE);
-
-       return offset + ie_len;
+    proto_item  *item = NULL;
+    proto_tree  *ie_tree = NULL;
+    guint8 ie_len;
+    
+    ie_len = tvb_get_guint8(tvb,offset+1);
+    item = proto_tree_add_item(tree, hf_bssap_service_area_id_ie, tvb, offset, ie_len+2, FALSE);
+    ie_tree = proto_item_add_subtree(item, ett_bssap_service_area_id);
+
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
+    offset++;
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
+    offset++;
+    /*  The rest of the information element is coded as the the value part
+     *  of the SAI IE defined in 3GPP TS 25.413 (not including
+     *  3GPP TS 25.413 IEI and 3GPP TS 25.413 length indicator).
+     */
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie_data, tvb, offset, ie_len, FALSE);
+
+    return offset + ie_len;
 
 }
 
@@ -1411,61 +1411,61 @@ static const true_false_string bssap_extension_value = {
 static int
 dissect_bssap_sgsn_number(tvbuff_t *tvb, proto_tree *tree, int offset)
 {
-       proto_item *item = NULL;
-       proto_tree *ie_tree = NULL;
-       guint8 ie_len;
-       tvbuff_t *number_tvb;
-       const char *digit_str;
-       
-       ie_len = tvb_get_guint8(tvb,offset+1);
-       item = proto_tree_add_item(tree, hf_bssap_sgsn_nr_ie, tvb, offset, ie_len+2, FALSE);
-       ie_tree = proto_item_add_subtree(item, ett_bssap_sgsn_nr);
-
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
-       offset++;
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
-       offset++;
-       /* The SGSN number is coded as a sequence of TBCD digits (as specified in 3GPP TS 29.002), 
-        * compressed two into each octet. The Number is in international E.164 format as indicated by Octet 3
-        * which coding is specified in 3GPP TS 29.002. This is a variable length information element, 
-        * and includes a length indicator. The value part of the SGSN number information element 
-        * (not including IEI, Length indicator and Octet 3) shall not exceed 15 digits.
-        */
-       proto_tree_add_item(ie_tree, hf_bssap_extension, tvb, offset, 1, FALSE);
-       proto_tree_add_item(ie_tree, hf_bssap_type_of_number, tvb, offset, 1, FALSE);
-       proto_tree_add_item(ie_tree, hf_bssap_numbering_plan_id, tvb, offset, 1, FALSE);
-       offset++;
-       number_tvb = tvb_new_subset(tvb, offset, ie_len-1,ie_len-1);
-       digit_str = unpack_digits(number_tvb, 0, &Dgt1_9_bcd, FALSE);
-       proto_tree_add_string(ie_tree, hf_bssap_sgsn_number, number_tvb, 0, -1, digit_str);
-
-
-       return offset + ie_len-1;
+    proto_item *item = NULL;
+    proto_tree *ie_tree = NULL;
+    guint8 ie_len;
+    tvbuff_t *number_tvb;
+    const char *digit_str;
+    
+    ie_len = tvb_get_guint8(tvb,offset+1);
+    item = proto_tree_add_item(tree, hf_bssap_sgsn_nr_ie, tvb, offset, ie_len+2, FALSE);
+    ie_tree = proto_item_add_subtree(item, ett_bssap_sgsn_nr);
+
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
+    offset++;
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
+    offset++;
+    /* The SGSN number is coded as a sequence of TBCD digits (as specified in 3GPP TS 29.002), 
+     * compressed two into each octet. The Number is in international E.164 format as indicated by Octet 3
+     * which coding is specified in 3GPP TS 29.002. This is a variable length information element, 
+     * and includes a length indicator. The value part of the SGSN number information element 
+     * (not including IEI, Length indicator and Octet 3) shall not exceed 15 digits.
+     */
+    proto_tree_add_item(ie_tree, hf_bssap_extension, tvb, offset, 1, FALSE);
+    proto_tree_add_item(ie_tree, hf_bssap_type_of_number, tvb, offset, 1, FALSE);
+    proto_tree_add_item(ie_tree, hf_bssap_numbering_plan_id, tvb, offset, 1, FALSE);
+    offset++;
+    number_tvb = tvb_new_subset(tvb, offset, ie_len-1,ie_len-1);
+    digit_str = unpack_digits(number_tvb, 0, &Dgt1_9_bcd, FALSE);
+    proto_tree_add_string(ie_tree, hf_bssap_sgsn_number, number_tvb, 0, -1, digit_str);
+
+
+    return offset + ie_len-1;
 
 }
 /* 18.4.23 TMSI */
 static int
 dissect_bssap_tmsi(tvbuff_t *tvb, proto_tree *tree, int offset)
 {
-       proto_item      *item = NULL;
-       proto_tree      *ie_tree = NULL;
-       guint8 ie_len;
-       
-       ie_len = tvb_get_guint8(tvb,offset+1);
-       item = proto_tree_add_item(tree, hf_bssap_tmsi_ie, tvb, offset, ie_len+2, FALSE);
-       ie_tree = proto_item_add_subtree(item, ett_bssap_tmsi);
-
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
-       offset++;
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
-       offset++;
-       /* The TMSI consists of 4 octets. It can be coded using a full hexadecimal representation 
-        * (see 3GPP TS 23.003).
-        */
-       proto_tree_add_item(ie_tree, hf_bssap_tmsi, tvb, offset, ie_len, FALSE);
-
-
-       return offset + ie_len;
+    proto_item  *item = NULL;
+    proto_tree  *ie_tree = NULL;
+    guint8 ie_len;
+    
+    ie_len = tvb_get_guint8(tvb,offset+1);
+    item = proto_tree_add_item(tree, hf_bssap_tmsi_ie, tvb, offset, ie_len+2, FALSE);
+    ie_tree = proto_item_add_subtree(item, ett_bssap_tmsi);
+
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
+    offset++;
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
+    offset++;
+    /* The TMSI consists of 4 octets. It can be coded using a full hexadecimal representation 
+     * (see 3GPP TS 23.003).
+     */
+    proto_tree_add_item(ie_tree, hf_bssap_tmsi, tvb, offset, ie_len, FALSE);
+
+
+    return offset + ie_len;
 
 }
 
@@ -1477,23 +1477,23 @@ static const true_false_string bssap_tmsi_flag = {
 static int
 dissect_bssap_tmsi_status(tvbuff_t *tvb, proto_tree *tree, int offset)
 {
-       proto_item      *item = NULL;
-       proto_tree      *ie_tree = NULL;
-       guint8 ie_len;
-       
-       ie_len = tvb_get_guint8(tvb,offset+1);
-       item = proto_tree_add_item(tree, hf_bssap_tmsi_status_ie, tvb, offset, ie_len+2, FALSE);
-       ie_tree = proto_item_add_subtree(item, ett_bssap_tmsi_status);
+    proto_item  *item = NULL;
+    proto_tree  *ie_tree = NULL;
+    guint8 ie_len;
+    
+    ie_len = tvb_get_guint8(tvb,offset+1);
+    item = proto_tree_add_item(tree, hf_bssap_tmsi_status_ie, tvb, offset, ie_len+2, FALSE);
+    ie_tree = proto_item_add_subtree(item, ett_bssap_tmsi_status);
 
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
-       offset++;
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
-       offset++;
-       /* TMSI flag (octet 3) */
-       proto_tree_add_item(ie_tree, hf_bssap_tmsi_status, tvb, offset, ie_len, FALSE);
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
+    offset++;
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
+    offset++;
+    /* TMSI flag (octet 3) */
+    proto_tree_add_item(ie_tree, hf_bssap_tmsi_status, tvb, offset, ie_len, FALSE);
 
 
-       return offset + ie_len;
+    return offset + ie_len;
 
 }
 /* 18.4.25 Uplink Tunnel Payload Control and Info */
@@ -1503,58 +1503,58 @@ static const true_false_string bssap_E_flag = {
 };
 /* 3GPP TS 44.064 B.1.1 TOM Protocol Discriminator */
 static const value_string bssap_tom_prot_disc_values[] = { 
-    { 0x00,            "Not specified" },
-    { 0x01,            "TIA/EIA-136" }, 
-    { 0x02,            "RRLP" },
-    { 0x03,            "Reserved for extension" },
+    { 0x00,     "Not specified" },
+    { 0x01,     "TIA/EIA-136" }, 
+    { 0x02,     "RRLP" },
+    { 0x03,     "Reserved for extension" },
     { 0,                NULL } 
 };
 static int
 dissect_bssap_ulink_tunnel_payload_control_and_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
 {
-       proto_item      *item = NULL;
-       proto_tree      *ie_tree = NULL;
-       tvbuff_t *next_tvb;
-       guint8 ie_len;
-       guint8 octet;
-       guint8 prot_disc;
-       
-       ie_len = tvb_get_guint8(tvb,offset+1);
-       item = proto_tree_add_item(tree, hf_bssap_ulink_tnl_pld_cntrl_amd_inf_ie, tvb, offset, ie_len+2, FALSE);
-       ie_tree = proto_item_add_subtree(item, ett_bssap_ulink_tnl_pld_cntrl_amd_inf);
-
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
-       offset++;
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
-       offset++;
-       /* octet 3 bit 8 Spare */
-       /* octet 3 bit 7 - 4 
-        * TOM Protocol Discriminator: Identifies the protocol using tunnelling of non-GSM signalling.
-        * For coding, see 3GPP TS 44.064.
-        */
-       proto_tree_add_item(ie_tree, hf_bssap_tom_prot_disc, tvb, offset, 1, FALSE);
-       octet = tvb_get_guint8(tvb,offset);
-       prot_disc = (octet&0x78)>>3;
-
-       /* octet 3 bit 3 E: Cipher Request. When set to 1 indicates that the SGSN received the payload in ciphered form,
-        * when set to 0 indicates that the SGSN did not receive the payload in ciphered form.
-        */
-       proto_tree_add_item(ie_tree, hf_bssap_e_bit, tvb, offset, 1, FALSE);
-
-       /* octet 3 bit 2 - 1 
-        * Tunnel Priority: Indicates the priority of the Tunnel Payload. For coding, see Table 20.1: Association
-        * between Tunnel Priority and LLC SAPs.
-        */
-       proto_tree_add_item(ie_tree, hf_bssap_tunnel_prio, tvb, offset, 1, FALSE);
-       /* Tunnel payload */
-       next_tvb = tvb_new_subset(tvb, offset, ie_len-4, ie_len-4);
-
-       if ((prot_disc == 2)&&(rrlp_handle))
-               call_dissector(rrlp_handle, next_tvb, pinfo, ie_tree);
-       else
-               call_dissector(data_handle, next_tvb, pinfo, ie_tree);
-
-       return offset + ie_len;
+    proto_item  *item = NULL;
+    proto_tree  *ie_tree = NULL;
+    tvbuff_t *next_tvb;
+    guint8 ie_len;
+    guint8 octet;
+    guint8 prot_disc;
+    
+    ie_len = tvb_get_guint8(tvb,offset+1);
+    item = proto_tree_add_item(tree, hf_bssap_ulink_tnl_pld_cntrl_amd_inf_ie, tvb, offset, ie_len+2, FALSE);
+    ie_tree = proto_item_add_subtree(item, ett_bssap_ulink_tnl_pld_cntrl_amd_inf);
+
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
+    offset++;
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
+    offset++;
+    /* octet 3 bit 8 Spare */
+    /* octet 3 bit 7 - 4 
+     * TOM Protocol Discriminator: Identifies the protocol using tunnelling of non-GSM signalling.
+     * For coding, see 3GPP TS 44.064.
+     */
+    proto_tree_add_item(ie_tree, hf_bssap_tom_prot_disc, tvb, offset, 1, FALSE);
+    octet = tvb_get_guint8(tvb,offset);
+    prot_disc = (octet&0x78)>>3;
+
+    /* octet 3 bit 3 E: Cipher Request. When set to 1 indicates that the SGSN received the payload in ciphered form,
+     * when set to 0 indicates that the SGSN did not receive the payload in ciphered form.
+     */
+    proto_tree_add_item(ie_tree, hf_bssap_e_bit, tvb, offset, 1, FALSE);
+
+    /* octet 3 bit 2 - 1 
+     * Tunnel Priority: Indicates the priority of the Tunnel Payload. For coding, see Table 20.1: Association
+     * between Tunnel Priority and LLC SAPs.
+     */
+    proto_tree_add_item(ie_tree, hf_bssap_tunnel_prio, tvb, offset, 1, FALSE);
+    /* Tunnel payload */
+    next_tvb = tvb_new_subset(tvb, offset, ie_len-4, ie_len-4);
+
+    if ((prot_disc == 2)&&(rrlp_handle))
+        call_dissector(rrlp_handle, next_tvb, pinfo, ie_tree);
+    else
+        call_dissector(data_handle, next_tvb, pinfo, ie_tree);
+
+    return offset + ie_len;
 
 }
 
@@ -1562,975 +1562,975 @@ dissect_bssap_ulink_tunnel_payload_control_and_info(tvbuff_t *tvb, packet_info *
 static int
 dissect_bssap_vlr_number(tvbuff_t *tvb, proto_tree *tree, int offset)
 {
-       proto_item *item = NULL;
-       proto_tree *ie_tree = NULL;
-       guint8 ie_len;
-       tvbuff_t *number_tvb;
-       const char *digit_str;
-       
-       ie_len = tvb_get_guint8(tvb,offset+1);
-       item = proto_tree_add_item(tree, hf_bssap_vlr_number_ie, tvb, offset, ie_len+2, FALSE);
-       ie_tree = proto_item_add_subtree(item, ett_bssap_vlr_number);
-
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
-       offset++;
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
-       offset++;
-       /*      The VLR number is coded as a sequence of TBCD digits (as specified in 3GPP TS 29.002), 
-        *      compressed two into each octet. The Number is in international E.164 format as indicated by Octet 3
-        *      which coding is specified in 3GPP TS 29.002. This is a variable length information element,
-        *      and includes a length indicator. The value part of the VLR number information element
-        *      (not including IEI, length indicator and Octet 3), shall not exceed 15 digits.
-        */
-
-       proto_tree_add_item(ie_tree, hf_bssap_extension, tvb, offset, 1, FALSE);
-       proto_tree_add_item(ie_tree, hf_bssap_type_of_number, tvb, offset, 1, FALSE);
-       proto_tree_add_item(ie_tree, hf_bssap_numbering_plan_id, tvb, offset, 1, FALSE);
-       offset++;
-       number_tvb = tvb_new_subset(tvb, offset, ie_len-1,ie_len-1);
-       digit_str = unpack_digits(number_tvb, 0, &Dgt1_9_bcd, FALSE);
-       proto_tree_add_string(ie_tree, hf_bssap_sgsn_number, number_tvb, 0, -1, digit_str);
-
-       return offset + ie_len-1;
+    proto_item *item = NULL;
+    proto_tree *ie_tree = NULL;
+    guint8 ie_len;
+    tvbuff_t *number_tvb;
+    const char *digit_str;
+    
+    ie_len = tvb_get_guint8(tvb,offset+1);
+    item = proto_tree_add_item(tree, hf_bssap_vlr_number_ie, tvb, offset, ie_len+2, FALSE);
+    ie_tree = proto_item_add_subtree(item, ett_bssap_vlr_number);
+
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
+    offset++;
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
+    offset++;
+    /*  The VLR number is coded as a sequence of TBCD digits (as specified in 3GPP TS 29.002), 
+     *  compressed two into each octet. The Number is in international E.164 format as indicated by Octet 3
+     *  which coding is specified in 3GPP TS 29.002. This is a variable length information element,
+     *  and includes a length indicator. The value part of the VLR number information element
+     *  (not including IEI, length indicator and Octet 3), shall not exceed 15 digits.
+     */
+
+    proto_tree_add_item(ie_tree, hf_bssap_extension, tvb, offset, 1, FALSE);
+    proto_tree_add_item(ie_tree, hf_bssap_type_of_number, tvb, offset, 1, FALSE);
+    proto_tree_add_item(ie_tree, hf_bssap_numbering_plan_id, tvb, offset, 1, FALSE);
+    offset++;
+    number_tvb = tvb_new_subset(tvb, offset, ie_len-1,ie_len-1);
+    digit_str = unpack_digits(number_tvb, 0, &Dgt1_9_bcd, FALSE);
+    proto_tree_add_string(ie_tree, hf_bssap_sgsn_number, number_tvb, 0, -1, digit_str);
+
+    return offset + ie_len-1;
 
 }
 /* 18.4.27 Global CN-Id */
 static int
 dissect_bssap_global_cn_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
 {
-       proto_item      *item = NULL;
-       proto_tree      *ie_tree = NULL;
-       proto_item      *plmn_item = NULL;
-       proto_tree      *plmn_tree = NULL;
-       proto_item      *global_cn_id_item = NULL;
-       proto_tree      *global_cn_id_tree = NULL;
-       guint8 ie_len;
-       
-       ie_len = tvb_get_guint8(tvb,offset+1);
-       item = proto_tree_add_item(tree, hf_bssap_global_cn_id_ie, tvb, offset, ie_len+2, FALSE);
-       ie_tree = proto_item_add_subtree(item, ett_bssap_global_cn);
-
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
-       offset++;
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
-       offset++;
-       /* The Global CN-Id consists of a PLMN-Id and a CN-Id, see 3GPP TS 23.003. 
-        *      The PLMN-Id consists of MCC and MNC coded according to Location Area Identification
-        * in 3GPP TS 24.008. The CN-Id is an integer defined by O&M.
-        * The least significant bit of the CN-Id field is bit 1 of octet 7 and
-        * the most significant bit is bit 8 of octet 6. If the CN-Id does not fill the field reserved for it,
-        * the rest of the bits are set to '0'.
-        */
-       global_cn_id_item = proto_tree_add_item(ie_tree, hf_bssap_global_cn_id, tvb, offset, ie_len, FALSE);
-       global_cn_id_tree = proto_item_add_subtree(global_cn_id_item, ett_bssap_global_cn_id);
-       /* Octet 3 - 5 PLMN-Id Coded as octets 2 to 4 of the Location Area Identification IE,
-        * defined in 3GPP TS 24.008 (not including 3GPP TS 24.008 IEI and LAC).
-        */
-       plmn_item = proto_tree_add_item(global_cn_id_tree, hf_bssap_plmn_id, tvb, offset, 3, FALSE);
-       plmn_tree = proto_item_add_subtree(plmn_item, ett_bssap_plmn);
-       dissect_e212_mcc_mnc(tvb, pinfo, plmn_tree, offset, TRUE);
-       offset = offset + 3;
-
-       /* Octet 6 - 7 CN-Id (INTEGER 0..4095) */
-       proto_tree_add_item(global_cn_id_tree, hf_bssap_cn_id, tvb, offset, 2, FALSE);
-       offset = offset+2;
-
-       return offset;
+    proto_item  *item = NULL;
+    proto_tree  *ie_tree = NULL;
+    proto_item  *plmn_item = NULL;
+    proto_tree  *plmn_tree = NULL;
+    proto_item  *global_cn_id_item = NULL;
+    proto_tree  *global_cn_id_tree = NULL;
+    guint8 ie_len;
+    
+    ie_len = tvb_get_guint8(tvb,offset+1);
+    item = proto_tree_add_item(tree, hf_bssap_global_cn_id_ie, tvb, offset, ie_len+2, FALSE);
+    ie_tree = proto_item_add_subtree(item, ett_bssap_global_cn);
+
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE);
+    offset++;
+    proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE);
+    offset++;
+    /* The Global CN-Id consists of a PLMN-Id and a CN-Id, see 3GPP TS 23.003. 
+     *  The PLMN-Id consists of MCC and MNC coded according to Location Area Identification
+     * in 3GPP TS 24.008. The CN-Id is an integer defined by O&M.
+     * The least significant bit of the CN-Id field is bit 1 of octet 7 and
+     * the most significant bit is bit 8 of octet 6. If the CN-Id does not fill the field reserved for it,
+     * the rest of the bits are set to '0'.
+     */
+    global_cn_id_item = proto_tree_add_item(ie_tree, hf_bssap_global_cn_id, tvb, offset, ie_len, FALSE);
+    global_cn_id_tree = proto_item_add_subtree(global_cn_id_item, ett_bssap_global_cn_id);
+    /* Octet 3 - 5 PLMN-Id Coded as octets 2 to 4 of the Location Area Identification IE,
+     * defined in 3GPP TS 24.008 (not including 3GPP TS 24.008 IEI and LAC).
+     */
+    plmn_item = proto_tree_add_item(global_cn_id_tree, hf_bssap_plmn_id, tvb, offset, 3, FALSE);
+    plmn_tree = proto_item_add_subtree(plmn_item, ett_bssap_plmn);
+    dissect_e212_mcc_mnc(tvb, pinfo, plmn_tree, offset, TRUE);
+    offset = offset + 3;
+
+    /* Octet 6 - 7 CN-Id (INTEGER 0..4095) */
+    proto_tree_add_item(global_cn_id_tree, hf_bssap_cn_id, tvb, offset, 2, FALSE);
+    offset = offset+2;
+
+    return offset;
 
 }
 
 static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 {
-       proto_item      *bssap_item;
-       proto_tree      *bssap_tree = NULL;
-       guint8          message_type;
-       int                     offset = 0;
-
-       /*
-        * Make entry in the Protocol column on summary display
-        */
-       col_set_str(pinfo->cinfo, COL_PROTOCOL, "BSSAP+");
+    proto_item  *bssap_item;
+    proto_tree  *bssap_tree = NULL;
+    guint8      message_type;
+    int         offset = 0;
+
+    /*
+     * Make entry in the Protocol column on summary display
+     */
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, "BSSAP+");
+    
+    if (pinfo->sccp_info && pinfo->sccp_info->data.co.assoc)
+        pinfo->sccp_info->data.co.assoc->payload = SCCP_PLOAD_BSSAP;
     
-       if (pinfo->sccp_info && pinfo->sccp_info->data.co.assoc)
-               pinfo->sccp_info->data.co.assoc->payload = SCCP_PLOAD_BSSAP;
+    /* create the BSSAP+ protocol tree */
+    bssap_item = proto_tree_add_item(tree, proto_bssap, tvb, 0, -1, FALSE);
+    bssap_tree = proto_item_add_subtree(bssap_item, ett_bssap);
     
-       /* create the BSSAP+ protocol tree */
-       bssap_item = proto_tree_add_item(tree, proto_bssap, tvb, 0, -1, FALSE);
-       bssap_tree = proto_item_add_subtree(bssap_item, ett_bssap);
-       
-       message_type = tvb_get_guint8(tvb,offset);
-       proto_tree_add_item(bssap_tree, hf_bssap_plus_message_type, tvb, offset, 1,FALSE);
-       offset++;
-
-       if (check_col(pinfo->cinfo, COL_INFO)){
-               col_add_str(pinfo->cinfo,COL_INFO, val_to_str(message_type,bssap_plus_message_type_values,"Unknown %u"));
-       }
-
-       switch(message_type){
-       case BSSAP_PAGING_REQUEST:
-               /* IMSI IMSI 18.4.10 M TLV 6-10 */
-               if ( check_ie(tvb, tree, &offset, BSSAP_IMSI))
-                       offset = dissect_bssap_imsi(tvb, bssap_tree, offset);
-
-               /* VLR number VLR number 18.4.26 M TLV 5-11 */ 
-               if ( check_ie(tvb, tree, &offset, BSSAP_VLR_NUMBER))
-                       offset = dissect_bssap_vlr_number(tvb, bssap_tree, offset);
-               
-               /* End of mandatory elements */
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-
-               /* TMSI TMSI 18.4.23 O TLV 6 */
-               if ( check_optional_ie(tvb, offset, BSSAP_TMSI))
-                       offset = dissect_bssap_tmsi(tvb, bssap_tree, offset);
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-
-               /* Location area identifier Location area identifier 18.4.14 O TLV 7 */
-               if ( check_optional_ie(tvb, offset, BSSAP_LOC_AREA_ID))
-                       offset = dissect_bssap_loc_area_id(tvb, bssap_tree, offset);
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-
-               /* Channel needed Channel needed 18.4.2 O TLV 3 */
-               if ( check_optional_ie(tvb, offset, BSSAP_CHANNEL_NEEDED))
-                       offset = dissect_bssap_channel_needed(tvb, bssap_tree, offset);
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-
-               /* eMLPP Priority eMLPP Priority 18.4.4 O TLV 3 */
-               if ( check_optional_ie(tvb, offset, BSSAP_EMLPP_PRIORITY))
-                       offset = dissect_bssap_emlpp_priority(tvb, bssap_tree, offset);
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-
-               /* Global CN-Id Global CN-Id 18.4.27 O TLV 7 */
-               if ( check_optional_ie(tvb, offset, BSSAP_GLOBAL_CN_ID))
-                       offset = dissect_bssap_global_cn_id(tvb, pinfo, bssap_tree, offset);
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-
-               proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
-               break;
-       case BSSAP_PAGING_REJECT:                                       /*  17.1.18 */
-               /* IMSI IMSI 18.4.10 M TLV 6-10 */
-               if ( check_ie(tvb, tree, &offset, BSSAP_IMSI))
-                       offset = dissect_bssap_imsi(tvb, bssap_tree, offset);
-               /* Gs Cause Gs Cause 18.4.7 M TLV 3 */
-               if ( check_ie(tvb, tree, &offset, BSSAP_GS_CAUSE))
-                       offset = dissect_bssap_Gs_cause(tvb, bssap_tree, offset);
-
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-               proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
-               break;
-       case BSSAP_DOWNLINK_TUNNEL_REQUEST:                     /*  17.1.4  */
-               /* IMSI IMSI 18.4.10 M TLV 6-10 */
-               if ( check_ie(tvb, tree, &offset, BSSAP_IMSI))
-                       offset = dissect_bssap_imsi(tvb, bssap_tree, offset);
-
-               /* VLR number VLR number 18.4.26 M TLV 5-11 */
-               if ( check_ie(tvb, tree, &offset, BSSAP_VLR_NUMBER))
-                       offset = dissect_bssap_vlr_number(tvb, bssap_tree, offset);
-
-               /* Downlink Tunnel Payload Control and Info 18.4.3 M TLV 3-223 */ 
-               if ( check_ie(tvb, tree, &offset, BSSAP_DLINK_TNL_PLD_CTR_AND_INF))
-                       offset = dissect_bssap_dlink_tunnel_payload_control_and_info(tvb, pinfo, bssap_tree, offset);
-
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-               proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
-               break;
-       case BSSAP_UPLINK_TUNNEL_REQUEST:                       /*  17.1.23 */
-               /* SGSN number 18.4.22 M TLV 5-11 */
-               if ( check_ie(tvb, tree, &offset, BSSAP_SGSN_NUMBER))
-                       offset = dissect_bssap_sgsn_number(tvb, bssap_tree, offset);
-
-               /* Uplink Tunnel Payload Control and Info 18.4.25 M TLV 3-223 */
-               if ( check_ie(tvb, tree, &offset, BSSAP_ULINK_TNL_PLD_CTR_AND_INF))
-                       offset = dissect_bssap_ulink_tunnel_payload_control_and_info(tvb, pinfo, bssap_tree, offset);
-
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-               proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
-               break;
-       case BSSAP_LOCATION_UPDATE_REQUEST:                     /*  17.1.11 BSSAP+-LOCATION-UPDATE-REQUEST */
-               /* IMSI IMSI 18.4.10 M TLV 6-10 */
-               if ( check_ie(tvb, tree, &offset, BSSAP_IMSI))
-                       offset = dissect_bssap_imsi(tvb, bssap_tree, offset);
-
-               /* SGSN number SGSN number 18.4.22 M TLV 5-11 */
-               if ( check_ie(tvb, tree, &offset, BSSAP_SGSN_NUMBER))
-                       offset = dissect_bssap_sgsn_number(tvb, bssap_tree, offset);
-
-               /* Update type GPRS location update type 18.4.6 M TLV 3 */
-               if ( check_ie(tvb, tree, &offset, BSSAP_GPRS_LOC_UPD_TYPE))
-                       offset = dissect_bssap_gprs_location_update_type(tvb, bssap_tree, offset);
-
-               /* New Cell global identity Cell global identity 18.4.1 M TLV 10 */
-               if ( check_ie(tvb, tree, &offset, BSSAP_CELL_GBL_ID))
-                       offset = dissect_bssap_cell_global_id(tvb, bssap_tree, offset);
-               
-               /* Mobile station classmark Mobile station classmark 1 18.4.18 M TLV 3 */
-               if ( check_ie(tvb, tree, &offset, BSSAP_MOBILE_STN_CLS_MRK1))
-                       offset = dissect_bssap_mobile_stn_cls_mrk1(tvb, bssap_tree, offset);
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-               
-               /* Old location area identifier Location area identifier 18.4.14 O TLV 7 */
-               if ( check_optional_ie(tvb, offset, BSSAP_LOC_AREA_ID))
-                       offset = dissect_bssap_loc_area_id(tvb, bssap_tree, offset);
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-               
-               /* TMSI status TMSI status 18.4.24 O TLV 3 */
-               if ( check_optional_ie(tvb, offset, BSSAP_TMSI_STATUS))
-                       offset = dissect_bssap_tmsi_status(tvb, bssap_tree, offset);
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-
-               /* New service area identification Service area identification 18.4.21b O TLV 9 */
-               if ( check_optional_ie(tvb, offset, BSSAP_SERVICE_AREA_ID))
-                       offset = dissect_bssap_service_area_id(tvb, bssap_tree, offset);
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-
-               /* IMEISV IMEISV 18.4.9 O TLV 10 */
-               if ( check_optional_ie(tvb, offset, BSSAP_IMEISV))
-                       offset = dissect_bssap_imesiv(tvb, bssap_tree, offset);
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-               proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
-               break;
-       case BSSAP_LOCATION_UPDATE_ACCEPT:                      /*  17.1.9  */
-               /* IMSI 18.4.10 M TLV 6-10 */
-               if ( check_ie(tvb, tree, &offset, BSSAP_IMSI))
-                       offset = dissect_bssap_imsi(tvb, bssap_tree, offset);
-
-               /* Location area identifier Location area identifier 18.4.14 M TLV 7 */
-               if ( check_ie(tvb, tree, &offset, BSSAP_LOC_AREA_ID))
-                       offset = dissect_bssap_loc_area_id(tvb, bssap_tree, offset);
-
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-
-               /* New TMSI, or IMSI Mobile identity 18.4.17 O TLV 6-10 */ 
-               if ( check_optional_ie(tvb, offset, BSSAP_MOBILE_ID))
-                       offset = dissect_bssap_mobile_id(tvb, bssap_tree, offset);
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-               proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
-               break;
-       case BSSAP_LOCATION_UPDATE_REJECT:                      /*  17.1.10 */
-               /* IMSI IMSI 18.4.10 M TLV 6-10 */
-               if ( check_ie(tvb, tree, &offset, BSSAP_IMSI))
-                       offset = dissect_bssap_imsi(tvb, bssap_tree, offset);
-               /* Reject cause Reject cause 18.4.21 M TLV 3 */
-               if ( check_ie(tvb, tree, &offset, BSSAP_REJECT_CAUSE))
-                       offset = dissect_bssap_reject_cause(tvb, bssap_tree, offset);
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-               proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
-               break;
-       case BSSAP_TMSI_REALLOCATION_COMPLETE:          /*  17.1.22 */
-               /* IMSI IMSI 18.4.10 M TLV 6-10 */
-               if ( check_ie(tvb, tree, &offset, BSSAP_IMSI))
-                       offset = dissect_bssap_imsi(tvb, bssap_tree, offset);
-
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-
-               /* Cell global identity Cell global identity 18.4.1 O TLV 10 */
-               if ( check_optional_ie(tvb, offset, BSSAP_CELL_GBL_ID))
-                       offset = dissect_bssap_cell_global_id(tvb, bssap_tree, offset);
-
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-
-               /* Service area identification Service area identification 18.4.21b O TLV 9 */
-               if ( check_optional_ie(tvb, offset, BSSAP_SERVICE_AREA_ID))
-                       offset = dissect_bssap_service_area_id(tvb, bssap_tree, offset);
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-               proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
-               break;
-       case BSSAP_ALERT_REQUEST:                                       /*  17.1.3  */
-               /* IMSI IMSI 18.4.10 M TLV 6-10 */
-               if ( check_ie(tvb, tree, &offset, BSSAP_IMSI))
-                       offset = dissect_bssap_imsi(tvb, bssap_tree, offset);
-
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-               proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
-               break;
-       case BSSAP_ALERT_ACK:                                           /*  17.1.1  */
-               /* IMSI IMSI 18.4.10 M TLV 6-10 */
-               if ( check_ie(tvb, tree, &offset, BSSAP_IMSI))
-                       offset = dissect_bssap_imsi(tvb, bssap_tree, offset);
-
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-               proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
-               break;
-       case BSSAP_ALERT_REJECT:                                        /*  17.1.2  */
-               /* IMSI IMSI 18.4.10 M TLV 6-10 */
-               if ( check_ie(tvb, tree, &offset, BSSAP_IMSI))
-                       offset = dissect_bssap_imsi(tvb, bssap_tree, offset);
-
-               /* Gs Cause Gs Cause 18.4.7 M TLV 3 */
-               if ( check_ie(tvb, tree, &offset, BSSAP_GS_CAUSE))
-                       offset = dissect_bssap_Gs_cause(tvb, bssap_tree, offset);
-
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-               proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
-               break;
-       case BSSAP_MS_ACTIVITY_INDICATION:                      /*  17.1.14 */
-               /* IMSI IMSI 18.4.10 M TLV 6-10 */
-               if ( check_ie(tvb, tree, &offset, BSSAP_IMSI))
-                       offset = dissect_bssap_imsi(tvb, bssap_tree, offset);
-
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-
-               /* Cell global identity Cell global identity 18.4.1 O TLV 10 */
-               if ( check_optional_ie(tvb, offset, BSSAP_CELL_GBL_ID))
-                       offset = dissect_bssap_cell_global_id(tvb, bssap_tree, offset);
-
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-
-               /* Service area identification Service area identification 18.4.21b O TLV 9 */
-               if ( check_optional_ie(tvb, offset, BSSAP_SERVICE_AREA_ID))
-                       offset = dissect_bssap_service_area_id(tvb, bssap_tree, offset);
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-               proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
-               break;
-       case BSSAP_GPRS_DETACH_INDICATION:                      /*  17.1.6  */
-               /* IMSI IMSI 18.4.10 M TLV 6-10 */
-               if ( check_ie(tvb, tree, &offset, BSSAP_IMSI))
-                       offset = dissect_bssap_imsi(tvb, bssap_tree, offset);
-
-               /* SGSN number SGSN number 18.4.22 M TLV 5-11 */
-               if ( check_ie(tvb, tree, &offset, BSSAP_SGSN_NUMBER))
-                       offset = dissect_bssap_sgsn_number(tvb, bssap_tree, offset);
-
-               /* IMSI detach from GPRS service type IMSI detach from GPRS service type 18.4.17 M TLV 3 */
-               if ( check_ie(tvb, tree, &offset, BSSAP_IMSI_DET_FROM_GPRS_SERV_TYPE))
-                       offset = dissect_bssap_imsi_det_from_gprs_serv_type(tvb, bssap_tree, offset);
-
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-
-               /* Cell global identity Cell global identity 18.4.1 O TLV 10 */
-               if ( check_optional_ie(tvb, offset, BSSAP_CELL_GBL_ID))
-                       offset = dissect_bssap_cell_global_id(tvb, bssap_tree, offset);
-
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-
-               /* Service area identification Service area identification 18.4.21b O TLV 9 */
-               if ( check_optional_ie(tvb, offset, BSSAP_SERVICE_AREA_ID))
-                       offset = dissect_bssap_service_area_id(tvb, bssap_tree, offset);
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-               proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
-               break;
-       case BSSAP_GPRS_DETACH_ACK:                                     /*  17.1.5  */
-               /* IMSI IMSI 18.4.10 M TLV 6-10 */
-               if ( check_ie(tvb, tree, &offset, BSSAP_IMSI))
-                       offset = dissect_bssap_imsi(tvb, bssap_tree, offset);
-
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-               proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
-               break;
-       case BSSAP_IMSI_DETACH_INDICATION:                      /*  17.1.8  */
-               /* IMSI IMSI 18.4.10 M TLV 6-10 */
-               if ( check_ie(tvb, tree, &offset, BSSAP_IMSI))
-                       offset = dissect_bssap_imsi(tvb, bssap_tree, offset);
-
-               /* SGSN number SGSN number 18.4.22 M TLV 5-11 */
-               if ( check_ie(tvb, tree, &offset, BSSAP_SGSN_NUMBER))
-                       offset = dissect_bssap_sgsn_number(tvb, bssap_tree, offset);
-
-               /* Detach type IMSI detach from non-GPRS service type 18.4.11 M TLV 3 */ 
-               if ( check_ie(tvb, tree, &offset, BSSAP_IMSI_DET_FROM_NON_GPRS_SERV_TYPE))
-                       offset = dissect_bssap_imsi_det_from_non_gprs_serv_type(tvb, bssap_tree, offset);
-
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-
-               /* Cell global identity Cell global identity 18.4.1 O TLV 10 */
-               if ( check_optional_ie(tvb, offset, BSSAP_CELL_GBL_ID))
-                       offset = dissect_bssap_cell_global_id(tvb, bssap_tree, offset);
-
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-
-               /* Location information age Location information age 18.4.14 O TLV 4 */
-               if ( check_optional_ie(tvb, offset, BSSAP_LOC_INF_AGE))
-                       offset = dissect_bssap_location_information_age(tvb, bssap_tree, offset);
-
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-
-               /* Service area identification Service area identification 18.4.21b O TLV 9 */
-               if ( check_optional_ie(tvb, offset, BSSAP_SERVICE_AREA_ID))
-                       offset = dissect_bssap_service_area_id(tvb, bssap_tree, offset);
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-               proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
-               break;
-       case BSSAP_IMSI_DETACH_ACK:                                     /*  17.1.7  */
-               /* IMSI IMSI 18.4.10 M TLV 6-10 */
-               if ( check_ie(tvb, tree, &offset, BSSAP_IMSI))
-                       offset = dissect_bssap_imsi(tvb, bssap_tree, offset);
-
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-               proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
-               break;
-       case BSSAP_RESET_INDICATION:                            /*  17.1.21 */
-               /* Conditional IE:s */
-               /* SGSN number SGSN number 18.4.22 C TLV 5-11 */
-               if ( check_optional_ie(tvb, offset, BSSAP_SGSN_NUMBER)){
-                       offset = dissect_bssap_sgsn_number(tvb, bssap_tree, offset);
-                       if (tvb_length_remaining(tvb,offset) == 0)
-                               return;
-                       proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
-               }else{
-                       /* VLR number VLR number 18.4.26 C TLV 5-11 */
-                       if ( check_optional_ie(tvb, offset, BSSAP_VLR_NUMBER)){
-                               offset = dissect_bssap_vlr_number(tvb, bssap_tree, offset);
-                               if (tvb_length_remaining(tvb,offset) == 0)
-                                       return;
-                               proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
-                       }
-               }
-               proto_tree_add_text(tree, tvb, offset, -1, "Conditional IE");
-               break;
-       case BSSAP_RESET_ACK:                                           /*  17.1.20 */
-               /* Conditional IE:s */
-               /* SGSN number SGSN number 18.4.22 C TLV 5-11 */
-               if ( check_optional_ie(tvb, offset, BSSAP_SGSN_NUMBER)){
-                       offset = dissect_bssap_sgsn_number(tvb, bssap_tree, offset);
-                       if (tvb_length_remaining(tvb,offset) == 0)
-                               return;
-                       proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
-               }else{
-                       /* VLR number VLR number 18.4.26 C TLV 5-11 */
-                       if ( check_optional_ie(tvb, offset, BSSAP_VLR_NUMBER)){
-                               offset = dissect_bssap_vlr_number(tvb, bssap_tree, offset);
-                               if (tvb_length_remaining(tvb,offset) == 0)
-                                       return;
-                               proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
-                       }
-               }
-               proto_tree_add_text(tree, tvb, offset, -1, "Conditional IE");
-               break;
-       case BSSAP_MS_INFORMATION_REQUEST:                      /*  17.1.15 */
-               /* IMSI IMSI 18.4.10 M TLV 6-10 */
-               if ( check_ie(tvb, tree, &offset, BSSAP_IMSI))
-                       offset = dissect_bssap_imsi(tvb, bssap_tree, offset);
-
-               /* Information requested Information requested 18.4.13 M TLV 3 */
-               if ( check_ie(tvb, tree, &offset, BSSAP_INFO_REQ))
-                       offset = dissect_bssap_info_req(tvb, bssap_tree, offset);
-
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-
-               proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
-               break;
-       case BSSAP_MS_INFORMATION_RESPONSE:                     /*  17.1.16 */
-               /* IMSI IMSI 18.4.10 M TLV 6-10 */
-               if ( check_ie(tvb, tree, &offset, BSSAP_IMSI))
-                       offset = dissect_bssap_imsi(tvb, bssap_tree, offset);
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-
-               /* TMSI TMSI 18.4.23 O TLV 6 */
-               if ( check_optional_ie(tvb, offset, BSSAP_TMSI))
-                       offset = dissect_bssap_tmsi(tvb, bssap_tree, offset);
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-
-               /* PTMSI PTMSI 18.4.20 O TLV 6 BSSAP_PTMSI*/
-               if ( check_optional_ie(tvb, offset, BSSAP_PTMSI))
-                       offset = dissect_bssap_ptmsi(tvb, bssap_tree, offset);
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-
-               /* IMEI IMEI 18.4.8 O TLV 10 */
-               if ( check_optional_ie(tvb, offset, BSSAP_IMEI))
-                       offset = dissect_bssap_imei(tvb, bssap_tree, offset);
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-               /* IMEISV IMEISV 18.4.9 O TLV 10 BSSAP_IMEISV*/
-               if ( check_optional_ie(tvb, offset, BSSAP_IMEISV))
-                       offset = dissect_bssap_imesiv(tvb, bssap_tree, offset);
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-
-               /* Cell global identity Cell global identity 18.4.1 O TLV 10 */
-               if ( check_optional_ie(tvb, offset, BSSAP_CELL_GBL_ID))
-                       offset = dissect_bssap_cell_global_id(tvb, bssap_tree, offset);
-
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-               /* Location information age Location information age 18.4.15 O TLV 4 */
-               if ( check_optional_ie(tvb, offset, BSSAP_LOC_INF_AGE))
-                       offset = dissect_bssap_location_information_age(tvb, bssap_tree, offset);
-
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-
-               /* Mobile station state Mobile station state 18.4.19 O TLV 3 */
-               if ( check_optional_ie(tvb, offset, BSSAP_MOBILE_STN_STATE))
-                       offset = dissect_bssap_mobile_station_state(tvb, bssap_tree, offset);
-
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-
-               /* Service area identification Service area identification 18.4.21b O TLV 9 */
-               if ( check_optional_ie(tvb, offset, BSSAP_SERVICE_AREA_ID))
-                       offset = dissect_bssap_service_area_id(tvb, bssap_tree, offset);
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-               proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
-               break;
-       case BSSAP_MM_INFORMATION_REQUEST:                      /*  17.1.12 */
-               /* IMSI IMSI 18.4.10 M TLV 6-10 */
-               if ( check_ie(tvb, tree, &offset, BSSAP_IMSI))
-                       offset = dissect_bssap_imsi(tvb, bssap_tree, offset);
-
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-               /* MM information MM information 18.4.16 O TLV 3-n */
-               if ( check_optional_ie(tvb, offset, BSSAP_MM_INFORMATION))
-                       offset = dissect_bssap_MM_information(tvb, bssap_tree, offset);
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-               proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
-               break;
-       case BSSAP_MOBILE_STATUS:                                       /*  17.1.13 */
-               /* IMSI IMSI 18.4.10 O TLV 6-10 */
-               if ( check_optional_ie(tvb, offset, BSSAP_MM_INFORMATION))
-                               offset = dissect_bssap_imsi(tvb, bssap_tree, offset);
-               /* Gs Cause Gs Cause 18.4.7 M TLV 3 */
-               if ( check_ie(tvb, tree, &offset, BSSAP_GS_CAUSE))
-                       offset = dissect_bssap_Gs_cause(tvb, bssap_tree, offset);
-
-               /* Erroneous message Erroneous message 18.4.5 M TLV 3-n BSSAP_ERRONEOUS_MSG*/
-               if ( check_ie(tvb, tree, &offset, BSSAP_ERRONEOUS_MSG))
-                       offset = dissect_bssap_gprs_erroneous_msg(tvb, bssap_tree, offset);
-
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-               proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
-               break;
-       case BSSAP_MS_UNREACHABLE:                                      /*  17.1.17 */
-               /* IMSI IMSI 18.4.10 M TLV 6-10 */
-               if ( check_ie(tvb, tree, &offset, BSSAP_IMSI))
-                       offset = dissect_bssap_imsi(tvb, bssap_tree, offset);
-
-               /* Gs Cause Gs Cause 18.4.7 M TLV 3 */
-               if ( check_ie(tvb, tree, &offset, BSSAP_GS_CAUSE))
-                       offset = dissect_bssap_Gs_cause(tvb, bssap_tree, offset);
-
-               if (tvb_length_remaining(tvb,offset) == 0)
-                       return;
-               proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
-               break;
-       default:
-               break;
-       }
+    message_type = tvb_get_guint8(tvb,offset);
+    proto_tree_add_item(bssap_tree, hf_bssap_plus_message_type, tvb, offset, 1,FALSE);
+    offset++;
+
+    if (check_col(pinfo->cinfo, COL_INFO)){
+        col_add_str(pinfo->cinfo,COL_INFO, val_to_str(message_type,bssap_plus_message_type_values,"Unknown %u"));
+    }
+
+    switch(message_type){
+    case BSSAP_PAGING_REQUEST:
+        /* IMSI IMSI 18.4.10 M TLV 6-10 */
+        if ( check_ie(tvb, tree, &offset, BSSAP_IMSI))
+            offset = dissect_bssap_imsi(tvb, bssap_tree, offset);
+
+        /* VLR number VLR number 18.4.26 M TLV 5-11 */ 
+        if ( check_ie(tvb, tree, &offset, BSSAP_VLR_NUMBER))
+            offset = dissect_bssap_vlr_number(tvb, bssap_tree, offset);
+        
+        /* End of mandatory elements */
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+
+        /* TMSI TMSI 18.4.23 O TLV 6 */
+        if ( check_optional_ie(tvb, offset, BSSAP_TMSI))
+            offset = dissect_bssap_tmsi(tvb, bssap_tree, offset);
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+
+        /* Location area identifier Location area identifier 18.4.14 O TLV 7 */
+        if ( check_optional_ie(tvb, offset, BSSAP_LOC_AREA_ID))
+            offset = dissect_bssap_loc_area_id(tvb, bssap_tree, offset);
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+
+        /* Channel needed Channel needed 18.4.2 O TLV 3 */
+        if ( check_optional_ie(tvb, offset, BSSAP_CHANNEL_NEEDED))
+            offset = dissect_bssap_channel_needed(tvb, bssap_tree, offset);
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+
+        /* eMLPP Priority eMLPP Priority 18.4.4 O TLV 3 */
+        if ( check_optional_ie(tvb, offset, BSSAP_EMLPP_PRIORITY))
+            offset = dissect_bssap_emlpp_priority(tvb, bssap_tree, offset);
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+
+        /* Global CN-Id Global CN-Id 18.4.27 O TLV 7 */
+        if ( check_optional_ie(tvb, offset, BSSAP_GLOBAL_CN_ID))
+            offset = dissect_bssap_global_cn_id(tvb, pinfo, bssap_tree, offset);
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+
+        proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
+        break;
+    case BSSAP_PAGING_REJECT:                   /*  17.1.18 */
+        /* IMSI IMSI 18.4.10 M TLV 6-10 */
+        if ( check_ie(tvb, tree, &offset, BSSAP_IMSI))
+            offset = dissect_bssap_imsi(tvb, bssap_tree, offset);
+        /* Gs Cause Gs Cause 18.4.7 M TLV 3 */
+        if ( check_ie(tvb, tree, &offset, BSSAP_GS_CAUSE))
+            offset = dissect_bssap_Gs_cause(tvb, bssap_tree, offset);
+
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+        proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
+        break;
+    case BSSAP_DOWNLINK_TUNNEL_REQUEST:         /*  17.1.4  */
+        /* IMSI IMSI 18.4.10 M TLV 6-10 */
+        if ( check_ie(tvb, tree, &offset, BSSAP_IMSI))
+            offset = dissect_bssap_imsi(tvb, bssap_tree, offset);
+
+        /* VLR number VLR number 18.4.26 M TLV 5-11 */
+        if ( check_ie(tvb, tree, &offset, BSSAP_VLR_NUMBER))
+            offset = dissect_bssap_vlr_number(tvb, bssap_tree, offset);
+
+        /* Downlink Tunnel Payload Control and Info 18.4.3 M TLV 3-223 */ 
+        if ( check_ie(tvb, tree, &offset, BSSAP_DLINK_TNL_PLD_CTR_AND_INF))
+            offset = dissect_bssap_dlink_tunnel_payload_control_and_info(tvb, pinfo, bssap_tree, offset);
+
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+        proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
+        break;
+    case BSSAP_UPLINK_TUNNEL_REQUEST:           /*  17.1.23 */
+        /* SGSN number 18.4.22 M TLV 5-11 */
+        if ( check_ie(tvb, tree, &offset, BSSAP_SGSN_NUMBER))
+            offset = dissect_bssap_sgsn_number(tvb, bssap_tree, offset);
+
+        /* Uplink Tunnel Payload Control and Info 18.4.25 M TLV 3-223 */
+        if ( check_ie(tvb, tree, &offset, BSSAP_ULINK_TNL_PLD_CTR_AND_INF))
+            offset = dissect_bssap_ulink_tunnel_payload_control_and_info(tvb, pinfo, bssap_tree, offset);
+
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+        proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
+        break;
+    case BSSAP_LOCATION_UPDATE_REQUEST:         /*  17.1.11 BSSAP+-LOCATION-UPDATE-REQUEST */
+        /* IMSI IMSI 18.4.10 M TLV 6-10 */
+        if ( check_ie(tvb, tree, &offset, BSSAP_IMSI))
+            offset = dissect_bssap_imsi(tvb, bssap_tree, offset);
+
+        /* SGSN number SGSN number 18.4.22 M TLV 5-11 */
+        if ( check_ie(tvb, tree, &offset, BSSAP_SGSN_NUMBER))
+            offset = dissect_bssap_sgsn_number(tvb, bssap_tree, offset);
+
+        /* Update type GPRS location update type 18.4.6 M TLV 3 */
+        if ( check_ie(tvb, tree, &offset, BSSAP_GPRS_LOC_UPD_TYPE))
+            offset = dissect_bssap_gprs_location_update_type(tvb, bssap_tree, offset);
+
+        /* New Cell global identity Cell global identity 18.4.1 M TLV 10 */
+        if ( check_ie(tvb, tree, &offset, BSSAP_CELL_GBL_ID))
+            offset = dissect_bssap_cell_global_id(tvb, bssap_tree, offset);
+        
+        /* Mobile station classmark Mobile station classmark 1 18.4.18 M TLV 3 */
+        if ( check_ie(tvb, tree, &offset, BSSAP_MOBILE_STN_CLS_MRK1))
+            offset = dissect_bssap_mobile_stn_cls_mrk1(tvb, bssap_tree, offset);
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+        
+        /* Old location area identifier Location area identifier 18.4.14 O TLV 7 */
+        if ( check_optional_ie(tvb, offset, BSSAP_LOC_AREA_ID))
+            offset = dissect_bssap_loc_area_id(tvb, bssap_tree, offset);
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+        
+        /* TMSI status TMSI status 18.4.24 O TLV 3 */
+        if ( check_optional_ie(tvb, offset, BSSAP_TMSI_STATUS))
+            offset = dissect_bssap_tmsi_status(tvb, bssap_tree, offset);
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+
+        /* New service area identification Service area identification 18.4.21b O TLV 9 */
+        if ( check_optional_ie(tvb, offset, BSSAP_SERVICE_AREA_ID))
+            offset = dissect_bssap_service_area_id(tvb, bssap_tree, offset);
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+
+        /* IMEISV IMEISV 18.4.9 O TLV 10 */
+        if ( check_optional_ie(tvb, offset, BSSAP_IMEISV))
+            offset = dissect_bssap_imesiv(tvb, bssap_tree, offset);
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+        proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
+        break;
+    case BSSAP_LOCATION_UPDATE_ACCEPT:          /*  17.1.9  */
+        /* IMSI 18.4.10 M TLV 6-10 */
+        if ( check_ie(tvb, tree, &offset, BSSAP_IMSI))
+            offset = dissect_bssap_imsi(tvb, bssap_tree, offset);
+
+        /* Location area identifier Location area identifier 18.4.14 M TLV 7 */
+        if ( check_ie(tvb, tree, &offset, BSSAP_LOC_AREA_ID))
+            offset = dissect_bssap_loc_area_id(tvb, bssap_tree, offset);
+
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+
+        /* New TMSI, or IMSI Mobile identity 18.4.17 O TLV 6-10 */ 
+        if ( check_optional_ie(tvb, offset, BSSAP_MOBILE_ID))
+            offset = dissect_bssap_mobile_id(tvb, bssap_tree, offset);
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+        proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
+        break;
+    case BSSAP_LOCATION_UPDATE_REJECT:          /*  17.1.10 */
+        /* IMSI IMSI 18.4.10 M TLV 6-10 */
+        if ( check_ie(tvb, tree, &offset, BSSAP_IMSI))
+            offset = dissect_bssap_imsi(tvb, bssap_tree, offset);
+        /* Reject cause Reject cause 18.4.21 M TLV 3 */
+        if ( check_ie(tvb, tree, &offset, BSSAP_REJECT_CAUSE))
+            offset = dissect_bssap_reject_cause(tvb, bssap_tree, offset);
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+        proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
+        break;
+    case BSSAP_TMSI_REALLOCATION_COMPLETE:      /*  17.1.22 */
+        /* IMSI IMSI 18.4.10 M TLV 6-10 */
+        if ( check_ie(tvb, tree, &offset, BSSAP_IMSI))
+            offset = dissect_bssap_imsi(tvb, bssap_tree, offset);
+
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+
+        /* Cell global identity Cell global identity 18.4.1 O TLV 10 */
+        if ( check_optional_ie(tvb, offset, BSSAP_CELL_GBL_ID))
+            offset = dissect_bssap_cell_global_id(tvb, bssap_tree, offset);
+
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+
+        /* Service area identification Service area identification 18.4.21b O TLV 9 */
+        if ( check_optional_ie(tvb, offset, BSSAP_SERVICE_AREA_ID))
+            offset = dissect_bssap_service_area_id(tvb, bssap_tree, offset);
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+        proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
+        break;
+    case BSSAP_ALERT_REQUEST:                   /*  17.1.3  */
+        /* IMSI IMSI 18.4.10 M TLV 6-10 */
+        if ( check_ie(tvb, tree, &offset, BSSAP_IMSI))
+            offset = dissect_bssap_imsi(tvb, bssap_tree, offset);
+
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+        proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
+        break;
+    case BSSAP_ALERT_ACK:                       /*  17.1.1  */
+        /* IMSI IMSI 18.4.10 M TLV 6-10 */
+        if ( check_ie(tvb, tree, &offset, BSSAP_IMSI))
+            offset = dissect_bssap_imsi(tvb, bssap_tree, offset);
+
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+        proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
+        break;
+    case BSSAP_ALERT_REJECT:                    /*  17.1.2  */
+        /* IMSI IMSI 18.4.10 M TLV 6-10 */
+        if ( check_ie(tvb, tree, &offset, BSSAP_IMSI))
+            offset = dissect_bssap_imsi(tvb, bssap_tree, offset);
+
+        /* Gs Cause Gs Cause 18.4.7 M TLV 3 */
+        if ( check_ie(tvb, tree, &offset, BSSAP_GS_CAUSE))
+            offset = dissect_bssap_Gs_cause(tvb, bssap_tree, offset);
+
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+        proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
+        break;
+    case BSSAP_MS_ACTIVITY_INDICATION:          /*  17.1.14 */
+        /* IMSI IMSI 18.4.10 M TLV 6-10 */
+        if ( check_ie(tvb, tree, &offset, BSSAP_IMSI))
+            offset = dissect_bssap_imsi(tvb, bssap_tree, offset);
+
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+
+        /* Cell global identity Cell global identity 18.4.1 O TLV 10 */
+        if ( check_optional_ie(tvb, offset, BSSAP_CELL_GBL_ID))
+            offset = dissect_bssap_cell_global_id(tvb, bssap_tree, offset);
+
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+
+        /* Service area identification Service area identification 18.4.21b O TLV 9 */
+        if ( check_optional_ie(tvb, offset, BSSAP_SERVICE_AREA_ID))
+            offset = dissect_bssap_service_area_id(tvb, bssap_tree, offset);
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+        proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
+        break;
+    case BSSAP_GPRS_DETACH_INDICATION:          /*  17.1.6  */
+        /* IMSI IMSI 18.4.10 M TLV 6-10 */
+        if ( check_ie(tvb, tree, &offset, BSSAP_IMSI))
+            offset = dissect_bssap_imsi(tvb, bssap_tree, offset);
+
+        /* SGSN number SGSN number 18.4.22 M TLV 5-11 */
+        if ( check_ie(tvb, tree, &offset, BSSAP_SGSN_NUMBER))
+            offset = dissect_bssap_sgsn_number(tvb, bssap_tree, offset);
+
+        /* IMSI detach from GPRS service type IMSI detach from GPRS service type 18.4.17 M TLV 3 */
+        if ( check_ie(tvb, tree, &offset, BSSAP_IMSI_DET_FROM_GPRS_SERV_TYPE))
+            offset = dissect_bssap_imsi_det_from_gprs_serv_type(tvb, bssap_tree, offset);
+
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+
+        /* Cell global identity Cell global identity 18.4.1 O TLV 10 */
+        if ( check_optional_ie(tvb, offset, BSSAP_CELL_GBL_ID))
+            offset = dissect_bssap_cell_global_id(tvb, bssap_tree, offset);
+
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+
+        /* Service area identification Service area identification 18.4.21b O TLV 9 */
+        if ( check_optional_ie(tvb, offset, BSSAP_SERVICE_AREA_ID))
+            offset = dissect_bssap_service_area_id(tvb, bssap_tree, offset);
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+        proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
+        break;
+    case BSSAP_GPRS_DETACH_ACK:                 /*  17.1.5  */
+        /* IMSI IMSI 18.4.10 M TLV 6-10 */
+        if ( check_ie(tvb, tree, &offset, BSSAP_IMSI))
+            offset = dissect_bssap_imsi(tvb, bssap_tree, offset);
+
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+        proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
+        break;
+    case BSSAP_IMSI_DETACH_INDICATION:          /*  17.1.8  */
+        /* IMSI IMSI 18.4.10 M TLV 6-10 */
+        if ( check_ie(tvb, tree, &offset, BSSAP_IMSI))
+            offset = dissect_bssap_imsi(tvb, bssap_tree, offset);
+
+        /* SGSN number SGSN number 18.4.22 M TLV 5-11 */
+        if ( check_ie(tvb, tree, &offset, BSSAP_SGSN_NUMBER))
+            offset = dissect_bssap_sgsn_number(tvb, bssap_tree, offset);
+
+        /* Detach type IMSI detach from non-GPRS service type 18.4.11 M TLV 3 */ 
+        if ( check_ie(tvb, tree, &offset, BSSAP_IMSI_DET_FROM_NON_GPRS_SERV_TYPE))
+            offset = dissect_bssap_imsi_det_from_non_gprs_serv_type(tvb, bssap_tree, offset);
+
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+
+        /* Cell global identity Cell global identity 18.4.1 O TLV 10 */
+        if ( check_optional_ie(tvb, offset, BSSAP_CELL_GBL_ID))
+            offset = dissect_bssap_cell_global_id(tvb, bssap_tree, offset);
+
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+
+        /* Location information age Location information age 18.4.14 O TLV 4 */
+        if ( check_optional_ie(tvb, offset, BSSAP_LOC_INF_AGE))
+            offset = dissect_bssap_location_information_age(tvb, bssap_tree, offset);
+
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+
+        /* Service area identification Service area identification 18.4.21b O TLV 9 */
+        if ( check_optional_ie(tvb, offset, BSSAP_SERVICE_AREA_ID))
+            offset = dissect_bssap_service_area_id(tvb, bssap_tree, offset);
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+        proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
+        break;
+    case BSSAP_IMSI_DETACH_ACK:                 /*  17.1.7  */
+        /* IMSI IMSI 18.4.10 M TLV 6-10 */
+        if ( check_ie(tvb, tree, &offset, BSSAP_IMSI))
+            offset = dissect_bssap_imsi(tvb, bssap_tree, offset);
+
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+        proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
+        break;
+    case BSSAP_RESET_INDICATION:                /*  17.1.21 */
+        /* Conditional IE:s */
+        /* SGSN number SGSN number 18.4.22 C TLV 5-11 */
+        if ( check_optional_ie(tvb, offset, BSSAP_SGSN_NUMBER)){
+            offset = dissect_bssap_sgsn_number(tvb, bssap_tree, offset);
+            if (tvb_length_remaining(tvb,offset) == 0)
+                return;
+            proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
+        }else{
+            /* VLR number VLR number 18.4.26 C TLV 5-11 */
+            if ( check_optional_ie(tvb, offset, BSSAP_VLR_NUMBER)){
+                offset = dissect_bssap_vlr_number(tvb, bssap_tree, offset);
+                if (tvb_length_remaining(tvb,offset) == 0)
+                    return;
+                proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
+            }
+        }
+        proto_tree_add_text(tree, tvb, offset, -1, "Conditional IE");
+        break;
+    case BSSAP_RESET_ACK:                       /*  17.1.20 */
+        /* Conditional IE:s */
+        /* SGSN number SGSN number 18.4.22 C TLV 5-11 */
+        if ( check_optional_ie(tvb, offset, BSSAP_SGSN_NUMBER)){
+            offset = dissect_bssap_sgsn_number(tvb, bssap_tree, offset);
+            if (tvb_length_remaining(tvb,offset) == 0)
+                return;
+            proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
+        }else{
+            /* VLR number VLR number 18.4.26 C TLV 5-11 */
+            if ( check_optional_ie(tvb, offset, BSSAP_VLR_NUMBER)){
+                offset = dissect_bssap_vlr_number(tvb, bssap_tree, offset);
+                if (tvb_length_remaining(tvb,offset) == 0)
+                    return;
+                proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
+            }
+        }
+        proto_tree_add_text(tree, tvb, offset, -1, "Conditional IE");
+        break;
+    case BSSAP_MS_INFORMATION_REQUEST:          /*  17.1.15 */
+        /* IMSI IMSI 18.4.10 M TLV 6-10 */
+        if ( check_ie(tvb, tree, &offset, BSSAP_IMSI))
+            offset = dissect_bssap_imsi(tvb, bssap_tree, offset);
+
+        /* Information requested Information requested 18.4.13 M TLV 3 */
+        if ( check_ie(tvb, tree, &offset, BSSAP_INFO_REQ))
+            offset = dissect_bssap_info_req(tvb, bssap_tree, offset);
+
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+
+        proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
+        break;
+    case BSSAP_MS_INFORMATION_RESPONSE:         /*  17.1.16 */
+        /* IMSI IMSI 18.4.10 M TLV 6-10 */
+        if ( check_ie(tvb, tree, &offset, BSSAP_IMSI))
+            offset = dissect_bssap_imsi(tvb, bssap_tree, offset);
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+
+        /* TMSI TMSI 18.4.23 O TLV 6 */
+        if ( check_optional_ie(tvb, offset, BSSAP_TMSI))
+            offset = dissect_bssap_tmsi(tvb, bssap_tree, offset);
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+
+        /* PTMSI PTMSI 18.4.20 O TLV 6 BSSAP_PTMSI*/
+        if ( check_optional_ie(tvb, offset, BSSAP_PTMSI))
+            offset = dissect_bssap_ptmsi(tvb, bssap_tree, offset);
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+
+        /* IMEI IMEI 18.4.8 O TLV 10 */
+        if ( check_optional_ie(tvb, offset, BSSAP_IMEI))
+            offset = dissect_bssap_imei(tvb, bssap_tree, offset);
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+        /* IMEISV IMEISV 18.4.9 O TLV 10 BSSAP_IMEISV*/
+        if ( check_optional_ie(tvb, offset, BSSAP_IMEISV))
+            offset = dissect_bssap_imesiv(tvb, bssap_tree, offset);
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+
+        /* Cell global identity Cell global identity 18.4.1 O TLV 10 */
+        if ( check_optional_ie(tvb, offset, BSSAP_CELL_GBL_ID))
+            offset = dissect_bssap_cell_global_id(tvb, bssap_tree, offset);
+
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+        /* Location information age Location information age 18.4.15 O TLV 4 */
+        if ( check_optional_ie(tvb, offset, BSSAP_LOC_INF_AGE))
+            offset = dissect_bssap_location_information_age(tvb, bssap_tree, offset);
+
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+
+        /* Mobile station state Mobile station state 18.4.19 O TLV 3 */
+        if ( check_optional_ie(tvb, offset, BSSAP_MOBILE_STN_STATE))
+            offset = dissect_bssap_mobile_station_state(tvb, bssap_tree, offset);
+
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+
+        /* Service area identification Service area identification 18.4.21b O TLV 9 */
+        if ( check_optional_ie(tvb, offset, BSSAP_SERVICE_AREA_ID))
+            offset = dissect_bssap_service_area_id(tvb, bssap_tree, offset);
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+        proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
+        break;
+    case BSSAP_MM_INFORMATION_REQUEST:          /*  17.1.12 */
+        /* IMSI IMSI 18.4.10 M TLV 6-10 */
+        if ( check_ie(tvb, tree, &offset, BSSAP_IMSI))
+            offset = dissect_bssap_imsi(tvb, bssap_tree, offset);
+
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+        /* MM information MM information 18.4.16 O TLV 3-n */
+        if ( check_optional_ie(tvb, offset, BSSAP_MM_INFORMATION))
+            offset = dissect_bssap_MM_information(tvb, bssap_tree, offset);
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+        proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
+        break;
+    case BSSAP_MOBILE_STATUS:                   /*  17.1.13 */
+        /* IMSI IMSI 18.4.10 O TLV 6-10 */
+        if ( check_optional_ie(tvb, offset, BSSAP_MM_INFORMATION))
+                offset = dissect_bssap_imsi(tvb, bssap_tree, offset);
+        /* Gs Cause Gs Cause 18.4.7 M TLV 3 */
+        if ( check_ie(tvb, tree, &offset, BSSAP_GS_CAUSE))
+            offset = dissect_bssap_Gs_cause(tvb, bssap_tree, offset);
+
+        /* Erroneous message Erroneous message 18.4.5 M TLV 3-n BSSAP_ERRONEOUS_MSG*/
+        if ( check_ie(tvb, tree, &offset, BSSAP_ERRONEOUS_MSG))
+            offset = dissect_bssap_gprs_erroneous_msg(tvb, bssap_tree, offset);
+
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+        proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
+        break;
+    case BSSAP_MS_UNREACHABLE:                  /*  17.1.17 */
+        /* IMSI IMSI 18.4.10 M TLV 6-10 */
+        if ( check_ie(tvb, tree, &offset, BSSAP_IMSI))
+            offset = dissect_bssap_imsi(tvb, bssap_tree, offset);
+
+        /* Gs Cause Gs Cause 18.4.7 M TLV 3 */
+        if ( check_ie(tvb, tree, &offset, BSSAP_GS_CAUSE))
+            offset = dissect_bssap_Gs_cause(tvb, bssap_tree, offset);
+
+        if (tvb_length_remaining(tvb,offset) == 0)
+            return;
+        proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data");
+        break;
+    default:
+        break;
+    }
 }
 
 static gboolean
 dissect_bssap_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 {
-       /* Is it a BSSAP/BSAP packet?
-        *    If octet_1 == 0x00 and octet_2 == length(tvb) - 2
-        * or if octet_1 == 0x01 and octet_3 == length(tvb) - 3
-        * then we'll assume it is a bssap packet
-        *    If octet_1 == 0x00 a further check is done
-        *    to differentiate a BSSMAP BLOCK message from a
-        *    RANAP DirectTransfer (under certain conditions)
-        */
-       switch (tvb_get_guint8(tvb, 0))
-       {
-       case 0x00:
-               if (tvb_get_guint8(tvb, 1) != (tvb_length(tvb) - 2)) { return(FALSE); }
-               if (tvb_get_guint8(tvb, 2) == 0x40 && tvb_get_guint8(tvb, 3) != 0x01) { 
-                       return(FALSE); }
-               break;
-
-       case 0x01:
-               if (tvb_get_guint8(tvb, 2) != (tvb_length(tvb) - 3)) { return(FALSE); }
-               break;
-
-       default:
-               return(FALSE);
-       }
-
-       dissect_bssap(tvb, pinfo, tree);
-
-       return(TRUE);
+    /* Is it a BSSAP/BSAP packet?
+     *    If octet_1 == 0x00 and octet_2 == length(tvb) - 2
+     * or if octet_1 == 0x01 and octet_3 == length(tvb) - 3
+     * then we'll assume it is a bssap packet
+     *    If octet_1 == 0x00 a further check is done
+     *    to differentiate a BSSMAP BLOCK message from a
+     *    RANAP DirectTransfer (under certain conditions)
+     */
+    switch (tvb_get_guint8(tvb, 0))
+    {
+    case 0x00:
+        if (tvb_get_guint8(tvb, 1) != (tvb_length(tvb) - 2)) { return(FALSE); }
+        if (tvb_get_guint8(tvb, 2) == 0x40 && tvb_get_guint8(tvb, 3) != 0x01) { 
+            return(FALSE); }
+        break;
+
+    case 0x01:
+        if (tvb_get_guint8(tvb, 2) != (tvb_length(tvb) - 3)) { return(FALSE); }
+        break;
+
+    default:
+        return(FALSE);
+    }
+
+    dissect_bssap(tvb, pinfo, tree);
+
+    return(TRUE);
 }
 
 /* Register the protocol with Wireshark */
 void
 proto_register_bssap(void)
 {
-       module_t        *bssap_module;
-
-       /* Setup list of header fields */
-       static hf_register_info hf[] = {
-           { &hf_bssap_pdu_type,
-             { "Message Type", "bssap.pdu_type",
-               FT_UINT8, BASE_HEX, VALS(bssap_pdu_type_values), 0x0,
-               NULL, HFILL}},
-           { &hf_bsap_pdu_type,
-             { "Message Type", "bsap.pdu_type",
-               FT_UINT8, BASE_HEX, VALS(bsap_pdu_type_values), 0x0,
-               NULL, HFILL}},
-           { &hf_bssap_dlci_cc,
-             { "Control Channel", "bssap.dlci.cc",
-               FT_UINT8, BASE_HEX, VALS(bssap_cc_values), CC_MASK,
-               NULL, HFILL}},
-           { &hf_bsap_dlci_cc,
-             { "Control Channel", "bsap.dlci.cc",
-               FT_UINT8, BASE_HEX, VALS(bsap_cc_values), CC_MASK,
-               NULL, HFILL}},
-           { &hf_bssap_dlci_spare,
-             { "Spare", "bssap.dlci.spare",
-               FT_UINT8, BASE_HEX, NULL, SPARE_MASK,
-               NULL, HFILL}},
-           { &hf_bsap_dlci_rsvd,
-             { "Reserved", "bsap.dlci.rsvd",
-               FT_UINT8, BASE_HEX, NULL, SPARE_MASK,
-               NULL, HFILL}},
-           { &hf_bssap_dlci_sapi,
-             { "SAPI", "bssap.dlci.sapi",
-               FT_UINT8, BASE_HEX, VALS(bssap_sapi_values), SAPI_MASK,
-               NULL, HFILL}},
-           { &hf_bsap_dlci_sapi,
-             { "SAPI", "bsap.dlci.sapi",
-               FT_UINT8, BASE_HEX, VALS(bsap_sapi_values), SAPI_MASK,
-               NULL, HFILL}},
-           { &hf_bssap_length,
-             { "Length", "bssap.length",
-               FT_UINT8, BASE_DEC, NULL, 0x0,
-               NULL, HFILL}},
-
-           { &hf_bssap_plus_message_type,
-             { "Message Type", "bssap_plus.msg_type",
-               FT_UINT8, BASE_DEC, VALS(bssap_plus_message_type_values), 0x0,
-               NULL, HFILL}},
-           { &hf_bssap_plus_ie,
-             { "IEI", "bssap_plus.iei",
-               FT_UINT8, BASE_DEC, VALS(bssap_plus_ie_id_values), 0x0,
-               NULL, HFILL}},
-           { &hf_bssap_plus_ie_len,
-             { "Length indicator", "bssap_plus.iei",
-               FT_UINT8, BASE_DEC, NULL, 0x0,
-               NULL, HFILL}},
-           { &hf_bssap_extension,
-             { "Extension", "bssap.extension",
-               FT_BOOLEAN, 8, TFS(&bssap_extension_value), 0x80,
-               NULL, HFILL }},
-           { &hf_bssap_type_of_number,
-             { "Type of number", "bssap.type_of_number",
-               FT_UINT8, BASE_HEX, VALS(gsm_a_type_of_number_values), 0x70,
-               NULL, HFILL }},
-           { &hf_bssap_numbering_plan_id,
-             { "Numbering plan identification", "bssap.number_plan",
-               FT_UINT8, BASE_HEX, VALS(gsm_a_numbering_plan_id_values), 0x0f,
-               NULL, HFILL }},
-           { &hf_bssap_sgsn_number,
-             { "SGSN number", "bssap.sgsn_number",
-               FT_STRING, BASE_NONE, NULL, 0,
-               NULL, HFILL }},
-           { &hf_bssap_vlr_number,
-             { "VLR number", "bssap.vlr_number",
-               FT_STRING, BASE_NONE, NULL, 0,
-               NULL, HFILL }},
-           { &hf_bssap_cell_global_id_ie,
-             { "Cell global identity IE", "bssap.cell_global_id_ie",
-               FT_NONE, BASE_NONE, NULL, 0,
-               NULL, HFILL }},
-           { &hf_bssap_channel_needed_ie,
-             { "Channel needed IE", "bssap.cell_global_id_ie",
-               FT_NONE, BASE_NONE, NULL, 0,
-               NULL, HFILL }},
-           { &hf_bssap_dlink_tnl_pld_cntrl_amd_inf_ie,
-             { "Downlink Tunnel Payload Control and Info IE", "bssap.dlink_tnl_pld_cntrl_amd_inf_ie",
-               FT_NONE, BASE_NONE, NULL, 0,
-               NULL, HFILL }},
-           { &hf_bssap_ulink_tnl_pld_cntrl_amd_inf_ie,
-             { "Uplink Tunnel Payload Control and Info IE", "bssap.ulink_tnl_pld_cntrl_amd_inf_ie",
-               FT_NONE, BASE_NONE, NULL, 0,
-               NULL, HFILL }},
-           { &hf_bssap_emlpp_prio_ie,
-             { "eMLPP Priority IE", "bssap.emlpp_prio_ie",
-               FT_NONE, BASE_NONE, NULL, 0,
-               NULL, HFILL }},
-           { &hf_bssap_gprs_erroneous_msg_ie,
-             { "Erroneous message IE", "bssap.erroneous_msg_ie",
-               FT_NONE, BASE_NONE, NULL, 0,
-               NULL, HFILL }},
-           { &hf_bssap_gprs_loc_upd_type_ie,
-             { "GPRS location update type IE", "bssap.loc_upd_type_ie",
-               FT_NONE, BASE_NONE, NULL, 0,
-               NULL, HFILL }},
-           { &hf_bssap_Gs_cause_ie,
-             { "Gs Cause IE", "bssap.Gs_cause_ie",
-               FT_NONE, BASE_NONE, NULL, 0,
-               NULL, HFILL }},
-           { &hf_bssap_imei_ie,
-             { "IMEI IE", "bssap.imei_ie",
-               FT_NONE, BASE_NONE, NULL, 0,
-               NULL, HFILL }},
-           { &hf_bssap_imesiv_ie,
-             { "IMEISV IE", "bssap.imesiv",
-               FT_NONE, BASE_NONE, NULL, 0,
-               NULL, HFILL }},
-           { &hf_bssap_imsi_ie,
-             { "IMSI IE", "bssap.imsi_ie",
-               FT_NONE, BASE_NONE, NULL, 0,
-               NULL, HFILL }},
-           { &hf_bssap_imsi_det_from_gprs_serv_type_ie,
-             { "IMSI detach from GPRS service type IE", "bssap.msi_det_from_gprs_serv_type_ie",
-               FT_NONE, BASE_NONE, NULL, 0,
-               NULL, HFILL }},
-           { &hf_bssap_imsi_det_from_non_gprs_serv_type_ie,
-             { "IMSI detach from non-GPRS service IE", "bssap.msi_det_from_non_gprs_serv_type_ie",
-               FT_NONE, BASE_NONE, NULL, 0,
-               NULL, HFILL }},
-           { &hf_bssap_info_req_ie,
-             { "Information requested IE", "bssap.info_req_ie",
-               FT_NONE, BASE_NONE, NULL, 0,
-               NULL, HFILL }},
-           { &hf_bssap_loc_area_id_ie,
-             { "Location area identifier IE", "bssap.loc_area_id_ie",
-               FT_NONE, BASE_NONE, NULL, 0,
-               NULL, HFILL }},
-           { &hf_bssap_loc_inf_age_ie,
-             { "Location information age IE", "bssap.loc_inf_age_ie",
-               FT_NONE, BASE_NONE, NULL, 0,
-               NULL, HFILL }},
-           { &hf_bssap_mm_information_ie,
-             { "MM information IE", "bssap.mm_information",
-               FT_NONE, BASE_NONE, NULL, 0,
-               NULL, HFILL }},
-           { &hf_bssap_mobile_id_ie,
-             { "Mobile identity IE", "bssap.mobile_id_ie",
-               FT_NONE, BASE_NONE, NULL, 0,
-               NULL, HFILL }},
-           { &hf_bssap_mobile_stn_cls_mrk1_ie,
-             { "Mobile station classmark 1 IE", "bssap.mobile_stn_cls_mrk1_ie",
-               FT_NONE, BASE_NONE, NULL, 0,
-               NULL, HFILL }},
-           { &hf_bssap_mobile_station_state_ie,
-             { "Mobile station state IE", "bssap.mobile_station_state_ie",
-               FT_NONE, BASE_NONE, NULL, 0,
-               NULL, HFILL }},
-           { &hf_bssap_ptmsi_ie,
-             { "PTMSI IE", "bssap.ptmsi_ie",
-               FT_NONE, BASE_NONE, NULL, 0,
-               NULL, HFILL }},
-           { &hf_bssap_reject_cause_ie,
-             { "Reject cause IE", "bssap.reject_cause_ie",
-               FT_NONE, BASE_NONE, NULL, 0,
-               NULL, HFILL }},
-           { &hf_bssap_service_area_id_ie,
-             { "Service area identification IE", "bssap.mobile_stn_cls_mrk1_ie",
-               FT_NONE, BASE_NONE, NULL, 0,
-               "Mobile station classmark 1", HFILL }},
-           { &hf_bssap_sgsn_nr_ie,
-             { "SGSN number IE", "bssap.imsi_ie",
-               FT_NONE, BASE_NONE, NULL, 0,
-               NULL, HFILL }}, 
-           { &hf_bssap_tmsi_ie,
-             { "TMSI IE", "bssap.tmsi_ie",
-               FT_NONE, BASE_NONE, NULL, 0,
-               NULL, HFILL }}, 
-           { &hf_bssap_tmsi_status_ie,
-             { "TMSI status IE", "bssap.tmsi_status_ie",
-               FT_NONE, BASE_NONE, NULL, 0,
-               NULL, HFILL }},
-           { &hf_bssap_vlr_number_ie,
-             { "VLR number IE", "bssap.vlr_number_ie",
-               FT_NONE, BASE_NONE, NULL, 0,
-               NULL, HFILL }},
-           { &hf_bssap_global_cn_id_ie,
-             { "Global CN-Id IE", "bssap.global_cn_id_ie",
-               FT_NONE, BASE_NONE, NULL, 0,
-               NULL, HFILL }},
-
-           { &hf_bssap_plus_ie_data,
-             { "IE Data", "bssap.ie_data",
-               FT_BYTES, BASE_NONE, NULL, 0,
-               NULL, HFILL }},
-
-           { &hf_bssap_call_priority,
-             { "eMLPP Priority", "bssap.gprs_loc_upd_type",
-               FT_UINT8, BASE_DEC, VALS(bssap_call_priority_values), 0x07,
-               NULL, HFILL}},
-           { &hf_bssap_gprs_loc_upd_type,
-             { "GPRS location update type", "bssap.gprs_loc_upd_type",
-               FT_UINT8, BASE_DEC, VALS(bssap_plus_GPRS_loc_upd_type_values), 0x0,
-               NULL, HFILL}},
-           { &hf_bssap_Gs_cause,
-             { "Gs cause", "bssap.gprs_loc_upd_type",
-               FT_UINT8, BASE_DEC, VALS(bssap_Gs_cause_values), 0x0,
-               NULL, HFILL}},
-           { &hf_bssap_imei,
-             { "IMEI", "bssap.imei",
-               FT_STRING, BASE_NONE, NULL, 0,
-               NULL, HFILL }},
-           { &hf_bssap_imeisv,
-             { "IMEISV", "bssap.imeisv",
-               FT_STRING, BASE_NONE, NULL, 0,
-               NULL, HFILL }},
-           { &hf_bssap_imsi,
-             { "IMSI", "bssap.imsi",
-               FT_STRING, BASE_NONE, NULL, 0,
-               NULL, HFILL }},
-           { &hf_bssap_imsi_det_from_gprs_serv_type,
-             { "IMSI detach from GPRS service type", "bssap.imsi_det_from_gprs_serv_type",
-               FT_UINT8, BASE_DEC, VALS(bssap_Gs_cause_values), 0x0,
-               NULL, HFILL}},
-           { &hf_bssap_info_req,
-             { "Information requested", "bssap.info_req",
-               FT_UINT8, BASE_DEC, VALS(bssap_info_req_values), 0x0,
-               NULL, HFILL}},
-           { &hf_bssap_loc_inf_age,
-             { "AgeOfLocationInformation in minutes", "bssap.loc_inf_age",
-               FT_UINT16, BASE_DEC, NULL, 0x0,
-               NULL, HFILL}},
-           { &hf_bssap_mobile_station_state,
-             { "Mobile station state", "bssap.mobile_station_state",
-               FT_UINT8, BASE_DEC, VALS(bssap_mobile_station_state_values), 0x0,
-               NULL, HFILL}},
-           { &hf_bssap_ptmsi,
-             { "PTMSI", "bssap.ptmsi",
-               FT_BYTES, BASE_NONE, NULL, 0x0,
-               NULL, HFILL}},
-           { &hf_bssap_tmsi,
-             { "TMSI", "bssap.tmsi",
-               FT_BYTES, BASE_NONE, NULL, 0x0,
-               NULL, HFILL}},
-           { &hf_bssap_tmsi_status,
-             { "TMSI status", "bssap.tmsi_status",
-               FT_BOOLEAN, 8, TFS(&bssap_tmsi_flag), 0x01,
-               NULL, HFILL }},
-           { &hf_bssap_tom_prot_disc,
-             { "TOM Protocol Discriminator", "bssap.Tom_prot_disc",
-               FT_UINT8, BASE_DEC, VALS(bssap_tom_prot_disc_values), 0x78,
-               NULL, HFILL}},
-           { &hf_bssap_e_bit,
-             { "E: Cipher Request", "bssap.tmsi_status",
-               FT_BOOLEAN, 8, TFS(&bssap_E_flag), 0x04,
-               NULL, HFILL }},
-           { &hf_bssap_tunnel_prio,
-             { "Tunnel Priority", "bssap.tunnel_prio",
-               FT_UINT8, BASE_DEC, NULL, 0x0,
-               NULL, HFILL}},
-           { &hf_bssap_global_cn_id,
-             { "Global CN-Id", "bssap.global_cn_id",
-               FT_BYTES, BASE_NONE, NULL, 0x0,
-               NULL, HFILL}},
-           { &hf_bssap_plmn_id,
-             { "PLMN-Id", "bssap.plmn_id",
-               FT_BYTES, BASE_NONE, NULL, 0x0,
-               NULL, HFILL}},
-           { &hf_bssap_cn_id,
-             { "CN-Id", "bssap.cn_id",
-               FT_UINT16, BASE_DEC, NULL, 0x0,
-               NULL, HFILL}},
-           { &hf_bssap_cell_global_id,
-             { "Cell global identity", "bssap.plmn_id",
-               FT_BYTES, BASE_NONE, NULL, 0x0,
-               NULL, HFILL}},
-       };
-
-       /* Setup protocol subtree array */
-       static gint *ett[] = {
-               &ett_bssap,
-               &ett_bssap_dlci,
-               &ett_bssap_imsi,
-               &ett_bssap_imsi_det_from_gprs_serv_type,
-               &ett_bssap_imsi_det_from_non_gprs_serv_type,
-               &ett_bssap_info_req,
-               &ett_bssap_loc_area_id,
-               &ett_bssap_loc_inf_age,
-               &ett_bssap_mm_information,
-               &ett_bssap_mobile_id,
-               &ett_bssap_sgsn_nr,
-               &ett_bssap_tmsi,
-               &ett_bssap_tmsi_status,
-               &ett_bssap_vlr_number,
-               &ett_bssap_global_cn,
-               &ett_bssap_gprs_loc_upd,
-               &ett_bassp_Gs_cause,
-               &ett_bassp_imei,
-               &ett_bassp_imesiv,
-               &ett_bssap_cell_global_id,
-               &ett_bssap_cgi,
-               &ett_bssap_channel_needed,
-               &ett_bssap_dlink_tnl_pld_cntrl_amd_inf,
-               &ett_bssap_ulink_tnl_pld_cntrl_amd_inf,
-               &ett_bssap_emlpp_prio,
-               &ett_bssap_erroneous_msg,
-               &ett_bssap_mobile_stn_cls_mrk1,
-               &ett_bssap_mobile_station_state,
-               &ett_bssap_ptmsi,
-               &ett_bssap_reject_cause,
-               &ett_bssap_service_area_id,
-               &ett_bssap_global_cn_id,
-               &ett_bssap_plmn,
-       };
+    module_t    *bssap_module;
+
+    /* Setup list of header fields */
+    static hf_register_info hf[] = {
+        { &hf_bssap_pdu_type,
+          { "Message Type", "bssap.pdu_type",
+        FT_UINT8, BASE_HEX, VALS(bssap_pdu_type_values), 0x0,
+        NULL, HFILL}},
+        { &hf_bsap_pdu_type,
+          { "Message Type", "bsap.pdu_type",
+        FT_UINT8, BASE_HEX, VALS(bsap_pdu_type_values), 0x0,
+        NULL, HFILL}},
+        { &hf_bssap_dlci_cc,
+          { "Control Channel", "bssap.dlci.cc",
+        FT_UINT8, BASE_HEX, VALS(bssap_cc_values), CC_MASK,
+        NULL, HFILL}},
+        { &hf_bsap_dlci_cc,
+          { "Control Channel", "bsap.dlci.cc",
+        FT_UINT8, BASE_HEX, VALS(bsap_cc_values), CC_MASK,
+        NULL, HFILL}},
+        { &hf_bssap_dlci_spare,
+          { "Spare", "bssap.dlci.spare",
+        FT_UINT8, BASE_HEX, NULL, SPARE_MASK,
+        NULL, HFILL}},
+        { &hf_bsap_dlci_rsvd,
+          { "Reserved", "bsap.dlci.rsvd",
+        FT_UINT8, BASE_HEX, NULL, SPARE_MASK,
+        NULL, HFILL}},
+        { &hf_bssap_dlci_sapi,
+          { "SAPI", "bssap.dlci.sapi",
+        FT_UINT8, BASE_HEX, VALS(bssap_sapi_values), SAPI_MASK,
+        NULL, HFILL}},
+        { &hf_bsap_dlci_sapi,
+          { "SAPI", "bsap.dlci.sapi",
+        FT_UINT8, BASE_HEX, VALS(bsap_sapi_values), SAPI_MASK,
+        NULL, HFILL}},
+        { &hf_bssap_length,
+          { "Length", "bssap.length",
+        FT_UINT8, BASE_DEC, NULL, 0x0,
+        NULL, HFILL}},
+
+        { &hf_bssap_plus_message_type,
+          { "Message Type", "bssap_plus.msg_type",
+        FT_UINT8, BASE_DEC, VALS(bssap_plus_message_type_values), 0x0,
+        NULL, HFILL}},
+        { &hf_bssap_plus_ie,
+          { "IEI", "bssap_plus.iei",
+        FT_UINT8, BASE_DEC, VALS(bssap_plus_ie_id_values), 0x0,
+        NULL, HFILL}},
+        { &hf_bssap_plus_ie_len,
+          { "Length indicator", "bssap_plus.iei",
+        FT_UINT8, BASE_DEC, NULL, 0x0,
+        NULL, HFILL}},
+        { &hf_bssap_extension,
+          { "Extension", "bssap.extension",
+            FT_BOOLEAN, 8, TFS(&bssap_extension_value), 0x80,
+            NULL, HFILL }},
+        { &hf_bssap_type_of_number,
+          { "Type of number", "bssap.type_of_number",
+            FT_UINT8, BASE_HEX, VALS(gsm_a_type_of_number_values), 0x70,
+            NULL, HFILL }},
+        { &hf_bssap_numbering_plan_id,
+          { "Numbering plan identification", "bssap.number_plan",
+            FT_UINT8, BASE_HEX, VALS(gsm_a_numbering_plan_id_values), 0x0f,
+            NULL, HFILL }},
+        { &hf_bssap_sgsn_number,
+          { "SGSN number", "bssap.sgsn_number",
+            FT_STRING, BASE_NONE, NULL, 0,
+            NULL, HFILL }},
+        { &hf_bssap_vlr_number,
+          { "VLR number", "bssap.vlr_number",
+            FT_STRING, BASE_NONE, NULL, 0,
+            NULL, HFILL }},
+        { &hf_bssap_cell_global_id_ie,
+          { "Cell global identity IE", "bssap.cell_global_id_ie",
+            FT_NONE, BASE_NONE, NULL, 0,
+            NULL, HFILL }},
+        { &hf_bssap_channel_needed_ie,
+          { "Channel needed IE", "bssap.cell_global_id_ie",
+            FT_NONE, BASE_NONE, NULL, 0,
+            NULL, HFILL }},
+        { &hf_bssap_dlink_tnl_pld_cntrl_amd_inf_ie,
+          { "Downlink Tunnel Payload Control and Info IE", "bssap.dlink_tnl_pld_cntrl_amd_inf_ie",
+            FT_NONE, BASE_NONE, NULL, 0,
+            NULL, HFILL }},
+        { &hf_bssap_ulink_tnl_pld_cntrl_amd_inf_ie,
+          { "Uplink Tunnel Payload Control and Info IE", "bssap.ulink_tnl_pld_cntrl_amd_inf_ie",
+            FT_NONE, BASE_NONE, NULL, 0,
+            NULL, HFILL }},
+        { &hf_bssap_emlpp_prio_ie,
+          { "eMLPP Priority IE", "bssap.emlpp_prio_ie",
+            FT_NONE, BASE_NONE, NULL, 0,
+            NULL, HFILL }},
+        { &hf_bssap_gprs_erroneous_msg_ie,
+          { "Erroneous message IE", "bssap.erroneous_msg_ie",
+            FT_NONE, BASE_NONE, NULL, 0,
+            NULL, HFILL }},
+        { &hf_bssap_gprs_loc_upd_type_ie,
+          { "GPRS location update type IE", "bssap.loc_upd_type_ie",
+            FT_NONE, BASE_NONE, NULL, 0,
+            NULL, HFILL }},
+        { &hf_bssap_Gs_cause_ie,
+          { "Gs Cause IE", "bssap.Gs_cause_ie",
+            FT_NONE, BASE_NONE, NULL, 0,
+            NULL, HFILL }},
+        { &hf_bssap_imei_ie,
+          { "IMEI IE", "bssap.imei_ie",
+            FT_NONE, BASE_NONE, NULL, 0,
+            NULL, HFILL }},
+        { &hf_bssap_imesiv_ie,
+          { "IMEISV IE", "bssap.imesiv",
+            FT_NONE, BASE_NONE, NULL, 0,
+            NULL, HFILL }},
+        { &hf_bssap_imsi_ie,
+          { "IMSI IE", "bssap.imsi_ie",
+            FT_NONE, BASE_NONE, NULL, 0,
+            NULL, HFILL }},
+        { &hf_bssap_imsi_det_from_gprs_serv_type_ie,
+          { "IMSI detach from GPRS service type IE", "bssap.msi_det_from_gprs_serv_type_ie",
+            FT_NONE, BASE_NONE, NULL, 0,
+            NULL, HFILL }},
+        { &hf_bssap_imsi_det_from_non_gprs_serv_type_ie,
+          { "IMSI detach from non-GPRS service IE", "bssap.msi_det_from_non_gprs_serv_type_ie",
+            FT_NONE, BASE_NONE, NULL, 0,
+            NULL, HFILL }},
+        { &hf_bssap_info_req_ie,
+          { "Information requested IE", "bssap.info_req_ie",
+            FT_NONE, BASE_NONE, NULL, 0,
+            NULL, HFILL }},
+        { &hf_bssap_loc_area_id_ie,
+          { "Location area identifier IE", "bssap.loc_area_id_ie",
+            FT_NONE, BASE_NONE, NULL, 0,
+            NULL, HFILL }},
+        { &hf_bssap_loc_inf_age_ie,
+          { "Location information age IE", "bssap.loc_inf_age_ie",
+            FT_NONE, BASE_NONE, NULL, 0,
+            NULL, HFILL }},
+        { &hf_bssap_mm_information_ie,
+          { "MM information IE", "bssap.mm_information",
+            FT_NONE, BASE_NONE, NULL, 0,
+            NULL, HFILL }},
+        { &hf_bssap_mobile_id_ie,
+          { "Mobile identity IE", "bssap.mobile_id_ie",
+            FT_NONE, BASE_NONE, NULL, 0,
+            NULL, HFILL }},
+        { &hf_bssap_mobile_stn_cls_mrk1_ie,
+          { "Mobile station classmark 1 IE", "bssap.mobile_stn_cls_mrk1_ie",
+            FT_NONE, BASE_NONE, NULL, 0,
+            NULL, HFILL }},
+        { &hf_bssap_mobile_station_state_ie,
+          { "Mobile station state IE", "bssap.mobile_station_state_ie",
+            FT_NONE, BASE_NONE, NULL, 0,
+            NULL, HFILL }},
+        { &hf_bssap_ptmsi_ie,
+          { "PTMSI IE", "bssap.ptmsi_ie",
+            FT_NONE, BASE_NONE, NULL, 0,
+            NULL, HFILL }},
+        { &hf_bssap_reject_cause_ie,
+          { "Reject cause IE", "bssap.reject_cause_ie",
+            FT_NONE, BASE_NONE, NULL, 0,
+            NULL, HFILL }},
+        { &hf_bssap_service_area_id_ie,
+          { "Service area identification IE", "bssap.mobile_stn_cls_mrk1_ie",
+            FT_NONE, BASE_NONE, NULL, 0,
+            "Mobile station classmark 1", HFILL }},
+        { &hf_bssap_sgsn_nr_ie,
+          { "SGSN number IE", "bssap.imsi_ie",
+            FT_NONE, BASE_NONE, NULL, 0,
+            NULL, HFILL }}, 
+        { &hf_bssap_tmsi_ie,
+          { "TMSI IE", "bssap.tmsi_ie",
+            FT_NONE, BASE_NONE, NULL, 0,
+            NULL, HFILL }}, 
+        { &hf_bssap_tmsi_status_ie,
+          { "TMSI status IE", "bssap.tmsi_status_ie",
+            FT_NONE, BASE_NONE, NULL, 0,
+            NULL, HFILL }},
+        { &hf_bssap_vlr_number_ie,
+          { "VLR number IE", "bssap.vlr_number_ie",
+            FT_NONE, BASE_NONE, NULL, 0,
+            NULL, HFILL }},
+        { &hf_bssap_global_cn_id_ie,
+          { "Global CN-Id IE", "bssap.global_cn_id_ie",
+            FT_NONE, BASE_NONE, NULL, 0,
+            NULL, HFILL }},
+
+        { &hf_bssap_plus_ie_data,
+          { "IE Data", "bssap.ie_data",
+            FT_BYTES, BASE_NONE, NULL, 0,
+            NULL, HFILL }},
+
+        { &hf_bssap_call_priority,
+          { "eMLPP Priority", "bssap.gprs_loc_upd_type",
+        FT_UINT8, BASE_DEC, VALS(bssap_call_priority_values), 0x07,
+        NULL, HFILL}},
+        { &hf_bssap_gprs_loc_upd_type,
+          { "GPRS location update type", "bssap.gprs_loc_upd_type",
+        FT_UINT8, BASE_DEC, VALS(bssap_plus_GPRS_loc_upd_type_values), 0x0,
+        NULL, HFILL}},
+        { &hf_bssap_Gs_cause,
+          { "Gs cause", "bssap.gprs_loc_upd_type",
+        FT_UINT8, BASE_DEC, VALS(bssap_Gs_cause_values), 0x0,
+        NULL, HFILL}},
+        { &hf_bssap_imei,
+          { "IMEI", "bssap.imei",
+            FT_STRING, BASE_NONE, NULL, 0,
+            NULL, HFILL }},
+        { &hf_bssap_imeisv,
+          { "IMEISV", "bssap.imeisv",
+            FT_STRING, BASE_NONE, NULL, 0,
+            NULL, HFILL }},
+        { &hf_bssap_imsi,
+          { "IMSI", "bssap.imsi",
+            FT_STRING, BASE_NONE, NULL, 0,
+            NULL, HFILL }},
+        { &hf_bssap_imsi_det_from_gprs_serv_type,
+          { "IMSI detach from GPRS service type", "bssap.imsi_det_from_gprs_serv_type",
+        FT_UINT8, BASE_DEC, VALS(bssap_Gs_cause_values), 0x0,
+        NULL, HFILL}},
+        { &hf_bssap_info_req,
+          { "Information requested", "bssap.info_req",
+        FT_UINT8, BASE_DEC, VALS(bssap_info_req_values), 0x0,
+        NULL, HFILL}},
+        { &hf_bssap_loc_inf_age,
+          { "AgeOfLocationInformation in minutes", "bssap.loc_inf_age",
+        FT_UINT16, BASE_DEC, NULL, 0x0,
+        NULL, HFILL}},
+        { &hf_bssap_mobile_station_state,
+          { "Mobile station state", "bssap.mobile_station_state",
+        FT_UINT8, BASE_DEC, VALS(bssap_mobile_station_state_values), 0x0,
+        NULL, HFILL}},
+        { &hf_bssap_ptmsi,
+          { "PTMSI", "bssap.ptmsi",
+        FT_BYTES, BASE_NONE, NULL, 0x0,
+        NULL, HFILL}},
+        { &hf_bssap_tmsi,
+          { "TMSI", "bssap.tmsi",
+        FT_BYTES, BASE_NONE, NULL, 0x0,
+        NULL, HFILL}},
+        { &hf_bssap_tmsi_status,
+          { "TMSI status", "bssap.tmsi_status",
+            FT_BOOLEAN, 8, TFS(&bssap_tmsi_flag), 0x01,
+            NULL, HFILL }},
+        { &hf_bssap_tom_prot_disc,
+          { "TOM Protocol Discriminator", "bssap.Tom_prot_disc",
+            FT_UINT8, BASE_DEC, VALS(bssap_tom_prot_disc_values), 0x78,
+            NULL, HFILL}},
+        { &hf_bssap_e_bit,
+          { "E: Cipher Request", "bssap.tmsi_status",
+            FT_BOOLEAN, 8, TFS(&bssap_E_flag), 0x04,
+            NULL, HFILL }},
+        { &hf_bssap_tunnel_prio,
+          { "Tunnel Priority", "bssap.tunnel_prio",
+        FT_UINT8, BASE_DEC, NULL, 0x0,
+        NULL, HFILL}},
+        { &hf_bssap_global_cn_id,
+          { "Global CN-Id", "bssap.global_cn_id",
+        FT_BYTES, BASE_NONE, NULL, 0x0,
+        NULL, HFILL}},
+        { &hf_bssap_plmn_id,
+          { "PLMN-Id", "bssap.plmn_id",
+        FT_BYTES, BASE_NONE, NULL, 0x0,
+        NULL, HFILL}},
+        { &hf_bssap_cn_id,
+          { "CN-Id", "bssap.cn_id",
+        FT_UINT16, BASE_DEC, NULL, 0x0,
+        NULL, HFILL}},
+        { &hf_bssap_cell_global_id,
+          { "Cell global identity", "bssap.plmn_id",
+        FT_BYTES, BASE_NONE, NULL, 0x0,
+        NULL, HFILL}},
+    };
+
+    /* Setup protocol subtree array */
+    static gint *ett[] = {
+        &ett_bssap,
+        &ett_bssap_dlci,
+        &ett_bssap_imsi,
+        &ett_bssap_imsi_det_from_gprs_serv_type,
+        &ett_bssap_imsi_det_from_non_gprs_serv_type,
+        &ett_bssap_info_req,
+        &ett_bssap_loc_area_id,
+        &ett_bssap_loc_inf_age,
+        &ett_bssap_mm_information,
+        &ett_bssap_mobile_id,
+        &ett_bssap_sgsn_nr,
+        &ett_bssap_tmsi,
+        &ett_bssap_tmsi_status,
+        &ett_bssap_vlr_number,
+        &ett_bssap_global_cn,
+        &ett_bssap_gprs_loc_upd,
+        &ett_bassp_Gs_cause,
+        &ett_bassp_imei,
+        &ett_bassp_imesiv,
+        &ett_bssap_cell_global_id,
+        &ett_bssap_cgi,
+        &ett_bssap_channel_needed,
+        &ett_bssap_dlink_tnl_pld_cntrl_amd_inf,
+        &ett_bssap_ulink_tnl_pld_cntrl_amd_inf,
+        &ett_bssap_emlpp_prio,
+        &ett_bssap_erroneous_msg,
+        &ett_bssap_mobile_stn_cls_mrk1,
+        &ett_bssap_mobile_station_state,
+        &ett_bssap_ptmsi,
+        &ett_bssap_reject_cause,
+        &ett_bssap_service_area_id,
+        &ett_bssap_global_cn_id,
+        &ett_bssap_plmn,
+    };
 
     static enum_val_t gsm_or_lb_interface_options[] = {
-           { "gsm a",    "GSM A",    GSM_INTERFACE },
-           { "lb",    "Lb",    LB_INTERFACE  },
-           { NULL,        NULL,        0 }
+        { "gsm a",    "GSM A",    GSM_INTERFACE },
+        { "lb",    "Lb",    LB_INTERFACE  },
+        { NULL,        NULL,        0 }
     };
 
-       static enum_val_t bssap_or_bsap_options[] = {
-               { "bssap",      "BSSAP",        BSSAP },
-               { "bsap",       "BSAP",         BSAP  },
-               { NULL,         NULL,           0 }
-       };
+    static enum_val_t bssap_or_bsap_options[] = {
+        { "bssap",  "BSSAP",    BSSAP },
+        { "bsap",   "BSAP",     BSAP  },
+        { NULL,     NULL,       0 }
+    };
 
 
-       /* Register the protocol name and description */
-       proto_bssap = proto_register_protocol("BSSAP/BSAP", "BSSAP", "bssap");
-       /*proto_bssap_plus = proto_register_protocol("BSSAP2", "BSSAP2", "bssap2");*/
+    /* Register the protocol name and description */
+    proto_bssap = proto_register_protocol("BSSAP/BSAP", "BSSAP", "bssap");
+    /*proto_bssap_plus = proto_register_protocol("BSSAP2", "BSSAP2", "bssap2");*/
 
-       register_dissector("bssap", dissect_bssap, proto_bssap);
+    register_dissector("bssap", dissect_bssap, proto_bssap);
 
-       /* Required function calls to register the header fields and subtrees used */
-       proto_register_field_array(proto_bssap, hf, array_length(hf));
-       proto_register_subtree_array(ett, array_length(ett));
+    /* Required function calls to register the header fields and subtrees used */
+    proto_register_field_array(proto_bssap, hf, array_length(hf));
+    proto_register_subtree_array(ett, array_length(ett));
 
-       bssap_module = prefs_register_protocol(proto_bssap, proto_reg_handoff_bssap);
+    bssap_module = prefs_register_protocol(proto_bssap, proto_reg_handoff_bssap);
 
-       prefs_register_enum_preference(bssap_module,
-                                      "bsap_or_bssap",
-                                      "Identify to sub-dissector as",
-                                      "For the sake of sub-dissectors registering to accept data "
-                                      "from the BSSAP/BSAP dissector, this defines whether it is "
-                                      "identified as BSSAP or BSAP.",
-                                      &bssap_or_bsap_global,
-                                      bssap_or_bsap_options,
-                                      FALSE);
+    prefs_register_enum_preference(bssap_module,
+                       "bsap_or_bssap",
+                       "Identify to sub-dissector as",
+                       "For the sake of sub-dissectors registering to accept data "
+                       "from the BSSAP/BSAP dissector, this defines whether it is "
+                       "identified as BSSAP or BSAP.",
+                       &bssap_or_bsap_global,
+                       bssap_or_bsap_options,
+                       FALSE);
 
-       prefs_register_enum_preference(bssap_module,
+    prefs_register_enum_preference(bssap_module,
                        "gsm_or_lb_interface",
                        "Identify the BSSAP interface",
                        "GSM-A is the interface between the BSC and the MSC. Lb is the interface between the BSC and the SMLC.",
@@ -2538,34 +2538,34 @@ proto_register_bssap(void)
                        gsm_or_lb_interface_options,
                        FALSE);
 
-       prefs_register_uint_preference(bssap_module, "ssn",
-                                      "Subsystem number used for BSSAP",
-                                      "Set Subsystem number used for BSSAP/BSSAP+",
-                                      10, &global_bssap_ssn);
-       bssap_dissector_table = register_dissector_table("bssap.pdu_type", "BSSAP Message Type", FT_UINT8, BASE_DEC);
-       bsap_dissector_table = register_dissector_table("bsap.pdu_type", "BSAP Message Type", FT_UINT8, BASE_DEC);
+    prefs_register_uint_preference(bssap_module, "ssn",
+                       "Subsystem number used for BSSAP",
+                       "Set Subsystem number used for BSSAP/BSSAP+",
+                       10, &global_bssap_ssn);
+    bssap_dissector_table = register_dissector_table("bssap.pdu_type", "BSSAP Message Type", FT_UINT8, BASE_DEC);
+    bsap_dissector_table = register_dissector_table("bsap.pdu_type", "BSAP Message Type", FT_UINT8, BASE_DEC);
 }
 
 void
 proto_reg_handoff_bssap(void)
 {
-       static gboolean initialized = FALSE;
-       static dissector_handle_t bssap_plus_handle;
-       static guint old_bssap_ssn;
-
-       if (!initialized) {
-               heur_dissector_add("sccp", dissect_bssap_heur, proto_bssap);
-               heur_dissector_add("sua", dissect_bssap_heur, proto_bssap);
-               /* BSSAP+ */
-               bssap_plus_handle = create_dissector_handle(dissect_bssap_plus, proto_bssap);
-
-               data_handle = find_dissector("data");
-               rrlp_handle = find_dissector("rrlp");
-               initialized = TRUE;
-       } else {
-               dissector_delete("sccp.ssn", old_bssap_ssn, bssap_plus_handle); 
-       }
-
-       dissector_add("sccp.ssn", global_bssap_ssn, bssap_plus_handle);
-       old_bssap_ssn = global_bssap_ssn;
+    static gboolean initialized = FALSE;
+    static dissector_handle_t bssap_plus_handle;
+    static guint old_bssap_ssn;
+
+    if (!initialized) {
+        heur_dissector_add("sccp", dissect_bssap_heur, proto_bssap);
+        heur_dissector_add("sua", dissect_bssap_heur, proto_bssap);
+        /* BSSAP+ */
+        bssap_plus_handle = create_dissector_handle(dissect_bssap_plus, proto_bssap);
+
+        data_handle = find_dissector("data");
+        rrlp_handle = find_dissector("rrlp");
+        initialized = TRUE;
+    } else {
+        dissector_delete("sccp.ssn", old_bssap_ssn, bssap_plus_handle); 
+    }
+
+    dissector_add("sccp.ssn", global_bssap_ssn, bssap_plus_handle);
+    old_bssap_ssn = global_bssap_ssn;
 }
index f0586358fcb3519b606e76b6259dae9a52219601..34b912ae0f694d80a90cdecdfed9d7ef909a2634 100644 (file)
@@ -52,50 +52,50 @@ static guint16  ver_bossvr = 0;
 
 
 static dcerpc_sub_dissector bossvr_dissectors[] = {
-    {  0, "GetServerStatus", NULL, NULL},
-    {  1, "CreateBnode", NULL, NULL},
-    {  2, "DeleteBnode", NULL, NULL},
-    {  3, "SetStatus", NULL, NULL},
-    {  4, "GetStatus", NULL, NULL},
-    {  5, "EnumerateInstance", NULL, NULL},
-    {  6, "GetInstanceInfo", NULL, NULL},
-    {  7, "GetInstanceParm", NULL, NULL},
-    {  8, "AddSUser", NULL, NULL},
-    {  9, "DeleteSUser", NULL, NULL},
-    { 10, "ListSUsers", NULL, NULL},
-    { 11, "ListKeys", NULL, NULL},
-    { 12, "AddKey", NULL, NULL},
-    { 13, "DeleteKey", NULL, NULL},
-    { 14, "GenerateKey", NULL, NULL},
-    { 15, "GarbageCollectKeys", NULL, NULL},
-    { 16, "GetCellName", NULL, NULL},
-    { 17, "SetTStatus", NULL, NULL},
-    { 18, "ShutdownAll", NULL, NULL},
-    { 19, "RestartAll", NULL, NULL},
-    { 20, "StartupAll", NULL, NULL},
-    { 21, "SetNoAuthFlag", NULL, NULL},
-    { 22, "ReBossvr", NULL, NULL},
-    { 23, "Restart", NULL, NULL},
-    { 24, "Install", NULL, NULL},
-    { 25, "UnInstall", NULL, NULL},
-    { 26, "GetDates", NULL, NULL},
-    { 27, "Prune", NULL, NULL},
-    { 28, "SetRestartTime", NULL, NULL},
-    { 29, "GetRestartTime", NULL, NULL},
-    { 30, "GetLog", NULL, NULL},
-    { 31, "WaitAll", NULL, NULL},
-    { 32, "SetDebug", NULL, NULL},
-    { 33, "GetServerInterfaces", NULL, NULL},
-    { 0, NULL, NULL, NULL }
+       {  0, "GetServerStatus", NULL, NULL},
+       {  1, "CreateBnode", NULL, NULL},
+       {  2, "DeleteBnode", NULL, NULL},
+       {  3, "SetStatus", NULL, NULL},
+       {  4, "GetStatus", NULL, NULL},
+       {  5, "EnumerateInstance", NULL, NULL},
+       {  6, "GetInstanceInfo", NULL, NULL},
+       {  7, "GetInstanceParm", NULL, NULL},
+       {  8, "AddSUser", NULL, NULL},
+       {  9, "DeleteSUser", NULL, NULL},
+       { 10, "ListSUsers", NULL, NULL},
+       { 11, "ListKeys", NULL, NULL},
+       { 12, "AddKey", NULL, NULL},
+       { 13, "DeleteKey", NULL, NULL},
+       { 14, "GenerateKey", NULL, NULL},
+       { 15, "GarbageCollectKeys", NULL, NULL},
+       { 16, "GetCellName", NULL, NULL},
+       { 17, "SetTStatus", NULL, NULL},
+       { 18, "ShutdownAll", NULL, NULL},
+       { 19, "RestartAll", NULL, NULL},
+       { 20, "StartupAll", NULL, NULL},
+       { 21, "SetNoAuthFlag", NULL, NULL},
+       { 22, "ReBossvr", NULL, NULL},
+       { 23, "Restart", NULL, NULL},
+       { 24, "Install", NULL, NULL},
+       { 25, "UnInstall", NULL, NULL},
+       { 26, "GetDates", NULL, NULL},
+       { 27, "Prune", NULL, NULL},
+       { 28, "SetRestartTime", NULL, NULL},
+       { 29, "GetRestartTime", NULL, NULL},
+       { 30, "GetLog", NULL, NULL},
+       { 31, "WaitAll", NULL, NULL},
+       { 32, "SetDebug", NULL, NULL},
+       { 33, "GetServerInterfaces", NULL, NULL},
+       { 0, NULL, NULL, NULL }
 };
 
 void
 proto_register_bossvr (void)
 {
        static hf_register_info hf[] = {
-         { &hf_bossvr_opnum,
-           { "Operation", "bossvr.opnum", FT_UINT16, BASE_DEC,
-             NULL, 0x0, NULL, HFILL }}
+               { &hf_bossvr_opnum,
+                 { "Operation", "bossvr.opnum", FT_UINT16, BASE_DEC,
+                   NULL, 0x0, NULL, HFILL }}
        };
 
        static gint *ett[] = {
index 5c269c113a6c3c3daa7ac6776bdc5690ac707e05..bcd1c75eb790f351699cd8d82913e043adab6925 100644 (file)
@@ -54,34 +54,34 @@ static guint16  ver_cds_clerkserver = 1;
 
 
 static dcerpc_sub_dissector cds_clerkserver_dissectors[] = {
-    {  0, "AddReplica", NULL, NULL},
-    {  1, "AllowClearinghouses", NULL, NULL},
-    {  2, "Combine", NULL, NULL},
-    {  3, "CreateChild", NULL, NULL},
-    {  4, "CreateDirectory", NULL, NULL},
-    {  5, "CreateSoftLink", NULL, NULL},
-    {  6, "CreateObject", NULL, NULL},
-    {  7, "DeleteChild", NULL, NULL},
-    {  8, "DeleteObject", NULL, NULL},
-    {  9, "DeleteSoftLink", NULL, NULL},
-    { 10, "DeleteDirectory", NULL, NULL},
-    { 11, "DisallowClearinghouses", NULL, NULL},
-    { 12, "DoUpdate", NULL, NULL},
-    { 13, "EnumerateAttributes", NULL, NULL},
-    { 14, "EnumerateChildren", NULL, NULL},
-    { 15, "EnumerateObjects", NULL, NULL},
-    { 16, "EnumerateSoftLinks", NULL, NULL},
-    { 17, "LinkReplica", NULL, NULL},
-    { 18, "ModifyAttribute", NULL, NULL},
-    { 19, "ModifyReplica", NULL, NULL},
-    { 20, "NewEpoch", NULL, NULL},
-    { 21, "ReadAttribute", NULL, NULL},
-    { 22, "RemoveReplica", NULL, NULL},
-    { 23, "ResolveName", NULL, NULL},
-    { 24, "Skulk", NULL, NULL},
-    { 25, "TestAttribute", NULL, NULL},
-    { 26, "TestGroup", NULL, NULL},
-    { 0, NULL, NULL, NULL }
+       {  0, "AddReplica", NULL, NULL},
+       {  1, "AllowClearinghouses", NULL, NULL},
+       {  2, "Combine", NULL, NULL},
+       {  3, "CreateChild", NULL, NULL},
+       {  4, "CreateDirectory", NULL, NULL},
+       {  5, "CreateSoftLink", NULL, NULL},
+       {  6, "CreateObject", NULL, NULL},
+       {  7, "DeleteChild", NULL, NULL},
+       {  8, "DeleteObject", NULL, NULL},
+       {  9, "DeleteSoftLink", NULL, NULL},
+       { 10, "DeleteDirectory", NULL, NULL},
+       { 11, "DisallowClearinghouses", NULL, NULL},
+       { 12, "DoUpdate", NULL, NULL},
+       { 13, "EnumerateAttributes", NULL, NULL},
+       { 14, "EnumerateChildren", NULL, NULL},
+       { 15, "EnumerateObjects", NULL, NULL},
+       { 16, "EnumerateSoftLinks", NULL, NULL},
+       { 17, "LinkReplica", NULL, NULL},
+       { 18, "ModifyAttribute", NULL, NULL},
+       { 19, "ModifyReplica", NULL, NULL},
+       { 20, "NewEpoch", NULL, NULL},
+       { 21, "ReadAttribute", NULL, NULL},
+       { 22, "RemoveReplica", NULL, NULL},
+       { 23, "ResolveName", NULL, NULL},
+       { 24, "Skulk", NULL, NULL},
+       { 25, "TestAttribute", NULL, NULL},
+       { 26, "TestGroup", NULL, NULL},
+       { 0, NULL, NULL, NULL }
 };
 
 void
index adec1466845425a00ec1e9a0b746175695f4478c..9f7581cae875581117147efb3fbbcd99d6fb0d9c 100644 (file)
@@ -51,8 +51,8 @@ static guint16  ver_cprpc_server = 1;
 
 
 static dcerpc_sub_dissector cprpc_server_dissectors[] = {
-    { 0, "dnscp_server", NULL, NULL},
-    { 0, NULL, NULL, NULL }
+       { 0, "dnscp_server", NULL, NULL},
+       { 0, NULL, NULL, NULL }
 };
 
 void
index 9dab4a9bcae1be334878e7a343a373df96fa34ac..7ad1fb36d15c0edd363c378f857477e937b1bfc8 100644 (file)
@@ -52,9 +52,9 @@ static guint16  ver_dtsprovider = 1;
 
 
 static dcerpc_sub_dissector dtsprovider_dissectors[] = {
-    { 0, "ContactProvider", NULL, NULL},
-    { 1, "ServerRequestProviderTime", NULL, NULL},
-    { 0, NULL, NULL, NULL }
+       { 0, "ContactProvider", NULL, NULL},
+       { 1, "ServerRequestProviderTime", NULL, NULL},
+       { 0, NULL, NULL, NULL }
 };
 
 void
index 6fc822f6c1ecd2add7012f559a7eaaeb75344a57..b4a524e03b5d88121a44da37152f3b8f68fd1e12 100644 (file)
@@ -51,9 +51,9 @@ static guint16  ver_dtsstime_req = 1;
 
 
 static dcerpc_sub_dissector dtsstime_req_dissectors[] = {
-    { 0, "ClerkRequestTime", NULL, NULL},
-    { 1, "ServerRequestTime", NULL, NULL},
-    { 0, NULL, NULL, NULL }
+       { 0, "ClerkRequestTime", NULL, NULL},
+       { 1, "ServerRequestTime", NULL, NULL},
+       { 0, NULL, NULL, NULL }
 };
 
 void
index fba2aebdb94d08a7aedf4ce06e5cf704a884a61b..a0a9bc791a047e318078d6842a8f7a22f0d5a42d 100644 (file)
@@ -80,11 +80,11 @@ static guint16  ver_epm4 = 4;
 
 
 static const value_string ep_service[] = {
-       { 0, "rpc_c_ep_all_elts" },
-       { 1, "rpc_c_ep_match_by_if" },
-       { 2, "rpc_c_ep_match_by_obj" },
-       { 3, "rpc_c_ep_match_by_both" },
-       { 0, NULL },
+    { 0, "rpc_c_ep_all_elts" },
+    { 1, "rpc_c_ep_match_by_if" },
+    { 2, "rpc_c_ep_match_by_obj" },
+    { 3, "rpc_c_ep_match_by_both" },
+    { 0, NULL },
 };
 
 /* typedef struct {
@@ -97,19 +97,19 @@ static int epm_dissect_tower (tvbuff_t *tvb, int offset, packet_info *pinfo, pro
 
 static int
 epm_dissect_pointer_IF_ID(tvbuff_t *tvb, int offset,
-                             packet_info *pinfo, proto_tree *tree,
-                             guint8 *drep)
+                          packet_info *pinfo, proto_tree *tree,
+                          guint8 *drep)
 {
-       dcerpc_info *di;
-
-       di=pinfo->private_data;
-        offset = dissect_ndr_uuid_t (tvb, offset, pinfo, tree, drep,
-                                     di->hf_index, NULL);
-        offset = dissect_ndr_uint16 (tvb, offset, pinfo, tree, drep,
-                                     hf_epm_ver_maj, NULL);
-        offset = dissect_ndr_uint16 (tvb, offset, pinfo, tree, drep,
-                                     hf_epm_ver_min, NULL);
-       return offset;
+    dcerpc_info *di;
+
+    di=pinfo->private_data;
+    offset = dissect_ndr_uuid_t (tvb, offset, pinfo, tree, drep,
+                                 di->hf_index, NULL);
+    offset = dissect_ndr_uint16 (tvb, offset, pinfo, tree, drep,
+                                 hf_epm_ver_maj, NULL);
+    offset = dissect_ndr_uint16 (tvb, offset, pinfo, tree, drep,
+                                 hf_epm_ver_min, NULL);
+    return offset;
 }
 
 static int
@@ -117,12 +117,12 @@ epm_dissect_pointer_UUID(tvbuff_t *tvb, int offset,
                              packet_info *pinfo, proto_tree *tree,
                              guint8 *drep)
 {
-       dcerpc_info *di;
+    dcerpc_info *di;
 
-       di=pinfo->private_data;
-        offset = dissect_ndr_uuid_t (tvb, offset, pinfo, tree, drep,
-                                     di->hf_index, NULL);
-       return offset;
+    di=pinfo->private_data;
+    offset = dissect_ndr_uuid_t (tvb, offset, pinfo, tree, drep,
+                                 di->hf_index, NULL);
+    return offset;
 }
 
 static int
@@ -165,7 +165,7 @@ epm_dissect_ept_entry_t(tvbuff_t *tvb, int offset,
     gint slen;
     dcerpc_info *di;
     const char *str;
-    
+
     di=pinfo->private_data;
     if(di->conformant_run){
         return offset;
@@ -250,71 +250,71 @@ epm_dissect_uuid (tvbuff_t *tvb, int offset,
     return offset;
 }
 
-#define PROTO_ID_OSI_OID       0x00
-#define PROTO_ID_DNA_SESSCTL   0x02
-#define PROTO_ID_DNA_SESSCTL_V3        0x03
-#define PROTO_ID_DNA_NSP       0x04
-#define PROTO_ID_OSI_TP4       0x05
-#define PROTO_ID_OSI_CLNS      0x06
-#define PROTO_ID_TCP           0x07
-#define PROTO_ID_UDP           0x08
-#define PROTO_ID_IP            0x09
-#define PROTO_ID_RPC_CL                0x0a
-#define PROTO_ID_RPC_CO                0x0b
-#define PROTO_ID_SPX           0x0c    /* from DCOM spec (is this correct?) */
-#define PROTO_ID_UUID          0x0d
-#define PROTO_ID_IPX           0x0e    /* from DCOM spec (is this correct?) */
-#define PROTO_ID_NAMED_PIPES   0x0f
-#define PROTO_ID_NAMED_PIPES_2 0x10
-#define PROTO_ID_NETBIOS       0x11
-#define PROTO_ID_NETBEUI       0x12
-#define PROTO_ID_NETWARE_SPX   0x13
-#define PROTO_ID_NETWARE_IPX   0x14
-#define PROTO_ID_ATALK_STREAM  0x16
-#define PROTO_ID_ATALK_DATAGRAM        0x17
-#define PROTO_ID_ATALK         0x18
-#define PROTO_ID_NETBIOS_2     0x19
-#define PROTO_ID_VINES_SPP     0x1a
-#define PROTO_ID_VINES_IPC     0x1b
-#define PROTO_ID_STREETTALK    0x1c
-#define PROTO_ID_HTTP          0x1f
-#define PROTO_ID_UNIX_DOMAIN   0x20
-#define PROTO_ID_NULL          0x21
-#define PROTO_ID_NETBIOS_3     0x22
+#define PROTO_ID_OSI_OID        0x00
+#define PROTO_ID_DNA_SESSCTL    0x02
+#define PROTO_ID_DNA_SESSCTL_V3 0x03
+#define PROTO_ID_DNA_NSP        0x04
+#define PROTO_ID_OSI_TP4        0x05
+#define PROTO_ID_OSI_CLNS       0x06
+#define PROTO_ID_TCP            0x07
+#define PROTO_ID_UDP            0x08
+#define PROTO_ID_IP             0x09
+#define PROTO_ID_RPC_CL         0x0a
+#define PROTO_ID_RPC_CO         0x0b
+#define PROTO_ID_SPX            0x0c    /* from DCOM spec (is this correct?) */
+#define PROTO_ID_UUID           0x0d
+#define PROTO_ID_IPX            0x0e    /* from DCOM spec (is this correct?) */
+#define PROTO_ID_NAMED_PIPES    0x0f
+#define PROTO_ID_NAMED_PIPES_2  0x10
+#define PROTO_ID_NETBIOS        0x11
+#define PROTO_ID_NETBEUI        0x12
+#define PROTO_ID_NETWARE_SPX    0x13
+#define PROTO_ID_NETWARE_IPX    0x14
+#define PROTO_ID_ATALK_STREAM   0x16
+#define PROTO_ID_ATALK_DATAGRAM 0x17
+#define PROTO_ID_ATALK          0x18
+#define PROTO_ID_NETBIOS_2      0x19
+#define PROTO_ID_VINES_SPP      0x1a
+#define PROTO_ID_VINES_IPC      0x1b
+#define PROTO_ID_STREETTALK     0x1c
+#define PROTO_ID_HTTP           0x1f
+#define PROTO_ID_UNIX_DOMAIN    0x20
+#define PROTO_ID_NULL           0x21
+#define PROTO_ID_NETBIOS_3      0x22
 
 static const value_string proto_id_vals[] = {
-       { PROTO_ID_OSI_OID,             "OSI OID"},
-       { PROTO_ID_DNA_SESSCTL,         "DNA Session Control"},
-       { PROTO_ID_DNA_SESSCTL_V3,      "DNA Session Control V3"},
-       { PROTO_ID_DNA_NSP,             "DNA NSP Transport"},
-       { PROTO_ID_OSI_TP4,             "OSI TP4"},
-       { PROTO_ID_OSI_CLNS,            "OSI CLNS or DNA Routing"},
-       { PROTO_ID_TCP,                 "DOD TCP"},
-       { PROTO_ID_UDP,                 "DOD UDP"},
-       { PROTO_ID_IP,                  "DOD IP"},
-       { PROTO_ID_RPC_CL,              "RPC connectionless protocol"},
-       { PROTO_ID_RPC_CO,              "RPC connection-oriented protocol"},
-       { PROTO_ID_SPX,                 "SPX?"},
-       { PROTO_ID_UUID,                "UUID"},
-       { PROTO_ID_IPX,                 "IPX?"},
-       { PROTO_ID_NAMED_PIPES,         "Named Pipes"}, 
-       { PROTO_ID_NAMED_PIPES_2,       "Named Pipes"},
-       { PROTO_ID_NETBIOS,             "NetBIOS"},
-       { PROTO_ID_NETBEUI,             "NetBEUI"},
-       { PROTO_ID_NETWARE_SPX,         "Netware SPX"},
-       { PROTO_ID_NETWARE_IPX,         "Netware IPX"},
-       { PROTO_ID_ATALK_STREAM,        "Appletalk Stream"},
-       { PROTO_ID_ATALK_DATAGRAM,      "Appletalk Datagram"},
-       { PROTO_ID_ATALK,               "Appletalk"},
-       { PROTO_ID_NETBIOS_2,           "NetBIOS"},
-       { PROTO_ID_VINES_SPP,           "Vines SPP"},
-       { PROTO_ID_VINES_IPC,           "Vines IPC"},
-       { PROTO_ID_STREETTALK,          "StreetTalk"},
-       { PROTO_ID_HTTP,                "RPC over HTTP"},
-       { PROTO_ID_UNIX_DOMAIN,         "Unix Domain Socket"},
-       { PROTO_ID_NULL,                "null"},
-       { PROTO_ID_NETBIOS_3,           "NetBIOS"},
-       { 0, NULL},
+    { PROTO_ID_OSI_OID,         "OSI OID"},
+    { PROTO_ID_DNA_SESSCTL,     "DNA Session Control"},
+    { PROTO_ID_DNA_SESSCTL_V3,  "DNA Session Control V3"},
+    { PROTO_ID_DNA_NSP,         "DNA NSP Transport"},
+    { PROTO_ID_OSI_TP4,         "OSI TP4"},
+    { PROTO_ID_OSI_CLNS,        "OSI CLNS or DNA Routing"},
+    { PROTO_ID_TCP,             "DOD TCP"},
+    { PROTO_ID_UDP,             "DOD UDP"},
+    { PROTO_ID_IP,              "DOD IP"},
+    { PROTO_ID_RPC_CL,          "RPC connectionless protocol"},
+    { PROTO_ID_RPC_CO,          "RPC connection-oriented protocol"},
+    { PROTO_ID_SPX,             "SPX?"},
+    { PROTO_ID_UUID,            "UUID"},
+    { PROTO_ID_IPX,             "IPX?"},
+    { PROTO_ID_NAMED_PIPES,     "Named Pipes"},
+    { PROTO_ID_NAMED_PIPES_2,   "Named Pipes"},
+    { PROTO_ID_NETBIOS,         "NetBIOS"},
+    { PROTO_ID_NETBEUI,         "NetBEUI"},
+    { PROTO_ID_NETWARE_SPX,     "Netware SPX"},
+    { PROTO_ID_NETWARE_IPX,     "Netware IPX"},
+    { PROTO_ID_ATALK_STREAM,    "Appletalk Stream"},
+    { PROTO_ID_ATALK_DATAGRAM,  "Appletalk Datagram"},
+    { PROTO_ID_ATALK,           "Appletalk"},
+    { PROTO_ID_NETBIOS_2,       "NetBIOS"},
+    { PROTO_ID_VINES_SPP,       "Vines SPP"},
+    { PROTO_ID_VINES_IPC,       "Vines IPC"},
+    { PROTO_ID_STREETTALK,      "StreetTalk"},
+    { PROTO_ID_HTTP,            "RPC over HTTP"},
+    { PROTO_ID_UNIX_DOMAIN,     "Unix Domain Socket"},
+    { PROTO_ID_NULL,            "null"},
+    { PROTO_ID_NETBIOS_3,       "NetBIOS"},
+    { 0, NULL},
 };
 
 
@@ -342,9 +342,9 @@ epm_dissect_tower_data (tvbuff_t *tvb, int offset,
     for(i=1;i<=num_floors;i++){
         proto_item *it = NULL;
         proto_tree *tr = NULL;
-       int old_offset = offset;
+        int old_offset = offset;
         guint16 len;
-       guint8 proto_id;
+        guint8 proto_id;
         e_uuid_t uuid;
         proto_item *pi;
 
@@ -384,22 +384,22 @@ epm_dissect_tower_data (tvbuff_t *tvb, int offset,
             }
             proto_tree_add_text(tr, tvb, offset+17, 2, "Version %d.%d", tvb_get_guint8(tvb, offset+17), tvb_get_guint8(tvb, offset+18));
 
-           {
-               guint16 version = tvb_get_ntohs(tvb, offset+17); 
-               const char *service = dcerpc_get_proto_name(&uuid, version);
-               if (service || uuid_name)
-            proto_item_append_text(tr, "UUID: %s", service ? service : uuid_name);
-               else
-                   proto_item_append_text(tr, "UUID: %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x Version %d.%d", uuid.Data1, uuid.Data2, uuid.Data3,
-                                          uuid.Data4[0], uuid.Data4[1],
-                                          uuid.Data4[2], uuid.Data4[3],
-                                          uuid.Data4[4], uuid.Data4[5],
-                                          uuid.Data4[6], uuid.Data4[7],
-                                          tvb_get_guint8(tvb, offset+17), 
-                                          tvb_get_guint8(tvb, offset+18));
-           }
-           break;
-       }
+            {
+                guint16 version = tvb_get_ntohs(tvb, offset+17);
+                const char *service = dcerpc_get_proto_name(&uuid, version);
+                if (service || uuid_name)
+                    proto_item_append_text(tr, "UUID: %s", service ? service : uuid_name);
+                else
+                    proto_item_append_text(tr, "UUID: %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x Version %d.%d", uuid.Data1, uuid.Data2, uuid.Data3,
+                                           uuid.Data4[0], uuid.Data4[1],
+                                           uuid.Data4[2], uuid.Data4[3],
+                                           uuid.Data4[4], uuid.Data4[5],
+                                           uuid.Data4[6], uuid.Data4[7],
+                                           tvb_get_guint8(tvb, offset+17),
+                                           tvb_get_guint8(tvb, offset+18));
+            }
+            break;
+        }
         offset += len;
 
         len = tvb_get_letohs(tvb, offset);
@@ -427,43 +427,43 @@ epm_dissect_tower_data (tvbuff_t *tvb, int offset,
             proto_item_append_text(tr, "IP:%s", ip_to_str(tvb_get_ptr(tvb, offset, 4)));
             break;
 
-       case PROTO_ID_RPC_CO:
-           proto_item_append_text(tr, "RPC connection-oriented protocol");
-           break;
+        case PROTO_ID_RPC_CO:
+            proto_item_append_text(tr, "RPC connection-oriented protocol");
+            break;
 
-       case PROTO_ID_RPC_CL:
-           proto_item_append_text(tr, "RPC connectionless protocol");
+        case PROTO_ID_RPC_CL:
+            proto_item_append_text(tr, "RPC connectionless protocol");
             /* XXX - is this big or little endian? */
             proto_tree_add_item(tr, hf_epm_ver_min, tvb, offset, 2, FALSE);
-           break;
+            break;
 
         case PROTO_ID_NAMED_PIPES: /* \\PIPE\xxx   named pipe */
-           tvb_ensure_bytes_exist(tvb, offset, len);
+            tvb_ensure_bytes_exist(tvb, offset, len);
             proto_tree_add_item(tr, hf_epm_proto_named_pipes, tvb, offset, len, TRUE);
-            proto_item_append_text(tr, "NamedPipe:%*s",MIN(len,tvb_length_remaining(tvb, offset)), tvb_get_ptr(tvb, offset, -1)); 
+            proto_item_append_text(tr, "NamedPipe:%*s",MIN(len,tvb_length_remaining(tvb, offset)), tvb_get_ptr(tvb, offset, -1));
             break;
 
         case PROTO_ID_NAMED_PIPES_2: /* PIPENAME  named pipe */
-           tvb_ensure_bytes_exist(tvb, offset, len);
+            tvb_ensure_bytes_exist(tvb, offset, len);
             proto_tree_add_item(tr, hf_epm_proto_named_pipes, tvb, offset, len, TRUE);
-            proto_item_append_text(tr, "PIPE:%*s",MIN(len,tvb_length_remaining(tvb, offset)), tvb_get_ptr(tvb, offset, -1)); 
+            proto_item_append_text(tr, "PIPE:%*s",MIN(len,tvb_length_remaining(tvb, offset)), tvb_get_ptr(tvb, offset, -1));
             break;
 
         case PROTO_ID_NETBIOS: /* \\NETBIOS   netbios name */
-           tvb_ensure_bytes_exist(tvb, offset, len);
+            tvb_ensure_bytes_exist(tvb, offset, len);
             proto_tree_add_item(tr, hf_epm_proto_netbios_name, tvb, offset, len, TRUE);
-            proto_item_append_text(tr, "NetBIOS:%*s",MIN(len,tvb_length_remaining(tvb, offset)), tvb_get_ptr(tvb, offset, -1)); 
+            proto_item_append_text(tr, "NetBIOS:%*s",MIN(len,tvb_length_remaining(tvb, offset)), tvb_get_ptr(tvb, offset, -1));
             break;
         case PROTO_ID_HTTP: /* RPC over HTTP */
             proto_tree_add_item(tr, hf_epm_proto_http_port, tvb, offset, 2, FALSE);
             proto_item_append_text(tr, "RPC over HTTP Port:%d", tvb_get_ntohs(tvb, offset));
             break;
-                       
+
         default:
             if(len){
-               expert_add_info_format(pinfo, pi, PI_UNDECODED, PI_WARN, "RightHandSide not decoded yet for proto_id 0x%x", 
+                expert_add_info_format(pinfo, pi, PI_UNDECODED, PI_WARN, "RightHandSide not decoded yet for proto_id 0x%x",
                     proto_id);
-               tvb_ensure_bytes_exist(tvb, offset, len);
+                tvb_ensure_bytes_exist(tvb, offset, len);
                 proto_tree_add_text(tr, tvb, offset, len, "RightHandSide not decoded yet for proto_id 0x%x", proto_id);
             }
         }
@@ -678,21 +678,21 @@ epm_dissect_ept_lookup_handle_free_resp (tvbuff_t *tvb, int offset,
 
 
 static dcerpc_sub_dissector epm_dissectors[] = {
-    { 0, "Insert", 
-       epm_dissect_ept_insert_rqst,
-       epm_dissect_ept_insert_resp },
+    { 0, "Insert",
+        epm_dissect_ept_insert_rqst,
+        epm_dissect_ept_insert_resp },
     { 1, "Delete",
-       epm_dissect_ept_delete_rqst,
-       epm_dissect_ept_delete_resp },
+        epm_dissect_ept_delete_rqst,
+        epm_dissect_ept_delete_resp },
     { 2, "Lookup",
-       epm_dissect_ept_lookup_rqst,
-       epm_dissect_ept_lookup_resp },
+        epm_dissect_ept_lookup_rqst,
+        epm_dissect_ept_lookup_resp },
     { 3, "Map",
-       epm_dissect_ept_map_rqst,
-       epm_dissect_ept_map_resp },
+        epm_dissect_ept_map_rqst,
+        epm_dissect_ept_map_resp },
     { 4, "LookupHandleFree",
-       epm_dissect_ept_lookup_handle_free_rqst,
-       epm_dissect_ept_lookup_handle_free_resp },
+        epm_dissect_ept_lookup_handle_free_rqst,
+        epm_dissect_ept_lookup_handle_free_resp },
     { 5, "InqObject", NULL, NULL },
     { 6, "MgmtDelete", NULL, NULL },
     { 0, NULL, NULL, NULL }
@@ -703,8 +703,8 @@ proto_register_epm (void)
 {
     static hf_register_info hf[] = {
         { &hf_epm_opnum,
-         { "Operation", "epm.opnum", FT_UINT16, BASE_DEC,
-           NULL, 0x0, NULL, HFILL }},
+          { "Operation", "epm.opnum", FT_UINT16, BASE_DEC,
+            NULL, 0x0, NULL, HFILL }},
         { &hf_epm_inquiry_type,
           { "Inquiry type", "epm.inq_type", FT_UINT32, BASE_DEC, VALS(ep_service), 0x0, NULL, HFILL }},
         { &hf_epm_object,
@@ -754,7 +754,7 @@ proto_register_epm (void)
         { &hf_epm_proto_tcp_port,
           { "TCP Port", "epm.proto.tcp_port", FT_UINT16, BASE_DEC, NULL, 0x0, "TCP Port where this service can be found", HFILL }},
         { &hf_epm_proto_http_port,
-          { "TCP Port", "epm.proto.http_port", FT_UINT16, BASE_DEC, NULL, 0x0, "TCP Port where this service can be found", HFILL }},      
+          { "TCP Port", "epm.proto.http_port", FT_UINT16, BASE_DEC, NULL, 0x0, "TCP Port where this service can be found", HFILL }},
         { &hf_epm_tower_rhs_len,
           { "RHS Length", "epm.tower.rhs.len", FT_UINT16, BASE_DEC, NULL, 0x0, "Length of RHS data", HFILL }},
         { &hf_epm_tower_lhs_len,
@@ -769,14 +769,14 @@ proto_register_epm (void)
         &ett_epm_tower_floor,
         &ett_epm_entry
     };
-    
+
     /* interface version 3 */
     proto_epm3 = proto_register_protocol ("DCE/RPC Endpoint Mapper", "EPM", "epm");
     proto_register_field_array (proto_epm3, hf, array_length (hf));
     proto_register_subtree_array (ett, array_length (ett));
 
     /* interface version 4 */
-       proto_epm4 = proto_register_protocol ("DCE/RPC Endpoint Mapper v4", "EPMv4", "epm4");
+    proto_epm4 = proto_register_protocol ("DCE/RPC Endpoint Mapper v4", "EPMv4", "epm4");
 }
 
 void
index b5ed24e95f5486cda3810d565377f8e4b26f02a3..1a1afd5ec85bb79d11d11d747738eff7afa1a671 100644 (file)
@@ -43,12 +43,12 @@ static guint16  ver_mgmt = 1;
 
 
 static dcerpc_sub_dissector mgmt_dissectors[] = {
-    { 0, "rpc__mgmt_inq_if_ids", NULL, NULL },
-    { 1, "rpc__mgmt_inq_stats", NULL, NULL },
-    { 2, "rpc__mgmt_is_server_listening", NULL, NULL },
-    { 3, "rpc__mgmt_stop_server_listening", NULL, NULL },
-    { 4, "rpc__mgmt_inq_princ_name", NULL, NULL },
-    { 0, NULL, NULL, NULL }
+       { 0, "rpc__mgmt_inq_if_ids", NULL, NULL },
+       { 1, "rpc__mgmt_inq_stats", NULL, NULL },
+       { 2, "rpc__mgmt_is_server_listening", NULL, NULL },
+       { 3, "rpc__mgmt_stop_server_listening", NULL, NULL },
+       { 4, "rpc__mgmt_inq_princ_name", NULL, NULL },
+       { 0, NULL, NULL, NULL }
 };
 
 
index 5efa0b0e8a4c34c6e3154fa782aeb1b243915ab3..b5fec00b2c3e9b0b8ea6466818b92cf6893dcb49 100644 (file)
@@ -52,17 +52,17 @@ static guint16  ver_rep_proc = 4;
 
 
 static dcerpc_sub_dissector rep_proc_dissectors[] = {
-    { 0, "CheckReplicationConfig", NULL, NULL },
-    { 1, "AllCheckReplicationConfig", NULL, NULL },
-    { 2, "KeepFilesAlive", NULL , NULL},
-    { 3, "GetVolChangedFiles", NULL, NULL },
-    { 4, "GetRepStatus", NULL, NULL},
-    { 5, "GetRepServerStatus", NULL, NULL},
-    { 6, "UpdateSelf", NULL, NULL},
-    { 7, "Probe", NULL, NULL},
-    { 8, "GetOneRepStatus", NULL, NULL },
-    { 9, "GetServerInterfaces", NULL, NULL},
-    { 0, NULL, NULL, NULL }
+       { 0, "CheckReplicationConfig", NULL, NULL },
+       { 1, "AllCheckReplicationConfig", NULL, NULL },
+       { 2, "KeepFilesAlive", NULL , NULL},
+       { 3, "GetVolChangedFiles", NULL, NULL },
+       { 4, "GetRepStatus", NULL, NULL},
+       { 5, "GetRepServerStatus", NULL, NULL},
+       { 6, "UpdateSelf", NULL, NULL},
+       { 7, "Probe", NULL, NULL},
+       { 8, "GetOneRepStatus", NULL, NULL },
+       { 9, "GetServerInterfaces", NULL, NULL},
+       { 0, NULL, NULL, NULL }
 };
 
 
index f3e95a109fd62693e4dd28525c0547747f65c7c7..3beabc303c1539b5b7d855b866990da48008facc 100644 (file)
@@ -52,22 +52,22 @@ static guint16  ver_roverride = 1;
 
 
 static dcerpc_sub_dissector roverride_dissectors[] = {
-    { 0, "roverride_get_login_info", NULL, NULL},
-    { 1, "roverride_check_passwd", NULL, NULL},
-    { 2, "roverride_is_passwd_overridden", NULL, NULL},
-    { 3, "roverride_get_by_unix_num", NULL, NULL},
-    { 4, "roverride_get_group_info", NULL, NULL},
-    { 5, "roverride_check_group_passwd", NULL, NULL},
-    { 6, "roverride_is_grp_pwd_overridden", NULL, NULL},
-    { 0, NULL, NULL, NULL }
+       { 0, "roverride_get_login_info", NULL, NULL},
+       { 1, "roverride_check_passwd", NULL, NULL},
+       { 2, "roverride_is_passwd_overridden", NULL, NULL},
+       { 3, "roverride_get_by_unix_num", NULL, NULL},
+       { 4, "roverride_get_group_info", NULL, NULL},
+       { 5, "roverride_check_group_passwd", NULL, NULL},
+       { 6, "roverride_is_grp_pwd_overridden", NULL, NULL},
+       { 0, NULL, NULL, NULL }
 };
 
 void
 proto_register_roverride (void)
 {
        static hf_register_info hf[] = {
-      { &hf_roverride_opnum,
-         { "Operation", "roverride.opnum", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+               { &hf_roverride_opnum,
+                 { "Operation", "roverride.opnum", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
        };
 
        static gint *ett[] = {
index ba580195f74d129f6375f32aa4bfde1b1aad1bd1..4137288060ab12cd4ae054bc5bfb3de8935d7f13 100644 (file)
@@ -59,8 +59,8 @@ static guint16  ver_rpriv = 1;
 
 static int
 rpriv_dissect_get_eptgt_rqst (tvbuff_t *tvb, int offset,
-                         packet_info *pinfo, proto_tree *tree,
-                         guint8 *drep)
+                             packet_info *pinfo, proto_tree *tree,
+                             guint8 *drep)
 {
        /*        [in]        handle_t         handle,
         *        [in]        unsigned32       authn_svc,
@@ -71,66 +71,66 @@ rpriv_dissect_get_eptgt_rqst (tvbuff_t *tvb, int offset,
         *                    byte            bytes[];
         */                                 
 
-   guint32 authn_svc, authz_svc, key_size, key_size2, var1;
-   const char *key_t1 = NULL;
-   const char *key_t2 = NULL;
+       guint32 authn_svc, authz_svc, key_size, key_size2, var1;
+       const char *key_t1 = NULL;
+       const char *key_t2 = NULL;
 
-   offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_rpriv_get_eptgt_rqst_authn_svc, &authn_svc);
-   offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_rpriv_get_eptgt_rqst_authz_svc, &authz_svc);
-   offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_rpriv_get_eptgt_rqst_var1, &var1);
-   offset += 276;
-   offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_rpriv_get_eptgt_rqst_key_size2, &key_size);
-   /* advance to get size of cell, and princ */
+       offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_rpriv_get_eptgt_rqst_authn_svc, &authn_svc);
+       offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_rpriv_get_eptgt_rqst_authz_svc, &authz_svc);
+       offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_rpriv_get_eptgt_rqst_var1, &var1);
+       offset += 276;
+       offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_rpriv_get_eptgt_rqst_key_size2, &key_size);
+       /* advance to get size of cell, and princ */
 
-   proto_tree_add_string (tree, hf_rpriv_get_eptgt_rqst_key_t, tvb, offset, hf_rpriv_get_eptgt_rqst_key_size, tvb_get_ptr (tvb, offset, key_size));
-   key_t1 = (const char *)tvb_get_ptr(tvb,offset,key_size);
-   offset += key_size;
+       proto_tree_add_string (tree, hf_rpriv_get_eptgt_rqst_key_t, tvb, offset, hf_rpriv_get_eptgt_rqst_key_size, tvb_get_ptr (tvb, offset, key_size));
+       key_t1 = (const char *)tvb_get_ptr(tvb,offset,key_size);
+       offset += key_size;
 
-   offset += 8;
-   offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_rpriv_get_eptgt_rqst_key_size2, &key_size2);
-   proto_tree_add_string (tree, hf_rpriv_get_eptgt_rqst_key_t2, tvb, offset, hf_rpriv_get_eptgt_rqst_key_size2, tvb_get_ptr (tvb, offset, key_size2));
-   key_t2 = (const char *)tvb_get_ptr(tvb,offset,key_size2);
-   offset += key_size2;
+       offset += 8;
+       offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep, hf_rpriv_get_eptgt_rqst_key_size2, &key_size2);
+       proto_tree_add_string (tree, hf_rpriv_get_eptgt_rqst_key_t2, tvb, offset, hf_rpriv_get_eptgt_rqst_key_size2, tvb_get_ptr (tvb, offset, key_size2));
+       key_t2 = (const char *)tvb_get_ptr(tvb,offset,key_size2);
+       offset += key_size2;
 
 
-   if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_append_fstr(pinfo->cinfo, COL_INFO,
-                   " Request for: %s in %s ", key_t2, key_t1);
-   }
+       if (check_col(pinfo->cinfo, COL_INFO)) {
+               col_append_fstr(pinfo->cinfo, COL_INFO,
+                               " Request for: %s in %s ", key_t2, key_t1);
+       }
 
-   return offset;
+       return offset;
 
 }
 
 
 static dcerpc_sub_dissector rpriv_dissectors[] = {
-    { 0, "get_ptgt", NULL,NULL},
-    { 1, "become_delegate", NULL, NULL},
-    { 2, "become_impersonator", NULL, NULL},
-    { 3, "get_eptgt", rpriv_dissect_get_eptgt_rqst , NULL},
-    { 0, NULL, NULL, NULL }
+       { 0, "get_ptgt", NULL,NULL},
+       { 1, "become_delegate", NULL, NULL},
+       { 2, "become_impersonator", NULL, NULL},
+       { 3, "get_eptgt", rpriv_dissect_get_eptgt_rqst , NULL},
+       { 0, NULL, NULL, NULL }
 };
 
 void
 proto_register_rpriv (void)
 {
        static hf_register_info hf[] = {
-      { &hf_rpriv_opnum,
-         { "Operation", "rpriv.opnum", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
-      { &hf_rpriv_get_eptgt_rqst_authn_svc,
-         { "Authn_Svc", "rpriv.get_eptgt_rqst_authn_svc", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
-      { &hf_rpriv_get_eptgt_rqst_authz_svc,
-         { "Authz_Svc", "rpriv.get_eptgt_rqst_authz_svc", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
-      { &hf_rpriv_get_eptgt_rqst_key_size,
-         { "Key_Size", "rpriv.get_eptgt_rqst_key_size", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
-      { &hf_rpriv_get_eptgt_rqst_var1,
-         { "Var1", "rpriv.get_eptgt_rqst_var1", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
-      { &hf_rpriv_get_eptgt_rqst_key_size2,
-         { "Key_Size", "rpriv.get_eptgt_rqst_key_size2", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
-      { &hf_rpriv_get_eptgt_rqst_key_t,
-         { "Key_t", "rpriv.get_eptgt_rqst_key_t", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
-      { &hf_rpriv_get_eptgt_rqst_key_t2,
-         { "Key_t2", "rpriv.get_eptgt_rqst_key_t2", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
+               { &hf_rpriv_opnum,
+                 { "Operation", "rpriv.opnum", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+               { &hf_rpriv_get_eptgt_rqst_authn_svc,
+                 { "Authn_Svc", "rpriv.get_eptgt_rqst_authn_svc", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+               { &hf_rpriv_get_eptgt_rqst_authz_svc,
+                 { "Authz_Svc", "rpriv.get_eptgt_rqst_authz_svc", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+               { &hf_rpriv_get_eptgt_rqst_key_size,
+                 { "Key_Size", "rpriv.get_eptgt_rqst_key_size", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+               { &hf_rpriv_get_eptgt_rqst_var1,
+                 { "Var1", "rpriv.get_eptgt_rqst_var1", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+               { &hf_rpriv_get_eptgt_rqst_key_size2,
+                 { "Key_Size", "rpriv.get_eptgt_rqst_key_size2", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+               { &hf_rpriv_get_eptgt_rqst_key_t,
+                 { "Key_t", "rpriv.get_eptgt_rqst_key_t", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
+               { &hf_rpriv_get_eptgt_rqst_key_t2,
+                 { "Key_t2", "rpriv.get_eptgt_rqst_key_t2", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
                                         
        };
 
index 4a4dea0fcc9cc5e10addafe8c7e62fd93177f98d..2ae3e8eb5b31bf68282f2b3d1ef50c40818bd071 100644 (file)
@@ -52,24 +52,24 @@ static guint16  ver_rs_attr = 0;
 
 
 static dcerpc_sub_dissector rs_attr_dissectors[] = {
-    { 0, "rs_attr_cursor_init", NULL, NULL},
-    { 1, "rs_attr_lookup_by_id", NULL, NULL},
-    { 2, "rs_attr_lookup_no_expand", NULL, NULL},
-    { 3, "rs_attr_lookup_by_name", NULL, NULL},
-    { 4, "rs_attr_update", NULL, NULL},
-    { 5, "rs_attr_test_and_update", NULL, NULL},
-    { 6, "rs_attr_delete", NULL, NULL},
-    { 7, "rs_attr_get_referral", NULL, NULL},
-    { 8, "rs_attr_get_effective", NULL, NULL},
-    { 0, NULL, NULL, NULL }
+       { 0, "rs_attr_cursor_init", NULL, NULL},
+       { 1, "rs_attr_lookup_by_id", NULL, NULL},
+       { 2, "rs_attr_lookup_no_expand", NULL, NULL},
+       { 3, "rs_attr_lookup_by_name", NULL, NULL},
+       { 4, "rs_attr_update", NULL, NULL},
+       { 5, "rs_attr_test_and_update", NULL, NULL},
+       { 6, "rs_attr_delete", NULL, NULL},
+       { 7, "rs_attr_get_referral", NULL, NULL},
+       { 8, "rs_attr_get_effective", NULL, NULL},
+       { 0, NULL, NULL, NULL }
 };
 
 void
 proto_register_rs_attr (void)
 {
        static hf_register_info hf[] = {
-       { &hf_rs_attr_opnum,
-               { "Operation", "rs_attr.opnum", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+               { &hf_rs_attr_opnum,
+                 { "Operation", "rs_attr.opnum", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
        };
 
        static gint *ett[] = {
index 7cfc727b077827c34c3b948ec6a206cbfd8a3f50..ec88432311ea4495839c28c830ff24c773c9db08 100644 (file)
@@ -39,7 +39,7 @@
 #include <epan/packet.h>
 #include "packet-dcerpc.h"
 #include "packet-dcerpc-dce122.h"
-/* 
+/*
 delete
 dissect_rgy_acct_user_flags_t
 */
@@ -331,9 +331,9 @@ dissect_sec_rgy_pgo_flags_t (tvbuff_t * tvb, int offset,
         const unsigned32 sec_rgy_pgo_flags_none = 0;
 */
 #define sec_rgy_pgo_is_an_alias   0x1
-#define sec_rgy_pgo_is_required    0x2
-#define sec_rgy_pgo_projlist_ok 0x4
-#define sec_rgy_pgo_flags_none  0
+#define sec_rgy_pgo_is_required   0x2
+#define sec_rgy_pgo_projlist_ok   0x4
+#define sec_rgy_pgo_flags_none      0
 
 
   col_append_str (pinfo->cinfo, COL_INFO, " PgoFlags=");
@@ -618,7 +618,7 @@ dissect_sec_rgy_cursor_t (tvbuff_t * tvb, int offset,
         boolean32       valid;
     }               sec_rgy_cursor_t;
 
+
 */
 
   proto_item *item = NULL;
@@ -1142,7 +1142,7 @@ rs_pgo_dissect_delete_resp (tvbuff_t * tvb, int offset,
  buff_remain = tvb_length_remaining(tvb, offset);
 
 /* found several add_member responses that had 8 bytes of data. first was 4 0's and last was 3 zeros and a 1 */
+
   if (buff_remain > 8) {
   offset =
     dissect_ndr_pointer (tvb, offset, pinfo, tree, drep,
@@ -1202,7 +1202,7 @@ rs_pgo_dissect_replace_resp (tvbuff_t * tvb, int offset,
 /*
         [out]       rs_cache_data_t     *cache_info,
         [out]       error_status_t      *status
-  
+
 */
 
   offset =
@@ -1636,7 +1636,7 @@ rs_pgo_dissect_delete_member_resp (tvbuff_t * tvb, int offset,
 /*
         [out]       rs_cache_data_t     *cache_info,
         [out]       error_status_t      *status
+
 */
 
   offset =
@@ -1662,7 +1662,7 @@ static dcerpc_sub_dissector rs_pgo_dissectors[] = {
   {5, "key_transfer", rs_pgo_dissect_key_transfer_rqst,
    rs_pgo_dissect_key_transfer_resp},
   {6, "add_member", rs_pgo_dissect_add_member_rqst,
-   rs_pgo_dissect_add_member_resp}, 
+   rs_pgo_dissect_add_member_resp},
   {7, "delete_member", rs_pgo_dissect_delete_member_rqst,
    rs_pgo_dissect_delete_member_resp},
   {8, "is_member", rs_pgo_dissect_is_member_rqst,
index d10501c7449289fb96914ab5f7a20ec10484c2fe..782b41fac95026d2ba49d879d773008c5da4fb7b 100644 (file)
@@ -52,21 +52,21 @@ static guint16  ver_rs_repadm = 1;
 
 
 
-        
+
 static dcerpc_sub_dissector rs_repadm_dissectors[] = {
-    { 0, "stop", NULL, NULL},
-    { 1, "maint", NULL, NULL},
-    { 2, "mkey", NULL, NULL},
-    { 3, "info", NULL, NULL},
-    { 4, "info_full", NULL, NULL},
-    { 5, "destroy", NULL, NULL},
-    { 6, "init_replica", NULL, NULL},
-    { 7, "change_master", NULL, NULL},
-    { 8, "become_master", NULL, NULL},
-    { 9, "become_slave", NULL, NULL},
-    { 10, "set_sw_rev", NULL, NULL},
-    { 11, "get_sw_vers_info", NULL, NULL},
-    { 0, NULL, NULL, NULL }
+       { 0, "stop", NULL, NULL},
+       { 1, "maint", NULL, NULL},
+       { 2, "mkey", NULL, NULL},
+       { 3, "info", NULL, NULL},
+       { 4, "info_full", NULL, NULL},
+       { 5, "destroy", NULL, NULL},
+       { 6, "init_replica", NULL, NULL},
+       { 7, "change_master", NULL, NULL},
+       { 8, "become_master", NULL, NULL},
+       { 9, "become_slave", NULL, NULL},
+       { 10, "set_sw_rev", NULL, NULL},
+       { 11, "get_sw_vers_info", NULL, NULL},
+       { 0, NULL, NULL, NULL }
 };
 
 
index d4ccd3258b5753b1b9bfd459e44d53a6430a41be..870f49dcdeaa7fddc0a42a457636ab2b641f8698 100644 (file)
@@ -52,24 +52,24 @@ static guint16  ver_rs_replist = 2;
 
 
 static dcerpc_sub_dissector rs_replist_dissectors[] = {
-    { 0, "rs_replist_add_replica", NULL, NULL},
-    { 1, "rs_replist_replace_replica", NULL, NULL},
-    { 2, "rs_replist_delete_replica", NULL, NULL},
-    { 3, "rs_replist_read", NULL, NULL},
-    { 4, "rs_replist_read_full", NULL, NULL},
-    { 5, "rs_replist_add_replica", NULL, NULL},
-    { 6, "rs_replist_replace_replica", NULL, NULL},
-    { 7, "rs_replist_delete_replica", NULL, NULL},
-    { 8, "rs_replist_read", NULL, NULL},
-    { 9, "rs_replist_read_full", NULL, NULL},
-    { 0, NULL, NULL, NULL }
+       { 0, "rs_replist_add_replica", NULL, NULL},
+       { 1, "rs_replist_replace_replica", NULL, NULL},
+       { 2, "rs_replist_delete_replica", NULL, NULL},
+       { 3, "rs_replist_read", NULL, NULL},
+       { 4, "rs_replist_read_full", NULL, NULL},
+       { 5, "rs_replist_add_replica", NULL, NULL},
+       { 6, "rs_replist_replace_replica", NULL, NULL},
+       { 7, "rs_replist_delete_replica", NULL, NULL},
+       { 8, "rs_replist_read", NULL, NULL},
+       { 9, "rs_replist_read_full", NULL, NULL},
+       { 0, NULL, NULL, NULL }
 };
 
 void
 proto_register_rs_replist (void)
 {
        static hf_register_info hf[] = {
-       { &hf_rs_replist_opnum,
+               { &hf_rs_replist_opnum,
                { "Operation", "rs_replist.opnum", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
        };
 
index bf7f359de1d4077a0b777b49a5312c09f6e4d89a..0c9271f82c939e359c918720533494d5674af3b2 100644 (file)
@@ -51,17 +51,17 @@ static guint16  ver_rs_unix = 1;
 
 
 static dcerpc_sub_dissector rs_unix_dissectors[] = {
-    { 0, "getpwents", NULL, NULL },
-    { 0, NULL, NULL, NULL },
+       { 0, "getpwents", NULL, NULL },
+       { 0, NULL, NULL, NULL },
 };
 
 void
 proto_register_rs_unix (void)
 {
        static hf_register_info hf[] = {
-         { &hf_rs_unix_opnum,
-           { "Operation", "rs_unix.opnum", FT_UINT16, BASE_DEC,
-             NULL, 0x0, NULL, HFILL }}
+               { &hf_rs_unix_opnum,
+                 { "Operation", "rs_unix.opnum", FT_UINT16, BASE_DEC,
+                   NULL, 0x0, NULL, HFILL }}
        };
 
        static gint *ett[] = {
index c012e2b08880e69970b8b4f0f36c51ef1e2ae222..f7b3d88089b63a21d5492ff975f544ff2cb82bd0 100644 (file)
@@ -51,15 +51,15 @@ static guint16  ver_rsec_login = 2;
 
 
 static dcerpc_sub_dissector rsec_login_dissectors[] = {
-    { 0, "rsec_login_get_trusted_preauth", NULL, NULL},
-    { 0, NULL, NULL, NULL }
+       { 0, "rsec_login_get_trusted_preauth", NULL, NULL},
+       { 0, NULL, NULL, NULL }
 };
 
 void
 proto_register_rsec_login (void)
 {
        static hf_register_info hf[] = {
-       { &hf_rsec_login_opnum,
+               { &hf_rsec_login_opnum,
                { "Operation", "rsec_login.opnum", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }}
        };
 
index fc3220d45316b8b08fd2703c61e5c41ca4755d44..a96c31e610a021c6c8d72c2940679792f663505c 100644 (file)
@@ -371,7 +371,7 @@ struct access_mask_info spoolss_printer_access_mask_info = {
 };
 
 static void
-spoolss_printserver_specific_rights(tvbuff_t *tvb, gint offset, 
+spoolss_printserver_specific_rights(tvbuff_t *tvb, gint offset,
                                    proto_tree *tree, guint32 access)
 {
        proto_tree_add_boolean(
@@ -389,7 +389,7 @@ struct access_mask_info spoolss_printserver_access_mask_info = {
 };
 
 static void
-spoolss_job_specific_rights(tvbuff_t *tvb, gint offset, 
+spoolss_job_specific_rights(tvbuff_t *tvb, gint offset,
                            proto_tree *tree, guint32 access)
 {
        proto_tree_add_boolean(
@@ -439,7 +439,7 @@ dissect_spoolss_buffer_data(tvbuff_t *tvb, int offset, packet_info *pinfo,
        item = proto_tree_add_item(
                tree, hf_buffer_data, tvb, offset - size,
                size, drep[0] & 0x10);
-               
+
        /* Return buffer info */
 
        if (b) {
@@ -477,7 +477,7 @@ dissect_spoolss_buffer(tvbuff_t *tvb, gint offset, packet_info *pinfo,
 
        offset = dissect_ndr_pointer(
                tvb, offset, pinfo, tree, drep,
-               dissect_spoolss_buffer_data, NDR_POINTER_UNIQUE, 
+               dissect_spoolss_buffer_data, NDR_POINTER_UNIQUE,
                "Buffer", -1);
 
        return offset;
@@ -500,7 +500,7 @@ static int hf_time_msec = -1;
 
 static int
 dissect_SYSTEM_TIME(tvbuff_t *tvb, int offset, packet_info *pinfo,
-                   proto_tree *tree, guint8 *drep, const char *name, 
+                   proto_tree *tree, guint8 *drep, const char *name,
                    gboolean add_subtree, char **data)
 {
        proto_item *item = NULL;
@@ -537,11 +537,11 @@ dissect_SYSTEM_TIME(tvbuff_t *tvb, int offset, packet_info *pinfo,
        offset = dissect_ndr_uint16(
                tvb, offset, pinfo, subtree, drep, hf_time_msec, &millisecond);
 
-       str = ep_strdup_printf("%d/%02d/%02d %02d:%02d:%02d.%03d", 
+       str = ep_strdup_printf("%d/%02d/%02d %02d:%02d:%02d.%03d",
                              year, month, day, hour, minute, second,
                              millisecond);
 
-       if (add_subtree) 
+       if (add_subtree)
                proto_item_append_text(item, ": %s", str);
 
        if (data)
@@ -638,11 +638,11 @@ static int dissect_printerdata_data(tvbuff_t *tvb, int offset,
                offset = dissect_ndr_uint8s(
                        tvb, offset, pinfo, subtree, drep,
                        hf_printerdata_data, size, NULL);
-               
+
                switch(type) {
                case DCERPC_REG_SZ: {
                        char *data = tvb_fake_unicode(tvb, offset - size, size/2, TRUE);
-                       
+
                        proto_item_append_text(item, ": %s", data);
 
                        if (check_col(pinfo->cinfo, COL_INFO))
@@ -665,7 +665,7 @@ static int dissect_printerdata_data(tvbuff_t *tvb, int offset,
 
                        if (check_col(pinfo->cinfo, COL_INFO))
                                col_append_fstr(
-                                       pinfo->cinfo, COL_INFO, " = 0x%08x", 
+                                       pinfo->cinfo, COL_INFO, " = 0x%08x",
                                        data);
 
                        hidden_item = proto_tree_add_uint(
@@ -677,7 +677,7 @@ static int dissect_printerdata_data(tvbuff_t *tvb, int offset,
                }
                case DCERPC_REG_BINARY:
                        col_append_str(
-                                       pinfo->cinfo, COL_INFO, 
+                                       pinfo->cinfo, COL_INFO,
                                        " = <binary data>");
                        break;
 
@@ -685,7 +685,7 @@ static int dissect_printerdata_data(tvbuff_t *tvb, int offset,
                        break;
                }
        }
-       
+
        proto_item_set_len(item, size + 4);
 
        return offset;
@@ -1147,24 +1147,24 @@ static const value_string devmode_papersize_vals[] =
        { DEVMODE_PAPERSIZE_A5ROT, "A5 (Rotated)" },
        { DEVMODE_PAPERSIZE_B4JISROT, "B4 (JIS, Rotated)" },
        { DEVMODE_PAPERSIZE_B5JISROT, "B5 (JIS, Rotated)"},
-       { DEVMODE_PAPERSIZE_JAPANESEPOSTCARDROT, 
+       { DEVMODE_PAPERSIZE_JAPANESEPOSTCARDROT,
          "Japanese Postcard (Rotated)" },
-       { DEVMODE_PAPERSIZE_DBLJAPANESEPOSTCARDROT82, 
+       { DEVMODE_PAPERSIZE_DBLJAPANESEPOSTCARDROT82,
          "Double Japanese Postcard (Rotated)" },
        { DEVMODE_PAPERSIZE_A6ROT, "A6 (Rotated)" },
-       { DEVMODE_PAPERSIZE_JENVKAKU2ROT, 
+       { DEVMODE_PAPERSIZE_JENVKAKU2ROT,
          "Japanese Envelope (Kaku #2, Rotated)" },
-       { DEVMODE_PAPERSIZE_JENVKAKU3ROT, 
+       { DEVMODE_PAPERSIZE_JENVKAKU3ROT,
          "Japanese Envelope (Kaku #3, Rotated)" },
-       { DEVMODE_PAPERSIZE_JENVCHOU3ROT, 
+       { DEVMODE_PAPERSIZE_JENVCHOU3ROT,
          "Japanese Envelope (Chou #3, Rotated)" },
-       { DEVMODE_PAPERSIZE_JENVCHOU4ROT, 
+       { DEVMODE_PAPERSIZE_JENVCHOU4ROT,
          "Japanese Envelope (Chou #4, Rotated)" },
        { DEVMODE_PAPERSIZE_B6JIS, "B6 (JIS)" },
        { DEVMODE_PAPERSIZE_B6JISROT, "B6 (JIS, Rotated)" },
        { DEVMODE_PAPERSIZE_12X11, "12x11" },
        { DEVMODE_PAPERSIZE_JENVYOU4, "Japanese Envelope (You #4)" },
-       { DEVMODE_PAPERSIZE_JENVYOU4ROT, 
+       { DEVMODE_PAPERSIZE_JENVYOU4ROT,
          "Japanese Envelope (You #4, Rotated" },
        { DEVMODE_PAPERSIZE_P16K, "PRC 16K" },
        { DEVMODE_PAPERSIZE_P32K, "PRC 32K" },
@@ -1351,115 +1351,115 @@ dissect_DEVMODE_fields(tvbuff_t *tvb, gint offset, packet_info *pinfo,
        subtree = proto_item_add_subtree(item, ett_DEVMODE_fields);
 
        proto_tree_add_boolean(
-               subtree, hf_devmode_fields_orientation, 
+               subtree, hf_devmode_fields_orientation,
                tvb, offset - 4, 4, fields);
 
        proto_tree_add_boolean(
-               subtree, hf_devmode_fields_papersize, 
+               subtree, hf_devmode_fields_papersize,
                tvb, offset - 4, 4, fields);
 
        proto_tree_add_boolean(
-               subtree, hf_devmode_fields_paperlength, 
+               subtree, hf_devmode_fields_paperlength,
                tvb, offset - 4, 4, fields);
 
        proto_tree_add_boolean(
-               subtree, hf_devmode_fields_paperwidth, 
+               subtree, hf_devmode_fields_paperwidth,
                tvb, offset - 4, 4, fields);
 
        proto_tree_add_boolean(
-               subtree, hf_devmode_fields_scale, 
+               subtree, hf_devmode_fields_scale,
                tvb, offset - 4, 4, fields);
 
        proto_tree_add_boolean(
-               subtree, hf_devmode_fields_position, 
+               subtree, hf_devmode_fields_position,
                tvb, offset - 4, 4, fields);
 
        proto_tree_add_boolean(
-               subtree, hf_devmode_fields_nup, 
+               subtree, hf_devmode_fields_nup,
                tvb, offset - 4, 4, fields);
 
        proto_tree_add_boolean(
-               subtree, hf_devmode_fields_copies, 
+               subtree, hf_devmode_fields_copies,
                tvb, offset - 4, 4, fields);
 
        proto_tree_add_boolean(
-               subtree, hf_devmode_fields_defaultsource, 
+               subtree, hf_devmode_fields_defaultsource,
                tvb, offset - 4, 4, fields);
 
        proto_tree_add_boolean(
-               subtree, hf_devmode_fields_printquality, 
+               subtree, hf_devmode_fields_printquality,
                tvb, offset - 4, 4, fields);
 
        proto_tree_add_boolean(
-               subtree, hf_devmode_fields_color, 
+               subtree, hf_devmode_fields_color,
                tvb, offset - 4, 4, fields);
 
        proto_tree_add_boolean(
-               subtree, hf_devmode_fields_duplex, 
+               subtree, hf_devmode_fields_duplex,
                tvb, offset - 4, 4, fields);
 
        proto_tree_add_boolean(
-               subtree, hf_devmode_fields_yresolution, 
+               subtree, hf_devmode_fields_yresolution,
                tvb, offset - 4, 4, fields);
 
        proto_tree_add_boolean(
-               subtree, hf_devmode_fields_ttoption, 
+               subtree, hf_devmode_fields_ttoption,
                tvb, offset - 4, 4, fields);
 
        proto_tree_add_boolean(
-               subtree, hf_devmode_fields_collate, 
+               subtree, hf_devmode_fields_collate,
                tvb, offset - 4, 4, fields);
 
        proto_tree_add_boolean(
-               subtree, hf_devmode_fields_formname, 
+               subtree, hf_devmode_fields_formname,
                tvb, offset - 4, 4, fields);
 
        proto_tree_add_boolean(
-               subtree, hf_devmode_fields_logpixels, 
+               subtree, hf_devmode_fields_logpixels,
                tvb, offset - 4, 4, fields);
 
        proto_tree_add_boolean(
-               subtree, hf_devmode_fields_bitsperpel, 
+               subtree, hf_devmode_fields_bitsperpel,
                tvb, offset - 4, 4, fields);
 
        proto_tree_add_boolean(
-               subtree, hf_devmode_fields_pelswidth, 
+               subtree, hf_devmode_fields_pelswidth,
                tvb, offset - 4, 4, fields);
 
        proto_tree_add_boolean(
-               subtree, hf_devmode_fields_pelsheight, 
+               subtree, hf_devmode_fields_pelsheight,
                tvb, offset - 4, 4, fields);
 
        proto_tree_add_boolean(
-               subtree, hf_devmode_fields_displayflags, 
+               subtree, hf_devmode_fields_displayflags,
                tvb, offset - 4, 4, fields);
 
        proto_tree_add_boolean(
-               subtree, hf_devmode_fields_displayfrequency, 
+               subtree, hf_devmode_fields_displayfrequency,
                tvb, offset - 4, 4, fields);
 
        proto_tree_add_boolean(
-               subtree, hf_devmode_fields_icmmethod, 
+               subtree, hf_devmode_fields_icmmethod,
                tvb, offset - 4, 4, fields);
 
        proto_tree_add_boolean(
-               subtree, hf_devmode_fields_icmintent, 
+               subtree, hf_devmode_fields_icmintent,
                tvb, offset - 4, 4, fields);
 
        proto_tree_add_boolean(
-               subtree, hf_devmode_fields_mediatype, 
+               subtree, hf_devmode_fields_mediatype,
                tvb, offset - 4, 4, fields);
 
        proto_tree_add_boolean(
-               subtree, hf_devmode_fields_dithertype, 
+               subtree, hf_devmode_fields_dithertype,
                tvb, offset - 4, 4, fields);
 
        proto_tree_add_boolean(
-               subtree, hf_devmode_fields_panningwidth, 
+               subtree, hf_devmode_fields_panningwidth,
                tvb, offset - 4, 4, fields);
 
        proto_tree_add_boolean(
-               subtree, hf_devmode_fields_panningheight, 
+               subtree, hf_devmode_fields_panningheight,
                tvb, offset - 4, 4, fields);
 
        if (pdata)
@@ -1470,7 +1470,7 @@ dissect_DEVMODE_fields(tvbuff_t *tvb, gint offset, packet_info *pinfo,
 
 static gint ett_DEVMODE = -1;
 
-static int dissect_DEVMODE(tvbuff_t *tvb, int offset, packet_info *pinfo, 
+static int dissect_DEVMODE(tvbuff_t *tvb, int offset, packet_info *pinfo,
                           proto_tree *tree, guint8 *drep)
 {
        dcerpc_info *di = pinfo->private_data;
@@ -1482,13 +1482,13 @@ static int dissect_DEVMODE(tvbuff_t *tvb, int offset, packet_info *pinfo,
        int struct_start = offset;
 
        if (di->conformant_run)
-               return offset;  
+               return offset;
 
        item = proto_tree_add_text(tree, tvb, offset, 0, "Devicemode");
        subtree = proto_item_add_subtree(item, ett_DEVMODE);
 
        offset = dissect_ndr_uint32(
-               tvb, offset, pinfo, subtree, drep, hf_devmode_size, 
+               tvb, offset, pinfo, subtree, drep, hf_devmode_size,
                NULL);
 
        /* The device name is stored in a 32-wchar buffer */
@@ -1498,54 +1498,54 @@ static int dissect_DEVMODE(tvbuff_t *tvb, int offset, packet_info *pinfo,
        offset += 64;
 
        offset = dissect_ndr_uint16(
-               tvb, offset, pinfo, subtree, drep, 
+               tvb, offset, pinfo, subtree, drep,
                hf_devmode_spec_version, NULL);
 
        offset = dissect_ndr_uint16(
-               tvb, offset, pinfo, subtree, drep, 
+               tvb, offset, pinfo, subtree, drep,
                hf_devmode_driver_version, NULL);
 
        offset = dissect_ndr_uint16(
-               tvb, offset, pinfo, subtree, drep, 
+               tvb, offset, pinfo, subtree, drep,
                hf_devmode_size2, NULL);
 
        offset = dissect_ndr_uint16(
-               tvb, offset, pinfo, subtree, drep, 
+               tvb, offset, pinfo, subtree, drep,
                hf_devmode_driver_extra_len, &driver_extra);
 
        offset = dissect_DEVMODE_fields(
                tvb, offset, pinfo, subtree, drep, &fields);
 
        offset = dissect_ndr_uint16(
-               tvb, offset, pinfo, subtree, drep, 
+               tvb, offset, pinfo, subtree, drep,
                hf_devmode_orientation, NULL);
 
        offset = dissect_ndr_uint16(
-               tvb, offset, pinfo, subtree, drep, 
+               tvb, offset, pinfo, subtree, drep,
                hf_devmode_paper_size, NULL);
 
        offset = dissect_ndr_uint16(
-               tvb, offset, pinfo, subtree, drep, 
+               tvb, offset, pinfo, subtree, drep,
                hf_devmode_paper_length, NULL);
 
        offset = dissect_ndr_uint16(
-               tvb, offset, pinfo, subtree, drep, 
+               tvb, offset, pinfo, subtree, drep,
                hf_devmode_paper_width, NULL);
 
        offset = dissect_ndr_uint16(
-               tvb, offset, pinfo, subtree, drep, 
+               tvb, offset, pinfo, subtree, drep,
                hf_devmode_scale, NULL);
 
        offset = dissect_ndr_uint16(
-               tvb, offset, pinfo, subtree, drep, 
+               tvb, offset, pinfo, subtree, drep,
                hf_devmode_copies, NULL);
 
        offset = dissect_ndr_uint16(
-               tvb, offset, pinfo, subtree, drep, 
+               tvb, offset, pinfo, subtree, drep,
                hf_devmode_default_source, NULL);
 
        offset = dissect_ndr_uint16(
-               tvb, offset, pinfo, NULL, drep, 
+               tvb, offset, pinfo, NULL, drep,
                hf_devmode_print_quality, &print_quality);
 
        if (print_quality < 0)
@@ -1554,27 +1554,27 @@ static int dissect_DEVMODE(tvbuff_t *tvb, int offset, packet_info *pinfo,
                        offset - 2, 2, drep[0] & 0x10);
        else
                proto_tree_add_text(
-                       subtree, tvb, offset - 4, 4, 
+                       subtree, tvb, offset - 4, 4,
                        "Print Quality: %d dpi", print_quality);
 
        offset = dissect_ndr_uint16(
-               tvb, offset, pinfo, subtree, drep, 
+               tvb, offset, pinfo, subtree, drep,
                hf_devmode_color, NULL);
 
        offset = dissect_ndr_uint16(
-               tvb, offset, pinfo, subtree, drep, 
+               tvb, offset, pinfo, subtree, drep,
                hf_devmode_duplex, NULL);
 
        offset = dissect_ndr_uint16(
-               tvb, offset, pinfo, subtree, drep, 
+               tvb, offset, pinfo, subtree, drep,
                hf_devmode_y_resolution, NULL);
 
        offset = dissect_ndr_uint16(
-               tvb, offset, pinfo, subtree, drep, 
+               tvb, offset, pinfo, subtree, drep,
                hf_devmode_tt_option, NULL);
 
        offset = dissect_ndr_uint16(
-               tvb, offset, pinfo, subtree, drep, 
+               tvb, offset, pinfo, subtree, drep,
                hf_devmode_collate, NULL);
 
        dissect_spoolss_uint16uni(tvb, offset, pinfo, subtree, drep, NULL,
@@ -1582,72 +1582,72 @@ static int dissect_DEVMODE(tvbuff_t *tvb, int offset, packet_info *pinfo,
        offset += 64;
 
        offset = dissect_ndr_uint16(
-               tvb, offset, pinfo, subtree, drep, 
+               tvb, offset, pinfo, subtree, drep,
                hf_devmode_log_pixels, NULL);
 
        offset = dissect_ndr_uint32(
-               tvb, offset, pinfo, subtree, drep, 
+               tvb, offset, pinfo, subtree, drep,
                hf_devmode_bits_per_pel, NULL);
 
        offset = dissect_ndr_uint32(
-               tvb, offset, pinfo, subtree, drep, 
+               tvb, offset, pinfo, subtree, drep,
                hf_devmode_pels_width, NULL);
 
        offset = dissect_ndr_uint32(
-               tvb, offset, pinfo, subtree, drep, 
+               tvb, offset, pinfo, subtree, drep,
                hf_devmode_pels_height, NULL);
 
        offset = dissect_ndr_uint32(
-               tvb, offset, pinfo, subtree, drep, 
+               tvb, offset, pinfo, subtree, drep,
                hf_devmode_display_flags, NULL);
 
        offset = dissect_ndr_uint32(
-               tvb, offset, pinfo, subtree, drep, 
+               tvb, offset, pinfo, subtree, drep,
                hf_devmode_display_freq, NULL);
-       
+
        /* TODO: Some of the remaining fields are optional.  See
           rpc_parse/parse_spoolss.c in the Samba source for details. */
 
        offset = dissect_ndr_uint32(
-               tvb, offset, pinfo, subtree, drep, 
+               tvb, offset, pinfo, subtree, drep,
                hf_devmode_icm_method, NULL);
-       
+
        offset = dissect_ndr_uint32(
-               tvb, offset, pinfo, subtree, drep, 
+               tvb, offset, pinfo, subtree, drep,
                hf_devmode_icm_intent, NULL);
 
        offset = dissect_ndr_uint32(
-               tvb, offset, pinfo, subtree, drep, 
+               tvb, offset, pinfo, subtree, drep,
                hf_devmode_media_type, NULL);
-       
+
        offset = dissect_ndr_uint32(
-               tvb, offset, pinfo, subtree, drep, 
+               tvb, offset, pinfo, subtree, drep,
                hf_devmode_dither_type, NULL);
 
        offset = dissect_ndr_uint32(
-               tvb, offset, pinfo, subtree, drep, 
+               tvb, offset, pinfo, subtree, drep,
                hf_devmode_reserved1, NULL);
-       
+
        offset = dissect_ndr_uint32(
-               tvb, offset, pinfo, subtree, drep, 
+               tvb, offset, pinfo, subtree, drep,
                hf_devmode_reserved2, NULL);
-       
+
        offset = dissect_ndr_uint32(
-               tvb, offset, pinfo, subtree, drep, 
+               tvb, offset, pinfo, subtree, drep,
                hf_devmode_panning_width, NULL);
-       
+
        offset = dissect_ndr_uint32(
-               tvb, offset, pinfo, subtree, drep, 
+               tvb, offset, pinfo, subtree, drep,
                hf_devmode_panning_height, NULL);
 
        if (driver_extra)
                offset = dissect_ndr_uint8s(
                        tvb, offset, pinfo, subtree, drep,
                        hf_devmode_driver_extra, driver_extra, NULL);
-                       
+
        proto_item_set_len(item, offset - struct_start);
 
-       return offset;                            
+       return offset;
 }
 
 /*
@@ -1656,7 +1656,7 @@ static int dissect_DEVMODE(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
 static gint ett_DEVMODE_CTR = -1;
 
-static int dissect_DEVMODE_CTR(tvbuff_t *tvb, int offset, packet_info *pinfo, 
+static int dissect_DEVMODE_CTR(tvbuff_t *tvb, int offset, packet_info *pinfo,
                               proto_tree *tree, guint8 *drep)
 {
        proto_item *item;
@@ -1667,7 +1667,7 @@ static int dissect_DEVMODE_CTR(tvbuff_t *tvb, int offset, packet_info *pinfo,
                tree, tvb, offset, 0, "Devicemode container");
 
        subtree = proto_item_add_subtree(item, ett_DEVMODE_CTR);
-       
+
        offset = dissect_ndr_uint32(tvb, offset, pinfo, subtree, drep,
                                    hf_devmodectr_size, &size);
 
@@ -1677,7 +1677,7 @@ static int dissect_DEVMODE_CTR(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
        return offset;
 }
-       
+
 /*
  * Relative string given by offset into the current buffer.  Note that
  * the offset for subsequent relstrs are against the structure start, not
@@ -1696,7 +1696,7 @@ dissect_spoolss_relstr(tvbuff_t *tvb, int offset, packet_info *pinfo,
        guint32 relstr_offset, relstr_start, relstr_end;
        char *text;
 
-       /* Peek ahead to read the string.  We need this for the 
+       /* Peek ahead to read the string.  We need this for the
            proto_tree_add_string() call so filtering will work. */
 
        offset = dissect_ndr_uint32(
@@ -1711,7 +1711,7 @@ dissect_spoolss_relstr(tvbuff_t *tvb, int offset, packet_info *pinfo,
                text = g_strdup("");
                relstr_end = relstr_start;
        }
-               
+
        /* OK now add the proto item with the string value */
 
        item = proto_tree_add_string(tree, hf_index, tvb, relstr_start, relstr_end - relstr_start, text);
@@ -1818,8 +1818,8 @@ static const value_string printer_status_vals[] =
 
 static gint ett_PRINTER_INFO_0 = -1;
 
-static int dissect_PRINTER_INFO_0(tvbuff_t *tvb, int offset, 
-                                 packet_info *pinfo, proto_tree *tree, 
+static int dissect_PRINTER_INFO_0(tvbuff_t *tvb, int offset,
+                                 packet_info *pinfo, proto_tree *tree,
                                  guint8 *drep)
 {
        offset = dissect_spoolss_relstr(
@@ -1834,30 +1834,30 @@ static int dissect_PRINTER_INFO_0(tvbuff_t *tvb, int offset,
                tvb, offset, pinfo, tree, drep, hf_printer_cjobs, NULL);
 
        offset = dissect_ndr_uint32(
-               tvb, offset, pinfo, tree, drep, hf_printer_total_jobs, 
+               tvb, offset, pinfo, tree, drep, hf_printer_total_jobs,
                NULL);
 
        offset = dissect_ndr_uint32(
-               tvb, offset, pinfo, tree, drep, hf_printer_total_bytes, 
+               tvb, offset, pinfo, tree, drep, hf_printer_total_bytes,
                NULL);
 
        offset = dissect_SYSTEM_TIME(
                tvb, offset, pinfo, tree, drep, "Unknown time", TRUE, NULL);
 
        offset = dissect_ndr_uint32(
-               tvb, offset, pinfo, tree, drep, hf_printer_global_counter, 
+               tvb, offset, pinfo, tree, drep, hf_printer_global_counter,
                NULL);
 
        offset = dissect_ndr_uint32(
-               tvb, offset, pinfo, tree, drep, hf_printer_total_pages, 
+               tvb, offset, pinfo, tree, drep, hf_printer_total_pages,
                NULL);
 
        offset = dissect_ndr_uint16(
-               tvb, offset, pinfo, tree, drep, hf_printer_major_version, 
+               tvb, offset, pinfo, tree, drep, hf_printer_major_version,
                NULL);
 
        offset = dissect_ndr_uint16(
-               tvb, offset, pinfo, tree, drep, hf_printer_build_version, 
+               tvb, offset, pinfo, tree, drep, hf_printer_build_version,
                NULL);
 
        offset = dissect_ndr_uint32(
@@ -1870,12 +1870,12 @@ static int dissect_PRINTER_INFO_0(tvbuff_t *tvb, int offset,
                tvb, offset, pinfo, tree, drep, hf_printer_unk9, NULL);
 
        offset = dissect_ndr_uint32(
-               tvb, offset, pinfo, tree, drep, hf_printer_session_ctr, 
+               tvb, offset, pinfo, tree, drep, hf_printer_session_ctr,
                NULL);
 
        offset = dissect_ndr_uint32( tvb, offset, pinfo, tree, drep,
                hf_printer_unk11, NULL);
-       
+
        offset = dissect_ndr_uint32( tvb, offset, pinfo, tree, drep,
                hf_printer_printer_errors, NULL);
 
@@ -1904,7 +1904,7 @@ static int dissect_PRINTER_INFO_0(tvbuff_t *tvb, int offset,
                tvb, offset, pinfo, tree, drep, hf_printer_unk20, NULL);
 
        offset = dissect_ndr_uint32(
-               tvb, offset, pinfo, tree, drep, hf_printer_c_setprinter, 
+               tvb, offset, pinfo, tree, drep, hf_printer_c_setprinter,
                NULL);
 
        offset = dissect_ndr_uint16(
@@ -1940,8 +1940,8 @@ static int dissect_PRINTER_INFO_0(tvbuff_t *tvb, int offset,
 
 static gint ett_PRINTER_INFO_1 = -1;
 
-static int dissect_PRINTER_INFO_1(tvbuff_t *tvb, int offset, 
-                                 packet_info *pinfo, proto_tree *tree, 
+static int dissect_PRINTER_INFO_1(tvbuff_t *tvb, int offset,
+                                 packet_info *pinfo, proto_tree *tree,
                                  guint8 *drep)
 {
        offset = dissect_ndr_uint32(
@@ -2039,7 +2039,7 @@ dissect_job_status(tvbuff_t *tvb, int offset, packet_info *pinfo,
        subtree = proto_item_add_subtree(item, ett_job_status);
 
        proto_tree_add_boolean(
-               subtree, hf_job_status_user_intervention, tvb, offset - 4, 4, 
+               subtree, hf_job_status_user_intervention, tvb, offset - 4, 4,
                status);
 
        proto_tree_add_boolean(
@@ -2246,8 +2246,8 @@ dissect_printer_attributes(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
 static gint ett_PRINTER_INFO_2 = -1;
 
-static int dissect_PRINTER_INFO_2(tvbuff_t *tvb, int offset, 
-                                 packet_info *pinfo, proto_tree *tree, 
+static int dissect_PRINTER_INFO_2(tvbuff_t *tvb, int offset,
+                                 packet_info *pinfo, proto_tree *tree,
                                  guint8 *drep)
 {
        guint32 devmode_offset, secdesc_offset;
@@ -2281,7 +2281,7 @@ static int dissect_PRINTER_INFO_2(tvbuff_t *tvb, int offset,
                0, NULL);
 
        offset = dissect_ndr_uint32(
-               tvb, offset, pinfo, NULL, drep, hf_offset, 
+               tvb, offset, pinfo, NULL, drep, hf_offset,
                &devmode_offset);
 
        dissect_DEVMODE(tvb, devmode_offset - 4, pinfo, tree, drep);
@@ -2315,7 +2315,7 @@ static int dissect_PRINTER_INFO_2(tvbuff_t *tvb, int offset,
                &secdesc_offset);
 
        dissect_nt_sec_desc(
-               tvb, secdesc_offset, pinfo, tree, drep, 
+               tvb, secdesc_offset, pinfo, tree, drep,
                FALSE, -1,
                &spoolss_printer_access_mask_info);
 
@@ -2326,7 +2326,7 @@ static int dissect_PRINTER_INFO_2(tvbuff_t *tvb, int offset,
                NULL);
 
        offset = dissect_ndr_uint32(
-               tvb, offset, pinfo, NULL, drep, 
+               tvb, offset, pinfo, NULL, drep,
                hf_printer_default_priority, NULL);
 
        offset = dissect_ndr_uint32(
@@ -2340,32 +2340,32 @@ static int dissect_PRINTER_INFO_2(tvbuff_t *tvb, int offset,
                hf_printer_status, NULL);
 
        offset = dissect_ndr_uint32(
-               tvb, offset, pinfo, NULL, drep, hf_printer_jobs, 
+               tvb, offset, pinfo, NULL, drep, hf_printer_jobs,
                NULL);
 
        offset = dissect_ndr_uint32(
-               tvb, offset, pinfo, NULL, drep, 
+               tvb, offset, pinfo, NULL, drep,
                hf_printer_averageppm, NULL);
 
        return offset;
 }
-       
+
 /*
  * PRINTER_INFO_3
  */
 
 static gint ett_PRINTER_INFO_3 = -1;
 
-static int dissect_PRINTER_INFO_3(tvbuff_t *tvb, int offset, 
-                                 packet_info *pinfo, proto_tree *tree, 
+static int dissect_PRINTER_INFO_3(tvbuff_t *tvb, int offset,
+                                 packet_info *pinfo, proto_tree *tree,
                                  guint8 *drep)
 {
        offset = dissect_ndr_uint32(
                tvb, offset, pinfo, tree, drep,
                hf_printer_flags, NULL);
-       
+
        offset = dissect_nt_sec_desc(
-               tvb, offset, pinfo, tree, drep, 
+               tvb, offset, pinfo, tree, drep,
                FALSE, -1,
                &spoolss_printer_access_mask_info);
 
@@ -2391,8 +2391,8 @@ static const value_string getprinter_action_vals[] = {
        { 0, NULL }
 };
 
-static int dissect_PRINTER_INFO_7(tvbuff_t *tvb, int offset, 
-                                 packet_info *pinfo, proto_tree *tree, 
+static int dissect_PRINTER_INFO_7(tvbuff_t *tvb, int offset,
+                                 packet_info *pinfo, proto_tree *tree,
                                  guint8 *drep)
 {
        offset = dissect_spoolss_relstr(
@@ -2402,7 +2402,7 @@ static int dissect_PRINTER_INFO_7(tvbuff_t *tvb, int offset,
        offset = dissect_ndr_uint32(
                tvb, offset, pinfo, tree, drep,
                hf_printer_action, NULL);
-       
+
        return offset;
 }
 
@@ -2412,8 +2412,8 @@ static int dissect_PRINTER_INFO_7(tvbuff_t *tvb, int offset,
 
 static gint ett_PRINTER_DATATYPE = -1;
 
-static int dissect_PRINTER_DATATYPE(tvbuff_t *tvb, int offset, 
-                                   packet_info *pinfo, proto_tree *tree, 
+static int dissect_PRINTER_DATATYPE(tvbuff_t *tvb, int offset,
+                                   packet_info *pinfo, proto_tree *tree,
                                    guint8 *drep _U_)
 {
        dcerpc_info *di = pinfo->private_data;
@@ -2442,15 +2442,15 @@ static int hf_userlevel_major = -1;
 static int hf_userlevel_minor = -1;
 static int hf_userlevel_processor = -1;
 
-static int dissect_USER_LEVEL_1(tvbuff_t *tvb, int offset, 
-                                packet_info *pinfo, proto_tree *tree, 
+static int dissect_USER_LEVEL_1(tvbuff_t *tvb, int offset,
+                                packet_info *pinfo, proto_tree *tree,
                                 guint8 *drep)
 {
         guint32 level;
 
        /* Guy has pointed out that this dissection looks wrong.  In
-          the wireshark output for a USER_LEVEL_1 it looks like the 
-           info level and container pointer are transposed.  I'm not 
+          the wireshark output for a USER_LEVEL_1 it looks like the
+           info level and container pointer are transposed.  I'm not
            even sure this structure is a container. */
 
         offset = dissect_ndr_uint32(
@@ -2488,8 +2488,8 @@ static int dissect_USER_LEVEL_1(tvbuff_t *tvb, int offset,
 
 static gint ett_USER_LEVEL_CTR = -1;
 
-static int dissect_USER_LEVEL_CTR(tvbuff_t *tvb, int offset, 
-                                  packet_info *pinfo, proto_tree *tree, 
+static int dissect_USER_LEVEL_CTR(tvbuff_t *tvb, int offset,
+                                  packet_info *pinfo, proto_tree *tree,
                                   guint8 *drep)
 {
         dcerpc_info *di = pinfo->private_data;
@@ -2504,7 +2504,7 @@ static int dissect_USER_LEVEL_CTR(tvbuff_t *tvb, int offset,
                tree, tvb, offset, 0, "User level container");
 
         subtree = proto_item_add_subtree(item, ett_USER_LEVEL_CTR);
-        
+
         offset = dissect_ndr_uint32(
                 tvb, offset, pinfo, subtree, drep, hf_level, &level);
 
@@ -2569,14 +2569,14 @@ static int SpoolssOpenPrinterEx_q(tvbuff_t *tvb, int offset,
 
                /* Determine if we are opening a printer or a print server */
 
-               if (strchr(name, '\\')) 
+               if (strchr(name, '\\'))
                        offset = dissect_nt_access_mask(
-                               tvb, offset, pinfo, tree, drep, 
+                               tvb, offset, pinfo, tree, drep,
                                hf_access_required,
                                &spoolss_printer_access_mask_info, NULL);
                else
                        offset = dissect_nt_access_mask(
-                               tvb, offset, pinfo, tree, drep, 
+                               tvb, offset, pinfo, tree, drep,
                                hf_access_required,
                                &spoolss_printserver_access_mask_info, NULL);
        } else {
@@ -2764,7 +2764,7 @@ static const char *notify_plural(int count)
 
        return "notifies";
 }
-       
+
 static gint ett_NOTIFY_OPTION = -1;
 
 static int
@@ -2786,7 +2786,7 @@ dissect_NOTIFY_OPTION(tvbuff_t *tvb, int offset, packet_info *pinfo,
                                    hf_notify_option_type, &type);
 
        proto_item_append_text(
-               item, ": %s", val_to_str(type, printer_notify_types, 
+               item, ": %s", val_to_str(type, printer_notify_types,
                                         "Unknown (%d)"));
 
        offset = dissect_ndr_uint16(tvb, offset, pinfo, subtree, drep,
@@ -3200,18 +3200,18 @@ static int SpoolssReplyOpenPrinter_q(tvbuff_t *tvb, int offset,
                col_append_fstr(pinfo->cinfo, COL_INFO, ", %s", name);
 
        offset = dissect_ndr_uint32(
-               tvb, offset, pinfo, tree, drep, hf_printerlocal, 
+               tvb, offset, pinfo, tree, drep, hf_printerlocal,
                &printerlocal);
 
        offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
                                    hf_printerdata_type, NULL);
 
        offset = dissect_ndr_uint32(
-               tvb, offset, pinfo, tree, drep, hf_replyopenprinter_unk0, 
+               tvb, offset, pinfo, tree, drep, hf_replyopenprinter_unk0,
                NULL);
 
        offset = dissect_ndr_uint32(
-               tvb, offset, pinfo, tree, drep, hf_replyopenprinter_unk1, 
+               tvb, offset, pinfo, tree, drep, hf_replyopenprinter_unk1,
                NULL);
 
        return offset;
@@ -3232,7 +3232,7 @@ static int SpoolssReplyOpenPrinter_r(tvbuff_t *tvb, int offset,
        offset = dissect_nt_policy_hnd(
                tvb, offset, pinfo, tree, drep, hf_hnd, &policy_hnd, &hnd_item,
                TRUE, FALSE);
-       
+
        offset = dissect_doserror(
                tvb, offset, pinfo, tree, drep, hf_rc, &status);
 
@@ -3325,7 +3325,7 @@ static int SpoolssGetPrinter_r(tvbuff_t *tvb, int offset, packet_info *pinfo,
                        item = proto_tree_add_text(
                                buffer.tree, buffer.tvb, 0, -1,
                                "Print info level %d", level);
-                       
+
                        subtree = proto_item_add_subtree(
                                item, ett_PRINTER_INFO);
                        break;
@@ -3387,8 +3387,8 @@ dissect_SEC_DESC_BUF(tvbuff_t *tvb, int offset, packet_info *pinfo,
        proto_tree *subtree;
        guint32 len;
 
-       /* XXX: I think this is really a array of bytes which can be 
-           dissected using dissect_ndr_cvstring().  The dissected data 
+       /* XXX: I think this is really a array of bytes which can be
+           dissected using dissect_ndr_cvstring().  The dissected data
            can be passed to dissect_nt_sec_desc().  The problem is that
            dissect_nt_cvstring() passes back a char * where it really
            should pass back a tvb. */
@@ -3409,12 +3409,12 @@ dissect_SEC_DESC_BUF(tvbuff_t *tvb, int offset, packet_info *pinfo,
         offset = dissect_ndr_uint32(
                 tvb, offset, pinfo, subtree, drep,
                 hf_secdescbuf_len, &len);
-       
+
        dissect_nt_sec_desc(
-               tvb, offset, pinfo, subtree, drep, TRUE, len, 
+               tvb, offset, pinfo, subtree, drep, TRUE, len,
                &spoolss_printer_access_mask_info);
 
-       offset += len;  
+       offset += len;
 
        return offset;
 }
@@ -3456,12 +3456,12 @@ dissect_SPOOL_PRINTER_INFO(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
                offset = dissect_ndr_uint32(
                        tvb, offset, pinfo, subtree, drep,
-                       hf_spool_printer_info_devmode_ptr, 
+                       hf_spool_printer_info_devmode_ptr,
                        &devmode_ptr);
 
                offset = dissect_ndr_uint32(
                        tvb, offset, pinfo, subtree, drep,
-                       hf_spool_printer_info_secdesc_ptr, 
+                       hf_spool_printer_info_secdesc_ptr,
                        &secdesc_ptr);
 
                if (devmode_ptr)
@@ -3473,7 +3473,7 @@ dissect_SPOOL_PRINTER_INFO(tvbuff_t *tvb, int offset, packet_info *pinfo,
                                tvb, offset, pinfo, subtree, drep);
 
        break;
-       }               
+       }
        case 2:
        default:
                proto_tree_add_text(
@@ -3519,7 +3519,7 @@ static int SpoolssSetPrinter_q(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
        offset = dissect_SPOOL_PRINTER_INFO(
                tvb, offset, pinfo, tree, drep);
-       
+
        offset = dissect_ndr_uint32(
                tvb, offset, pinfo, tree, drep,
                hf_setprinter_cmd, NULL);
@@ -3797,7 +3797,7 @@ static int SpoolssEnumPrinterData_q(tvbuff_t *tvb, int offset,
                FALSE, FALSE);
 
        offset = dissect_ndr_uint32(
-               tvb, offset, pinfo, tree, drep, 
+               tvb, offset, pinfo, tree, drep,
                hf_enumprinterdata_enumindex, &ndx);
 
        if (check_col(pinfo->cinfo, COL_INFO))
@@ -3841,7 +3841,7 @@ static int SpoolssEnumPrinterData_r(tvbuff_t *tvb, int offset,
 
        if (value_len) {
                dissect_spoolss_uint16uni(
-                       tvb, offset, pinfo, value_subtree, drep, &value, 
+                       tvb, offset, pinfo, value_subtree, drep, &value,
                        "Value name");
 
                offset += value_len * 2;
@@ -4034,7 +4034,7 @@ static int SpoolssEnumPrinters_r(tvbuff_t *tvb, int offset, packet_info *pinfo,
                tvb, offset, pinfo, tree, drep, hf_needed, NULL);
 
        offset = dissect_ndr_uint32(
-               tvb, offset, pinfo, tree, drep, hf_returned, 
+               tvb, offset, pinfo, tree, drep, hf_returned,
                &num_drivers);
 
        offset = dissect_doserror(
@@ -4239,7 +4239,7 @@ static int SpoolssDeleteForm_q(tvbuff_t *tvb, int offset, packet_info *pinfo,
                col_append_fstr(pinfo->cinfo, COL_INFO, ", %s", name);
 
        g_free(name);
-       
+
        return offset;
 }
 
@@ -4287,7 +4287,7 @@ static int SpoolssSetForm_q(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
        if (check_col(pinfo->cinfo, COL_INFO) && name)
                col_append_fstr(pinfo->cinfo, COL_INFO, ", %s", name);
-       
+
        g_free(name);
 
        offset = dissect_ndr_uint32(
@@ -4398,13 +4398,13 @@ static int SpoolssGetForm_r(tvbuff_t *tvb, int offset, packet_info *pinfo,
                switch(level) {
                case 1: {
                        int struct_start = buffer_offset;
-                       
+
                        buffer_offset = dissect_FORM_REL(
                                buffer.tvb, buffer_offset, pinfo, tree, drep,
                                struct_start);
                        break;
                }
-                       
+
                default:
                        proto_tree_add_text(
                                buffer.tree, buffer.tvb, buffer_offset, -1,
@@ -4573,7 +4573,7 @@ dissect_spoolss_JOB_INFO_2(tvbuff_t *tvb, int offset, packet_info *pinfo,
                struct_start, NULL);
 
        offset = dissect_ndr_uint32(
-               tvb, offset, pinfo, NULL, drep, hf_offset, 
+               tvb, offset, pinfo, NULL, drep, hf_offset,
                &devmode_offset);
 
        dissect_DEVMODE(
@@ -4691,7 +4691,7 @@ static int SpoolssEnumJobs_r(tvbuff_t *tvb, int offset, packet_info *pinfo,
                tvb, offset, pinfo, tree, drep, hf_needed, NULL);
 
        offset = dissect_ndr_uint32(
-               tvb, offset, pinfo, tree, drep, hf_enumjobs_numjobs, 
+               tvb, offset, pinfo, tree, drep, hf_enumjobs_numjobs,
                &num_jobs);
 
        buffer_offset = 0;
@@ -4700,12 +4700,12 @@ static int SpoolssEnumJobs_r(tvbuff_t *tvb, int offset, packet_info *pinfo,
                switch(level) {
                case 1:
                        buffer_offset = dissect_spoolss_JOB_INFO_1(
-                               buffer.tvb, buffer_offset, pinfo, 
+                               buffer.tvb, buffer_offset, pinfo,
                                buffer.tree, drep);
                        break;
                case 2:
                        buffer_offset = dissect_spoolss_JOB_INFO_2(
-                               buffer.tvb, buffer_offset, pinfo, 
+                               buffer.tvb, buffer_offset, pinfo,
                                buffer.tree, drep);
                        break;
                default:
@@ -4833,11 +4833,11 @@ static int SpoolssGetJob_r(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
        if (buffer.tvb) {
                int buffer_offset = 0;
-               
+
                switch(level) {
                case 1:
                        buffer_offset = dissect_spoolss_JOB_INFO_1(
-                               buffer.tvb, buffer_offset, pinfo, 
+                               buffer.tvb, buffer_offset, pinfo,
                                buffer.tree, drep);
                        break;
                case 2:
@@ -5194,7 +5194,7 @@ static int SpoolssWritePrinter_r(tvbuff_t *tvb, int offset, packet_info *pinfo,
        /* Parse packet */
 
        offset = dissect_ndr_uint32(
-               tvb, offset, pinfo, tree, drep, hf_writeprinter_numwritten, 
+               tvb, offset, pinfo, tree, drep, hf_writeprinter_numwritten,
                &size);
 
        if (check_col(pinfo->cinfo, COL_INFO))
@@ -5492,7 +5492,7 @@ static int dissect_DRIVER_INFO_6(tvbuff_t *tvb, int offset,
 
        offset = dissect_spoolss_relstr(
                        tvb, offset, pinfo, subtree, drep, hf_provider,
-                       struct_start, NULL);    
+                       struct_start, NULL);
 
        return offset;
 }
@@ -5588,7 +5588,7 @@ static int SpoolssEnumPrinterDrivers_r(tvbuff_t *tvb, int offset,
                tvb, offset, pinfo, tree, drep, hf_needed, NULL);
 
        offset = dissect_ndr_uint32(
-               tvb, offset, pinfo, tree, drep, hf_returned, 
+               tvb, offset, pinfo, tree, drep, hf_returned,
                &num_drivers);
 
        buffer_offset = 0;
@@ -5604,7 +5604,7 @@ static int SpoolssEnumPrinterDrivers_r(tvbuff_t *tvb, int offset,
                        buffer_offset = dissect_DRIVER_INFO_2(
                                buffer.tvb, buffer_offset, pinfo,
                                buffer.tree, drep);
-                       break;  
+                       break;
                case 3:
                        buffer_offset = dissect_DRIVER_INFO_3(
                                buffer.tvb, buffer_offset, pinfo,
@@ -5768,9 +5768,9 @@ dissect_notify_info_data_buffer(tvbuff_t *tvb, int offset, packet_info *pinfo,
        return offset;
 }
 
-static void cb_notify_str_postprocess(packet_info *pinfo _U_, 
+static void cb_notify_str_postprocess(packet_info *pinfo _U_,
                                      proto_tree *tree _U_,
-                                     proto_item *item, tvbuff_t *tvb, 
+                                     proto_item *item, tvbuff_t *tvb,
                                      int start_offset, int end_offset,
                                      void *callback_args)
 {
@@ -5958,7 +5958,7 @@ dissect_NOTIFY_INFO_DATA_printer(tvbuff_t *tvb, int offset, packet_info *pinfo,
                        dissect_notify_info_data_buffer,
                        NDR_POINTER_UNIQUE, "String",
                        hf_notify_info_data_buffer,
-                       cb_notify_str_postprocess, 
+                       cb_notify_str_postprocess,
                        GINT_TO_POINTER(printer_notify_hf_index(field)));
 
                break;
@@ -5990,7 +5990,7 @@ dissect_NOTIFY_INFO_DATA_printer(tvbuff_t *tvb, int offset, packet_info *pinfo,
                        hf_notify_info_data_value2, NULL);
 
                proto_item_append_text(
-                       item, ": %s", 
+                       item, ": %s",
                        val_to_str(status, printer_status_vals, "Unknown"));
 
                break;
@@ -6027,16 +6027,16 @@ dissect_NOTIFY_INFO_DATA_printer(tvbuff_t *tvb, int offset, packet_info *pinfo,
        return offset;
 }
 
-static void notify_job_time_cb(packet_info *pinfo, proto_tree *tree _U_, 
-                              proto_item *item, tvbuff_t *tvb _U_, 
-                              int start_offset _U_, int end_offset _U_, 
+static void notify_job_time_cb(packet_info *pinfo, proto_tree *tree _U_,
+                              proto_item *item, tvbuff_t *tvb _U_,
+                              int start_offset _U_, int end_offset _U_,
                               void *callback_args _U_)
 {
        dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
        dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data;
        char *str = (char *)dcv->private_data;
 
-       /* Append job string stored in dcv->private_data by 
+       /* Append job string stored in dcv->private_data by
            dissect_SYSTEM_TIME_ptr() in the current item as well
            as the parent. */
 
@@ -6048,7 +6048,7 @@ static void notify_job_time_cb(packet_info *pinfo, proto_tree *tree _U_,
 
 static int
 dissect_NOTIFY_INFO_DATA_job(tvbuff_t *tvb, int offset, packet_info *pinfo,
-                            proto_tree *tree, proto_item *item, guint8 *drep, 
+                            proto_tree *tree, proto_item *item, guint8 *drep,
                             guint16 field)
 {
        guint32 value1;
@@ -6079,7 +6079,7 @@ dissect_NOTIFY_INFO_DATA_job(tvbuff_t *tvb, int offset, packet_info *pinfo,
                        dissect_notify_info_data_buffer,
                        NDR_POINTER_UNIQUE, "String",
                        hf_notify_info_data_buffer,
-                       cb_notify_str_postprocess, 
+                       cb_notify_str_postprocess,
                        GINT_TO_POINTER(job_notify_hf_index(field)));
 
                break;
@@ -6189,12 +6189,12 @@ dissect_NOTIFY_INFO_DATA(tvbuff_t *tvb, int offset, packet_info *pinfo,
        switch(type) {
        case PRINTER_NOTIFY_TYPE:
                field_string = val_to_str(
-                       field, printer_notify_option_data_vals, 
+                       field, printer_notify_option_data_vals,
                        "Unknown (%d)");
                break;
        case JOB_NOTIFY_TYPE:
                field_string = val_to_str(
-                       field, job_notify_option_data_vals, 
+                       field, job_notify_option_data_vals,
                        "Unknown (%d)");
                break;
        default:
@@ -6508,8 +6508,8 @@ dissect_spoolss_keybuffer(tvbuff_t *tvb, int offset, packet_info *pinfo,
 }
 
 
-static int SpoolssEnumPrinterKey_q(tvbuff_t *tvb, int offset, 
-                                  packet_info *pinfo, proto_tree *tree, 
+static int SpoolssEnumPrinterKey_q(tvbuff_t *tvb, int offset,
+                                  packet_info *pinfo, proto_tree *tree,
                                   guint8 *drep)
 {
        char *key_name;
@@ -6541,8 +6541,8 @@ static int SpoolssEnumPrinterKey_q(tvbuff_t *tvb, int offset,
        return offset;
 }
 
-static int SpoolssEnumPrinterKey_r(tvbuff_t *tvb, int offset, 
-                                  packet_info *pinfo, proto_tree *tree, 
+static int SpoolssEnumPrinterKey_r(tvbuff_t *tvb, int offset,
+                                  packet_info *pinfo, proto_tree *tree,
                                   guint8 *drep)
 {
        /* Parse packet */
@@ -6569,8 +6569,8 @@ static int hf_enumprinterdataex_val_dword_low = -1;
 static int hf_enumprinterdataex_val_dword_high = -1;
 static int hf_enumprinterdataex_val_sz = -1;
 
-static int SpoolssEnumPrinterDataEx_q(tvbuff_t *tvb, int offset, 
-                                     packet_info *pinfo, proto_tree *tree, 
+static int SpoolssEnumPrinterDataEx_q(tvbuff_t *tvb, int offset,
+                                     packet_info *pinfo, proto_tree *tree,
                                      guint8 *drep)
 {
        char *key_name;
@@ -6604,7 +6604,7 @@ static int SpoolssEnumPrinterDataEx_q(tvbuff_t *tvb, int offset,
 static gint ett_printer_enumdataex_value = -1;
 
 static int
-dissect_spoolss_printer_enum_values(tvbuff_t *tvb, int offset, 
+dissect_spoolss_printer_enum_values(tvbuff_t *tvb, int offset,
                                    packet_info *pinfo, proto_tree *tree,
                                    guint8 *drep)
 {
@@ -6625,7 +6625,7 @@ dissect_spoolss_printer_enum_values(tvbuff_t *tvb, int offset,
                hf_enumprinterdataex_name_len, &name_len);
 
        dissect_spoolss_uint16uni(
-               tvb, start_offset + name_offset, pinfo, NULL, drep, 
+               tvb, start_offset + name_offset, pinfo, NULL, drep,
                &name, "Name");
 
        item = proto_tree_add_text(tree, tvb, offset, 0, "Name: ");
@@ -6633,7 +6633,7 @@ dissect_spoolss_printer_enum_values(tvbuff_t *tvb, int offset,
        subtree = proto_item_add_subtree(item, ett_printer_enumdataex_value);
 
        proto_item_append_text(item, "%s", name);
-                              
+
        proto_tree_add_text(
                subtree, tvb, offset - 8, 4, "Name offset: %d", name_offset);
 
@@ -6645,7 +6645,7 @@ dissect_spoolss_printer_enum_values(tvbuff_t *tvb, int offset,
                "Name: %s", name);
 
        offset = dissect_ndr_uint32(
-               tvb, offset, pinfo, subtree, drep, hf_printerdata_type, 
+               tvb, offset, pinfo, subtree, drep, hf_printerdata_type,
                &val_type);
 
        offset = dissect_ndr_uint32(
@@ -6657,7 +6657,7 @@ dissect_spoolss_printer_enum_values(tvbuff_t *tvb, int offset,
                hf_enumprinterdataex_val_len, &val_len);
 
        if (val_len == 0) {
-               proto_tree_add_text(subtree, tvb, start_offset + val_offset, 4, 
+               proto_tree_add_text(subtree, tvb, start_offset + val_offset, 4,
                                    "Value: (null)");
                goto done;
        }
@@ -6681,7 +6681,7 @@ dissect_spoolss_printer_enum_values(tvbuff_t *tvb, int offset,
 
                value = (high << 16) | low;
 
-               proto_tree_add_text(subtree, tvb, start_offset + val_offset, 4, 
+               proto_tree_add_text(subtree, tvb, start_offset + val_offset, 4,
                                    "Value: %d", value);
 
                proto_item_append_text(item, ", Value: %d", value);
@@ -6692,7 +6692,7 @@ dissect_spoolss_printer_enum_values(tvbuff_t *tvb, int offset,
                char *value;
 
                dissect_spoolss_uint16uni(
-                       tvb, start_offset + val_offset, pinfo, subtree, drep, 
+                       tvb, start_offset + val_offset, pinfo, subtree, drep,
                        &value, "Value");
 
                proto_item_append_text(item, ", Value: %s", value);
@@ -6706,7 +6706,7 @@ dissect_spoolss_printer_enum_values(tvbuff_t *tvb, int offset,
                /* FIXME: nicer way to display this */
 
                proto_tree_add_text(
-                       subtree, tvb, start_offset + val_offset, val_len, 
+                       subtree, tvb, start_offset + val_offset, val_len,
                        "Value: <binary data>");
                break;
 
@@ -6715,7 +6715,7 @@ dissect_spoolss_printer_enum_values(tvbuff_t *tvb, int offset,
                /* FIXME: implement REG_MULTI_SZ support */
 
                proto_tree_add_text(
-                       subtree, tvb, start_offset + val_offset, val_len, 
+                       subtree, tvb, start_offset + val_offset, val_len,
                        "Value: <REG_MULTI_SZ not implemented>");
                break;
 
@@ -6733,8 +6733,8 @@ dissect_spoolss_printer_enum_values(tvbuff_t *tvb, int offset,
 
 static gint ett_PRINTER_DATA_CTR = -1;
 
-static int SpoolssEnumPrinterDataEx_r(tvbuff_t *tvb, int offset, 
-                                  packet_info *pinfo, proto_tree *tree, 
+static int SpoolssEnumPrinterDataEx_r(tvbuff_t *tvb, int offset,
+                                  packet_info *pinfo, proto_tree *tree,
                                   guint8 *drep)
 {
        guint32 size, num_values;
@@ -7014,16 +7014,16 @@ proto_register_dcerpc_spoolss(void)
 
                { &hf_previousdrivernames,
                  { "Previous Driver Names", "spoolss.previousdrivernames", FT_STRING, BASE_NONE,
-                   NULL, 0, NULL, HFILL }},               
+                   NULL, 0, NULL, HFILL }},
 
                { &hf_driverdate,
                  { "Driver Date", "spoolss.driverdate", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL,
-                   NULL, 0, "Date of driver creation", HFILL }},       
+                   NULL, 0, "Date of driver creation", HFILL }},
 
                { &hf_padding,
                  { "Padding", "spoolss.padding", FT_UINT32, BASE_HEX,
                    NULL, 0, "Some padding - conveys no semantic information", HFILL }},
-                  
+
                { &hf_driver_version_low,
                  { "Minor Driver Version", "spoolss.minordriverversion", FT_UINT32, BASE_DEC,
                    NULL, 0, "Driver Version Low", HFILL }},
@@ -7031,7 +7031,7 @@ proto_register_dcerpc_spoolss(void)
                { &hf_driver_version_high,
                  { "Major Driver Version", "spoolss.majordriverversion", FT_UINT32, BASE_DEC,
                    NULL, 0, "Driver Version High", HFILL }},
-                  
+
                { &hf_mfgname,
                  { "Mfgname", "spoolss.mfgname", FT_STRING, BASE_NONE,
                    NULL, 0, "Manufacturer Name", HFILL }},
@@ -7043,7 +7043,7 @@ proto_register_dcerpc_spoolss(void)
                { &hf_hardwareid,
                  { "Hardware ID", "spoolss.hardwareid", FT_STRING, BASE_NONE,
                    NULL, 0, "Hardware Identification Information", HFILL }},
-                  
+
                { &hf_provider,
                  { "Provider", "spoolss.provider", FT_STRING, BASE_NONE,
                    NULL, 0, "Provider of Driver", HFILL }},
@@ -7109,8 +7109,8 @@ proto_register_dcerpc_spoolss(void)
                  { "Elapsed time", "spoolss.elapsed_time",
                    FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
 
-               /* 
-                 * New hf index values 
+               /*
+                 * New hf index values
                  */
 
                { &hf_opnum,
@@ -7127,7 +7127,7 @@ proto_register_dcerpc_spoolss(void)
 
                { &hf_offered,
                  { "Offered", "spoolss.offered", FT_UINT32, BASE_DEC,
-                   NULL, 0x0, "Size of buffer offered in this request", 
+                   NULL, 0x0, "Size of buffer offered in this request",
                    HFILL }},
 
                { &hf_needed,
@@ -7151,28 +7151,28 @@ proto_register_dcerpc_spoolss(void)
                    NULL, 0x0, "Offset of data", HFILL }},
 
                { &hf_level,
-                 { "Info level", "spoolss.enumjobs.level", FT_UINT32, 
+                 { "Info level", "spoolss.enumjobs.level", FT_UINT32,
                    BASE_DEC, NULL, 0x0, NULL, HFILL }},
 
 
                { &hf_printername,
-                 { "Printer name", "spoolss.printername", FT_STRING, 
+                 { "Printer name", "spoolss.printername", FT_STRING,
                    BASE_NONE, NULL, 0, NULL, HFILL }},
 
                { &hf_machinename,
-                 { "Machine name", "spoolss.machinename", FT_STRING, 
+                 { "Machine name", "spoolss.machinename", FT_STRING,
                    BASE_NONE, NULL, 0, NULL, HFILL }},
 
                { &hf_notifyname,
-                 { "Notify name", "spoolss.notifyname", FT_STRING, 
+                 { "Notify name", "spoolss.notifyname", FT_STRING,
                    BASE_NONE, NULL, 0, NULL, HFILL }},
 
                { &hf_printerdesc,
-                 { "Printer description", "spoolss.printerdesc", FT_STRING, 
+                 { "Printer description", "spoolss.printerdesc", FT_STRING,
                    BASE_NONE, NULL, 0, NULL, HFILL }},
 
                { &hf_printercomment,
-                 { "Printer comment", "spoolss.printercomment", FT_STRING, 
+                 { "Printer comment", "spoolss.printercomment", FT_STRING,
                    BASE_NONE, NULL, 0, NULL, HFILL }},
 
                { &hf_servername,
@@ -7188,11 +7188,11 @@ proto_register_dcerpc_spoolss(void)
                    NULL, 0, NULL, HFILL }},
 
                { &hf_printerlocation,
-                 { "Printer location", "spoolss.printerlocation", FT_STRING, 
+                 { "Printer location", "spoolss.printerlocation", FT_STRING,
                    BASE_NONE, NULL, 0, NULL, HFILL }},
 
                { &hf_architecture,
-                 { "Architecture name", "spoolss.architecture", FT_STRING, 
+                 { "Architecture name", "spoolss.architecture", FT_STRING,
                    BASE_NONE, NULL, 0, NULL, HFILL }},
 
                { &hf_drivername,
@@ -7228,32 +7228,32 @@ proto_register_dcerpc_spoolss(void)
                    NULL, 0, NULL, HFILL }},
 
                { &hf_printprocessor,
-                 { "Print processor", "spoolss.printprocessor", FT_STRING, 
+                 { "Print processor", "spoolss.printprocessor", FT_STRING,
                    BASE_NONE, NULL, 0, NULL, HFILL }},
 
                /* Printer data */
 
                { &hf_printerdata,
-                 { "Data", "spoolss.printerdata", FT_UINT32, 
+                 { "Data", "spoolss.printerdata", FT_UINT32,
                    BASE_HEX, NULL, 0, NULL, HFILL }},
 
                { &hf_printerdata_key,
-                 { "Key", "spoolss.printerdata.key", FT_STRING, 
+                 { "Key", "spoolss.printerdata.key", FT_STRING,
                    BASE_NONE, NULL, 0, "Printer data key", HFILL }},
 
                { &hf_printerdata_value,
-                 { "Value", "spoolss.printerdata.value", 
-                   FT_STRING, BASE_NONE, NULL, 0, "Printer data value", 
+                 { "Value", "spoolss.printerdata.value",
+                   FT_STRING, BASE_NONE, NULL, 0, "Printer data value",
                    HFILL }},
 
                { &hf_printerdata_type,
-                 { "Type", "spoolss.printerdata.type", 
-                   FT_UINT32, BASE_DEC, VALS(reg_datatypes), 0, 
+                 { "Type", "spoolss.printerdata.type",
+                   FT_UINT32, BASE_DEC, VALS(reg_datatypes), 0,
                    "Printer data type", HFILL }},
 
                { &hf_printerdata_size,
-                 { "Size", "spoolss.printerdata.size", 
-                   FT_UINT32, BASE_DEC, NULL, 0, "Printer data size", 
+                 { "Size", "spoolss.printerdata.size",
+                   FT_UINT32, BASE_DEC, NULL, 0, "Printer data size",
                    HFILL }},
 
                { &hf_printerdata_data,
@@ -7261,23 +7261,23 @@ proto_register_dcerpc_spoolss(void)
                    NULL, 0x0, "Printer data", HFILL }},
 
                { &hf_printerdata_data_dword,
-                 { "DWORD data", "spoolss.printerdata.data.dword", 
+                 { "DWORD data", "spoolss.printerdata.data.dword",
                    FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
 
                { &hf_printerdata_data_sz,
-                 { "String data", "spoolss.printerdata.data.sz", 
-                   FT_STRING, BASE_NONE, NULL, 0, NULL, 
+                 { "String data", "spoolss.printerdata.data.sz",
+                   FT_STRING, BASE_NONE, NULL, 0, NULL,
                    HFILL }},
 
                /* Devicemode */
 
                { &hf_devmodectr_size,
                  { "Devicemode ctr size", "spoolss.devicemodectr.size",
-                   FT_UINT32, BASE_DEC, NULL, 0, NULL, 
+                   FT_UINT32, BASE_DEC, NULL, 0, NULL,
                    HFILL }},
 
                { &hf_devmode,
-                 { "Devicemode", "spoolss.devmode", FT_UINT32, 
+                 { "Devicemode", "spoolss.devmode", FT_UINT32,
                    BASE_HEX, NULL, 0, NULL, HFILL }},
 
                { &hf_devmode_size,
@@ -7286,7 +7286,7 @@ proto_register_dcerpc_spoolss(void)
 
                { &hf_devmode_spec_version,
                  { "Spec version", "spoolss.devmode.spec_version",
-                   FT_UINT16, BASE_DEC, VALS(devmode_specversion_vals), 
+                   FT_UINT16, BASE_DEC, VALS(devmode_specversion_vals),
                    0, NULL, HFILL }},
 
                { &hf_devmode_driver_version,
@@ -7303,12 +7303,12 @@ proto_register_dcerpc_spoolss(void)
 
                { &hf_devmode_orientation,
                  { "Orientation", "spoolss.devmode.orientation",
-                   FT_UINT16, BASE_DEC, VALS(devmode_orientation_vals), 
+                   FT_UINT16, BASE_DEC, VALS(devmode_orientation_vals),
                    0, NULL, HFILL }},
 
                { &hf_devmode_paper_size,
                  { "Paper size", "spoolss.devmode.paper_size",
-                   FT_UINT16, BASE_DEC, VALS(devmode_papersize_vals), 
+                   FT_UINT16, BASE_DEC, VALS(devmode_papersize_vals),
                    0, NULL, HFILL }},
 
                { &hf_devmode_paper_width,
@@ -7329,22 +7329,22 @@ proto_register_dcerpc_spoolss(void)
 
                { &hf_devmode_default_source,
                  { "Default source", "spoolss.devmode.default_source",
-                   FT_UINT16, BASE_DEC, VALS(devmode_papersource_vals), 
+                   FT_UINT16, BASE_DEC, VALS(devmode_papersource_vals),
                    0, NULL, HFILL }},
 
                { &hf_devmode_print_quality,
                  { "Print quality", "spoolss.devmode.print_quality",
-                   FT_UINT16, BASE_DEC, VALS(devmode_printquality_vals), 
+                   FT_UINT16, BASE_DEC, VALS(devmode_printquality_vals),
                    0, NULL, HFILL }},
 
                { &hf_devmode_color,
                  { "Color", "spoolss.devmode.color",
-                   FT_UINT16, BASE_DEC, VALS(devmode_colour_vals), 0, 
+                   FT_UINT16, BASE_DEC, VALS(devmode_colour_vals), 0,
                    NULL, HFILL }},
 
                { &hf_devmode_duplex,
                  { "Duplex", "spoolss.devmode.duplex",
-                   FT_UINT16, BASE_DEC, VALS(devmode_duplex_vals), 0, 
+                   FT_UINT16, BASE_DEC, VALS(devmode_duplex_vals), 0,
                    NULL, HFILL }},
 
                { &hf_devmode_y_resolution,
@@ -7353,12 +7353,12 @@ proto_register_dcerpc_spoolss(void)
 
                { &hf_devmode_tt_option,
                  { "TT option", "spoolss.devmode.tt_option",
-                   FT_UINT16, BASE_DEC, VALS(devmode_ttoption_vals), 0, 
+                   FT_UINT16, BASE_DEC, VALS(devmode_ttoption_vals), 0,
                    NULL, HFILL }},
 
                { &hf_devmode_collate,
                  { "Collate", "spoolss.devmode.collate",
-                   FT_UINT16, BASE_DEC, VALS(devmode_collate_vals), 0, 
+                   FT_UINT16, BASE_DEC, VALS(devmode_collate_vals), 0,
                    NULL, HFILL }},
 
                { &hf_devmode_log_pixels,
@@ -7379,32 +7379,32 @@ proto_register_dcerpc_spoolss(void)
 
                { &hf_devmode_display_flags,
                  { "Display flags", "spoolss.devmode.display_flags",
-                   FT_UINT32, BASE_DEC, VALS(devmode_displayflags_vals), 0, 
+                   FT_UINT32, BASE_DEC, VALS(devmode_displayflags_vals), 0,
                    NULL, HFILL }},
 
                { &hf_devmode_display_freq,
                  { "Display frequency", "spoolss.devmode.display_freq",
-                   FT_UINT32, BASE_DEC, NULL, 0, NULL, 
+                   FT_UINT32, BASE_DEC, NULL, 0, NULL,
                    HFILL }},
 
                { &hf_devmode_icm_method,
                  { "ICM method", "spoolss.devmode.icm_method",
-                   FT_UINT32, BASE_DEC, VALS(devmode_icmmethod_vals), 0, 
+                   FT_UINT32, BASE_DEC, VALS(devmode_icmmethod_vals), 0,
                    NULL, HFILL }},
 
                { &hf_devmode_icm_intent,
                  { "ICM intent", "spoolss.devmode.icm_intent",
-                   FT_UINT32, BASE_DEC, VALS(devmode_icmintent_vals), 0, 
+                   FT_UINT32, BASE_DEC, VALS(devmode_icmintent_vals), 0,
                    NULL, HFILL }},
 
                { &hf_devmode_media_type,
                  { "Media type", "spoolss.devmode.media_type",
-                   FT_UINT32, BASE_DEC, VALS(devmode_mediatype_vals), 0, 
+                   FT_UINT32, BASE_DEC, VALS(devmode_mediatype_vals), 0,
                    NULL, HFILL }},
 
                { &hf_devmode_dither_type,
                  { "Dither type", "spoolss.devmode.dither_type",
-                   FT_UINT32, BASE_DEC, VALS(devmode_dithertype_vals), 0, 
+                   FT_UINT32, BASE_DEC, VALS(devmode_dithertype_vals), 0,
                    NULL, HFILL }},
 
                { &hf_devmode_reserved1,
@@ -7424,9 +7424,9 @@ proto_register_dcerpc_spoolss(void)
                    FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_devmode_driver_extra_len,
-                 { "Driver extra length", 
+                 { "Driver extra length",
                    "spoolss.devmode.driver_extra_len",
-                   FT_UINT32, BASE_DEC, NULL, 0, NULL, 
+                   FT_UINT32, BASE_DEC, NULL, 0, NULL,
                    HFILL }},
 
                { &hf_devmode_driver_extra,
@@ -7541,7 +7541,7 @@ proto_register_dcerpc_spoolss(void)
                    DEVMODE_DISPLAYFLAGS, NULL, HFILL }},
 
                { &hf_devmode_fields_displayfrequency,
-                 { "Display frequency", 
+                 { "Display frequency",
                    "spoolss.devmode.fields.display_frequency",
                    FT_BOOLEAN, 32, TFS(&tfs_set_notset),
                    DEVMODE_DISPLAYFREQUENCY, NULL, HFILL }},
@@ -7579,38 +7579,38 @@ proto_register_dcerpc_spoolss(void)
                /* EnumPrinterData RPC */
 
                { &hf_enumprinterdata_enumindex,
-                 { "Enum index", "spoolss.enumprinterdata.enumindex", 
-                   FT_UINT32, BASE_DEC, NULL, 0x0, 
+                 { "Enum index", "spoolss.enumprinterdata.enumindex",
+                   FT_UINT32, BASE_DEC, NULL, 0x0,
                    "Index for start of enumeration", HFILL }},
 
                { &hf_enumprinterdata_value_offered,
-                 { "Value size offered", 
-                   "spoolss.enumprinterdata.value_offered", FT_UINT32, 
-                   BASE_DEC, NULL, 0x0, 
+                 { "Value size offered",
+                   "spoolss.enumprinterdata.value_offered", FT_UINT32,
+                   BASE_DEC, NULL, 0x0,
                    "Buffer size offered for printerdata value", HFILL }},
 
                { &hf_enumprinterdata_data_offered,
-                 { "Data size offered", 
-                   "spoolss.enumprinterdata.data_offered", FT_UINT32, 
-                   BASE_DEC, NULL, 0x0, 
+                 { "Data size offered",
+                   "spoolss.enumprinterdata.data_offered", FT_UINT32,
+                   BASE_DEC, NULL, 0x0,
                    "Buffer size offered for printerdata data", HFILL }},
 
                { &hf_enumprinterdata_value_len,
-                 { "Value length", 
-                   "spoolss.enumprinterdata.value_len", FT_UINT32, 
-                   BASE_DEC, NULL, 0x0, 
+                 { "Value length",
+                   "spoolss.enumprinterdata.value_len", FT_UINT32,
+                   BASE_DEC, NULL, 0x0,
                    "Size of printerdata value", HFILL }},
 
                { &hf_enumprinterdata_value_needed,
-                 { "Value size needed", 
-                   "spoolss.enumprinterdata.value_needed", FT_UINT32, 
-                   BASE_DEC, NULL, 0x0, 
+                 { "Value size needed",
+                   "spoolss.enumprinterdata.value_needed", FT_UINT32,
+                   BASE_DEC, NULL, 0x0,
                    "Buffer size needed for printerdata value", HFILL }},
 
                { &hf_enumprinterdata_data_needed,
-                 { "Data size needed", 
+                 { "Data size needed",
                    "spoolss.enumprinterdata.data_needed", FT_UINT32, BASE_DEC,
-                   NULL, 0x0, "Buffer size needed for printerdata data", 
+                   NULL, 0x0, "Buffer size needed for printerdata data",
                    HFILL }},
 
                /* Print jobs */
@@ -7674,46 +7674,46 @@ proto_register_dcerpc_spoolss(void)
                    NULL, HFILL }},
 
                { &hf_job_status_user_intervention,
-                 { "User intervention", 
+                 { "User intervention",
                    "spoolss.job.status.user_intervention", FT_BOOLEAN, 32,
-                   TFS(&tfs_job_status_user_intervention), 
-                   JOB_STATUS_USER_INTERVENTION, NULL, 
+                   TFS(&tfs_job_status_user_intervention),
+                   JOB_STATUS_USER_INTERVENTION, NULL,
                    HFILL }},
 
                { &hf_job_priority,
-                 { "Job priority", "spoolss.job.priority", FT_UINT32, 
+                 { "Job priority", "spoolss.job.priority", FT_UINT32,
                    BASE_DEC, NULL, 0x0, NULL, HFILL }},
 
                { &hf_job_position,
-                 { "Job position", "spoolss.job.position", FT_UINT32, 
+                 { "Job position", "spoolss.job.position", FT_UINT32,
                    BASE_DEC, NULL, 0x0, NULL, HFILL }},
 
                { &hf_job_totalpages,
-                 { "Job total pages", "spoolss.job.totalpages", FT_UINT32, 
+                 { "Job total pages", "spoolss.job.totalpages", FT_UINT32,
                    BASE_DEC, NULL, 0x0, NULL, HFILL }},
 
                { &hf_job_totalbytes,
-                 { "Job total bytes", "spoolss.job.totalbytes", FT_UINT32, 
+                 { "Job total bytes", "spoolss.job.totalbytes", FT_UINT32,
                    BASE_DEC, NULL, 0x0, NULL, HFILL }},
 
                { &hf_job_bytesprinted,
-                 { "Job bytes printed", "spoolss.job.bytesprinted", 
-                   FT_UINT32, BASE_DEC, NULL, 0x0, NULL, 
+                 { "Job bytes printed", "spoolss.job.bytesprinted",
+                   FT_UINT32, BASE_DEC, NULL, 0x0, NULL,
                    HFILL }},
 
                { &hf_job_pagesprinted,
-                 { "Job pages printed", "spoolss.job.pagesprinted", 
-                   FT_UINT32, BASE_DEC, NULL, 0x0, NULL, 
+                 { "Job pages printed", "spoolss.job.pagesprinted",
+                   FT_UINT32, BASE_DEC, NULL, 0x0, NULL,
                    HFILL }},
 
                { &hf_job_size,
-                 { "Job size", "spoolss.job.size", FT_UINT32, BASE_DEC, 
+                 { "Job size", "spoolss.job.size", FT_UINT32, BASE_DEC,
                    NULL, 0x0, NULL, HFILL }},
 
                /* Forms */
 
                { &hf_form,
-                 { "Data", "spoolss.form", FT_UINT32, 
+                 { "Data", "spoolss.form", FT_UINT32,
                    BASE_HEX, NULL, 0, NULL, HFILL }},
 
                { &hf_form_level,
@@ -7763,15 +7763,15 @@ proto_register_dcerpc_spoolss(void)
                /* Print notify */
 
                { &hf_notify_options_version,
-                 { "Version", "spoolss.notify_options.version", FT_UINT32, 
+                 { "Version", "spoolss.notify_options.version", FT_UINT32,
                    BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_notify_options_flags,
-                 { "Flags", "spoolss.notify_options.flags", FT_UINT32, 
+                 { "Flags", "spoolss.notify_options.flags", FT_UINT32,
                    BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_notify_options_count,
-                 { "Count", "spoolss.notify_options.count", FT_UINT32, 
+                 { "Count", "spoolss.notify_options.count", FT_UINT32,
                    BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_notify_option_type,
@@ -7779,28 +7779,28 @@ proto_register_dcerpc_spoolss(void)
                    VALS(printer_notify_types), 0, NULL, HFILL }},
 
                { &hf_notify_option_reserved1,
-                 { "Reserved1", "spoolss.notify_option.reserved1", FT_UINT16, 
+                 { "Reserved1", "spoolss.notify_option.reserved1", FT_UINT16,
                    BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_notify_option_reserved2,
-                 { "Reserved2", "spoolss.notify_option.reserved2", FT_UINT32, 
+                 { "Reserved2", "spoolss.notify_option.reserved2", FT_UINT32,
                    BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_notify_option_reserved3,
-                 { "Reserved3", "spoolss.notify_option.reserved3", FT_UINT32, 
+                 { "Reserved3", "spoolss.notify_option.reserved3", FT_UINT32,
                    BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_notify_option_count,
-                 { "Count", "spoolss.notify_option.count", FT_UINT32, 
+                 { "Count", "spoolss.notify_option.count", FT_UINT32,
                    BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_notify_option_data_count,
-                 { "Count", "spoolss.notify_option_data.count", FT_UINT32, 
+                 { "Count", "spoolss.notify_option_data.count", FT_UINT32,
                    BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_notify_options_flags_refresh,
                  { "Refresh", "spoolss.notify_options.flags", FT_BOOLEAN, 32,
-                   TFS(&tfs_notify_options_flags_refresh), 
+                   TFS(&tfs_notify_options_flags_refresh),
                    PRINTER_NOTIFY_OPTIONS_REFRESH, NULL, HFILL }},
 
                { &hf_notify_info_count,
@@ -7808,7 +7808,7 @@ proto_register_dcerpc_spoolss(void)
                    NULL, 0, NULL, HFILL }},
 
                { &hf_notify_info_version,
-                 { "Version", "spoolss.notify_info.version", FT_UINT32, 
+                 { "Version", "spoolss.notify_info.version", FT_UINT32,
                    BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_notify_info_flags,
@@ -7816,7 +7816,7 @@ proto_register_dcerpc_spoolss(void)
                    NULL, 0, NULL, HFILL }},
 
                { &hf_notify_info_data_type,
-                 { "Type", "spoolss.notify_info_data.type", FT_UINT16, 
+                 { "Type", "spoolss.notify_info_data.type", FT_UINT16,
                    BASE_DEC, VALS(printer_notify_types), 0, NULL, HFILL }},
 
                { &hf_notify_field,
@@ -7824,35 +7824,35 @@ proto_register_dcerpc_spoolss(void)
                    NULL, 0, NULL, HFILL }},
 
                { &hf_notify_info_data_count,
-                 { "Count", "spoolss.notify_info_data.count", FT_UINT32, 
+                 { "Count", "spoolss.notify_info_data.count", FT_UINT32,
                    BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_notify_info_data_id,
-                 { "Job Id", "spoolss.notify_info_data.jobid", FT_UINT32, 
+                 { "Job Id", "spoolss.notify_info_data.jobid", FT_UINT32,
                    BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_notify_info_data_value1,
-                 { "Value1", "spoolss.notify_info_data.value1", FT_UINT32, 
+                 { "Value1", "spoolss.notify_info_data.value1", FT_UINT32,
                    BASE_HEX, NULL, 0, NULL, HFILL }},
 
                { &hf_notify_info_data_value2,
-                 { "Value2", "spoolss.notify_info_data.value2", FT_UINT32, 
+                 { "Value2", "spoolss.notify_info_data.value2", FT_UINT32,
                    BASE_HEX, NULL, 0, NULL, HFILL }},
 
                { &hf_notify_info_data_bufsize,
-                 { "Buffer size", "spoolss.notify_info_data.bufsize", 
+                 { "Buffer size", "spoolss.notify_info_data.bufsize",
                    FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_notify_info_data_buffer,
-                 { "Buffer", "spoolss.notify_info_data.buffer", FT_UINT32, 
+                 { "Buffer", "spoolss.notify_info_data.buffer", FT_UINT32,
                    BASE_HEX, NULL, 0, NULL, HFILL }},
 
                { &hf_notify_info_data_buffer_len,
-                 { "Buffer length", "spoolss.notify_info_data.buffer.len", 
+                 { "Buffer length", "spoolss.notify_info_data.buffer.len",
                    FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
 
                { &hf_notify_info_data_buffer_data,
-                 { "Buffer data", "spoolss.notify_info_data.buffer.data", 
+                 { "Buffer data", "spoolss.notify_info_data.buffer.data",
                    FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
 
                /* RffpCNex RPC */
@@ -7862,29 +7862,29 @@ proto_register_dcerpc_spoolss(void)
                    NULL, 0, "RFFPCNEX options", HFILL }},
 
                { &hf_printerlocal, /* XXX: move me */
-                 { "Printer local", "spoolss.printer_local", FT_UINT32, 
+                 { "Printer local", "spoolss.printer_local", FT_UINT32,
                    BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_rffpcnex_flags,
-                 { "RFFPCNEX flags", "spoolss.rffpcnex.flags", FT_UINT32, 
+                 { "RFFPCNEX flags", "spoolss.rffpcnex.flags", FT_UINT32,
                    BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_rffpcnex_flags_add_printer,
                  { "Add printer", "spoolss.rffpcnex.flags.add_printer",
                    FT_BOOLEAN, 32, TFS(&tfs_rffpcnex_flags_add_printer),
-                   SPOOLSS_PRINTER_CHANGE_ADD_PRINTER, NULL, 
+                   SPOOLSS_PRINTER_CHANGE_ADD_PRINTER, NULL,
                    HFILL }},
 
                { &hf_rffpcnex_flags_set_printer,
                  { "Set printer", "spoolss.rffpcnex.flags.set_printer",
                    FT_BOOLEAN, 32, TFS(&tfs_rffpcnex_flags_set_printer),
-                   SPOOLSS_PRINTER_CHANGE_SET_PRINTER, NULL, 
+                   SPOOLSS_PRINTER_CHANGE_SET_PRINTER, NULL,
                    HFILL }},
 
                { &hf_rffpcnex_flags_delete_printer,
                  { "Delete printer", "spoolss.rffpcnex.flags.delete_printer",
                    FT_BOOLEAN, 32, TFS(&tfs_rffpcnex_flags_delete_printer),
-                   SPOOLSS_PRINTER_CHANGE_DELETE_PRINTER, NULL, 
+                   SPOOLSS_PRINTER_CHANGE_DELETE_PRINTER, NULL,
                    HFILL }},
 
                { &hf_rffpcnex_flags_add_job,
@@ -7920,7 +7920,7 @@ proto_register_dcerpc_spoolss(void)
                { &hf_rffpcnex_flags_delete_form,
                  { "Delete form", "spoolss.rffpcnex.flags.delete_form",
                    FT_BOOLEAN, 32, TFS(&tfs_rffpcnex_flags_delete_form),
-                   SPOOLSS_PRINTER_CHANGE_DELETE_FORM, NULL, 
+                   SPOOLSS_PRINTER_CHANGE_DELETE_FORM, NULL,
                    HFILL }},
 
                { &hf_rffpcnex_flags_add_port,
@@ -7931,45 +7931,45 @@ proto_register_dcerpc_spoolss(void)
                { &hf_rffpcnex_flags_configure_port,
                  { "Configure port", "spoolss.rffpcnex.flags.configure_port",
                    FT_BOOLEAN, 32, TFS(&tfs_rffpcnex_flags_configure_port),
-                   SPOOLSS_PRINTER_CHANGE_CONFIGURE_PORT, NULL, 
+                   SPOOLSS_PRINTER_CHANGE_CONFIGURE_PORT, NULL,
                    HFILL }},
 
                { &hf_rffpcnex_flags_delete_port,
                  { "Delete port", "spoolss.rffpcnex.flags.delete_port",
                    FT_BOOLEAN, 32, TFS(&tfs_rffpcnex_flags_delete_port),
-                   SPOOLSS_PRINTER_CHANGE_DELETE_PORT, NULL, 
+                   SPOOLSS_PRINTER_CHANGE_DELETE_PORT, NULL,
                    HFILL }},
 
                { &hf_rffpcnex_flags_add_print_processor,
                  { "Add processor", "spoolss.rffpcnex.flags.add_processor",
-                   FT_BOOLEAN, 32, 
+                   FT_BOOLEAN, 32,
                    TFS(&tfs_rffpcnex_flags_add_print_processor),
-                   SPOOLSS_PRINTER_CHANGE_ADD_PRINT_PROCESSOR, 
+                   SPOOLSS_PRINTER_CHANGE_ADD_PRINT_PROCESSOR,
                    NULL, HFILL }},
 
                { &hf_rffpcnex_flags_delete_print_processor,
-                 { "Delete processor", 
-                   "spoolss.rffpcnex.flags.delete_processor", FT_BOOLEAN, 32, 
+                 { "Delete processor",
+                   "spoolss.rffpcnex.flags.delete_processor", FT_BOOLEAN, 32,
                    TFS(&tfs_rffpcnex_flags_delete_print_processor),
-                   SPOOLSS_PRINTER_CHANGE_DELETE_PRINT_PROCESSOR, 
+                   SPOOLSS_PRINTER_CHANGE_DELETE_PRINT_PROCESSOR,
                    NULL, HFILL }},
 
                { &hf_rffpcnex_flags_add_driver,
                  { "Add driver", "spoolss.rffpcnex.flags.add_driver",
                    FT_BOOLEAN, 32, TFS(&tfs_rffpcnex_flags_add_driver),
-                   SPOOLSS_PRINTER_CHANGE_ADD_PRINTER_DRIVER, NULL, 
+                   SPOOLSS_PRINTER_CHANGE_ADD_PRINTER_DRIVER, NULL,
                    HFILL }},
 
                { &hf_rffpcnex_flags_set_driver,
                  { "Set driver", "spoolss.rffpcnex.flags.set_driver",
                    FT_BOOLEAN, 32, TFS(&tfs_rffpcnex_flags_set_driver),
-                   SPOOLSS_PRINTER_CHANGE_SET_PRINTER_DRIVER, NULL, 
+                   SPOOLSS_PRINTER_CHANGE_SET_PRINTER_DRIVER, NULL,
                    HFILL }},
 
                { &hf_rffpcnex_flags_delete_driver,
                  { "Delete driver", "spoolss.rffpcnex.flags.delete_driver",
                    FT_BOOLEAN, 32, TFS(&tfs_rffpcnex_flags_delete_driver),
-                   SPOOLSS_PRINTER_CHANGE_DELETE_PRINTER_DRIVER, 
+                   SPOOLSS_PRINTER_CHANGE_DELETE_PRINTER_DRIVER,
                    NULL, HFILL }},
 
                { &hf_rffpcnex_flags_timeout,
@@ -7978,21 +7978,21 @@ proto_register_dcerpc_spoolss(void)
                    SPOOLSS_PRINTER_CHANGE_TIMEOUT, NULL, HFILL }},
 
                { &hf_rffpcnex_flags_failed_printer_connection,
-                 { "Failed printer connection", 
+                 { "Failed printer connection",
                    "spoolss.rffpcnex.flags.failed_connection_printer",
-                   FT_BOOLEAN, 32, 
+                   FT_BOOLEAN, 32,
                    TFS(&tfs_rffpcnex_flags_failed_connection_printer),
-                   SPOOLSS_PRINTER_CHANGE_FAILED_CONNECTION_PRINTER, 
+                   SPOOLSS_PRINTER_CHANGE_FAILED_CONNECTION_PRINTER,
                    NULL, HFILL }},
 
                /* RRPCN RPC */
 
                { &hf_rrpcn_changelow,
-                 { "Change low", "spoolss.rrpcn.changelow", FT_UINT32, 
+                 { "Change low", "spoolss.rrpcn.changelow", FT_UINT32,
                    BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_rrpcn_changehigh,
-                 { "Change high", "spoolss.rrpcn.changehigh", FT_UINT32, 
+                 { "Change high", "spoolss.rrpcn.changehigh", FT_UINT32,
                    BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_rrpcn_unk0,
@@ -8006,11 +8006,11 @@ proto_register_dcerpc_spoolss(void)
                /* ReplyOpenPrinter RPC */
 
                { &hf_replyopenprinter_unk0,
-                 { "Unknown 0", "spoolss.replyopenprinter.unk0", FT_UINT32, 
+                 { "Unknown 0", "spoolss.replyopenprinter.unk0", FT_UINT32,
                    BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_replyopenprinter_unk1,
-                 { "Unknown 1", "spoolss.replyopenprinter.unk1", FT_UINT32, 
+                 { "Unknown 1", "spoolss.replyopenprinter.unk1", FT_UINT32,
                    BASE_DEC, NULL, 0, NULL, HFILL }},
 
                /* Printer attributes */
@@ -8030,7 +8030,7 @@ proto_register_dcerpc_spoolss(void)
                    PRINTER_ATTRIBUTE_DIRECT, NULL, HFILL }},
 
                { &hf_printer_attributes_default,
-                 { "Default (9x/ME only)", 
+                 { "Default (9x/ME only)",
                    "spoolss.printer_attributes.default",FT_BOOLEAN,
                    32, TFS(&tfs_printer_attributes_default),
                    PRINTER_ATTRIBUTE_DEFAULT, "Default", HFILL }},
@@ -8041,7 +8041,7 @@ proto_register_dcerpc_spoolss(void)
                    PRINTER_ATTRIBUTE_SHARED, NULL, HFILL }},
 
                { &hf_printer_attributes_network,
-                 { "Network", "spoolss.printer_attributes.network", 
+                 { "Network", "spoolss.printer_attributes.network",
                    FT_BOOLEAN, 32, TFS(&tfs_printer_attributes_network),
                    PRINTER_ATTRIBUTE_NETWORK, NULL, HFILL }},
 
@@ -8056,43 +8056,43 @@ proto_register_dcerpc_spoolss(void)
                    PRINTER_ATTRIBUTE_LOCAL, NULL, HFILL }},
 
                { &hf_printer_attributes_enable_devq,
-                 { "Enable devq", "spoolss.printer_attributes.enable_devq", 
+                 { "Enable devq", "spoolss.printer_attributes.enable_devq",
                    FT_BOOLEAN, 32, TFS(&tfs_printer_attributes_enable_devq),
                    PRINTER_ATTRIBUTE_ENABLE_DEVQ, "Enable evq", HFILL }},
 
                { &hf_printer_attributes_keep_printed_jobs,
-                 { "Keep printed jobs", 
+                 { "Keep printed jobs",
                    "spoolss.printer_attributes.keep_printed_jobs", FT_BOOLEAN,
                    32, TFS(&tfs_printer_attributes_keep_printed_jobs),
-                   PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS, NULL, 
+                   PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS, NULL,
                    HFILL }},
 
                { &hf_printer_attributes_do_complete_first,
-                 { "Do complete first", 
+                 { "Do complete first",
                    "spoolss.printer_attributes.do_complete_first", FT_BOOLEAN,
                    32, TFS(&tfs_printer_attributes_do_complete_first),
-                   PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST, NULL, 
+                   PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST, NULL,
                    HFILL }},
 
                { &hf_printer_attributes_work_offline,
-                 { "Work offline (9x/ME only)", 
+                 { "Work offline (9x/ME only)",
                    "spoolss.printer_attributes.work_offline", FT_BOOLEAN,
                    32, TFS(&tfs_printer_attributes_work_offline),
                    PRINTER_ATTRIBUTE_WORK_OFFLINE, "Work offline", HFILL }},
 
                { &hf_printer_attributes_enable_bidi,
-                 { "Enable bidi (9x/ME only)", 
+                 { "Enable bidi (9x/ME only)",
                    "spoolss.printer_attributes.enable_bidi", FT_BOOLEAN,
                    32, TFS(&tfs_printer_attributes_enable_bidi),
                    PRINTER_ATTRIBUTE_ENABLE_BIDI, "Enable bidi", HFILL }},
 
                { &hf_printer_attributes_raw_only,
-                 { "Raw only", "spoolss.printer_attributes.raw_only", 
+                 { "Raw only", "spoolss.printer_attributes.raw_only",
                    FT_BOOLEAN, 32, TFS(&tfs_printer_attributes_raw_only),
                    PRINTER_ATTRIBUTE_RAW_ONLY, NULL, HFILL }},
 
                { &hf_printer_attributes_published,
-                 { "Published", "spoolss.printer_attributes.published", 
+                 { "Published", "spoolss.printer_attributes.published",
                    FT_BOOLEAN, 32, TFS(&tfs_printer_attributes_published),
                    PRINTER_ATTRIBUTE_PUBLISHED, NULL, HFILL }},
 
@@ -8137,11 +8137,11 @@ proto_register_dcerpc_spoolss(void)
                     FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
 
                 { &hf_userlevel_client,
-                  { "Client", "spoolss.userlevel.client", FT_STRING, 
+                  { "Client", "spoolss.userlevel.client", FT_STRING,
                     BASE_NONE, NULL, 0, NULL, HFILL }},
 
                 { &hf_userlevel_user,
-                  { "User", "spoolss.userlevel.user", FT_STRING, 
+                  { "User", "spoolss.userlevel.user", FT_STRING,
                     BASE_NONE, NULL, 0, NULL, HFILL }},
 
                 { &hf_userlevel_build,
@@ -8164,94 +8164,94 @@ proto_register_dcerpc_spoolss(void)
 
                { &hf_enumprinterdataex_num_values,
                  { "Num values", "spoolss.enumprinterdataex.num_values",
-                   FT_UINT32, BASE_DEC, NULL, 0x0, 
+                   FT_UINT32, BASE_DEC, NULL, 0x0,
                    "Number of values returned", HFILL }},
 
                { &hf_enumprinterdataex_name_offset,
                  { "Name offset", "spoolss.enumprinterdataex.name_offset",
-                   FT_UINT32, BASE_DEC, NULL, 0x0, 
+                   FT_UINT32, BASE_DEC, NULL, 0x0,
                    NULL, HFILL }},
 
                { &hf_enumprinterdataex_name_len,
                  { "Name len", "spoolss.enumprinterdataex.name_len",
-                   FT_UINT32, BASE_DEC, NULL, 0x0, 
+                   FT_UINT32, BASE_DEC, NULL, 0x0,
                    NULL, HFILL }},
 
                { &hf_enumprinterdataex_name,
-                 { "Name", "spoolss.enumprinterdataex.name", 
+                 { "Name", "spoolss.enumprinterdataex.name",
                    FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
 
                { &hf_enumprinterdataex_val_type,
                  { "Value type", "spoolss.enumprinterdataex.value_type",
-                   FT_UINT32, BASE_DEC, NULL, 0x0, 
+                   FT_UINT32, BASE_DEC, NULL, 0x0,
                    NULL, HFILL }},
 
                { &hf_enumprinterdataex_val_offset,
                  { "Value offset", "spoolss.enumprinterdataex.value_offset",
-                   FT_UINT32, BASE_DEC, NULL, 0x0, 
+                   FT_UINT32, BASE_DEC, NULL, 0x0,
                    NULL, HFILL }},
 
                { &hf_enumprinterdataex_val_len,
                  { "Value len", "spoolss.enumprinterdataex.value_len",
-                   FT_UINT32, BASE_DEC, NULL, 0x0, 
+                   FT_UINT32, BASE_DEC, NULL, 0x0,
                    NULL, HFILL }},
 
                { &hf_enumprinterdataex_val_dword_high,
-                 { "DWORD value (high)", 
+                 { "DWORD value (high)",
                    "spoolss.enumprinterdataex.val_dword.high",
-                   FT_UINT16, BASE_DEC, NULL, 0x0, 
+                   FT_UINT16, BASE_DEC, NULL, 0x0,
                    NULL, HFILL }},
 
                { &hf_enumprinterdataex_val_dword_low,
-                 { "DWORD value (low)", 
+                 { "DWORD value (low)",
                    "spoolss.enumprinterdataex.val_dword.low",
-                   FT_UINT16, BASE_DEC, NULL, 0x0, 
+                   FT_UINT16, BASE_DEC, NULL, 0x0,
                    NULL, HFILL }},
 
                { &hf_enumprinterdataex_val_sz,
-                 { "SZ value", "spoolss.printerdata.val_sz", 
+                 { "SZ value", "spoolss.printerdata.val_sz",
                    FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
 
                /* RouterReplyPrinter RPC */
 
                { &hf_routerreplyprinter_condition,
-                 { "Condition", "spoolss.routerreplyprinter.condition", 
+                 { "Condition", "spoolss.routerreplyprinter.condition",
                    FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_routerreplyprinter_unknown1,
-                 { "Unknown1", "spoolss.routerreplyprinter.unknown1", 
+                 { "Unknown1", "spoolss.routerreplyprinter.unknown1",
                    FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_routerreplyprinter_changeid,
-                 { "Change id", "spoolss.routerreplyprinter.changeid", 
+                 { "Change id", "spoolss.routerreplyprinter.changeid",
                    FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
 
                /* EnumPrinterKey RPC */
 
                { &hf_keybuffer_size,
-                 { "Key Buffer size", "spoolss.keybuffer.size", FT_UINT32, 
+                 { "Key Buffer size", "spoolss.keybuffer.size", FT_UINT32,
                    BASE_DEC, NULL, 0x0, "Size of buffer", HFILL }},
 
                { &hf_keybuffer_data,
-                 { "Key Buffer data", "spoolss.keybuffer.data", FT_BYTES, 
+                 { "Key Buffer data", "spoolss.keybuffer.data", FT_BYTES,
                    BASE_NONE, NULL, 0x0, "Contents of buffer", HFILL }},
 
                /* SetJob RPC */
 
                { &hf_setjob_cmd,
-                 { "Set job command", "spoolss.setjob.cmd", FT_UINT32, 
-                   BASE_DEC, VALS(setjob_commands), 0x0, "Printer data name", 
+                 { "Set job command", "spoolss.setjob.cmd", FT_UINT32,
+                   BASE_DEC, VALS(setjob_commands), 0x0, "Printer data name",
                    HFILL }},
 
                /* EnumJobs RPC */
 
                { &hf_enumjobs_firstjob,
-                 { "First job", "spoolss.enumjobs.firstjob", FT_UINT32, 
-                   BASE_DEC, NULL, 0x0, "Index of first job to return", 
+                 { "First job", "spoolss.enumjobs.firstjob", FT_UINT32,
+                   BASE_DEC, NULL, 0x0, "Index of first job to return",
                    HFILL }},
 
                { &hf_enumjobs_numjobs,
-                 { "Num jobs", "spoolss.enumjobs.numjobs", FT_UINT32, 
+                 { "Num jobs", "spoolss.enumjobs.numjobs", FT_UINT32,
                    BASE_DEC, NULL, 0x0, "Number of jobs to return", HFILL }},
 
                /* Security descriptor buffer */
@@ -8281,8 +8281,8 @@ proto_register_dcerpc_spoolss(void)
                /* WritePrinter RPC */
 
                { &hf_writeprinter_numwritten,
-                 { "Num written", "spoolss.writeprinter.numwritten", 
-                   FT_UINT32, BASE_DEC, NULL, 0x0, "Number of bytes written", 
+                 { "Num written", "spoolss.writeprinter.numwritten",
+                   FT_UINT32, BASE_DEC, NULL, 0x0, "Number of bytes written",
                    HFILL }},
 
                /* Setprinterdataex RPC */
@@ -8346,7 +8346,7 @@ proto_register_dcerpc_spoolss(void)
                    BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_printer_global_counter,
-                 { "Global counter", "spoolss.printer.global_counter", 
+                 { "Global counter", "spoolss.printer.global_counter",
                    FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_printer_total_pages,
@@ -8354,123 +8354,123 @@ proto_register_dcerpc_spoolss(void)
                    BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_printer_major_version,
-                 { "Major version", "spoolss.printer.major_version", 
+                 { "Major version", "spoolss.printer.major_version",
                    FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_printer_build_version,
-                 { "Build version", "spoolss.printer.build_version", 
+                 { "Build version", "spoolss.printer.build_version",
                    FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_printer_unk7,
                  { "Unknown 7", "spoolss.printer.unknown7", FT_UINT32,
-                   BASE_DEC, NULL, 0, NULL, HFILL }},          
+                   BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_printer_unk8,
                  { "Unknown 8", "spoolss.printer.unknown8", FT_UINT32,
-                   BASE_DEC, NULL, 0, NULL, HFILL }},          
+                   BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_printer_unk9,
                  { "Unknown 9", "spoolss.printer.unknown9", FT_UINT32,
-                   BASE_DEC, NULL, 0, NULL, HFILL }},          
+                   BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_printer_session_ctr,
-                 { "Session counter", "spoolss.printer.session_ctr", 
+                 { "Session counter", "spoolss.printer.session_ctr",
                    FT_UINT32, BASE_DEC, NULL, 0, "Sessopm counter", HFILL }},
 
                { &hf_printer_unk11,
                  { "Unknown 11", "spoolss.printer.unknown11", FT_UINT32,
-                   BASE_DEC, NULL, 0, NULL, HFILL }},          
+                   BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_printer_printer_errors,
-                 { "Printer errors", "spoolss.printer.printer_errors", 
+                 { "Printer errors", "spoolss.printer.printer_errors",
                    FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_printer_unk13,
                  { "Unknown 13", "spoolss.printer.unknown13", FT_UINT32,
-                   BASE_DEC, NULL, 0, NULL, HFILL }},          
+                   BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_printer_unk14,
                  { "Unknown 14", "spoolss.printer.unknown14", FT_UINT32,
-                   BASE_DEC, NULL, 0, NULL, HFILL }},          
+                   BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_printer_unk15,
                  { "Unknown 15", "spoolss.printer.unknown15", FT_UINT32,
-                   BASE_DEC, NULL, 0, NULL, HFILL }},          
+                   BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_printer_unk16,
                  { "Unknown 16", "spoolss.printer.unknown16", FT_UINT32,
-                   BASE_DEC, NULL, 0, NULL, HFILL }},          
+                   BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_printer_changeid,
                  { "Change id", "spoolss.printer.changeid", FT_UINT32,
-                   BASE_DEC, NULL, 0, NULL, HFILL }},          
+                   BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_printer_unk18,
                  { "Unknown 18", "spoolss.printer.unknown18", FT_UINT32,
-                   BASE_DEC, NULL, 0, NULL, HFILL }},          
+                   BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_printer_unk20,
                  { "Unknown 20", "spoolss.printer.unknown20", FT_UINT32,
-                   BASE_DEC, NULL, 0, NULL, HFILL }},          
+                   BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_printer_c_setprinter,
-                 { "Csetprinter", "spoolss.printer.c_setprinter", 
+                 { "Csetprinter", "spoolss.printer.c_setprinter",
                    FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_printer_unk22,
-                 { "Unknown 22", "spoolss.printer.unknown22", 
+                 { "Unknown 22", "spoolss.printer.unknown22",
                    FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_printer_unk23,
-                 { "Unknown 23", "spoolss.printer.unknown23", 
+                 { "Unknown 23", "spoolss.printer.unknown23",
                    FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_printer_unk24,
-                 { "Unknown 24", "spoolss.printer.unknown24", 
+                 { "Unknown 24", "spoolss.printer.unknown24",
                    FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_printer_unk25,
-                 { "Unknown 25", "spoolss.printer.unknown25", 
+                 { "Unknown 25", "spoolss.printer.unknown25",
                    FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_printer_unk26,
-                 { "Unknown 26", "spoolss.printer.unknown26", 
+                 { "Unknown 26", "spoolss.printer.unknown26",
                    FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_printer_unk27,
-                 { "Unknown 27", "spoolss.printer.unknown27", 
+                 { "Unknown 27", "spoolss.printer.unknown27",
                    FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_printer_unk28,
-                 { "Unknown 28", "spoolss.printer.unknown28", 
+                 { "Unknown 28", "spoolss.printer.unknown28",
                    FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_printer_unk29,
-                 { "Unknown 29", "spoolss.printer.unknown29", 
+                 { "Unknown 29", "spoolss.printer.unknown29",
                    FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_printer_flags,
-                 { "Flags", "spoolss.printer.flags", 
+                 { "Flags", "spoolss.printer.flags",
                    FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
 
                { &hf_printer_priority,
-                 { "Priority", "spoolss.printer.priority", 
+                 { "Priority", "spoolss.printer.priority",
                    FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_printer_default_priority,
-                 { "Default Priority", "spoolss.printer.default_priority", 
+                 { "Default Priority", "spoolss.printer.default_priority",
                    FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_printer_averageppm,
-                 { "Average PPM", "spoolss.printer.averageppm", 
+                 { "Average PPM", "spoolss.printer.averageppm",
                    FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
 
                { &hf_printer_jobs,
-                 { "Jobs", "spoolss.printer.jobs", 
+                 { "Jobs", "spoolss.printer.jobs",
                    FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
 
                 { &hf_printer_guid,
-                  { "GUID", "spoolss.printer.guid", FT_STRING, 
+                  { "GUID", "spoolss.printer.guid", FT_STRING,
                     BASE_NONE, NULL, 0, NULL, HFILL }},
 
                { &hf_printer_action,
@@ -8510,10 +8510,10 @@ proto_register_dcerpc_spoolss(void)
                &ett_printerdata_data,
                &ett_writeprinter_buffer,
                &ett_DRIVER_INFO_1,
-               &ett_DRIVER_INFO_2,             
+               &ett_DRIVER_INFO_2,
                &ett_DRIVER_INFO_3,
                &ett_DRIVER_INFO_6,
-               &ett_DRIVER_INFO_101,           
+               &ett_DRIVER_INFO_101,
                &ett_rffpcnex_flags,
                &ett_notify_options_flags,
                &ett_NOTIFY_INFO_DATA,
index a80d6140aec4dd98b940f62a022b7efda1f8ce3f..8267b2b79223fa5e45bec75d12343db3d33e3e43 100644 (file)
@@ -4,7 +4,7 @@
  * Copyright 2002, Jaime Fournier <Jaime.Fournier@hush.com>
  * This information is based off the released idl files from opengroup.
  * ftp://ftp.opengroup.org/pub/dce122/dce/src/file.tar.gz file/fsint/tkn4int.idl
- *     
+ *
  * $Id$
  *
  * Wireshark - Network traffic analyzer
@@ -52,16 +52,16 @@ static guint16  ver_tkn4int = 4;
 
 
 static dcerpc_sub_dissector tkn4int_dissectors[] = {
-    { 0, "Probe", NULL, NULL},
-    { 1, "InitTokenState", NULL, NULL},
-    { 2, "TokenRevoke", NULL, NULL},
-    { 3, "GetCellName", NULL, NULL},
-    { 4, "GetLock", NULL, NULL},
-    { 5, "GetCE", NULL, NULL},
-    { 6, "GetServerInterfaces", NULL, NULL},
-    { 7, "SetParams", NULL, NULL},
-    { 8, "AsyncGrant", NULL, NULL},
-    { 0, NULL, NULL, NULL }
+       { 0, "Probe", NULL, NULL},
+       { 1, "InitTokenState", NULL, NULL},
+       { 2, "TokenRevoke", NULL, NULL},
+       { 3, "GetCellName", NULL, NULL},
+       { 4, "GetLock", NULL, NULL},
+       { 5, "GetCE", NULL, NULL},
+       { 6, "GetServerInterfaces", NULL, NULL},
+       { 7, "SetParams", NULL, NULL},
+       { 8, "AsyncGrant", NULL, NULL},
+       { 0, NULL, NULL, NULL }
 
 };
 
index e0436cc116bb4af139703eb6be6572939bae3583..d1f9715b37622073754d0bf6d112ffd4be067e57 100644 (file)
@@ -67,7 +67,7 @@ void
 proto_register_dcerpc_trksvr(void)
 {
 static hf_register_info hf[] = {
-       { &hf_trksvr_opnum, { 
+       { &hf_trksvr_opnum, {
                "Operation", "trksvr.opnum", FT_UINT16, BASE_DEC,
                NULL, 0x0, NULL, HFILL }},
        { &hf_trksvr_rc, {
index ad4f44f69eae0371db6ad589b54ac7735494510f..d858d981770da478b8522576b1b0a0f8fe9e1ec3 100644 (file)
@@ -75,10 +75,10 @@ static int hf_dispatch_flags_propget = -1;
 static int hf_dispatch_flags_propput = -1;
 static int hf_dispatch_flags_propputref = -1;
 
-#define DISPATCH_FLAGS_METHOD          1
-#define DISPATCH_FLAGS_PROPGET         2
-#define DISPATCH_FLAGS_PROPPUT         4
-#define DISPATCH_FLAGS_PROPPUTREF      8
+#define DISPATCH_FLAGS_METHOD           1
+#define DISPATCH_FLAGS_PROPGET          2
+#define DISPATCH_FLAGS_PROPPUT          4
+#define DISPATCH_FLAGS_PROPPUTREF       8
 
 static gint ett_dispatch_flags = -1;
 static gint ett_dispatch_params = -1;
@@ -99,212 +99,212 @@ static const value_string dcom_lcid_vals[] = {
     { 0x0400, "LOCALE_USER_DEFAULT" },
     { 0x0409, "English (United States)" },
     { 0x0800, "LOCALE_SYSTEM_DEFAULT" },
-       { 0,    NULL }
+    { 0,    NULL }
 };
 
 
 
 int
 dissect_IDispatch_GetTypeInfoCount_resp(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, guint8 *drep)
+                                        packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
     guint32 u32TInfo;
-       guint32 u32HResult;
+    guint32 u32HResult;
 
 
     offset = dissect_dcom_that(tvb, offset, pinfo, tree, drep);
 
-       offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep, 
-                        hf_dispatch_tinfo, &u32TInfo);
+    offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
+                                hf_dispatch_tinfo, &u32TInfo);
 
-       /* HRESULT of call */
-       offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, drep, 
-                        &u32HResult);
+    /* HRESULT of call */
+    offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, drep,
+                                  &u32HResult);
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-         col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", 
-         val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
-       }
+    if (check_col(pinfo->cinfo, COL_INFO)) {
+        col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s",
+                        val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
+    }
 
-       return offset;
+    return offset;
 }
 
 int
 dissect_IDispatch_GetTypeInfo_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, guint8 *drep)
+                                   packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
     guint32 u32TInfo;
-       guint32 u32Lcid;
+    guint32 u32Lcid;
 
     offset = dissect_dcom_this(tvb, offset, pinfo, tree, drep);
 
-       offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep, 
-                        hf_dispatch_tinfo, &u32TInfo);
-       offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep, 
-                                               hf_dispatch_lcid, &u32Lcid);
+    offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
+                                hf_dispatch_tinfo, &u32TInfo);
+    offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
+                                hf_dispatch_lcid, &u32Lcid);
 
-       return offset;
+    return offset;
 }
 
 
 int
 dissect_IDispatch_GetTypeInfo_resp(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, guint8 *drep)
+                                   packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
-       guint32 u32HResult;
-       guint32 u32Pointer;
+    guint32 u32HResult;
+    guint32 u32Pointer;
 
 
     offset = dissect_dcom_that(tvb, offset, pinfo, tree, drep);
 
-       offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep, 
-                               &u32Pointer);
-       if (u32Pointer) {
+    offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep,
+                                         &u32Pointer);
+    if (u32Pointer) {
         offset = dissect_dcom_MInterfacePointer(tvb, offset, pinfo, tree, drep, hf_dispatch_itinfo, NULL /* XXX */);
     }
 
-       /* HRESULT of call */
-       offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, drep, 
-                        &u32HResult);
+    /* HRESULT of call */
+    offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, drep,
+                                  &u32HResult);
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-         col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", 
-         val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
-       }
+    if (check_col(pinfo->cinfo, COL_INFO)) {
+        col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s",
+                        val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
+    }
 
-       return offset;
+    return offset;
 }
 
 
 int
 dissect_IDispatch_GetIDsOfNames_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, guint8 *drep)
+                                     packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
-       e_uuid_t riid;
-       guint32 u32Lcid;
-       gchar   szName[1000] = { 0 };
-       guint32 u32Names;
-       guint32 u32ArraySize;
-       guint32 u32Pointer;
-       guint32 u32Tmp;
-       guint32 u32VariableOffset;
+    e_uuid_t riid;
+    guint32  u32Lcid;
+    gchar    szName[1000] = { 0 };
+    guint32  u32Names;
+    guint32  u32ArraySize;
+    guint32  u32Pointer;
+    guint32  u32Tmp;
+    guint32  u32VariableOffset;
 
 
     offset = dissect_dcom_this(tvb, offset, pinfo, tree, drep);
 
-       offset = dissect_dcom_UUID(tvb, offset, pinfo, tree, drep, 
-                                               hf_dispatch_riid, &riid);
-
-       offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep, 
-                                               &u32ArraySize);
-
-       u32VariableOffset = offset + u32ArraySize * 4;
-
-       u32Tmp = u32ArraySize;
-       while(u32Tmp--) {
-               offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep, 
-                                       &u32Pointer);
-               if (u32Pointer) {
-                       u32VariableOffset = dissect_dcom_LPWSTR(tvb, u32VariableOffset, pinfo, tree, drep, 
-                                                       hf_dispatch_name, szName, sizeof(szName));
-                       if (check_col(pinfo->cinfo, COL_INFO)) {
-                         col_append_fstr(pinfo->cinfo, COL_INFO, " \"%s\"", szName);
-                       }
-               }
-       }
+    offset = dissect_dcom_UUID(tvb, offset, pinfo, tree, drep,
+                               hf_dispatch_riid, &riid);
+
+    offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep,
+                                            &u32ArraySize);
+
+    u32VariableOffset = offset + u32ArraySize * 4;
+
+    u32Tmp = u32ArraySize;
+    while(u32Tmp--) {
+        offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep,
+                                             &u32Pointer);
+        if (u32Pointer) {
+            u32VariableOffset = dissect_dcom_LPWSTR(tvb, u32VariableOffset, pinfo, tree, drep,
+                                                    hf_dispatch_name, szName, sizeof(szName));
+            if (check_col(pinfo->cinfo, COL_INFO)) {
+                col_append_fstr(pinfo->cinfo, COL_INFO, " \"%s\"", szName);
+            }
+        }
+    }
 
-       offset = u32VariableOffset;
+    offset = u32VariableOffset;
 
-       offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep, 
-                        hf_dispatch_names, &u32Names);
+    offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
+                                hf_dispatch_names, &u32Names);
 
-       offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep, 
-                                               hf_dispatch_lcid, &u32Lcid);
+    offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
+                                hf_dispatch_lcid, &u32Lcid);
 
-       return offset;
+    return offset;
 }
 
 
 
 int
 dissect_IDispatch_GetIDsOfNames_resp(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, guint8 *drep)
+                                     packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
-       guint32 u32DispId;
-       guint32 u32ArraySize;
-       guint32 u32Tmp;
-       guint32 u32HResult;
+    guint32 u32DispId;
+    guint32 u32ArraySize;
+    guint32 u32Tmp;
+    guint32 u32HResult;
 
 
     offset = dissect_dcom_that(tvb, offset, pinfo, tree, drep);
 
-       offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep, 
-                                               &u32ArraySize);
+    offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep,
+                                            &u32ArraySize);
 
-       u32Tmp = u32ArraySize;
-       while (u32Tmp--) {
-               offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep, 
-                        hf_dispatch_id, &u32DispId);
-               if (check_col(pinfo->cinfo, COL_INFO)) {
-                 col_append_fstr(pinfo->cinfo, COL_INFO, " ID=0x%x", u32DispId);
-               }
-       }
+    u32Tmp = u32ArraySize;
+    while (u32Tmp--) {
+        offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
+                                    hf_dispatch_id, &u32DispId);
+        if (check_col(pinfo->cinfo, COL_INFO)) {
+            col_append_fstr(pinfo->cinfo, COL_INFO, " ID=0x%x", u32DispId);
+        }
+    }
 
-       /* HRESULT of call */
-       offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, drep, 
-                        &u32HResult);
+    /* HRESULT of call */
+    offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, drep,
+                                  &u32HResult);
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-         col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", 
-         val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
-       }
+    if (check_col(pinfo->cinfo, COL_INFO)) {
+        col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s",
+                        val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
+    }
 
-       return offset;
+    return offset;
 }
 
 
 
 int
 dissect_IDispatch_Invoke_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, guint8 *drep)
+                              packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
-       guint32 u32DispIdMember;
-       e_uuid_t riid;
-       guint32 u32Lcid;
-       guint32 u32Flags;
-       guint32 u32Args;
-       guint32 u32NamedArgs;
-       guint32 u32Pointer;
-       guint32 u32Pointer2;
-       guint32 u32ArraySize;
-       guint32 u32VariableOffset;
-       guint32 u32VarRef;
-       guint32 u32VarRefIdx;
-       guint32 u32TmpOffset;
+    guint32 u32DispIdMember;
+    e_uuid_t riid;
+    guint32 u32Lcid;
+    guint32 u32Flags;
+    guint32 u32Args;
+    guint32 u32NamedArgs;
+    guint32 u32Pointer;
+    guint32 u32Pointer2;
+    guint32 u32ArraySize;
+    guint32 u32VariableOffset;
+    guint32 u32VarRef;
+    guint32 u32VarRefIdx;
+    guint32 u32TmpOffset;
     guint32 u32SubStart;
 
-       proto_item *feature_item;
-       proto_tree *feature_tree;
-       proto_item *dispparams_item;
-       proto_tree *dispparams_tree;
+    proto_item *feature_item;
+    proto_tree *feature_tree;
+    proto_item *dispparams_item;
+    proto_tree *dispparams_tree;
 
 
     offset = dissect_dcom_this(tvb, offset, pinfo, tree, drep);
 
-       offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep, 
-                    hf_dispatch_id, &u32DispIdMember);
+    offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
+                                hf_dispatch_id, &u32DispIdMember);
     if (check_col(pinfo->cinfo, COL_INFO)) {
-         col_append_fstr(pinfo->cinfo, COL_INFO, " ID=0x%x", u32DispIdMember);
-       }
-
-       offset = dissect_dcom_UUID(tvb, offset, pinfo, tree, drep, 
-                                       hf_dispatch_riid, &riid);
-       offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep, 
-                                       hf_dispatch_lcid, &u32Lcid);
-       
-       /* dispatch flags */
-       u32TmpOffset = dissect_dcom_DWORD(tvb, offset, pinfo, NULL, drep, 
-                        hf_dispatch_flags, &u32Flags);
+        col_append_fstr(pinfo->cinfo, COL_INFO, " ID=0x%x", u32DispIdMember);
+    }
+
+    offset = dissect_dcom_UUID(tvb, offset, pinfo, tree, drep,
+                               hf_dispatch_riid, &riid);
+    offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
+                                hf_dispatch_lcid, &u32Lcid);
+
+    /* dispatch flags */
+    u32TmpOffset = dissect_dcom_DWORD(tvb, offset, pinfo, NULL, drep,
+                                      hf_dispatch_flags, &u32Flags);
     feature_item = proto_tree_add_uint (tree, hf_dispatch_flags, tvb, offset, 4, u32Flags);
     feature_tree = proto_item_add_subtree (feature_item, ett_dispatch_flags);
     if (feature_tree) {
@@ -314,113 +314,113 @@ dissect_IDispatch_Invoke_rqst(tvbuff_t *tvb, int offset,
         proto_tree_add_boolean (feature_tree, hf_dispatch_flags_method, tvb, offset, 4, u32Flags);
     }
 
-       if (u32Flags & DISPATCH_FLAGS_METHOD) {
-               proto_item_append_text(feature_item, ", Method");
-               col_append_str(pinfo->cinfo, COL_INFO, " Method");
-       }
-       if (u32Flags & DISPATCH_FLAGS_PROPGET) {
-               proto_item_append_text(feature_item, ", PropertyGet");
-               col_append_str(pinfo->cinfo, COL_INFO, " PropertyGet");
-       }
-       if (u32Flags & DISPATCH_FLAGS_PROPPUT) {
-               proto_item_append_text(feature_item, ", PropertyPut");
-               col_append_str(pinfo->cinfo, COL_INFO, " PropertyPut");
-       }
-       if (u32Flags & DISPATCH_FLAGS_PROPPUTREF) {
-               proto_item_append_text(feature_item, ", PropertyPutRef");
-               col_append_str(pinfo->cinfo, COL_INFO, " PropertyPutRef");
-       }
-
-       offset = u32TmpOffset;
+    if (u32Flags & DISPATCH_FLAGS_METHOD) {
+        proto_item_append_text(feature_item, ", Method");
+        col_append_str(pinfo->cinfo, COL_INFO, " Method");
+    }
+    if (u32Flags & DISPATCH_FLAGS_PROPGET) {
+        proto_item_append_text(feature_item, ", PropertyGet");
+        col_append_str(pinfo->cinfo, COL_INFO, " PropertyGet");
+    }
+    if (u32Flags & DISPATCH_FLAGS_PROPPUT) {
+        proto_item_append_text(feature_item, ", PropertyPut");
+        col_append_str(pinfo->cinfo, COL_INFO, " PropertyPut");
+    }
+    if (u32Flags & DISPATCH_FLAGS_PROPPUTREF) {
+        proto_item_append_text(feature_item, ", PropertyPutRef");
+        col_append_str(pinfo->cinfo, COL_INFO, " PropertyPutRef");
+    }
+
+    offset = u32TmpOffset;
 
     dispparams_item = proto_tree_add_item(tree, hf_dispatch_dispparams, tvb, offset, 0, FALSE);
     dispparams_tree = proto_item_add_subtree (dispparams_item, ett_dispatch_params);
     u32SubStart = offset;
 
-       /* DISPPARAMS */
-       /* VARIANT rgvarg[u32Args] */
-       offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, dispparams_tree, drep, 
-                                               &u32Pointer);
+    /* DISPPARAMS */
+    /* VARIANT rgvarg[u32Args] */
+    offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, dispparams_tree, drep,
+                                         &u32Pointer);
 
     /* DISPID rgdispidNamedArgs[u32NamedArgs] */
-       offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, dispparams_tree, drep, 
-                                               &u32Pointer2);
+    offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, dispparams_tree, drep,
+                                         &u32Pointer2);
 
-       offset = dissect_dcom_DWORD(tvb, offset, pinfo, dispparams_tree, drep, 
-                    hf_dispatch_args, &u32Args);
-       offset = dissect_dcom_DWORD(tvb, offset, pinfo, dispparams_tree, drep, 
-                    hf_dispatch_named_args, &u32NamedArgs);
+    offset = dissect_dcom_DWORD(tvb, offset, pinfo, dispparams_tree, drep,
+                                hf_dispatch_args, &u32Args);
+    offset = dissect_dcom_DWORD(tvb, offset, pinfo, dispparams_tree, drep,
+                                hf_dispatch_named_args, &u32NamedArgs);
 
     if (u32Pointer) {
-               offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, dispparams_tree, drep, 
-                                                               &u32ArraySize);
-               u32VariableOffset = offset + u32ArraySize * 4;
-               while(u32ArraySize--) {
-                       offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, dispparams_tree, drep, 
-                                                               &u32Pointer);
-                       if (u32Pointer) {
-                               u32VariableOffset = dissect_dcom_VARIANT(tvb, u32VariableOffset, pinfo, dispparams_tree, drep, hf_dispatch_arg);
-                       }
-               }
-               offset = u32VariableOffset;
-       }
-
-       /* DISPID rgdispidNamedArgs[u32NamedArgs] */
-       if (u32Pointer2) {
-               offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, dispparams_tree, drep, 
-                                                               &u32ArraySize);
-               while(u32ArraySize--) {
-                       offset = dissect_dcom_DWORD(tvb, offset, pinfo, dispparams_tree, drep, 
-                                       hf_dispatch_id, &u32DispIdMember);
-               }
-       }
-
-       proto_item_append_text(dispparams_item, ", Args: %u NamedArgs: %u", u32Args, u32NamedArgs);
-       proto_item_set_len(dispparams_item, offset - u32SubStart);
-
-       /* end of DISPPARAMS */
-
-       /* u32VarRef */
-       offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep, 
-                    hf_dispatch_varref, &u32VarRef);
-
-       /* rgVarRefIdx: UINT[u32VarRef] */
-       offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep, 
-                                                       &u32ArraySize);
-       while(u32ArraySize--) {
-               offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep, 
-                    hf_dispatch_varrefidx, &u32VarRefIdx);
-       }
-
-       /* rgVarRef: VARIANT[u32VarRef] */
-       offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep, 
-                                                       &u32ArraySize);
-       u32VariableOffset = offset + u32ArraySize * 4;
-       while(u32ArraySize--) {
-               offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep, 
-                                                       &u32Pointer);
-               if (u32Pointer) {
-                       u32VariableOffset = dissect_dcom_VARIANT(tvb, u32VariableOffset, pinfo, tree, drep, hf_dispatch_varrefarg);
-               }
-       }
-
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-         col_append_fstr(pinfo->cinfo, COL_INFO, 
-          " Args=%u NamedArgs=%u VarRef=%u", u32Args, u32NamedArgs, u32VarRef);
-       }
-
-       return u32VariableOffset;
+        offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, dispparams_tree, drep,
+                                                &u32ArraySize);
+        u32VariableOffset = offset + u32ArraySize * 4;
+        while(u32ArraySize--) {
+            offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, dispparams_tree, drep,
+                                                 &u32Pointer);
+            if (u32Pointer) {
+                u32VariableOffset = dissect_dcom_VARIANT(tvb, u32VariableOffset, pinfo, dispparams_tree, drep, hf_dispatch_arg);
+            }
+        }
+        offset = u32VariableOffset;
+    }
+
+    /* DISPID rgdispidNamedArgs[u32NamedArgs] */
+    if (u32Pointer2) {
+        offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, dispparams_tree, drep,
+                                                &u32ArraySize);
+        while(u32ArraySize--) {
+            offset = dissect_dcom_DWORD(tvb, offset, pinfo, dispparams_tree, drep,
+                                        hf_dispatch_id, &u32DispIdMember);
+        }
+    }
+
+    proto_item_append_text(dispparams_item, ", Args: %u NamedArgs: %u", u32Args, u32NamedArgs);
+    proto_item_set_len(dispparams_item, offset - u32SubStart);
+
+    /* end of DISPPARAMS */
+
+    /* u32VarRef */
+    offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
+                                hf_dispatch_varref, &u32VarRef);
+
+    /* rgVarRefIdx: UINT[u32VarRef] */
+    offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep,
+                                            &u32ArraySize);
+    while(u32ArraySize--) {
+        offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
+                                    hf_dispatch_varrefidx, &u32VarRefIdx);
+    }
+
+    /* rgVarRef: VARIANT[u32VarRef] */
+    offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep,
+                                            &u32ArraySize);
+    u32VariableOffset = offset + u32ArraySize * 4;
+    while(u32ArraySize--) {
+        offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep,
+                                             &u32Pointer);
+        if (u32Pointer) {
+            u32VariableOffset = dissect_dcom_VARIANT(tvb, u32VariableOffset, pinfo, tree, drep, hf_dispatch_varrefarg);
+        }
+    }
+
+    if (check_col(pinfo->cinfo, COL_INFO)) {
+        col_append_fstr(pinfo->cinfo, COL_INFO,
+                        " Args=%u NamedArgs=%u VarRef=%u", u32Args, u32NamedArgs, u32VarRef);
+    }
+
+    return u32VariableOffset;
 }
 
 int
 dissect_IDispatch_Invoke_resp(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, guint8 *drep)
+                              packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
-       guint32 u32Pointer;
-       guint32 u32Pointer2;
-       guint32 u32Pointer3;
-       guint32 u32VariableOffset;
-       guint32 u32ArraySize;
+    guint32 u32Pointer;
+    guint32 u32Pointer2;
+    guint32 u32Pointer3;
+    guint32 u32VariableOffset;
+    guint32 u32ArraySize;
     guint32 u32SubStart;
     guint16 u16Code;
     guint16 u16Reserved;
@@ -430,91 +430,91 @@ dissect_IDispatch_Invoke_resp(tvbuff_t *tvb, int offset,
     guint32 u32ArgErr;
     guint32 u32HResult;
     guint32 u32SCode;
-       guint32 u32VarRef;
-       gchar   szName[1000] = { 0 };
-       proto_item *excepinfo_item;
-       proto_tree *excepinfo_tree;
+    guint32 u32VarRef;
+    gchar       szName[1000] = { 0 };
+    proto_item *excepinfo_item;
+    proto_tree *excepinfo_tree;
 
 
     offset = dissect_dcom_that(tvb, offset, pinfo, tree, drep);
 
-       offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep, 
-                                               &u32Pointer);
-       if (u32Pointer) {
-               offset = dissect_dcom_VARIANT(tvb, offset, pinfo, tree, drep, hf_dispatch_varresult);
-       }
+    offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep,
+                                         &u32Pointer);
+    if (u32Pointer) {
+        offset = dissect_dcom_VARIANT(tvb, offset, pinfo, tree, drep, hf_dispatch_varresult);
+    }
 
-       /* ExcepInfo */
+    /* ExcepInfo */
     excepinfo_item = proto_tree_add_item(tree, hf_dispatch_excepinfo, tvb, offset, 0, FALSE);
     excepinfo_tree = proto_item_add_subtree (excepinfo_item, ett_dispatch_excepinfo);
     u32SubStart = offset;
 
-       offset = dissect_dcom_WORD(tvb, offset, pinfo, excepinfo_tree, drep, 
-                    hf_dispatch_code, &u16Code);
-       offset = dissect_dcom_WORD(tvb, offset, pinfo, excepinfo_tree, drep, 
-                    hf_dispatch_reserved16, &u16Reserved);
-       offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, excepinfo_tree, drep, 
-                                               &u32Pointer);
-       offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, excepinfo_tree, drep, 
-                                               &u32Pointer2);
-       offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, excepinfo_tree, drep, 
-                                               &u32Pointer3);
-       offset = dissect_dcom_DWORD(tvb, offset, pinfo, excepinfo_tree, drep, 
-                    hf_dispatch_help_context, &u32HelpContext);
-       offset = dissect_dcom_DWORD(tvb, offset, pinfo, excepinfo_tree, drep, 
-                    hf_dispatch_reserved32, &u32Reserved);
-       offset = dissect_dcom_DWORD(tvb, offset, pinfo, excepinfo_tree, drep, 
-                    hf_dispatch_deferred_fill_in, &u32DeferredFillIn);
-       offset = dissect_dcom_DWORD(tvb, offset, pinfo, excepinfo_tree, drep, 
-                    hf_dispatch_scode, &u32SCode);
-
-       if (u32Pointer) {
-               offset = dissect_dcom_BSTR(tvb, offset, pinfo, excepinfo_tree, drep, 
-                                               hf_dispatch_source, szName, sizeof(szName));
-       }
-       if (u32Pointer2) {
-               offset = dissect_dcom_BSTR(tvb, offset, pinfo, excepinfo_tree, drep, 
-                                               hf_dispatch_description, szName, sizeof(szName));
-       }
-       if (u32Pointer3) {
-               offset = dissect_dcom_BSTR(tvb, offset, pinfo, excepinfo_tree, drep, 
-                                               hf_dispatch_help_file, szName, sizeof(szName));
-       }
-
-       proto_item_append_text(excepinfo_item, ", SCode: %s", 
-        val_to_str(u32SCode, dcom_hresult_vals, "Unknown (0x%08x)"));
-       proto_item_set_len(excepinfo_item, offset - u32SubStart);
+    offset = dissect_dcom_WORD(tvb, offset, pinfo, excepinfo_tree, drep,
+                               hf_dispatch_code, &u16Code);
+    offset = dissect_dcom_WORD(tvb, offset, pinfo, excepinfo_tree, drep,
+                               hf_dispatch_reserved16, &u16Reserved);
+    offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, excepinfo_tree, drep,
+                                         &u32Pointer);
+    offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, excepinfo_tree, drep,
+                                         &u32Pointer2);
+    offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, excepinfo_tree, drep,
+                                         &u32Pointer3);
+    offset = dissect_dcom_DWORD(tvb, offset, pinfo, excepinfo_tree, drep,
+                                hf_dispatch_help_context, &u32HelpContext);
+    offset = dissect_dcom_DWORD(tvb, offset, pinfo, excepinfo_tree, drep,
+                                hf_dispatch_reserved32, &u32Reserved);
+    offset = dissect_dcom_DWORD(tvb, offset, pinfo, excepinfo_tree, drep,
+                                hf_dispatch_deferred_fill_in, &u32DeferredFillIn);
+    offset = dissect_dcom_DWORD(tvb, offset, pinfo, excepinfo_tree, drep,
+                                hf_dispatch_scode, &u32SCode);
+
+    if (u32Pointer) {
+        offset = dissect_dcom_BSTR(tvb, offset, pinfo, excepinfo_tree, drep,
+                                   hf_dispatch_source, szName, sizeof(szName));
+    }
+    if (u32Pointer2) {
+        offset = dissect_dcom_BSTR(tvb, offset, pinfo, excepinfo_tree, drep,
+                                   hf_dispatch_description, szName, sizeof(szName));
+    }
+    if (u32Pointer3) {
+        offset = dissect_dcom_BSTR(tvb, offset, pinfo, excepinfo_tree, drep,
+                                   hf_dispatch_help_file, szName, sizeof(szName));
+    }
+
+    proto_item_append_text(excepinfo_item, ", SCode: %s",
+                           val_to_str(u32SCode, dcom_hresult_vals, "Unknown (0x%08x)"));
+    proto_item_set_len(excepinfo_item, offset - u32SubStart);
     /* end of ExcepInfo */
 
-       offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep, 
-                    hf_dispatch_arg_err, &u32ArgErr);
+    offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
+                                hf_dispatch_arg_err, &u32ArgErr);
 
-       /* rgVarRef: VARIANT[u32VarRef] */
-       offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep, 
-                                                       &u32ArraySize);
+    /* rgVarRef: VARIANT[u32VarRef] */
+    offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep,
+                                            &u32ArraySize);
     u32VarRef = u32ArraySize;
-       u32VariableOffset = offset + u32ArraySize * 4;
-       while(u32ArraySize--) {
-               offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep, 
-                                                       &u32Pointer);
-               if (u32Pointer) {
-                       u32VariableOffset = dissect_dcom_VARIANT(tvb, u32VariableOffset, pinfo, tree, drep, hf_dispatch_varrefarg);
-               }
-       }
+    u32VariableOffset = offset + u32ArraySize * 4;
+    while(u32ArraySize--) {
+        offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep,
+                                             &u32Pointer);
+        if (u32Pointer) {
+            u32VariableOffset = dissect_dcom_VARIANT(tvb, u32VariableOffset, pinfo, tree, drep, hf_dispatch_varrefarg);
+        }
+    }
     offset = u32VariableOffset;
 
-       /* HRESULT of call */
-       offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, drep, 
-                        &u32HResult);
+    /* HRESULT of call */
+    offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, drep,
+                                  &u32HResult);
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-         col_append_fstr(pinfo->cinfo, COL_INFO, " SCode=%s VarRef=%u -> %s", 
-          val_to_str(u32SCode, dcom_hresult_vals, "Unknown (0x%08x)"),
-          u32VarRef,
-             val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
-       }
+    if (check_col(pinfo->cinfo, COL_INFO)) {
+        col_append_fstr(pinfo->cinfo, COL_INFO, " SCode=%s VarRef=%u -> %s",
+                        val_to_str(u32SCode, dcom_hresult_vals, "Unknown (0x%08x)"),
+                        u32VarRef,
+                        val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
+    }
 
-       return offset;
+    return offset;
 }
 
 
@@ -537,90 +537,90 @@ void
 proto_register_dcom_dispatch(void)
 {
 
-       static hf_register_info hf_dispatch_array[] = {
+    static hf_register_info hf_dispatch_array[] = {
         { &hf_dispatch_opnum,
-           { "Operation", "dispatch_opnum", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+          { "Operation", "dispatch_opnum", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
 
-               { &hf_dispatch_riid,
-               { "RIID", "dispatch_riid", FT_GUID, BASE_NONE, NULL, 0x0, NULL, HFILL }},
+        { &hf_dispatch_riid,
+          { "RIID", "dispatch_riid", FT_GUID, BASE_NONE, NULL, 0x0, NULL, HFILL }},
         { &hf_dispatch_name,
-        { "Name", "hf_dispatch_name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
-               { &hf_dispatch_names,
-               { "Names", "dispatch_names", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+          { "Name", "hf_dispatch_name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
+        { &hf_dispatch_names,
+          { "Names", "dispatch_names", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
         { &hf_dispatch_lcid,
-        { "LCID", "dispatch_lcid", FT_UINT32, BASE_HEX, VALS(dcom_lcid_vals), 0x0, NULL, HFILL }},
+          { "LCID", "dispatch_lcid", FT_UINT32, BASE_HEX, VALS(dcom_lcid_vals), 0x0, NULL, HFILL }},
         { &hf_dispatch_id,
-        { "DispID", "dispatch_id", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
+          { "DispID", "dispatch_id", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
         { &hf_dispatch_flags,
-        { "Flags", "dispatch_flags", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
-
-               { &hf_dispatch_arg,
-               { "Argument", "dispatch_arg", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
-               { &hf_dispatch_args,
-               { "Args", "dispatch_args", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
-               { &hf_dispatch_named_args,
-               { "NamedArgs", "dispatch_named_args", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
-               { &hf_dispatch_varref,
-               { "VarRef", "dispatch_varref", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
-               { &hf_dispatch_varrefidx,
-               { "VarRefIdx", "dispatch_varrefidx", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
-               { &hf_dispatch_varrefarg,
-               { "VarRef", "dispatch_varrefarg", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
-               { &hf_dispatch_varresult,
-               { "VarResult", "dispatch_varresult", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
+          { "Flags", "dispatch_flags", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
+
+        { &hf_dispatch_arg,
+          { "Argument", "dispatch_arg", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
+        { &hf_dispatch_args,
+          { "Args", "dispatch_args", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+        { &hf_dispatch_named_args,
+          { "NamedArgs", "dispatch_named_args", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+        { &hf_dispatch_varref,
+          { "VarRef", "dispatch_varref", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+        { &hf_dispatch_varrefidx,
+          { "VarRefIdx", "dispatch_varrefidx", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+        { &hf_dispatch_varrefarg,
+          { "VarRef", "dispatch_varrefarg", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
+        { &hf_dispatch_varresult,
+          { "VarResult", "dispatch_varresult", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
 
         { &hf_dispatch_flags_method,
-        { "Method", "dispatch_flags_method", FT_BOOLEAN, 32, TFS (&tfs_set_notset), DISPATCH_FLAGS_METHOD, NULL, HFILL }},
+          { "Method", "dispatch_flags_method", FT_BOOLEAN, 32, TFS (&tfs_set_notset), DISPATCH_FLAGS_METHOD, NULL, HFILL }},
         { &hf_dispatch_flags_propget,
-        { "PropertyGet", "dispatch_flags_propget", FT_BOOLEAN, 32, TFS (&tfs_set_notset), DISPATCH_FLAGS_PROPGET, NULL, HFILL }},
+          { "PropertyGet", "dispatch_flags_propget", FT_BOOLEAN, 32, TFS (&tfs_set_notset), DISPATCH_FLAGS_PROPGET, NULL, HFILL }},
         { &hf_dispatch_flags_propput,
-        { "PropertyPut", "dispatch_flags_propput", FT_BOOLEAN, 32, TFS (&tfs_set_notset), DISPATCH_FLAGS_PROPPUT, NULL, HFILL }},
+          { "PropertyPut", "dispatch_flags_propput", FT_BOOLEAN, 32, TFS (&tfs_set_notset), DISPATCH_FLAGS_PROPPUT, NULL, HFILL }},
         { &hf_dispatch_flags_propputref,
-        { "PropertyPutRef", "dispatch_flags_propputref", FT_BOOLEAN, 32, TFS (&tfs_set_notset), DISPATCH_FLAGS_PROPPUTREF, NULL, HFILL }},
+          { "PropertyPutRef", "dispatch_flags_propputref", FT_BOOLEAN, 32, TFS (&tfs_set_notset), DISPATCH_FLAGS_PROPPUTREF, NULL, HFILL }},
 
         { &hf_dispatch_code,
-        { "Code", "dispatch_code", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},
+          { "Code", "dispatch_code", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},
         { &hf_dispatch_reserved16,
-        { "Reserved", "dispatch_reserved16", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},
+          { "Reserved", "dispatch_reserved16", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},
         { &hf_dispatch_source,
-        { "Source", "dispatch_source", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
+          { "Source", "dispatch_source", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
         { &hf_dispatch_description,
-        { "Description", "dispatch_description", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
+          { "Description", "dispatch_description", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
         { &hf_dispatch_help_file,
-        { "HelpFile", "dispatch_help_file", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
+          { "HelpFile", "dispatch_help_file", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
         { &hf_dispatch_help_context,
-        { "HelpContext", "dispatch_help_context", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
+          { "HelpContext", "dispatch_help_context", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
         { &hf_dispatch_reserved32,
-        { "Reserved", "dispatch_reserved32", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
+          { "Reserved", "dispatch_reserved32", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
         { &hf_dispatch_deferred_fill_in,
-        { "DeferredFillIn", "dispatch_deferred_fill_in", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
+          { "DeferredFillIn", "dispatch_deferred_fill_in", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
         { &hf_dispatch_arg_err,
-        { "ArgErr", "dispatch_arg_err", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+          { "ArgErr", "dispatch_arg_err", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
 
         { &hf_dispatch_tinfo,
-        { "TInfo", "dispatch_tinfo", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+          { "TInfo", "dispatch_tinfo", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
         { &hf_dispatch_itinfo,
-        { "TInfo", "dispatch_itinfo", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
+          { "TInfo", "dispatch_itinfo", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
         { &hf_dispatch_dispparams,
-        { "DispParams", "dispatch_dispparams", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
+          { "DispParams", "dispatch_dispparams", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
         { &hf_dispatch_excepinfo,
-        { "ExcepInfo", "dispatch_excepinfo", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
+          { "ExcepInfo", "dispatch_excepinfo", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
         { &hf_dispatch_scode,
-        { "SCode", "dispatch_scode", FT_UINT32, BASE_HEX, VALS(dcom_hresult_vals), 0x0, NULL, HFILL }}
+          { "SCode", "dispatch_scode", FT_UINT32, BASE_HEX, VALS(dcom_hresult_vals), 0x0, NULL, HFILL }}
     };
 
-       static gint *ett[] = {
-               &ett_dispatch,
-               &ett_dispatch_flags,
+    static gint *ett[] = {
+        &ett_dispatch,
+        &ett_dispatch_flags,
         &ett_dispatch_params,
         &ett_dispatch_excepinfo
-       };
+    };
 
 
-       /* IDispatch currently only partially implemented */
-       proto_dispatch = proto_register_protocol ("DCOM IDispatch", "IDispatch", "dispatch");
-       proto_register_field_array (proto_dispatch, hf_dispatch_array, array_length (hf_dispatch_array));
-       proto_register_subtree_array (ett, array_length (ett));
+    /* IDispatch currently only partially implemented */
+    proto_dispatch = proto_register_protocol ("DCOM IDispatch", "IDispatch", "dispatch");
+    proto_register_field_array (proto_dispatch, hf_dispatch_array, array_length (hf_dispatch_array));
+    proto_register_subtree_array (ett, array_length (ett));
 }
 
 
@@ -628,8 +628,8 @@ void
 proto_reg_handoff_dcom_dispatch(void)
 {
 
-       dcerpc_init_uuid(proto_dispatch, ett_dispatch,
-               &uuid_dispatch, ver_dispatch,
-               dispatch_dissectors, hf_dispatch_opnum);
+    dcerpc_init_uuid(proto_dispatch, ett_dispatch,
+                     &uuid_dispatch, ver_dispatch,
+                     dispatch_dissectors, hf_dispatch_opnum);
 }
 
index 64bd69b56e932e6289e067cd11c61a02a7d9fd95..ca7d393162e4ab098e5758350804cb8372c76aec 100644 (file)
@@ -57,7 +57,7 @@ static guint16  ver_remact = 0;
 
 static int
 dissect_remact_remote_activation_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, guint8 *drep)
+                                     packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        guint32 u32ClientImpLevel;
        guint32 u32Mode;
@@ -66,58 +66,58 @@ dissect_remact_remote_activation_rqst(tvbuff_t *tvb, int offset,
        guint32 u32ArraySize;
        guint32 u32ItemIdx;
        guint16 u16ProtSeqs;
-    e_uuid_t clsid;
-    e_uuid_t iid;
+       e_uuid_t clsid;
+       e_uuid_t iid;
 
        gchar   szObjName[1000] = { 0 };
        guint32 u32ObjNameLen = sizeof(szObjName);
 
-    offset = dissect_dcom_this(tvb, offset, pinfo, tree, drep);
+       offset = dissect_dcom_this(tvb, offset, pinfo, tree, drep);
 
        offset = dissect_dcom_append_UUID(tvb, offset, pinfo, tree, drep,
-               hf_dcom_clsid, -1, &clsid);
-       
-       offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep, 
-                                               &u32Pointer);
+                                         hf_dcom_clsid, -1, &clsid);
+
+       offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep,
+                                            &u32Pointer);
        if (u32Pointer) {
-               offset = dissect_dcom_BSTR(tvb, offset, pinfo, tree, drep, 
-                                               hf_remact_object_name, szObjName, u32ObjNameLen);
+               offset = dissect_dcom_BSTR(tvb, offset, pinfo, tree, drep,
+                                          hf_remact_object_name, szObjName, u32ObjNameLen);
        }
 
-       offset = dissect_dcom_PMInterfacePointer(tvb, offset, pinfo, tree, drep, 
-                                               hf_remact_object_storage, NULL /* XXX */);
+       offset = dissect_dcom_PMInterfacePointer(tvb, offset, pinfo, tree, drep,
+                                                hf_remact_object_storage, NULL /* XXX */);
 
-       offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep, 
-                                               hf_remact_client_impl_level, &u32ClientImpLevel);
-       offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep, 
-                                               hf_remact_mode, &u32Mode);
+       offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
+                                   hf_remact_client_impl_level, &u32ClientImpLevel);
+       offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
+                                   hf_remact_mode, &u32Mode);
 
        /* Interfaces */
-       offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep, 
-                                               hf_remact_interfaces, &u32Interfaces);
-       offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep, 
-                                               &u32Pointer);
+       offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
+                                   hf_remact_interfaces, &u32Interfaces);
+       offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep,
+                                            &u32Pointer);
        if (u32Pointer) {
-               offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep, 
+               offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep,
                                                        &u32ArraySize);
                u32ItemIdx = 1;
                while (u32Interfaces--) {
                        offset = dissect_dcom_append_UUID(tvb, offset, pinfo, tree, drep,
-                               hf_dcom_iid, u32ItemIdx, &iid);
+                                                         hf_dcom_iid, u32ItemIdx, &iid);
 
                        u32ItemIdx++;
                }
        }
 
-       offset = dissect_dcom_WORD(tvb, offset, pinfo, tree, drep, 
-                        hf_remact_requested_protseqs, &u16ProtSeqs);
+       offset = dissect_dcom_WORD(tvb, offset, pinfo, tree, drep,
+                                  hf_remact_requested_protseqs, &u16ProtSeqs);
 
-       offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep, 
+       offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep,
                                                &u32ArraySize);
        u32ItemIdx = 1;
        while (u32ArraySize--) {
-               offset = dissect_dcom_WORD(tvb, offset, pinfo, tree, drep, 
-                                                       hf_remact_protseqs, &u16ProtSeqs);
+               offset = dissect_dcom_WORD(tvb, offset, pinfo, tree, drep,
+                                          hf_remact_protseqs, &u16ProtSeqs);
                u32ItemIdx++;
        }
 
@@ -127,7 +127,7 @@ dissect_remact_remote_activation_rqst(tvbuff_t *tvb, int offset,
 
 static int
 dissect_remact_remote_activation_resp(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, guint8 *drep)
+                                     packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
        guint32 u32Pointer;
        e_uuid_t ipid;
@@ -140,64 +140,64 @@ dissect_remact_remote_activation_resp(tvbuff_t *tvb, int offset,
        guint32 u32VariableOffset;
 
 
-    offset = dissect_dcom_that(tvb, offset, pinfo, tree, drep);
+       offset = dissect_dcom_that(tvb, offset, pinfo, tree, drep);
 
-       offset = dissect_dcom_ID(tvb, offset, pinfo, tree, drep, 
-                                               hf_dcom_oxid, NULL);
-       offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep, 
-                                               &u32Pointer);
+       offset = dissect_dcom_ID(tvb, offset, pinfo, tree, drep,
+                                hf_dcom_oxid, NULL);
+       offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep,
+                                            &u32Pointer);
        if (u32Pointer) {
-               offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep, 
+               offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep,
                                                        &u32ArraySize);
-               offset = dissect_dcom_DUALSTRINGARRAY(tvb, offset, pinfo, tree, drep, 
-                                                       hf_remact_oxid_bindings, NULL);
+               offset = dissect_dcom_DUALSTRINGARRAY(tvb, offset, pinfo, tree, drep,
+                                                     hf_remact_oxid_bindings, NULL);
        }
 
-       offset = dissect_dcom_UUID(tvb, offset, pinfo, tree, drep, 
-                        hf_dcom_ipid, &ipid);
-       offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep, 
-                                               hf_remact_authn_hint, &u32AuthnHint);
+       offset = dissect_dcom_UUID(tvb, offset, pinfo, tree, drep,
+                                  hf_dcom_ipid, &ipid);
+       offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
+                                   hf_remact_authn_hint, &u32AuthnHint);
        offset = dissect_dcom_COMVERSION(tvb, offset, pinfo, tree, drep,
-                               &u16VersionMajor, &u16VersionMinor);
+                                        &u16VersionMajor, &u16VersionMinor);
 
        offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, drep,
-                               &u32HResult);
+                                     &u32HResult);
 
-       offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep, 
+       offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep,
                                                &u32ArraySize);
        u32VariableOffset = offset + u32ArraySize * 4;
        while (u32ArraySize--) {
-               offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep, 
-                                                       &u32Pointer);
+               offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep,
+                                                    &u32Pointer);
                if (u32Pointer) {
                        u32VariableOffset = dissect_dcom_MInterfacePointer(tvb, u32VariableOffset, pinfo, tree, drep,
-                                               hf_remact_interface_data, NULL /* XXX */);
+                                                                          hf_remact_interface_data, NULL /* XXX */);
                }
        }
        offset = u32VariableOffset;
 
-       offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep, 
+       offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep,
                                                &u32ArraySize);
        u32Idx = 1;
        while (u32ArraySize--) {
                offset = dissect_dcom_indexed_HRESULT(tvb, offset, pinfo, tree, drep,
-                                       &u32HResult, u32Idx);
+                                                     &u32HResult, u32Idx);
                /* update column info now */
                if (check_col(pinfo->cinfo, COL_INFO)) {
-                 col_append_fstr(pinfo->cinfo, COL_INFO, " %s[%u]", 
-                         val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)"),
-                         u32Idx);
+                       col_append_fstr(pinfo->cinfo, COL_INFO, " %s[%u]",
+                                       val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)"),
+                                       u32Idx);
                }
                u32Idx++;
        }
 
        offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, drep,
-                               &u32HResult);
+                                     &u32HResult);
 
        /* update column info now */
-    if (check_col(pinfo->cinfo, COL_INFO)) {
-      col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", 
-                 val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)"));
+       if (check_col(pinfo->cinfo, COL_INFO)) {
+               col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s",
+                               val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)"));
        }
 
        return offset;
@@ -205,8 +205,8 @@ dissect_remact_remote_activation_resp(tvbuff_t *tvb, int offset,
 
 
 static dcerpc_sub_dissector remact_dissectors[] = {
-    { 0, "RemoteActivation", dissect_remact_remote_activation_rqst, dissect_remact_remote_activation_resp },
-    { 0, NULL, NULL, NULL },
+       { 0, "RemoteActivation", dissect_remact_remote_activation_rqst, dissect_remact_remote_activation_resp },
+       { 0, NULL, NULL, NULL },
 };
 
 
@@ -214,36 +214,36 @@ void
 proto_register_remact (void)
 {
        static hf_register_info hf_remact[] = {
-        { &hf_remact_opnum,
-           { "Operation", "remact_opnum", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+               { &hf_remact_opnum,
+                 { "Operation", "remact_opnum", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
 
                { &hf_remact_requested_protseqs,
-               { "RequestedProtSeqs", "remact_req_prot_seqs", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+                 { "RequestedProtSeqs", "remact_req_prot_seqs", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
                { &hf_remact_protseqs,
-               { "ProtSeqs", "remact_prot_seqs", FT_UINT16, BASE_DEC, VALS(dcom_protseq_vals), 0x0, NULL, HFILL }},
+                 { "ProtSeqs", "remact_prot_seqs", FT_UINT16, BASE_DEC, VALS(dcom_protseq_vals), 0x0, NULL, HFILL }},
                { &hf_remact_interfaces,
-               { "Interfaces", "remact_interfaces", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+                 { "Interfaces", "remact_interfaces", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
                { &hf_remact_mode,
-               { "Mode", "remact_mode", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+                 { "Mode", "remact_mode", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
                { &hf_remact_client_impl_level,
-               { "ClientImplLevel", "remact_client_impl_level", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+                 { "ClientImplLevel", "remact_client_impl_level", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
                { &hf_remact_object_name,
-               { "ObjectName", "remact_object_name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
+                 { "ObjectName", "remact_object_name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
                { &hf_remact_object_storage,
-               { "ObjectStorage", "remact_object_storage", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
+                 { "ObjectStorage", "remact_object_storage", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
                { &hf_remact_interface_data,
-               { "InterfaceData", "remact_interface_data", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
+                 { "InterfaceData", "remact_interface_data", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
 
                { &hf_remact_oxid_bindings,
-               { "OxidBindings", "hf_remact_oxid_bindings", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
+                 { "OxidBindings", "hf_remact_oxid_bindings", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
                { &hf_remact_authn_hint,
-               { "AuthnHint", "remact_authn_hint", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+                 { "AuthnHint", "remact_authn_hint", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
        };
 
        static gint *ett[] = {
                &ett_remact
        };
-       
+
        proto_remact = proto_register_protocol ("DCOM IRemoteActivation", "REMACT", "remact");
        proto_register_field_array (proto_remact, hf_remact, array_length (hf_remact));
        proto_register_subtree_array (ett, array_length (ett));
index 0b1f00111fbd8c9c78279e05a058419d0d4fc678..24640ad0822f64647ace33f58a630a3594c98f3e 100644 (file)
@@ -76,225 +76,225 @@ static int proto_remunk2 = -1;
 
 
 typedef struct remunk_remqueryinterface_call_s {
-    guint       iid_count;
+    guint        iid_count;
     e_uuid_t    *iids;
 } remunk_remqueryinterface_call_t;
 
 
 static int
 dissect_remunk_remqueryinterface_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, guint8 *drep)
+                                      packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
-       e_uuid_t ipid;
-       guint32 u32Refs;
-       guint16 u16IIDs;
-       guint32 u32ArraySize;
-       guint32 u32ItemIdx;
-       e_uuid_t iid;
-       dcerpc_info *info = (dcerpc_info *) pinfo->private_data;
-       remunk_remqueryinterface_call_t *call;
+    e_uuid_t     ipid;
+    guint32      u32Refs;
+    guint16      u16IIDs;
+    guint32      u32ArraySize;
+    guint32      u32ItemIdx;
+    e_uuid_t     iid;
+    dcerpc_info *info = (dcerpc_info *) pinfo->private_data;
+    remunk_remqueryinterface_call_t *call;
 
 
-       offset = dissect_dcom_this(tvb, offset, pinfo, tree, drep);
+    offset = dissect_dcom_this(tvb, offset, pinfo, tree, drep);
 
-       offset = dissect_dcom_UUID(tvb, offset, pinfo, tree, drep, 
-                        hf_dcom_ipid, &ipid);
+    offset = dissect_dcom_UUID(tvb, offset, pinfo, tree, drep,
+                               hf_dcom_ipid, &ipid);
 
-       offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep, 
-                        hf_remunk_refs, &u32Refs);
+    offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
+                                hf_remunk_refs, &u32Refs);
 
-       offset = dissect_dcom_WORD(tvb, offset, pinfo, tree, drep, 
-                        hf_remunk_iids, &u16IIDs);
+    offset = dissect_dcom_WORD(tvb, offset, pinfo, tree, drep,
+                               hf_remunk_iids, &u16IIDs);
 
-       offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep, 
-                                               &u32ArraySize);
+    offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep,
+                                            &u32ArraySize);
 
     /* limit the allocation to a reasonable size */
     if(u32ArraySize < 100) {
-           call = se_alloc(sizeof(remunk_remqueryinterface_call_t) + u32ArraySize * sizeof(e_uuid_t));
-           call->iid_count = u32ArraySize;
-           call->iids = (e_uuid_t *) (call+1);
+        call = se_alloc(sizeof(remunk_remqueryinterface_call_t) + u32ArraySize * sizeof(e_uuid_t));
+        call->iid_count = u32ArraySize;
+        call->iids = (e_uuid_t *) (call+1);
         info->call_data->private_data = call;
     } else {
         call = NULL;
     }
 
-       for (u32ItemIdx = 0; u32ArraySize--; u32ItemIdx++) {
-               offset = dissect_dcom_append_UUID(tvb, offset,  pinfo, tree, drep,
-                       hf_dcom_iid, u32ItemIdx+1, &iid);
+    for (u32ItemIdx = 0; u32ArraySize--; u32ItemIdx++) {
+        offset = dissect_dcom_append_UUID(tvb, offset,  pinfo, tree, drep,
+                                          hf_dcom_iid, u32ItemIdx+1, &iid);
         if(call != NULL) {
-                   call->iids[u32ItemIdx] = iid;
+            call->iids[u32ItemIdx] = iid;
         }
-       }
+    }
 
-       return offset;
+    return offset;
 }
 
 
 static int
 dissect_remunk_remqueryinterface_resp(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, guint8 *drep)
+                                      packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
-       guint32 u32Pointer;
-       guint32 u32ArraySize;
-       guint32 u32ItemIdx;
-       proto_item *sub_item;
-       proto_tree *sub_tree;
-       guint32 u32HResult;
-       guint32 u32SubStart;
-       e_uuid_t iid;
-       e_uuid_t iid_null = DCERPC_UUID_NULL;
-       dcerpc_info *info = (dcerpc_info *) pinfo->private_data;
-       remunk_remqueryinterface_call_t *call = info->call_data->private_data;
-    guint64 oxid;
-    guint64 oid;
-    e_uuid_t ipid;
+    guint32      u32Pointer;
+    guint32      u32ArraySize;
+    guint32      u32ItemIdx;
+    proto_item  *sub_item;
+    proto_tree  *sub_tree;
+    guint32      u32HResult;
+    guint32      u32SubStart;
+    e_uuid_t     iid;
+    e_uuid_t     iid_null = DCERPC_UUID_NULL;
+    dcerpc_info *info = (dcerpc_info *) pinfo->private_data;
+    remunk_remqueryinterface_call_t *call = info->call_data->private_data;
+    guint64      oxid;
+    guint64      oid;
+    e_uuid_t     ipid;
     dcom_interface_t *dcom_if;
 
 
-       offset = dissect_dcom_that(tvb, offset, pinfo, tree, drep);
-
-       offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep, 
-                                               &u32Pointer);
-       offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep, 
-                                               &u32ArraySize);
+    offset = dissect_dcom_that(tvb, offset, pinfo, tree, drep);
 
-       u32ItemIdx = 1;
-       while (u32ArraySize--) {
-               /* add subtree */
-               sub_item = proto_tree_add_item(tree, hf_remunk_qiresult, tvb, offset, 0, FALSE);
-               sub_tree = proto_item_add_subtree(sub_item, ett_remunk_rqi_result);
+    offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep,
+                                         &u32Pointer);
+    offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep,
+                                            &u32ArraySize);
 
-               /* REMQIRESULT */
-               offset = dissect_dcom_HRESULT(tvb, offset, pinfo, sub_tree, drep, 
-                                                       &u32HResult);
-               u32SubStart = offset - 4;
-               offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, sub_tree, drep, 
-                                                       &u32Pointer);
-
-               /* try to read the iid from the request */
-               if(call != NULL && u32ItemIdx <= call->iid_count) {
-                       iid = call->iids[u32ItemIdx-1];
-               } else {
-                       iid = iid_null;
-               }
+    u32ItemIdx = 1;
+    while (u32ArraySize--) {
+        /* add subtree */
+        sub_item = proto_tree_add_item(tree, hf_remunk_qiresult, tvb, offset, 0, FALSE);
+        sub_tree = proto_item_add_subtree(sub_item, ett_remunk_rqi_result);
+
+        /* REMQIRESULT */
+        offset = dissect_dcom_HRESULT(tvb, offset, pinfo, sub_tree, drep,
+                                      &u32HResult);
+        u32SubStart = offset - 4;
+        offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, sub_tree, drep,
+                                             &u32Pointer);
+
+        /* try to read the iid from the request */
+        if(call != NULL && u32ItemIdx <= call->iid_count) {
+            iid = call->iids[u32ItemIdx-1];
+        } else {
+            iid = iid_null;
+        }
 
-               /* XXX - this doesn't seem to be dependent on the pointer above?!? */
-               /*if (u32Pointer) {*/
-                       offset = dissect_dcom_STDOBJREF(tvb, offset, pinfo, sub_tree, drep, 0 /* hfindex */, 
-                &oxid, &oid, &ipid);
-               /*}*/
+        /* XXX - this doesn't seem to be dependent on the pointer above?!? */
+        /*if (u32Pointer) {*/
+        offset = dissect_dcom_STDOBJREF(tvb, offset, pinfo, sub_tree, drep, 0 /* hfindex */,
+                                        &oxid, &oid, &ipid);
+        /*}*/
 
         /* add interface instance to database (we currently only handle IPv4) */
         if(pinfo->net_src.type == AT_IPv4) {
-            dcom_if = dcom_interface_new(pinfo, 
-                pinfo->net_src.data,
-                &iid, oxid, oid, &ipid);
+            dcom_if = dcom_interface_new(pinfo,
+                                         pinfo->net_src.data,
+                                         &iid, oxid, oid, &ipid);
         }
 
-               /* update subtree */
-               proto_item_append_text(sub_item, "[%u]: %s", 
-                       u32ItemIdx,
-                       val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
-               proto_item_set_len(sub_item, offset - u32SubStart);
-
-               /* update column info now */
-               if (check_col(pinfo->cinfo, COL_INFO)) {
-                 col_append_fstr(pinfo->cinfo, COL_INFO, " %s[%u]", 
-                         val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)"),
-                         u32ItemIdx);
-               }
+        /* update subtree */
+        proto_item_append_text(sub_item, "[%u]: %s",
+                               u32ItemIdx,
+                               val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
+        proto_item_set_len(sub_item, offset - u32SubStart);
+
+        /* update column info now */
+        if (check_col(pinfo->cinfo, COL_INFO)) {
+            col_append_fstr(pinfo->cinfo, COL_INFO, " %s[%u]",
+                            val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)"),
+                            u32ItemIdx);
+        }
 
-               u32ItemIdx++;
-       }
+        u32ItemIdx++;
+    }
 
-       /* HRESULT of call */
-       offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, drep, 
-                        &u32HResult);
+    /* HRESULT of call */
+    offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, drep,
+                                  &u32HResult);
 
-       /* update column info now */
+    /* update column info now */
     if (check_col(pinfo->cinfo, COL_INFO)) {
-      col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", 
-                 val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)"));
-       }
+        col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s",
+                        val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)"));
+    }
 
-       return offset;
+    return offset;
 }
 
 
 static int
 dissect_remunk_remrelease_rqst(tvbuff_t *tvb, int offset,
-       packet_info *pinfo, proto_tree *tree, guint8 *drep)
+                               packet_info *pinfo, proto_tree *tree, guint8 *drep)
 {
-       guint32 u32Pointer;
-       guint32 u32IntRefs;
-       guint32 u32ItemIdx;
-       e_uuid_t ipid;
-       guint32 u32PublicRefs;
-       guint32 u32PrivateRefs;
-       const gchar *pszFormat;
-       proto_item *sub_item;
-       proto_tree *sub_tree;
-       guint32 u32SubStart;
+    guint32      u32Pointer;
+    guint32      u32IntRefs;
+    guint32      u32ItemIdx;
+    e_uuid_t     ipid;
+    guint32      u32PublicRefs;
+    guint32      u32PrivateRefs;
+    const gchar *pszFormat;
+    proto_item  *sub_item;
+    proto_tree  *sub_tree;
+    guint32      u32SubStart;
 
 
     offset = dissect_dcom_this(tvb, offset, pinfo, tree, drep);
 
-       offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep, 
-                                               &u32Pointer);
+    offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep,
+                                         &u32Pointer);
 
-       offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep, 
-                        hf_remunk_interface_refs, &u32IntRefs);
+    offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
+                                hf_remunk_interface_refs, &u32IntRefs);
 
-       /* update column info now */
+    /* update column info now */
     if (check_col(pinfo->cinfo, COL_INFO)) {
-               if (u32IntRefs) {
-                       col_append_fstr(pinfo->cinfo, COL_INFO, " Cnt=%u Refs=", u32IntRefs);
-               } else {
-                       col_append_str(pinfo->cinfo, COL_INFO, " Cnt=0");
-               }
-       }
-
-       u32ItemIdx = 1;
-       while (u32IntRefs--) {
+        if (u32IntRefs) {
+            col_append_fstr(pinfo->cinfo, COL_INFO, " Cnt=%u Refs=", u32IntRefs);
+        } else {
+            col_append_str(pinfo->cinfo, COL_INFO, " Cnt=0");
+        }
+    }
+
+    u32ItemIdx = 1;
+    while (u32IntRefs--) {
         /* add subtree */
-               sub_item = proto_tree_add_item(tree, hf_remunk_reminterfaceref, tvb, offset, 0, FALSE);
-               sub_tree = proto_item_add_subtree(sub_item, ett_remunk_reminterfaceref);
-               u32SubStart = offset;
-
-               offset = dissect_dcom_UUID(tvb, offset, pinfo, sub_tree, drep, 
-                                                       hf_dcom_ipid, &ipid);
-
-               offset = dissect_dcom_DWORD(tvb, offset, pinfo, sub_tree, drep, 
-                                                       hf_remunk_public_refs, &u32PublicRefs);
-
-               offset = dissect_dcom_DWORD(tvb, offset, pinfo, sub_tree, drep, 
-                                                       hf_remunk_private_refs, &u32PrivateRefs);
-
-               /* update subtree */
-               proto_item_append_text(sub_item, "[%u]: IPID=%s, PublicRefs=%u, PrivateRefs=%u", 
-                       u32ItemIdx,
-                       guids_resolve_uuid_to_str(&ipid),
-                       u32PublicRefs, u32PrivateRefs);
-               proto_item_set_len(sub_item, offset - u32SubStart);
-
-               /* update column info now */
-               if (check_col(pinfo->cinfo, COL_INFO)) {
-                       pszFormat = "";
-                       if (u32ItemIdx == 1) {
-                               pszFormat = "%u-%u";
-                       } else if (u32ItemIdx < 10) {
-                               pszFormat = ",%u-%u";
-                       } else if (u32ItemIdx == 10) {
-                               pszFormat = ",...";
-                       }
-                       col_append_fstr(pinfo->cinfo, COL_INFO, pszFormat, u32PublicRefs, u32PrivateRefs);
-               }
-
-               u32ItemIdx++;
-       }
-
-       return offset;
+        sub_item = proto_tree_add_item(tree, hf_remunk_reminterfaceref, tvb, offset, 0, FALSE);
+        sub_tree = proto_item_add_subtree(sub_item, ett_remunk_reminterfaceref);
+        u32SubStart = offset;
+
+        offset = dissect_dcom_UUID(tvb, offset, pinfo, sub_tree, drep,
+                                   hf_dcom_ipid, &ipid);
+
+        offset = dissect_dcom_DWORD(tvb, offset, pinfo, sub_tree, drep,
+                                    hf_remunk_public_refs, &u32PublicRefs);
+
+        offset = dissect_dcom_DWORD(tvb, offset, pinfo, sub_tree, drep,
+                                    hf_remunk_private_refs, &u32PrivateRefs);
+
+        /* update subtree */
+        proto_item_append_text(sub_item, "[%u]: IPID=%s, PublicRefs=%u, PrivateRefs=%u",
+                               u32ItemIdx,
+                               guids_resolve_uuid_to_str(&ipid),
+                               u32PublicRefs, u32PrivateRefs);
+        proto_item_set_len(sub_item, offset - u32SubStart);
+
+        /* update column info now */
+        if (check_col(pinfo->cinfo, COL_INFO)) {
+            pszFormat = "";
+            if (u32ItemIdx == 1) {
+                pszFormat = "%u-%u";
+            } else if (u32ItemIdx < 10) {
+                pszFormat = ",%u-%u";
+            } else if (u32ItemIdx == 10) {
+                pszFormat = ",...";
+            }
+            col_append_fstr(pinfo->cinfo, COL_INFO, pszFormat, u32PublicRefs, u32PrivateRefs);
+        }
+
+        u32ItemIdx++;
+    }
+
+    return offset;
 }
 
 
@@ -305,7 +305,7 @@ static dcerpc_sub_dissector remunk_dissectors[] = {
     { 2, "Release", NULL, NULL },
 
     { 3, "RemQueryInterface", dissect_remunk_remqueryinterface_rqst, dissect_remunk_remqueryinterface_resp },
-       { 4, "RemAddRef", NULL, NULL },
+    { 4, "RemAddRef", NULL, NULL },
     { 5, "RemRelease", dissect_remunk_remrelease_rqst, dissect_dcom_simple_resp },
     { 0, NULL, NULL, NULL }
 };
@@ -317,10 +317,10 @@ static dcerpc_sub_dissector remunk2_dissectors[] = {
     { 2, "Release", NULL, NULL },
 
     { 3, "RemQueryInterface", dissect_remunk_remqueryinterface_rqst, dissect_remunk_remqueryinterface_resp },
-       { 4, "RemAddRef", NULL, NULL },
+    { 4, "RemAddRef", NULL, NULL },
     { 5, "RemRelease", dissect_remunk_remrelease_rqst, dissect_dcom_simple_resp },
 
-       { 6, "RemQueryInterface2", NULL, NULL },
+    { 6, "RemQueryInterface2", NULL, NULL },
     { 0, NULL, NULL, NULL }
 };
 
@@ -329,41 +329,41 @@ static dcerpc_sub_dissector remunk2_dissectors[] = {
 void
 proto_register_remunk (void)
 {
-       static hf_register_info hf_remunk_rqi_array[] = {
+    static hf_register_info hf_remunk_rqi_array[] = {
         { &hf_remunk_opnum,
-           { "Operation", "remunk_opnum", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
-
-               { &hf_remunk_refs,
-               { "Refs", "remunk_refs", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
-               { &hf_remunk_iids,
-               { "IIDs", "remunk_iids", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
-               { &hf_remunk_qiresult,
-               { "QIResult", "remunk_qiresult", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
-               { &hf_remunk_flags,
-               { "Flags", "remunk_flags",  FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
-               { &hf_remunk_public_refs,
-               { "PublicRefs", "remunk_public_refs",  FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
-               { &hf_remunk_reminterfaceref,
-               { "RemInterfaceRef", "remunk_reminterfaceref",  FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
-               { &hf_remunk_interface_refs,
-               { "InterfaceRefs", "remunk_int_refs",  FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
-               { &hf_remunk_private_refs,
-               { "PrivateRefs", "remunk_private_refs",  FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }}
-       };
-
-       static gint *ett_remunk_array[] = {
-               &ett_remunk,
-               &ett_remunk_rqi_result,
-               &ett_remunk2,
-               &ett_remunk_reminterfaceref
-       };
-       
-       proto_remunk = proto_register_protocol ("IRemUnknown", "IRemUnknown", "remunk");
-       proto_register_field_array (proto_remunk, hf_remunk_rqi_array, array_length (hf_remunk_rqi_array));
-
-       proto_remunk2 = proto_register_protocol ("IRemUnknown2", "IRemUnknown2", "remunk2");
-
-       proto_register_subtree_array (ett_remunk_array, array_length (ett_remunk_array));
+          { "Operation", "remunk_opnum", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+
+        { &hf_remunk_refs,
+          { "Refs", "remunk_refs", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+        { &hf_remunk_iids,
+          { "IIDs", "remunk_iids", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+        { &hf_remunk_qiresult,
+          { "QIResult", "remunk_qiresult", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
+        { &hf_remunk_flags,
+          { "Flags", "remunk_flags",  FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
+        { &hf_remunk_public_refs,
+          { "PublicRefs", "remunk_public_refs",  FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+        { &hf_remunk_reminterfaceref,
+          { "RemInterfaceRef", "remunk_reminterfaceref",  FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
+        { &hf_remunk_interface_refs,
+          { "InterfaceRefs", "remunk_int_refs",  FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+        { &hf_remunk_private_refs,
+          { "PrivateRefs", "remunk_private_refs",  FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }}
+    };
+
+    static gint *ett_remunk_array[] = {
+        &ett_remunk,
+        &ett_remunk_rqi_result,
+        &ett_remunk2,
+        &ett_remunk_reminterfaceref
+    };
+
+    proto_remunk = proto_register_protocol ("IRemUnknown", "IRemUnknown", "remunk");
+    proto_register_field_array (proto_remunk, hf_remunk_rqi_array, array_length (hf_remunk_rqi_array));
+
+    proto_remunk2 = proto_register_protocol ("IRemUnknown2", "IRemUnknown2", "remunk2");
+
+    proto_register_subtree_array (ett_remunk_array, array_length (ett_remunk_array));
 }
 
 void
@@ -373,12 +373,12 @@ proto_reg_handoff_remunk (void)
     /* Register the IPID */
     guids_add_uuid(&ipid_remunk, "IPID-IRemUnknown");
 
-       /* Register the interfaces */
-       dcerpc_init_uuid(proto_remunk, ett_remunk, 
-               &uuid_remunk, ver_remunk, 
-               remunk_dissectors, hf_remunk_opnum);
+    /* Register the interfaces */
+    dcerpc_init_uuid(proto_remunk, ett_remunk,
+                     &uuid_remunk, ver_remunk,
+                     remunk_dissectors, hf_remunk_opnum);
 
-       dcerpc_init_uuid(proto_remunk2, ett_remunk2, 
-               &uuid_remunk2, ver_remunk2, 
-               remunk2_dissectors, hf_remunk_opnum);
+    dcerpc_init_uuid(proto_remunk2, ett_remunk2,
+                     &uuid_remunk2, ver_remunk2,
+                     remunk2_dissectors, hf_remunk_opnum);
 }
index 15fc28c2cf81910daaf20f6fc8615d6b9e195fcf..7912fd6e7a0a80c4a68a2135f4f7f6b4f04d34f8 100644 (file)
@@ -81,15 +81,15 @@ static gint ett_dhcpv6_pkt_option = -1;
 
 #define DHCPV6_LEASEDURATION_INFINITY  0xffffffff
 
-#define        SOLICIT                 1
-#define        ADVERTISE               2
-#define        REQUEST                 3
-#define        CONFIRM                 4
-#define        RENEW                   5
-#define        REBIND                  6
-#define        REPLY                   7
-#define        RELEASE                 8
-#define        DECLINE                 9
+#define        SOLICIT                  1
+#define        ADVERTISE                2
+#define        REQUEST                  3
+#define        CONFIRM                  4
+#define        RENEW                    5
+#define        REBIND                   6
+#define        REPLY                    7
+#define        RELEASE                  8
+#define        DECLINE                  9
 #define        RECONFIGURE             10
 #define        INFORMATION_REQUEST     11
 #define        RELAY_FORW              12
@@ -97,15 +97,15 @@ static gint ett_dhcpv6_pkt_option = -1;
 #define        LEASEQUERY              14
 #define        LEASEQUERY_REPLY        15
 
-#define        OPTION_CLIENTID         1
-#define        OPTION_SERVERID         2
-#define        OPTION_IA_NA            3
-#define        OPTION_IA_TA            4
-#define        OPTION_IAADDR           5
-#define        OPTION_ORO              6
-#define        OPTION_PREFERENCE       7
-#define        OPTION_ELAPSED_TIME     8
-#define        OPTION_RELAY_MSG        9
+#define        OPTION_CLIENTID          1
+#define        OPTION_SERVERID          2
+#define        OPTION_IA_NA             3
+#define        OPTION_IA_TA             4
+#define        OPTION_IAADDR            5
+#define        OPTION_ORO               6
+#define        OPTION_PREFERENCE        7
+#define        OPTION_ELAPSED_TIME      8
+#define        OPTION_RELAY_MSG         9
 /* #define     OPTION_SERVER_MSG       10 */
 #define        OPTION_AUTH             11
 #define        OPTION_UNICAST          12
@@ -157,105 +157,105 @@ static gint ett_dhcpv6_pkt_option = -1;
 #define        DUID_LL_OLD             4
 
 static const value_string msgtype_vals[] = {
-       { SOLICIT,      "Solicit" },
-       { ADVERTISE,    "Advertise" },
-       { REQUEST,      "Request" },
-       { CONFIRM,      "Confirm" },
-       { RENEW,        "Renew" },
-       { REBIND,       "Rebind" },
-       { REPLY,        "Reply" },
-       { RELEASE,      "Release" },
-       { DECLINE,      "Decline" },
-       { RECONFIGURE,  "Reconfigure" },
-       { INFORMATION_REQUEST,  "Information-request" },
-       { RELAY_FORW,   "Relay-forw" },
-       { RELAY_REPLY,  "Relay-reply" },
-       { LEASEQUERY,   "Leasequery" },
-       { LEASEQUERY_REPLY,     "Leasequery-reply" },
-       { 0, NULL }
+    { SOLICIT,                 "Solicit" },
+    { ADVERTISE,               "Advertise" },
+    { REQUEST,                 "Request" },
+    { CONFIRM,                 "Confirm" },
+    { RENEW,                   "Renew" },
+    { REBIND,                  "Rebind" },
+    { REPLY,                   "Reply" },
+    { RELEASE,                 "Release" },
+    { DECLINE,                 "Decline" },
+    { RECONFIGURE,             "Reconfigure" },
+    { INFORMATION_REQUEST,     "Information-request" },
+    { RELAY_FORW,              "Relay-forw" },
+    { RELAY_REPLY,             "Relay-reply" },
+    { LEASEQUERY,              "Leasequery" },
+    { LEASEQUERY_REPLY,        "Leasequery-reply" },
+    { 0, NULL }
 };
 
 static const value_string opttype_vals[] = {
-       { OPTION_CLIENTID,      "Client Identifier" },
-       { OPTION_SERVERID,      "Server Identifier" },
-       { OPTION_IA_NA,         "Identity Association for Non-temporary Address" },
-       { OPTION_IA_TA,         "Identity Association for Temporary Address" },
-       { OPTION_IAADDR,        "IA Address" },
-       { OPTION_ORO,           "Option Request" },
-       { OPTION_PREFERENCE,    "Preference" },
-       { OPTION_ELAPSED_TIME,  "Elapsed time" },
-       { OPTION_RELAY_MSG,     "Relay Message" },
-/*     { OPTION_SERVER_MSG,    "Server message" }, */
-       { OPTION_AUTH,          "Authentication" },
-       { OPTION_UNICAST,       "Server unicast" },
-       { OPTION_STATUS_CODE,   "Status code" },
-       { OPTION_RAPID_COMMIT,  "Rapid Commit" },
-       { OPTION_USER_CLASS,    "User Class" },
-       { OPTION_VENDOR_CLASS,  "Vendor Class" },
-       { OPTION_VENDOR_OPTS,   "Vendor-specific Information" },
-       { OPTION_INTERFACE_ID,  "Interface-Id" },
-       { OPTION_RECONF_MSG,    "Reconfigure Message" },
-       { OPTION_RECONF_ACCEPT, "Reconfigure Accept" },
-       { OPTION_SIP_SERVER_D,  "SIP Server Domain Name List" },
-       { OPTION_SIP_SERVER_A,  "SIP Servers IPv6 Address List" },
-       { OPTION_DNS_SERVERS,   "DNS recursive name server" },
-       { OPTION_DOMAIN_LIST,   "Domain Search List" },
-       { OPTION_IA_PD,         "Identity Association for Prefix Delegation" },
-       { OPTION_IAPREFIX,      "IA Prefix" },
-       { OPTION_NIS_SERVERS,   "Network Information Server" },
-       { OPTION_NISP_SERVERS,  "Network Information Server V2" },
-       { OPTION_NIS_DOMAIN_NAME, "Network Information Server Domain Name" },
-       { OPTION_NISP_DOMAIN_NAME,"Network Information Server V2 Domain Name" },
-       { OPTION_SNTP_SERVERS,  "Simple Network Time Protocol Server" },
-       { OPTION_LIFETIME,      "Lifetime" },
-       { OPTION_BCMCS_SERVER_D, "BCMCS Server Domain" },
-       { OPTION_BCMCS_SERVER_A, "BCMCS Servers IPv6 Address List" },
-       { OPTION_GEOCONF_CIVIC, "Geoconf Civic Address" },
-       { OPTION_REMOTE_ID,     "Remote Identifier" },
-       { OPTION_SUBSCRIBER_ID, "Subscriber Identifier" },
-       { OPTION_CLIENT_FQDN,   "Fully Qualified Domain Name" },
-       { OPTION_PANA_AGENT,    "PANA Agents IPv6 Address List" },
-       { OPTION_TIME_ZONE,     "Time Zone" },
-       { OPTION_TZDB,          "Time Zone Database" },
-       { OPTION_ERO,           "Echo Request Option" },
-       { OPTION_LQ_QUERY,      "Leasequery Query" },
-       { OPTION_CLIENT_DATA,   "Leasequery Client Data" },
-       { OPTION_CLT_TIME,      "Client Last Transaction Time" },
-       { OPTION_LQ_RELAY_DATA, "Leasequery Relay Data" },
-       { OPTION_LQ_CLIENT_LINK, "Leasequery Client Link Address List" },
-       { OPTION_CAPWAP_AC_V6,  "CAPWAP Access Controllers" },
-       { OPTION_MIP6_HA,       "Mobile IPv6 Home Agent" },
-       { OPTION_MIP6_HOA,      "Mobile IPv6 Home Address" },
-       { OPTION_NAI,           "Network Access Identifier" },
-       { 0,    NULL }
+    { OPTION_CLIENTID,         "Client Identifier" },
+    { OPTION_SERVERID,         "Server Identifier" },
+    { OPTION_IA_NA,            "Identity Association for Non-temporary Address" },
+    { OPTION_IA_TA,            "Identity Association for Temporary Address" },
+    { OPTION_IAADDR,           "IA Address" },
+    { OPTION_ORO,              "Option Request" },
+    { OPTION_PREFERENCE,       "Preference" },
+    { OPTION_ELAPSED_TIME,     "Elapsed time" },
+    { OPTION_RELAY_MSG,        "Relay Message" },
+/*  { OPTION_SERVER_MSG,       "Server message" }, */
+    { OPTION_AUTH,             "Authentication" },
+    { OPTION_UNICAST,          "Server unicast" },
+    { OPTION_STATUS_CODE,      "Status code" },
+    { OPTION_RAPID_COMMIT,     "Rapid Commit" },
+    { OPTION_USER_CLASS,       "User Class" },
+    { OPTION_VENDOR_CLASS,     "Vendor Class" },
+    { OPTION_VENDOR_OPTS,      "Vendor-specific Information" },
+    { OPTION_INTERFACE_ID,     "Interface-Id" },
+    { OPTION_RECONF_MSG,       "Reconfigure Message" },
+    { OPTION_RECONF_ACCEPT,    "Reconfigure Accept" },
+    { OPTION_SIP_SERVER_D,     "SIP Server Domain Name List" },
+    { OPTION_SIP_SERVER_A,     "SIP Servers IPv6 Address List" },
+    { OPTION_DNS_SERVERS,      "DNS recursive name server" },
+    { OPTION_DOMAIN_LIST,      "Domain Search List" },
+    { OPTION_IA_PD,            "Identity Association for Prefix Delegation" },
+    { OPTION_IAPREFIX,         "IA Prefix" },
+    { OPTION_NIS_SERVERS,      "Network Information Server" },
+    { OPTION_NISP_SERVERS,     "Network Information Server V2" },
+    { OPTION_NIS_DOMAIN_NAME,  "Network Information Server Domain Name" },
+    { OPTION_NISP_DOMAIN_NAME, "Network Information Server V2 Domain Name" },
+    { OPTION_SNTP_SERVERS,     "Simple Network Time Protocol Server" },
+    { OPTION_LIFETIME,         "Lifetime" },
+    { OPTION_BCMCS_SERVER_D,   "BCMCS Server Domain" },
+    { OPTION_BCMCS_SERVER_A,   "BCMCS Servers IPv6 Address List" },
+    { OPTION_GEOCONF_CIVIC,    "Geoconf Civic Address" },
+    { OPTION_REMOTE_ID,        "Remote Identifier" },
+    { OPTION_SUBSCRIBER_ID,    "Subscriber Identifier" },
+    { OPTION_CLIENT_FQDN,      "Fully Qualified Domain Name" },
+    { OPTION_PANA_AGENT,       "PANA Agents IPv6 Address List" },
+    { OPTION_TIME_ZONE,        "Time Zone" },
+    { OPTION_TZDB,             "Time Zone Database" },
+    { OPTION_ERO,              "Echo Request Option" },
+    { OPTION_LQ_QUERY,         "Leasequery Query" },
+    { OPTION_CLIENT_DATA,      "Leasequery Client Data" },
+    { OPTION_CLT_TIME,         "Client Last Transaction Time" },
+    { OPTION_LQ_RELAY_DATA,    "Leasequery Relay Data" },
+    { OPTION_LQ_CLIENT_LINK,   "Leasequery Client Link Address List" },
+    { OPTION_CAPWAP_AC_V6,     "CAPWAP Access Controllers" },
+    { OPTION_MIP6_HA,          "Mobile IPv6 Home Agent" },
+    { OPTION_MIP6_HOA,         "Mobile IPv6 Home Address" },
+    { OPTION_NAI,              "Network Access Identifier" },
+    { 0,        NULL }
 };
 
 static const value_string statuscode_vals[] =
 {
-       {0, "Success" },
-       {1, "UnspecFail" },
-       {2, "NoAddrAvail" },
-       {3, "NoBinding" },
-       {4, "NotOnLink" },
-       {5, "UseMulticast" },
-       {6, "NoPrefixAvail" },
-       {7, "UnknownQueryType" },
-       {8, "MalformedQuery" },
-       {9, "NotConfigured" },
-       {10, "NotAllowed" },
-       {0, NULL }
+    {0, "Success" },
+    {1, "UnspecFail" },
+    {2, "NoAddrAvail" },
+    {3, "NoBinding" },
+    {4, "NotOnLink" },
+    {5, "UseMulticast" },
+    {6, "NoPrefixAvail" },
+    {7, "UnknownQueryType" },
+    {8, "MalformedQuery" },
+    {9, "NotConfigured" },
+    {10, "NotAllowed" },
+    {0, NULL }
 };
 
 static const value_string duidtype_vals[] =
 {
-       { DUID_LLT,     "link-layer address plus time" },
-       { DUID_EN,      "assigned by vendor based on Enterprise number" },
-       { DUID_LL,      "link-layer address" },
-       { DUID_LL_OLD,  "link-layer address (old)" },
-       { 0, NULL }
+    { DUID_LLT,    "link-layer address plus time" },
+    { DUID_EN,     "assigned by vendor based on Enterprise number" },
+    { DUID_LL,     "link-layer address" },
+    { DUID_LL_OLD, "link-layer address (old)" },
+    { 0, NULL }
 };
 
-/* This FQDN draft is a mess, I've tried to understand, 
+/* This FQDN draft is a mess, I've tried to understand,
    but N,O,S bit descriptions are really cryptic */
 static const true_false_string fqdn_n = {
 /*    "Client doesn't want server to perform DNS update", "" */
@@ -263,34 +263,34 @@ static const true_false_string fqdn_n = {
 };
 
 static const true_false_string fqdn_o = {
-    "O bit set", "O bit cleared" 
+    "O bit set", "O bit cleared"
 };
 
 static const true_false_string fqdn_s = {
-/*    "Forward mapping (FQDN-to-IPv6, AAAA) performed by client", 
+/*    "Forward mapping (FQDN-to-IPv6, AAAA) performed by client",
       "Forward mapping (FQDN-to-IPv6, AAAA) performed by server" */
     "S bit set", "S bit cleared"
-}; 
+};
 
 /* CableLabs Common Vendor Specific Options */
-#define CL_OPTION_ORO 0x0001  /* 1 */
-#define CL_OPTION_DEVICE_TYPE 0x0002 /* 2 */
+#define CL_OPTION_ORO                     0x0001 /* 1 */
+#define CL_OPTION_DEVICE_TYPE             0x0002 /* 2 */
 #define CL_OPTION_EMBEDDED_COMPONENT_LIST 0x0003 /* 3 */
-#define CL_OPTION_DEVICE_SERIAL_NUMBER 0x0004 /* 4 */
+#define CL_OPTION_DEVICE_SERIAL_NUMBER    0x0004 /* 4 */
 #define CL_OPTION_HARDWARE_VERSION_NUMBER 0x0005 /* 5 */
 #define CL_OPTION_SOFTWARE_VERSION_NUMBER 0x0006 /* 6 */
-#define CL_OPTION_BOOT_ROM_VERSION 0x0007 /* 7 */
-#define CL_OPTION_VENDOR_OUI 0x0008 /* 8 */
-#define CL_OPTION_MODEL_NUMBER 0x0009 /* 9 */
-#define CL_OPTION_VENDOR_NAME 0x000a /* 10 */
+#define CL_OPTION_BOOT_ROM_VERSION        0x0007 /* 7 */
+#define CL_OPTION_VENDOR_OUI              0x0008 /* 8 */
+#define CL_OPTION_MODEL_NUMBER            0x0009 /* 9 */
+#define CL_OPTION_VENDOR_NAME             0x000a /* 10 */
 /* 11-32 is currently reserved */
-#define CL_OPTION_TFTP_SERVERS 0x0020 /* 32 */
-#define CL_OPTION_CONFIG_FILE_NAME 0x0021 /* 33 */
-#define CL_OPTION_SYSLOG_SERVERS 0x0022 /* 34 */
-#define CL_OPTION_TLV5 0x0023 /* 35 */
-#define CL_OPTION_DEVICE_ID 0x0024 /* 36 */
-#define CL_OPTION_RFC868_SERVERS 0x0025 /* 37 */
-#define CL_OPTION_TIME_OFFSET 0x0026 /* 38 */
+#define CL_OPTION_TFTP_SERVERS            0x0020 /* 32 */
+#define CL_OPTION_CONFIG_FILE_NAME        0x0021 /* 33 */
+#define CL_OPTION_SYSLOG_SERVERS          0x0022 /* 34 */
+#define CL_OPTION_TLV5                    0x0023 /* 35 */
+#define CL_OPTION_DEVICE_ID               0x0024 /* 36 */
+#define CL_OPTION_RFC868_SERVERS          0x0025 /* 37 */
+#define CL_OPTION_TIME_OFFSET             0x0026 /* 38 */
 
 /** CableLabs DOCSIS Project Vendor Specific Options */
 #define CL_OPTION_DOCS_CMTS_CAP 0x0401  /* 1025 */
@@ -304,29 +304,29 @@ static const true_false_string fqdn_s = {
 #define CL_OPTION_DOCS_CMTS_TLV_VERS_NUM 0x01 /* 1 */
 
 static const value_string cl_vendor_subopt_values[] = {
-/* 1 */ { CL_OPTION_ORO, "Option Request = " }, 
-/* 2 */ { CL_OPTION_DEVICE_TYPE, "Device Type = " },
-/* 3 */ { CL_OPTION_EMBEDDED_COMPONENT_LIST, "Embedded Components = " },
-/* 4 */ { CL_OPTION_DEVICE_SERIAL_NUMBER, "Serial Number = " },
-/* 5 */ { CL_OPTION_HARDWARE_VERSION_NUMBER, "Hardware Version = " },
-/* 6 */ { CL_OPTION_SOFTWARE_VERSION_NUMBER, "Software Version = " },
-/* 7 */ { CL_OPTION_BOOT_ROM_VERSION, "Boot ROM Version = " },
-/* 8 */ { CL_OPTION_VENDOR_OUI, "Organization Unique Identifier = " },
-/* 9 */ { CL_OPTION_MODEL_NUMBER, "Model Number = " },
-/* 10 */ { CL_OPTION_VENDOR_NAME, "Vendor Name = " },
-/* 32 */ { CL_OPTION_TFTP_SERVERS, "TFTP Server Addresses : " },
-/* 33 */ { CL_OPTION_CONFIG_FILE_NAME, "Configuration File Name = " },
-/* 34 */ { CL_OPTION_SYSLOG_SERVERS, "Syslog Servers : " },
-/* 35 */ { CL_OPTION_TLV5, "TLV5 = " },
-/* 36 */ { CL_OPTION_DEVICE_ID, "Device Identifier = " },
-/* 37 */ { CL_OPTION_RFC868_SERVERS, "Time Protocol Servers : " },
-/* 38 */ { CL_OPTION_TIME_OFFSET, "Time Offset = " },
-/* 1025 */ {CL_OPTION_DOCS_CMTS_CAP, "CMTS Capabilities Option : " },
-/* 1026 */ {CL_CM_MAC_ADDR, "CM MAC Address Option = " }, 
-/* 1027 */ {CL_EROUTER_CONTAINER_OPTION, "eRouter Container Option : " },
-/* 2170 */ {CL_OPTION_CCC, "CableLabs Client Configuration : " },
-{ 0, NULL}
-/* 1 */ };
+    /*    1 */ { CL_OPTION_ORO, "Option Request = " },
+    /*    2 */ { CL_OPTION_DEVICE_TYPE, "Device Type = " },
+    /*    3 */ { CL_OPTION_EMBEDDED_COMPONENT_LIST, "Embedded Components = " },
+    /*    4 */ { CL_OPTION_DEVICE_SERIAL_NUMBER, "Serial Number = " },
+    /*    5 */ { CL_OPTION_HARDWARE_VERSION_NUMBER, "Hardware Version = " },
+    /*    6 */ { CL_OPTION_SOFTWARE_VERSION_NUMBER, "Software Version = " },
+    /*    7 */ { CL_OPTION_BOOT_ROM_VERSION, "Boot ROM Version = " },
+    /*    8 */ { CL_OPTION_VENDOR_OUI, "Organization Unique Identifier = " },
+    /*    9 */ { CL_OPTION_MODEL_NUMBER, "Model Number = " },
+    /*   10 */ { CL_OPTION_VENDOR_NAME, "Vendor Name = " },
+    /*   32 */ { CL_OPTION_TFTP_SERVERS, "TFTP Server Addresses : " },
+    /*   33 */ { CL_OPTION_CONFIG_FILE_NAME, "Configuration File Name = " },
+    /*   34 */ { CL_OPTION_SYSLOG_SERVERS, "Syslog Servers : " },
+    /*   35 */ { CL_OPTION_TLV5, "TLV5 = " },
+    /*   36 */ { CL_OPTION_DEVICE_ID, "Device Identifier = " },
+    /*   37 */ { CL_OPTION_RFC868_SERVERS, "Time Protocol Servers : " },
+    /*   38 */ { CL_OPTION_TIME_OFFSET, "Time Offset = " },
+    /* 1025 */ { CL_OPTION_DOCS_CMTS_CAP, "CMTS Capabilities Option : " },
+    /* 1026 */ { CL_CM_MAC_ADDR, "CM MAC Address Option = " },
+    /* 1027 */ { CL_EROUTER_CONTAINER_OPTION, "eRouter Container Option : " },
+    /* 2170 */ { CL_OPTION_CCC, "CableLabs Client Configuration : " },
+    { 0, NULL}
+    /* 1 */ };
 
 #define PKT_CCC_PRI_DHCP       0x0001
 #define PKT_CCC_SEC_DHCP       0x0002
@@ -337,237 +337,237 @@ static const value_string cl_vendor_subopt_values[] = {
 #define PKT_CCC_TGT_FLAG       0x0007
 #define PKT_CCC_PROV_TIMER     0x0008
 #define PKT_CCC_IETF_SEC_TKT   0x0009
-/** 10 -255 Reservered for future extensions **/ 
+/** 10 -255 Reservered for future extensions **/
 
 static const value_string pkt_ccc_opt_vals[] = {
-       { PKT_CCC_PRI_DHCP,              "TSP's Primary DHCP Server" },
-       { PKT_CCC_SEC_DHCP,              "TSP's Secondary DHCP Server" },
-       { PKT_CCC_IETF_PROV_SRV, "TSP's Provisioning Server" },
-       { PKT_CCC_IETF_AS_KRB,   "TSP's AS-REQ/AS-REP Backoff and Retry" },
-       { PKT_CCC_IETF_AP_KRB,   "TSP's AP-REQ/AP-REP Backoff and Retry" },
-       { PKT_CCC_KRB_REALM,     "TSP's Kerberos Realm Name" },
-       { PKT_CCC_TGT_FLAG,      "TSP's Ticket Granting Server Utilization" },
-       { PKT_CCC_PROV_TIMER,    "TSP's Provisioning Timer Value" },
-       { PKT_CCC_IETF_SEC_TKT,  "PacketCable Security Ticket Control" },
-       { 0, NULL },
-}; 
+    { PKT_CCC_PRI_DHCP,      "TSP's Primary DHCP Server" },
+    { PKT_CCC_SEC_DHCP,      "TSP's Secondary DHCP Server" },
+    { PKT_CCC_IETF_PROV_SRV, "TSP's Provisioning Server" },
+    { PKT_CCC_IETF_AS_KRB,   "TSP's AS-REQ/AS-REP Backoff and Retry" },
+    { PKT_CCC_IETF_AP_KRB,   "TSP's AP-REQ/AP-REP Backoff and Retry" },
+    { PKT_CCC_KRB_REALM,     "TSP's Kerberos Realm Name" },
+    { PKT_CCC_TGT_FLAG,      "TSP's Ticket Granting Server Utilization" },
+    { PKT_CCC_PROV_TIMER,    "TSP's Provisioning Timer Value" },
+    { PKT_CCC_IETF_SEC_TKT,  "PacketCable Security Ticket Control" },
+    { 0, NULL },
+};
 
 static const value_string sec_tcm_vals[] = {
-       { 1 << 0, "PacketCable Provisioning Server" },
-       { 1 << 1, "PacketCable Call Manager Servers" },
-       { 0, NULL },
+    { 1 << 0, "PacketCable Provisioning Server" },
+    { 1 << 1, "PacketCable Call Manager Servers" },
+    { 0, NULL },
 };
 
 /* May be called recursively */
 static void
 dissect_dhcpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
-    gboolean downstream, int off, int eoff);
+              gboolean downstream, int off, int eoff);
 
 static int
 dissect_packetcable_ccc_option(proto_tree *v_tree, tvbuff_t *tvb, int optoff,
-    int optend)
+                              int optend)
 {
-       /** THE ENCODING OF THIS SUBOPTION HAS CHANGED FROM DHCPv4
-      the code and length fields have grown from a single octet to
-      two octets each. **/
-  int suboptoff = optoff;
-       guint16 subopt, subopt_len, sec_tcm;
-  guint8 fetch_tgt, timer_val, type; 
-       proto_item *vti;
-  proto_tree *pkt_s_tree;
-  guint32 ipv4_address;
-  guchar kr_name;       /** A character in the kerberos realm name option */
-  guint8 kr_value;      /* The integer value of the character currently being tested */
-  int kr_fail_flag = 0; /* Flag indicating an invalid character was found */
-  int kr_pos = 0;       /* The position of the first invalid character */
-  int i = 0;
-  char bit_fld[24];
-
-       subopt = tvb_get_ntohs(tvb, optoff);
-       suboptoff += 2;
-
-       subopt_len = tvb_get_ntohs(tvb, suboptoff);
-       suboptoff += 2;
-
-       /* There must be at least five octets left to be a valid sub element */
-       if (optend <= 0) {
-               proto_tree_add_text(v_tree, tvb, optoff, 1,
-                       "Sub element %d: no room left in option for suboption length",
-                       subopt);
-               return (optend);
-       } 
-       /* g_print("dissect packetcable ccc option subopt_len=%d optend=%d\n\n", subopt_len, optend); */
-
-       vti = proto_tree_add_text(v_tree, tvb, optoff, subopt_len + 4,
-           "Sub element %u: %s: ", subopt,
-           val_to_str(subopt, pkt_ccc_opt_vals, "unknown/reserved") );
-
-       switch (subopt) {
-               case PKT_CCC_PRI_DHCP:  /* IPv4 address values */
-               case PKT_CCC_SEC_DHCP:
-      if (subopt_len == 4) {
-        ipv4_address = tvb_get_ipv4(tvb, suboptoff);
-        proto_item_append_text(vti, "%s (%u byte%s%s)",
-               ip_to_str((guint8 *)&ipv4_address), subopt_len,
-               plurality(subopt_len, "", "s"),
-               subopt_len != 4 ? " [Invalid]" : "");
-      }
-      else {
-          proto_tree_add_text(vti, tvb, suboptoff, subopt_len, 
-              "Bogus length: %d", subopt_len);
-
-      }
-
-      suboptoff += subopt_len;
-      break;
-    case PKT_CCC_IETF_PROV_SRV :
-      type = tvb_get_guint8(tvb, suboptoff);
-      /** Type 0 is FQDN **/
-      if (type == 0) {
-                          proto_item_append_text(vti, "%s (%u byte%s)",
-                                       tvb_format_stringzpad(tvb, suboptoff+1, subopt_len-1),
-                                          subopt_len,
-                                          plurality(subopt_len-1, "", "s") ); 
-      }
-      /** Type 0 is IPv4 **/
-      else if (type == 1) {
-         if (subopt_len == 5) {
-            ipv4_address = tvb_get_ipv4(tvb, suboptoff+1);
+    /** THE ENCODING OF THIS SUBOPTION HAS CHANGED FROM DHCPv4
+        the code and length fields have grown from a single octet to
+        two octets each. **/
+    int suboptoff = optoff;
+    guint16 subopt, subopt_len, sec_tcm;
+    guint8 fetch_tgt, timer_val, type;
+    proto_item *vti;
+    proto_tree *pkt_s_tree;
+    guint32 ipv4_address;
+    guchar kr_name;       /** A character in the kerberos realm name option */
+    guint8 kr_value;      /* The integer value of the character currently being tested */
+    int kr_fail_flag = 0; /* Flag indicating an invalid character was found */
+    int kr_pos = 0;       /* The position of the first invalid character */
+    int i = 0;
+    char bit_fld[24];
+
+    subopt = tvb_get_ntohs(tvb, optoff);
+    suboptoff += 2;
+
+    subopt_len = tvb_get_ntohs(tvb, suboptoff);
+    suboptoff += 2;
+
+    /* There must be at least five octets left to be a valid sub element */
+    if (optend <= 0) {
+        proto_tree_add_text(v_tree, tvb, optoff, 1,
+                            "Sub element %d: no room left in option for suboption length",
+                            subopt);
+        return (optend);
+    }
+    /* g_print("dissect packetcable ccc option subopt_len=%d optend=%d\n\n", subopt_len, optend); */
+
+    vti = proto_tree_add_text(v_tree, tvb, optoff, subopt_len + 4,
+                              "Sub element %u: %s: ", subopt,
+                              val_to_str(subopt, pkt_ccc_opt_vals, "unknown/reserved") );
+
+    switch (subopt) {
+    case PKT_CCC_PRI_DHCP:     /* IPv4 address values */
+    case PKT_CCC_SEC_DHCP:
+        if (subopt_len == 4) {
+            ipv4_address = tvb_get_ipv4(tvb, suboptoff);
             proto_item_append_text(vti, "%s (%u byte%s%s)",
-                   ip_to_str((guint8 *)&ipv4_address), subopt_len,
-                   plurality(subopt_len, "", "s"),
-                   subopt_len != 5 ? " [Invalid]" : "");
-         }
-         else {
-             proto_item_append_text(vti, "Bogus length: %d", subopt_len);
-         }
-      }
-      else {
-          proto_item_append_text(vti, "Invalid type: %u (%u byte%s)",
-                type, subopt_len, plurality(subopt_len, "", "s")); 
-      }
-      suboptoff += subopt_len;
-      break;
-       
+                                   ip_to_str((guint8 *)&ipv4_address), subopt_len,
+                                   plurality(subopt_len, "", "s"),
+                                   subopt_len != 4 ? " [Invalid]" : "");
+        }
+        else {
+            proto_tree_add_text(vti, tvb, suboptoff, subopt_len,
+                                "Bogus length: %d", subopt_len);
+
+        }
+
+        suboptoff += subopt_len;
+        break;
+    case PKT_CCC_IETF_PROV_SRV :
+        type = tvb_get_guint8(tvb, suboptoff);
+        /** Type 0 is FQDN **/
+        if (type == 0) {
+            proto_item_append_text(vti, "%s (%u byte%s)",
+                                   tvb_format_stringzpad(tvb, suboptoff+1, subopt_len-1),
+                                   subopt_len,
+                                   plurality(subopt_len-1, "", "s") );
+        }
+        /** Type 0 is IPv4 **/
+        else if (type == 1) {
+            if (subopt_len == 5) {
+                ipv4_address = tvb_get_ipv4(tvb, suboptoff+1);
+                proto_item_append_text(vti, "%s (%u byte%s%s)",
+                                       ip_to_str((guint8 *)&ipv4_address), subopt_len,
+                                       plurality(subopt_len, "", "s"),
+                                       subopt_len != 5 ? " [Invalid]" : "");
+            }
+            else {
+                proto_item_append_text(vti, "Bogus length: %d", subopt_len);
+            }
+        }
+        else {
+            proto_item_append_text(vti, "Invalid type: %u (%u byte%s)",
+                                   type, subopt_len, plurality(subopt_len, "", "s"));
+        }
+        suboptoff += subopt_len;
+        break;
+
     case PKT_CCC_IETF_AS_KRB :
     case PKT_CCC_IETF_AP_KRB :
-      if (subopt_len == 12) {
-         pkt_s_tree = proto_item_add_subtree(vti, ett_dhcpv6_pkt_option);
-         proto_tree_add_text(pkt_s_tree, tvb, suboptoff, 4, 
-            "Nominal Timeout : %u", tvb_get_ntohl(tvb, suboptoff));
-         proto_tree_add_text(pkt_s_tree, tvb, suboptoff+4, 4, 
-            "Maximum Timeout : %u", tvb_get_ntohl(tvb, suboptoff+4));
-         proto_tree_add_text(pkt_s_tree, tvb, suboptoff+8, 4, 
-            "Maximum Retry Count : %u", tvb_get_ntohl(tvb, suboptoff+8));
-
-      }
-      else {
-          proto_item_append_text(vti, "Bogus length: %d", subopt_len);
-      }
-      suboptoff += subopt_len;
-      break;
-               case PKT_CCC_KRB_REALM:
-                       if (subopt_len > 0) {
-         /** The only allowable characters are 
-             A-Z (upper case only) 65-90
-             '.', 46
-             '/', 47 
-             '\', 92 
-             '=', 61 
-             '"', 34 
-             ',', 44 
-           and 
-             ':' 58
-             so loop through and 
-             make sure it conforms to the expected syntax.
-          **/
-         for (i=0; i < subopt_len; i++) {
-            kr_name = tvb_get_guint8(tvb, suboptoff + i);
-            kr_value = (int)kr_name;
-            if ((kr_value >= 65 && kr_value <= 90) || 
-                  kr_value == 34 || 
-                  kr_value == 44 || 
-                  kr_value == 46 || 
-                  kr_value == 47 || 
-                  kr_value == 58 || 
-                  kr_value == 61 || 
-                  kr_value == 92)   {
+        if (subopt_len == 12) {
+            pkt_s_tree = proto_item_add_subtree(vti, ett_dhcpv6_pkt_option);
+            proto_tree_add_text(pkt_s_tree, tvb, suboptoff, 4,
+                                "Nominal Timeout : %u", tvb_get_ntohl(tvb, suboptoff));
+            proto_tree_add_text(pkt_s_tree, tvb, suboptoff+4, 4,
+                                "Maximum Timeout : %u", tvb_get_ntohl(tvb, suboptoff+4));
+            proto_tree_add_text(pkt_s_tree, tvb, suboptoff+8, 4,
+                                "Maximum Retry Count : %u", tvb_get_ntohl(tvb, suboptoff+8));
+
+        }
+        else {
+            proto_item_append_text(vti, "Bogus length: %d", subopt_len);
+        }
+        suboptoff += subopt_len;
+        break;
+    case PKT_CCC_KRB_REALM:
+        if (subopt_len > 0) {
+            /** The only allowable characters are
+                A-Z (upper case only) 65-90
+                '.', 46
+                '/', 47
+                '\', 92
+                '=', 61
+                '"', 34
+                ',', 44
+                and
+                ':' 58
+                so loop through and
+                make sure it conforms to the expected syntax.
+            **/
+            for (i=0; i < subopt_len; i++) {
+                kr_name = tvb_get_guint8(tvb, suboptoff + i);
+                kr_value = (int)kr_name;
+                if ((kr_value >= 65 && kr_value <= 90) ||
+                    kr_value == 34 ||
+                    kr_value == 44 ||
+                    kr_value == 46 ||
+                    kr_value == 47 ||
+                    kr_value == 58 ||
+                    kr_value == 61 ||
+                    kr_value == 92)   {
+                }
+                else if (!kr_fail_flag) {
+                    kr_pos = i;
+                    kr_fail_flag = 1;
+                }
+                proto_item_append_text(vti, "%c", kr_name);
+            }
+
+            if (kr_fail_flag) {
+                proto_item_append_text(vti, " (%u byte%s [Invalid at byte=%d]) ",
+                                       subopt_len,
+                                       plurality(subopt_len, "", "s"),
+                                       kr_pos);
             }
-            else if (!kr_fail_flag) {
-               kr_pos = i;
-               kr_fail_flag = 1;
+            else {
+                proto_item_append_text(vti, " (%u byte%s%s) ",
+                                       subopt_len,
+                                       plurality(subopt_len, "", "s"),
+                                       kr_fail_flag != 0 ? " [Invalid]" : "");
             }
-            proto_item_append_text(vti, "%c", kr_name);
-         }
-     
-         if (kr_fail_flag) {
-            proto_item_append_text(vti, " (%u byte%s [Invalid at byte=%d]) ",
-                                       subopt_len,
-                                       plurality(subopt_len, "", "s"),  
-                kr_pos);
-         }
-         else {
-            proto_item_append_text(vti, " (%u byte%s%s) ",
-                                       subopt_len,
-                                       plurality(subopt_len, "", "s"),  
-                kr_fail_flag != 0 ? " [Invalid]" : "");
-         }
-      } 
-                       suboptoff += subopt_len;
-                       break;
-
-               case PKT_CCC_TGT_FLAG:
-                       fetch_tgt = tvb_get_guint8(tvb, suboptoff);
-                       proto_item_append_text(vti, "%s (%u byte%s%s)",
-                                       fetch_tgt == 1 ? "True" : "False",
-                                       subopt_len,
-                                       plurality(subopt_len, "", "s"),
-                                       subopt_len != 1 ? " [Invalid]" : "");
-                       suboptoff += subopt_len;
-                       break;
-
-               case PKT_CCC_PROV_TIMER:
-                       timer_val = tvb_get_guint8(tvb, suboptoff);
-                       /* proto_item_append_text(vti, "%u%s (%u byte%s%s)", timer_val,
-                                       timer_val > 30 ? " [Invalid]" : "", */
-                       proto_item_append_text(vti, "%u (%u byte%s%s)", timer_val,
-                                       subopt_len,
-                                       plurality(subopt_len, "", "s"),
-                                       subopt_len != 1 ? " [Invalid]" : "");
-                       suboptoff += subopt_len;
-                       break;
-    
+        }
+        suboptoff += subopt_len;
+        break;
+
+    case PKT_CCC_TGT_FLAG:
+        fetch_tgt = tvb_get_guint8(tvb, suboptoff);
+        proto_item_append_text(vti, "%s (%u byte%s%s)",
+                               fetch_tgt == 1 ? "True" : "False",
+                               subopt_len,
+                               plurality(subopt_len, "", "s"),
+                               subopt_len != 1 ? " [Invalid]" : "");
+        suboptoff += subopt_len;
+        break;
+
+    case PKT_CCC_PROV_TIMER:
+        timer_val = tvb_get_guint8(tvb, suboptoff);
+        /* proto_item_append_text(vti, "%u%s (%u byte%s%s)", timer_val,
+           timer_val > 30 ? " [Invalid]" : "", */
+        proto_item_append_text(vti, "%u (%u byte%s%s)", timer_val,
+                               subopt_len,
+                               plurality(subopt_len, "", "s"),
+                               subopt_len != 1 ? " [Invalid]" : "");
+        suboptoff += subopt_len;
+        break;
+
     case PKT_CCC_IETF_SEC_TKT :
-                       sec_tcm = tvb_get_ntohs(tvb, suboptoff);
-      proto_item_append_text(vti, "0x%04x (%u byte%s%s)",
-          sec_tcm, subopt_len, plurality(subopt_len, "", "s"),
-          subopt_len != 2 ? " [Invalid]" : "");     
-      
-      if (subopt_len == 2) {
-         pkt_s_tree = proto_item_add_subtree(vti, ett_dhcpv6_pkt_option);
-         for (i=0; i< 2; i++) {
-            if (sec_tcm & sec_tcm_vals[i].value) {
-              decode_bitfield_value(bit_fld, sec_tcm, sec_tcm_vals[i].value, 16);
-                  proto_tree_add_text(pkt_s_tree, tvb, suboptoff, 2, "%s %s",
-                  bit_fld, sec_tcm_vals[i].strptr);
+        sec_tcm = tvb_get_ntohs(tvb, suboptoff);
+        proto_item_append_text(vti, "0x%04x (%u byte%s%s)",
+                               sec_tcm, subopt_len, plurality(subopt_len, "", "s"),
+                               subopt_len != 2 ? " [Invalid]" : "");
+
+        if (subopt_len == 2) {
+            pkt_s_tree = proto_item_add_subtree(vti, ett_dhcpv6_pkt_option);
+            for (i=0; i< 2; i++) {
+                if (sec_tcm & sec_tcm_vals[i].value) {
+                    decode_bitfield_value(bit_fld, sec_tcm, sec_tcm_vals[i].value, 16);
+                    proto_tree_add_text(pkt_s_tree, tvb, suboptoff, 2, "%s %s",
+                                        bit_fld, sec_tcm_vals[i].strptr);
+                }
             }
-         }
-      }
-      suboptoff += subopt_len;
-                       break;
+        }
+        suboptoff += subopt_len;
+        break;
 
 
-               default:
-                       suboptoff += subopt_len;
-                       break;
+    default:
+        suboptoff += subopt_len;
+        break;
 
-       }
-       
-  /** Return the number of bytes processed **/
-  return (suboptoff - optoff);
+    }
+
+    /** Return the number of bytes processed **/
+    return (suboptoff - optoff);
 }
 
-static void 
+static void
 dissect_cablelabs_specific_opts(proto_tree *v_tree, tvbuff_t *tvb, int voff, int len)
 {
     guint16 type;
@@ -580,24 +580,24 @@ dissect_cablelabs_specific_opts(proto_tree *v_tree, tvbuff_t *tvb, int voff, int
     int i;
     int field_len; /* holds the lenght of one occurrence of a field */
     proto_tree *subtree;
-    struct e_in6_addr in6; 
+    struct e_in6_addr in6;
 
     if (len > 4) {
-      while (off - voff < len) {
+        while (off - voff < len) {
 
-                   /* Type */
-        type = tvb_get_ntohs(tvb, off);
-        ti = proto_tree_add_text(v_tree, tvb, off, 2,
-                "Suboption %d: %s", type, val_to_str(type, 
-                cl_vendor_subopt_values, "unknown"));
-        /* Length */
-        tlv_len = tvb_get_ntohs(tvb, off+2);
+            /* Type */
+            type = tvb_get_ntohs(tvb, off);
+            ti = proto_tree_add_text(v_tree, tvb, off, 2,
+                                     "Suboption %d: %s", type, val_to_str(type,
+                                                                          cl_vendor_subopt_values, "unknown"));
+            /* Length */
+            tlv_len = tvb_get_ntohs(tvb, off+2);
 
-        /* Values */
-        sub_off = off + 4;
+            /* Values */
+            sub_off = off + 4;
 
-        switch(type) {
-            /* String types */
+            switch(type) {
+                /* String types */
             case CL_OPTION_DEVICE_TYPE :
             case CL_OPTION_DEVICE_SERIAL_NUMBER :
             case CL_OPTION_HARDWARE_VERSION_NUMBER :
@@ -609,22 +609,22 @@ dissect_cablelabs_specific_opts(proto_tree *v_tree, tvbuff_t *tvb, int voff, int
             case CL_OPTION_EMBEDDED_COMPONENT_LIST :
                 opt_len = tlv_len;
                 field_len = tlv_len;
-                proto_item_append_text(ti, "\"%s\"", 
-                        tvb_format_stringzpad(tvb, sub_off, field_len));
-             break;
-            case CL_OPTION_ORO : 
+                proto_item_append_text(ti, "\"%s\"",
+                                       tvb_format_stringzpad(tvb, sub_off, field_len));
+                break;
+            case CL_OPTION_ORO :
                 field_len = 2;
                 opt_len = tlv_len;
                 if (opt_len > 0) {
-                  for (i = 0; i < tlv_len; i += field_len) {
-                    sub_value = tvb_get_ntohs(tvb, sub_off);
-                    proto_item_append_text(ti, " %d", sub_value);
-                   sub_off += field_len;
-                }
+                    for (i = 0; i < tlv_len; i += field_len) {
+                        sub_value = tvb_get_ntohs(tvb, sub_off);
+                        proto_item_append_text(ti, " %d", sub_value);
+                        sub_off += field_len;
+                    }
                 }
                 break;
 
-            /* List of IPv6 Address */
+                /* List of IPv6 Address */
             case CL_OPTION_TFTP_SERVERS :
             case CL_OPTION_SYSLOG_SERVERS :
             case CL_OPTION_RFC868_SERVERS :
@@ -633,13 +633,13 @@ dissect_cablelabs_specific_opts(proto_tree *v_tree, tvbuff_t *tvb, int voff, int
                 subtree = proto_item_add_subtree(ti, ett_dhcpv6_vendor_option);
 
                 if ((tlv_len % field_len) == 0) {
-                   for (i = 0; i < tlv_len/field_len; i++) {
-                      tvb_get_ipv6(tvb, sub_off, &in6);
-                      proto_tree_add_text(subtree, tvb, sub_off,
-                                  sizeof(in6), "IPv6 address %d: %s",
-                                  i+1, ip6_to_str(&in6));
-                      sub_off += field_len;
-                   }
+                    for (i = 0; i < tlv_len/field_len; i++) {
+                        tvb_get_ipv6(tvb, sub_off, &in6);
+                        proto_tree_add_text(subtree, tvb, sub_off,
+                                            sizeof(in6), "IPv6 address %d: %s",
+                                            i+1, ip6_to_str(&in6));
+                        sub_off += field_len;
+                    }
                 }
                 break;
 
@@ -648,20 +648,20 @@ dissect_cablelabs_specific_opts(proto_tree *v_tree, tvbuff_t *tvb, int voff, int
                 opt_len = tlv_len;
                 field_len = tlv_len;
                 if (tlv_len != 6) {
-                   proto_item_append_text(ti, "Bogus value length=%d", 
-                        tlv_len);
+                    proto_item_append_text(ti, "Bogus value length=%d",
+                                           tlv_len);
                 }
                 else {
-                   proto_item_append_text(ti, "%s", 
-                        tvb_bytes_to_str(tvb, sub_off, field_len));
+                    proto_item_append_text(ti, "%s",
+                                           tvb_bytes_to_str(tvb, sub_off, field_len));
                 }
                 break;
 
             case CL_OPTION_TLV5 :
                 opt_len = tlv_len;
                 field_len = tlv_len;
-                proto_item_append_text(ti, "%s", 
-                        tvb_bytes_to_str(tvb, sub_off, field_len));
+                proto_item_append_text(ti, "%s",
+                                       tvb_bytes_to_str(tvb, sub_off, field_len));
                 break;
 
             case CL_OPTION_TIME_OFFSET :
@@ -678,83 +678,83 @@ dissect_cablelabs_specific_opts(proto_tree *v_tree, tvbuff_t *tvb, int voff, int
                    option */
                 if (tlv_len > 0) {
                     for (i = 0; field_len < opt_len; i++) {
-                       int tagLen = 0;
-                       int tag = 0;
-                       tag = tvb_get_guint8(tvb, sub_off);
-                       sub_off++;
-                       tagLen = tvb_get_guint8(tvb, sub_off);
-                       sub_off++;
-                       if (tag == CL_OPTION_DOCS_CMTS_TLV_VERS_NUM &&
-                           tagLen == 2) {
-                          int major = 0;
-                          int minor = 0;
-                          major = tvb_get_guint8(tvb, sub_off);
-                          sub_off++;
-                          minor = tvb_get_guint8(tvb, sub_off);
-                          sub_off++;
-                          proto_tree_add_text(subtree, tvb, sub_off,
-                                  sizeof(4), "DOCSIS Version Number %d.%d",
-                                  major, minor);
-                       }
-                       else
-                          sub_off += tagLen;
-                       
-                       field_len += tagLen + 2;
-                   }
+                        int tagLen = 0;
+                        int tag = 0;
+                        tag = tvb_get_guint8(tvb, sub_off);
+                        sub_off++;
+                        tagLen = tvb_get_guint8(tvb, sub_off);
+                        sub_off++;
+                        if (tag == CL_OPTION_DOCS_CMTS_TLV_VERS_NUM &&
+                            tagLen == 2) {
+                            int major = 0;
+                            int minor = 0;
+                            major = tvb_get_guint8(tvb, sub_off);
+                            sub_off++;
+                            minor = tvb_get_guint8(tvb, sub_off);
+                            sub_off++;
+                            proto_tree_add_text(subtree, tvb, sub_off,
+                                                sizeof(4), "DOCSIS Version Number %d.%d",
+                                                major, minor);
+                        }
+                        else
+                            sub_off += tagLen;
+
+                        field_len += tagLen + 2;
+                    }
                 }
-                else 
-                   proto_tree_add_text(subtree, tvb, sub_off,
-                        sizeof(0), "empty");
+                else
+                    proto_tree_add_text(subtree, tvb, sub_off,
+                                        sizeof(0), "empty");
                 break;
-            
+
             case CL_CM_MAC_ADDR :
                 opt_len = tlv_len;
                 field_len = tlv_len;
                 if (tlv_len != 6) {
-                    proto_item_append_text(ti, "Bogus value length=%d", 
-                         tlv_len);
-                 }
-                 else {
+                    proto_item_append_text(ti, "Bogus value length=%d",
+                                           tlv_len);
+                }
+                else {
                     /*proto_item_append_text(ti, "CM MAC Address Option = %s", */
-                    proto_item_append_text(ti, "%s", 
-                         bytes_to_str_punct(tvb_get_ptr(tvb, sub_off, opt_len), opt_len, ':'));
-                         /* tvb_bytes_to_str(tvb, sub_off, opt_len)); */
-                 }
-                 sub_off += field_len;
-                 break;
-            
+                    proto_item_append_text(ti, "%s",
+                                           bytes_to_str_punct(tvb_get_ptr(tvb, sub_off, opt_len), opt_len, ':'));
+                    /* tvb_bytes_to_str(tvb, sub_off, opt_len)); */
+                }
+                sub_off += field_len;
+                break;
+
             case CL_EROUTER_CONTAINER_OPTION :
-                 opt_len = tlv_len;
-                 field_len = tlv_len;
-                 proto_item_append_text(ti, " %s (len=%d)",
-                         tvb_bytes_to_str(tvb, sub_off, opt_len), tlv_len);
-                 sub_off += field_len;
-                 break;
-            
+                opt_len = tlv_len;
+                field_len = tlv_len;
+                proto_item_append_text(ti, " %s (len=%d)",
+                                       tvb_bytes_to_str(tvb, sub_off, opt_len), tlv_len);
+                sub_off += field_len;
+                break;
+
             case CL_OPTION_CCC :
-                 opt_len = tlv_len;
-                 field_len = 0;
-                 subtree = proto_item_add_subtree(ti, ett_dhcpv6_vendor_option);
-                 proto_item_append_text(ti, " (%d bytes)", opt_len);
-                 while (field_len < opt_len) {
-                     sub_value = dissect_packetcable_ccc_option(subtree, tvb, 
-                         sub_off, (opt_len - field_len));
-                     sub_off += sub_value;
-                     field_len += sub_value;
-                 }
-                 sub_off += field_len;
-                 
+                opt_len = tlv_len;
+                field_len = 0;
+                subtree = proto_item_add_subtree(ti, ett_dhcpv6_vendor_option);
+                proto_item_append_text(ti, " (%d bytes)", opt_len);
+                while (field_len < opt_len) {
+                    sub_value = dissect_packetcable_ccc_option(subtree, tvb,
+                                                               sub_off, (opt_len - field_len));
+                    sub_off += sub_value;
+                    field_len += sub_value;
+                }
+                sub_off += field_len;
+
             default:
                 opt_len = tlv_len;
-            break;
-        }
-        off += (opt_len + 4);
+                break;
+            }
+            off += (opt_len + 4);
 
-      }
+        }
     }
     else {
-      proto_tree_add_text(v_tree, tvb, off, len-off, 
-              "Bogus length: %d", len);
+        proto_tree_add_text(v_tree, tvb, off, len-off,
+                            "Bogus length: %d", len);
     }
 }
 
@@ -777,14 +777,14 @@ dhcpv6_domain(proto_tree * subtree, tvbuff_t *tvb, int offset, guint16 optlen)
 
         /* read length of the next substring */
         len = tvb_get_guint8(tvb, offset);
-       /* Microsoft dhcpv6 clients aren't currently RFC 4704 conform: They send an
-        * ASCII string instead of a DNS record encoded domain name. Catch that case
-        * to allow us to continue after such a malformed record.
-        */
-       if ( optlen < len ) {
-                proto_tree_add_text(subtree, tvb, start_offset, optlen, "Malformed DNS name record (MS Vista client?)");
-               return;
-       }
+        /* Microsoft dhcpv6 clients aren't currently RFC 4704 conform: They send an
+         * ASCII string instead of a DNS record encoded domain name. Catch that case
+         * to allow us to continue after such a malformed record.
+         */
+        if ( optlen < len ) {
+            proto_tree_add_text(subtree, tvb, start_offset, optlen, "Malformed DNS name record (MS Vista client?)");
+            return;
+        }
         offset++;
         optlen--;
         /* if len==0 and pos>0 we have read an entire domain string */
@@ -806,905 +806,905 @@ dhcpv6_domain(proto_tree * subtree, tvbuff_t *tvb, int offset, guint16 optlen)
             pos++;
         }
         if(pos+len>254){
-                /* too long string, this must be an error? */
-                proto_tree_add_text(subtree, tvb, start_offset, offset-start_offset, "Malformed option");
-                return;
+            /* too long string, this must be an error? */
+            proto_tree_add_text(subtree, tvb, start_offset, offset-start_offset, "Malformed option");
+            return;
         }
         tvb_memcpy(tvb, domain+pos, offset, len);
         pos+=len;
         offset+=len;
         optlen-=len;
-    }        
-    
+    }
+
     if(pos){
         domain[pos]=0;
         proto_tree_add_text(subtree, tvb, start_offset, offset-start_offset, "Domain: %s", domain);
     }
-}    
+}
 
 /* Returns the number of bytes consumed by this option. */
 static int
-dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, 
-               gboolean downstream, int off, int eoff, gboolean *at_end)
+dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree,
+             gboolean downstream, int off, int eoff, gboolean *at_end)
 {
-       guint8 *buf;
-       guint16 opttype;
-       guint16 optlen;
-       guint16 hwtype;
-       guint16 temp_optlen = 0;
-       proto_item *ti;
-       proto_tree *subtree;
-       proto_tree *subtree_2;
-       int i;
-       struct e_in6_addr in6;
-       guint16 duidtype;
-       guint32 enterprise_no;
-
-       /* option type and length must be present */
-       if (eoff - off < 4) {
-               *at_end = TRUE;
-               return 0;
-       }
-
-       opttype = tvb_get_ntohs(tvb, off);
-       optlen = tvb_get_ntohs(tvb, off + 2);
-
-       /* all option data must be present */
-       if (eoff - off < 4 + optlen) {
-               *at_end = TRUE;
-               return 0;
-       }
-
-       ti = proto_tree_add_text(bp_tree, tvb, off, 4 + optlen,
-               "%s", val_to_str(opttype, opttype_vals, "DHCP option %u"));
-
-       subtree = proto_item_add_subtree(ti, ett_dhcpv6_option);
-       proto_tree_add_item(subtree, hf_option_type, tvb, off, 2, FALSE);
-       proto_tree_add_item(subtree, hf_option_length, tvb, off + 2, 2, FALSE);
-       off += 4;
-       /* Right now, none of the options can be filtered at, so provide a hex
-           array for minimalistic filtering */
-       proto_tree_add_item(subtree, hf_option_value, tvb, off, optlen, FALSE);
-
-       switch (opttype) {
-       case OPTION_CLIENTID:
-               col_append_fstr(pinfo->cinfo, COL_INFO, "CID: %s ", tvb_bytes_to_str(tvb, off, optlen));
-               /* Fall through */
-       case OPTION_SERVERID:
-               if (optlen < 2) {
-                       proto_tree_add_text(subtree, tvb, off, optlen,
-                               "DUID: malformed option");
-                       break;
-               }
-               proto_item_append_text(ti, ": %s", tvb_bytes_to_str(tvb, off, optlen));
-               duidtype = tvb_get_ntohs(tvb, off);
-               proto_tree_add_text(subtree, tvb, off, 2,
-                       "DUID type: %s (%u)",
-                                   val_to_str(duidtype,
-                                              duidtype_vals, "Unknown"),
-                                   duidtype);
-               switch (duidtype) {
-               case DUID_LLT:
-                       if (optlen < 8) {
-                               proto_tree_add_text(subtree, tvb, off,
-                                       optlen, "DUID: malformed option");
-                               break;
-                       }
-                       hwtype=tvb_get_ntohs(tvb, off + 2);
-                       proto_tree_add_text(subtree, tvb, off + 2, 2,
-                               "Hardware type: %s (%u)", arphrdtype_to_str(hwtype, "Unknown"),
-                               hwtype);
-                       /* XXX seconds since Jan 1 2000 */
-                       proto_tree_add_text(subtree, tvb, off + 4, 4,
-                               "Time: %u", tvb_get_ntohl(tvb, off + 4));
-                       if (optlen > 8) {
-                               proto_tree_add_text(subtree, tvb, off + 8,
-                                       optlen - 8, "Link-layer address: %s",
-                                       arphrdaddr_to_str(tvb_get_ptr(tvb, off+8, optlen-8), optlen-8, hwtype));
-                       }
-                       break;
-               case DUID_EN:
-                       if (optlen < 6) {
-                               proto_tree_add_text(subtree, tvb, off,
-                                       optlen, "DUID: malformed option");
-                               break;
-                       }
-                       proto_tree_add_item(subtree, hf_duiden_enterprise, tvb, off + 2, 4, FALSE);
-                       if (optlen > 6) {
-                               buf = tvb_bytes_to_str(tvb, off + 6, optlen - 6);
-                               proto_tree_add_text(subtree, tvb, off + 6,
-                                       optlen - 6, "identifier: %s", buf);
-                       }
-                       break;
-               case DUID_LL:
-               case DUID_LL_OLD:
-                       if (optlen < 4) {
-                               proto_tree_add_text(subtree, tvb, off,
-                                       optlen, "DUID: malformed option");
-                               break;
-                       }
-                       hwtype=tvb_get_ntohs(tvb, off + 2);
-                       proto_tree_add_text(subtree, tvb, off + 2, 2,
-                               "Hardware type: %s (%u)",
-                               arphrdtype_to_str(hwtype, "Unknown"),
-                               hwtype);
-                       if (optlen > 4) {
-                               proto_tree_add_text(subtree, tvb, off + 4,
-                                       optlen - 4, "Link-layer address: %s",
-                                       arphrdaddr_to_str(tvb_get_ptr(tvb, off+4, optlen-4), optlen-4, hwtype));
-                       }
-                       break;
-               }
-               break;
-       case OPTION_IA_NA:
-       case OPTION_IA_PD:
-          if (optlen < 12) {
-             if (opttype == OPTION_IA_NA)
+    guint8 *buf;
+    guint16    opttype;
+    guint16    optlen;
+    guint16    hwtype;
+    guint16    temp_optlen = 0;
+    proto_item *ti;
+    proto_tree *subtree;
+    proto_tree *subtree_2;
+    int i;
+    struct e_in6_addr in6;
+    guint16 duidtype;
+    guint32 enterprise_no;
+
+    /* option type and length must be present */
+    if (eoff - off < 4) {
+        *at_end = TRUE;
+        return 0;
+    }
+
+    opttype = tvb_get_ntohs(tvb, off);
+    optlen = tvb_get_ntohs(tvb, off + 2);
+
+    /* all option data must be present */
+    if (eoff - off < 4 + optlen) {
+        *at_end = TRUE;
+        return 0;
+    }
+
+    ti = proto_tree_add_text(bp_tree, tvb, off, 4 + optlen,
+                             "%s", val_to_str(opttype, opttype_vals, "DHCP option %u"));
+
+    subtree = proto_item_add_subtree(ti, ett_dhcpv6_option);
+    proto_tree_add_item(subtree, hf_option_type, tvb, off, 2, FALSE);
+    proto_tree_add_item(subtree, hf_option_length, tvb, off + 2, 2, FALSE);
+    off += 4;
+    /* Right now, none of the options can be filtered at, so provide a hex
+       array for minimalistic filtering */
+    proto_tree_add_item(subtree, hf_option_value, tvb, off, optlen, FALSE);
+
+    switch (opttype) {
+    case OPTION_CLIENTID:
+        col_append_fstr(pinfo->cinfo, COL_INFO, "CID: %s ", tvb_bytes_to_str(tvb, off, optlen));
+        /* Fall through */
+    case OPTION_SERVERID:
+        if (optlen < 2) {
+            proto_tree_add_text(subtree, tvb, off, optlen,
+                                "DUID: malformed option");
+            break;
+        }
+        proto_item_append_text(ti, ": %s", tvb_bytes_to_str(tvb, off, optlen));
+        duidtype = tvb_get_ntohs(tvb, off);
+        proto_tree_add_text(subtree, tvb, off, 2,
+                            "DUID type: %s (%u)",
+                            val_to_str(duidtype,
+                                       duidtype_vals, "Unknown"),
+                            duidtype);
+        switch (duidtype) {
+        case DUID_LLT:
+            if (optlen < 8) {
+                proto_tree_add_text(subtree, tvb, off,
+                                    optlen, "DUID: malformed option");
+                break;
+            }
+            hwtype=tvb_get_ntohs(tvb, off + 2);
+            proto_tree_add_text(subtree, tvb, off + 2, 2,
+                                "Hardware type: %s (%u)", arphrdtype_to_str(hwtype, "Unknown"),
+                                hwtype);
+            /* XXX seconds since Jan 1 2000 */
+            proto_tree_add_text(subtree, tvb, off + 4, 4,
+                                "Time: %u", tvb_get_ntohl(tvb, off + 4));
+            if (optlen > 8) {
+                proto_tree_add_text(subtree, tvb, off + 8,
+                                    optlen - 8, "Link-layer address: %s",
+                                    arphrdaddr_to_str(tvb_get_ptr(tvb, off+8, optlen-8), optlen-8, hwtype));
+            }
+            break;
+        case DUID_EN:
+            if (optlen < 6) {
+                proto_tree_add_text(subtree, tvb, off,
+                                    optlen, "DUID: malformed option");
+                break;
+            }
+            proto_tree_add_item(subtree, hf_duiden_enterprise, tvb, off + 2, 4, FALSE);
+            if (optlen > 6) {
+                buf = tvb_bytes_to_str(tvb, off + 6, optlen - 6);
+                proto_tree_add_text(subtree, tvb, off + 6,
+                                    optlen - 6, "identifier: %s", buf);
+            }
+            break;
+        case DUID_LL:
+        case DUID_LL_OLD:
+            if (optlen < 4) {
+                proto_tree_add_text(subtree, tvb, off,
+                                    optlen, "DUID: malformed option");
+                break;
+            }
+            hwtype=tvb_get_ntohs(tvb, off + 2);
+            proto_tree_add_text(subtree, tvb, off + 2, 2,
+                                "Hardware type: %s (%u)",
+                                arphrdtype_to_str(hwtype, "Unknown"),
+                                hwtype);
+            if (optlen > 4) {
+                proto_tree_add_text(subtree, tvb, off + 4,
+                                    optlen - 4, "Link-layer address: %s",
+                                    arphrdaddr_to_str(tvb_get_ptr(tvb, off+4, optlen-4), optlen-4, hwtype));
+            }
+            break;
+        }
+        break;
+    case OPTION_IA_NA:
+    case OPTION_IA_PD:
+        if (optlen < 12) {
+            if (opttype == OPTION_IA_NA)
                 proto_tree_add_text(subtree, tvb, off,
                                     optlen, "IA_NA: malformed option");
-             else
+            else
                 proto_tree_add_text(subtree, tvb, off,
                                     optlen, "IA_PD: malformed option");
-             break;
-         }
-         proto_tree_add_text(subtree, tvb, off, 4,
-                             "IAID: %u",
-                             tvb_get_ntohl(tvb, off));
-         if (tvb_get_ntohl(tvb, off+4) == DHCPV6_LEASEDURATION_INFINITY) {
-             proto_tree_add_text(subtree, tvb, off+4, 4,
-                                 "T1: infinity");
-         } else {
-             proto_tree_add_text(subtree, tvb, off+4, 4,
-                                 "T1: %u", tvb_get_ntohl(tvb, off+4));
-         }
-
-         if (tvb_get_ntohl(tvb, off+8) == DHCPV6_LEASEDURATION_INFINITY) {
-             proto_tree_add_text(subtree, tvb, off+8, 4,
-                                 "T2: infinity");
-         } else {
-             proto_tree_add_text(subtree, tvb, off+8, 4,
-                                 "T2: %u", tvb_get_ntohl(tvb, off+8));
-         }
-
-          temp_optlen = 12;
-         while ((optlen - temp_optlen) > 0) {
-           temp_optlen += dhcpv6_option(tvb, pinfo, subtree, downstream,
-                           off+temp_optlen, off + optlen, at_end);
-           if (*at_end) {
-             /* Bad option - just skip to the end */
-             temp_optlen = optlen;
-           }
-         }
-         break;
-       case OPTION_IA_TA:
-         if (optlen < 4) {
-           proto_tree_add_text(subtree, tvb, off,
-                               optlen, "IA_TA: malformed option");
-           break;
-         }
-         proto_tree_add_text(subtree, tvb, off, 4,
-                             "IAID: %u",
-                             tvb_get_ntohl(tvb, off));
-          temp_optlen = 4;
-         while ((optlen - temp_optlen) > 0) {
-           temp_optlen += dhcpv6_option(tvb, pinfo, subtree, downstream,
-                           off+temp_optlen, off + optlen, at_end);
-           if (*at_end) {
-             /* Bad option - just skip to the end */
-             temp_optlen = optlen;
-           }
-         }
-         break;
-       case OPTION_IAADDR:
-        {
-           guint32 preferred_lifetime, valid_lifetime;
-
-           if (optlen < 24) {
-              proto_tree_add_text(subtree, tvb, off,
-                                  optlen, "IAADDR: malformed option");
-              break;
-           }
-           tvb_get_ipv6(tvb, off, &in6);
-           proto_tree_add_text(subtree, tvb, off,
-                               sizeof(in6), "IPv6 address: %s",
-                               ip6_to_str(&in6));
-           col_append_fstr(pinfo->cinfo, COL_INFO, "IAA: %s ", ip6_to_str(&in6));
-          proto_item_append_text(ti, ":  %s", ip6_to_str(&in6));
-           
-           preferred_lifetime = tvb_get_ntohl(tvb, off + 16);
-           valid_lifetime = tvb_get_ntohl(tvb, off + 20);
-           
-           if (preferred_lifetime == DHCPV6_LEASEDURATION_INFINITY) {
-              proto_tree_add_text(subtree, tvb, off + 16, 4,
-                                  "Preferred lifetime: infinity");
-           } else {
-              proto_tree_add_text(subtree, tvb, off + 16, 4,
-                                  "Preferred lifetime: %u", preferred_lifetime);
-           }
-           if (valid_lifetime == DHCPV6_LEASEDURATION_INFINITY) {
-              proto_tree_add_text(subtree, tvb, off + 20, 4,
-                                  "Valid lifetime: infinity");
-           } else {
-              proto_tree_add_text(subtree, tvb, off + 20, 4,
-                                  "Valid lifetime: %u", valid_lifetime);
-           }
-           
-           temp_optlen = 24;
-           while ((optlen - temp_optlen) > 0) {
-              temp_optlen += dhcpv6_option(tvb, pinfo, subtree, downstream,
-                             off+temp_optlen, off + optlen, at_end);
-              if (*at_end) {
+            break;
+        }
+        proto_tree_add_text(subtree, tvb, off, 4,
+                            "IAID: %u",
+                            tvb_get_ntohl(tvb, off));
+        if (tvb_get_ntohl(tvb, off+4) == DHCPV6_LEASEDURATION_INFINITY) {
+            proto_tree_add_text(subtree, tvb, off+4, 4,
+                                "T1: infinity");
+        } else {
+            proto_tree_add_text(subtree, tvb, off+4, 4,
+                                "T1: %u", tvb_get_ntohl(tvb, off+4));
+        }
+
+        if (tvb_get_ntohl(tvb, off+8) == DHCPV6_LEASEDURATION_INFINITY) {
+            proto_tree_add_text(subtree, tvb, off+8, 4,
+                                "T2: infinity");
+        } else {
+            proto_tree_add_text(subtree, tvb, off+8, 4,
+                                "T2: %u", tvb_get_ntohl(tvb, off+8));
+        }
+
+        temp_optlen = 12;
+        while ((optlen - temp_optlen) > 0) {
+            temp_optlen += dhcpv6_option(tvb, pinfo, subtree, downstream,
+                                         off+temp_optlen, off + optlen, at_end);
+            if (*at_end) {
                 /* Bad option - just skip to the end */
                 temp_optlen = optlen;
-              }
-           }
+            }
         }
         break;
-       case OPTION_ORO:
-       case OPTION_ERO:
-               for (i = 0; i < optlen; i += 2) {
-                   guint16 requested_opt_code;
-                   requested_opt_code = tvb_get_ntohs(tvb, off + i);
-                   proto_tree_add_text(subtree, tvb, off + i,
-                           2, "Requested Option code: %s (%d)",
-                                           val_to_str(requested_opt_code,
-                                                      opttype_vals,
-                                                      "Unknown"),
-                                           requested_opt_code);
-               }
-               break;
-       case OPTION_PREFERENCE:
-         if (optlen != 1) {
-           proto_tree_add_text(subtree, tvb, off,
-                               optlen, "PREFERENCE: malformed option");
-           break;
-         }
-         proto_tree_add_text(subtree, tvb, off, 1,
-                             "pref-value: %d",
-                             (guint32)tvb_get_guint8(tvb, off));
-         break;
-       case OPTION_ELAPSED_TIME:
-         if (optlen != 2) {
-           proto_tree_add_text(subtree, tvb, off,
-                               optlen, "ELAPSED-TIME: malformed option");
-           break;
-         }
-         proto_tree_add_text(subtree, tvb, off, 2,
-                             "elapsed-time: %u ms",
-                             10*(guint32)tvb_get_ntohs(tvb, off));
-         break;
-       case OPTION_RELAY_MSG:
-         if (optlen == 0) {
-           proto_tree_add_text(subtree, tvb, off,
-                               optlen, "RELAY-MSG: malformed option");
-         } else {
-           /* here, we should dissect a full DHCP message */
-           dissect_dhcpv6(tvb, pinfo, subtree, downstream, off, off + optlen);
-          } 
-         break;
-       case OPTION_AUTH:
-         if (optlen < 11) {
-           proto_tree_add_text(subtree, tvb, off,
-                               optlen, "AUTH: malformed option");
-           break;
-         }
-         proto_tree_add_text(subtree, tvb, off, 1,
-                             "Protocol: %d",
-                             (guint32)tvb_get_guint8(tvb, off));
-         proto_tree_add_text(subtree, tvb, off+1, 1,
-                             "Algorithm: %d",
-                             (guint32)tvb_get_guint8(tvb, off+1));
-         proto_tree_add_text(subtree, tvb, off+2, 1,
-                             "RDM: %d",
-                             (guint32)tvb_get_guint8(tvb, off+2));
-         proto_tree_add_text(subtree, tvb, off+3, 8,
-                             "Replay Detection");
-         if (optlen != 11)
-               proto_tree_add_text(subtree, tvb, off+11, optlen-11,
-                                                       "Authentication Information");
-         break;
-       case OPTION_UNICAST:
-         if (optlen != 16) {
-           proto_tree_add_text(subtree, tvb, off,
-                               optlen, "UNICAST: malformed option");
-           break;
-         }
-         tvb_get_ipv6(tvb, off, &in6);
-         proto_tree_add_text(subtree, tvb, off,
-                             sizeof(in6), "IPv6 address: %s",
-                               ip6_to_str(&in6));
-         break;
-       case OPTION_STATUS_CODE:
-           {
-               guint16 status_code;
-               char *status_message = 0;
-               status_code = tvb_get_ntohs(tvb, off);
-               proto_tree_add_text(subtree, tvb, off, 2,
-                                   "Status Code: %s (%d)",
-                                   val_to_str(status_code, statuscode_vals,
-                                              "Unknown"),
-                                   status_code);
-
-               if (optlen - 2 > 0) {
-                   status_message = tvb_get_ephemeral_string(tvb, off + 2, optlen - 2);
-                   proto_tree_add_text(subtree, tvb, off + 2, optlen - 2,
-                                       "Status Message: %s",
-                                       status_message);
-               }
-           }
-           break;
-       case OPTION_VENDOR_CLASS:
-         if (optlen < 4) {
-           proto_tree_add_text(subtree, tvb, off,
-                               optlen, "VENDOR_CLASS: malformed option");
-           break;
-         }
-         proto_tree_add_item(subtree, hf_vendorclass_enterprise, tvb, off, 4, FALSE);
-         if (optlen > 4) {
-           buf = tvb_bytes_to_str(tvb, off + 4, optlen - 4);
-           proto_tree_add_text(subtree, tvb, off+4, optlen-4,
-                               "vendor-class-data: %s", buf);
-         }
-         break;
-       case OPTION_VENDOR_OPTS:
-         if (optlen < 4) {
-           proto_tree_add_text(subtree, tvb, off,
-                               optlen, "VENDOR_OPTS: malformed option");
-           break;
-         }
-
-         enterprise_no = tvb_get_ntohl(tvb, off);
-         proto_tree_add_item(subtree, hf_vendoropts_enterprise, tvb, off, 4, FALSE);
-         
-         if (optlen >= 4) {
-                               if (enterprise_no == 4491) {
-                                               dissect_cablelabs_specific_opts(subtree, tvb, off+4, optlen-4);
-               } else {
-                               int optoffset = 0;
-
-               while((optlen - 4 - optoffset) > 0)  {
-                                                               int olen = tvb_get_ntohs(tvb, off + optoffset + 6);
-                                                               ti = proto_tree_add_text(subtree, tvb, off + optoffset + 4, 
-                                                                                                               4 + olen, "option");
-                                                               subtree_2 = proto_item_add_subtree(ti, ett_dhcpv6_option_vsoption);
-
-                                                               proto_tree_add_text(subtree_2, tvb, off + optoffset + 4, 2, 
-                                                                                                       "option code: %u", tvb_get_ntohs(tvb, off + optoffset + 4));
-                                                               proto_tree_add_text(subtree_2, tvb, off + optoffset + 6, 2, 
-                                                                                                       "option length: %u", olen);
-                                                               proto_tree_add_text(subtree_2, tvb, off + optoffset + 8, olen, 
-                                                                                                       "option-data");
-                                                               optoffset += (4 + olen);
-                                               }
-                               }
-         }
-         break;
-       case OPTION_INTERFACE_ID:
-         if (optlen == 0) {
-           proto_tree_add_text(subtree, tvb, off,
-                               optlen, "INTERFACE_ID: malformed option");
-           break;
-         }
-         buf = tvb_get_ephemeral_string(tvb, off, optlen);
-         proto_tree_add_text(subtree, tvb, off, optlen, "Interface-ID: %s", buf);
-         break;
-       case OPTION_RECONF_MSG:
-         if (optlen != 1) {
-           proto_tree_add_text(subtree, tvb, off,
-                               optlen, "RECONF_MSG: malformed option");
-           break;
-         }
-         proto_tree_add_text(subtree, tvb, off, optlen,
-                             "Reconfigure-type: %s",
-                             val_to_str(tvb_get_guint8(tvb, off),
-                                        msgtype_vals,
-                                        "Message Type %u"));
-         break;
-       case OPTION_SIP_SERVER_D:
-               if (optlen > 0) {
-                       proto_tree_add_text(subtree, tvb, off, optlen,
-                               "SIP Servers Domain Search List");
-               }
-               dhcpv6_domain(subtree,tvb, off, optlen);
-               break;
-       case OPTION_SIP_SERVER_A:
-               if (optlen % 16) {
-                       proto_tree_add_text(subtree, tvb, off, optlen,
-                               "SIP servers address: malformed option");
-                       break;
-               }
-               for (i = 0; i < optlen; i += 16) {
-                       tvb_get_ipv6(tvb, off + i, &in6);
-                       proto_tree_add_text(subtree, tvb, off + i,
-                               sizeof(in6), "SIP servers address: %s",
-                               ip6_to_str(&in6));
-               }
-               break;
-       case OPTION_DNS_SERVERS:
-               if (optlen % 16) {
-                       proto_tree_add_text(subtree, tvb, off, optlen,
-                               "DNS servers address: malformed option");
-                       break;
-               }
-               for (i = 0; i < optlen; i += 16) {
-                       tvb_get_ipv6(tvb, off + i, &in6);
-                       proto_tree_add_text(subtree, tvb, off + i,
-                               sizeof(in6), "DNS servers address: %s",
-                               ip6_to_str(&in6));
-               }
-               break;
-       case OPTION_DOMAIN_LIST:
-         if (optlen > 0) {
-           proto_tree_add_text(subtree, tvb, off, optlen, "DNS Domain Search List");
-         }
-         dhcpv6_domain(subtree,tvb, off, optlen);
-         break;
-       case OPTION_NIS_SERVERS:
-               if (optlen % 16) {
-                       proto_tree_add_text(subtree, tvb, off, optlen,
-                               "NIS servers address: malformed option");
-                       break;
-               }
-               for (i = 0; i < optlen; i += 16) {
-                       tvb_get_ipv6(tvb, off + i, &in6);
-                       proto_tree_add_text(subtree, tvb, off + i,
-                               sizeof(in6), "NIS servers address: %s",
-                               ip6_to_str(&in6));
-               }
-               break;
-       case OPTION_NISP_SERVERS:
-               if (optlen % 16) {
-                       proto_tree_add_text(subtree, tvb, off, optlen,
-                               "NISP servers address: malformed option");
-                       break;
-               }
-               for (i = 0; i < optlen; i += 16) {
-                       tvb_get_ipv6(tvb, off + i, &in6);
-                       proto_tree_add_text(subtree, tvb, off + i,
-                               sizeof(in6), "NISP servers address: %s",
-                               ip6_to_str(&in6));
-               }
-               break;
-       case OPTION_NIS_DOMAIN_NAME:
-         if (optlen > 0) {
-           proto_tree_add_text(subtree, tvb, off, optlen, "nis-domain-name");
-         }
-         dhcpv6_domain(subtree,tvb, off, optlen);
-         break;
-       case OPTION_NISP_DOMAIN_NAME:
-         if (optlen > 0) {
-           proto_tree_add_text(subtree, tvb, off, optlen, "nisp-domain-name");
-         }
-         dhcpv6_domain(subtree,tvb, off, optlen);
-         break;
-       case OPTION_SNTP_SERVERS:
-               if (optlen % 16) {
-                       proto_tree_add_text(subtree, tvb, off, optlen,
-                               "SNTP servers address: malformed option");
-                       break;
-               }
-               for (i = 0; i < optlen; i += 16) {
-                       tvb_get_ipv6(tvb, off + i, &in6);
-                       proto_tree_add_text(subtree, tvb, off + i,
-                               sizeof(in6), "SNTP servers address: %s",
-                               ip6_to_str(&in6));
-               }
-               break;
-       case OPTION_LIFETIME:
-         if (optlen != 4) {
-           proto_tree_add_text(subtree, tvb, off,
-                               optlen, "LIFETIME: malformed option");
-           break;
-         }
-         proto_tree_add_text(subtree, tvb, off, 4,
-                             "Lifetime: %d",
-                             (guint32)tvb_get_ntohl(tvb, off));
-         break;
-       case OPTION_BCMCS_SERVER_D:
-               if (optlen > 0) {
-                       proto_tree_add_text(subtree, tvb, off, optlen,
-                               "BCMCS Servers Domain Search List");
-               }
-               dhcpv6_domain(subtree,tvb, off, optlen);
-               break;
-       case OPTION_BCMCS_SERVER_A:
-               if (optlen % 16) {
-                       proto_tree_add_text(subtree, tvb, off, optlen,
-                               "BCMCS servers address: malformed option");
-                       break;
-               }
-               for (i = 0; i < optlen; i += 16) {
-                       tvb_get_ipv6(tvb, off + i, &in6);
-                       proto_tree_add_text(subtree, tvb, off + i,
-                               sizeof(in6), "BCMCS servers address: %s",
-                               ip6_to_str(&in6));
-               }
-               break;
-       case OPTION_REMOTE_ID:
-         if (optlen < 4) {
-           proto_tree_add_text(subtree, tvb, off,
-                               optlen, "REMOTE_ID: malformed option");
-           break;
-         }
-         proto_tree_add_item(subtree, hf_remoteid_enterprise, tvb, off, 4, FALSE);
-         off += 4;
-         optlen -= 4;
-         buf = tvb_bytes_to_str(tvb, off, optlen);
-         proto_tree_add_text(subtree, tvb, off, optlen, "Remote-ID: %s", buf);
-         break;
-       case OPTION_SUBSCRIBER_ID:
-         if (optlen == 0) {
-           proto_tree_add_text(subtree, tvb, off,
-                               optlen, "SUBSCRIBER_ID: malformed option");
-           break;
-         }
-         buf = tvb_get_ephemeral_string(tvb, off, optlen);
-         proto_tree_add_text(subtree, tvb, off, optlen, "Subscriber-ID: %s", buf);
-         break;
-       case OPTION_CLIENT_FQDN:
-         if (optlen < 1) {
-           proto_tree_add_text(subtree, tvb, off,
-                               optlen, "FQDN: malformed option");
-         } else {
-           /*
-            * +-----+-+-+-+
-            * | MBZ |N|O|S|
-            * +-----+-+-+-+
-            */
-           proto_tree_add_item(subtree, hf_clientfqdn_reserved, tvb, off, 1, FALSE);
-           proto_tree_add_item(subtree, hf_clientfqdn_n, tvb, off, 1, FALSE);
-           proto_tree_add_item(subtree, hf_clientfqdn_o, tvb, off, 1, FALSE);
-           proto_tree_add_item(subtree, hf_clientfqdn_s, tvb, off, 1, FALSE);
+    case OPTION_IA_TA:
+        if (optlen < 4) {
+            proto_tree_add_text(subtree, tvb, off,
+                                optlen, "IA_TA: malformed option");
+            break;
+        }
+        proto_tree_add_text(subtree, tvb, off, 4,
+                            "IAID: %u",
+                            tvb_get_ntohl(tvb, off));
+        temp_optlen = 4;
+        while ((optlen - temp_optlen) > 0) {
+            temp_optlen += dhcpv6_option(tvb, pinfo, subtree, downstream,
+                                         off+temp_optlen, off + optlen, at_end);
+            if (*at_end) {
+                /* Bad option - just skip to the end */
+                temp_optlen = optlen;
+            }
+        }
+        break;
+    case OPTION_IAADDR:
+    {
+        guint32 preferred_lifetime, valid_lifetime;
+
+        if (optlen < 24) {
+            proto_tree_add_text(subtree, tvb, off,
+                                optlen, "IAADDR: malformed option");
+            break;
+        }
+        tvb_get_ipv6(tvb, off, &in6);
+        proto_tree_add_text(subtree, tvb, off,
+                            sizeof(in6), "IPv6 address: %s",
+                            ip6_to_str(&in6));
+        col_append_fstr(pinfo->cinfo, COL_INFO, "IAA: %s ", ip6_to_str(&in6));
+        proto_item_append_text(ti, ":  %s", ip6_to_str(&in6));
+
+        preferred_lifetime = tvb_get_ntohl(tvb, off + 16);
+        valid_lifetime = tvb_get_ntohl(tvb, off + 20);
+
+        if (preferred_lifetime == DHCPV6_LEASEDURATION_INFINITY) {
+            proto_tree_add_text(subtree, tvb, off + 16, 4,
+                                "Preferred lifetime: infinity");
+        } else {
+            proto_tree_add_text(subtree, tvb, off + 16, 4,
+                                "Preferred lifetime: %u", preferred_lifetime);
+        }
+        if (valid_lifetime == DHCPV6_LEASEDURATION_INFINITY) {
+            proto_tree_add_text(subtree, tvb, off + 20, 4,
+                                "Valid lifetime: infinity");
+        } else {
+            proto_tree_add_text(subtree, tvb, off + 20, 4,
+                                "Valid lifetime: %u", valid_lifetime);
+        }
+
+        temp_optlen = 24;
+        while ((optlen - temp_optlen) > 0) {
+            temp_optlen += dhcpv6_option(tvb, pinfo, subtree, downstream,
+                                         off+temp_optlen, off + optlen, at_end);
+            if (*at_end) {
+                /* Bad option - just skip to the end */
+                temp_optlen = optlen;
+            }
+        }
+    }
+    break;
+    case OPTION_ORO:
+    case OPTION_ERO:
+        for (i = 0; i < optlen; i += 2) {
+            guint16 requested_opt_code;
+            requested_opt_code = tvb_get_ntohs(tvb, off + i);
+            proto_tree_add_text(subtree, tvb, off + i,
+                                2, "Requested Option code: %s (%d)",
+                                val_to_str(requested_opt_code,
+                                           opttype_vals,
+                                           "Unknown"),
+                                requested_opt_code);
+        }
+        break;
+    case OPTION_PREFERENCE:
+        if (optlen != 1) {
+            proto_tree_add_text(subtree, tvb, off,
+                                optlen, "PREFERENCE: malformed option");
+            break;
+        }
+        proto_tree_add_text(subtree, tvb, off, 1,
+                            "pref-value: %d",
+                            (guint32)tvb_get_guint8(tvb, off));
+        break;
+    case OPTION_ELAPSED_TIME:
+        if (optlen != 2) {
+            proto_tree_add_text(subtree, tvb, off,
+                                optlen, "ELAPSED-TIME: malformed option");
+            break;
+        }
+        proto_tree_add_text(subtree, tvb, off, 2,
+                            "elapsed-time: %u ms",
+                            10*(guint32)tvb_get_ntohs(tvb, off));
+        break;
+    case OPTION_RELAY_MSG:
+        if (optlen == 0) {
+            proto_tree_add_text(subtree, tvb, off,
+                                optlen, "RELAY-MSG: malformed option");
+        } else {
+            /* here, we should dissect a full DHCP message */
+            dissect_dhcpv6(tvb, pinfo, subtree, downstream, off, off + optlen);
+        }
+        break;
+    case OPTION_AUTH:
+        if (optlen < 11) {
+            proto_tree_add_text(subtree, tvb, off,
+                                optlen, "AUTH: malformed option");
+            break;
+        }
+        proto_tree_add_text(subtree, tvb, off, 1,
+                            "Protocol: %d",
+                            (guint32)tvb_get_guint8(tvb, off));
+        proto_tree_add_text(subtree, tvb, off+1, 1,
+                            "Algorithm: %d",
+                            (guint32)tvb_get_guint8(tvb, off+1));
+        proto_tree_add_text(subtree, tvb, off+2, 1,
+                            "RDM: %d",
+                            (guint32)tvb_get_guint8(tvb, off+2));
+        proto_tree_add_text(subtree, tvb, off+3, 8,
+                            "Replay Detection");
+        if (optlen != 11)
+            proto_tree_add_text(subtree, tvb, off+11, optlen-11,
+                                "Authentication Information");
+        break;
+    case OPTION_UNICAST:
+        if (optlen != 16) {
+            proto_tree_add_text(subtree, tvb, off,
+                                optlen, "UNICAST: malformed option");
+            break;
+        }
+        tvb_get_ipv6(tvb, off, &in6);
+        proto_tree_add_text(subtree, tvb, off,
+                            sizeof(in6), "IPv6 address: %s",
+                            ip6_to_str(&in6));
+        break;
+    case OPTION_STATUS_CODE:
+    {
+        guint16 status_code;
+        char *status_message = 0;
+        status_code = tvb_get_ntohs(tvb, off);
+        proto_tree_add_text(subtree, tvb, off, 2,
+                            "Status Code: %s (%d)",
+                            val_to_str(status_code, statuscode_vals,
+                                       "Unknown"),
+                            status_code);
+
+        if (optlen - 2 > 0) {
+            status_message = tvb_get_ephemeral_string(tvb, off + 2, optlen - 2);
+            proto_tree_add_text(subtree, tvb, off + 2, optlen - 2,
+                                "Status Message: %s",
+                                status_message);
+        }
+    }
+    break;
+    case OPTION_VENDOR_CLASS:
+        if (optlen < 4) {
+            proto_tree_add_text(subtree, tvb, off,
+                                optlen, "VENDOR_CLASS: malformed option");
+            break;
+        }
+        proto_tree_add_item(subtree, hf_vendorclass_enterprise, tvb, off, 4, FALSE);
+        if (optlen > 4) {
+            buf = tvb_bytes_to_str(tvb, off + 4, optlen - 4);
+            proto_tree_add_text(subtree, tvb, off+4, optlen-4,
+                                "vendor-class-data: %s", buf);
+        }
+        break;
+    case OPTION_VENDOR_OPTS:
+        if (optlen < 4) {
+            proto_tree_add_text(subtree, tvb, off,
+                                optlen, "VENDOR_OPTS: malformed option");
+            break;
+        }
+
+        enterprise_no = tvb_get_ntohl(tvb, off);
+        proto_tree_add_item(subtree, hf_vendoropts_enterprise, tvb, off, 4, FALSE);
+
+        if (optlen >= 4) {
+            if (enterprise_no == 4491) {
+                dissect_cablelabs_specific_opts(subtree, tvb, off+4, optlen-4);
+            } else {
+                int optoffset = 0;
+
+                while((optlen - 4 - optoffset) > 0)  {
+                    int olen = tvb_get_ntohs(tvb, off + optoffset + 6);
+                    ti = proto_tree_add_text(subtree, tvb, off + optoffset + 4,
+                                             4 + olen, "option");
+                    subtree_2 = proto_item_add_subtree(ti, ett_dhcpv6_option_vsoption);
+
+                    proto_tree_add_text(subtree_2, tvb, off + optoffset + 4, 2,
+                                        "option code: %u", tvb_get_ntohs(tvb, off + optoffset + 4));
+                    proto_tree_add_text(subtree_2, tvb, off + optoffset + 6, 2,
+                                        "option length: %u", olen);
+                    proto_tree_add_text(subtree_2, tvb, off + optoffset + 8, olen,
+                                        "option-data");
+                    optoffset += (4 + olen);
+                }
+            }
+        }
+        break;
+    case OPTION_INTERFACE_ID:
+        if (optlen == 0) {
+            proto_tree_add_text(subtree, tvb, off,
+                                optlen, "INTERFACE_ID: malformed option");
+            break;
+        }
+        buf = tvb_get_ephemeral_string(tvb, off, optlen);
+        proto_tree_add_text(subtree, tvb, off, optlen, "Interface-ID: %s", buf);
+        break;
+    case OPTION_RECONF_MSG:
+        if (optlen != 1) {
+            proto_tree_add_text(subtree, tvb, off,
+                                optlen, "RECONF_MSG: malformed option");
+            break;
+        }
+        proto_tree_add_text(subtree, tvb, off, optlen,
+                            "Reconfigure-type: %s",
+                            val_to_str(tvb_get_guint8(tvb, off),
+                                       msgtype_vals,
+                                       "Message Type %u"));
+        break;
+    case OPTION_SIP_SERVER_D:
+        if (optlen > 0) {
+            proto_tree_add_text(subtree, tvb, off, optlen,
+                                "SIP Servers Domain Search List");
+        }
+        dhcpv6_domain(subtree,tvb, off, optlen);
+        break;
+    case OPTION_SIP_SERVER_A:
+        if (optlen % 16) {
+            proto_tree_add_text(subtree, tvb, off, optlen,
+                                "SIP servers address: malformed option");
+            break;
+        }
+        for (i = 0; i < optlen; i += 16) {
+            tvb_get_ipv6(tvb, off + i, &in6);
+            proto_tree_add_text(subtree, tvb, off + i,
+                                sizeof(in6), "SIP servers address: %s",
+                                ip6_to_str(&in6));
+        }
+        break;
+    case OPTION_DNS_SERVERS:
+        if (optlen % 16) {
+            proto_tree_add_text(subtree, tvb, off, optlen,
+                                "DNS servers address: malformed option");
+            break;
+        }
+        for (i = 0; i < optlen; i += 16) {
+            tvb_get_ipv6(tvb, off + i, &in6);
+            proto_tree_add_text(subtree, tvb, off + i,
+                                sizeof(in6), "DNS servers address: %s",
+                                ip6_to_str(&in6));
+        }
+        break;
+    case OPTION_DOMAIN_LIST:
+        if (optlen > 0) {
+            proto_tree_add_text(subtree, tvb, off, optlen, "DNS Domain Search List");
+        }
+        dhcpv6_domain(subtree,tvb, off, optlen);
+        break;
+    case OPTION_NIS_SERVERS:
+        if (optlen % 16) {
+            proto_tree_add_text(subtree, tvb, off, optlen,
+                                "NIS servers address: malformed option");
+            break;
+        }
+        for (i = 0; i < optlen; i += 16) {
+            tvb_get_ipv6(tvb, off + i, &in6);
+            proto_tree_add_text(subtree, tvb, off + i,
+                                sizeof(in6), "NIS servers address: %s",
+                                ip6_to_str(&in6));
+        }
+        break;
+    case OPTION_NISP_SERVERS:
+        if (optlen % 16) {
+            proto_tree_add_text(subtree, tvb, off, optlen,
+                                "NISP servers address: malformed option");
+            break;
+        }
+        for (i = 0; i < optlen; i += 16) {
+            tvb_get_ipv6(tvb, off + i, &in6);
+            proto_tree_add_text(subtree, tvb, off + i,
+                                sizeof(in6), "NISP servers address: %s",
+                                ip6_to_str(&in6));
+        }
+        break;
+    case OPTION_NIS_DOMAIN_NAME:
+        if (optlen > 0) {
+            proto_tree_add_text(subtree, tvb, off, optlen, "nis-domain-name");
+        }
+        dhcpv6_domain(subtree,tvb, off, optlen);
+        break;
+    case OPTION_NISP_DOMAIN_NAME:
+        if (optlen > 0) {
+            proto_tree_add_text(subtree, tvb, off, optlen, "nisp-domain-name");
+        }
+        dhcpv6_domain(subtree,tvb, off, optlen);
+        break;
+    case OPTION_SNTP_SERVERS:
+        if (optlen % 16) {
+            proto_tree_add_text(subtree, tvb, off, optlen,
+                                "SNTP servers address: malformed option");
+            break;
+        }
+        for (i = 0; i < optlen; i += 16) {
+            tvb_get_ipv6(tvb, off + i, &in6);
+            proto_tree_add_text(subtree, tvb, off + i,
+                                sizeof(in6), "SNTP servers address: %s",
+                                ip6_to_str(&in6));
+        }
+        break;
+    case OPTION_LIFETIME:
+        if (optlen != 4) {
+            proto_tree_add_text(subtree, tvb, off,
+                                optlen, "LIFETIME: malformed option");
+            break;
+        }
+        proto_tree_add_text(subtree, tvb, off, 4,
+                            "Lifetime: %d",
+                            (guint32)tvb_get_ntohl(tvb, off));
+        break;
+    case OPTION_BCMCS_SERVER_D:
+        if (optlen > 0) {
+            proto_tree_add_text(subtree, tvb, off, optlen,
+                                "BCMCS Servers Domain Search List");
+        }
+        dhcpv6_domain(subtree,tvb, off, optlen);
+        break;
+    case OPTION_BCMCS_SERVER_A:
+        if (optlen % 16) {
+            proto_tree_add_text(subtree, tvb, off, optlen,
+                                "BCMCS servers address: malformed option");
+            break;
+        }
+        for (i = 0; i < optlen; i += 16) {
+            tvb_get_ipv6(tvb, off + i, &in6);
+            proto_tree_add_text(subtree, tvb, off + i,
+                                sizeof(in6), "BCMCS servers address: %s",
+                                ip6_to_str(&in6));
+        }
+        break;
+    case OPTION_REMOTE_ID:
+        if (optlen < 4) {
+            proto_tree_add_text(subtree, tvb, off,
+                                optlen, "REMOTE_ID: malformed option");
+            break;
+        }
+        proto_tree_add_item(subtree, hf_remoteid_enterprise, tvb, off, 4, FALSE);
+        off += 4;
+        optlen -= 4;
+        buf = tvb_bytes_to_str(tvb, off, optlen);
+        proto_tree_add_text(subtree, tvb, off, optlen, "Remote-ID: %s", buf);
+        break;
+    case OPTION_SUBSCRIBER_ID:
+        if (optlen == 0) {
+            proto_tree_add_text(subtree, tvb, off,
+                                optlen, "SUBSCRIBER_ID: malformed option");
+            break;
+        }
+        buf = tvb_get_ephemeral_string(tvb, off, optlen);
+        proto_tree_add_text(subtree, tvb, off, optlen, "Subscriber-ID: %s", buf);
+        break;
+    case OPTION_CLIENT_FQDN:
+        if (optlen < 1) {
+            proto_tree_add_text(subtree, tvb, off,
+                                optlen, "FQDN: malformed option");
+        } else {
+            /*
+             * +-----+-+-+-+
+             * | MBZ |N|O|S|
+             * +-----+-+-+-+
+             */
+            proto_tree_add_item(subtree, hf_clientfqdn_reserved, tvb, off, 1, FALSE);
+            proto_tree_add_item(subtree, hf_clientfqdn_n, tvb, off, 1, FALSE);
+            proto_tree_add_item(subtree, hf_clientfqdn_o, tvb, off, 1, FALSE);
+            proto_tree_add_item(subtree, hf_clientfqdn_s, tvb, off, 1, FALSE);
 #if 0
-           proto_tree_add_text(subtree, tvb, off, 1,
-                             "flags: %d",
-                             (guint32)tvb_get_guint8(tvb, off));
+            proto_tree_add_text(subtree, tvb, off, 1,
+                                "flags: %d",
+                                (guint32)tvb_get_guint8(tvb, off));
 #endif
-           dhcpv6_domain(subtree, tvb, off + 1, optlen - 1);
-         }
-         break;
-       case OPTION_PANA_AGENT:
-               if (optlen % 16) {
-                       proto_tree_add_text(subtree, tvb, off, optlen,
-                               "PANA agent address: malformed option");
-                       break;
-               }
-               for (i = 0; i < optlen; i += 16) {
-                       tvb_get_ipv6(tvb, off + i, &in6);
-                       proto_tree_add_text(subtree, tvb, off + i,
-                               sizeof(in6), "PANA agents address: %s",
-                               ip6_to_str(&in6));
-               }
-               break;
-       case OPTION_TIME_ZONE:
-         if (optlen > 0) {
-             buf = tvb_get_ephemeral_string(tvb, off, optlen);
-             proto_tree_add_text(subtree, tvb, off, optlen, "time-zone: %s", buf);
-         }
-         break;
-       case OPTION_TZDB:
-         if (optlen > 0) {
-             buf = tvb_get_ephemeral_string(tvb, off, optlen);
-             proto_tree_add_text(subtree, tvb, off, optlen, "tz-database: %s", buf);
-         }
-         break;
-       case OPTION_LQ_QUERY:
-           {
-               guint8 query_type;
-               struct e_in6_addr in6_local;
-
-               if (optlen < 17) {
-                   proto_tree_add_text(subtree, tvb, off, optlen,
-                                       "LQ-QUERY: malformed option");
-                   break;
-               }
-               query_type = tvb_get_guint8(tvb, off);
-               switch (query_type) {
-               case 1:
-                    proto_tree_add_text(subtree, tvb, off, 1,
-                                        "Query-type: %s (%u)",
-                                        "by-address", query_type);
-                    break;
-               case 2:
-                    proto_tree_add_text(subtree, tvb, off, 1,
-                                        "Query-type: %s (%u)",
-                                        "by-clientID", query_type);
-                    break;
-               default:
-                    proto_tree_add_text(subtree, tvb, off, 1,
-                                        "Query-type: %s (%u)",
-                                        "unknown?", query_type);
-                    break;
-               }
-               tvb_get_ipv6(tvb, off + 1, &in6_local);
-               proto_tree_add_text(subtree, tvb, off + 1, 16,
-                                   "Link address: %s", ip6_to_str(&in6_local));
-               temp_optlen = 17;
-               while ((optlen - temp_optlen) > 0) {
-                   temp_optlen += dhcpv6_option(tvb, pinfo, subtree,
-                                       downstream, off + temp_optlen,
-                                       off + optlen, at_end);
-                   if (*at_end) {
-                       /* Bad option - just skip to the end */
-                       temp_optlen = optlen;
-                   }
-               }
-           }
-           break;
-       case OPTION_CLIENT_DATA:
-           temp_optlen = 0;
-           while ((optlen - temp_optlen) > 0) {
-               temp_optlen += dhcpv6_option(tvb, pinfo, subtree,
-                                            downstream, off + temp_optlen,
-                                            off + optlen, at_end);
-               if (*at_end) {
-                   /* Bad option - just skip to the end */
-                   temp_optlen = optlen;
-               }
-           }
-           break;
-       case OPTION_CLT_TIME:
-           if (optlen != 4) {
-               proto_tree_add_text(subtree, tvb, off, optlen,
-                                   "CLT_TIME: malformed option");
-               break;
-           }
-           proto_tree_add_text(subtree, tvb, off, 4,
-                               "Clt_time: %d",
-                               (guint32)tvb_get_ntohl(tvb, off));
-           break;
-       case OPTION_LQ_RELAY_DATA:
-           if (optlen < 16) {
-               proto_tree_add_text(subtree, tvb, off, optlen,
-                                   "LQ_RELAY_DATA: malformed option");
-               break;
-           }
-           tvb_get_ipv6(tvb, off, &in6);
-           proto_tree_add_text(subtree, tvb, off, 16,
-                               "Peer address: %s", ip6_to_str(&in6));
-           proto_tree_add_text(subtree, tvb, off + 16, optlen - 16,
-                               "DHCPv6 relay message");
-           break;
-       case OPTION_LQ_CLIENT_LINK:
-               if (optlen % 16) {
-                       proto_tree_add_text(subtree, tvb, off, optlen,
-                               "LQ client links address: malformed option");
-                       break;
-               }
-               for (i = 0; i < optlen; i += 16) {
-                       tvb_get_ipv6(tvb, off + i, &in6);
-                       proto_tree_add_text(subtree, tvb, off + i,
-                               sizeof(in6), "LQ client links address: %s",
-                               ip6_to_str(&in6));
-               }
-               break;
-       case OPTION_CAPWAP_AC_V6:
-               if (optlen % 16) {
-                       proto_tree_add_text(subtree, tvb, off, optlen,
-                               "CAPWAP Access Controllers address: malformed option");
-                       break;
-               }
-               for (i = 0; i < optlen; i += 16) {
-                       tvb_get_ipv6(tvb, off + i, &in6);
-                       proto_tree_add_text(subtree, tvb, off + i,
-                               sizeof(in6), "CAPWAP Access Controllers address: %s",
-                               ip6_to_str(&in6));
-               }
-               break;
-       case OPTION_IAPREFIX:
-           {
-               guint32 preferred_lifetime, valid_lifetime;
-               guint8  prefix_length;
-               struct e_in6_addr in6_local;
-
-                if (optlen < 25) {
-                   proto_tree_add_text(subtree, tvb, off,
-                                       optlen, "IAPREFIX: malformed option");
-                   break;
-                }
+            dhcpv6_domain(subtree, tvb, off + 1, optlen - 1);
+        }
+        break;
+    case OPTION_PANA_AGENT:
+        if (optlen % 16) {
+            proto_tree_add_text(subtree, tvb, off, optlen,
+                                "PANA agent address: malformed option");
+            break;
+        }
+        for (i = 0; i < optlen; i += 16) {
+            tvb_get_ipv6(tvb, off + i, &in6);
+            proto_tree_add_text(subtree, tvb, off + i,
+                                sizeof(in6), "PANA agents address: %s",
+                                ip6_to_str(&in6));
+        }
+        break;
+    case OPTION_TIME_ZONE:
+        if (optlen > 0) {
+            buf = tvb_get_ephemeral_string(tvb, off, optlen);
+            proto_tree_add_text(subtree, tvb, off, optlen, "time-zone: %s", buf);
+        }
+        break;
+    case OPTION_TZDB:
+        if (optlen > 0) {
+            buf = tvb_get_ephemeral_string(tvb, off, optlen);
+            proto_tree_add_text(subtree, tvb, off, optlen, "tz-database: %s", buf);
+        }
+        break;
+    case OPTION_LQ_QUERY:
+    {
+        guint8 query_type;
+        struct e_in6_addr in6_local;
+
+        if (optlen < 17) {
+            proto_tree_add_text(subtree, tvb, off, optlen,
+                                "LQ-QUERY: malformed option");
+            break;
+        }
+        query_type = tvb_get_guint8(tvb, off);
+        switch (query_type) {
+        case 1:
+            proto_tree_add_text(subtree, tvb, off, 1,
+                                "Query-type: %s (%u)",
+                                "by-address", query_type);
+            break;
+        case 2:
+            proto_tree_add_text(subtree, tvb, off, 1,
+                                "Query-type: %s (%u)",
+                                "by-clientID", query_type);
+            break;
+        default:
+            proto_tree_add_text(subtree, tvb, off, 1,
+                                "Query-type: %s (%u)",
+                                "unknown?", query_type);
+            break;
+        }
+        tvb_get_ipv6(tvb, off + 1, &in6_local);
+        proto_tree_add_text(subtree, tvb, off + 1, 16,
+                            "Link address: %s", ip6_to_str(&in6_local));
+        temp_optlen = 17;
+        while ((optlen - temp_optlen) > 0) {
+            temp_optlen += dhcpv6_option(tvb, pinfo, subtree,
+                                         downstream, off + temp_optlen,
+                                         off + optlen, at_end);
+            if (*at_end) {
+                /* Bad option - just skip to the end */
+                temp_optlen = optlen;
+            }
+        }
+    }
+    break;
+    case OPTION_CLIENT_DATA:
+        temp_optlen = 0;
+        while ((optlen - temp_optlen) > 0) {
+            temp_optlen += dhcpv6_option(tvb, pinfo, subtree,
+                                         downstream, off + temp_optlen,
+                                         off + optlen, at_end);
+            if (*at_end) {
+                /* Bad option - just skip to the end */
+                temp_optlen = optlen;
+            }
+        }
+        break;
+    case OPTION_CLT_TIME:
+        if (optlen != 4) {
+            proto_tree_add_text(subtree, tvb, off, optlen,
+                                "CLT_TIME: malformed option");
+            break;
+        }
+        proto_tree_add_text(subtree, tvb, off, 4,
+                            "Clt_time: %d",
+                            (guint32)tvb_get_ntohl(tvb, off));
+        break;
+    case OPTION_LQ_RELAY_DATA:
+        if (optlen < 16) {
+            proto_tree_add_text(subtree, tvb, off, optlen,
+                                "LQ_RELAY_DATA: malformed option");
+            break;
+        }
+        tvb_get_ipv6(tvb, off, &in6);
+        proto_tree_add_text(subtree, tvb, off, 16,
+                            "Peer address: %s", ip6_to_str(&in6));
+        proto_tree_add_text(subtree, tvb, off + 16, optlen - 16,
+                            "DHCPv6 relay message");
+        break;
+    case OPTION_LQ_CLIENT_LINK:
+        if (optlen % 16) {
+            proto_tree_add_text(subtree, tvb, off, optlen,
+                                "LQ client links address: malformed option");
+            break;
+        }
+        for (i = 0; i < optlen; i += 16) {
+            tvb_get_ipv6(tvb, off + i, &in6);
+            proto_tree_add_text(subtree, tvb, off + i,
+                                sizeof(in6), "LQ client links address: %s",
+                                ip6_to_str(&in6));
+        }
+        break;
+    case OPTION_CAPWAP_AC_V6:
+        if (optlen % 16) {
+            proto_tree_add_text(subtree, tvb, off, optlen,
+                                "CAPWAP Access Controllers address: malformed option");
+            break;
+        }
+        for (i = 0; i < optlen; i += 16) {
+            tvb_get_ipv6(tvb, off + i, &in6);
+            proto_tree_add_text(subtree, tvb, off + i,
+                                sizeof(in6), "CAPWAP Access Controllers address: %s",
+                                ip6_to_str(&in6));
+        }
+        break;
+    case OPTION_IAPREFIX:
+    {
+        guint32 preferred_lifetime, valid_lifetime;
+        guint8  prefix_length;
+        struct e_in6_addr in6_local;
+
+        if (optlen < 25) {
+            proto_tree_add_text(subtree, tvb, off,
+                                optlen, "IAPREFIX: malformed option");
+            break;
+        }
 
-               preferred_lifetime = tvb_get_ntohl(tvb, off);
-               valid_lifetime = tvb_get_ntohl(tvb, off + 4);
-               prefix_length  = tvb_get_guint8(tvb, off + 8);
-               if (preferred_lifetime == DHCPV6_LEASEDURATION_INFINITY) {
-                       proto_tree_add_text(subtree, tvb, off, 4,
-                                   "Preferred lifetime: infinity");
-               } else {
-                       proto_tree_add_text(subtree, tvb, off, 4,
-                                   "Preferred lifetime: %u", preferred_lifetime);
-               }
-               if (valid_lifetime == DHCPV6_LEASEDURATION_INFINITY) {
-                       proto_tree_add_text(subtree, tvb, off + 4, 4,
-                                   "Valid lifetime: infinity");
-               } else {
-                       proto_tree_add_text(subtree, tvb, off + 4, 4,
-                                   "Valid lifetime: %u", valid_lifetime);
-               }
-               proto_tree_add_text(subtree, tvb, off + 8, 1,
-                                   "Prefix length: %d", prefix_length);
-               tvb_get_ipv6(tvb, off + 9, &in6_local);
-               proto_tree_add_text(subtree, tvb, off + 9,
-                                   16, "Prefix address: %s",
-                                   ip6_to_str(&in6_local));
-                
-                temp_optlen = 25;
-                while ((optlen - temp_optlen) > 0) {
-                   temp_optlen += dhcpv6_option(tvb, pinfo, subtree, downstream,
-                                  off+temp_optlen, off + optlen, at_end);
-                   if (*at_end) {
-                     /* Bad option - just skip to the end */
-                     temp_optlen = optlen;
-                   }
-                }
-           }
-           break;
-       case OPTION_MIP6_HA:
-               if (optlen != 16) {
-                       proto_tree_add_text(subtree, tvb, off, optlen,
-                               "MIP6_HA: malformed option");
-                       break;
-               }
-
-               tvb_get_ipv6(tvb, off, &in6);
-               proto_tree_add_text(subtree, tvb, off,
-                       16, "Home Agent: %s", ip6_to_str(&in6));
-               break;
-       case OPTION_MIP6_HOA:
-               if (optlen != 16) {
-                       proto_tree_add_text(subtree, tvb, off, optlen,
-                               "MIP6_HOA: malformed option");
-                       break;
-               }
-
-               tvb_get_ipv6(tvb, off, &in6);
-               proto_tree_add_text(subtree, tvb, off,
-                       16, "Home Address: %s", ip6_to_str(&in6));
-               break;
-       case OPTION_NAI:
-               if (optlen < 4) {
-                       proto_tree_add_text(subtree, tvb, off, optlen,
-                               "NAI: malformed option");
-                       break;
-               }
-               proto_tree_add_text(subtree, tvb, off, optlen,
-                       "NAI : %s", tvb_get_ptr(tvb, off, optlen - 2));
-               break;
-       }
-
-       return 4 + optlen;
+        preferred_lifetime = tvb_get_ntohl(tvb, off);
+        valid_lifetime = tvb_get_ntohl(tvb, off + 4);
+        prefix_length  = tvb_get_guint8(tvb, off + 8);
+        if (preferred_lifetime == DHCPV6_LEASEDURATION_INFINITY) {
+            proto_tree_add_text(subtree, tvb, off, 4,
+                                "Preferred lifetime: infinity");
+        } else {
+            proto_tree_add_text(subtree, tvb, off, 4,
+                                "Preferred lifetime: %u", preferred_lifetime);
+        }
+        if (valid_lifetime == DHCPV6_LEASEDURATION_INFINITY) {
+            proto_tree_add_text(subtree, tvb, off + 4, 4,
+                                "Valid lifetime: infinity");
+        } else {
+            proto_tree_add_text(subtree, tvb, off + 4, 4,
+                                "Valid lifetime: %u", valid_lifetime);
+        }
+        proto_tree_add_text(subtree, tvb, off + 8, 1,
+                            "Prefix length: %d", prefix_length);
+        tvb_get_ipv6(tvb, off + 9, &in6_local);
+        proto_tree_add_text(subtree, tvb, off + 9,
+                            16, "Prefix address: %s",
+                            ip6_to_str(&in6_local));
+
+        temp_optlen = 25;
+        while ((optlen - temp_optlen) > 0) {
+            temp_optlen += dhcpv6_option(tvb, pinfo, subtree, downstream,
+                                         off+temp_optlen, off + optlen, at_end);
+            if (*at_end) {
+                /* Bad option - just skip to the end */
+                temp_optlen = optlen;
+            }
+        }
+    }
+    break;
+    case OPTION_MIP6_HA:
+        if (optlen != 16) {
+            proto_tree_add_text(subtree, tvb, off, optlen,
+                                "MIP6_HA: malformed option");
+            break;
+        }
+
+        tvb_get_ipv6(tvb, off, &in6);
+        proto_tree_add_text(subtree, tvb, off,
+                            16, "Home Agent: %s", ip6_to_str(&in6));
+        break;
+    case OPTION_MIP6_HOA:
+        if (optlen != 16) {
+            proto_tree_add_text(subtree, tvb, off, optlen,
+                                "MIP6_HOA: malformed option");
+            break;
+        }
+
+        tvb_get_ipv6(tvb, off, &in6);
+        proto_tree_add_text(subtree, tvb, off,
+                            16, "Home Address: %s", ip6_to_str(&in6));
+        break;
+    case OPTION_NAI:
+        if (optlen < 4) {
+            proto_tree_add_text(subtree, tvb, off, optlen,
+                                "NAI: malformed option");
+            break;
+        }
+        proto_tree_add_text(subtree, tvb, off, optlen,
+                            "NAI : %s", tvb_get_ptr(tvb, off, optlen - 2));
+        break;
+    }
+
+    return 4 + optlen;
 }
 
 
 static void
 dissect_dhcpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
-    gboolean downstream, int off, int eoff)
+              gboolean downstream, int off, int eoff)
 {
-       proto_tree *bp_tree = NULL;
-       proto_item *ti;
-       guint8 msgtype;
-       gboolean at_end;
-       struct e_in6_addr in6; 
+    proto_tree *bp_tree = NULL;
+    proto_item *ti;
+    guint8 msgtype;
+    gboolean at_end;
+    struct e_in6_addr in6;
 
-       msgtype = tvb_get_guint8(tvb, off);
+    msgtype = tvb_get_guint8(tvb, off);
 
-        col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", val_to_str(msgtype, msgtype_vals, "Message Type %u"));
+    col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", val_to_str(msgtype, msgtype_vals, "Message Type %u"));
 
-       if (tree) {
-               ti = proto_tree_add_item(tree, proto_dhcpv6, tvb, off, eoff - off, FALSE);
-               bp_tree = proto_item_add_subtree(ti, ett_dhcpv6);
-        }
+    if (tree) {
+        ti = proto_tree_add_item(tree, proto_dhcpv6, tvb, off, eoff - off, FALSE);
+        bp_tree = proto_item_add_subtree(ti, ett_dhcpv6);
+    }
 
 
-        if (msgtype == RELAY_FORW || msgtype == RELAY_REPLY) {
-          if (tree) {
-               proto_tree_add_item(bp_tree, hf_dhcpv6_msgtype, tvb, off, 1, FALSE);
-               proto_tree_add_item(bp_tree, hf_dhcpv6_hopcount, tvb, off + 1, 1, FALSE);
-               proto_tree_add_item(bp_tree, hf_dhcpv6_linkaddr, tvb, off + 2, 16, FALSE);
-                tvb_get_ipv6(tvb, off + 2, &in6);
-               col_append_fstr(pinfo->cinfo, COL_INFO, "L: %s ", ip6_to_str(&in6));
-               proto_tree_add_item(bp_tree, hf_dhcpv6_peeraddr, tvb, off + 18, 16, FALSE);
-          }
-           off += 34;
-        } else {
-          if (tree) {
-               proto_tree_add_item(bp_tree, hf_dhcpv6_msgtype, tvb, off, 1, FALSE);
-               proto_tree_add_item(bp_tree, hf_dhcpv6_xid, tvb, off + 1, 3, FALSE);
-          }
-          col_append_fstr(pinfo->cinfo, COL_INFO, "XID: 0x%x ", tvb_get_ntoh24(tvb, off + 1));
-          off += 4;
-       }
-
-       at_end = FALSE;
-       while (off < eoff && !at_end)
-               off += dhcpv6_option(tvb, pinfo, bp_tree, downstream, off, eoff, &at_end);
+    if (msgtype == RELAY_FORW || msgtype == RELAY_REPLY) {
+        if (tree) {
+            proto_tree_add_item(bp_tree, hf_dhcpv6_msgtype, tvb, off, 1, FALSE);
+            proto_tree_add_item(bp_tree, hf_dhcpv6_hopcount, tvb, off + 1, 1, FALSE);
+            proto_tree_add_item(bp_tree, hf_dhcpv6_linkaddr, tvb, off + 2, 16, FALSE);
+            tvb_get_ipv6(tvb, off + 2, &in6);
+            col_append_fstr(pinfo->cinfo, COL_INFO, "L: %s ", ip6_to_str(&in6));
+            proto_tree_add_item(bp_tree, hf_dhcpv6_peeraddr, tvb, off + 18, 16, FALSE);
+        }
+        off += 34;
+    } else {
+        if (tree) {
+            proto_tree_add_item(bp_tree, hf_dhcpv6_msgtype, tvb, off, 1, FALSE);
+            proto_tree_add_item(bp_tree, hf_dhcpv6_xid, tvb, off + 1, 3, FALSE);
+        }
+        col_append_fstr(pinfo->cinfo, COL_INFO, "XID: 0x%x ", tvb_get_ntoh24(tvb, off + 1));
+        off += 4;
+    }
+
+    at_end = FALSE;
+    while (off < eoff && !at_end)
+        off += dhcpv6_option(tvb, pinfo, bp_tree, downstream, off, eoff, &at_end);
 }
 
 static void
 dissect_dhcpv6_downstream(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 {
-       col_set_str(pinfo->cinfo, COL_PROTOCOL, "DHCPv6");
-       col_clear(pinfo->cinfo, COL_INFO);
-       dissect_dhcpv6(tvb, pinfo, tree, TRUE, 0, tvb_reported_length(tvb));
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, "DHCPv6");
+    col_clear(pinfo->cinfo, COL_INFO);
+    dissect_dhcpv6(tvb, pinfo, tree, TRUE, 0, tvb_reported_length(tvb));
 }
 
 static void
 dissect_dhcpv6_upstream(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 {
-       col_set_str(pinfo->cinfo, COL_PROTOCOL, "DHCPv6");
-       col_clear(pinfo->cinfo, COL_INFO);
-       dissect_dhcpv6(tvb, pinfo, tree, FALSE, 0, tvb_reported_length(tvb));
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, "DHCPv6");
+    col_clear(pinfo->cinfo, COL_INFO);
+    dissect_dhcpv6(tvb, pinfo, tree, FALSE, 0, tvb_reported_length(tvb));
 }
 
 
 void
 proto_register_dhcpv6(void)
 {
-  static hf_register_info hf[] = {
-
-  /* DHCPv6 header */
-    { &hf_dhcpv6_msgtype,
-      { "Message type", "dhcpv6.msgtype", FT_UINT8, BASE_DEC, VALS(msgtype_vals), 0x0, NULL, HFILL }},
-    { &hf_dhcpv6_hopcount,
-      { "Hopcount", "dhcpv6.hopcount", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL}},
-    { &hf_dhcpv6_xid,
-      { "Transaction ID", "dhcpv6.xid", FT_UINT24, BASE_HEX, NULL, 0, NULL, HFILL}},
-    { &hf_dhcpv6_linkaddr,
-      { "Link address", "dhcpv6.linkaddr", FT_IPv6, BASE_NONE, NULL, 0, NULL, HFILL}},
-    { &hf_dhcpv6_peeraddr,
-      { "Peer address", "dhcpv6.peeraddr", FT_IPv6, BASE_NONE, NULL, 0, NULL, HFILL}},
-  /* Generic option stuff */
-    { &hf_option_type,
-      { "Option", "dhcpv6.option.type", FT_UINT16, BASE_DEC, VALS(opttype_vals), 0x0, NULL, HFILL}},
-    { &hf_option_length,
-      { "Length", "dhcpv6.option.length", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}},
-    { &hf_option_value,
-      { "Value", "dhcpv6.option.value", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}},
-  /* Individual options */
-    { &hf_clientfqdn_reserved,
-      { "Reserved", "dhcpv6.clientfqdn.reserved", FT_UINT8, BASE_HEX, NULL, 0xF8, NULL, HFILL}},
-    { &hf_clientfqdn_n,
-      { "N", "dhcpv6.clientfqdn.n", FT_BOOLEAN, 8, TFS(&fqdn_n), 0x4, NULL, HFILL}},
-    { &hf_clientfqdn_o,
-      { "O", "dhcpv6.clientfqdn.o", FT_BOOLEAN, 8, TFS(&fqdn_o), 0x2, NULL, HFILL}},
-    { &hf_clientfqdn_s,
-      { "S", "dhcpv6.clientfqdn.s", FT_BOOLEAN, 8, TFS(&fqdn_s), 0x1, NULL, HFILL}},
-    { &hf_remoteid_enterprise,
-      { "Enterprise ID", "dhvpv6.remoteid.enterprise", FT_UINT32, BASE_DEC,  VALS(sminmpec_values), 0, "RemoteID Enterprise Number", HFILL }},
-    { &hf_vendoropts_enterprise,
-      { "Enterprise ID", "dhvpv6.vendoropts.enterprise", FT_UINT32, BASE_DEC,  VALS(sminmpec_values), 0, "Vendor opts Enterprise Number", HFILL }},
-    { &hf_vendorclass_enterprise,
-      { "Enterprise ID", "dhvpv6.vendorclass.enterprise", FT_UINT32, BASE_DEC,  VALS(sminmpec_values), 0, "Vendor Class Enterprise Number", HFILL }},
-    { &hf_duiden_enterprise,
-      { "Enterprise ID", "dhvpv6.duiden.enterprise", FT_UINT32, BASE_DEC,  VALS(sminmpec_values), 0, "DUID EN Enterprise Number", HFILL }},
-
-  };
-  static gint *ett[] = {
-    &ett_dhcpv6,
-    &ett_dhcpv6_option,
-    &ett_dhcpv6_option_vsoption,
-    &ett_dhcpv6_vendor_option,
-    &ett_dhcpv6_pkt_option,
-  };
-
-  proto_dhcpv6 = proto_register_protocol("DHCPv6", "DHCPv6", "dhcpv6");
-  proto_register_field_array(proto_dhcpv6, hf, array_length(hf));
-  proto_register_subtree_array(ett, array_length(ett));
-
-  /* Allow other dissectors to find this one by name.
-     Just choose upstream version for now as they are identical. */
-  register_dissector("dhcpv6", dissect_dhcpv6_upstream, proto_dhcpv6);
+    static hf_register_info hf[] = {
+
+        /* DHCPv6 header */
+        { &hf_dhcpv6_msgtype,
+          { "Message type", "dhcpv6.msgtype", FT_UINT8, BASE_DEC, VALS(msgtype_vals), 0x0, NULL, HFILL }},
+        { &hf_dhcpv6_hopcount,
+          { "Hopcount", "dhcpv6.hopcount", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL}},
+        { &hf_dhcpv6_xid,
+          { "Transaction ID", "dhcpv6.xid", FT_UINT24, BASE_HEX, NULL, 0, NULL, HFILL}},
+        { &hf_dhcpv6_linkaddr,
+          { "Link address", "dhcpv6.linkaddr", FT_IPv6, BASE_NONE, NULL, 0, NULL, HFILL}},
+        { &hf_dhcpv6_peeraddr,
+          { "Peer address", "dhcpv6.peeraddr", FT_IPv6, BASE_NONE, NULL, 0, NULL, HFILL}},
+        /* Generic option stuff */
+        { &hf_option_type,
+          { "Option", "dhcpv6.option.type", FT_UINT16, BASE_DEC, VALS(opttype_vals), 0x0, NULL, HFILL}},
+        { &hf_option_length,
+          { "Length", "dhcpv6.option.length", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+        { &hf_option_value,
+          { "Value", "dhcpv6.option.value", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+        /* Individual options */
+        { &hf_clientfqdn_reserved,
+          { "Reserved", "dhcpv6.clientfqdn.reserved", FT_UINT8, BASE_HEX, NULL, 0xF8, NULL, HFILL}},
+        { &hf_clientfqdn_n,
+          { "N", "dhcpv6.clientfqdn.n", FT_BOOLEAN, 8, TFS(&fqdn_n), 0x4, NULL, HFILL}},
+        { &hf_clientfqdn_o,
+          { "O", "dhcpv6.clientfqdn.o", FT_BOOLEAN, 8, TFS(&fqdn_o), 0x2, NULL, HFILL}},
+        { &hf_clientfqdn_s,
+          { "S", "dhcpv6.clientfqdn.s", FT_BOOLEAN, 8, TFS(&fqdn_s), 0x1, NULL, HFILL}},
+        { &hf_remoteid_enterprise,
+          { "Enterprise ID", "dhvpv6.remoteid.enterprise", FT_UINT32, BASE_DEC,  VALS(sminmpec_values), 0, "RemoteID Enterprise Number", HFILL }},
+        { &hf_vendoropts_enterprise,
+          { "Enterprise ID", "dhvpv6.vendoropts.enterprise", FT_UINT32, BASE_DEC,  VALS(sminmpec_values), 0, "Vendor opts Enterprise Number", HFILL }},
+        { &hf_vendorclass_enterprise,
+          { "Enterprise ID", "dhvpv6.vendorclass.enterprise", FT_UINT32, BASE_DEC,  VALS(sminmpec_values), 0, "Vendor Class Enterprise Number", HFILL }},
+        { &hf_duiden_enterprise,
+          { "Enterprise ID", "dhvpv6.duiden.enterprise", FT_UINT32, BASE_DEC,  VALS(sminmpec_values), 0, "DUID EN Enterprise Number", HFILL }},
+
+    };
+    static gint *ett[] = {
+        &ett_dhcpv6,
+        &ett_dhcpv6_option,
+        &ett_dhcpv6_option_vsoption,
+        &ett_dhcpv6_vendor_option,
+        &ett_dhcpv6_pkt_option,
+    };
+
+    proto_dhcpv6 = proto_register_protocol("DHCPv6", "DHCPv6", "dhcpv6");
+    proto_register_field_array(proto_dhcpv6, hf, array_length(hf));
+    proto_register_subtree_array(ett, array_length(ett));
+
+    /* Allow other dissectors to find this one by name.
+       Just choose upstream version for now as they are identical. */
+    register_dissector("dhcpv6", dissect_dhcpv6_upstream, proto_dhcpv6);
 }
 
 void
 proto_reg_handoff_dhcpv6(void)
 {
-  dissector_handle_t dhcpv6_handle;
-
-  dhcpv6_handle = create_dissector_handle(dissect_dhcpv6_downstream,
-       proto_dhcpv6);
-  dissector_add("udp.port", UDP_PORT_DHCPV6_DOWNSTREAM, dhcpv6_handle);
-  dhcpv6_handle = create_dissector_handle(dissect_dhcpv6_upstream,
-       proto_dhcpv6);
-  dissector_add("udp.port", UDP_PORT_DHCPV6_UPSTREAM, dhcpv6_handle);
+    dissector_handle_t dhcpv6_handle;
+
+    dhcpv6_handle = create_dissector_handle(dissect_dhcpv6_downstream,
+                                            proto_dhcpv6);
+    dissector_add("udp.port", UDP_PORT_DHCPV6_DOWNSTREAM, dhcpv6_handle);
+    dhcpv6_handle = create_dissector_handle(dissect_dhcpv6_upstream,
+                                            proto_dhcpv6);
+    dissector_add("udp.port", UDP_PORT_DHCPV6_UPSTREAM, dhcpv6_handle);
 }
 
index a18fd0e8059cbc82543d9cdfe3803a26e8b6db4a..a6758f04ad776d90fd6f86290267252fd90ae6f2 100644 (file)
@@ -604,7 +604,7 @@ de_gmm_drx_param(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_,
        proto_tree_add_text(tf_tree,
                tvb, curr_offset, 1,
                "Split PG Cycle Code: %s (%u)",
-               str, 
+               str,
                oct);
 
        curr_offset++;
@@ -670,7 +670,7 @@ de_gmm_ptmsi_sig(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_,
        proto_item   *curr_item;
 
        curr_offset = offset;
-       
+
        curr_item= proto_tree_add_item(tree,hf_gsm_a_ptmsi_sig,tvb,curr_offset,3,FALSE);
        proto_item_append_text(curr_item,"%s",add_string ? add_string : "");
 
@@ -888,7 +888,7 @@ de_gmm_ms_net_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gc
        proto_item      *item;
 
        curr_offset = offset;
-       
+
        /* bit 8: GEA1 */
        proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_gea1, tvb, curr_offset, 1, FALSE);
 
@@ -926,7 +926,7 @@ de_gmm_ms_net_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gc
        proto_tree_add_item(subtree, hf_gsm_a_gmm_net_cap_gea6, tvb, curr_offset, 1, FALSE);
        proto_tree_add_item(subtree, hf_gsm_a_gmm_net_cap_gea7, tvb, curr_offset, 1, FALSE);
 
-       /* bit 1: LCS VA capability */  
+       /* bit 1: LCS VA capability */
        proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_lcs, tvb, curr_offset, 1, FALSE);
 
        curr_offset++;
@@ -954,7 +954,7 @@ de_gmm_ms_net_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gc
        proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3)+6, 2, FALSE);
 
        curr_offset++;
-    EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
+       EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
 
        return(curr_offset - offset);
 }
@@ -1047,7 +1047,7 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint l
                "Max Rx-Slot/TDMA:6 Max Tx-Slot/TDMA:6 Max-Sum-Slot/TDMA:NA Tta:NA Ttb:a) Tra:2 Trb:a) Type:2 (a: 1 with frequency hopping, 0 otherwise)", /* 16 */
                "Max Rx-Slot/TDMA:7 Max Tx-Slot/TDMA:7 Max-Sum-Slot/TDMA:NA Tta:NA Ttb:a) Tra:1 Trb:0 Type:2 (a: 1 with frequency hopping, 0 otherwise)", /* 17 */
                "Max Rx-Slot/TDMA:8 Max Tx-Slot/TDMA:8 Max-Sum-Slot/TDMA:NA Tta:NA Ttb:0 Tra:0 Trb:0 Type:2", /* 18 */
-               "Max Rx-Slot/TDMA:6 Max Tx-Slot/TDMA:2 Max-Sum-Slot/TDMA:NA Tta:3 Ttb:b) Tra:2 Trb:c) Type:1 (b: 1 with frequency hopping or change from Rx to Tx, 0 otherwise; c: 1 with frequency hopping or change from Tx to Rx, 0 otherwise", /* 19 */   
+               "Max Rx-Slot/TDMA:6 Max Tx-Slot/TDMA:2 Max-Sum-Slot/TDMA:NA Tta:3 Ttb:b) Tra:2 Trb:c) Type:1 (b: 1 with frequency hopping or change from Rx to Tx, 0 otherwise; c: 1 with frequency hopping or change from Tx to Rx, 0 otherwise", /* 19 */
                "Max Rx-Slot/TDMA:6 Max Tx-Slot/TDMA:3 Max-Sum-Slot/TDMA:NA Tta:3 Ttb:b) Tra:2 Trb:c) Type:1 (b: 1 with frequency hopping or change from Rx to Tx, 0 otherwise; c: 1 with frequency hopping or change from Tx to Rx, 0 otherwise", /* 20 */
                "Max Rx-Slot/TDMA:6 Max Tx-Slot/TDMA:4 Max-Sum-Slot/TDMA:NA Tta:3 Ttb:b) Tra:2 Trb:c) Type:1 (b: 1 with frequency hopping or change from Rx to Tx, 0 otherwise; c: 1 with frequency hopping or change from Tx to Rx, 0 otherwise", /* 21 */
                "Max Rx-Slot/TDMA:6 Max Tx-Slot/TDMA:4 Max-Sum-Slot/TDMA:NA Tta:3 Ttb:b) Tra:2 Trb:c) Type:1 (b: 1 with frequency hopping or change from Rx to Tx, 0 otherwise; c: 1 with frequency hopping or change from Tx to Rx, 0 otherwise", /* 22 */
@@ -1127,7 +1127,7 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint l
                                curr_bits_length -= bits_needed;
                                oct <<= bits_needed;
                                bits_in_oct -= bits_needed;
-                       
+
                                if (( curr_len*8 + bits_in_oct ) < 11 )
                                        break;
                                curr_bits_length = 11;
@@ -1281,7 +1281,7 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint l
                                {
                                        /* 0 GSM P
                                         * 1 GSM E
-                                        * 2 GSM R 
+                                        * 2 GSM R
                                         * 5 GSM 450
                                         * 6 GSM 480
                                         * 7 GSM 850
@@ -1418,7 +1418,7 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint l
                        curr_bits_length -= bits_needed;
                        oct <<= bits_needed;
                        bits_in_oct -= bits_needed;
-               
+
                        for (i=1; i<= 7 ; i++ )
                        {
                                /*
@@ -1855,7 +1855,7 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint l
                                        case 3:  str="Multislot class 11 supported"; break;
                                        default: str="This should not happen";
                                }
-               
+
                                proto_tree_add_text(tf_tree,
                                        tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
                                        "DTM GPRS Multi Slot Class: %s (%u)",str,oct>>(32-bits_needed));
@@ -2368,7 +2368,7 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint l
                                case 0x03: str="GMSK_MULTISLOT_POWER_PROFILE 3"; break;
                                default:   str="This should not happen";
                        }
-       
+
                        proto_tree_add_text(tf_tree,
                                tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
                                "GMSK Multislot Power Profile: %s (%u)",str,oct>>(32-bits_needed));
@@ -2392,7 +2392,7 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint l
                                case 0x03: str="8-PSK_MULTISLOT_POWER_PROFILE 3"; break;
                                default:   str="This should not happen";
                        }
-       
+
                        proto_tree_add_text(tf_tree,
                        tvb, curr_offset-1-add_ocetets, 1+add_ocetets,
                        "8-PSK Multislot Power Profile: %s (%u)",str,oct>>(32-bits_needed));
@@ -2421,7 +2421,7 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint l
        } while ( 1 );
 
        curr_offset+= curr_len;
-          
+
        EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
 
        return(curr_offset - offset);
@@ -2483,7 +2483,7 @@ static const range_string gmm_cause_vals[] = {
        { 0x70, 0xff, "Protocol error, unspecified(Not def in v8.6.0)"},
        { 0, 0, NULL }
 };
-/* NOTE 1 TS 124 008 V8.6.0 (2009-07) 
+/* NOTE 1 TS 124 008 V8.6.0 (2009-07)
        "Any other value received by the mobile station shall be treated as 0110 1111, "Protocol
        error, unspecified". Any other value received by the network shall be treated as
        0110 1111, "Protocol error, unspecified".
@@ -3297,7 +3297,7 @@ de_sm_pdp_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar
        else if ((pdp_type_num == 0) && (pdp_type_org == 0x0f))
                str="Empty";
        else
-               str="Not specified";    
+               str="Not specified";
 
        proto_tree_add_text(tree,
                tvb, curr_offset, 1,
@@ -3321,7 +3321,7 @@ de_sm_pdp_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar
        }
 
        curr_offset += 1;
-       if (pdp_type_org == 1)  
+       if (pdp_type_org == 1)
        switch (pdp_type_num)
        {
                case 0x57:
@@ -3340,7 +3340,7 @@ de_sm_pdp_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar
                        proto_tree_add_item(tree,hf_gsm_a_sm_ip4_address,tvb,curr_offset,4,FALSE);
                        curr_offset+=4;
        }
-       
+
        EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
 
        return(curr_offset - offset);
@@ -3592,7 +3592,7 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add
                default: str = ep_strdup_printf("%u kbps", qos_calc_bitrate(oct));
        }
 
-       proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_upl, tvb, 
+       proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_upl, tvb,
                curr_offset, 1, oct, "%s (%u)", str, oct);
        curr_offset+= 1;
 
@@ -3608,7 +3608,7 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add
                default: str = ep_strdup_printf("%u kbps", qos_calc_bitrate(oct));
        }
 
-       proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_downl, tvb, 
+       proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_downl, tvb,
                curr_offset, 1, oct, "%s (%u)", str, oct);
        curr_offset+= 1;
 
@@ -3639,7 +3639,7 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add
                        str = ep_strdup_printf("%u ms", temp32);
        }
 
-       proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_trans_delay, tvb, 
+       proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_trans_delay, tvb,
                curr_offset, 1, oct, "%s (%u)", str, tmp_oct);
 
        tmp_oct = oct & 0x03;
@@ -3648,7 +3648,7 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add
        else
                str = ep_strdup_printf("Priority level %u", tmp_oct);
 
-       proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_traf_handl_prio, tvb, 
+       proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_traf_handl_prio, tvb,
                curr_offset, 1, oct, "%s (%u)", str, tmp_oct);
 
        curr_offset+= 1;
@@ -3664,7 +3664,7 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add
                default: str = ep_strdup_printf("%u kbps", qos_calc_bitrate(oct));
        }
 
-       proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_guar_bitrate_upl, tvb, 
+       proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_guar_bitrate_upl, tvb,
                curr_offset, 1, oct, "%s (%u)", str, oct);
 
        curr_offset+= 1;
@@ -3680,7 +3680,7 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add
                default: str = ep_strdup_printf("%u kbps", qos_calc_bitrate(oct));
        }
 
-       proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_guar_bitrate_downl, tvb, 
+       proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_guar_bitrate_downl, tvb,
                curr_offset, 1, oct, "%s (%u)", str, oct);
 
        curr_offset+= 1;
@@ -3697,7 +3697,7 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add
        else
                str = "unknown";
 
-       proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_source_stat_desc, tvb, 
+       proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_source_stat_desc, tvb,
                curr_offset, 1, oct, "%s (%u)", str, tmp_oct);
 
        curr_offset+= 1;
@@ -3716,7 +3716,7 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add
                else
                        str = ep_strdup_printf("%u kbps", temp32);
        }
-       proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_downl_ext, tvb, 
+       proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_downl_ext, tvb,
                curr_offset, 1, oct, "%s (%u)", str, oct);
 
        curr_offset+= 1;
@@ -3735,7 +3735,7 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add
                else
                        str = ep_strdup_printf("%u kbps", temp32);
        }
-       proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_guar_bitrate_downl_ext, tvb, 
+       proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_guar_bitrate_downl_ext, tvb,
                curr_offset, 1, oct, "%s (%u)", str, oct);
 
        curr_offset+= 1;
@@ -3754,7 +3754,7 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add
                else
                        str = ep_strdup_printf("%u kbps", temp32);
        }
-       proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_upl_ext, tvb, 
+       proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_upl_ext, tvb,
                curr_offset, 1, oct, "%s (%u)", str, oct);
 
        curr_offset+= 1;
@@ -3773,7 +3773,7 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add
                else
                        str = ep_strdup_printf("%u kbps", temp32);
        }
-       proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_guar_bitrate_upl_ext, tvb, 
+       proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_guar_bitrate_upl_ext, tvb,
                curr_offset, 1, oct, "%s (%u)", str, oct);
 
        curr_offset+= 1;
@@ -3917,7 +3917,7 @@ de_sm_linked_ti(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gcha
        }
 
        curr_offset+= curr_len;
-          
+
        EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
 
        return(curr_offset - offset);
@@ -3980,11 +3980,11 @@ guint16
 de_sm_pflow_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
-       
+
        curr_offset = offset;
        proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, offset << 3, 1, FALSE);
        proto_tree_add_item(tree, hf_gsm_a_sm_packet_flow_id, tvb, offset, 1, FALSE);
-          
+
        EXTRANEOUS_DATA_CHECK(len, curr_offset - offset);
 
        return(curr_offset - offset);
@@ -4111,7 +4111,7 @@ de_sm_tflow_temp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gch
 
                        proto_tree_add_text(tf_tree,
                                tvb, curr_offset-1, 1,
-                               "Packet evaluation precedence: 0x%02x (%u)",oct,oct );  
+                               "Packet evaluation precedence: 0x%02x (%u)",oct,oct );
 
                        if ((curr_offset-offset)<1) { proto_tree_add_text(tf_tree,tvb, curr_offset, 1,"Not enough data"); return(len);}
                        pf_length = tvb_get_guint8(tvb, curr_offset);
@@ -4120,7 +4120,7 @@ de_sm_tflow_temp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gch
 
                        proto_tree_add_text(tf_tree,
                                tvb, curr_offset-1, 1,
-                               "Packet filter length: 0x%02x (%u)",pf_length,pf_length );      
+                               "Packet filter length: 0x%02x (%u)",pf_length,pf_length );
                        /* New tree for component */
 
                        /* Dissect Packet filter Component */
@@ -4140,7 +4140,7 @@ de_sm_tflow_temp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gch
                                comp_tree = proto_item_add_subtree(tf, ett_sm_tft );
 
                                switch ( pack_component_type ){
-                       
+
                                case 0x10:
                                        str="IPv4 remote address type";
                                        proto_tree_add_item(comp_tree,hf_gsm_a_sm_ip4_address,tvb,curr_offset,4,FALSE);
@@ -4248,7 +4248,7 @@ de_sm_tflow_temp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gch
                                proto_tree_add_text(tf_tree, tvb, curr_offset, pf_length, "Authorization token value: 0x%s",
                                                tvb_bytes_to_str(tvb, curr_offset, pf_length));
                                break;
-                               
+
                        case 0x02:
                                proto_tree_add_text(tf_tree, tvb, curr_offset, 2, "Media Component number value: 0x%x",
                                                tvb_get_bits16(tvb, curr_offset<<3, 16, FALSE));
@@ -4285,7 +4285,7 @@ de_sm_tmgi(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *ad
 {
        guint32 curr_offset;
 
-    curr_offset = offset;
+       curr_offset = offset;
 
        proto_tree_add_item(tree, hf_gsm_a_sm_tmgi, tvb, curr_offset, 3, FALSE);
        curr_offset += 3;
@@ -4319,7 +4319,7 @@ de_sm_mbms_bearer_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len
                default: str = ep_strdup_printf("%u kbps", qos_calc_bitrate(oct));
        }
 
-       proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_downl, tvb, 
+       proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_downl, tvb,
                curr_offset, 1, oct, "%s (%u)", str, oct);
        curr_offset+= 1;
 
@@ -4337,7 +4337,7 @@ de_sm_mbms_bearer_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len
                else
                        str = ep_strdup_printf("%u kbps", temp32);
        }
-       proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_downl_ext, tvb, 
+       proto_tree_add_uint_format_value(tree, hf_gsm_a_qos_max_bitrate_downl_ext, tvb,
                curr_offset, 1, oct, "%s (%u)", str, oct);
 
        curr_offset+= 1;
@@ -4383,7 +4383,7 @@ de_sm_enh_nsapi(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_,
                        str = "Reserved for use by lower layers in the p2p radio bearer allocation message for MBMS Broadcast mode";
 
 
-       proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_enh_nsapi, tvb, 
+       proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_enh_nsapi, tvb,
                offset, 1, oct, "%s (%u)", str, oct);
 
        /* no length check possible */
@@ -4454,7 +4454,7 @@ guint16 (*gm_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint
        de_sm_tmgi,             /* Temporary Mobile Group Identity (TMGI) */
        de_sm_mbms_bearer_cap,  /* MBMS bearer capabilities */
        de_sm_mbms_prot_conf_opt,       /* MBMS protocol configuration options */
-       de_sm_enh_nsapi,        /* Enhanced network service access point identifier */  
+       de_sm_enh_nsapi,        /* Enhanced network service access point identifier */
        de_sm_req_type,         /* Request type */
        /* GPRS Common Information Elements 10.5.7 */
        de_gc_context_stat,     /* PDP Context Status */
@@ -4659,7 +4659,7 @@ dtap_gmm_detach_acc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
                ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_SPARE_NIBBLE );
                curr_len++;
                curr_offset--;
-       
+
                ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND );
        }
 
@@ -4769,7 +4769,7 @@ dtap_gmm_auth_ciph_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint le
                EXTRANEOUS_DATA_CHECK(curr_len, 0);
        return;
        }
-       
+
        ELEM_OPT_TLV( 0x28 , GSM_A_PDU_TYPE_DTAP, DE_AUTH_PARAM_AUTN , NULL);
 
        EXTRANEOUS_DATA_CHECK(curr_len, 0);
@@ -5679,7 +5679,7 @@ dtap_sm_act_mbms_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
 
        EXTRANEOUS_DATA_CHECK(curr_len, 0);
 }
-       
+
 /*
  * [9] 9.5.25 Request MBMS Context Activation
  */
@@ -5945,7 +5945,7 @@ proto_register_gsm_a_gm(void)
                NULL, HFILL }
        },
        { &hf_gsm_a_tft_port,
-               { "Port", "gsm_a.tft.port", 
+               { "Port", "gsm_a.tft.port",
                  FT_UINT16, BASE_DEC, NULL, 0x0,
                NULL, HFILL }
        },
index 92c037a3ca977d284c4cd5191a5fde0772949914..ade270e2829071c5289225db8d87a7b5afa20e2f 100644 (file)
@@ -330,7 +330,7 @@ const value_string gsm_rr_elem_strings[] = {
 const value_string gsm_rr_rest_octets_elem_strings[] = {
     /* RR Rest Octets information elements */
     { 0, "UTRAN FDD Description" },
-    { 0, "UTRAN TDD Description" }, 
+    { 0, "UTRAN TDD Description" },
     { 0, "3G Measurement Parameters Description" },
     { 0, "3G Additional Measurement Parameters Description" },
     { 0, "Measurement Parameters Description" },
@@ -922,14 +922,14 @@ static void dissect_channel_list_n_range(tvbuff_t *tvb, proto_tree *tree, guint3
 static guint16
 dissect_arfcn_list_core(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_, guint8 format)
 {
-       guint32 curr_offset;
+    guint32 curr_offset;
     guint8  oct,bit,byte;
     guint16 arfcn;
     proto_item *item;
 
     curr_offset = offset;
 
-       if ((format & 0xc0) == 0x00)
+    if ((format & 0xc0) == 0x00)
     {
         /* bit map 0 */
         item = proto_tree_add_text(tree,tvb, curr_offset, len, "List of ARFCNs =");
@@ -997,7 +997,7 @@ dissect_arfcn_list_core(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint l
         }
     }
 
-       return(curr_offset - offset);
+    return(curr_offset - offset);
 }
 
 /*
@@ -1019,7 +1019,7 @@ dissect_arfcn_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, g
 
     curr_offset += dissect_arfcn_list_core(tvb, tree, offset, len, add_string, string_len, oct);
 
-       return(curr_offset - offset);
+    return(curr_offset - offset);
 }
 
 /*
@@ -1034,7 +1034,7 @@ dissect_arfcn_list2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len,
 
     curr_offset = offset;
 
-       /* Turn bit 127 off, in order to reuse the ARFCN dissection code */
+    /* Turn bit 127 off, in order to reuse the ARFCN dissection code */
     oct = tvb_get_guint8(tvb, curr_offset) & 0xbf;
 
     /* FORMAT-ID, Format Identifier (part of octet 3)*/
@@ -1042,7 +1042,7 @@ dissect_arfcn_list2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len,
 
     curr_offset += dissect_arfcn_list_core(tvb, tree, offset, len, add_string, string_len, oct);
 
-       return(curr_offset - offset);
+    return(curr_offset - offset);
 }
 
 guint16
@@ -1061,7 +1061,7 @@ de_rr_ba_list_pref(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, g
     guint8 value;
 
     curr_offset = offset;
-       proto_tree_add_item(tree, hf_gsm_a_rr_ba_list_pref_length, tvb, curr_offset, 1, FALSE);
+    proto_tree_add_item(tree, hf_gsm_a_rr_ba_list_pref_length, tvb, curr_offset, 1, FALSE);
     bit_offset = curr_offset << 3;
     value = tvb_get_bits8(tvb,bit_offset,1);
     bit_offset += 1;
@@ -1099,7 +1099,7 @@ de_rr_utran_freq_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len
     guint8 value;
 
     curr_offset = offset;
-       proto_tree_add_item(tree, hf_gsm_a_rr_utran_freq_list_length, tvb, curr_offset, 1, FALSE);
+    proto_tree_add_item(tree, hf_gsm_a_rr_utran_freq_list_length, tvb, curr_offset, 1, FALSE);
     bit_offset = curr_offset << 3;
     value = tvb_get_bits8(tvb,bit_offset,1);
     bit_offset += 1;
@@ -1174,7 +1174,7 @@ de_rr_cell_select_indic(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint l
         break;
     case 1: /* UTRAN FDD Description */
         bit_offset_sav = bit_offset;
-        item = proto_tree_add_text(tree, tvb, bit_offset>>3, -1, "%s", 
+        item = proto_tree_add_text(tree, tvb, bit_offset>>3, -1, "%s",
                                    gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_UTRAN_FDD_DESC].strptr);
         subtree = proto_item_add_subtree(item, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_UTRAN_FDD_DESC]);
         value = tvb_get_bits8(tvb,bit_offset,1);
@@ -1216,7 +1216,7 @@ de_rr_cell_select_indic(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint l
                     nwi = 1;
                     jwi = 0;
                     i = 1;
-   
+
                     while (idx > 0)
                     {
                         w[i] = tvb_get_bits(tvb, bit_offset, wsize, FALSE);
@@ -1240,13 +1240,13 @@ de_rr_cell_select_indic(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint l
                         bit_offset += idx;
                     }
                     iused = i-1;
-   
+
                     for (i=1; i <= iused; i++)
                     {
                         xdd_cell_info = f_k(i, w, 1024);
-                        proto_tree_add_text(subtree2,tvb, bit_offset>>3, 0, 
+                        proto_tree_add_text(subtree2,tvb, bit_offset>>3, 0,
                                             "Scrambling Code: %d", xdd_cell_info & 0x01FF);
-                        proto_tree_add_text(subtree2,tvb, bit_offset>>3, 0, 
+                        proto_tree_add_text(subtree2,tvb, bit_offset>>3, 0,
                                             "Diversity: %d", (xdd_cell_info >> 9) & 0x01);
                     }
                 }
@@ -1286,7 +1286,7 @@ de_rr_cell_select_indic(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint l
                 proto_tree_add_text(subtree,tvb, bit_offset>>3, 1, "Nr of TDD Cells : %d", idx);
                 bit_offset += 5;
                 idx = convert_n_to_q[idx];
-                item2 = proto_tree_add_text(subtree,tvb, bit_offset>>3, (idx>>3)+1, "%s", 
+                item2 = proto_tree_add_text(subtree,tvb, bit_offset>>3, (idx>>3)+1, "%s",
                                             gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_UTRAN_TDD_DESC].strptr);
                 subtree2 = proto_item_add_subtree(item2, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_TDD_CELL_INFORMATION_FIELD]);
                 proto_tree_add_text(subtree2,tvb, bit_offset>>3, (idx>>3)+1, "Field is %d bits long", idx);
@@ -1302,7 +1302,7 @@ de_rr_cell_select_indic(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint l
                     nwi = 1;
                     jwi = 0;
                     i = 1;
-   
+
                     while (idx > 0)
                     {
                         w[i] = tvb_get_bits(tvb, bit_offset, wsize, FALSE);
@@ -1326,7 +1326,7 @@ de_rr_cell_select_indic(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint l
                         bit_offset += idx;
                     }
                     iused = i-1;
-                                               
+
                     for (i=1; i <= iused; i++)
                     {
                         xdd_cell_info = f_k(i, w, 512);
@@ -1562,7 +1562,7 @@ de_rr_ch_dsc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gch
             str = "Unknown channel information";
             subchannel = oct8;
         }
-       
+
         other_decode_bitfield_value(a_bigbuf, oct8, 0xf8, 8);
         proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = %s %d",a_bigbuf,str,subchannel);
     }
@@ -1571,12 +1571,12 @@ de_rr_ch_dsc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gch
     proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = Timeslot: %d",a_bigbuf,(oct8 & 0x07));
 
     curr_offset +=1;
-       
+
     /* Octet 3 */
     oct8 = tvb_get_guint8(tvb, curr_offset);
     other_decode_bitfield_value(a_bigbuf, oct8, 0xe0, 8);
     proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = Training Sequence: %d",a_bigbuf,((oct8 & 0xe0)>>5));
-       
+
 
     if ((oct8 & 0x10) == 0x10)
     {
@@ -1602,7 +1602,7 @@ de_rr_ch_dsc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gch
         proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = Spare",a_bigbuf);
         proto_tree_add_text(subtree,tvb, curr_offset, 2,"Single channel : ARFCN %d",arfcn);
     }
-       
+
     curr_offset = curr_offset + 2;
 
     return(curr_offset - offset);
@@ -1685,7 +1685,7 @@ de_rr_ch_dsc2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gc
     proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = Timeslot: %d",a_bigbuf,(oct8 & 0x07));
 
     curr_offset +=1;
-       
+
     /* Octet 3 */
     oct8 = tvb_get_guint8(tvb, curr_offset);
     other_decode_bitfield_value(a_bigbuf, oct8, 0xe0, 8);
@@ -1715,7 +1715,7 @@ de_rr_ch_dsc2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gc
         proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = Spare",a_bigbuf);
         proto_tree_add_text(subtree,tvb, curr_offset, 2,"Single channel : ARFCN %d",arfcn);
     }
-       
+
     curr_offset = curr_offset + 2;
 
     return(curr_offset - offset);
@@ -1769,7 +1769,7 @@ de_rr_ch_dsc3(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gc
         proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = Spare",a_bigbuf);
         proto_tree_add_text(subtree,tvb, curr_offset, 2,"Single channel : ARFCN %d",arfcn);
     }
-       
+
     curr_offset = curr_offset + 2;
 
     return(curr_offset - offset);
@@ -2104,7 +2104,7 @@ de_rr_ctrl_ch_desc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U
 /* [3] 10.5.2.11a DTM Information Details
  */
 /*
- * [3]  10.5.2.11b     Dynamic ARFCN Mapping   
+ * [3]  10.5.2.11b     Dynamic ARFCN Mapping
  */
 static const value_string gsm_a_rr_gsm_band_vals[] = {
     {  0, "GSM 750"},
@@ -2190,7 +2190,7 @@ de_rr_freq_ch_seq(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_
  */
 /*
  * [3] 10.5.2.13 Frequency List
- * 
+ *
  * Bit Bit Bit Bit Bit format notation
  * 8 7  4 3 2
  * 0 0  X X X bit map 0
@@ -2200,7 +2200,7 @@ de_rr_freq_ch_seq(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_
  * 1 0  1 1 0 128 range
  * 1 0  1 1 1 variable bit map
  */
-/* The mask 0xce (1100 1110) will produce the result 0110 0111*/ 
+/* The mask 0xce (1100 1110) will produce the result 0110 0111*/
 static const value_string gsm_a_rr_freq_list_format_id_vals[] = {
     { 0x00, "bit map 0"},
     { 0x02, "bit map 0"},
@@ -2404,7 +2404,7 @@ de_rr_rest_oct_gprs_power_control_parameters(tvbuff_t *tvb, proto_tree *tree, gi
     proto_tree *subtree;
     proto_item *item;
     gint curr_bit_offset;
-       
+
     curr_bit_offset = bit_offset;
 
     item = proto_tree_add_text(tree, tvb, curr_bit_offset>>3, -1, "%s", gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_GPRS_POWER_CONTROL_PARAMS].strptr);
@@ -2434,7 +2434,7 @@ de_rr_gprs_broadcast_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint
     bit_offset = curr_offset << 3;
 
     bit_offset += de_rr_rest_oct_gprs_cell_options(tvb, tree, bit_offset);
-    bit_offset += de_rr_rest_oct_gprs_power_control_parameters(tvb, tree, bit_offset);  
+    bit_offset += de_rr_rest_oct_gprs_power_control_parameters(tvb, tree, bit_offset);
     curr_offset += len;
 
     return (curr_offset - offset);
@@ -2644,10 +2644,10 @@ de_rr_meas_res(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, g
     curr_offset++;
 
     /* 3rd octet */
-    /* 3G-BA-USED */ 
+    /* 3G-BA-USED */
     proto_tree_add_bits_item(subtree, hf_gsm_a_rr_3g_ba_used, tvb, curr_offset<<3, 1, FALSE);
     /* MEAS-VALID */
-    proto_tree_add_item(subtree, hf_gsm_a_rr_meas_valid, tvb, curr_offset, 1, FALSE);  
+    proto_tree_add_item(subtree, hf_gsm_a_rr_meas_valid, tvb, curr_offset, 1, FALSE);
     /* RXLEV-SUB-SERVING-CELL */
     proto_tree_add_item(subtree, hf_gsm_a_rr_rxlev_sub_serv_cell, tvb, curr_offset, 1, FALSE);
 
@@ -3233,12 +3233,12 @@ de_rr_packet_ch_desc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len
     proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = Timeslot: %d",a_bigbuf,(oct8 & 0x07));
 
     curr_offset +=1;
-       
+
     /* Octet 3 */
     oct8 = tvb_get_guint8(tvb, curr_offset);
     other_decode_bitfield_value(a_bigbuf, oct8, 0xe0, 8);
     proto_tree_add_text(subtree,tvb, curr_offset, 1,"%s = Training Sequence: %d",a_bigbuf,((oct8 & 0xe0)>>5));
-       
+
     if ((oct8 & 0x10) == 0x10)
     {
         /* Hopping sequence */
@@ -4044,7 +4044,7 @@ de_rr_si2quater_meas_info_utran_fdd_desc(tvbuff_t *tvb, proto_tree *tree, gint b
     gint xdd_cell_info, wsize, nwi, jwi, w[64], i, iused, xdd_indic0;
     guint8 value;
 
-    curr_bit_offset = bit_offset; 
+    curr_bit_offset = bit_offset;
 
     item = proto_tree_add_text(tree, tvb, curr_bit_offset>>3, -1, "%s", gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_UTRAN_FDD_DESC].strptr);
     subtree = proto_item_add_subtree(item, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_UTRAN_FDD_DESC]);
@@ -4132,7 +4132,7 @@ de_rr_si2quater_meas_info_utran_tdd_desc(tvbuff_t *tvb, proto_tree *tree, gint b
     gint xdd_cell_info, wsize, nwi, jwi, w[64], i, iused, xdd_indic0;
     guint8 value;
 
-    curr_bit_offset = bit_offset; 
+    curr_bit_offset = bit_offset;
 
     item = proto_tree_add_text(tree, tvb, curr_bit_offset>>3, -1, "%s", gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_UTRAN_TDD_DESC].strptr);
     subtree = proto_item_add_subtree(item, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_UTRAN_TDD_DESC]);
@@ -5055,7 +5055,7 @@ de_rr_si3_rest_oct(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, g
         proto_tree_add_bits_item(subtree, hf_gsm_a_rr_si13alt_position, tvb, bit_offset, 1, FALSE);
         bit_offset += 1;
     }
-   
+
     curr_offset = curr_offset + len;
 
     return curr_offset-offset;
@@ -5867,7 +5867,7 @@ de_rr_si13_rest_oct(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len,
             proto_tree_add_bits_item(subtree, hf_gsm_a_rr_network_control_order, tvb, bit_offset, 2, FALSE);
             bit_offset += 2;
             bit_offset += de_rr_rest_oct_gprs_cell_options(tvb, subtree, bit_offset);
-            bit_offset += de_rr_rest_oct_gprs_power_control_parameters(tvb, subtree, bit_offset);  
+            bit_offset += de_rr_rest_oct_gprs_power_control_parameters(tvb, subtree, bit_offset);
         }
         if (gsm_a_rr_is_bit_high(tvb,bit_offset) == TRUE)
         { /* Additions in release 99 */
@@ -6166,7 +6166,7 @@ de_rr_ext_meas_freq_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint
    curr_offset = offset;
 
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_seq_code, tvb,(curr_offset<<3)+3, 1, FALSE);
-   
+
    return dissect_arfcn_list(tvb, tree, offset, 16, add_string, string_len);
 }
 
@@ -6201,8 +6201,8 @@ de_rr_sus_cau(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gc
  * [3] 10.5.2.48 APDU ID
  */
 static const value_string gsm_a_rr_apdu_id_vals[] = {
-       { 0, "RRLP (GSM 04.31) LCS" },
-       { 0, NULL },
+    { 0, "RRLP (GSM 04.31) LCS" },
+    { 0, NULL },
 };
 static guint16
 de_rr_apdu_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
@@ -6216,9 +6216,9 @@ de_rr_apdu_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gc
  * [3] 10.5.2.49 APDU Flags
  */
 static const value_string gsm_a_rr_apdu_flags_vals[] = {
-       { 1, "Last or only segment" },
-       { 2, "First or only segment" },
-       { 0, NULL },
+    { 1, "Last or only segment" },
+    { 2, "First or only segment" },
+    { 0, NULL },
 };
 static guint16
 de_rr_apdu_flags(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
@@ -6257,7 +6257,7 @@ de_rr_ho_to_utran_cmd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len
     {
         rrc_irat_ho_to_utran_cmd_tvb = tvb_new_subset(tvb, curr_offset, len, len);
         if (rrc_irat_ho_to_utran_cmd_handle && gsm_a_dtap_pinfo)
-                       /* gsm_a_dtap_pinfo MUST be set by any dissector calling de_rr_ho_to_utran_cmd */
+            /* gsm_a_dtap_pinfo MUST be set by any dissector calling de_rr_ho_to_utran_cmd */
             call_dissector(rrc_irat_ho_to_utran_cmd_handle, rrc_irat_ho_to_utran_cmd_tvb, gsm_a_dtap_pinfo, tree);
     }
 
@@ -8570,7 +8570,7 @@ dissect_ccch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_L2_PSEUDO_LEN);
     tree = saved_tree;
     offset = saved_offset;
-       len = curr_len;
+    len = curr_len;
 
     oct_1_item =
        proto_tree_add_text(ccch_tree,
@@ -10134,7 +10134,7 @@ proto_register_gsm_a_rr(void)
             }
        };
 
-       /* Setup protocol subtree array */
+    /* Setup protocol subtree array */
 #define        NUM_INDIVIDUAL_ELEMS    3
     gint *ett[NUM_INDIVIDUAL_ELEMS +
               NUM_GSM_DTAP_MSG_RR +
index b9161e00a559eeac9b6409c1205f22cd99cbb2d0..c2bb982aacfd7c8365d54a30d6c440a40392674b 100644 (file)
@@ -157,7 +157,7 @@ static gint hf_gsm_sms_tp_cdl = -1;
 static gint hf_gsm_sms_tp_cd = -1;
 static gint hf_gsm_sms_tp_ud = -1;
 #endif
+
 static gboolean msg_udh_frag = FALSE;
 static char bigbuf[1024];
 static packet_info *g_pinfo;
@@ -173,22 +173,22 @@ static proto_tree *g_tree;
 
 /* Coding Group Bits */
 static const value_string gsm_sms_coding_group_bits_vals[] = {
-       { 0,    "General Data Coding indication" }, /* 00xx */
-       { 1,    "General Data Coding indication" }, /* 00xx */
-       { 2,    "General Data Coding indication" }, /* 00xx */
-       { 3,    "General Data Coding indication" }, /* 00xx */
-       { 4,    "Message Marked for Automatic Deletion Group" }, /* 01xx */
-       { 5,    "Message Marked for Automatic Deletion Group" }, /* 01xx */
-       { 6,    "Message Marked for Automatic Deletion Group" }, /* 01xx */
-       { 7,    "Message Marked for Automatic Deletion Group" }, /* 01xx */
-       { 8,    "Reserved coding groups" },                     /* 1000..1011  */
-       { 9,    "Reserved coding groups" },                     /* 1000..1011  */
-       { 10,   "Reserved coding groups" },                     /* 1000..1011  */
-       { 11,   "Reserved coding groups" },                     /* 1000..1011  */
-       { 12,   "Message Waiting Indication Group: Discard Message" },/* 1100  */
-       { 13,   "Message Waiting Indication Group: Store Message" },  /* 1101  */
-       { 14,   "Message Waiting Indication Group: Store Message" },  /* 1110  */
-       { 15,   "Data coding/message class" },  /* 1111  */
+    { 0,       "General Data Coding indication" },                     /* 00xx */
+    { 1,       "General Data Coding indication" },                     /* 00xx */
+    { 2,       "General Data Coding indication" },                     /* 00xx */
+    { 3,       "General Data Coding indication" },                     /* 00xx */
+    { 4,       "Message Marked for Automatic Deletion Group" },        /* 01xx */
+    { 5,       "Message Marked for Automatic Deletion Group" },        /* 01xx */
+    { 6,       "Message Marked for Automatic Deletion Group" },        /* 01xx */
+    { 7,       "Message Marked for Automatic Deletion Group" },        /* 01xx */
+    { 8,       "Reserved coding groups" },                             /* 1000..1011  */
+    { 9,       "Reserved coding groups" },                             /* 1000..1011  */
+    { 10,      "Reserved coding groups" },                             /* 1000..1011  */
+    { 11,      "Reserved coding groups" },                             /* 1000..1011  */
+    { 12,      "Message Waiting Indication Group: Discard Message" },  /* 1100  */
+    { 13,      "Message Waiting Indication Group: Store Message" },    /* 1101  */
+    { 14,      "Message Waiting Indication Group: Store Message" },    /* 1110  */
+    { 15,      "Data coding/message class" },  /* 1111  */
     { 0, NULL },
 };
 
@@ -220,31 +220,31 @@ static int hf_gsm_sms_ud_reassembled_in = -1;
 static int hf_gsm_sms_ud_reassembled_length = -1;
 
 static const fragment_items sm_frag_items = {
-       /* Fragment subtrees */
-       &ett_gsm_sms_ud_fragment,
-       &ett_gsm_sms_ud_fragments,
-       /* Fragment fields */
-       &hf_gsm_sms_ud_fragments,
-       &hf_gsm_sms_ud_fragment,
-       &hf_gsm_sms_ud_fragment_overlap,
-       &hf_gsm_sms_ud_fragment_overlap_conflicts,
-       &hf_gsm_sms_ud_fragment_multiple_tails,
-       &hf_gsm_sms_ud_fragment_too_long_fragment,
-       &hf_gsm_sms_ud_fragment_error,
-       /* Reassembled in field */
-       &hf_gsm_sms_ud_reassembled_in,
-       /* Reassembled length field */
-       &hf_gsm_sms_ud_reassembled_length,
-       /* Tag */
-       "Short Message fragments"
+    /* Fragment subtrees */
+    &ett_gsm_sms_ud_fragment,
+    &ett_gsm_sms_ud_fragments,
+    /* Fragment fields */
+    &hf_gsm_sms_ud_fragments,
+    &hf_gsm_sms_ud_fragment,
+    &hf_gsm_sms_ud_fragment_overlap,
+    &hf_gsm_sms_ud_fragment_overlap_conflicts,
+    &hf_gsm_sms_ud_fragment_multiple_tails,
+    &hf_gsm_sms_ud_fragment_too_long_fragment,
+    &hf_gsm_sms_ud_fragment_error,
+    /* Reassembled in field */
+    &hf_gsm_sms_ud_reassembled_in,
+    /* Reassembled length field */
+    &hf_gsm_sms_ud_reassembled_length,
+    /* Tag */
+    "Short Message fragments"
 };
 
 
 static void
 gsm_sms_defragment_init (void)
 {
-       fragment_table_init (&g_sm_fragment_table);
-       reassembled_table_init(&g_sm_reassembled_table);
+    fragment_table_init (&g_sm_fragment_table);
+    reassembled_table_init(&g_sm_reassembled_table);
 }
 
 /*
@@ -289,38 +289,38 @@ static const value_string vp_type_strings[] = {
 };
 
 static const true_false_string mms_bool_strings = {
-       "No more messages are waiting for the MS in this SC",
-       "More messages are waiting for the MS in this SC"
+    "No more messages are waiting for the MS in this SC",
+    "More messages are waiting for the MS in this SC"
 };
 
 static const true_false_string sri_bool_strings = {
-       "A status report shall be returned to the SME",
-       "A status report shall not be returned to the SME"
+    "A status report shall be returned to the SME",
+    "A status report shall not be returned to the SME"
 };
 
 static const true_false_string srr_bool_strings = {
-       "A status report is requested",
-       "A status report is not requested"
+    "A status report is requested",
+    "A status report is not requested"
 };
 
 static const true_false_string udhi_bool_strings = {
-       "The beginning of the TP UD field contains a Header in addition to the short message",
-       "The TP UD field contains only the short message"
+    "The beginning of the TP UD field contains a Header in addition to the short message",
+    "The TP UD field contains only the short message"
 };
 
 static const true_false_string rp_bool_strings = {
-       "TP Reply Path parameter is set in this SMS SUBMIT/DELIVER",
-       "TP Reply Path parameter is not set in this SMS SUBMIT/DELIVER"
+    "TP Reply Path parameter is set in this SMS SUBMIT/DELIVER",
+    "TP Reply Path parameter is not set in this SMS SUBMIT/DELIVER"
 };
 
 static const true_false_string rd_bool_strings = {
-       "Instruct SC to reject duplicates",
-       "Instruct SC to accept duplicates"
+    "Instruct SC to reject duplicates",
+    "Instruct SC to accept duplicates"
 };
 
 static const true_false_string srq_bool_strings = {
-       "The SMS STATUS REPORT is the result of an SMS COMMAND e.g. an Enquiry.",
-       "SMS STATUS REPORT is the result of a SMS SUBMIT."
+    "The SMS STATUS REPORT is the result of an SMS COMMAND e.g. an Enquiry.",
+    "SMS STATUS REPORT is the result of a SMS SUBMIT."
 };
 
 #define        NUM_UDH_IEIS    256
@@ -653,16 +653,14 @@ dis_field_dcs(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint8 oct,
     *ucs2 = FALSE;
     *compressed = FALSE;
 
-    item =
-       proto_tree_add_item(tree, hf_gsm_sms_tp_dcs, tvb,
-           offset, 1, FALSE);
+    item = proto_tree_add_item(tree, hf_gsm_sms_tp_dcs, tvb, offset, 1, FALSE);
 
     subtree = proto_item_add_subtree(item, ett_dcs);
-       if(oct&0x80){
-               proto_tree_add_item(subtree, hf_gsm_sms_coding_group_bits4, tvb, offset, 1, FALSE);
-       }else{
-               proto_tree_add_item(subtree, hf_gsm_sms_coding_group_bits2, tvb, offset, 1, FALSE);
-       }
+    if (oct&0x80) {
+        proto_tree_add_item(subtree, hf_gsm_sms_coding_group_bits4, tvb, offset, 1, FALSE);
+    } else {
+        proto_tree_add_item(subtree, hf_gsm_sms_coding_group_bits2, tvb, offset, 1, FALSE);
+    }
 
     if (oct == 0x00)
     {
@@ -1695,23 +1693,23 @@ dis_iei_csm8(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint8 length)
 
     EXACT_DATA_CHECK(length, 3);
     oct = tvb_get_guint8(tvb, offset);
-       g_sm_id = oct;  
-       proto_tree_add_uint (tree,
-                                                       hf_gsm_sms_ud_multiple_messages_msg_id,
-                                                       tvb, offset, 1, g_sm_id);
-       offset++;
+    g_sm_id = oct;
+    proto_tree_add_uint (tree,
+                         hf_gsm_sms_ud_multiple_messages_msg_id,
+                         tvb, offset, 1, g_sm_id);
+    offset++;
 
-       oct = tvb_get_guint8(tvb, offset);
-       g_frags = oct;
-       proto_tree_add_uint (tree,
-                                                       hf_gsm_sms_ud_multiple_messages_msg_parts,
-                                                       tvb , offset , 1, g_frags);
-       offset++;
-       oct = tvb_get_guint8(tvb, offset);
-       g_frag = oct;
-       proto_tree_add_uint (tree,
-                                                       hf_gsm_sms_ud_multiple_messages_msg_part,
-                                                       tvb, offset, 1, g_frag);
+    oct = tvb_get_guint8(tvb, offset);
+    g_frags = oct;
+    proto_tree_add_uint (tree,
+                         hf_gsm_sms_ud_multiple_messages_msg_parts,
+                         tvb , offset , 1, g_frags);
+    offset++;
+    oct = tvb_get_guint8(tvb, offset);
+    g_frag = oct;
+    proto_tree_add_uint (tree,
+                         hf_gsm_sms_ud_multiple_messages_msg_part,
+                         tvb, offset, 1, g_frag);
 
 }
 
@@ -1728,7 +1726,7 @@ dis_iei_apa_8bit(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint8 length)
     EXACT_DATA_CHECK(length, 2);
 
     oct = tvb_get_guint8(tvb, offset);
-       g_port_dst = oct;
+    g_port_dst = oct;
     if (oct < 240)
     {
        str = "Reserved";
@@ -1746,7 +1744,7 @@ dis_iei_apa_8bit(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint8 length)
 
     offset++;
     oct = tvb_get_guint8(tvb, offset);
-       g_port_src = oct;
+    g_port_src = oct;
     if (oct < 240)
     {
        str = "Reserved";
@@ -1774,7 +1772,7 @@ dis_iei_apa_16bit(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint8 length
     EXACT_DATA_CHECK(length, 4);
 
     value = tvb_get_ntohs(tvb, offset);
-       g_port_dst = value;
+    g_port_dst = value;
     if (value < 16000)
     {
        str = "As allocated by IANA (http://www.IANA.com/)";
@@ -1796,7 +1794,7 @@ dis_iei_apa_16bit(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint8 length
 
     offset += 2;
     value = tvb_get_ntohs(tvb, offset);
-       g_port_src = value;
+    g_port_src = value;
     if (value < 16000)
     {
        str = "As allocated by IANA (http://www.IANA.com/)";
@@ -1827,88 +1825,88 @@ dis_iei_scp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint8 length)
 
     EXACT_DATA_CHECK(length, 1);
 
-       oct = tvb_get_guint8(tvb, offset);
+    oct = tvb_get_guint8(tvb, offset);
 
-       if (oct & 0x01)
-       {
-               proto_tree_add_text(tree,
-               tvb, offset, 1,
-               "Status Report for short message transaction completed");
-       }
-       else
-       {
-               proto_tree_add_text(tree,
-               tvb, offset, 1,
-               "No Status Report for short message transaction completed");
-       }
+    if (oct & 0x01)
+    {
+        proto_tree_add_text(tree,
+                            tvb, offset, 1,
+                            "Status Report for short message transaction completed");
+    }
+    else
+    {
+        proto_tree_add_text(tree,
+                            tvb, offset, 1,
+                            "No Status Report for short message transaction completed");
+    }
 
-       if (oct & 0x02)
-       {
-               proto_tree_add_text(tree,
-               tvb, offset, 1,
-               "Status Report for permanent error when SC is not making any more transfer attempts");
-       }
-       else
-       {
-               proto_tree_add_text(tree,
-               tvb, offset, 1,
-               "No Status Report for permanent error when SC is not making any more transfer attempts");
-       }
+    if (oct & 0x02)
+    {
+        proto_tree_add_text(tree,
+                            tvb, offset, 1,
+                            "Status Report for permanent error when SC is not making any more transfer attempts");
+    }
+    else
+    {
+        proto_tree_add_text(tree,
+                            tvb, offset, 1,
+                            "No Status Report for permanent error when SC is not making any more transfer attempts");
+    }
 
-       if (oct & 0x04)
-       {
-               proto_tree_add_text(tree,
-               tvb, offset, 1,
-               "Status Report for temporary error when SC is not making any more transfer attempts");
-       }
-       else
-       {
-               proto_tree_add_text(tree,
-               tvb, offset, 1,
-               "No Status Report for temporary error when SC is not making any more transfer attempts");
-       }
+    if (oct & 0x04)
+    {
+        proto_tree_add_text(tree,
+                            tvb, offset, 1,
+                            "Status Report for temporary error when SC is not making any more transfer attempts");
+    }
+    else
+    {
+        proto_tree_add_text(tree,
+                            tvb, offset, 1,
+                            "No Status Report for temporary error when SC is not making any more transfer attempts");
+    }
 
-       if (oct & 0x08)
-       {
+    if (oct & 0x08)
+    {
 
-               proto_tree_add_text(tree,
-               tvb, offset, 1,
-               "Status Report for temporary error when SC is still trying to transfer SM");
-       }
-       else
-       {
-               proto_tree_add_text(tree,
-               tvb, offset, 1,
-               "No Status Report for temporary error when SC is still trying to transfer SM");
-       }
+        proto_tree_add_text(tree,
+                            tvb, offset, 1,
+                            "Status Report for temporary error when SC is still trying to transfer SM");
+    }
+    else
+    {
+        proto_tree_add_text(tree,
+                            tvb, offset, 1,
+                            "No Status Report for temporary error when SC is still trying to transfer SM");
+    }
 
-       if (oct & 0x40)
-       {
+    if (oct & 0x40)
+    {
 
-               proto_tree_add_text(tree,
-               tvb, offset, 1,
-               "A Status Report generated by this Short Message, due to a permanent error or last temporary error, cancels the SRR of the rest of the Short Messages in a concatenated message");
-       }
-       else
-       {
-               proto_tree_add_text(tree,
-               tvb, offset, 1,
-               "No activation");
-       }
+        proto_tree_add_text(tree,
+                            tvb, offset, 1,
+                            "A Status Report generated by this Short Message, due to a permanent error or last temporary error, cancels the SRR of the rest of the Short Messages in a concatenated message");
+    }
+    else
+    {
+        proto_tree_add_text(tree,
+                            tvb, offset, 1,
+                            "No activation");
+    }
 
-       if (oct & 0x80)
-       {
+    if (oct & 0x80)
+    {
 
-               proto_tree_add_text(tree,
-               tvb, offset, 1,
-               "Include original UDH into the Status Report");
-       }
-       else
-       {
-               proto_tree_add_text(tree,
-               tvb, offset, 1,
-               "Do not include original UDH into the Status Report");
-       }
+        proto_tree_add_text(tree,
+                            tvb, offset, 1,
+                            "Include original UDH into the Status Report");
+    }
+    else
+    {
+        proto_tree_add_text(tree,
+                            tvb, offset, 1,
+                            "Do not include original UDH into the Status Report");
+    }
 
 }
 
@@ -1920,264 +1918,264 @@ dis_iei_udh_si(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint8 length)
 
     EXACT_DATA_CHECK(length, 1);
 
-       oct = tvb_get_guint8(tvb, offset);
+    oct = tvb_get_guint8(tvb, offset);
 
-       switch (oct)
-       {
-               case 1:
-                       proto_tree_add_text(tree,
-                       tvb, offset, 1,
-                       "The following part of the UDH is created by the original sender (valid in case of Status Report)");
-               break;
-               case 2:
-                       proto_tree_add_text(tree,
-                       tvb, offset, 1,
-                       "The following part of the UDH is created by the original receiver (valid in case of Status Report)");
-               break;
-               case 3:
-                       proto_tree_add_text(tree,
-                       tvb, offset, 1,
-                       "The following part of the UDH is created by the SMSC (can occur in any message or report)");
-               break;
-               default:
-                       proto_tree_add_text(tree,
-                       tvb, offset, 1,
-                       "The following part of the UDH is created by %d" , oct);
-               break;
-       }       
+    switch (oct)
+    {
+        case 1:
+            proto_tree_add_text(tree,
+                                tvb, offset, 1,
+                                "The following part of the UDH is created by the original sender (valid in case of Status Report)");
+            break;
+        case 2:
+            proto_tree_add_text(tree,
+                                tvb, offset, 1,
+                                "The following part of the UDH is created by the original receiver (valid in case of Status Report)");
+            break;
+        case 3:
+            proto_tree_add_text(tree,
+                                tvb, offset, 1,
+                                "The following part of the UDH is created by the SMSC (can occur in any message or report)");
+            break;
+        default:
+            proto_tree_add_text(tree,
+                                tvb, offset, 1,
+                                "The following part of the UDH is created by %d" , oct);
+            break;
+    }
 }
 /* 9.2.3.24.8 */
 static void
 dis_iei_csm16(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint8 length)
 {
     guint8     oct;
-       guint16 oct_ref;
+    guint16    oct_ref;
 
     EXACT_DATA_CHECK(length, 4);
     oct_ref = tvb_get_ntohs(tvb, offset);
-       g_sm_id = oct_ref;
-       proto_tree_add_uint (tree,
-                                                       hf_gsm_sms_ud_multiple_messages_msg_id,
-                                                       tvb, offset, 2, g_sm_id);
-       offset+=2;
-       oct = tvb_get_guint8(tvb, offset);
-       g_frags = oct;
-       proto_tree_add_uint (tree,
-                                                       hf_gsm_sms_ud_multiple_messages_msg_parts,
-                                                       tvb , offset , 1, g_frags);
+    g_sm_id = oct_ref;
+    proto_tree_add_uint (tree,
+                         hf_gsm_sms_ud_multiple_messages_msg_id,
+                         tvb, offset, 2, g_sm_id);
+    offset+=2;
+    oct = tvb_get_guint8(tvb, offset);
+    g_frags = oct;
+    proto_tree_add_uint (tree,
+                         hf_gsm_sms_ud_multiple_messages_msg_parts,
+                         tvb , offset , 1, g_frags);
 
-       offset++;
-       oct = tvb_get_guint8(tvb, offset);
-       g_frag = oct;
-       proto_tree_add_uint (tree,
-                                                       hf_gsm_sms_ud_multiple_messages_msg_part,
-                                                       tvb, offset, 1, g_frag);
+    offset++;
+    oct = tvb_get_guint8(tvb, offset);
+    g_frag = oct;
+    proto_tree_add_uint (tree,
+                         hf_gsm_sms_ud_multiple_messages_msg_part,
+                         tvb, offset, 1, g_frag);
 }
 
 /* 9.2.3.24.10.1.1 */
 static void
 dis_iei_tf(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint8 length)
 {
-       const gchar *str = NULL;
+    const gchar *str = NULL;
     guint8     oct;
-       proto_item      *item;
-       proto_item      *item_colour;
-    proto_tree *subtree = NULL; 
-       proto_tree      *subtree_colour = NULL;
-       
+    proto_item *item;
+    proto_item *item_colour;
+    proto_tree *subtree = NULL;
+    proto_tree *subtree_colour = NULL;
+
 
     EXACT_DATA_CHECK(length, 4);
     oct = tvb_get_guint8(tvb, offset);
-       
-       proto_tree_add_text(tree,
-       tvb, offset, 1,
-       "Start position of the text formatting: %d",
-       oct);
-       offset++;
 
-       oct = tvb_get_guint8(tvb, offset);
-       
-       proto_tree_add_text(tree,
-       tvb, offset, 1,
-       "Text formatting length: %d",
-       oct);
-       offset++;
+    proto_tree_add_text(tree,
+                        tvb, offset, 1,
+                        "Start position of the text formatting: %d",
+                        oct);
+    offset++;
 
-       oct = tvb_get_guint8(tvb, offset);
-       
-       item =
-           proto_tree_add_text(tree,
-               tvb, offset, 1,
-               "formatting mode");
+    oct = tvb_get_guint8(tvb, offset);
 
-       subtree = proto_item_add_subtree(item, ett_udh_tfm);
-       switch(oct & 0x03)
-       {
-               case 0x00:
-                       str = "Left";
-               break;
-               case 0x01:
-                       str = "Center";
-               break;
-               case 0x02:
-                       str = "Right";
-               break;
-               case 0x03:
-                       str = "Language dependent";
-               break;
-       }
+    proto_tree_add_text(tree,
+                        tvb, offset, 1,
+                        "Text formatting length: %d",
+                        oct);
+    offset++;
 
-       proto_tree_add_text(subtree,
-       tvb, offset, 1,
-       "Alignment : %d %s",
-        oct & 0x03 , str);
+    oct = tvb_get_guint8(tvb, offset);
 
-       switch((oct >> 2) & 0x03)
-       {
-               case 0x00:
-                       str = "Normal";
-               break;
-               case 0x01:
-                       str = "Large";
-               break;
-               case 0x02:
-                       str = "Small";
-               break;
-               case 0x03:
-                       str = "reserved";
-               break;
-       }
+    item =
+        proto_tree_add_text(tree,
+                            tvb, offset, 1,
+                            "formatting mode");
 
-       proto_tree_add_text(subtree,
-       tvb, offset, 1,
-       "Font Size : %d %s",
-        (oct >> 2) & 0x03 , str);
-       
-       if(oct & 0x10)
-               str = "on";
-       else
-               str = "off";
-       proto_tree_add_text(subtree,
-       tvb, offset, 1,
-       "Style bold : %d %s",
-        oct & 0x10 , str);
-       
-       if(oct & 0x20)
-               str = "on";
-       else
-               str = "off";
-       proto_tree_add_text(subtree,
-       tvb, offset, 1,
-       "Style Italic : %d %s",
-        oct & 0x20 , str);
+    subtree = proto_item_add_subtree(item, ett_udh_tfm);
+    switch(oct & 0x03)
+    {
+        case 0x00:
+            str = "Left";
+            break;
+        case 0x01:
+            str = "Center";
+            break;
+        case 0x02:
+            str = "Right";
+            break;
+        case 0x03:
+            str = "Language dependent";
+            break;
+    }
 
-       if(oct & 0x40)
-               str = "on";
-       else
-               str = "off";
-       proto_tree_add_text(subtree,
-       tvb, offset, 1,
-       "Style Underlined : %d %s",
-        oct & 0x40 , str);
+    proto_tree_add_text(subtree,
+                        tvb, offset, 1,
+                        "Alignment : %d %s",
+                        oct & 0x03 , str);
 
-       if(oct & 0x80)
-               str = "on";
-       else
-               str = "off";
-       proto_tree_add_text(subtree,
-       tvb, offset, 1,
-       "Style Strikethrough : %d %s",
-        oct & 0x80 , str);
+    switch((oct >> 2) & 0x03)
+    {
+        case 0x00:
+            str = "Normal";
+            break;
+        case 0x01:
+            str = "Large";
+            break;
+        case 0x02:
+            str = "Small";
+            break;
+        case 0x03:
+            str = "reserved";
+            break;
+    }
 
-       offset++;
-       oct = tvb_get_guint8(tvb, offset);
-       item_colour =
-           proto_tree_add_text(tree,
-               tvb, offset, 1,
-               "Text Colour");
+    proto_tree_add_text(subtree,
+                        tvb, offset, 1,
+                        "Font Size : %d %s",
+                        (oct >> 2) & 0x03 , str);
 
-       subtree_colour = proto_item_add_subtree(item_colour, ett_udh_tfc);
-       switch(oct & 0x0f)
-       {
-               case 0x00:
-                       str = "Dark Grey";
-               break;
-               case 0x01:
-                       str = "Dark Red";
-               break;
-                       str = "Dark Yellow";
-               break;
-                       str = "Dark Green";
-               break;
-                       str = "Dark Cyan";
-               break;
-                       str = "Dark Blue";
-               break;
-                       str = "Dark Magenta";
-               break;
-                       str = "Grey";
-               break;
-                       str = "White";
-               break;
-                       str = "Bright Red";
-               break;
-                       str = "Bright Yellow";
-               break;
-                       str = "Bright Green";
-               break;
-                       str = "Bright Cyan";
-               break;
-                       str = "Bright Blue";
-               break;
-                       str = "Bright Magenta";
-               break;
-       }
+    if(oct & 0x10)
+        str = "on";
+    else
+        str = "off";
+    proto_tree_add_text(subtree,
+                        tvb, offset, 1,
+                        "Style bold : %d %s",
+                        oct & 0x10 , str);
 
-       proto_tree_add_text(subtree_colour,
-       tvb, offset, 1,
-       "Foreground Colour : %d %s",
-        oct & 0x0f , str);
-       
-       switch((oct >> 4) & 0x0f)
-       {
-               case 0x00:
-                       str = "Dark Grey";
-               break;
-               case 0x01:
-                       str = "Dark Red";
-               break;
-                       str = "Dark Yellow";
-               break;
-                       str = "Dark Green";
-               break;
-                       str = "Dark Cyan";
-               break;
-                       str = "Dark Blue";
-               break;
-                       str = "Dark Magenta";
-               break;
-                       str = "Grey";
-               break;
-                       str = "White";
-               break;
-                       str = "Bright Red";
-               break;
-                       str = "Bright Yellow";
-               break;
-                       str = "Bright Green";
-               break;
-                       str = "Bright Cyan";
-               break;
-                       str = "Bright Blue";
-               break;
-                       str = "Bright Magenta";
-               break;
-       }
+    if(oct & 0x20)
+        str = "on";
+    else
+        str = "off";
+    proto_tree_add_text(subtree,
+                        tvb, offset, 1,
+                        "Style Italic : %d %s",
+                        oct & 0x20 , str);
 
-       proto_tree_add_text(subtree_colour,
-       tvb, offset, 1,
-       "Background Colour : %d %s",
-        (oct >> 4) & 0x0f , str);
+    if(oct & 0x40)
+        str = "on";
+    else
+        str = "off";
+    proto_tree_add_text(subtree,
+                        tvb, offset, 1,
+                        "Style Underlined : %d %s",
+                        oct & 0x40 , str);
+
+    if(oct & 0x80)
+        str = "on";
+    else
+        str = "off";
+    proto_tree_add_text(subtree,
+                        tvb, offset, 1,
+                        "Style Strikethrough : %d %s",
+                        oct & 0x80 , str);
+
+    offset++;
+    oct = tvb_get_guint8(tvb, offset);
+    item_colour =
+        proto_tree_add_text(tree,
+                            tvb, offset, 1,
+                            "Text Colour");
+
+    subtree_colour = proto_item_add_subtree(item_colour, ett_udh_tfc);
+    switch(oct & 0x0f)
+    {
+        case 0x00:
+            str = "Dark Grey";
+            break;
+        case 0x01:
+            str = "Dark Red";
+            break;
+            str = "Dark Yellow";
+            break;
+            str = "Dark Green";
+            break;
+            str = "Dark Cyan";
+            break;
+            str = "Dark Blue";
+            break;
+            str = "Dark Magenta";
+            break;
+            str = "Grey";
+            break;
+            str = "White";
+            break;
+            str = "Bright Red";
+            break;
+            str = "Bright Yellow";
+            break;
+            str = "Bright Green";
+            break;
+            str = "Bright Cyan";
+            break;
+            str = "Bright Blue";
+            break;
+            str = "Bright Magenta";
+            break;
+    }
+
+    proto_tree_add_text(subtree_colour,
+                        tvb, offset, 1,
+                        "Foreground Colour : %d %s",
+                        oct & 0x0f , str);
+
+    switch((oct >> 4) & 0x0f)
+    {
+        case 0x00:
+            str = "Dark Grey";
+            break;
+        case 0x01:
+            str = "Dark Red";
+            break;
+            str = "Dark Yellow";
+            break;
+            str = "Dark Green";
+            break;
+            str = "Dark Cyan";
+            break;
+            str = "Dark Blue";
+            break;
+            str = "Dark Magenta";
+            break;
+            str = "Grey";
+            break;
+            str = "White";
+            break;
+            str = "Bright Red";
+            break;
+            str = "Bright Yellow";
+            break;
+            str = "Bright Green";
+            break;
+            str = "Bright Cyan";
+            break;
+            str = "Bright Blue";
+            break;
+            str = "Bright Magenta";
+            break;
+    }
+
+    proto_tree_add_text(subtree_colour,
+                        tvb, offset, 1,
+                        "Background Colour : %d %s",
+                        (oct >> 4) & 0x0f , str);
 
 }
 
@@ -2190,19 +2188,19 @@ dis_iei_ps(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint8 length)
 
     EXACT_DATA_CHECK(length, 2);
     oct = tvb_get_guint8(tvb, offset);
-       
-       proto_tree_add_text(tree,
-       tvb, offset, 1,
-       "position: %d",
-       oct);
-       offset++;
 
-       oct = tvb_get_guint8(tvb, offset);
-       
-       proto_tree_add_text(tree,
-       tvb, offset, 1,
-       "sound number: %d",
-       oct);
+    proto_tree_add_text(tree,
+                        tvb, offset, 1,
+                        "position: %d",
+                        oct);
+    offset++;
+
+    oct = tvb_get_guint8(tvb, offset);
+
+    proto_tree_add_text(tree,
+                        tvb, offset, 1,
+                        "sound number: %d",
+                        oct);
 }
 
 /* 9.2.3.24.10.1.3 */
@@ -2213,18 +2211,18 @@ dis_iei_uds(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint8 length)
 
     SHORT_DATA_CHECK(length, 2);
     oct = tvb_get_guint8(tvb, offset);
-       
-       proto_tree_add_text(tree,
-       tvb, offset, 1,
-       "position: %d",
-       oct);
-       offset++;
 
-       oct = tvb_get_guint8(tvb, offset);
-       
-       proto_tree_add_text(tree,
-       tvb, offset, length - 1,
-       "User Defined Sound ");
+    proto_tree_add_text(tree,
+                        tvb, offset, 1,
+                        "position: %d",
+                        oct);
+    offset++;
+
+    oct = tvb_get_guint8(tvb, offset);
+
+    proto_tree_add_text(tree,
+                        tvb, offset, length - 1,
+                        "User Defined Sound ");
 }
 
 
@@ -2236,19 +2234,19 @@ dis_iei_pa(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint8 length)
 
     EXACT_DATA_CHECK(length, 2);
     oct = tvb_get_guint8(tvb, offset);
-       
-       proto_tree_add_text(tree,
-       tvb, offset, 1,
-       "position: %d",
-       oct);
-       offset++;
 
-       oct = tvb_get_guint8(tvb, offset);
-       
-       proto_tree_add_text(tree,
-       tvb, offset, 1,
-       "animation number: %d",
-       oct);
+    proto_tree_add_text(tree,
+                        tvb, offset, 1,
+                        "position: %d",
+                        oct);
+    offset++;
+
+    oct = tvb_get_guint8(tvb, offset);
+
+    proto_tree_add_text(tree,
+                        tvb, offset, 1,
+                        "animation number: %d",
+                        oct);
 }
 
 
@@ -2260,18 +2258,18 @@ dis_iei_la(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint8 length)
 
     SHORT_DATA_CHECK(length, 2);
     oct = tvb_get_guint8(tvb, offset);
-       
-       proto_tree_add_text(tree,
-       tvb, offset, 1,
-       "position: %d",
-       oct);
-       offset++;
 
-       oct = tvb_get_guint8(tvb, offset);
-       
-       proto_tree_add_text(tree,
-       tvb, offset, length - 1,
-       "Large Animation ");
+    proto_tree_add_text(tree,
+                        tvb, offset, 1,
+                        "position: %d",
+                        oct);
+    offset++;
+
+    oct = tvb_get_guint8(tvb, offset);
+
+    proto_tree_add_text(tree,
+                        tvb, offset, length - 1,
+                        "Large Animation ");
 }
 
 /* 9.2.3.24.10.1.6 */
@@ -2282,18 +2280,18 @@ dis_iei_sa(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint8 length)
 
     SHORT_DATA_CHECK(length, 2);
     oct = tvb_get_guint8(tvb, offset);
-       
-       proto_tree_add_text(tree,
-       tvb, offset, 1,
-       "position: %d",
-       oct);
-       offset++;
 
-       oct = tvb_get_guint8(tvb, offset);
-       
-       proto_tree_add_text(tree,
-       tvb, offset, length - 1,
-       "Small Animation ");
+    proto_tree_add_text(tree,
+                        tvb, offset, 1,
+                        "position: %d",
+                        oct);
+    offset++;
+
+    oct = tvb_get_guint8(tvb, offset);
+
+    proto_tree_add_text(tree,
+                        tvb, offset, length - 1,
+                        "Small Animation ");
 }
 
 
@@ -2305,18 +2303,18 @@ dis_iei_lp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint8 length)
 
     SHORT_DATA_CHECK(length, 2);
     oct = tvb_get_guint8(tvb, offset);
-       
-       proto_tree_add_text(tree,
-       tvb, offset, 1,
-       "position: %d",
-       oct);
-       offset++;
 
-       oct = tvb_get_guint8(tvb, offset);
-       
-       proto_tree_add_text(tree,
-       tvb, offset, length - 1,
-       "Large Picture ");
+    proto_tree_add_text(tree,
+                        tvb, offset, 1,
+                        "position: %d",
+                        oct);
+    offset++;
+
+    oct = tvb_get_guint8(tvb, offset);
+
+    proto_tree_add_text(tree,
+                        tvb, offset, length - 1,
+                        "Large Picture ");
 }
 
 /* 9.2.3.24.10.1.8 */
@@ -2327,18 +2325,18 @@ dis_iei_sp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint8 length)
 
     SHORT_DATA_CHECK(length, 2);
     oct = tvb_get_guint8(tvb, offset);
-       
-       proto_tree_add_text(tree,
-       tvb, offset, 1,
-       "position: %d",
-       oct);
-       offset++;
 
-       oct = tvb_get_guint8(tvb, offset);
-       
-       proto_tree_add_text(tree,
-       tvb, offset, length - 1,
-       "Small Picture ");
+    proto_tree_add_text(tree,
+                        tvb, offset, 1,
+                        "position: %d",
+                        oct);
+    offset++;
+
+    oct = tvb_get_guint8(tvb, offset);
+
+    proto_tree_add_text(tree,
+                        tvb, offset, length - 1,
+                        "Small Picture ");
 }
 
 
@@ -2350,32 +2348,32 @@ dis_iei_vp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint8 length)
 
     SHORT_DATA_CHECK(length, 4);
     oct = tvb_get_guint8(tvb, offset);
-       
-       proto_tree_add_text(tree,
-       tvb, offset, 1,
-       "position: %d",
-       oct);
-       offset++;
 
-       oct = tvb_get_guint8(tvb, offset);
-       proto_tree_add_text(tree,
-       tvb, offset, 1,
-       "Horizontal dimension: %d",
-       oct);
-       offset++;
+    proto_tree_add_text(tree,
+                        tvb, offset, 1,
+                        "position: %d",
+                        oct);
+    offset++;
 
-       oct = tvb_get_guint8(tvb, offset);
-       proto_tree_add_text(tree,
-       tvb, offset, 1,
-       "Vertical dimension: %d",
-       oct);
-       offset++;
+    oct = tvb_get_guint8(tvb, offset);
+    proto_tree_add_text(tree,
+                        tvb, offset, 1,
+                        "Horizontal dimension: %d",
+                        oct);
+    offset++;
 
+    oct = tvb_get_guint8(tvb, offset);
+    proto_tree_add_text(tree,
+                        tvb, offset, 1,
+                        "Vertical dimension: %d",
+                        oct);
+    offset++;
 
-       oct = tvb_get_guint8(tvb, offset);
-       proto_tree_add_text(tree,
-       tvb, offset, length - 3,
-       "Variable Picture ");
+
+    oct = tvb_get_guint8(tvb, offset);
+    proto_tree_add_text(tree,
+                        tvb, offset, length - 3,
+                        "Variable Picture ");
 }
 
 /* 9.2.3.24.10.1.10 */
@@ -2386,12 +2384,12 @@ dis_iei_upi(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint8 length)
 
     EXACT_DATA_CHECK(length, 1);
     oct = tvb_get_guint8(tvb, offset);
-       
-       proto_tree_add_text(tree,
-       tvb, offset, 1,
-       "Number of corresponding objects: %d",
-       oct);
-       offset++;
+
+    proto_tree_add_text(tree,
+                        tvb, offset, 1,
+                        "Number of corresponding objects: %d",
+                        oct);
+    offset++;
 }
 
 
@@ -2417,94 +2415,94 @@ dis_field_ud_iei(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint8 length)
 
        switch (oct)
        {
-       case 0x00: str = "Concatenated short messages, 8-bit reference number (SMS Control)"; iei_fcn = dis_iei_csm8; break;
-       case 0x01: str = "Special SMS Message Indication (SMS Control)"; break;
-       case 0x02: str = "Reserved N/A"; break;
-       case 0x03: str = "Value not used to avoid misinterpretation as <LF> character N/A"; break;
-       case 0x04: str = "Application port addressing scheme, 8 bit address (SMS Control)"; iei_fcn = dis_iei_apa_8bit; break;
-       case 0x05: str = "Application port addressing scheme, 16 bit address (SMS Control)"; iei_fcn = dis_iei_apa_16bit; break;
-       case 0x06: str = "SMSC Control Parameters (SMS Control)"; iei_fcn = dis_iei_scp; break;
-       case 0x07: str = "UDH Source Indicator (SMS Control)"; iei_fcn  = dis_iei_udh_si; break;
-       case 0x08: str = "Concatenated short message, 16-bit reference number (SMS Control)"; iei_fcn = dis_iei_csm16; break;
-       case 0x09: str = "Wireless Control Message Protocol (SMS Control)"; break;
-       case 0x0A: str = "Text Formatting (EMS Control)"; iei_fcn = dis_iei_tf;
-       case 0x0B: str = "Predefined Sound (EMS Content)"; iei_fcn = dis_iei_ps;break;
-       case 0x0C: str = "User Defined Sound (iMelody max 128 bytes) (EMS Content)"; iei_fcn = dis_iei_uds;break;
-       case 0x0D: str = "Predefined Animation (EMS Content)"; iei_fcn = dis_iei_pa;break;
-       case 0x0E: str = "Large Animation (16*16 times 4 = 32*4 =128 bytes) (EMS Content)"; iei_fcn = dis_iei_la;break;
-       case 0x0F: str = "Small Animation (8*8 times 4 = 8*4 =32 bytes) (EMS Content)"; iei_fcn = dis_iei_sa;break;
-       case 0x10: str = "Large Picture (32*32 = 128 bytes) (EMS Content)"; iei_fcn = dis_iei_lp;break;
-       case 0x11: str = "Small Picture (16*16 = 32 bytes) (EMS Content)"; iei_fcn = dis_iei_sp;break;
-       case 0x12: str = "Variable Picture (EMS Content)"; iei_fcn = dis_iei_vp;break;
-       case 0x13: str = "User prompt indicator (EMS Control)"; iei_fcn = dis_iei_upi;break;
-       case 0x14: str = "Extended Object (EMS Content)"; break;
-       case 0x15: str = "Reused Extended Object (EMS Control)"; break;
-       case 0x16: str = "Compression Control (EMS Control)"; break;
-       case 0x17: str = "Object Distribution Indicator (EMS Control)"; break;
-       case 0x18: str = "Standard WVG object (EMS Content)"; break;
-       case 0x19: str = "Character Size WVG object (EMS Content)"; break;
-       case 0x1A: str = "Extended Object Data Request Command (EMS Control)"; break;
-       case 0x20: str = "RFC 822 E-Mail Header (SMS Control)"; break;
-       case 0x21: str = "Hyperlink format element (SMS Control)"; break;
-       case 0x22: str = "Reply Address Element (SMS Control)"; break;
-       default:
-           if ((oct >= 0x1b) &&
-               (oct <= 0x1f))
-           {
-               str = "Reserved for future EMS features (see subclause 3.10) N/A"; break;
-           }
-           else if ((oct >= 0x23) &&
-               (oct <= 0x6f))
-           {
-               str = "Reserved for future use N/A"; break;
-           }
-           else if ((oct >= 0x70) &&
-               (oct <= 0x7f))
-           {
-               str = "(U)SIM Toolkit Security Headers (SMS Control)"; break;
-           }
-           else if ((oct >= 0x80) &&
-               (oct <= 0x9f))
-           {
-               str = "SME to SME specific use (SMS Control)"; break;
-           }
-           else if ((oct >= 0xa0) &&
-               (oct <= 0xbf))
-           {
-               str = "Reserved for future use N/A"; break;
-           }
-           else if ((oct >= 0xc0) &&
-               (oct <= 0xdf))
-           {
-               str = "SC specific use (SMS Control)"; break;
-           }
-           else
-           {
-               str = "Reserved for future use N/A"; break;
-           }
+            case 0x00: str = "Concatenated short messages, 8-bit reference number (SMS Control)"; iei_fcn = dis_iei_csm8; break;
+            case 0x01: str = "Special SMS Message Indication (SMS Control)"; break;
+            case 0x02: str = "Reserved N/A"; break;
+            case 0x03: str = "Value not used to avoid misinterpretation as <LF> character N/A"; break;
+            case 0x04: str = "Application port addressing scheme, 8 bit address (SMS Control)"; iei_fcn = dis_iei_apa_8bit; break;
+            case 0x05: str = "Application port addressing scheme, 16 bit address (SMS Control)"; iei_fcn = dis_iei_apa_16bit; break;
+            case 0x06: str = "SMSC Control Parameters (SMS Control)"; iei_fcn = dis_iei_scp; break;
+            case 0x07: str = "UDH Source Indicator (SMS Control)"; iei_fcn  = dis_iei_udh_si; break;
+            case 0x08: str = "Concatenated short message, 16-bit reference number (SMS Control)"; iei_fcn = dis_iei_csm16; break;
+            case 0x09: str = "Wireless Control Message Protocol (SMS Control)"; break;
+            case 0x0A: str = "Text Formatting (EMS Control)"; iei_fcn = dis_iei_tf;
+            case 0x0B: str = "Predefined Sound (EMS Content)"; iei_fcn = dis_iei_ps;break;
+            case 0x0C: str = "User Defined Sound (iMelody max 128 bytes) (EMS Content)"; iei_fcn = dis_iei_uds;break;
+            case 0x0D: str = "Predefined Animation (EMS Content)"; iei_fcn = dis_iei_pa;break;
+            case 0x0E: str = "Large Animation (16*16 times 4 = 32*4 =128 bytes) (EMS Content)"; iei_fcn = dis_iei_la;break;
+            case 0x0F: str = "Small Animation (8*8 times 4 = 8*4 =32 bytes) (EMS Content)"; iei_fcn = dis_iei_sa;break;
+            case 0x10: str = "Large Picture (32*32 = 128 bytes) (EMS Content)"; iei_fcn = dis_iei_lp;break;
+            case 0x11: str = "Small Picture (16*16 = 32 bytes) (EMS Content)"; iei_fcn = dis_iei_sp;break;
+            case 0x12: str = "Variable Picture (EMS Content)"; iei_fcn = dis_iei_vp;break;
+            case 0x13: str = "User prompt indicator (EMS Control)"; iei_fcn = dis_iei_upi;break;
+            case 0x14: str = "Extended Object (EMS Content)"; break;
+            case 0x15: str = "Reused Extended Object (EMS Control)"; break;
+            case 0x16: str = "Compression Control (EMS Control)"; break;
+            case 0x17: str = "Object Distribution Indicator (EMS Control)"; break;
+            case 0x18: str = "Standard WVG object (EMS Content)"; break;
+            case 0x19: str = "Character Size WVG object (EMS Content)"; break;
+            case 0x1A: str = "Extended Object Data Request Command (EMS Control)"; break;
+            case 0x20: str = "RFC 822 E-Mail Header (SMS Control)"; break;
+            case 0x21: str = "Hyperlink format element (SMS Control)"; break;
+            case 0x22: str = "Reply Address Element (SMS Control)"; break;
+            default:
+                if ((oct >= 0x1b) &&
+                    (oct <= 0x1f))
+                {
+                    str = "Reserved for future EMS features (see subclause 3.10) N/A"; break;
+                }
+                else if ((oct >= 0x23) &&
+                         (oct <= 0x6f))
+                {
+                    str = "Reserved for future use N/A"; break;
+                }
+                else if ((oct >= 0x70) &&
+                         (oct <= 0x7f))
+                {
+                    str = "(U)SIM Toolkit Security Headers (SMS Control)"; break;
+                }
+                else if ((oct >= 0x80) &&
+                         (oct <= 0x9f))
+                {
+                    str = "SME to SME specific use (SMS Control)"; break;
+                }
+                else if ((oct >= 0xa0) &&
+                         (oct <= 0xbf))
+                {
+                    str = "Reserved for future use N/A"; break;
+                }
+                else if ((oct >= 0xc0) &&
+                         (oct <= 0xdf))
+                {
+                    str = "SC specific use (SMS Control)"; break;
+                }
+                else
+                {
+                    str = "Reserved for future use N/A"; break;
+                }
        }
 
        iei_len = tvb_get_guint8(tvb, offset + 1);
 
        item =
            proto_tree_add_text(tree,
-               tvb, offset, iei_len + 2,
-               "IE: %s",
-               str);
+                                tvb, offset, iei_len + 2,
+                                "IE: %s",
+                                str);
 
        subtree = proto_item_add_subtree(item, ett_udh_ieis[oct]);
 
        proto_tree_add_text(subtree,
-           tvb, offset, 1,
-           "Information Element Identifier: %d",
-           oct);
+                            tvb, offset, 1,
+                            "Information Element Identifier: %d",
+                            oct);
 
        offset++;
 
        proto_tree_add_text(subtree,
-           tvb, offset, 1,
-           "Length: %d",
-           iei_len);
+                            tvb, offset, 1,
+                            "Length: %d",
+                            iei_len);
 
        offset++;
 
@@ -2513,8 +2511,8 @@ dis_field_ud_iei(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint8 length)
            if (iei_fcn == NULL)
            {
                proto_tree_add_text(subtree,
-                   tvb, offset, iei_len,
-                   "IE Data");
+                                    tvb, offset, iei_len,
+                                    "IE Data");
            }
            else
            {
@@ -2541,30 +2539,31 @@ dis_field_ud(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint32 length, gb
     proto_item *udh_item;
     proto_tree *subtree = NULL;
     proto_tree *udh_subtree = NULL;
-       tvbuff_t *sm_tvb = NULL;
-       fragment_data *fd_sm = NULL;
+    tvbuff_t    *sm_tvb = NULL;
+    fragment_data *fd_sm = NULL;
     guint8     oct;
     guint      fill_bits;
     guint32    out_len , total_sms_len , len_sms , length_ucs2 , i;
     char       *ustr;
-    proto_item *ucs2_item;
-    gchar *utf8_text = NULL;
-       gchar save_byte = 0 , save_byte2 = 0;
+    proto_item  *ucs2_item;
+    gchar       *utf8_text = NULL;
+    gchar save_byte = 0 , save_byte2 = 0;
     GIConv cd;
     GError *l_conv_error = NULL;
 
-       gboolean    reassembled = FALSE;
-       guint32     reassembled_in = 0;
-       gboolean is_fragmented = FALSE;
-       gboolean save_fragmented = FALSE, try_gsm_sms_ud_reassemble = FALSE;
-       guint32 num_labels , save_offset;
+    gboolean    reassembled = FALSE;
+    guint32     reassembled_in = 0;
+    gboolean    is_fragmented = FALSE;
+    gboolean    save_fragmented = FALSE, try_gsm_sms_ud_reassemble = FALSE;
+    guint32     num_labels , save_offset;
+
     fill_bits = 0;
 
     item =
        proto_tree_add_text(tree, tvb,
-           offset, length,
-           "TP-User-Data");
-       save_offset = offset;
+                            offset, length,
+                            "TP-User-Data");
+    save_offset = offset;
     subtree = proto_item_add_subtree(item, ett_ud);
 
     oct = tvb_get_guint8(tvb, offset);
@@ -2572,218 +2571,218 @@ dis_field_ud(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint32 length, gb
     if (udhi)
     {
 
-               /* step over header */
+        /* step over header */
 
-               udh_item =
-                   proto_tree_add_text(subtree, tvb,
-                       offset, oct + 1,
-                       "User-Data Header");
+        udh_item =
+            proto_tree_add_text(subtree, tvb,
+                                offset, oct + 1,
+                                "User-Data Header");
 
-               udh_subtree = proto_item_add_subtree(udh_item, ett_udh);
+        udh_subtree = proto_item_add_subtree(udh_item, ett_udh);
 
-               proto_tree_add_text(udh_subtree,
-                   tvb, offset, 1,
-                   "User Data Header Length (%u)",
-                   oct);
+        proto_tree_add_text(udh_subtree,
+                            tvb, offset, 1,
+                            "User Data Header Length (%u)",
+                            oct);
 
-               offset++;
-               udl--;
-               length--;
-
-               dis_field_ud_iei(tvb, udh_subtree, offset, oct);
-
-               offset += oct;
-               udl -= oct;
-               length -= oct;
-
-               if (seven_bit)
-                       {
-                   /* step over fill bits ? */
-
-                   fill_bits = 7 - (((oct + 1) * 8) % 7);
-                   if (fill_bits < NUM_FILL_BITS_MASKS)
-                           {
-                               oct = tvb_get_guint8(tvb, offset);
-
-                               other_decode_bitfield_value(bigbuf, oct, fill_bits_mask[fill_bits], 8);
-                               proto_tree_add_text(udh_subtree,
-                                       tvb, offset, 1,
-                                       "%s :  Fill bits",
-                                       bigbuf);
-                       }
-               }
+        offset++;
+        udl--;
+        length--;
+
+        dis_field_ud_iei(tvb, udh_subtree, offset, oct);
+
+        offset += oct;
+        udl -= oct;
+        length -= oct;
+
+        if (seven_bit)
+        {
+            /* step over fill bits ? */
+
+            fill_bits = 7 - (((oct + 1) * 8) % 7);
+            if (fill_bits < NUM_FILL_BITS_MASKS)
+            {
+                oct = tvb_get_guint8(tvb, offset);
+
+                other_decode_bitfield_value(bigbuf, oct, fill_bits_mask[fill_bits], 8);
+                proto_tree_add_text(udh_subtree,
+                                    tvb, offset, 1,
+                                    "%s :  Fill bits",
+                                    bigbuf);
+            }
+        }
     }
 
-       if (g_frags > 1)
-               is_fragmented = TRUE;
+    if (g_frags > 1)
+        is_fragmented = TRUE;
+
+    if ( is_fragmented )
+    {
+        try_gsm_sms_ud_reassemble = TRUE;
+        save_fragmented = g_pinfo->fragmented;
+        g_pinfo->fragmented = TRUE;
+        fd_sm = fragment_add_seq_check (tvb, offset, g_pinfo,
+                                        g_sm_id, /* guint32 ID for fragments belonging together */
+                                        g_sm_fragment_table, /* list of message fragments */
+                                        g_sm_reassembled_table, /* list of reassembled messages */
+                                        g_frag-1, /* guint32 fragment sequence number */
+                                        length, /* guint32 fragment length */
+                                        (g_frag != g_frags)); /* More fragments? */
+        if (fd_sm)
+        {
+            reassembled = TRUE;
+            reassembled_in = fd_sm->reassembled_in;
+        }
+
+        sm_tvb = process_reassembled_data(tvb, offset, g_pinfo,
+                                          "Reassembled Short Message", fd_sm, &sm_frag_items,
+                                          NULL, tree);
+        if (reassembled)
+        {
+            /* Reassembled */
+            col_append_str (g_pinfo->cinfo, COL_INFO,
+                            " (Short Message Reassembled)");
+        }
+        else
+        {
+            /* Not last packet of reassembled Short Message */
+            col_append_fstr (g_pinfo->cinfo, COL_INFO,
+                             " (Short Message fragment %u of %u)", g_frag, g_frags);
+        }
+    } /* Else: not fragmented */
+    if (! sm_tvb) /* One single Short Message, or not reassembled */
+        sm_tvb = tvb_new_subset_remaining (tvb, offset);
 
-       if ( is_fragmented ) 
-       {
-               try_gsm_sms_ud_reassemble = TRUE;
-               save_fragmented = g_pinfo->fragmented;
-               g_pinfo->fragmented = TRUE;
-               fd_sm = fragment_add_seq_check (tvb, offset, g_pinfo,
-                               g_sm_id, /* guint32 ID for fragments belonging together */
-                               g_sm_fragment_table, /* list of message fragments */
-                               g_sm_reassembled_table, /* list of reassembled messages */
-                               g_frag-1, /* guint32 fragment sequence number */
-                               length, /* guint32 fragment length */
-                               (g_frag != g_frags)); /* More fragments? */
-               if (fd_sm) 
-               {
-                       reassembled = TRUE;
-                       reassembled_in = fd_sm->reassembled_in;
-               }
-                               
-               sm_tvb = process_reassembled_data(tvb, offset, g_pinfo,
-                       "Reassembled Short Message", fd_sm, &sm_frag_items,
-                       NULL, tree);
-               if (reassembled) 
-               { 
-                       /* Reassembled */
-                       col_append_str (g_pinfo->cinfo, COL_INFO,
-                                               " (Short Message Reassembled)");
-               } 
-               else 
-               {
-                       /* Not last packet of reassembled Short Message */
-                       col_append_fstr (g_pinfo->cinfo, COL_INFO,
-                                       " (Short Message fragment %u of %u)", g_frag, g_frags);
-               }
-       } /* Else: not fragmented */
-       if (! sm_tvb) /* One single Short Message, or not reassembled */
-               sm_tvb = tvb_new_subset_remaining (tvb, offset);
-       
     if (compressed)
     {
-               proto_tree_add_text(subtree, tvb,
-                   offset, length,
-                   "Compressed data");
+        proto_tree_add_text(subtree, tvb,
+                            offset, length,
+                            "Compressed data");
     }
     else
     {
-               if ((reassembled && g_pinfo->fd->num == reassembled_in) || g_frag==0 || ((g_frag != 0 && msg_udh_frag)))
-               {
-                       if (seven_bit)
-                       {
-                               if(msg_udh_frag || g_frag == 0 )
-                               {
-                                       out_len =
-                                       gsm_sms_char_7bit_unpack(fill_bits, length , SMS_MAX_MESSAGE_SIZE,
-                                       tvb_get_ptr(tvb , offset , length) , messagebuf);
-                                       messagebuf[out_len] = '\0';
-                                       proto_tree_add_text(subtree, tvb , offset , length , "%s",
-                                           gsm_sms_chars_to_utf8(messagebuf, out_len));
-                               }
-                               else
-                               {
-                                       out_len = 0;
-                                       
-                                       total_sms_len = sm_tvb->length;
-                                       for(i = 0 ; i<g_frags; i++)
-                                       {
-                                               /* maximum len msg in 7 bit with csm8 header*/
-                                               if(total_sms_len > MAX_SMS_FRAG_LEN)
-                                               {
-                                                       total_sms_len -= MAX_SMS_FRAG_LEN;
-                                                       len_sms = MAX_SMS_FRAG_LEN;
-                                               }
-                                               else
-                                                       len_sms = total_sms_len;        
-                                               out_len =
-                                               gsm_sms_char_7bit_unpack(fill_bits, len_sms , SMS_MAX_MESSAGE_SIZE,
-                                               tvb_get_ptr(sm_tvb , i * MAX_SMS_FRAG_LEN  , len_sms) , messagebuf);
-                                               
-                                               messagebuf[out_len] = '\0';
-                                               proto_tree_add_text(subtree, sm_tvb , i * MAX_SMS_FRAG_LEN , len_sms , "%s",
-                                                   gsm_sms_chars_to_utf8(messagebuf, out_len));
-                                       }
-                               }
-                       }
-                       else if (eight_bit)
-                       {
-                               /*proto_tree_add_text(subtree, tvb , offset , length, "%s",
-                               tvb_format_text(tvb, offset, length));                          */
-                               if (! dissector_try_port(gsm_sms_dissector_tbl, g_port_src, sm_tvb, g_pinfo, subtree)) 
-                               {
-                                       if (! dissector_try_port(gsm_sms_dissector_tbl, g_port_dst,sm_tvb, g_pinfo, subtree)) 
-                                       {
-                                                       if (subtree) 
-                                                       { /* Only display if needed */
-                                                               proto_tree_add_text (subtree, sm_tvb, 0, -1,
-                                                                               "Short Message body");
-                                                       }
-                                       }
-                               }
-                       }
-                       else if (ucs2)
-                       {
-                               if ((cd = g_iconv_open("UTF-8","UCS-2BE")) != (GIConv)-1)
-                               {
-                                       if(msg_udh_frag || g_frag == 0 )
-                                       {
-                                               utf8_text = g_convert_with_iconv(sm_tvb->real_data, sm_tvb->reported_length , cd , NULL , NULL , &l_conv_error);
-                                               if(!l_conv_error){
-                                                       ucs2_item = proto_tree_add_text(subtree, tvb, offset, length, "%s", utf8_text);
-                                               }else{
-                                                       ucs2_item = proto_tree_add_text(subtree, tvb, offset, length, "%s", "Failed on UCS2 contact wireshark developers");
-                                               }
-                                               PROTO_ITEM_SET_GENERATED(ucs2_item);
-                                       }
-                                       else
-                                       {
-                                               utf8_text = g_convert_with_iconv(sm_tvb->real_data, sm_tvb->reported_length , cd , NULL , NULL , &l_conv_error);
-                                               if(!l_conv_error)
-                                               {
-                                                       len_sms = (int)strlen(utf8_text);
-                                                       num_labels = len_sms / MAX_SMS_FRAG_LEN;
-                                                       num_labels += len_sms % MAX_SMS_FRAG_LEN ? 1 : 0;
-                                                       for(i = 0; i < num_labels;i++)
-                                                       {
-                                                               if(i * MAX_SMS_FRAG_LEN < len_sms)
-                                                               {
-                                                                       /* set '\0' to byte number 134 text_node MAX size*/
-                                                                       save_byte =  utf8_text[i * MAX_SMS_FRAG_LEN];
-                                                                       save_byte2 =  utf8_text[i * MAX_SMS_FRAG_LEN + 1];
-                                                                       if(i > 0)
-                                                                       {
-                                                                               utf8_text[i * MAX_SMS_FRAG_LEN] = '\0';
-                                                                               utf8_text[i * MAX_SMS_FRAG_LEN + 1] = '\0';
-                                                                       }
-
-                                                                       length_ucs2 = MAX_SMS_FRAG_LEN;
-                                                               }
-                                                               else
-                                                                       length_ucs2 = len_sms % MAX_SMS_FRAG_LEN;
-
-                                                               ucs2_item = proto_tree_add_text(subtree, sm_tvb , i * MAX_SMS_FRAG_LEN , length_ucs2 , "%s", &utf8_text[i * MAX_SMS_FRAG_LEN]);
-                                                               /* return the save byte to utf8 buffer*/
-                                                               if(i * MAX_SMS_FRAG_LEN < len_sms)
-                                                               {
-                                                                       utf8_text[i * MAX_SMS_FRAG_LEN] = save_byte;
-                                                                       utf8_text[i * MAX_SMS_FRAG_LEN + 1] = save_byte2;
-                                                               }
-                                                       }
-                                               }else{
-                                                       ucs2_item = proto_tree_add_text(subtree, tvb, offset, length, "%s", "Failed on UCS2 contact wireshark developers");
-                                               }
-                                       }
-
-                                       g_free(utf8_text);
-                                       g_iconv_close(cd);
-                               }
-                               else
-                               {
-                                       /* tvb_get_ephemeral_faked_unicode takes the lengt in number of guint16's */
-                                       ustr = tvb_get_ephemeral_faked_unicode(tvb, offset, (length>>1), FALSE);
-                                       proto_tree_add_text(subtree, tvb, offset, length, "%s", ustr);
-                               }
-                       }
-               }
+        if ((reassembled && g_pinfo->fd->num == reassembled_in) || g_frag==0 || ((g_frag != 0 && msg_udh_frag)))
+        {
+            if (seven_bit)
+            {
+                if(msg_udh_frag || g_frag == 0 )
+                {
+                    out_len =
+                        gsm_sms_char_7bit_unpack(fill_bits, length , SMS_MAX_MESSAGE_SIZE,
+                                                 tvb_get_ptr(tvb , offset , length) , messagebuf);
+                    messagebuf[out_len] = '\0';
+                    proto_tree_add_text(subtree, tvb , offset , length , "%s",
+                                        gsm_sms_chars_to_utf8(messagebuf, out_len));
+                }
+                else
+                {
+                    out_len = 0;
+
+                    total_sms_len = sm_tvb->length;
+                    for(i = 0 ; i<g_frags; i++)
+                    {
+                        /* maximum len msg in 7 bit with csm8 header*/
+                        if(total_sms_len > MAX_SMS_FRAG_LEN)
+                        {
+                            total_sms_len -= MAX_SMS_FRAG_LEN;
+                            len_sms = MAX_SMS_FRAG_LEN;
+                        }
+                        else
+                            len_sms = total_sms_len;
+                        out_len =
+                            gsm_sms_char_7bit_unpack(fill_bits, len_sms , SMS_MAX_MESSAGE_SIZE,
+                                                     tvb_get_ptr(sm_tvb , i * MAX_SMS_FRAG_LEN  , len_sms) , messagebuf);
+
+                        messagebuf[out_len] = '\0';
+                        proto_tree_add_text(subtree, sm_tvb , i * MAX_SMS_FRAG_LEN , len_sms , "%s",
+                                            gsm_sms_chars_to_utf8(messagebuf, out_len));
+                    }
+                }
+            }
+            else if (eight_bit)
+            {
+                /*proto_tree_add_text(subtree, tvb , offset , length, "%s",
+                  tvb_format_text(tvb, offset, length));                               */
+                if (! dissector_try_port(gsm_sms_dissector_tbl, g_port_src, sm_tvb, g_pinfo, subtree))
+                {
+                    if (! dissector_try_port(gsm_sms_dissector_tbl, g_port_dst,sm_tvb, g_pinfo, subtree))
+                    {
+                        if (subtree)
+                        { /* Only display if needed */
+                            proto_tree_add_text (subtree, sm_tvb, 0, -1,
+                                                 "Short Message body");
+                        }
+                    }
+                }
+            }
+            else if (ucs2)
+            {
+                if ((cd = g_iconv_open("UTF-8","UCS-2BE")) != (GIConv)-1)
+                {
+                    if(msg_udh_frag || g_frag == 0 )
+                    {
+                        utf8_text = g_convert_with_iconv(sm_tvb->real_data, sm_tvb->reported_length , cd , NULL , NULL , &l_conv_error);
+                        if(!l_conv_error){
+                            ucs2_item = proto_tree_add_text(subtree, tvb, offset, length, "%s", utf8_text);
+                        }else{
+                            ucs2_item = proto_tree_add_text(subtree, tvb, offset, length, "%s", "Failed on UCS2 contact wireshark developers");
+                        }
+                        PROTO_ITEM_SET_GENERATED(ucs2_item);
+                    }
+                    else
+                    {
+                        utf8_text = g_convert_with_iconv(sm_tvb->real_data, sm_tvb->reported_length , cd , NULL , NULL , &l_conv_error);
+                        if(!l_conv_error)
+                        {
+                            len_sms = (int)strlen(utf8_text);
+                            num_labels = len_sms / MAX_SMS_FRAG_LEN;
+                            num_labels += len_sms % MAX_SMS_FRAG_LEN ? 1 : 0;
+                            for(i = 0; i < num_labels;i++)
+                            {
+                                if(i * MAX_SMS_FRAG_LEN < len_sms)
+                                {
+                                    /* set '\0' to byte number 134 text_node MAX size*/
+                                    save_byte =  utf8_text[i * MAX_SMS_FRAG_LEN];
+                                    save_byte2 =  utf8_text[i * MAX_SMS_FRAG_LEN + 1];
+                                    if(i > 0)
+                                    {
+                                        utf8_text[i * MAX_SMS_FRAG_LEN] = '\0';
+                                        utf8_text[i * MAX_SMS_FRAG_LEN + 1] = '\0';
+                                    }
+
+                                    length_ucs2 = MAX_SMS_FRAG_LEN;
+                                }
+                                else
+                                    length_ucs2 = len_sms % MAX_SMS_FRAG_LEN;
+
+                                ucs2_item = proto_tree_add_text(subtree, sm_tvb , i * MAX_SMS_FRAG_LEN , length_ucs2 , "%s", &utf8_text[i * MAX_SMS_FRAG_LEN]);
+                                /* return the save byte to utf8 buffer*/
+                                if(i * MAX_SMS_FRAG_LEN < len_sms)
+                                {
+                                    utf8_text[i * MAX_SMS_FRAG_LEN] = save_byte;
+                                    utf8_text[i * MAX_SMS_FRAG_LEN + 1] = save_byte2;
+                                }
+                            }
+                        }else{
+                            ucs2_item = proto_tree_add_text(subtree, tvb, offset, length, "%s", "Failed on UCS2 contact wireshark developers");
+                        }
+                    }
+
+                    g_free(utf8_text);
+                    g_iconv_close(cd);
+                }
+                else
+                {
+                    /* tvb_get_ephemeral_faked_unicode takes the lengt in number of guint16's */
+                    ustr = tvb_get_ephemeral_faked_unicode(tvb, offset, (length>>1), FALSE);
+                    proto_tree_add_text(subtree, tvb, offset, length, "%s", ustr);
+                }
+            }
+        }
     }
 
-       if (try_gsm_sms_ud_reassemble) /* Clean up defragmentation */
-               g_pinfo->fragmented = save_fragmented;
+    if (try_gsm_sms_ud_reassemble) /* Clean up defragmentation */
+        g_pinfo->fragmented = save_fragmented;
 }
 
 /* 9.2.3.27 */
@@ -3109,7 +3108,7 @@ dis_msg_submit_report(tvbuff_t *tvb, proto_tree *tree, guint32 offset)
 
     oct = tvb_get_guint8(tvb, offset);
     udhi = oct & 0x40;
-    
+
     proto_tree_add_item(tree, hf_gsm_sms_tp_udhi, tvb, offset, 1, FALSE);
     proto_tree_add_item(tree, hf_gsm_sms_tp_mti_down, tvb, offset, 1, FALSE);
 
@@ -3210,7 +3209,7 @@ dis_msg_status_report(tvbuff_t *tvb, proto_tree *tree, guint32 offset)
     gboolean   eight_bit = FALSE;
     gboolean   ucs2 = FALSE;
     gboolean   compressed = FALSE;
-    gboolean   udhi; 
+    gboolean   udhi;
 
 
     udl = 0;
@@ -3407,15 +3406,15 @@ dissect_gsm_sms(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     gint       idx;
     const gchar        *str = NULL;
     gint       ett_msg_idx;
-       
+
 
     g_pinfo = pinfo;
-       g_is_wsp = 0;
-       g_sm_id = 0;
-       g_frags = 0;
-       g_frag = 0;     
-       g_port_src = 0;
-       g_port_dst = 0;
+    g_is_wsp = 0;
+    g_sm_id = 0;
+    g_frags = 0;
+    g_frag = 0;
+    g_port_src = 0;
+    g_port_dst = 0;
 
     col_set_str(pinfo->cinfo, COL_PROTOCOL, gsm_sms_proto_name_short);
 
@@ -3493,196 +3492,196 @@ dissect_gsm_sms(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 void
 proto_register_gsm_sms(void)
 {
-    guint              i;
-    guint              last_offset;
-       module_t *gsm_sms_module; /* Preferences for GSM SMS UD */
+    guint     i;
+    guint     last_offset;
+    module_t *gsm_sms_module; /* Preferences for GSM SMS UD */
 
     /* Setup list of header fields */
     static hf_register_info hf[] =
-    {
-           { &hf_gsm_sms_coding_group_bits2,
-             { "Coding Group Bits", "gsm_sms.coding_group_bits2",
-               FT_UINT8, BASE_DEC, VALS(gsm_sms_coding_group_bits_vals), 0xc0,
-               NULL, HFILL }
-               },
-           { &hf_gsm_sms_coding_group_bits4,
-             { "Coding Group Bits", "gsm_sms.coding_group_bits4",
-               FT_UINT8, BASE_DEC, VALS(gsm_sms_coding_group_bits_vals), 0xf0,
-               NULL, HFILL }
-               },
-
-               /*
-                * Short Message fragment reassembly
-                */
-               {       &hf_gsm_sms_ud_fragments,
-                       {       "Short Message fragments", "gsm-sms-ud.fragments",
-                               FT_NONE, BASE_NONE, NULL, 0x00,
-                               "GSM Short Message fragments",
-                               HFILL
-                       }
-               },
-               {       &hf_gsm_sms_ud_fragment,
-                       {       "Short Message fragment", "gsm-sms-ud.fragment",
-                               FT_FRAMENUM, BASE_NONE, NULL, 0x00,
-                               "GSM Short Message fragment",
-                               HFILL
-                       }
-               },
-               {       &hf_gsm_sms_ud_fragment_overlap,
-                       {       "Short Message fragment overlap", "gsm-sms-ud.fragment.overlap",
-                               FT_BOOLEAN, BASE_NONE, NULL, 0x0,
-                               "GSM Short Message fragment overlaps with other fragment(s)",
-                               HFILL
-                       }
-               },
-               {       &hf_gsm_sms_ud_fragment_overlap_conflicts,
-                       {       "Short Message fragment overlapping with conflicting data",
-                               "gsm-sms-ud.fragment.overlap.conflicts",
-                               FT_BOOLEAN, BASE_NONE, NULL, 0x0,
-                               "GSM Short Message fragment overlaps with conflicting data",
-                               HFILL
-                       }
-               },
-               {       &hf_gsm_sms_ud_fragment_multiple_tails,
-                       {       "Short Message has multiple tail fragments",
-                               "gsm-sms-ud.fragment.multiple_tails",
-                               FT_BOOLEAN, BASE_NONE, NULL, 0x0,
-                               "GSM Short Message fragment has multiple tail fragments",
-                               HFILL
-                       }
-               },
-               {       &hf_gsm_sms_ud_fragment_too_long_fragment,
-                       {       "Short Message fragment too long",
-                               "gsm-sms-ud.fragment.too_long_fragment",
-                               FT_BOOLEAN, BASE_NONE, NULL, 0x0,
-                               "GSM Short Message fragment data goes beyond the packet end",
-                               HFILL
-                       }
-               },
-               {       &hf_gsm_sms_ud_fragment_error,
-                       {       "Short Message defragmentation error", "gsm-sms-ud.fragment.error",
-                               FT_FRAMENUM, BASE_NONE, NULL, 0x00,
-                               "GSM Short Message defragmentation error due to illegal fragments",
-                               HFILL
-                       }
-               },
-               {       &hf_gsm_sms_ud_reassembled_in,
-                       {       "Reassembled in",
-                               "gsm-sms-ud.reassembled.in",
-                               FT_FRAMENUM, BASE_NONE, NULL, 0x00,
-                               "GSM Short Message has been reassembled in this packet.", HFILL
-                       }
-               },
-               {       &hf_gsm_sms_ud_reassembled_length,
-                       {       "Reassembled Short Message length",
-                               "gsm-sms-ud.reassembled.length",
-                               FT_UINT32, BASE_DEC, NULL, 0x00,
-                               "The total length of the reassembled payload", HFILL
-                       }
-               },
-               {   &hf_gsm_sms_ud_multiple_messages_msg_id,
-           {   "Message identifier", "gsm-sms.udh.mm.msg_id",
-               FT_UINT16, BASE_DEC, NULL, 0x00,
-               "Identification of the message",
-               HFILL
-           }
-       },
-       {   &hf_gsm_sms_ud_multiple_messages_msg_parts,
-           {   "Message parts", "gsm-sms.udh.mm.msg_parts",
-               FT_UINT8, BASE_DEC, NULL, 0x00,
-               "Total number of message parts (fragments)",
-               HFILL
-           }
-       },
-       {   &hf_gsm_sms_ud_multiple_messages_msg_part,
-           {   "Message part number", "gsm-sms.udh.mm.msg_part",
-               FT_UINT8, BASE_DEC, NULL, 0x00,
-               "Message part (fragment) sequence number",
-               HFILL
-           }
-       },
-       /* TPDU parameters */
-        { &hf_gsm_sms_tp_mti_up,
+        {
+            { &hf_gsm_sms_coding_group_bits2,
+              { "Coding Group Bits", "gsm_sms.coding_group_bits2",
+                FT_UINT8, BASE_DEC, VALS(gsm_sms_coding_group_bits_vals), 0xc0,
+                NULL, HFILL }
+            },
+            { &hf_gsm_sms_coding_group_bits4,
+              { "Coding Group Bits", "gsm_sms.coding_group_bits4",
+                FT_UINT8, BASE_DEC, VALS(gsm_sms_coding_group_bits_vals), 0xf0,
+                NULL, HFILL }
+            },
+
+            /*
+             * Short Message fragment reassembly
+             */
+            {  &hf_gsm_sms_ud_fragments,
+                {      "Short Message fragments", "gsm-sms-ud.fragments",
+                        FT_NONE, BASE_NONE, NULL, 0x00,
+                        "GSM Short Message fragments",
+                        HFILL
+                }
+            },
+            {  &hf_gsm_sms_ud_fragment,
+                {      "Short Message fragment", "gsm-sms-ud.fragment",
+                        FT_FRAMENUM, BASE_NONE, NULL, 0x00,
+                        "GSM Short Message fragment",
+                        HFILL
+                }
+            },
+            {  &hf_gsm_sms_ud_fragment_overlap,
+                {      "Short Message fragment overlap", "gsm-sms-ud.fragment.overlap",
+                        FT_BOOLEAN, BASE_NONE, NULL, 0x0,
+                        "GSM Short Message fragment overlaps with other fragment(s)",
+                        HFILL
+                }
+            },
+            {  &hf_gsm_sms_ud_fragment_overlap_conflicts,
+                {      "Short Message fragment overlapping with conflicting data",
+                        "gsm-sms-ud.fragment.overlap.conflicts",
+                        FT_BOOLEAN, BASE_NONE, NULL, 0x0,
+                        "GSM Short Message fragment overlaps with conflicting data",
+                        HFILL
+                }
+            },
+            {  &hf_gsm_sms_ud_fragment_multiple_tails,
+                {      "Short Message has multiple tail fragments",
+                        "gsm-sms-ud.fragment.multiple_tails",
+                        FT_BOOLEAN, BASE_NONE, NULL, 0x0,
+                        "GSM Short Message fragment has multiple tail fragments",
+                        HFILL
+                }
+            },
+            {  &hf_gsm_sms_ud_fragment_too_long_fragment,
+                {      "Short Message fragment too long",
+                        "gsm-sms-ud.fragment.too_long_fragment",
+                        FT_BOOLEAN, BASE_NONE, NULL, 0x0,
+                        "GSM Short Message fragment data goes beyond the packet end",
+                        HFILL
+                }
+            },
+            {  &hf_gsm_sms_ud_fragment_error,
+                {      "Short Message defragmentation error", "gsm-sms-ud.fragment.error",
+                        FT_FRAMENUM, BASE_NONE, NULL, 0x00,
+                        "GSM Short Message defragmentation error due to illegal fragments",
+                        HFILL
+                }
+            },
+            {  &hf_gsm_sms_ud_reassembled_in,
+                {      "Reassembled in",
+                        "gsm-sms-ud.reassembled.in",
+                        FT_FRAMENUM, BASE_NONE, NULL, 0x00,
+                        "GSM Short Message has been reassembled in this packet.", HFILL
+                }
+            },
+            {  &hf_gsm_sms_ud_reassembled_length,
+                {      "Reassembled Short Message length",
+                        "gsm-sms-ud.reassembled.length",
+                        FT_UINT32, BASE_DEC, NULL, 0x00,
+                        "The total length of the reassembled payload", HFILL
+                }
+            },
+            {   &hf_gsm_sms_ud_multiple_messages_msg_id,
+                {      "Message identifier", "gsm-sms.udh.mm.msg_id",
+                        FT_UINT16, BASE_DEC, NULL, 0x00,
+                        "Identification of the message",
+                        HFILL
+                }
+            },
+            {   &hf_gsm_sms_ud_multiple_messages_msg_parts,
+                {      "Message parts", "gsm-sms.udh.mm.msg_parts",
+                        FT_UINT8, BASE_DEC, NULL, 0x00,
+                        "Total number of message parts (fragments)",
+                        HFILL
+                }
+            },
+            {   &hf_gsm_sms_ud_multiple_messages_msg_part,
+                {      "Message part number", "gsm-sms.udh.mm.msg_part",
+                        FT_UINT8, BASE_DEC, NULL, 0x00,
+                        "Message part (fragment) sequence number",
+                        HFILL
+                }
+            },
+            /* TPDU parameters */
+            { &hf_gsm_sms_tp_mti_up,
              { "TP-MTI", "gsm_sms.tp-mti",
                FT_UINT8, BASE_DEC, VALS(msg_type_strings_ms_to_sc), 0x03,
                "TP-Message-Type-Indicator (in the direction MS to SC)", HFILL }
-       },      
-        { &hf_gsm_sms_tp_mti_down,
+            },
+            { &hf_gsm_sms_tp_mti_down,
              { "TP-MTI", "gsm_sms.tp-mti",
                FT_UINT8, BASE_DEC, VALS(msg_type_strings_sc_to_ms), 0x03,
                "TP-Message-Type-Indicator (in the direction SC to MS)", HFILL }
-       },      
-        { &hf_gsm_sms_tp_oa,
+            },
+            { &hf_gsm_sms_tp_oa,
              { "TP-OA Digits", "gsm_sms.tp-oa",
                FT_STRING, BASE_NONE, NULL, 0x00,
                "TP-Originating-Address Digits", HFILL }
-       },
-        { &hf_gsm_sms_tp_da,
+            },
+            { &hf_gsm_sms_tp_da,
              { "TP-DA Digits", "gsm_sms.tp-da",
                FT_STRING, BASE_NONE, NULL, 0x00,
                "TP-Destination-Address Digits", HFILL }
-       },
-        { &hf_gsm_sms_tp_ra,
+            },
+            { &hf_gsm_sms_tp_ra,
              { "TP-RA Digits", "gsm_sms.tp-ra",
                FT_STRING, BASE_NONE, NULL, 0x00,
                "TP-Recipient-Address Digits", HFILL }
-       },
-        { &hf_gsm_sms_tp_pid,
+            },
+            { &hf_gsm_sms_tp_pid,
              { "TP-PID", "gsm_sms.tp-pid",
                FT_UINT8, BASE_DEC, NULL, 0x00,
                "TP-Protocol-Identifier", HFILL }
-       },
-        { &hf_gsm_sms_tp_dcs,
+            },
+            { &hf_gsm_sms_tp_dcs,
              { "TP-DCS", "gsm_sms.tp-dcs",
                FT_UINT8, BASE_DEC, NULL, 0x00,
                "TP-Data-Coding-Scheme", HFILL }
-       },
-        { &hf_gsm_sms_tp_mr,
+            },
+            { &hf_gsm_sms_tp_mr,
              { "TP-MR", "gsm_sms.tp-mr",
                FT_UINT8, BASE_DEC, NULL, 0x00,
                "TP-Message-Reference", HFILL }
-       },
-        { &hf_gsm_sms_tp_mms,
+            },
+            { &hf_gsm_sms_tp_mms,
              { "TP-MMS", "gsm_sms.tp-mms",
                FT_BOOLEAN, 8, TFS(&mms_bool_strings), 0x04,
                "TP-More-Messages-to-Send", HFILL }
-       },
-        { &hf_gsm_sms_tp_sri,
+            },
+            { &hf_gsm_sms_tp_sri,
              { "TP-SRI", "gsm_sms.tp-sri",
                FT_BOOLEAN, 8, TFS(&sri_bool_strings), 0x20,
                "TP-Status-Report-Indication", HFILL }
-       },
-        { &hf_gsm_sms_tp_srr,
+            },
+            { &hf_gsm_sms_tp_srr,
              { "TP-SRR", "gsm_sms.tp-srr",
                FT_BOOLEAN, 8, TFS(&srr_bool_strings), 0x20,
                "TP-Status-Report-Request", HFILL }
-       },
-        { &hf_gsm_sms_tp_udhi,
+            },
+            { &hf_gsm_sms_tp_udhi,
              { "TP-UDHI", "gsm_sms.tp-udhi",
                FT_BOOLEAN, 8, TFS(&udhi_bool_strings), 0x40,
                "TP-User-Data-Header-Indicator", HFILL }
-       },
-        { &hf_gsm_sms_tp_rp,
+            },
+            { &hf_gsm_sms_tp_rp,
              { "TP-RP", "gsm_sms.tp-rp",
                FT_BOOLEAN, 8, TFS(&rp_bool_strings), 0x80,
                "TP-Reply-Path", HFILL }
-       },      
-        { &hf_gsm_sms_tp_vpf,
+            },
+            { &hf_gsm_sms_tp_vpf,
              { "TP-VPF", "gsm_sms.tp-vpf",
                FT_UINT8, BASE_DEC, VALS(vp_type_strings), 0x18,
                "TP-Validity-Period-Format", HFILL }
-       },      
-        { &hf_gsm_sms_tp_rd,
+            },
+            { &hf_gsm_sms_tp_rd,
              { "TP-RD", "gsm_sms.tp-rd",
                FT_BOOLEAN, 8, TFS(&rd_bool_strings), 0x04,
                "TP-Reject-Duplicates", HFILL }
-       },      
-        { &hf_gsm_sms_tp_srq,
+            },
+            { &hf_gsm_sms_tp_srq,
              { "TP-SRQ", "gsm_sms.tp-srq",
                FT_BOOLEAN, 8, TFS(&srq_bool_strings), 0x20,
                "TP-Status-Report-Qualifier", HFILL }
-       },      
-    };
+            },
+        };
 
     /* Setup protocol subtree array */
 #define        NUM_INDIVIDUAL_PARMS    12
index db6f020079a3d829cb4061d5a8ea80a670da39a5..6e45ecbd71ffceb2a8ce739682ce81efc233a835 100644 (file)
@@ -9,7 +9,7 @@
  *
  * $Id$
  *
- * Control Plane Request-Response tracking code Largely based on similar routines in 
+ * Control Plane Request-Response tracking code Largely based on similar routines in
  * packet-ldap.c by Ronnie Sahlberg
  * Added by Kari Tiirikainen <kari.tiirikainen@nsn.com>
  *
 
 static dissector_table_t ppp_subdissector_table;
 
-#define GTPv0_PORT 3386
-#define GTPv1C_PORT 2123       /* 3G Control PDU */
-#define GTPv1U_PORT 2152       /* 3G T-PDU */
+#define GTPv0_PORT  3386
+#define GTPv1C_PORT 2123    /* 3G Control PDU */
+#define GTPv1U_PORT 2152    /* 3G T-PDU */
 
-#define GTPv0_HDR_LENGTH 20
-#define GTPv1_HDR_LENGTH 12
-#define GTP_PRIME_HDR_LENGTH 6
+#define GTPv0_HDR_LENGTH     20
+#define GTPv1_HDR_LENGTH     12
+#define GTP_PRIME_HDR_LENGTH  6
 
 /* to check compliance with ETSI  */
-#define GTP_MANDATORY  1
-#define GTP_OPTIONAL   2
-#define GTP_CONDITIONAL        4
+#define GTP_MANDATORY   1
+#define GTP_OPTIONAL    2
+#define GTP_CONDITIONAL 4
 
 static gboolean g_gtp_over_tcp = TRUE;
-static guint g_gtpv0_port = GTPv0_PORT;
+static guint g_gtpv0_port  = GTPv0_PORT;
 static guint g_gtpv1c_port = GTPv1C_PORT;
 static guint g_gtpv1u_port = GTPv1U_PORT;
 
@@ -306,7 +306,7 @@ static gint ett_gtp_utran_cont = -1;
 static gboolean g_gtp_tpdu = TRUE;
 static gboolean g_gtp_etsi_order = FALSE;
 
-static int gtp_tap = -1;    
+static int gtp_tap = -1;
 
 /* Definition of flags masks */
 #define GTP_VER_MASK 0xE0
@@ -329,18 +329,18 @@ static const value_string pt_types[] = {
     {0, NULL}
 };
 
-#define GTP_PT_MASK                    0x10
-#define GTP_SPARE1_MASK                0x0E
-#define GTP_SPARE2_MASK                0x08
-#define GTP_E_MASK                     0x04
-#define GTP_S_MASK                     0x02
-#define GTP_SNN_MASK           0x01
-#define GTP_PN_MASK                    0x01
+#define GTP_PT_MASK         0x10
+#define GTP_SPARE1_MASK     0x0E
+#define GTP_SPARE2_MASK     0x08
+#define GTP_E_MASK          0x04
+#define GTP_S_MASK          0x02
+#define GTP_SNN_MASK        0x01
+#define GTP_PN_MASK         0x01
 
 static const value_string next_extension_header_fieldvals[] = {
-    {0, "No more extension headers"},
-    {1, "MBMS support indication"},
-    {2, "MS Info Change Reporting support indication"},
+    {   0, "No more extension headers"},
+    {   1, "MBMS support indication"},
+    {   2, "MS Info Change Reporting support indication"},
     {0xc0, "PDCP PDU number"},
     {0xc1, "Suspend Request"},
     {0xc2, "Suspend Response"},
@@ -348,45 +348,45 @@ static const value_string next_extension_header_fieldvals[] = {
 };
 
 /* Definition of 3G charging characteristics masks */
-#define GTP_MASK_CHRG_CHAR_S   0xF000
-#define GTP_MASK_CHRG_CHAR_N   0x0800
-#define GTP_MASK_CHRG_CHAR_P   0x0400
-#define GTP_MASK_CHRG_CHAR_F   0x0200
-#define GTP_MASK_CHRG_CHAR_H   0x0100
-#define GTP_MASK_CHRG_CHAR_R   0x00FF
+#define GTP_MASK_CHRG_CHAR_S    0xF000
+#define GTP_MASK_CHRG_CHAR_N    0x0800
+#define GTP_MASK_CHRG_CHAR_P    0x0400
+#define GTP_MASK_CHRG_CHAR_F    0x0200
+#define GTP_MASK_CHRG_CHAR_H    0x0100
+#define GTP_MASK_CHRG_CHAR_R    0x00FF
 
 /* Traffic Flow Templates  mask */
-#define GTPv1_TFT_CODE_MASK    0xE0
-#define GTPv1_TFT_SPARE_MASK   0x10
-#define GTPv1_TFT_NUMBER_MASK  0x0F
+#define GTPv1_TFT_CODE_MASK 0xE0
+#define GTPv1_TFT_SPARE_MASK    0x10
+#define GTPv1_TFT_NUMBER_MASK   0x0F
 
 /* Definition of GSN Address masks */
-#define GTP_EXT_GSN_ADDR_TYPE_MASK             0xC0
-#define GTP_EXT_GSN_ADDR_LEN_MASK              0x3F
+#define GTP_EXT_GSN_ADDR_TYPE_MASK      0xC0
+#define GTP_EXT_GSN_ADDR_LEN_MASK       0x3F
 
 /* Definition of QoS masks */
-#define GTP_EXT_QOS_SPARE1_MASK                                        0xC0
-#define GTP_EXT_QOS_DELAY_MASK                                 0x38
-#define GTP_EXT_QOS_RELIABILITY_MASK                   0x07
-#define GTP_EXT_QOS_PEAK_MASK                                  0xF0
-#define GTP_EXT_QOS_SPARE2_MASK                                        0x08
-#define GTP_EXT_QOS_PRECEDENCE_MASK                            0x07
-#define GTP_EXT_QOS_SPARE3_MASK                                        0xE0
-#define GTP_EXT_QOS_MEAN_MASK                                  0x1F
-#define GTP_EXT_QOS_TRAF_CLASS_MASK                            0xE0
-#define GTP_EXT_QOS_DEL_ORDER_MASK                             0x18
-#define GTP_EXT_QOS_DEL_ERR_SDU_MASK                   0x07
-#define GTP_EXT_QOS_RES_BER_MASK                               0xF0
-#define GTP_EXT_QOS_SDU_ERR_RATIO_MASK                 0x0F
-#define GTP_EXT_QOS_TRANS_DELAY_MASK                   0xFC
-#define GTP_EXT_QOS_TRAF_HANDL_PRIORITY_MASK   0x03
-#define GTP_EXT_QOS_SRC_STAT_DESC_MASK                         0x0F
-#define GTP_EXT_QOS_SIG_IND_MASK                               0x10
+#define GTP_EXT_QOS_SPARE1_MASK                 0xC0
+#define GTP_EXT_QOS_DELAY_MASK                  0x38
+#define GTP_EXT_QOS_RELIABILITY_MASK            0x07
+#define GTP_EXT_QOS_PEAK_MASK                   0xF0
+#define GTP_EXT_QOS_SPARE2_MASK                 0x08
+#define GTP_EXT_QOS_PRECEDENCE_MASK             0x07
+#define GTP_EXT_QOS_SPARE3_MASK                 0xE0
+#define GTP_EXT_QOS_MEAN_MASK                   0x1F
+#define GTP_EXT_QOS_TRAF_CLASS_MASK             0xE0
+#define GTP_EXT_QOS_DEL_ORDER_MASK              0x18
+#define GTP_EXT_QOS_DEL_ERR_SDU_MASK            0x07
+#define GTP_EXT_QOS_RES_BER_MASK                0xF0
+#define GTP_EXT_QOS_SDU_ERR_RATIO_MASK          0x0F
+#define GTP_EXT_QOS_TRANS_DELAY_MASK            0xFC
+#define GTP_EXT_QOS_TRAF_HANDL_PRIORITY_MASK    0x03
+#define GTP_EXT_QOS_SRC_STAT_DESC_MASK          0x0F
+#define GTP_EXT_QOS_SIG_IND_MASK                0x10
 
 /* Definition of Radio Priority's masks */
-#define GTPv1_EXT_RP_NSAPI_MASK                        0xF0
-#define GTPv1_EXT_RP_SPARE_MASK                        0x08
-#define GTPv1_EXT_RP_MASK                              0x07
+#define GTPv1_EXT_RP_NSAPI_MASK         0xF0
+#define GTPv1_EXT_RP_SPARE_MASK         0x08
+#define GTPv1_EXT_RP_MASK               0x07
 
 static const value_string message_type[] = {
     {GTP_MSG_UNKNOWN, "For future use"},
@@ -453,7 +453,7 @@ static const value_string message_type[] = {
     {GTP_MBMS_SES_STOP_RES, "MBMS Session Stop Response"},
     {GTP_MBMS_SES_UPD_REQ, "MBMS Session Update Request"},
     {GTP_MBMS_SES_UPD_RES, "MBMS Session Update Response"},
-/* 122-127     For future use. Shall not be sent. 
+/* 122-127 For future use. Shall not be sent.
  * If received, shall be treated as an Unknown message.
  */
     {GTP_MS_INFO_CNG_NOT_REQ, "MS Info Change Notification Request"},
@@ -465,118 +465,118 @@ static const value_string message_type[] = {
 };
 
 /* definitions of fields in extension header */
-#define GTP_EXT_CAUSE          0x01
-#define GTP_EXT_IMSI           0x02
-#define GTP_EXT_RAI                    0x03
-#define GTP_EXT_TLLI           0x04
-#define GTP_EXT_PTMSI          0x05
-#define GTP_EXT_QOS_GPRS       0x06
-#define GTP_EXT_REORDER                0x08
-#define GTP_EXT_AUTH_TRI       0x09
-#define GTP_EXT_MAP_CAUSE      0x0B
-#define GTP_EXT_PTMSI_SIG      0x0C
-#define GTP_EXT_MS_VALID       0x0D
-#define GTP_EXT_RECOVER                0x0E
-#define GTP_EXT_SEL_MODE       0x0F
-
-#define GTP_EXT_16                     0x10
-#define GTP_EXT_FLOW_LABEL     0x10
-#define GTP_EXT_TEID           0x10    /* 0xFF10 3G */
-
-#define GTP_EXT_17                     0x11
-#define GTP_EXT_FLOW_SIG       0x11
-#define GTP_EXT_TEID_CP                0x11    /* 0xFF11 3G */
-
-#define GTP_EXT_18                     0x12
-#define GTP_EXT_FLOW_II                0x12
-#define GTP_EXT_TEID_II                0x12    /* 0xFF12 3G */
-
-#define GTP_EXT_19                     0x13
-#define GTP_EXT_MS_REASON      0x13    /* same as 0x1D GTPv1_EXT_MS_REASON */
-#define GTP_EXT_TEAR_IND       0x13    /* 0xFF13 3G */
-
-#define GTP_EXT_NSAPI          0x14    /* 3G */
-#define GTP_EXT_RANAP_CAUSE    0x15    /* 3G */
-#define GTP_EXT_RAB_CNTXT      0x16    /* 3G */
-#define GTP_EXT_RP_SMS         0x17    /* 3G */
-#define GTP_EXT_RP                     0x18    /* 3G */
-#define GTP_EXT_PKT_FLOW_ID    0x19    /* 3G */
-#define GTP_EXT_CHRG_CHAR      0x1A    /* 3G */
-#define GTP_EXT_TRACE_REF      0x1B    /* 3G */
-#define GTP_EXT_TRACE_TYPE     0x1C    /* 3G */
-#define GTPv1_EXT_MS_REASON    0x1D    /* 3G */
-#define GTP_EXT_TR_COMM                0x7E    /* charging */
-#define GTP_EXT_CHRG_ID                0x7F
-#define GTP_EXT_USER_ADDR      0x80
-#define GTP_EXT_MM_CNTXT       0x81
-#define GTP_EXT_PDP_CNTXT      0x82
-#define GTP_EXT_APN                    0x83
-#define GTP_EXT_PROTO_CONF     0x84
-#define GTP_EXT_GSN_ADDR       0x85
-#define GTP_EXT_MSISDN         0x86
-#define GTP_EXT_QOS_UMTS       0x87    /* 3G */
-#define GTP_EXT_AUTH_QUI       0x88    /* 3G */
-#define GTP_EXT_TFT                    0x89    /* 3G */
-#define GTP_EXT_TARGET_ID      0x8A    /* 3G */
-#define GTP_EXT_UTRAN_CONT     0x8B    /* 3G */
-#define GTP_EXT_RAB_SETUP      0x8C    /* 3G */
-#define GTP_EXT_HDR_LIST       0x8D    /* 3G */
-#define GTP_EXT_TRIGGER_ID     0x8E    /* 3G   142 7.7.41 */
-#define GTP_EXT_OMC_ID         0x8F    /* 3G   143 TLV OMC Identity 7.7.42 */
-#define GTP_EXT_RAN_TR_CONT                    0x90    /* 3G   144 TLV RAN Transparent Container 7.7.43 */
-#define GTP_EXT_PDP_CONT_PRIO          0x91    /* 3G   145 TLV PDP Context Prioritization 7.7.45 */
-#define GTP_EXT_ADD_RAB_SETUP_INF      0x92    /* 3G   146 TLV Additional RAB Setup Information 7.7.45A */
-#define GTP_EXT_SSGN_NO                                0x93    /* 3G   147 TLV SGSN Number 7.7.47 */
-#define GTP_EXT_COMMON_FLGS                    0x94    /* 3G   148 TLV Common Flags 7.7.48 */
-#define GTP_EXT_APN_RES                                0x95    /* 3G   149 */
-#define GTP_EXT_RA_PRIO_LCS                    0x96    /* 3G   150 TLV Radio Priority LCS 7.7.25B */
-#define GTP_EXT_RAT_TYPE                       0x97    /* 3G   151 TLV RAT Type 7.7.50 */
-#define GTP_EXT_USR_LOC_INF                    0x98    /* 3G   152 TLV User Location Information 7.7.51 */
-#define GTP_EXT_MS_TIME_ZONE           0x99    /* 3G   153 TLV MS Time Zone 7.7.52 */
-
-#define GTP_EXT_IMEISV                         0x9A    /* 3G */
-#define GTP_EXT_CAMEL_CHG_INF_CON      0x9B    /* 3G   155 TLV CAMEL Charging Information Container 7.7.54 */
-#define GTP_EXT_MBMS_UE_CTX                    0x9C    /* 3G   156 TLV MBMS UE Context 7.7.55 */
-#define GTP_EXT_TMGI                           0x9D    /* 3G   157 TLV Temporary Mobile Group Identity (TMGI) 7.7.56 */
-#define GTP_EXT_RIM_RA                         0x9E    /* 3G   158 TLV RIM Routing Address 7.7.57 */
-#define GTP_EXT_MBMS_PROT_CONF_OPT     0x9F    /* 3G   159 TLV MBMS Protocol Configuration Options 7.7.58 */
-#define GTP_EXT_MBMS_SA                                0xA0    /* 3G   160 TLV MBMS Service Area 7.7.60 */
-#define GTP_EXT_SRC_RNC_PDP_CTX_INF 0xA1       /* 3G   161 TLV Source RNC PDCP context info 7.7.61 */
-#define GTP_EXT_ADD_TRS_INF                    0xA2    /* 3G   162 TLV Additional Trace Info 7.7.62 */
-#define GTP_EXT_HOP_COUNT                      0xA3    /* 3G   163 TLV Hop Counter 7.7.63 */
-#define GTP_EXT_SEL_PLMN_ID                    0xA4    /* 3G   164 TLV Selected PLMN ID 7.7.64 */
-#define GTP_EXT_MBMS_SES_ID                    0xA5    /* 3G   165 TLV MBMS Session Identifier 7.7.65 */
-#define GTP_EXT_MBMS_2G_3G_IND         0xA6    /* 3G   166 TLV MBMS 2G/3G Indicator 7.7.66 */
-#define GTP_EXT_ENH_NSAPI                      0xA7    /* 3G   167 TLV Enhanced NSAPI 7.7.67 */
-#define GTP_EXT_MBMS_SES_DUR           0xA8    /* 3G   168 TLV MBMS Session Duration 7.7.59 */
-#define GTP_EXT_ADD_MBMS_TRS_INF       0xA9    /* 3G   169 TLV Additional MBMS Trace Info 7.7.68 */
-#define GTP_EXT_MBMS_SES_ID_REP_NO     0xAA    /* 3G   170 TLV MBMS Session Identity Repetition Number 7.7.69 */
-#define GTP_EXT_MBMS_TIME_TO_DATA_TR 0xAB      /* 3G   171 TLV MBMS Time To Data Transfer 7.7.70 */
-#define GTP_EXT_PS_HO_REQ_CTX          0xAC    /* 3G   172 TLV PS Handover Request Context 7.7.71 */
-#define GTP_EXT_BSS_CONT                       0xAD    /* 3G   173 TLV BSS Container 7.7.72 */
-#define GTP_EXT_CELL_ID                                0xAE    /* 3G   174 TLV Cell Identification 7.7.73 */
-#define GTP_EXT_PDU_NO                         0xAF    /* 3G   175 TLV PDU Numbers 7.7.74 */
-#define GTP_EXT_BSSGP_CAUSE                    0xB0    /* 3G   176 TLV BSSGP Cause 7.7.75 */
-#define GTP_EXT_REQ_MBMS_BEARER_CAP 0xB1       /* 3G   177 TLV Required MBMS bearer capabilities       7.7.76 */
-#define GTP_EXT_RIM_ROUTING_ADDR_DISC 0xB2     /* 3G   178 TLV RIM Routing Address Discriminator       7.7.77 */
-#define GTP_EXT_LIST_OF_SETUP_PFCS     0xB3    /* 3G   179 TLV List of set-up PFCs     7.7.78 */
-#define GTP_EXT_PS_HANDOVER_XIP_PAR 0xB4       /* 3G   180 TLV PS Handover XID Parameters      7.7.79 */
-#define GTP_EXT_MS_INF_CHG_REP_ACT     0xB5    /* 3G   181 TLV MS Info Change Reporting Action 7.7.80 */
-#define GTP_EXT_DIRECT_TUNNEL_FLGS     0xB6    /* 3G   182 TLV Direct Tunnel Flags     7.7.81 */
-#define GTP_EXT_CORRELATION_ID         0xB7    /* 3G   183 TLV Correlation-ID  7.7.82 */
-#define GTP_EXT_BEARER_CONTROL_MODE 0xB8       /* 3G   184 TLV Bearer Control Mode     7.7.83 */
-/* 239-250     Reserved for the GPRS charging protocol (see GTP' in 3GPP TS 32.295 [33])*/
-
-#define GTP_EXT_C1                     0xC1
-#define GTP_EXT_C2                     0xC2
-#define GTP_EXT_REL_PACK       0xF9    /* charging */
-#define GTP_EXT_CAN_PACK       0xFA    /* charging */
-#define GTP_EXT_CHRG_ADDR      0xFB    /* 3G   251     TLV     Charging Gateway Address        7.7.44 */
-/* 252-254     Reserved for the GPRS charging protocol (see GTP' in 3GPP TS 32.295 [33])*/
-#define GTP_EXT_DATA_REQ       0xFC    /* charging */
-#define GTP_EXT_DATA_RESP      0xFD    /* charging */
-#define GTP_EXT_NODE_ADDR      0xFE    /* charging */
-#define GTP_EXT_PRIV_EXT       0xFF
+#define GTP_EXT_CAUSE                 0x01
+#define GTP_EXT_IMSI                  0x02
+#define GTP_EXT_RAI                   0x03
+#define GTP_EXT_TLLI                  0x04
+#define GTP_EXT_PTMSI                 0x05
+#define GTP_EXT_QOS_GPRS              0x06
+#define GTP_EXT_REORDER               0x08
+#define GTP_EXT_AUTH_TRI              0x09
+#define GTP_EXT_MAP_CAUSE             0x0B
+#define GTP_EXT_PTMSI_SIG             0x0C
+#define GTP_EXT_MS_VALID              0x0D
+#define GTP_EXT_RECOVER               0x0E
+#define GTP_EXT_SEL_MODE              0x0F
+
+#define GTP_EXT_16                    0x10
+#define GTP_EXT_FLOW_LABEL            0x10
+#define GTP_EXT_TEID                  0x10    /* 0xFF10 3G */
+
+#define GTP_EXT_17                    0x11
+#define GTP_EXT_FLOW_SIG              0x11
+#define GTP_EXT_TEID_CP               0x11    /* 0xFF11 3G */
+
+#define GTP_EXT_18                    0x12
+#define GTP_EXT_FLOW_II               0x12
+#define GTP_EXT_TEID_II               0x12    /* 0xFF12 3G */
+
+#define GTP_EXT_19                    0x13
+#define GTP_EXT_MS_REASON             0x13    /* same as 0x1D GTPv1_EXT_MS_REASON */
+#define GTP_EXT_TEAR_IND              0x13    /* 0xFF13 3G */
+
+#define GTP_EXT_NSAPI                 0x14    /* 3G */
+#define GTP_EXT_RANAP_CAUSE           0x15    /* 3G */
+#define GTP_EXT_RAB_CNTXT             0x16    /* 3G */
+#define GTP_EXT_RP_SMS                0x17    /* 3G */
+#define GTP_EXT_RP                    0x18    /* 3G */
+#define GTP_EXT_PKT_FLOW_ID           0x19    /* 3G */
+#define GTP_EXT_CHRG_CHAR             0x1A    /* 3G */
+#define GTP_EXT_TRACE_REF             0x1B    /* 3G */
+#define GTP_EXT_TRACE_TYPE            0x1C    /* 3G */
+#define GTPv1_EXT_MS_REASON           0x1D    /* 3G */
+#define GTP_EXT_TR_COMM               0x7E    /* charging */
+#define GTP_EXT_CHRG_ID               0x7F
+#define GTP_EXT_USER_ADDR             0x80
+#define GTP_EXT_MM_CNTXT              0x81
+#define GTP_EXT_PDP_CNTXT             0x82
+#define GTP_EXT_APN                   0x83
+#define GTP_EXT_PROTO_CONF            0x84
+#define GTP_EXT_GSN_ADDR              0x85
+#define GTP_EXT_MSISDN                0x86
+#define GTP_EXT_QOS_UMTS              0x87    /* 3G */
+#define GTP_EXT_AUTH_QUI              0x88    /* 3G */
+#define GTP_EXT_TFT                   0x89    /* 3G */
+#define GTP_EXT_TARGET_ID             0x8A    /* 3G */
+#define GTP_EXT_UTRAN_CONT            0x8B    /* 3G */
+#define GTP_EXT_RAB_SETUP             0x8C    /* 3G */
+#define GTP_EXT_HDR_LIST              0x8D    /* 3G */
+#define GTP_EXT_TRIGGER_ID            0x8E    /* 3G   142 7.7.41 */
+#define GTP_EXT_OMC_ID                0x8F    /* 3G   143 TLV OMC Identity 7.7.42 */
+#define GTP_EXT_RAN_TR_CONT           0x90    /* 3G   144 TLV RAN Transparent Container 7.7.43 */
+#define GTP_EXT_PDP_CONT_PRIO         0x91    /* 3G   145 TLV PDP Context Prioritization 7.7.45 */
+#define GTP_EXT_ADD_RAB_SETUP_INF     0x92    /* 3G   146 TLV Additional RAB Setup Information 7.7.45A */
+#define GTP_EXT_SSGN_NO               0x93    /* 3G   147 TLV SGSN Number 7.7.47 */
+#define GTP_EXT_COMMON_FLGS           0x94    /* 3G   148 TLV Common Flags 7.7.48 */
+#define GTP_EXT_APN_RES               0x95    /* 3G   149 */
+#define GTP_EXT_RA_PRIO_LCS           0x96    /* 3G   150 TLV Radio Priority LCS 7.7.25B */
+#define GTP_EXT_RAT_TYPE              0x97    /* 3G   151 TLV RAT Type 7.7.50 */
+#define GTP_EXT_USR_LOC_INF           0x98    /* 3G   152 TLV User Location Information 7.7.51 */
+#define GTP_EXT_MS_TIME_ZONE          0x99    /* 3G   153 TLV MS Time Zone 7.7.52 */
+
+#define GTP_EXT_IMEISV                0x9A    /* 3G */
+#define GTP_EXT_CAMEL_CHG_INF_CON     0x9B    /* 3G   155 TLV CAMEL Charging Information Container 7.7.54 */
+#define GTP_EXT_MBMS_UE_CTX           0x9C    /* 3G   156 TLV MBMS UE Context 7.7.55 */
+#define GTP_EXT_TMGI                  0x9D    /* 3G   157 TLV Temporary Mobile Group Identity (TMGI) 7.7.56 */
+#define GTP_EXT_RIM_RA                0x9E    /* 3G   158 TLV RIM Routing Address 7.7.57 */
+#define GTP_EXT_MBMS_PROT_CONF_OPT    0x9F    /* 3G   159 TLV MBMS Protocol Configuration Options 7.7.58 */
+#define GTP_EXT_MBMS_SA               0xA0    /* 3G   160 TLV MBMS Service Area 7.7.60 */
+#define GTP_EXT_SRC_RNC_PDP_CTX_INF   0xA1    /* 3G   161 TLV Source RNC PDCP context info 7.7.61 */
+#define GTP_EXT_ADD_TRS_INF           0xA2    /* 3G   162 TLV Additional Trace Info 7.7.62 */
+#define GTP_EXT_HOP_COUNT             0xA3    /* 3G   163 TLV Hop Counter 7.7.63 */
+#define GTP_EXT_SEL_PLMN_ID           0xA4    /* 3G   164 TLV Selected PLMN ID 7.7.64 */
+#define GTP_EXT_MBMS_SES_ID           0xA5    /* 3G   165 TLV MBMS Session Identifier 7.7.65 */
+#define GTP_EXT_MBMS_2G_3G_IND        0xA6    /* 3G   166 TLV MBMS 2G/3G Indicator 7.7.66 */
+#define GTP_EXT_ENH_NSAPI             0xA7    /* 3G   167 TLV Enhanced NSAPI 7.7.67 */
+#define GTP_EXT_MBMS_SES_DUR          0xA8    /* 3G   168 TLV MBMS Session Duration 7.7.59 */
+#define GTP_EXT_ADD_MBMS_TRS_INF      0xA9    /* 3G   169 TLV Additional MBMS Trace Info 7.7.68 */
+#define GTP_EXT_MBMS_SES_ID_REP_NO    0xAA    /* 3G   170 TLV MBMS Session Identity Repetition Number 7.7.69 */
+#define GTP_EXT_MBMS_TIME_TO_DATA_TR  0xAB    /* 3G   171 TLV MBMS Time To Data Transfer 7.7.70 */
+#define GTP_EXT_PS_HO_REQ_CTX         0xAC    /* 3G   172 TLV PS Handover Request Context 7.7.71 */
+#define GTP_EXT_BSS_CONT              0xAD    /* 3G   173 TLV BSS Container 7.7.72 */
+#define GTP_EXT_CELL_ID               0xAE    /* 3G   174 TLV Cell Identification 7.7.73 */
+#define GTP_EXT_PDU_NO                0xAF    /* 3G   175 TLV PDU Numbers 7.7.74 */
+#define GTP_EXT_BSSGP_CAUSE           0xB0    /* 3G   176 TLV BSSGP Cause 7.7.75 */
+#define GTP_EXT_REQ_MBMS_BEARER_CAP   0xB1    /* 3G   177 TLV Required MBMS bearer capabilities       7.7.76 */
+#define GTP_EXT_RIM_ROUTING_ADDR_DISC 0xB2    /* 3G   178 TLV RIM Routing Address Discriminator       7.7.77 */
+#define GTP_EXT_LIST_OF_SETUP_PFCS    0xB3    /* 3G   179 TLV List of set-up PFCs     7.7.78 */
+#define GTP_EXT_PS_HANDOVER_XIP_PAR   0xB4    /* 3G   180 TLV PS Handover XID Parameters      7.7.79 */
+#define GTP_EXT_MS_INF_CHG_REP_ACT    0xB5    /* 3G   181 TLV MS Info Change Reporting Action 7.7.80 */
+#define GTP_EXT_DIRECT_TUNNEL_FLGS    0xB6    /* 3G   182 TLV Direct Tunnel Flags     7.7.81 */
+#define GTP_EXT_CORRELATION_ID        0xB7    /* 3G   183 TLV Correlation-ID  7.7.82 */
+#define GTP_EXT_BEARER_CONTROL_MODE   0xB8    /* 3G   184 TLV Bearer Control Mode     7.7.83 */
+/* 239-250  Reserved for the GPRS charging protocol (see GTP' in 3GPP TS 32.295 [33])*/
+
+#define GTP_EXT_C1                    0xC1
+#define GTP_EXT_C2                    0xC2
+#define GTP_EXT_REL_PACK              0xF9    /* charging */
+#define GTP_EXT_CAN_PACK              0xFA    /* charging */
+#define GTP_EXT_CHRG_ADDR             0xFB    /* 3G   251     TLV     Charging Gateway Address        7.7.44 */
+/* 252-254  Reserved for the GPRS charging protocol (see GTP' in 3GPP TS 32.295 [33])*/
+#define GTP_EXT_DATA_REQ              0xFC    /* charging */
+#define GTP_EXT_DATA_RESP             0xFD    /* charging */
+#define GTP_EXT_NODE_ADDR             0xFE    /* charging */
+#define GTP_EXT_PRIV_EXT              0xFF
 
 static const value_string gtp_val[] = {
     {GTP_EXT_CAUSE, "Cause of operation"},
@@ -595,31 +595,31 @@ static const value_string gtp_val[] = {
 
     {GTP_EXT_16, "Flow label data I"},
     {GTP_EXT_FLOW_LABEL, "Flow label data I"},
-    {GTP_EXT_TEID, "Tunnel Endpoint Identifier Data I"},       /* 3G */
+    {GTP_EXT_TEID, "Tunnel Endpoint Identifier Data I"},    /* 3G */
 
     {GTP_EXT_17, "Flow label signalling"},
     {GTP_EXT_FLOW_SIG, "Flow label signalling"},
-    {GTP_EXT_TEID_CP, "Tunnel Endpoint Identifier Data Control Plane"},        /* 3G */
+    {GTP_EXT_TEID_CP, "Tunnel Endpoint Identifier Data Control Plane"}, /* 3G */
 
     {GTP_EXT_18, "Flow label data II"},
     {GTP_EXT_FLOW_II, "Flow label data II"},
-    {GTP_EXT_TEID_II, "Tunnel Endpoint Identifier Data II"},   /* 3G */
+    {GTP_EXT_TEID_II, "Tunnel Endpoint Identifier Data II"},    /* 3G */
 
     {GTP_EXT_19, "MS not reachable reason"},
     {GTP_EXT_MS_REASON, "MS not reachable reason"},
-    {GTP_EXT_TEAR_IND, "Teardown ID"}, /* 3G */
-
-    {GTP_EXT_NSAPI, "NSAPI"},  /* 3G */
-    {GTP_EXT_RANAP_CAUSE, "RANAP cause"},      /* 3G */
-    {GTP_EXT_RAB_CNTXT, "RAB context"},        /* 3G */
-    {GTP_EXT_RP_SMS, "Radio Priority for MO SMS"},     /* 3G */
-    {GTP_EXT_RP, "Radio Priority"},    /* 3G */
-    {GTP_EXT_PKT_FLOW_ID, "Packet Flow ID"},   /* 3G */
-    {GTP_EXT_CHRG_CHAR, "Charging characteristics"},   /* 3G */
-    {GTP_EXT_TRACE_REF, "Trace references"},   /* 3G */
-    {GTP_EXT_TRACE_TYPE, "Trace type"},        /* 3G */
-    {GTPv1_EXT_MS_REASON, "MS not reachable reason"},  /* 3G */
-    {GTP_EXT_TR_COMM, "Packet transfer command"},      /* charging */
+    {GTP_EXT_TEAR_IND, "Teardown ID"},  /* 3G */
+
+    {GTP_EXT_NSAPI, "NSAPI"},   /* 3G */
+    {GTP_EXT_RANAP_CAUSE, "RANAP cause"},   /* 3G */
+    {GTP_EXT_RAB_CNTXT, "RAB context"}, /* 3G */
+    {GTP_EXT_RP_SMS, "Radio Priority for MO SMS"},  /* 3G */
+    {GTP_EXT_RP, "Radio Priority"}, /* 3G */
+    {GTP_EXT_PKT_FLOW_ID, "Packet Flow ID"},    /* 3G */
+    {GTP_EXT_CHRG_CHAR, "Charging characteristics"},    /* 3G */
+    {GTP_EXT_TRACE_REF, "Trace references"},    /* 3G */
+    {GTP_EXT_TRACE_TYPE, "Trace type"}, /* 3G */
+    {GTPv1_EXT_MS_REASON, "MS not reachable reason"},   /* 3G */
+    {GTP_EXT_TR_COMM, "Packet transfer command"},   /* charging */
     {GTP_EXT_CHRG_ID, "Charging ID"},
     {GTP_EXT_USER_ADDR, "End user address"},
     {GTP_EXT_MM_CNTXT, "MM context"},
@@ -628,69 +628,69 @@ static const value_string gtp_val[] = {
     {GTP_EXT_PROTO_CONF, "Protocol configuration options"},
     {GTP_EXT_GSN_ADDR, "GSN address"},
     {GTP_EXT_MSISDN, "MS international PSTN/ISDN number"},
-    {GTP_EXT_QOS_UMTS, "Quality of service (UMTS)"},   /* 3G */
-    {GTP_EXT_AUTH_QUI, "Authentication quintuplets"},  /* 3G */
-    {GTP_EXT_TFT, "Traffic Flow Template (TFT)"},      /* 3G */
-    {GTP_EXT_TARGET_ID, "Target (RNC) identification"},        /* 3G */
-    {GTP_EXT_UTRAN_CONT, "UTRAN transparent field"},   /* 3G */
-    {GTP_EXT_RAB_SETUP, "RAB setup information"},      /* 3G */
-    {GTP_EXT_HDR_LIST, "Extension Header Types List"}, /* 3G */
-    {GTP_EXT_TRIGGER_ID, "Trigger Id"},        /* 3G */
-    {GTP_EXT_OMC_ID, "OMC Identity"},  /* 3G */
-
-    {GTP_EXT_RAN_TR_CONT, "RAN Transparent Container"},        /* 7.7.43 */
-    {GTP_EXT_PDP_CONT_PRIO, "PDP Context Prioritization"},     /* 7.7.45 */
-    {GTP_EXT_ADD_RAB_SETUP_INF, "Additional RAB Setup Information"},   /* 7.7.45A */
-    {GTP_EXT_SSGN_NO, "SGSN Number"},  /* 7.7.47 */
-    {GTP_EXT_COMMON_FLGS, "Common Flags"},     /* 7.7.48 */
-    {GTP_EXT_APN_RES, "APN Restriction"},      /* 3G */
-    {GTP_EXT_RA_PRIO_LCS, "Radio Priority LCS"},       /* 7.7.25B */
-    {GTP_EXT_RAT_TYPE, "RAT Type"},    /* 3G */
-    {GTP_EXT_USR_LOC_INF, "User Location Information"},        /* 7.7.51 */
-    {GTP_EXT_MS_TIME_ZONE, "MS Time Zone"},    /* 7.7.52 */
-
-    {GTP_EXT_IMEISV, "IMEI(SV)"},      /* 3G */
-    {GTP_EXT_CAMEL_CHG_INF_CON, "CAMEL Charging Information Container"},       /* 7.7.54 */
-    {GTP_EXT_MBMS_UE_CTX, "MBMS UE Context"},  /* 7.7.55 */
-    {GTP_EXT_TMGI, "Temporary Mobile Group Identity (TMGI)"},  /* 7.7.56 */
-    {GTP_EXT_RIM_RA, "RIM Routing Address"},   /* 7.7.57 */
-    {GTP_EXT_MBMS_PROT_CONF_OPT, "MBMS Protocol Configuration Options"},       /* 7.7.58 */
-    {GTP_EXT_MBMS_SA, "MBMS Service Area"},    /* 7.7.60 */
-    {GTP_EXT_SRC_RNC_PDP_CTX_INF, "Source RNC PDCP context info"},     /* 7.7.61 */
-    {GTP_EXT_ADD_TRS_INF, "Additional Trace Info"},    /* 7.7.62 */
-    {GTP_EXT_HOP_COUNT, "Hop Counter"},        /* 7.7.63 */
-    {GTP_EXT_SEL_PLMN_ID, "Selected PLMN ID"}, /* 7.7.64 */
-    {GTP_EXT_MBMS_SES_ID, "MBMS Session Identifier"},  /* 7.7.65 */
-    {GTP_EXT_MBMS_2G_3G_IND, "MBMS 2G/3G Indicator"},  /* 7.7.66 */
-    {GTP_EXT_ENH_NSAPI, "Enhanced NSAPI"},     /* 7.7.67 */
-    {GTP_EXT_MBMS_SES_DUR, "MBMS Session Duration"},   /* 7.7.59 */
-    {GTP_EXT_ADD_MBMS_TRS_INF, "Additional MBMS Trace Info"},  /* 7.7.68 */
-    {GTP_EXT_MBMS_SES_ID_REP_NO, "MBMS Session Identity Repetition Number"},   /* 7.7.69 */
-    {GTP_EXT_MBMS_TIME_TO_DATA_TR, "MBMS Time To Data Transfer"},      /* 7.7.70 */
-    {GTP_EXT_PS_HO_REQ_CTX, "PS Handover Request Context"},    /* 7.7.71 */
-    {GTP_EXT_BSS_CONT, "BSS Container"},       /* 7.7.72 */
-    {GTP_EXT_CELL_ID, "Cell Identification"},  /* 7.7.73 */
-    {GTP_EXT_PDU_NO, "PDU Numbers"},   /* 7.7.74 */
-    {GTP_EXT_BSSGP_CAUSE, "BSSGP Cause"},      /* 7.7.75 */
-    {GTP_EXT_REQ_MBMS_BEARER_CAP, "Required MBMS bearer capabilities"},        /* 7.7.76 */
-    {GTP_EXT_RIM_ROUTING_ADDR_DISC, "RIM Routing Address Discriminator"},      /* 7.7.77 */
-    {GTP_EXT_LIST_OF_SETUP_PFCS, "List of set-up PFCs"},       /* 7.7.78 */
-    {GTP_EXT_PS_HANDOVER_XIP_PAR, "PS Handover XID Parameters"},       /* 7.7.79 */
-    {GTP_EXT_MS_INF_CHG_REP_ACT, "MS Info Change Reporting Action"},   /* 7.7.80 */
-    {GTP_EXT_DIRECT_TUNNEL_FLGS, "Direct Tunnel Flags"},       /* 7.7.81 */
-    {GTP_EXT_CORRELATION_ID, "Correlation-ID"},        /* 7.7.82 */
-    {GTP_EXT_BEARER_CONTROL_MODE, "Bearer Control Mode"},      /* 7.7.83 */
-    {GTP_EXT_REL_PACK, "Sequence numbers of released packets IE"},     /* charging */
-    {GTP_EXT_CAN_PACK, "Sequence numbers of canceled packets IE"},     /* charging */
+    {GTP_EXT_QOS_UMTS, "Quality of service (UMTS)"},    /* 3G */
+    {GTP_EXT_AUTH_QUI, "Authentication quintuplets"},   /* 3G */
+    {GTP_EXT_TFT, "Traffic Flow Template (TFT)"},   /* 3G */
+    {GTP_EXT_TARGET_ID, "Target (RNC) identification"}, /* 3G */
+    {GTP_EXT_UTRAN_CONT, "UTRAN transparent field"},    /* 3G */
+    {GTP_EXT_RAB_SETUP, "RAB setup information"},   /* 3G */
+    {GTP_EXT_HDR_LIST, "Extension Header Types List"},  /* 3G */
+    {GTP_EXT_TRIGGER_ID, "Trigger Id"}, /* 3G */
+    {GTP_EXT_OMC_ID, "OMC Identity"},   /* 3G */
+
+    {GTP_EXT_RAN_TR_CONT, "RAN Transparent Container"}, /* 7.7.43 */
+    {GTP_EXT_PDP_CONT_PRIO, "PDP Context Prioritization"},  /* 7.7.45 */
+    {GTP_EXT_ADD_RAB_SETUP_INF, "Additional RAB Setup Information"},    /* 7.7.45A */
+    {GTP_EXT_SSGN_NO, "SGSN Number"},   /* 7.7.47 */
+    {GTP_EXT_COMMON_FLGS, "Common Flags"},  /* 7.7.48 */
+    {GTP_EXT_APN_RES, "APN Restriction"},   /* 3G */
+    {GTP_EXT_RA_PRIO_LCS, "Radio Priority LCS"},    /* 7.7.25B */
+    {GTP_EXT_RAT_TYPE, "RAT Type"}, /* 3G */
+    {GTP_EXT_USR_LOC_INF, "User Location Information"}, /* 7.7.51 */
+    {GTP_EXT_MS_TIME_ZONE, "MS Time Zone"}, /* 7.7.52 */
+
+    {GTP_EXT_IMEISV, "IMEI(SV)"},   /* 3G */
+    {GTP_EXT_CAMEL_CHG_INF_CON, "CAMEL Charging Information Container"},    /* 7.7.54 */
+    {GTP_EXT_MBMS_UE_CTX, "MBMS UE Context"},   /* 7.7.55 */
+    {GTP_EXT_TMGI, "Temporary Mobile Group Identity (TMGI)"},   /* 7.7.56 */
+    {GTP_EXT_RIM_RA, "RIM Routing Address"},    /* 7.7.57 */
+    {GTP_EXT_MBMS_PROT_CONF_OPT, "MBMS Protocol Configuration Options"},    /* 7.7.58 */
+    {GTP_EXT_MBMS_SA, "MBMS Service Area"}, /* 7.7.60 */
+    {GTP_EXT_SRC_RNC_PDP_CTX_INF, "Source RNC PDCP context info"},  /* 7.7.61 */
+    {GTP_EXT_ADD_TRS_INF, "Additional Trace Info"}, /* 7.7.62 */
+    {GTP_EXT_HOP_COUNT, "Hop Counter"}, /* 7.7.63 */
+    {GTP_EXT_SEL_PLMN_ID, "Selected PLMN ID"},  /* 7.7.64 */
+    {GTP_EXT_MBMS_SES_ID, "MBMS Session Identifier"},   /* 7.7.65 */
+    {GTP_EXT_MBMS_2G_3G_IND, "MBMS 2G/3G Indicator"},   /* 7.7.66 */
+    {GTP_EXT_ENH_NSAPI, "Enhanced NSAPI"},  /* 7.7.67 */
+    {GTP_EXT_MBMS_SES_DUR, "MBMS Session Duration"},    /* 7.7.59 */
+    {GTP_EXT_ADD_MBMS_TRS_INF, "Additional MBMS Trace Info"},   /* 7.7.68 */
+    {GTP_EXT_MBMS_SES_ID_REP_NO, "MBMS Session Identity Repetition Number"},    /* 7.7.69 */
+    {GTP_EXT_MBMS_TIME_TO_DATA_TR, "MBMS Time To Data Transfer"},   /* 7.7.70 */
+    {GTP_EXT_PS_HO_REQ_CTX, "PS Handover Request Context"}, /* 7.7.71 */
+    {GTP_EXT_BSS_CONT, "BSS Container"},    /* 7.7.72 */
+    {GTP_EXT_CELL_ID, "Cell Identification"},   /* 7.7.73 */
+    {GTP_EXT_PDU_NO, "PDU Numbers"},    /* 7.7.74 */
+    {GTP_EXT_BSSGP_CAUSE, "BSSGP Cause"},   /* 7.7.75 */
+    {GTP_EXT_REQ_MBMS_BEARER_CAP, "Required MBMS bearer capabilities"}, /* 7.7.76 */
+    {GTP_EXT_RIM_ROUTING_ADDR_DISC, "RIM Routing Address Discriminator"},   /* 7.7.77 */
+    {GTP_EXT_LIST_OF_SETUP_PFCS, "List of set-up PFCs"},    /* 7.7.78 */
+    {GTP_EXT_PS_HANDOVER_XIP_PAR, "PS Handover XID Parameters"},    /* 7.7.79 */
+    {GTP_EXT_MS_INF_CHG_REP_ACT, "MS Info Change Reporting Action"},    /* 7.7.80 */
+    {GTP_EXT_DIRECT_TUNNEL_FLGS, "Direct Tunnel Flags"},    /* 7.7.81 */
+    {GTP_EXT_CORRELATION_ID, "Correlation-ID"}, /* 7.7.82 */
+    {GTP_EXT_BEARER_CONTROL_MODE, "Bearer Control Mode"},   /* 7.7.83 */
+    {GTP_EXT_REL_PACK, "Sequence numbers of released packets IE"},  /* charging */
+    {GTP_EXT_CAN_PACK, "Sequence numbers of canceled packets IE"},  /* charging */
     {GTP_EXT_CHRG_ADDR, "Charging Gateway address"},
-    {GTP_EXT_DATA_REQ, "Data record packet"},  /* charging */
-    {GTP_EXT_DATA_RESP, "Requests responded"}, /* charging */
-    {GTP_EXT_NODE_ADDR, "Address of recommended node"},        /* charging */
+    {GTP_EXT_DATA_REQ, "Data record packet"},   /* charging */
+    {GTP_EXT_DATA_RESP, "Requests responded"},  /* charging */
+    {GTP_EXT_NODE_ADDR, "Address of recommended node"}, /* charging */
     {GTP_EXT_PRIV_EXT, "Private Extension"},
     {0, NULL}
 };
 
-/* It seems like some IE's are renamed in gtpv1 at least reading 
+/* It seems like some IE's are renamed in gtpv1 at least reading
  * 3GPP TS 29.060 version 6.11.0 Release 6
  */
 static const value_string gtpv1_val[] = {
@@ -708,25 +708,25 @@ static const value_string gtpv1_val[] = {
     {GTP_EXT_RECOVER, "Recovery"},
     {GTP_EXT_SEL_MODE, "Selection mode"},
 
-    {GTP_EXT_TEID, "Tunnel Endpoint Identifier Data I"},       /* 3G */
+    {GTP_EXT_TEID, "Tunnel Endpoint Identifier Data I"},    /* 3G */
 
-    {GTP_EXT_TEID_CP, "Tunnel Endpoint Identifier Data Control Plane"},        /* 3G */
+    {GTP_EXT_TEID_CP, "Tunnel Endpoint Identifier Data Control Plane"}, /* 3G */
 
-    {GTP_EXT_TEID_II, "Tunnel Endpoint Identifier Data II"},   /* 3G */
+    {GTP_EXT_TEID_II, "Tunnel Endpoint Identifier Data II"},    /* 3G */
 
-    {GTP_EXT_TEAR_IND, "Teardown ID"}, /* 3G */
+    {GTP_EXT_TEAR_IND, "Teardown ID"},  /* 3G */
 
-    {GTP_EXT_NSAPI, "NSAPI"},  /* 3G */
-    {GTP_EXT_RANAP_CAUSE, "RANAP cause"},      /* 3G */
-    {GTP_EXT_RAB_CNTXT, "RAB context"},        /* 3G */
-    {GTP_EXT_RP_SMS, "Radio Priority for MO SMS"},     /* 3G */
-    {GTP_EXT_RP, "Radio Priority"},    /* 3G */
-    {GTP_EXT_PKT_FLOW_ID, "Packet Flow ID"},   /* 3G */
-    {GTP_EXT_CHRG_CHAR, "Charging characteristics"},   /* 3G */
-    {GTP_EXT_TRACE_REF, "Trace references"},   /* 3G */
-    {GTP_EXT_TRACE_TYPE, "Trace type"},        /* 3G */
-    {GTPv1_EXT_MS_REASON, "MS not reachable reason"},  /* 3G */
-    {GTP_EXT_TR_COMM, "Packet transfer command"},      /* charging */
+    {GTP_EXT_NSAPI, "NSAPI"},   /* 3G */
+    {GTP_EXT_RANAP_CAUSE, "RANAP cause"},   /* 3G */
+    {GTP_EXT_RAB_CNTXT, "RAB context"}, /* 3G */
+    {GTP_EXT_RP_SMS, "Radio Priority for MO SMS"},  /* 3G */
+    {GTP_EXT_RP, "Radio Priority"}, /* 3G */
+    {GTP_EXT_PKT_FLOW_ID, "Packet Flow ID"},    /* 3G */
+    {GTP_EXT_CHRG_CHAR, "Charging characteristics"},    /* 3G */
+    {GTP_EXT_TRACE_REF, "Trace references"},    /* 3G */
+    {GTP_EXT_TRACE_TYPE, "Trace type"}, /* 3G */
+    {GTPv1_EXT_MS_REASON, "MS not reachable reason"},   /* 3G */
+    {GTP_EXT_TR_COMM, "Packet transfer command"},   /* charging */
     {GTP_EXT_CHRG_ID, "Charging ID"},
     {GTP_EXT_USER_ADDR, "End user address"},
     {GTP_EXT_MM_CNTXT, "MM context"},
@@ -735,62 +735,62 @@ static const value_string gtpv1_val[] = {
     {GTP_EXT_PROTO_CONF, "Protocol configuration options"},
     {GTP_EXT_GSN_ADDR, "GSN address"},
     {GTP_EXT_MSISDN, "MS international PSTN/ISDN number"},
-    {GTP_EXT_QOS_UMTS, "Quality of service (UMTS)"},   /* 3G */
-    {GTP_EXT_AUTH_QUI, "Authentication quintuplets"},  /* 3G */
-    {GTP_EXT_TFT, "Traffic Flow Template (TFT)"},      /* 3G */
-    {GTP_EXT_TARGET_ID, "Target (RNC) identification"},        /* 3G */
-    {GTP_EXT_UTRAN_CONT, "UTRAN transparent field"},   /* 3G */
-    {GTP_EXT_RAB_SETUP, "RAB setup information"},      /* 3G */
-    {GTP_EXT_HDR_LIST, "Extension Header Types List"}, /* 3G */
-    {GTP_EXT_TRIGGER_ID, "Trigger Id"},        /* 3G */
-    {GTP_EXT_OMC_ID, "OMC Identity"},  /* 3G */
-
-    {GTP_EXT_RAN_TR_CONT, "RAN Transparent Container"},        /* 7.7.43 */
-    {GTP_EXT_PDP_CONT_PRIO, "PDP Context Prioritization"},     /* 7.7.45 */
-    {GTP_EXT_ADD_RAB_SETUP_INF, "Additional RAB Setup Information"},   /* 7.7.45A */
-    {GTP_EXT_SSGN_NO, "SGSN Number"},  /* 7.7.47 */
-    {GTP_EXT_COMMON_FLGS, "Common Flags"},     /* 7.7.48 */
-    {GTP_EXT_APN_RES, "APN Restriction"},      /* 3G */
-    {GTP_EXT_RA_PRIO_LCS, "Radio Priority LCS"},       /* 7.7.25B */
-    {GTP_EXT_RAT_TYPE, "RAT Type"},    /* 3G */
-    {GTP_EXT_USR_LOC_INF, "User Location Information"},        /* 7.7.51 */
-    {GTP_EXT_MS_TIME_ZONE, "MS Time Zone"},    /* 7.7.52 */
-
-    {GTP_EXT_IMEISV, "IMEI(SV)"},      /* 3G */
-    {GTP_EXT_CAMEL_CHG_INF_CON, "CAMEL Charging Information Container"},       /* 7.7.54 */
-    {GTP_EXT_MBMS_UE_CTX, "MBMS UE Context"},  /* 7.7.55 */
-    {GTP_EXT_TMGI, "Temporary Mobile Group Identity (TMGI)"},  /* 7.7.56 */
-    {GTP_EXT_RIM_RA, "RIM Routing Address"},   /* 7.7.57 */
-    {GTP_EXT_MBMS_PROT_CONF_OPT, "MBMS Protocol Configuration Options"},       /* 7.7.58 */
-    {GTP_EXT_MBMS_SA, "MBMS Service Area"},    /* 7.7.60 */
-    {GTP_EXT_SRC_RNC_PDP_CTX_INF, "Source RNC PDCP context info"},     /* 7.7.61 */
-    {GTP_EXT_ADD_TRS_INF, "Additional Trace Info"},    /* 7.7.62 */
-    {GTP_EXT_HOP_COUNT, "Hop Counter"},        /* 7.7.63 */
-    {GTP_EXT_SEL_PLMN_ID, "Selected PLMN ID"}, /* 7.7.64 */
-    {GTP_EXT_MBMS_SES_ID, "MBMS Session Identifier"},  /* 7.7.65 */
-    {GTP_EXT_MBMS_2G_3G_IND, "MBMS 2G/3G Indicator"},  /* 7.7.66 */
-    {GTP_EXT_ENH_NSAPI, "Enhanced NSAPI"},     /* 7.7.67 */
-    {GTP_EXT_MBMS_SES_DUR, "MBMS Session Duration"},   /* 7.7.59 */
-    {GTP_EXT_ADD_MBMS_TRS_INF, "Additional MBMS Trace Info"},  /* 7.7.68 */
-    {GTP_EXT_MBMS_SES_ID_REP_NO, "MBMS Session Identity Repetition Number"},   /* 7.7.69 */
-    {GTP_EXT_MBMS_TIME_TO_DATA_TR, "MBMS Time To Data Transfer"},      /* 7.7.70 */
-    {GTP_EXT_PS_HO_REQ_CTX, "PS Handover Request Context"},    /* 7.7.71 */
-    {GTP_EXT_BSS_CONT, "BSS Container"},       /* 7.7.72 */
-    {GTP_EXT_CELL_ID, "Cell Identification"},  /* 7.7.73 */
-    {GTP_EXT_PDU_NO, "PDU Numbers"},   /* 7.7.74 */
-    {GTP_EXT_BSSGP_CAUSE, "BSSGP Cause"},      /* 7.7.75 */
-    {GTP_EXT_REL_PACK, "Sequence numbers of released packets IE"},     /* charging */
-    {GTP_EXT_CAN_PACK, "Sequence numbers of canceled packets IE"},     /* charging */
+    {GTP_EXT_QOS_UMTS, "Quality of service (UMTS)"},    /* 3G */
+    {GTP_EXT_AUTH_QUI, "Authentication quintuplets"},   /* 3G */
+    {GTP_EXT_TFT, "Traffic Flow Template (TFT)"},   /* 3G */
+    {GTP_EXT_TARGET_ID, "Target (RNC) identification"}, /* 3G */
+    {GTP_EXT_UTRAN_CONT, "UTRAN transparent field"},    /* 3G */
+    {GTP_EXT_RAB_SETUP, "RAB setup information"},   /* 3G */
+    {GTP_EXT_HDR_LIST, "Extension Header Types List"},  /* 3G */
+    {GTP_EXT_TRIGGER_ID, "Trigger Id"}, /* 3G */
+    {GTP_EXT_OMC_ID, "OMC Identity"},   /* 3G */
+
+    {GTP_EXT_RAN_TR_CONT, "RAN Transparent Container"}, /* 7.7.43 */
+    {GTP_EXT_PDP_CONT_PRIO, "PDP Context Prioritization"},  /* 7.7.45 */
+    {GTP_EXT_ADD_RAB_SETUP_INF, "Additional RAB Setup Information"},    /* 7.7.45A */
+    {GTP_EXT_SSGN_NO, "SGSN Number"},   /* 7.7.47 */
+    {GTP_EXT_COMMON_FLGS, "Common Flags"},  /* 7.7.48 */
+    {GTP_EXT_APN_RES, "APN Restriction"},   /* 3G */
+    {GTP_EXT_RA_PRIO_LCS, "Radio Priority LCS"},    /* 7.7.25B */
+    {GTP_EXT_RAT_TYPE, "RAT Type"}, /* 3G */
+    {GTP_EXT_USR_LOC_INF, "User Location Information"}, /* 7.7.51 */
+    {GTP_EXT_MS_TIME_ZONE, "MS Time Zone"}, /* 7.7.52 */
+
+    {GTP_EXT_IMEISV, "IMEI(SV)"},   /* 3G */
+    {GTP_EXT_CAMEL_CHG_INF_CON, "CAMEL Charging Information Container"},    /* 7.7.54 */
+    {GTP_EXT_MBMS_UE_CTX, "MBMS UE Context"},   /* 7.7.55 */
+    {GTP_EXT_TMGI, "Temporary Mobile Group Identity (TMGI)"},   /* 7.7.56 */
+    {GTP_EXT_RIM_RA, "RIM Routing Address"},    /* 7.7.57 */
+    {GTP_EXT_MBMS_PROT_CONF_OPT, "MBMS Protocol Configuration Options"},    /* 7.7.58 */
+    {GTP_EXT_MBMS_SA, "MBMS Service Area"}, /* 7.7.60 */
+    {GTP_EXT_SRC_RNC_PDP_CTX_INF, "Source RNC PDCP context info"},  /* 7.7.61 */
+    {GTP_EXT_ADD_TRS_INF, "Additional Trace Info"}, /* 7.7.62 */
+    {GTP_EXT_HOP_COUNT, "Hop Counter"}, /* 7.7.63 */
+    {GTP_EXT_SEL_PLMN_ID, "Selected PLMN ID"},  /* 7.7.64 */
+    {GTP_EXT_MBMS_SES_ID, "MBMS Session Identifier"},   /* 7.7.65 */
+    {GTP_EXT_MBMS_2G_3G_IND, "MBMS 2G/3G Indicator"},   /* 7.7.66 */
+    {GTP_EXT_ENH_NSAPI, "Enhanced NSAPI"},  /* 7.7.67 */
+    {GTP_EXT_MBMS_SES_DUR, "MBMS Session Duration"},    /* 7.7.59 */
+    {GTP_EXT_ADD_MBMS_TRS_INF, "Additional MBMS Trace Info"},   /* 7.7.68 */
+    {GTP_EXT_MBMS_SES_ID_REP_NO, "MBMS Session Identity Repetition Number"},    /* 7.7.69 */
+    {GTP_EXT_MBMS_TIME_TO_DATA_TR, "MBMS Time To Data Transfer"},   /* 7.7.70 */
+    {GTP_EXT_PS_HO_REQ_CTX, "PS Handover Request Context"}, /* 7.7.71 */
+    {GTP_EXT_BSS_CONT, "BSS Container"},    /* 7.7.72 */
+    {GTP_EXT_CELL_ID, "Cell Identification"},   /* 7.7.73 */
+    {GTP_EXT_PDU_NO, "PDU Numbers"},    /* 7.7.74 */
+    {GTP_EXT_BSSGP_CAUSE, "BSSGP Cause"},   /* 7.7.75 */
+    {GTP_EXT_REL_PACK, "Sequence numbers of released packets IE"},  /* charging */
+    {GTP_EXT_CAN_PACK, "Sequence numbers of canceled packets IE"},  /* charging */
     {GTP_EXT_CHRG_ADDR, "Charging Gateway address"},
-    {GTP_EXT_DATA_REQ, "Data record packet"},  /* charging */
-    {GTP_EXT_DATA_RESP, "Requests responded"}, /* charging */
-    {GTP_EXT_NODE_ADDR, "Address of recommended node"},        /* charging */
+    {GTP_EXT_DATA_REQ, "Data record packet"},   /* charging */
+    {GTP_EXT_DATA_RESP, "Requests responded"},  /* charging */
+    {GTP_EXT_NODE_ADDR, "Address of recommended node"}, /* charging */
     {GTP_EXT_PRIV_EXT, "Private Extension"},
     {0, NULL}
 };
 
-/* GPRS:       9.60 v7.6.0, page 37
- * UMTS:       29.060 v4.0, page 45
+/* GPRS:    9.60 v7.6.0, page 37
+ * UMTS:    29.060 v4.0, page 45
  */
 static const value_string cause_type[] = {
     {0, "Request IMSI"},
@@ -799,11 +799,11 @@ static const value_string cause_type[] = {
     {3, "No identity needed"},
     {4, "MS refuses"},
     {5, "MS is not GPRS responding"},
-    {59, "System failure"},    /* charging */
-    {60, "The transmit buffers are becoming full"},    /* charging */
-    {61, "The receive buffers are becoming full"},     /* charging */
-    {62, "Another node is about to go down"},  /* charging */
-    {63, "This node is about to go down"},     /* charging */
+    {59, "System failure"}, /* charging */
+    {60, "The transmit buffers are becoming full"}, /* charging */
+    {61, "The receive buffers are becoming full"},  /* charging */
+    {62, "Another node is about to go down"},       /* charging */
+    {63, "This node is about to go down"},          /* charging */
     {128, "Request accepted"},
     {192, "Non-existent"},
     {193, "Invalid message format"},
@@ -840,15 +840,15 @@ static const value_string cause_type[] = {
     {224, "MS MBMS Capabilities Insufficient"},
     {225, "Invalid Correlation-ID"},
     {226, "MBMS Bearer Context Superseded"},
-    {252, "Request related to possibly duplicated packets already fulfilled"}, /* charging */
-    {253, "Request already fulfilled"},        /* charging */
-    {254, "Sequence numbers of released/cancelled packets IE incorrect"},      /* charging */
-    {255, "Request not fulfilled"},    /* charging */
+    {252, "Request related to possibly duplicated packets already fulfilled"},  /* charging */
+    {253, "Request already fulfilled"}, /* charging */
+    {254, "Sequence numbers of released/cancelled packets IE incorrect"},   /* charging */
+    {255, "Request not fulfilled"}, /* charging */
     {0, NULL}
 };
 
-/* GPRS:       9.02 v7.7.0
- * UMTS:       29.002 v4.2.1, chapter 17.5, page 268
+/* GPRS:    9.02 v7.7.0
+ * UMTS:    29.002 v4.2.1, chapter 17.5, page 268
  * Imported gsm_old_GSMMAPLocalErrorcode_vals from gsm_map from gsm_map
  */
 
@@ -926,24 +926,24 @@ static const value_string qos_precedence_type[] = {
 
 static const value_string qos_mean_type[] = {
     {0x00, "Subscribed mean throughput (in MS to network direction)"},
-    {0x01, "100 oct/h"},       /* Class 2 */
-    {0x02, "200 oct/h"},       /* Class 3 */
-    {0x03, "500 oct/h"},       /* Class 4 */
-    {0x04, "1 000 oct/h"},     /* Class 5 */
-    {0x05, "2 000 oct/h"},     /* Class 6 */
-    {0x06, "5 000 oct/h"},     /* Class 7 */
-    {0x07, "10 000 oct/h"},    /* Class 8 */
-    {0x08, "20 000 oct/h"},    /* Class 9 */
-    {0x09, "50 000 oct/h"},    /* Class 10 */
-    {0x0A, "100 000 oct/h"},   /* Class 11 */
-    {0x0B, "200 000 oct/h"},   /* Class 12 */
-    {0x0C, "500 000 oct/h"},   /* Class 13 */
-    {0x0D, "1 000 000 oct/h"}, /* Class 14 */
-    {0x0E, "2 000 000 oct/h"}, /* Class 15 */
-    {0x0F, "5 000 000 oct/h"}, /* Class 16 */
-    {0x10, "10 000 000 oct/h"},        /* Class 17 */
-    {0x11, "20 000 000 oct/h"},        /* Class 18 */
-    {0x12, "50 000 000 oct/h"},        /* Class 19 */
+    {0x01, "100 oct/h"},        /* Class 2 */
+    {0x02, "200 oct/h"},        /* Class 3 */
+    {0x03, "500 oct/h"},        /* Class 4 */
+    {0x04, "1 000 oct/h"},      /* Class 5 */
+    {0x05, "2 000 oct/h"},      /* Class 6 */
+    {0x06, "5 000 oct/h"},      /* Class 7 */
+    {0x07, "10 000 oct/h"},     /* Class 8 */
+    {0x08, "20 000 oct/h"},     /* Class 9 */
+    {0x09, "50 000 oct/h"},     /* Class 10 */
+    {0x0A, "100 000 oct/h"},    /* Class 11 */
+    {0x0B, "200 000 oct/h"},    /* Class 12 */
+    {0x0C, "500 000 oct/h"},    /* Class 13 */
+    {0x0D, "1 000 000 oct/h"},  /* Class 14 */
+    {0x0E, "2 000 000 oct/h"},  /* Class 15 */
+    {0x0F, "5 000 000 oct/h"},  /* Class 16 */
+    {0x10, "10 000 000 oct/h"}, /* Class 17 */
+    {0x11, "20 000 000 oct/h"}, /* Class 18 */
+    {0x12, "50 000 000 oct/h"}, /* Class 19 */
 /* QoS Mean throughput classes from 0x13 to 0x1E (from 19 to 30) are subscribed */
     {0x13, "Reserved"},
     {0x14, "Reserved"},
@@ -957,7 +957,7 @@ static const value_string qos_mean_type[] = {
     {0x1C, "Reserved"},
     {0x1D, "Reserved"},
     {0x1E, "Reserved"},
-    {0x1F, "Best effort"},     /* Class 1 */
+    {0x1F, "Best effort"},  /* Class 1 */
     {0, NULL}
 };
 
@@ -966,7 +966,7 @@ static const value_string qos_del_err_sdu[] = {
     {0x01, "No detect ('-')"},
     {0x02, "Erroneous SDUs are delivered ('yes')"},
     {0x03, "Erroneous SDUs are not delivered ('no')"},
-    {0x07, "Reserved"},                /* All other values are reserved */
+    {0x07, "Reserved"},  /* All other values are reserved */
     {0, NULL}
 };
 
@@ -974,7 +974,7 @@ static const value_string qos_del_order[] = {
     {0x00, "Subscribed delivery order (in MS to network direction)"},
     {0x01, "With delivery order ('yes')"},
     {0x02, "Without delivery order ('no')"},
-    {0x03, "Reserved"},                /* All other values are reserved */
+    {0x03, "Reserved"},  /* All other values are reserved */
     {0, NULL}
 };
 
@@ -984,7 +984,7 @@ static const value_string qos_traf_class[] = {
     {0x02, "Streaming class"},
     {0x03, "Interactive class"},
     {0x04, "Background class"},
-    {0x07, "Reserved"},                /* All other values are reserved */
+    {0x07, "Reserved"},  /* All other values are reserved */
     {0, NULL}
 };
 
@@ -994,7 +994,7 @@ static const value_string qos_max_sdu_size[] = {
     {0x97, "1502 octets"},
     {0x98, "1510 octets"},
     {0x99, "1520 octets"},
-    {0, NULL}                  /* All other values are reserved */
+    {0, NULL}             /* All other values are reserved */
 };
 
 static const value_string qos_max_ul[] = {
@@ -1026,7 +1026,7 @@ static const value_string qos_res_ber[] = {
     {0x07, "1/100 000 = 1x10^-5"},
     {0x08, "1/1 000 000 = 1x10^-6"},
     {0x09, "3/50 000 000 = 6x10^-8"},
-    {0x0F, "Reserved"},                /* All other values are reserved */
+    {0x0F, "Reserved"},    /* All other values are reserved */
     {0, NULL}
 };
 
@@ -1039,7 +1039,7 @@ static const value_string qos_sdu_err_ratio[] = {
     {0x05, "1/100 000 = 1x10^-5"},
     {0x06, "1/1 000 000 = 1x10^-6"},
     {0x07, "1/10 = 1x10^-1"},
-    {0x0F, "Reserved"},                /* All other values are reserved */
+    {0x0F, "Reserved"},    /* All other values are reserved */
     {0, NULL}
 };
 
@@ -1053,7 +1053,7 @@ static const value_string qos_traf_handl_prio[] = {
 
 static const value_string qos_trans_delay[] = {
     {0x00, "Subscribed Transfer Delay (in MS to network direction)"},
-    {0x01, "10 ms"},           /* Using a granularity of 10 ms */
+    {0x01, "10 ms"},        /* Using a granularity of 10 ms */
     {0x02, "20 ms"},
     {0x03, "30 ms"},
     {0x04, "40 ms"},
@@ -1068,7 +1068,7 @@ static const value_string qos_trans_delay[] = {
     {0x0D, "130 ms"},
     {0x0E, "140 ms"},
     {0x0F, "150 ms"},
-    {0x10, "200 ms"},          /* (For values from 0x10 to 0x1F, value = 200 ms + (value - 0x10) * 50 ms */
+    {0x10, "200 ms"},       /* (For values from 0x10 to 0x1F, value = 200 ms + (value - 0x10) * 50 ms */
     {0x11, "250 ms"},
     {0x12, "300 ms"},
     {0x13, "350 ms"},
@@ -1084,7 +1084,7 @@ static const value_string qos_trans_delay[] = {
     {0x1D, "850 ms"},
     {0x1E, "900 ms"},
     {0x1F, "950 ms"},
-    {0x20, "1000 ms"},         /* For values from 0x20 to 0x3E, value = 1000 ms + (value - 0x20) * 100 ms */
+    {0x20, "1000 ms"},      /* For values from 0x20 to 0x3E, value = 1000 ms + (value - 0x20) * 100 ms */
     {0x21, "1100 ms"},
     {0x22, "1200 ms"},
     {0x23, "1300 ms"},
@@ -1153,7 +1153,7 @@ static const value_string sel_mode_type[] = {
     {0, "MS or network provided APN, subscribed verified"},
     {1, "MS provided APN, subscription not verified"},
     {2, "Network provided APN, subscription not verified"},
-    {3, "For future use (Network provided APN, subscription not verified"},    /* Shall not be sent. If received, shall be sent as value 2 */
+    {3, "For future use (Network provided APN, subscription not verified"}, /* Shall not be sent. If received, shall be sent as value 2 */
     {0, NULL}
 };
 
@@ -1181,7 +1181,7 @@ static const value_string ms_not_reachable_type[] = {
     {0, NULL}
 };
 
-/* UMTS:       25.413 v3.4.0, chapter 9.2.1.4, page 80
+/* UMTS:   25.413 v3.4.0, chapter 9.2.1.4, page 80
  */
 static const value_string ranap_cause_type[] = {
 /* Radio Network Layer Cause (1-->64) */
@@ -1300,27 +1300,27 @@ static const value_string gtp_cipher_algorithm[] = {
     {7, "GEA/7"},
     {0, NULL}
 };
-static const value_string gtp_ext_rat_type_vals[] = {   
-      {0, "Reserved"},   
-      {1, "UTRAN"},   
-      {2, "GERAN"},   
-      {3, "WLAN"},   
-      {4, "GAN"},   
-      {5, "HSPA Evolution"},   
-      {0, NULL}   
-}; 
-
-#define MM_PROTO_GROUP_CALL_CONTROL    0x00
-#define MM_PROTO_BROADCAST_CALL_CONTROL        0x01
-#define MM_PROTO_PDSS1                 0x02
-#define MM_PROTO_CALL_CONTROL          0x03
-#define MM_PROTO_PDSS2                 0x04
-#define MM_PROTO_MM_NON_GPRS           0x05
-#define MM_PROTO_RR_MGMT               0x06
-#define MM_PROTO_MM_GPRS               0x08
-#define MM_PROTO_SMS                   0x09
-#define MM_PROTO_SESSION_MGMT          0x0A
-#define MM_PROTO_NON_CALL_RELATED      0x0B
+static const value_string gtp_ext_rat_type_vals[] = {
+      {0, "Reserved"},
+      {1, "UTRAN"},
+      {2, "GERAN"},
+      {3, "WLAN"},
+      {4, "GAN"},
+      {5, "HSPA Evolution"},
+      {0, NULL}
+};
+
+#define MM_PROTO_GROUP_CALL_CONTROL     0x00
+#define MM_PROTO_BROADCAST_CALL_CONTROL 0x01
+#define MM_PROTO_PDSS1                  0x02
+#define MM_PROTO_CALL_CONTROL           0x03
+#define MM_PROTO_PDSS2                  0x04
+#define MM_PROTO_MM_NON_GPRS            0x05
+#define MM_PROTO_RR_MGMT                0x06
+#define MM_PROTO_MM_GPRS                0x08
+#define MM_PROTO_SMS                    0x09
+#define MM_PROTO_SESSION_MGMT           0x0A
+#define MM_PROTO_NON_CALL_RELATED       0x0B
 
 static const value_string tft_code_type[] = {
     {0, "Spare"},
@@ -1484,63 +1484,63 @@ static const gtp_opt_t gtpopt[] = {
     {GTP_EXT_PROTO_CONF, decode_gtp_proto_conf},
     {GTP_EXT_GSN_ADDR, decode_gtp_gsn_addr},
     {GTP_EXT_MSISDN, decode_gtp_msisdn},
-    {GTP_EXT_QOS_UMTS, decode_gtp_qos_umts},   /* 3G */
-    {GTP_EXT_AUTH_QUI, decode_gtp_auth_qui},   /* 3G */
-    {GTP_EXT_TFT, decode_gtp_tft},     /* 3G */
-    {GTP_EXT_TARGET_ID, decode_gtp_target_id}, /* 3G */
-    {GTP_EXT_UTRAN_CONT, decode_gtp_utran_cont},       /* 3G */
-    {GTP_EXT_RAB_SETUP, decode_gtp_rab_setup}, /* 3G */
-    {GTP_EXT_HDR_LIST, decode_gtp_hdr_list},   /* 3G */
-    {GTP_EXT_TRIGGER_ID, decode_gtp_trigger_id},       /* 3G */
-    {GTP_EXT_OMC_ID, decode_gtp_omc_id},       /* 3G */
+    {GTP_EXT_QOS_UMTS, decode_gtp_qos_umts},    /* 3G */
+    {GTP_EXT_AUTH_QUI, decode_gtp_auth_qui},    /* 3G */
+    {GTP_EXT_TFT, decode_gtp_tft},  /* 3G */
+    {GTP_EXT_TARGET_ID, decode_gtp_target_id},  /* 3G */
+    {GTP_EXT_UTRAN_CONT, decode_gtp_utran_cont},    /* 3G */
+    {GTP_EXT_RAB_SETUP, decode_gtp_rab_setup},  /* 3G */
+    {GTP_EXT_HDR_LIST, decode_gtp_hdr_list},    /* 3G */
+    {GTP_EXT_TRIGGER_ID, decode_gtp_trigger_id},    /* 3G */
+    {GTP_EXT_OMC_ID, decode_gtp_omc_id},    /* 3G */
     /* TS 29 060 V6.11.0 */
-    {GTP_EXT_RAN_TR_CONT, decode_gtp_ran_tr_cont},     /* 7.7.43 */
-    {GTP_EXT_PDP_CONT_PRIO, decode_gtp_pdp_cont_prio}, /* 7.7.45 */
-    {GTP_EXT_ADD_RAB_SETUP_INF, decode_gtp_add_rab_setup_inf}, /* 7.7.45A */
-    {GTP_EXT_SSGN_NO, decode_gtp_ssgn_no},     /* 7.7.47 */
-    {GTP_EXT_COMMON_FLGS, decode_gtp_common_flgs},     /* 7.7.48 */
-    {GTP_EXT_APN_RES, decode_gtp_apn_res},     /* 3G */
-    {GTP_EXT_RA_PRIO_LCS, decode_gtp_ra_prio_lcs},     /* 7.7.25B */
-    {GTP_EXT_RAT_TYPE, decode_gtp_rat_type},   /* 3G */
-    {GTP_EXT_USR_LOC_INF, decode_gtp_usr_loc_inf},     /* 7.7.51 */
-    {GTP_EXT_MS_TIME_ZONE, decode_gtp_ms_time_zone},   /* 7.7.52 */
-    {GTP_EXT_IMEISV, decode_gtp_imeisv},       /* 3G 7.7.53 */
-    {GTP_EXT_CAMEL_CHG_INF_CON, decode_gtp_camel_chg_inf_con}, /* 7.7.54 */
-    {GTP_EXT_MBMS_UE_CTX, decode_gtp_mbms_ue_ctx},     /* 7.7.55 */
-    {GTP_EXT_TMGI, decode_gtp_tmgi},   /* 7.7.56 */
-    {GTP_EXT_RIM_RA, decode_gtp_rim_ra},       /* 7.7.57 */
-    {GTP_EXT_MBMS_PROT_CONF_OPT, decode_gtp_mbms_prot_conf_opt},       /* 7.7.58 */
-    {GTP_EXT_MBMS_SA, decode_gtp_mbms_sa},     /* 7.7.60 */
-    {GTP_EXT_SRC_RNC_PDP_CTX_INF, decode_gtp_src_rnc_pdp_ctx_inf},     /* 7.7.61 */
-    {GTP_EXT_ADD_TRS_INF, decode_gtp_add_trs_inf},     /* 7.7.62 */
-    {GTP_EXT_HOP_COUNT, decode_gtp_hop_count}, /* 7.7.63 */
-    {GTP_EXT_SEL_PLMN_ID, decode_gtp_sel_plmn_id},     /* 7.7.64 */
-    {GTP_EXT_MBMS_SES_ID, decode_gtp_mbms_ses_id},     /* 7.7.65 */
-    {GTP_EXT_MBMS_2G_3G_IND, decode_gtp_mbms_2g_3g_ind},       /* 7.7.66 */
-    {GTP_EXT_ENH_NSAPI, decode_gtp_enh_nsapi}, /* 7.7.67 */
-    {GTP_EXT_MBMS_SES_DUR, decode_gtp_mbms_ses_dur},   /* 7.7.59 */
-    {GTP_EXT_ADD_MBMS_TRS_INF, decode_gtp_add_mbms_trs_inf},   /* 7.7.68 */
-    {GTP_EXT_MBMS_SES_ID_REP_NO, decode_gtp_mbms_ses_id_rep_no},       /* 7.7.69 */
-    {GTP_EXT_MBMS_TIME_TO_DATA_TR, decode_gtp_mbms_time_to_data_tr},   /* 7.7.70 */
-    {GTP_EXT_PS_HO_REQ_CTX, decode_gtp_ps_ho_req_ctx}, /* 7.7.71 */
-    {GTP_EXT_BSS_CONT, decode_gtp_bss_cont},   /* 7.7.72 */
-    {GTP_EXT_CELL_ID, decode_gtp_cell_id},     /* 7.7.73 */
-    {GTP_EXT_PDU_NO, decode_gtp_pdu_no},       /* 7.7.74 */
-    {GTP_EXT_BSSGP_CAUSE, decode_gtp_bssgp_cause},     /* 7.7.75 */
-    {GTP_EXT_REQ_MBMS_BEARER_CAP, decode_gtp_mbms_bearer_cap}, /* 7.7.76 */
-    {GTP_EXT_RIM_ROUTING_ADDR_DISC, decode_gtp_rim_ra_disc},   /* 7.7.77 */
-    {GTP_EXT_LIST_OF_SETUP_PFCS, decode_gtp_lst_set_up_pfc},   /* 7.7.78 */
-    {GTP_EXT_PS_HANDOVER_XIP_PAR, decode_gtp_ps_handover_xid}, /* 7.7.79 */
-    {GTP_EXT_MS_INF_CHG_REP_ACT, decode_gtp_ms_inf_chg_rep_act},       /* 7.7.80 */
-    {GTP_EXT_DIRECT_TUNNEL_FLGS, decode_gtp_direct_tnl_flg},   /* 7.7.81 */
-    {GTP_EXT_CORRELATION_ID, decode_gtp_corrl_id},     /* 7.7.82 */
-    {GTP_EXT_BEARER_CONTROL_MODE, decode_gtp_bearer_cntrl_mod},        /* 7.7.83 */
-
-    {GTP_EXT_REL_PACK, decode_gtp_rel_pack},   /* charging */
-    {GTP_EXT_CAN_PACK, decode_gtp_can_pack},   /* charging */
+    {GTP_EXT_RAN_TR_CONT, decode_gtp_ran_tr_cont},  /* 7.7.43 */
+    {GTP_EXT_PDP_CONT_PRIO, decode_gtp_pdp_cont_prio},  /* 7.7.45 */
+    {GTP_EXT_ADD_RAB_SETUP_INF, decode_gtp_add_rab_setup_inf},  /* 7.7.45A */
+    {GTP_EXT_SSGN_NO, decode_gtp_ssgn_no},  /* 7.7.47 */
+    {GTP_EXT_COMMON_FLGS, decode_gtp_common_flgs},  /* 7.7.48 */
+    {GTP_EXT_APN_RES, decode_gtp_apn_res},  /* 3G */
+    {GTP_EXT_RA_PRIO_LCS, decode_gtp_ra_prio_lcs},  /* 7.7.25B */
+    {GTP_EXT_RAT_TYPE, decode_gtp_rat_type},    /* 3G */
+    {GTP_EXT_USR_LOC_INF, decode_gtp_usr_loc_inf},  /* 7.7.51 */
+    {GTP_EXT_MS_TIME_ZONE, decode_gtp_ms_time_zone},    /* 7.7.52 */
+    {GTP_EXT_IMEISV, decode_gtp_imeisv},    /* 3G 7.7.53 */
+    {GTP_EXT_CAMEL_CHG_INF_CON, decode_gtp_camel_chg_inf_con},  /* 7.7.54 */
+    {GTP_EXT_MBMS_UE_CTX, decode_gtp_mbms_ue_ctx},  /* 7.7.55 */
+    {GTP_EXT_TMGI, decode_gtp_tmgi},    /* 7.7.56 */
+    {GTP_EXT_RIM_RA, decode_gtp_rim_ra},    /* 7.7.57 */
+    {GTP_EXT_MBMS_PROT_CONF_OPT, decode_gtp_mbms_prot_conf_opt},    /* 7.7.58 */
+    {GTP_EXT_MBMS_SA, decode_gtp_mbms_sa},  /* 7.7.60 */
+    {GTP_EXT_SRC_RNC_PDP_CTX_INF, decode_gtp_src_rnc_pdp_ctx_inf},  /* 7.7.61 */
+    {GTP_EXT_ADD_TRS_INF, decode_gtp_add_trs_inf},  /* 7.7.62 */
+    {GTP_EXT_HOP_COUNT, decode_gtp_hop_count},  /* 7.7.63 */
+    {GTP_EXT_SEL_PLMN_ID, decode_gtp_sel_plmn_id},  /* 7.7.64 */
+    {GTP_EXT_MBMS_SES_ID, decode_gtp_mbms_ses_id},  /* 7.7.65 */
+    {GTP_EXT_MBMS_2G_3G_IND, decode_gtp_mbms_2g_3g_ind},    /* 7.7.66 */
+    {GTP_EXT_ENH_NSAPI, decode_gtp_enh_nsapi},  /* 7.7.67 */
+    {GTP_EXT_MBMS_SES_DUR, decode_gtp_mbms_ses_dur},    /* 7.7.59 */
+    {GTP_EXT_ADD_MBMS_TRS_INF, decode_gtp_add_mbms_trs_inf},    /* 7.7.68 */
+    {GTP_EXT_MBMS_SES_ID_REP_NO, decode_gtp_mbms_ses_id_rep_no},    /* 7.7.69 */
+    {GTP_EXT_MBMS_TIME_TO_DATA_TR, decode_gtp_mbms_time_to_data_tr},    /* 7.7.70 */
+    {GTP_EXT_PS_HO_REQ_CTX, decode_gtp_ps_ho_req_ctx},  /* 7.7.71 */
+    {GTP_EXT_BSS_CONT, decode_gtp_bss_cont},    /* 7.7.72 */
+    {GTP_EXT_CELL_ID, decode_gtp_cell_id},  /* 7.7.73 */
+    {GTP_EXT_PDU_NO, decode_gtp_pdu_no},    /* 7.7.74 */
+    {GTP_EXT_BSSGP_CAUSE, decode_gtp_bssgp_cause},  /* 7.7.75 */
+    {GTP_EXT_REQ_MBMS_BEARER_CAP, decode_gtp_mbms_bearer_cap},  /* 7.7.76 */
+    {GTP_EXT_RIM_ROUTING_ADDR_DISC, decode_gtp_rim_ra_disc},    /* 7.7.77 */
+    {GTP_EXT_LIST_OF_SETUP_PFCS, decode_gtp_lst_set_up_pfc},    /* 7.7.78 */
+    {GTP_EXT_PS_HANDOVER_XIP_PAR, decode_gtp_ps_handover_xid},  /* 7.7.79 */
+    {GTP_EXT_MS_INF_CHG_REP_ACT, decode_gtp_ms_inf_chg_rep_act},    /* 7.7.80 */
+    {GTP_EXT_DIRECT_TUNNEL_FLGS, decode_gtp_direct_tnl_flg},    /* 7.7.81 */
+    {GTP_EXT_CORRELATION_ID, decode_gtp_corrl_id},  /* 7.7.82 */
+    {GTP_EXT_BEARER_CONTROL_MODE, decode_gtp_bearer_cntrl_mod}, /* 7.7.83 */
+
+    {GTP_EXT_REL_PACK, decode_gtp_rel_pack},    /* charging */
+    {GTP_EXT_CAN_PACK, decode_gtp_can_pack},    /* charging */
     {GTP_EXT_CHRG_ADDR, decode_gtp_chrg_addr},
-    {GTP_EXT_DATA_REQ, decode_gtp_data_req},   /* charging */
-    {GTP_EXT_DATA_RESP, decode_gtp_data_resp}, /* charging */
+    {GTP_EXT_DATA_REQ, decode_gtp_data_req},    /* charging */
+    {GTP_EXT_DATA_RESP, decode_gtp_data_resp},  /* charging */
     {GTP_EXT_NODE_ADDR, decode_gtp_node_addr},
     {GTP_EXT_PRIV_EXT, decode_gtp_priv_ext},
     {0, decode_gtp_unknown}
@@ -1564,12 +1564,12 @@ static gchar *id_to_str(const guint8 * ad)
     static const gchar hex_digits[10] = "0123456789";
 
     for (i = 0; i < 8; i++) {
-       bits8to5 = (ad[i] >> 4) & 0x0F;
-       bits4to1 = ad[i] & 0x0F;
-       if (bits4to1 < 0xA)
-           str[j++] = hex_digits[bits4to1];
-       if (bits8to5 < 0xA)
-           str[j++] = hex_digits[bits8to5];
+        bits8to5 = (ad[i] >> 4) & 0x0F;
+        bits4to1 = ad[i] & 0x0F;
+        if (bits4to1 < 0xA)
+            str[j++] = hex_digits[bits4to1];
+        if (bits8to5 < 0xA)
+            str[j++] = hex_digits[bits8to5];
     }
     str[j] = '\0';
     return str;
@@ -1582,10 +1582,10 @@ static gchar *imsi_to_str(const guint8 * ad)
     int i, j = 0;
 
     for (i = 0; i < 8; i++) {
-       if ((ad[i] & 0x0F) <= 9)
-           str[j++] = (ad[i] & 0x0F) + 0x30;
-       if (((ad[i] >> 4) & 0x0F) <= 9)
-           str[j++] = ((ad[i] >> 4) & 0x0F) + 0x30;
+        if ((ad[i] & 0x0F) <= 9)
+            str[j++] = (ad[i] & 0x0F) + 0x30;
+        if (((ad[i] >> 4) & 0x0F) <= 9)
+            str[j++] = ((ad[i] >> 4) & 0x0F) + 0x30;
     }
     str[j] = '\0';
 
@@ -1601,12 +1601,12 @@ static gchar *msisdn_to_str(const guint8 * ad, int len)
     static const gchar hex_digits[10] = "0123456789";
 
     for (i = 1; i < len && i < 9; i++) {
-       bits8to5 = (ad[i] >> 4) & 0x0F;
-       bits4to1 = ad[i] & 0x0F;
-       if (bits4to1 < 0xA)
-           str[j++] = hex_digits[bits4to1];
-       if (bits8to5 < 0xA)
-           str[j++] = hex_digits[bits8to5];
+        bits8to5 = (ad[i] >> 4) & 0x0F;
+        bits4to1 = ad[i] & 0x0F;
+        if (bits4to1 < 0xA)
+            str[j++] = hex_digits[bits4to1];
+        if (bits8to5 < 0xA)
+            str[j++] = hex_digits[bits8to5];
     }
     str[j] = '\0';
 
@@ -1632,330 +1632,330 @@ typedef struct _message {
 static _gtp_mess_items gprs_mess_items[] = {
 
     {
-     GTP_MSG_ECHO_REQ, {
-                       {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                       {0, 0}
-                       }
-     },
+        GTP_MSG_ECHO_REQ, {
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_ECHO_RESP, {
-                        {GTP_EXT_RECOVER, GTP_MANDATORY},
-                        {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                        {0, 0}
-                        }
-     },
+        GTP_MSG_ECHO_RESP, {
+            {GTP_EXT_RECOVER, GTP_MANDATORY},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_VER_NOT_SUPP, {
-                           {0, 0}
-                           }
-     },
+        GTP_MSG_VER_NOT_SUPP, {
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_NODE_ALIVE_REQ, {
-                             {GTP_EXT_NODE_ADDR, GTP_MANDATORY},
-                             {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                             {0, 0}
-                             }
-     },
+        GTP_MSG_NODE_ALIVE_REQ, {
+            {GTP_EXT_NODE_ADDR, GTP_MANDATORY},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_NODE_ALIVE_RESP, {
-                              {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                              {0, 0}
-                              }
-     },
+        GTP_MSG_NODE_ALIVE_RESP, {
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_REDIR_REQ, {
-                        {GTP_EXT_CAUSE, GTP_MANDATORY},
-                        {GTP_EXT_NODE_ADDR, GTP_OPTIONAL},
-                        {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                        {0, 0}
-                        }
-     },
+        GTP_MSG_REDIR_REQ, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},
+            {GTP_EXT_NODE_ADDR, GTP_OPTIONAL},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_REDIR_RESP, {
-                         {GTP_EXT_CAUSE, GTP_MANDATORY},
-                         {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                         {0, 0}
-                         }
-     },
+        GTP_MSG_REDIR_RESP, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_CREATE_PDP_REQ, {
-                             {GTP_EXT_QOS_GPRS, GTP_MANDATORY},
-                             {GTP_EXT_RECOVER, GTP_OPTIONAL},
-                             {GTP_EXT_SEL_MODE, GTP_MANDATORY},
-                             {GTP_EXT_FLOW_LABEL, GTP_MANDATORY},
-                             {GTP_EXT_FLOW_SIG, GTP_MANDATORY},
-                             {GTP_EXT_MSISDN, GTP_MANDATORY},
-                             {GTP_EXT_USER_ADDR, GTP_MANDATORY},
-                             {GTP_EXT_APN, GTP_MANDATORY},
-                             {GTP_EXT_PROTO_CONF, GTP_OPTIONAL},
-                             {GTP_EXT_GSN_ADDR, GTP_MANDATORY},
-                             {GTP_EXT_GSN_ADDR, GTP_MANDATORY},
-                             {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                             {0, 0}
-                             }
-     },
+        GTP_MSG_CREATE_PDP_REQ, {
+            {GTP_EXT_QOS_GPRS, GTP_MANDATORY},
+            {GTP_EXT_RECOVER, GTP_OPTIONAL},
+            {GTP_EXT_SEL_MODE, GTP_MANDATORY},
+            {GTP_EXT_FLOW_LABEL, GTP_MANDATORY},
+            {GTP_EXT_FLOW_SIG, GTP_MANDATORY},
+            {GTP_EXT_MSISDN, GTP_MANDATORY},
+            {GTP_EXT_USER_ADDR, GTP_MANDATORY},
+            {GTP_EXT_APN, GTP_MANDATORY},
+            {GTP_EXT_PROTO_CONF, GTP_OPTIONAL},
+            {GTP_EXT_GSN_ADDR, GTP_MANDATORY},
+            {GTP_EXT_GSN_ADDR, GTP_MANDATORY},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_CREATE_PDP_RESP, {
-                              {GTP_EXT_CAUSE, GTP_MANDATORY},
-                              {GTP_EXT_QOS_GPRS, GTP_CONDITIONAL},
-                              {GTP_EXT_REORDER, GTP_CONDITIONAL},
-                              {GTP_EXT_RECOVER, GTP_OPTIONAL},
-                              {GTP_EXT_FLOW_LABEL, GTP_CONDITIONAL},
-                              {GTP_EXT_FLOW_SIG, GTP_CONDITIONAL},
-                              {GTP_EXT_CHRG_ID, GTP_CONDITIONAL},
-                              {GTP_EXT_USER_ADDR, GTP_CONDITIONAL},
-                              {GTP_EXT_PROTO_CONF, GTP_OPTIONAL},
-                              {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},
-                              {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},
-                              {GTP_EXT_CHRG_ADDR, GTP_OPTIONAL},
-                              {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                              {0, 0}
-                              }
-     },
+        GTP_MSG_CREATE_PDP_RESP, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},
+            {GTP_EXT_QOS_GPRS, GTP_CONDITIONAL},
+            {GTP_EXT_REORDER, GTP_CONDITIONAL},
+            {GTP_EXT_RECOVER, GTP_OPTIONAL},
+            {GTP_EXT_FLOW_LABEL, GTP_CONDITIONAL},
+            {GTP_EXT_FLOW_SIG, GTP_CONDITIONAL},
+            {GTP_EXT_CHRG_ID, GTP_CONDITIONAL},
+            {GTP_EXT_USER_ADDR, GTP_CONDITIONAL},
+            {GTP_EXT_PROTO_CONF, GTP_OPTIONAL},
+            {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},
+            {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},
+            {GTP_EXT_CHRG_ADDR, GTP_OPTIONAL},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_UPDATE_PDP_REQ, {
-                             {GTP_EXT_QOS_GPRS, GTP_MANDATORY},
-                             {GTP_EXT_RECOVER, GTP_OPTIONAL},
-                             {GTP_EXT_FLOW_LABEL, GTP_MANDATORY},
-                             {GTP_EXT_FLOW_SIG, GTP_MANDATORY},
-                             {GTP_EXT_GSN_ADDR, GTP_MANDATORY},
-                             {GTP_EXT_GSN_ADDR, GTP_MANDATORY},
-                             {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                             {0, 0},
-                             }
-     },
+        GTP_MSG_UPDATE_PDP_REQ, {
+            {GTP_EXT_QOS_GPRS, GTP_MANDATORY},
+            {GTP_EXT_RECOVER, GTP_OPTIONAL},
+            {GTP_EXT_FLOW_LABEL, GTP_MANDATORY},
+            {GTP_EXT_FLOW_SIG, GTP_MANDATORY},
+            {GTP_EXT_GSN_ADDR, GTP_MANDATORY},
+            {GTP_EXT_GSN_ADDR, GTP_MANDATORY},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0},
+        }
+    },
     {
-     GTP_MSG_UPDATE_PDP_RESP, {
-                              {GTP_EXT_CAUSE, GTP_MANDATORY},
-                              {GTP_EXT_QOS_GPRS, GTP_CONDITIONAL},
-                              {GTP_EXT_RECOVER, GTP_OPTIONAL},
-                              {GTP_EXT_FLOW_LABEL, GTP_CONDITIONAL},
-                              {GTP_EXT_FLOW_SIG, GTP_CONDITIONAL},
-                              {GTP_EXT_CHRG_ID, GTP_CONDITIONAL},
-                              {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},
-                              {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},
-                              {GTP_EXT_CHRG_ADDR, GTP_OPTIONAL},
-                              {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                              {0, 0}
-                              }
-     },
+        GTP_MSG_UPDATE_PDP_RESP, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},
+            {GTP_EXT_QOS_GPRS, GTP_CONDITIONAL},
+            {GTP_EXT_RECOVER, GTP_OPTIONAL},
+            {GTP_EXT_FLOW_LABEL, GTP_CONDITIONAL},
+            {GTP_EXT_FLOW_SIG, GTP_CONDITIONAL},
+            {GTP_EXT_CHRG_ID, GTP_CONDITIONAL},
+            {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},
+            {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},
+            {GTP_EXT_CHRG_ADDR, GTP_OPTIONAL},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_DELETE_PDP_REQ, {
-                             {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                             {0, 0}
-                             }
-     },
+        GTP_MSG_DELETE_PDP_REQ, {
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_DELETE_PDP_RESP, {
-                              {GTP_EXT_CAUSE, GTP_MANDATORY},
-                              {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                              {0, 0},
-                              }
-     },
+        GTP_MSG_DELETE_PDP_RESP, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0},
+        }
+    },
     {
-     GTP_MSG_CREATE_AA_PDP_REQ, {
-                                {GTP_EXT_QOS_GPRS, GTP_MANDATORY},
-                                {GTP_EXT_RECOVER, GTP_OPTIONAL},
-                                {GTP_EXT_SEL_MODE, GTP_MANDATORY},
-                                {GTP_EXT_FLOW_LABEL, GTP_MANDATORY},
-                                {GTP_EXT_FLOW_SIG, GTP_MANDATORY},
-                                {GTP_EXT_USER_ADDR, GTP_MANDATORY},
-                                {GTP_EXT_APN, GTP_MANDATORY},
-                                {GTP_EXT_PROTO_CONF, GTP_OPTIONAL},
-                                {GTP_EXT_GSN_ADDR, GTP_MANDATORY},
-                                {GTP_EXT_GSN_ADDR, GTP_MANDATORY},
-                                {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                                {0, 0}
-                                }
-     },
+        GTP_MSG_CREATE_AA_PDP_REQ, {
+            {GTP_EXT_QOS_GPRS, GTP_MANDATORY},
+            {GTP_EXT_RECOVER, GTP_OPTIONAL},
+            {GTP_EXT_SEL_MODE, GTP_MANDATORY},
+            {GTP_EXT_FLOW_LABEL, GTP_MANDATORY},
+            {GTP_EXT_FLOW_SIG, GTP_MANDATORY},
+            {GTP_EXT_USER_ADDR, GTP_MANDATORY},
+            {GTP_EXT_APN, GTP_MANDATORY},
+            {GTP_EXT_PROTO_CONF, GTP_OPTIONAL},
+            {GTP_EXT_GSN_ADDR, GTP_MANDATORY},
+            {GTP_EXT_GSN_ADDR, GTP_MANDATORY},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_CREATE_AA_PDP_RESP, {
-                                 {GTP_EXT_CAUSE, GTP_MANDATORY},
-                                 {GTP_EXT_QOS_GPRS, GTP_CONDITIONAL},
-                                 {GTP_EXT_REORDER, GTP_CONDITIONAL},
-                                 {GTP_EXT_RECOVER, GTP_OPTIONAL},
-                                 {GTP_EXT_FLOW_LABEL, GTP_CONDITIONAL},
-                                 {GTP_EXT_FLOW_SIG, GTP_CONDITIONAL},
-                                 {GTP_EXT_CHRG_ID, GTP_CONDITIONAL},
-                                 {GTP_EXT_USER_ADDR, GTP_CONDITIONAL},
-                                 {GTP_EXT_PROTO_CONF, GTP_OPTIONAL},
-                                 {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},
-                                 {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},
-                                 {GTP_EXT_CHRG_ADDR, GTP_OPTIONAL},
-                                 {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                                 {0, 0}
-                                 }
-     },
+        GTP_MSG_CREATE_AA_PDP_RESP, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},
+            {GTP_EXT_QOS_GPRS, GTP_CONDITIONAL},
+            {GTP_EXT_REORDER, GTP_CONDITIONAL},
+            {GTP_EXT_RECOVER, GTP_OPTIONAL},
+            {GTP_EXT_FLOW_LABEL, GTP_CONDITIONAL},
+            {GTP_EXT_FLOW_SIG, GTP_CONDITIONAL},
+            {GTP_EXT_CHRG_ID, GTP_CONDITIONAL},
+            {GTP_EXT_USER_ADDR, GTP_CONDITIONAL},
+            {GTP_EXT_PROTO_CONF, GTP_OPTIONAL},
+            {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},
+            {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},
+            {GTP_EXT_CHRG_ADDR, GTP_OPTIONAL},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_DELETE_AA_PDP_REQ, {
-                                {GTP_EXT_CAUSE, GTP_MANDATORY},
-                                {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                                {0, 0}
-                                }
-     },
+        GTP_MSG_DELETE_AA_PDP_REQ, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_DELETE_AA_PDP_RESP, {
-                                 {GTP_EXT_CAUSE, GTP_MANDATORY},
-                                 {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                                 {0, 0}
-                                 }
-     },
+        GTP_MSG_DELETE_AA_PDP_RESP, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_ERR_IND, {
-                      {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                      {0, 0}
-                      }
-     },
+        GTP_MSG_ERR_IND, {
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_PDU_NOTIFY_REQ, {
-                             {GTP_EXT_USER_ADDR, GTP_MANDATORY},
-                             {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                             {0, 0}
-                             }
-     },
+        GTP_MSG_PDU_NOTIFY_REQ, {
+            {GTP_EXT_USER_ADDR, GTP_MANDATORY},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_PDU_NOTIFY_RESP, {
-                              {GTP_EXT_CAUSE, GTP_MANDATORY},
-                              {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                              {0, 0}
-                              }
-     },
+        GTP_MSG_PDU_NOTIFY_RESP, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_PDU_NOTIFY_REJ_REQ, {
-                                 {GTP_EXT_CAUSE, GTP_MANDATORY},
-                                 {GTP_EXT_USER_ADDR, GTP_MANDATORY},
-                                 {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                                 {0, 0}
-                                 }
-     },
+        GTP_MSG_PDU_NOTIFY_REJ_REQ, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},
+            {GTP_EXT_USER_ADDR, GTP_MANDATORY},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_PDU_NOTIFY_REJ_RESP, {
-                                  {GTP_EXT_CAUSE, GTP_MANDATORY},
-                                  {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                                  {0, 0}
-                                  }
-     },
+        GTP_MSG_PDU_NOTIFY_REJ_RESP, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_SEND_ROUT_INFO_REQ, {
-                                 {GTP_EXT_IMSI, GTP_MANDATORY},
-                                 {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                                 {0, 0}
-                                 }
-     },
+        GTP_MSG_SEND_ROUT_INFO_REQ, {
+            {GTP_EXT_IMSI, GTP_MANDATORY},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_SEND_ROUT_INFO_RESP, {
-                                  {GTP_EXT_CAUSE, GTP_MANDATORY},
-                                  {GTP_EXT_IMSI, GTP_MANDATORY},
-                                  {GTP_EXT_MAP_CAUSE, GTP_OPTIONAL},
-                                  {GTP_EXT_MS_REASON, GTP_OPTIONAL},
-                                  {GTP_EXT_GSN_ADDR, GTP_OPTIONAL},
-                                  {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                                  {0, 0}
-                                  }
-     },
+        GTP_MSG_SEND_ROUT_INFO_RESP, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},
+            {GTP_EXT_IMSI, GTP_MANDATORY},
+            {GTP_EXT_MAP_CAUSE, GTP_OPTIONAL},
+            {GTP_EXT_MS_REASON, GTP_OPTIONAL},
+            {GTP_EXT_GSN_ADDR, GTP_OPTIONAL},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_FAIL_REP_REQ, {
-                           {GTP_EXT_IMSI, GTP_MANDATORY},
-                           {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                           {0, 0}
-                           }
-     },
+        GTP_MSG_FAIL_REP_REQ, {
+            {GTP_EXT_IMSI, GTP_MANDATORY},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_FAIL_REP_RESP, {
-                            {GTP_EXT_CAUSE, GTP_MANDATORY},
-                            {GTP_EXT_MAP_CAUSE, GTP_OPTIONAL},
-                            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                            {0, 0}
-                            }
-     },
+        GTP_MSG_FAIL_REP_RESP, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},
+            {GTP_EXT_MAP_CAUSE, GTP_OPTIONAL},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_MS_PRESENT_REQ, {
-                             {GTP_EXT_IMSI, GTP_MANDATORY},
-                             {GTP_EXT_GSN_ADDR, GTP_MANDATORY},
-                             {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                             {0, 0}
-                             }
-     },
+        GTP_MSG_MS_PRESENT_REQ, {
+            {GTP_EXT_IMSI, GTP_MANDATORY},
+            {GTP_EXT_GSN_ADDR, GTP_MANDATORY},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_MS_PRESENT_RESP, {
-                              {GTP_EXT_CAUSE, GTP_MANDATORY},
-                              {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                              {0, 0}
-                              }
-     },
+        GTP_MSG_MS_PRESENT_RESP, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_IDENT_REQ, {
-                        {GTP_EXT_RAI, GTP_MANDATORY},
-                        {GTP_EXT_PTMSI, GTP_MANDATORY},
-                        {GTP_EXT_PTMSI_SIG, GTP_OPTIONAL},
-                        {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                        {0, 0}
-                        }
-     },
+        GTP_MSG_IDENT_REQ, {
+            {GTP_EXT_RAI, GTP_MANDATORY},
+            {GTP_EXT_PTMSI, GTP_MANDATORY},
+            {GTP_EXT_PTMSI_SIG, GTP_OPTIONAL},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_IDENT_RESP, {
-                         {GTP_EXT_CAUSE, GTP_MANDATORY},
-                         {GTP_EXT_IMSI, GTP_CONDITIONAL},
-                         {GTP_EXT_AUTH_TRI, GTP_OPTIONAL},
-                         {GTP_EXT_AUTH_QUI, GTP_OPTIONAL},
-                         {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                         {0, 0}
-                         }
-     },
+        GTP_MSG_IDENT_RESP, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},
+            {GTP_EXT_IMSI, GTP_CONDITIONAL},
+            {GTP_EXT_AUTH_TRI, GTP_OPTIONAL},
+            {GTP_EXT_AUTH_QUI, GTP_OPTIONAL},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_SGSN_CNTXT_REQ, {
-                             {GTP_EXT_IMSI, GTP_CONDITIONAL},
-                             {GTP_EXT_RAI, GTP_MANDATORY},
-                             {GTP_EXT_TLLI, GTP_MANDATORY},
-                             {GTP_EXT_PTMSI_SIG, GTP_OPTIONAL},
-                             {GTP_EXT_MS_VALID, GTP_OPTIONAL},
-                             {GTP_EXT_FLOW_SIG, GTP_MANDATORY},
-                             {0, 0}
-                             }
-     },
+        GTP_MSG_SGSN_CNTXT_REQ, {
+            {GTP_EXT_IMSI, GTP_CONDITIONAL},
+            {GTP_EXT_RAI, GTP_MANDATORY},
+            {GTP_EXT_TLLI, GTP_MANDATORY},
+            {GTP_EXT_PTMSI_SIG, GTP_OPTIONAL},
+            {GTP_EXT_MS_VALID, GTP_OPTIONAL},
+            {GTP_EXT_FLOW_SIG, GTP_MANDATORY},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_SGSN_CNTXT_RESP, {
-                              {GTP_EXT_CAUSE, GTP_MANDATORY},
-                              {GTP_EXT_IMSI, GTP_CONDITIONAL},
-                              {GTP_EXT_FLOW_SIG, GTP_CONDITIONAL},
-                              {GTP_EXT_MM_CNTXT, GTP_CONDITIONAL},
-                              {GTP_EXT_PDP_CNTXT, GTP_CONDITIONAL},
-                              {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                              {0, 0}
-                              }
-     },
+        GTP_MSG_SGSN_CNTXT_RESP, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},
+            {GTP_EXT_IMSI, GTP_CONDITIONAL},
+            {GTP_EXT_FLOW_SIG, GTP_CONDITIONAL},
+            {GTP_EXT_MM_CNTXT, GTP_CONDITIONAL},
+            {GTP_EXT_PDP_CNTXT, GTP_CONDITIONAL},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_SGSN_CNTXT_ACK, {
-                             {GTP_EXT_CAUSE, GTP_MANDATORY},
-                             {GTP_EXT_FLOW_II, GTP_CONDITIONAL},
-                             {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},
-                             {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                             {0, 0}
-                             }
-     },
+        GTP_MSG_SGSN_CNTXT_ACK, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},
+            {GTP_EXT_FLOW_II, GTP_CONDITIONAL},
+            {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_DATA_TRANSF_REQ, {
-                              {GTP_EXT_TR_COMM, GTP_MANDATORY},
-                              {GTP_EXT_DATA_REQ, GTP_CONDITIONAL},
-                              {GTP_EXT_REL_PACK, GTP_CONDITIONAL},
-                              {GTP_EXT_CAN_PACK, GTP_CONDITIONAL},
-                              {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                              {0, 0}
-                              }
-     },
+        GTP_MSG_DATA_TRANSF_REQ, {
+            {GTP_EXT_TR_COMM, GTP_MANDATORY},
+            {GTP_EXT_DATA_REQ, GTP_CONDITIONAL},
+            {GTP_EXT_REL_PACK, GTP_CONDITIONAL},
+            {GTP_EXT_CAN_PACK, GTP_CONDITIONAL},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_DATA_TRANSF_RESP, {
-                               {GTP_EXT_CAUSE, GTP_MANDATORY},
-                               {GTP_EXT_DATA_RESP, GTP_MANDATORY},
-                               {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                               {0, 0}
-                               }
-     },
+        GTP_MSG_DATA_TRANSF_RESP, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},
+            {GTP_EXT_DATA_RESP, GTP_MANDATORY},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     0, {
-        {0, 0}
-        }
-     }
+        0, {
+            {0, 0}
+        }
+    }
 };
 
 /* -----------------------------
@@ -1964,661 +1964,661 @@ static _gtp_mess_items gprs_mess_items[] = {
 static _gtp_mess_items umts_mess_items[] = {
     /* 7.2 Path Management Messages */
     {
-     GTP_MSG_ECHO_REQ, {
-                       {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                       {0, 0}
-                       }
-     },
+        GTP_MSG_ECHO_REQ, {
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_ECHO_RESP, {
-                        {GTP_EXT_RECOVER, GTP_MANDATORY},
-                        {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                        {0, 0}
-                        }
-     },
+        GTP_MSG_ECHO_RESP, {
+            {GTP_EXT_RECOVER, GTP_MANDATORY},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_VER_NOT_SUPP, {
-                           {0, 0}
-                           }
-     },
+        GTP_MSG_VER_NOT_SUPP, {
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_SUPP_EXT_HDR, {
-                           {GTP_EXT_HDR_LIST, GTP_MANDATORY},
-                           {0, 0}
-                           }
-     },
+        GTP_MSG_SUPP_EXT_HDR, {
+            {GTP_EXT_HDR_LIST, GTP_MANDATORY},
+            {0, 0}
+        }
+    },
     /* ??? */
     {
-     GTP_MSG_NODE_ALIVE_REQ, {
-                             {GTP_EXT_NODE_ADDR, GTP_MANDATORY},
-                             {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                             {0, 0}
-                             }
-     },
+        GTP_MSG_NODE_ALIVE_REQ, {
+            {GTP_EXT_NODE_ADDR, GTP_MANDATORY},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_NODE_ALIVE_RESP, {
-                              {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                              {0, 0}
-                              }
-     },
+        GTP_MSG_NODE_ALIVE_RESP, {
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_REDIR_REQ, {
-                        {GTP_EXT_CAUSE, GTP_MANDATORY},
-                        {GTP_EXT_NODE_ADDR, GTP_OPTIONAL},
-                        {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                        {0, 0}
-                        }
-     },
+        GTP_MSG_REDIR_REQ, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},
+            {GTP_EXT_NODE_ADDR, GTP_OPTIONAL},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_REDIR_REQ, {
-                        {0, 0}
-                        }
-     },
+        GTP_MSG_REDIR_REQ, {
+            {0, 0}
+        }
+    },
     /* 7.3 Tunnel Management Messages */
     {
-     GTP_MSG_CREATE_PDP_REQ, {
-                             {GTP_EXT_IMSI, GTP_CONDITIONAL},
-                             /* RAI is in TS 29.060 V6.11.0 */
-                             {GTP_EXT_RAI, GTP_OPTIONAL},      /* Routeing Area Identity (RAI) Optional 7.7.3 */
-                             {GTP_EXT_RECOVER, GTP_OPTIONAL},
-                             {GTP_EXT_SEL_MODE, GTP_CONDITIONAL},
-                             {GTP_EXT_TEID, GTP_MANDATORY},
-                             {GTP_EXT_TEID_CP, GTP_CONDITIONAL},
-                             {GTP_EXT_NSAPI, GTP_MANDATORY},
-                             {GTP_EXT_NSAPI, GTP_CONDITIONAL},
-                             {GTP_EXT_CHRG_CHAR, GTP_OPTIONAL},
-                             {GTP_EXT_TRACE_REF, GTP_OPTIONAL},
-                             {GTP_EXT_TRACE_TYPE, GTP_OPTIONAL},
-                             {GTP_EXT_USER_ADDR, GTP_CONDITIONAL},
-                             {GTP_EXT_APN, GTP_CONDITIONAL},
-                             {GTP_EXT_PROTO_CONF, GTP_CONDITIONAL},
-                             {GTP_EXT_GSN_ADDR, GTP_MANDATORY},
-                             {GTP_EXT_GSN_ADDR, GTP_MANDATORY},
-                             {GTP_EXT_MSISDN, GTP_CONDITIONAL},
-                             {GTP_EXT_QOS_UMTS, GTP_MANDATORY},
-                             {GTP_EXT_TFT, GTP_CONDITIONAL},
-                             {GTP_EXT_TRIGGER_ID, GTP_OPTIONAL},
-                             {GTP_EXT_OMC_ID, GTP_OPTIONAL},
-                             /* TS 29.060 V6.11.0 */
-                             {GTP_EXT_APN_RES, GTP_OPTIONAL},
-                             {GTP_EXT_RAT_TYPE, GTP_OPTIONAL},
-                             {GTP_EXT_USR_LOC_INF, GTP_OPTIONAL},
-                             {GTP_EXT_MS_TIME_ZONE, GTP_OPTIONAL},
-                             {GTP_EXT_IMEISV, GTP_OPTIONAL},
-                             {GTP_EXT_CAMEL_CHG_INF_CON, GTP_OPTIONAL},
-                             {GTP_EXT_ADD_TRS_INF, GTP_OPTIONAL},
-                             {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                             {0, 0}
-                             }
-     },
+        GTP_MSG_CREATE_PDP_REQ, {
+            {GTP_EXT_IMSI, GTP_CONDITIONAL},
+            /* RAI is in TS 29.060 V6.11.0 */
+            {GTP_EXT_RAI, GTP_OPTIONAL},        /* Routeing Area Identity (RAI) Optional 7.7.3 */
+            {GTP_EXT_RECOVER, GTP_OPTIONAL},
+            {GTP_EXT_SEL_MODE, GTP_CONDITIONAL},
+            {GTP_EXT_TEID, GTP_MANDATORY},
+            {GTP_EXT_TEID_CP, GTP_CONDITIONAL},
+            {GTP_EXT_NSAPI, GTP_MANDATORY},
+            {GTP_EXT_NSAPI, GTP_CONDITIONAL},
+            {GTP_EXT_CHRG_CHAR, GTP_OPTIONAL},
+            {GTP_EXT_TRACE_REF, GTP_OPTIONAL},
+            {GTP_EXT_TRACE_TYPE, GTP_OPTIONAL},
+            {GTP_EXT_USER_ADDR, GTP_CONDITIONAL},
+            {GTP_EXT_APN, GTP_CONDITIONAL},
+            {GTP_EXT_PROTO_CONF, GTP_CONDITIONAL},
+            {GTP_EXT_GSN_ADDR, GTP_MANDATORY},
+            {GTP_EXT_GSN_ADDR, GTP_MANDATORY},
+            {GTP_EXT_MSISDN, GTP_CONDITIONAL},
+            {GTP_EXT_QOS_UMTS, GTP_MANDATORY},
+            {GTP_EXT_TFT, GTP_CONDITIONAL},
+            {GTP_EXT_TRIGGER_ID, GTP_OPTIONAL},
+            {GTP_EXT_OMC_ID, GTP_OPTIONAL},
+            /* TS 29.060 V6.11.0 */
+            {GTP_EXT_APN_RES, GTP_OPTIONAL},
+            {GTP_EXT_RAT_TYPE, GTP_OPTIONAL},
+            {GTP_EXT_USR_LOC_INF, GTP_OPTIONAL},
+            {GTP_EXT_MS_TIME_ZONE, GTP_OPTIONAL},
+            {GTP_EXT_IMEISV, GTP_OPTIONAL},
+            {GTP_EXT_CAMEL_CHG_INF_CON, GTP_OPTIONAL},
+            {GTP_EXT_ADD_TRS_INF, GTP_OPTIONAL},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_CREATE_PDP_RESP, {
-                              {GTP_EXT_CAUSE, GTP_MANDATORY},
-                              {GTP_EXT_REORDER, GTP_CONDITIONAL},
-                              {GTP_EXT_RECOVER, GTP_OPTIONAL},
-                              {GTP_EXT_TEID, GTP_CONDITIONAL},
-                              {GTP_EXT_TEID_CP, GTP_CONDITIONAL},
-                                  {GTP_EXT_NSAPI, GTP_CONDITIONAL},
-                              {GTP_EXT_CHRG_ID, GTP_CONDITIONAL},
-                              {GTP_EXT_USER_ADDR, GTP_CONDITIONAL},
-                              {GTP_EXT_PROTO_CONF, GTP_OPTIONAL},
-                              {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},
-                              {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},
-                              {GTP_EXT_QOS_UMTS, GTP_CONDITIONAL},
-                              {GTP_EXT_CHRG_ADDR, GTP_OPTIONAL},
-                              /* TS 29.060 V6.11.0 */
-                              {GTP_EXT_CHRG_ADDR, GTP_OPTIONAL},       /* Alternative Charging Gateway Address Optional 7.7.44 */
-                              {GTP_EXT_COMMON_FLGS, GTP_OPTIONAL},     /* Common Flags Optional 7.7.48 */
-                              {GTP_EXT_APN_RES, GTP_OPTIONAL}, /* APN Restriction Optional 7.7.49 */
-                              {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                              {0, 0}
-                              }
-     },
-    {                          /* checked, SGSN -> GGSN */
-     GTP_MSG_UPDATE_PDP_REQ, {
-                             {GTP_EXT_IMSI, GTP_CONDITIONAL},
-                             {GTP_EXT_RAI, GTP_OPTIONAL},      /* Routeing Area Identity (RAI) Optional 7.7.3 */
-                             {GTP_EXT_RECOVER, GTP_OPTIONAL},
-                             {GTP_EXT_TEID, GTP_MANDATORY},
-                             {GTP_EXT_TEID_CP, GTP_CONDITIONAL},
-                             {GTP_EXT_NSAPI, GTP_MANDATORY},
-                             {GTP_EXT_TRACE_REF, GTP_OPTIONAL},
-                             {GTP_EXT_TRACE_TYPE, GTP_OPTIONAL},
-                             {GTP_EXT_PROTO_CONF, GTP_OPTIONAL},       /* Protocol Configuration Options Optional 7.7.31 */
-                             {GTP_EXT_GSN_ADDR, GTP_MANDATORY},        /* SGSN Address for Control Plane Mandatory GSN Address 7.7.32 */
-                             {GTP_EXT_GSN_ADDR, GTP_MANDATORY},        /* SGSN Address for User Traffic Mandatory GSN Address 7.7.32 */
-                             {GTP_EXT_GSN_ADDR, GTP_OPTIONAL}, /* Alternative SGSN Address for Control Plane Conditional GSN Address 7.7.32 */
-                             {GTP_EXT_GSN_ADDR, GTP_OPTIONAL}, /* Alternative SGSN Address for User Traffic Conditional GSN Address 7.7.32 */
-                             {GTP_EXT_QOS_UMTS, GTP_MANDATORY},
-                             {GTP_EXT_TFT, GTP_OPTIONAL},
-                             {GTP_EXT_TRIGGER_ID, GTP_OPTIONAL},
-                             {GTP_EXT_OMC_ID, GTP_OPTIONAL},
-                             {GTP_EXT_COMMON_FLGS, GTP_OPTIONAL},                      /* Common Flags Optional 7.7.48 */
-                             {GTP_EXT_RAT_TYPE, GTP_OPTIONAL},                         /* RAT Type Optional 7.7.50 */
-                             {GTP_EXT_USR_LOC_INF, GTP_OPTIONAL},                      /* User Location Information Optional 7.7.51 */
-                             {GTP_EXT_MS_TIME_ZONE, GTP_OPTIONAL},                     /* MS Time Zone Optional 7.7.52 */
-                             {GTP_EXT_ADD_TRS_INF, GTP_OPTIONAL},                      /* Additonal Trace Info Optional 7.7.62 */
-                             {GTP_EXT_DIRECT_TUNNEL_FLGS, GTP_OPTIONAL},       /* Direct Tunnel Flags     7.7.81 */
-                             {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                             {0, 0}
-                             }
-     },
-    {                          /* checked, GGSN -> SGSN */
-     GTP_MSG_UPDATE_PDP_RESP, {
-                              {GTP_EXT_CAUSE, GTP_MANDATORY},
-                              {GTP_EXT_RECOVER, GTP_OPTIONAL},
-                              {GTP_EXT_TEID, GTP_CONDITIONAL},
-                              {GTP_EXT_TEID_CP, GTP_CONDITIONAL},
-                              {GTP_EXT_CHRG_ID, GTP_CONDITIONAL},
-                              {GTP_EXT_PROTO_CONF, GTP_OPTIONAL},      /* Protocol Configuration Options Optional 7.7.31 */
-                              {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},
-                              {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},
-                              {GTP_EXT_GSN_ADDR, GTP_OPTIONAL},        /* Alternative SGSN Address for Control Plane Conditional GSN Address 7.7.32 */
-                              {GTP_EXT_GSN_ADDR, GTP_OPTIONAL},        /* Alternative SGSN Address for User Traffic Conditional GSN Address 7.7.32 */
-                              {GTP_EXT_QOS_UMTS, GTP_CONDITIONAL},
-                              {GTP_EXT_CHRG_ADDR, GTP_OPTIONAL},
-                              {GTP_EXT_CHRG_ADDR, GTP_OPTIONAL},       /* Alternative Charging Gateway Address Optional 7.7.44 */
-                              {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                              {GTP_EXT_COMMON_FLGS, GTP_OPTIONAL},     /* Common Flags Optional 7.7.48 */
-                              {GTP_EXT_APN_RES, GTP_OPTIONAL}, /* APN Restriction Optional 7.7.49 */
-                              {0, 0}
-                              }
-     },
+        GTP_MSG_CREATE_PDP_RESP, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},
+            {GTP_EXT_REORDER, GTP_CONDITIONAL},
+            {GTP_EXT_RECOVER, GTP_OPTIONAL},
+            {GTP_EXT_TEID, GTP_CONDITIONAL},
+            {GTP_EXT_TEID_CP, GTP_CONDITIONAL},
+            {GTP_EXT_NSAPI, GTP_CONDITIONAL},
+            {GTP_EXT_CHRG_ID, GTP_CONDITIONAL},
+            {GTP_EXT_USER_ADDR, GTP_CONDITIONAL},
+            {GTP_EXT_PROTO_CONF, GTP_OPTIONAL},
+            {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},
+            {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},
+            {GTP_EXT_QOS_UMTS, GTP_CONDITIONAL},
+            {GTP_EXT_CHRG_ADDR, GTP_OPTIONAL},
+            /* TS 29.060 V6.11.0 */
+            {GTP_EXT_CHRG_ADDR, GTP_OPTIONAL},  /* Alternative Charging Gateway Address Optional 7.7.44 */
+            {GTP_EXT_COMMON_FLGS, GTP_OPTIONAL},        /* Common Flags Optional 7.7.48 */
+            {GTP_EXT_APN_RES, GTP_OPTIONAL},    /* APN Restriction Optional 7.7.49 */
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
+    {                           /* checked, SGSN -> GGSN */
+        GTP_MSG_UPDATE_PDP_REQ, {
+            {GTP_EXT_IMSI, GTP_CONDITIONAL},
+            {GTP_EXT_RAI, GTP_OPTIONAL},        /* Routeing Area Identity (RAI) Optional 7.7.3 */
+            {GTP_EXT_RECOVER, GTP_OPTIONAL},
+            {GTP_EXT_TEID, GTP_MANDATORY},
+            {GTP_EXT_TEID_CP, GTP_CONDITIONAL},
+            {GTP_EXT_NSAPI, GTP_MANDATORY},
+            {GTP_EXT_TRACE_REF, GTP_OPTIONAL},
+            {GTP_EXT_TRACE_TYPE, GTP_OPTIONAL},
+            {GTP_EXT_PROTO_CONF, GTP_OPTIONAL}, /* Protocol Configuration Options Optional 7.7.31 */
+            {GTP_EXT_GSN_ADDR, GTP_MANDATORY},  /* SGSN Address for Control Plane Mandatory GSN Address 7.7.32 */
+            {GTP_EXT_GSN_ADDR, GTP_MANDATORY},  /* SGSN Address for User Traffic Mandatory GSN Address 7.7.32 */
+            {GTP_EXT_GSN_ADDR, GTP_OPTIONAL},   /* Alternative SGSN Address for Control Plane Conditional GSN Address 7.7.32 */
+            {GTP_EXT_GSN_ADDR, GTP_OPTIONAL},   /* Alternative SGSN Address for User Traffic Conditional GSN Address 7.7.32 */
+            {GTP_EXT_QOS_UMTS, GTP_MANDATORY},
+            {GTP_EXT_TFT, GTP_OPTIONAL},
+            {GTP_EXT_TRIGGER_ID, GTP_OPTIONAL},
+            {GTP_EXT_OMC_ID, GTP_OPTIONAL},
+            {GTP_EXT_COMMON_FLGS, GTP_OPTIONAL},                        /* Common Flags Optional 7.7.48 */
+            {GTP_EXT_RAT_TYPE, GTP_OPTIONAL},                           /* RAT Type Optional 7.7.50 */
+            {GTP_EXT_USR_LOC_INF, GTP_OPTIONAL},                        /* User Location Information Optional 7.7.51 */
+            {GTP_EXT_MS_TIME_ZONE, GTP_OPTIONAL},                       /* MS Time Zone Optional 7.7.52 */
+            {GTP_EXT_ADD_TRS_INF, GTP_OPTIONAL},                        /* Additonal Trace Info Optional 7.7.62 */
+            {GTP_EXT_DIRECT_TUNNEL_FLGS, GTP_OPTIONAL}, /* Direct Tunnel Flags     7.7.81 */
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
+    {                           /* checked, GGSN -> SGSN */
+        GTP_MSG_UPDATE_PDP_RESP, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},
+            {GTP_EXT_RECOVER, GTP_OPTIONAL},
+            {GTP_EXT_TEID, GTP_CONDITIONAL},
+            {GTP_EXT_TEID_CP, GTP_CONDITIONAL},
+            {GTP_EXT_CHRG_ID, GTP_CONDITIONAL},
+            {GTP_EXT_PROTO_CONF, GTP_OPTIONAL}, /* Protocol Configuration Options Optional 7.7.31 */
+            {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},
+            {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},
+            {GTP_EXT_GSN_ADDR, GTP_OPTIONAL},   /* Alternative SGSN Address for Control Plane Conditional GSN Address 7.7.32 */
+            {GTP_EXT_GSN_ADDR, GTP_OPTIONAL},   /* Alternative SGSN Address for User Traffic Conditional GSN Address 7.7.32 */
+            {GTP_EXT_QOS_UMTS, GTP_CONDITIONAL},
+            {GTP_EXT_CHRG_ADDR, GTP_OPTIONAL},
+            {GTP_EXT_CHRG_ADDR, GTP_OPTIONAL},  /* Alternative Charging Gateway Address Optional 7.7.44 */
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {GTP_EXT_COMMON_FLGS, GTP_OPTIONAL},        /* Common Flags Optional 7.7.48 */
+            {GTP_EXT_APN_RES, GTP_OPTIONAL},    /* APN Restriction Optional 7.7.49 */
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_DELETE_PDP_REQ, {
-                             {GTP_EXT_TEAR_IND, GTP_CONDITIONAL},
-                             {GTP_EXT_NSAPI, GTP_MANDATORY},
-                             {GTP_EXT_PROTO_CONF, GTP_OPTIONAL},       /* Protocol Configuration Options Optional 7.7.31 */
-                             {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                             {0, 0}
-                             }
-     },
+        GTP_MSG_DELETE_PDP_REQ, {
+            {GTP_EXT_TEAR_IND, GTP_CONDITIONAL},
+            {GTP_EXT_NSAPI, GTP_MANDATORY},
+            {GTP_EXT_PROTO_CONF, GTP_OPTIONAL}, /* Protocol Configuration Options Optional 7.7.31 */
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_DELETE_PDP_RESP, {
-                              {GTP_EXT_CAUSE, GTP_MANDATORY},
-                              {GTP_EXT_PROTO_CONF, GTP_OPTIONAL},      /* Protocol Configuration Options Optional 7.7.31 */
-                              {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                              {0, 0}
-                              }
-     },
+        GTP_MSG_DELETE_PDP_RESP, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},
+            {GTP_EXT_PROTO_CONF, GTP_OPTIONAL}, /* Protocol Configuration Options Optional 7.7.31 */
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_ERR_IND, {
-                      {GTP_EXT_TEID, GTP_MANDATORY},
-                      {GTP_EXT_GSN_ADDR, GTP_MANDATORY},       /* GSN Address Mandatory 7.7.32 */
-                      {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                      {0, 0}
-                      }
-     },
+        GTP_MSG_ERR_IND, {
+            {GTP_EXT_TEID, GTP_MANDATORY},
+            {GTP_EXT_GSN_ADDR, GTP_MANDATORY},  /* GSN Address Mandatory 7.7.32 */
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_PDU_NOTIFY_REQ, {
-                             {GTP_EXT_IMSI, GTP_MANDATORY},
-                             {GTP_EXT_TEID_CP, GTP_MANDATORY},
-                             {GTP_EXT_USER_ADDR, GTP_MANDATORY},
-                             {GTP_EXT_APN, GTP_MANDATORY},
-                             {GTP_EXT_PROTO_CONF, GTP_OPTIONAL},       /* Protocol Configuration Options Optional 7.7.31 */
-                             {GTP_EXT_GSN_ADDR, GTP_MANDATORY},
-                             {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                             {0, 0}
-                             }
-     },
+        GTP_MSG_PDU_NOTIFY_REQ, {
+            {GTP_EXT_IMSI, GTP_MANDATORY},
+            {GTP_EXT_TEID_CP, GTP_MANDATORY},
+            {GTP_EXT_USER_ADDR, GTP_MANDATORY},
+            {GTP_EXT_APN, GTP_MANDATORY},
+            {GTP_EXT_PROTO_CONF, GTP_OPTIONAL}, /* Protocol Configuration Options Optional 7.7.31 */
+            {GTP_EXT_GSN_ADDR, GTP_MANDATORY},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_PDU_NOTIFY_RESP, {
-                              {GTP_EXT_CAUSE, GTP_MANDATORY},
-                              {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                              {0, 0}
-                              }
-     },
+        GTP_MSG_PDU_NOTIFY_RESP, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_PDU_NOTIFY_REJ_REQ, {
-                                 {GTP_EXT_CAUSE, GTP_MANDATORY},
-                                 {GTP_EXT_TEID_CP, GTP_MANDATORY},
-                                 {GTP_EXT_USER_ADDR, GTP_MANDATORY},
-                                 {GTP_EXT_APN, GTP_MANDATORY},
-                                 {GTP_EXT_PROTO_CONF, GTP_OPTIONAL},   /* Protocol Configuration Options Optional 7.7.31 */
-                                 {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                                 {0, 0}
-                                 }
-     },
+        GTP_MSG_PDU_NOTIFY_REJ_REQ, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},
+            {GTP_EXT_TEID_CP, GTP_MANDATORY},
+            {GTP_EXT_USER_ADDR, GTP_MANDATORY},
+            {GTP_EXT_APN, GTP_MANDATORY},
+            {GTP_EXT_PROTO_CONF, GTP_OPTIONAL}, /* Protocol Configuration Options Optional 7.7.31 */
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_PDU_NOTIFY_REJ_RESP, {
-                                  {GTP_EXT_CAUSE, GTP_MANDATORY},
-                                  {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                                  {0, 0}
-                                  }
-     },
+        GTP_MSG_PDU_NOTIFY_REJ_RESP, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     /* 7.4 Location Management Messages */
     {
-     GTP_MSG_SEND_ROUT_INFO_REQ, {
-                                 {GTP_EXT_IMSI, GTP_MANDATORY},
-                                 {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                                 {0, 0}
-                                 }
-     },
+        GTP_MSG_SEND_ROUT_INFO_REQ, {
+            {GTP_EXT_IMSI, GTP_MANDATORY},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_SEND_ROUT_INFO_RESP, {
-                                  {GTP_EXT_CAUSE, GTP_MANDATORY},
-                                  {GTP_EXT_IMSI, GTP_MANDATORY},
-                                  {GTP_EXT_MAP_CAUSE, GTP_OPTIONAL},
-                                  {GTPv1_EXT_MS_REASON, GTP_OPTIONAL},
-                                  {GTP_EXT_GSN_ADDR, GTP_OPTIONAL},
-                                  {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                                  {0, 0}
-                                  }
-     },
+        GTP_MSG_SEND_ROUT_INFO_RESP, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},
+            {GTP_EXT_IMSI, GTP_MANDATORY},
+            {GTP_EXT_MAP_CAUSE, GTP_OPTIONAL},
+            {GTPv1_EXT_MS_REASON, GTP_OPTIONAL},
+            {GTP_EXT_GSN_ADDR, GTP_OPTIONAL},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_FAIL_REP_REQ, {
-                           {GTP_EXT_IMSI, GTP_MANDATORY},
-                           {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                           {0, 0}
-                           }
-     },
+        GTP_MSG_FAIL_REP_REQ, {
+            {GTP_EXT_IMSI, GTP_MANDATORY},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_FAIL_REP_RESP, {
-                            {GTP_EXT_CAUSE, GTP_MANDATORY},
-                            {GTP_EXT_MAP_CAUSE, GTP_OPTIONAL},
-                            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                            {0, 0}
-                            }
-     },
+        GTP_MSG_FAIL_REP_RESP, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},
+            {GTP_EXT_MAP_CAUSE, GTP_OPTIONAL},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_MS_PRESENT_REQ, {
-                             {GTP_EXT_IMSI, GTP_MANDATORY},
-                             {GTP_EXT_GSN_ADDR, GTP_MANDATORY},
-                             {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                             {0, 0}
-                             }
-     },
+        GTP_MSG_MS_PRESENT_REQ, {
+            {GTP_EXT_IMSI, GTP_MANDATORY},
+            {GTP_EXT_GSN_ADDR, GTP_MANDATORY},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_MS_PRESENT_RESP, {
-                              {GTP_EXT_CAUSE, GTP_MANDATORY},
-                              {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                              {0, 0}
-                              }
-     },
+        GTP_MSG_MS_PRESENT_RESP, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     /* 7.5 Mobility Management Messages */
     {
-     GTP_MSG_IDENT_REQ, {
-                        {GTP_EXT_RAI, GTP_MANDATORY},
-                        {GTP_EXT_PTMSI, GTP_MANDATORY},
-                        {GTP_EXT_PTMSI_SIG, GTP_CONDITIONAL},
-                        {GTP_EXT_GSN_ADDR, GTP_OPTIONAL},      /* SGSN Address for Control Plane Optional 7.7.32 */
-                        {GTP_EXT_HOP_COUNT, GTP_OPTIONAL},     /* Hop Counter Optional 7.7.63 */
-                        {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                        {0, 0}
-                        }
-     },
+        GTP_MSG_IDENT_REQ, {
+            {GTP_EXT_RAI, GTP_MANDATORY},
+            {GTP_EXT_PTMSI, GTP_MANDATORY},
+            {GTP_EXT_PTMSI_SIG, GTP_CONDITIONAL},
+            {GTP_EXT_GSN_ADDR, GTP_OPTIONAL},   /* SGSN Address for Control Plane Optional 7.7.32 */
+            {GTP_EXT_HOP_COUNT, GTP_OPTIONAL},  /* Hop Counter Optional 7.7.63 */
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_IDENT_RESP, {
-                         {GTP_EXT_CAUSE, GTP_MANDATORY},
-                         {GTP_EXT_IMSI, GTP_CONDITIONAL},
-                         {GTP_EXT_AUTH_TRI, GTP_CONDITIONAL},
-                         {GTP_EXT_AUTH_QUI, GTP_CONDITIONAL},
-                         {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                         {0, 0}
-                         }
-     },
+        GTP_MSG_IDENT_RESP, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},
+            {GTP_EXT_IMSI, GTP_CONDITIONAL},
+            {GTP_EXT_AUTH_TRI, GTP_CONDITIONAL},
+            {GTP_EXT_AUTH_QUI, GTP_CONDITIONAL},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_SGSN_CNTXT_REQ, {
-                             {GTP_EXT_IMSI, GTP_CONDITIONAL},
-                             {GTP_EXT_RAI, GTP_MANDATORY},
-                             {GTP_EXT_TLLI, GTP_CONDITIONAL},
-                             {GTP_EXT_PTMSI, GTP_CONDITIONAL},
-                             {GTP_EXT_PTMSI_SIG, GTP_CONDITIONAL},
-                             {GTP_EXT_MS_VALID, GTP_OPTIONAL},
-                             {GTP_EXT_TEID_CP, GTP_MANDATORY},
-                             {GTP_EXT_GSN_ADDR, GTP_MANDATORY},
-                             {GTP_EXT_GSN_ADDR, GTP_OPTIONAL}, /* Alternative SGSN Address for Control Plane Optional 7.7.32 */
-                             {GTP_EXT_SSGN_NO, GTP_OPTIONAL},  /* SGSN Number Optional 7.7.47 */
-                             {GTP_EXT_HOP_COUNT, GTP_OPTIONAL},        /* Hop Counter Optional 7.7.63 */
-                             {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                             {0, 0}
-                             }
-     },
+        GTP_MSG_SGSN_CNTXT_REQ, {
+            {GTP_EXT_IMSI, GTP_CONDITIONAL},
+            {GTP_EXT_RAI, GTP_MANDATORY},
+            {GTP_EXT_TLLI, GTP_CONDITIONAL},
+            {GTP_EXT_PTMSI, GTP_CONDITIONAL},
+            {GTP_EXT_PTMSI_SIG, GTP_CONDITIONAL},
+            {GTP_EXT_MS_VALID, GTP_OPTIONAL},
+            {GTP_EXT_TEID_CP, GTP_MANDATORY},
+            {GTP_EXT_GSN_ADDR, GTP_MANDATORY},
+            {GTP_EXT_GSN_ADDR, GTP_OPTIONAL},   /* Alternative SGSN Address for Control Plane Optional 7.7.32 */
+            {GTP_EXT_SSGN_NO, GTP_OPTIONAL},    /* SGSN Number Optional 7.7.47 */
+            {GTP_EXT_HOP_COUNT, GTP_OPTIONAL},  /* Hop Counter Optional 7.7.63 */
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_SGSN_CNTXT_RESP, {
-                              {GTP_EXT_CAUSE, GTP_MANDATORY},
-                              {GTP_EXT_IMSI, GTP_CONDITIONAL},
-                              {GTP_EXT_TEID_CP, GTP_CONDITIONAL},
-                              {GTP_EXT_RAB_CNTXT, GTP_CONDITIONAL},    /* RAB Context Conditional 7.7.19 */
-                              {GTP_EXT_RP_SMS, GTP_OPTIONAL},
-                              {GTP_EXT_RP, GTP_OPTIONAL},
-                              {GTP_EXT_PKT_FLOW_ID, GTP_OPTIONAL},
-                              {GTP_EXT_CHRG_CHAR, GTP_OPTIONAL},       /* CharingCharacteristics Optional 7.7.23 */
-                              {GTP_EXT_RA_PRIO_LCS, GTP_OPTIONAL},     /* Radio Priority LCS Optional 7.7.25B */
-                              {GTP_EXT_MM_CNTXT, GTP_CONDITIONAL},
-                              {GTP_EXT_PDP_CNTXT, GTP_CONDITIONAL},
-                              {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},
-                              {GTP_EXT_PDP_CONT_PRIO, GTP_OPTIONAL},   /* PDP Context Prioritization Optional 7.7.45 */
-                              {GTP_EXT_MBMS_UE_CTX, GTP_OPTIONAL},     /* MBMS UE Context Optional 7.7.55 */
-                              {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                              {0, 0}
-                              }
-     },
+        GTP_MSG_SGSN_CNTXT_RESP, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},
+            {GTP_EXT_IMSI, GTP_CONDITIONAL},
+            {GTP_EXT_TEID_CP, GTP_CONDITIONAL},
+            {GTP_EXT_RAB_CNTXT, GTP_CONDITIONAL},       /* RAB Context Conditional 7.7.19 */
+            {GTP_EXT_RP_SMS, GTP_OPTIONAL},
+            {GTP_EXT_RP, GTP_OPTIONAL},
+            {GTP_EXT_PKT_FLOW_ID, GTP_OPTIONAL},
+            {GTP_EXT_CHRG_CHAR, GTP_OPTIONAL},  /* CharingCharacteristics Optional 7.7.23 */
+            {GTP_EXT_RA_PRIO_LCS, GTP_OPTIONAL},        /* Radio Priority LCS Optional 7.7.25B */
+            {GTP_EXT_MM_CNTXT, GTP_CONDITIONAL},
+            {GTP_EXT_PDP_CNTXT, GTP_CONDITIONAL},
+            {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},
+            {GTP_EXT_PDP_CONT_PRIO, GTP_OPTIONAL},      /* PDP Context Prioritization Optional 7.7.45 */
+            {GTP_EXT_MBMS_UE_CTX, GTP_OPTIONAL},        /* MBMS UE Context Optional 7.7.55 */
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_SGSN_CNTXT_ACK, {
-                             {GTP_EXT_CAUSE, GTP_MANDATORY},
-                             {GTP_EXT_TEID_II, GTP_CONDITIONAL},
-                             {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},
-                             {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                             {0, 0}
-                             }
-     },
+        GTP_MSG_SGSN_CNTXT_ACK, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},
+            {GTP_EXT_TEID_II, GTP_CONDITIONAL},
+            {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_FORW_RELOC_REQ, {
-                             {GTP_EXT_IMSI, GTP_MANDATORY},
-                             {GTP_EXT_TEID_CP, GTP_MANDATORY},
-                             {GTP_EXT_RANAP_CAUSE, GTP_MANDATORY},
-                             {GTP_EXT_CHRG_CHAR, GTP_OPTIONAL},        /* CharingCharacteristics Optional 7.7.23 */
-                             {GTP_EXT_MM_CNTXT, GTP_MANDATORY},
-                             {GTP_EXT_PDP_CNTXT, GTP_CONDITIONAL},
-                             {GTP_EXT_GSN_ADDR, GTP_MANDATORY},
-                             {GTP_EXT_TARGET_ID, GTP_MANDATORY},
-                             {GTP_EXT_UTRAN_CONT, GTP_MANDATORY},
-                             {GTP_EXT_PDP_CONT_PRIO, GTP_OPTIONAL},    /* PDP Context Prioritization Optional 7.7.45 */
-                             {GTP_EXT_MBMS_UE_CTX, GTP_OPTIONAL},      /* MBMS UE Context Optional 7.7.55 */
-                             {GTP_EXT_SEL_PLMN_ID, GTP_OPTIONAL},      /* Selected PLMN ID Optional 7.7.64 */
-                             {GTP_EXT_PS_HO_REQ_CTX, GTP_OPTIONAL},    /* PS Handover Request Context Optional 7.7.71 */
-                             {GTP_EXT_BSS_CONT, GTP_OPTIONAL}, /* BSS Container Optional 7.7.72 */
-                             {GTP_EXT_CELL_ID, GTP_OPTIONAL},  /* Cell Identification Optional 7.7.73 */
-                             {GTP_EXT_BSSGP_CAUSE, GTP_OPTIONAL},      /* BSSGP Cause Optional 7.7.75 */
-                             {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                             {GTP_EXT_SSGN_NO, GTP_OPTIONAL},
-                             {0, 0}
-                             }
-     },
+        GTP_MSG_FORW_RELOC_REQ, {
+            {GTP_EXT_IMSI, GTP_MANDATORY},
+            {GTP_EXT_TEID_CP, GTP_MANDATORY},
+            {GTP_EXT_RANAP_CAUSE, GTP_MANDATORY},
+            {GTP_EXT_CHRG_CHAR, GTP_OPTIONAL},  /* CharingCharacteristics Optional 7.7.23 */
+            {GTP_EXT_MM_CNTXT, GTP_MANDATORY},
+            {GTP_EXT_PDP_CNTXT, GTP_CONDITIONAL},
+            {GTP_EXT_GSN_ADDR, GTP_MANDATORY},
+            {GTP_EXT_TARGET_ID, GTP_MANDATORY},
+            {GTP_EXT_UTRAN_CONT, GTP_MANDATORY},
+            {GTP_EXT_PDP_CONT_PRIO, GTP_OPTIONAL},      /* PDP Context Prioritization Optional 7.7.45 */
+            {GTP_EXT_MBMS_UE_CTX, GTP_OPTIONAL},        /* MBMS UE Context Optional 7.7.55 */
+            {GTP_EXT_SEL_PLMN_ID, GTP_OPTIONAL},        /* Selected PLMN ID Optional 7.7.64 */
+            {GTP_EXT_PS_HO_REQ_CTX, GTP_OPTIONAL},      /* PS Handover Request Context Optional 7.7.71 */
+            {GTP_EXT_BSS_CONT, GTP_OPTIONAL},   /* BSS Container Optional 7.7.72 */
+            {GTP_EXT_CELL_ID, GTP_OPTIONAL},    /* Cell Identification Optional 7.7.73 */
+            {GTP_EXT_BSSGP_CAUSE, GTP_OPTIONAL},        /* BSSGP Cause Optional 7.7.75 */
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {GTP_EXT_SSGN_NO, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_FORW_RELOC_RESP, {
-                              {GTP_EXT_CAUSE, GTP_MANDATORY},
-                              {GTP_EXT_TEID_CP, GTP_CONDITIONAL},
-                              {GTP_EXT_TEID_II, GTP_CONDITIONAL},      /* Tunnel Endpoint Identifier Data II Optional 7.7.15 */
-                              {GTP_EXT_RANAP_CAUSE, GTP_CONDITIONAL},
-                              {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},
-                              {GTP_EXT_UTRAN_CONT, GTP_OPTIONAL},
-                              {GTP_EXT_RAB_SETUP, GTP_CONDITIONAL},
-                              {GTP_EXT_ADD_RAB_SETUP_INF, GTP_CONDITIONAL},    /* Additional RAB Setup Information Conditional 7.7.45A */
-                              {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                              {0, 0}
-                              }
-     },
+        GTP_MSG_FORW_RELOC_RESP, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},
+            {GTP_EXT_TEID_CP, GTP_CONDITIONAL},
+            {GTP_EXT_TEID_II, GTP_CONDITIONAL}, /* Tunnel Endpoint Identifier Data II Optional 7.7.15 */
+            {GTP_EXT_RANAP_CAUSE, GTP_CONDITIONAL},
+            {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},
+            {GTP_EXT_UTRAN_CONT, GTP_OPTIONAL},
+            {GTP_EXT_RAB_SETUP, GTP_CONDITIONAL},
+            {GTP_EXT_ADD_RAB_SETUP_INF, GTP_CONDITIONAL},       /* Additional RAB Setup Information Conditional 7.7.45A */
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_FORW_RELOC_COMP, {
-                              {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                              {0, 0}
-                              }
-     },
+        GTP_MSG_FORW_RELOC_COMP, {
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_RELOC_CANCEL_REQ, {
-                               {GTP_EXT_IMSI, GTP_MANDATORY},
-                               {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                               {0, 0}
-                               }
-     },
+        GTP_MSG_RELOC_CANCEL_REQ, {
+            {GTP_EXT_IMSI, GTP_MANDATORY},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_RELOC_CANCEL_RESP, {
-                                {GTP_EXT_CAUSE, GTP_MANDATORY},
-                                {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                                {0, 0}
-                                }
-     },
+        GTP_MSG_RELOC_CANCEL_RESP, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_FORW_RELOC_ACK, {
-                             {GTP_EXT_CAUSE, GTP_MANDATORY},
-                             {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                             {0, 0}
-                             }
-     },
+        GTP_MSG_FORW_RELOC_ACK, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_FORW_SRNS_CNTXT_ACK, {
-                                  {GTP_EXT_CAUSE, GTP_MANDATORY},
-                                  {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                                  {0, 0}
-                                  }
-     },
+        GTP_MSG_FORW_SRNS_CNTXT_ACK, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MSG_FORW_SRNS_CNTXT, {
-                              {GTP_EXT_RAB_CNTXT, GTP_MANDATORY},
-                              {GTP_EXT_SRC_RNC_PDP_CTX_INF, GTP_OPTIONAL},     /* Source RNC PDCP context info Optional 7.7.61 */
-                              {GTP_EXT_PDU_NO, GTP_OPTIONAL},  /* PDU Numbers Optional 7.7.74 */
-                              {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                              {0, 0}
-                              }
-     },
-
-/*     7.5.14 RAN Information Management Messages */
+        GTP_MSG_FORW_SRNS_CNTXT, {
+            {GTP_EXT_RAB_CNTXT, GTP_MANDATORY},
+            {GTP_EXT_SRC_RNC_PDP_CTX_INF, GTP_OPTIONAL},        /* Source RNC PDCP context info Optional 7.7.61 */
+            {GTP_EXT_PDU_NO, GTP_OPTIONAL},     /* PDU Numbers Optional 7.7.74 */
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
+
+/*      7.5.14 RAN Information Management Messages */
     {
-     GTP_MSG_RAN_INFO_RELAY, {
-                             {GTP_EXT_RAN_TR_CONT, GTP_MANDATORY},     /* RAN Transparent Container Mandatory 7.7.43 */
-                             {GTP_EXT_RIM_RA, GTP_OPTIONAL},   /* RIM Routing Address Optional 7.7.57 */
-                             {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                             {0, 0}
-                             }
-     },
-/* 7.5A MBMS Messages 
+        GTP_MSG_RAN_INFO_RELAY, {
+            {GTP_EXT_RAN_TR_CONT, GTP_MANDATORY},       /* RAN Transparent Container Mandatory 7.7.43 */
+            {GTP_EXT_RIM_RA, GTP_OPTIONAL},     /* RIM Routing Address Optional 7.7.57 */
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
+/* 7.5A MBMS Messages
  * 7.5A.1 UE Specific MBMS Messages
  */
     {
-     GTP_MBMS_NOTIFY_REQ, {
-                          {GTP_EXT_IMSI, GTP_MANDATORY},       /* IMSI Mandatory 7.7.2 */
-                          {GTP_EXT_TEID_CP, GTP_MANDATORY},    /* Tunnel Endpoint Identifier Control Plane Mandatory 7.7.14 */
-                          {GTP_EXT_NSAPI, GTP_MANDATORY},      /* NSAPI Mandatory 7.7.17 */
-                          {GTP_EXT_USER_ADDR, GTP_MANDATORY},  /* End User Address Mandatory 7.7.27 */
-                          {GTP_EXT_APN, GTP_MANDATORY},        /* Access Point Name Mandatory 7.7.30 */
-                          {GTP_EXT_GSN_ADDR, GTP_MANDATORY},   /* GGSN Address for Control Plane Mandatory 7.7.32 */
-                          {GTP_EXT_MBMS_PROT_CONF_OPT, GTP_OPTIONAL},  /* MBMS Protocol Configuration Options Optional 7.7.58 */
-                          {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},    /* Private Extension Optional 7.7.46 */
-                          {0, 0}
-                          }
-     },
+        GTP_MBMS_NOTIFY_REQ, {
+            {GTP_EXT_IMSI, GTP_MANDATORY},      /* IMSI Mandatory 7.7.2 */
+            {GTP_EXT_TEID_CP, GTP_MANDATORY},   /* Tunnel Endpoint Identifier Control Plane Mandatory 7.7.14 */
+            {GTP_EXT_NSAPI, GTP_MANDATORY},     /* NSAPI Mandatory 7.7.17 */
+            {GTP_EXT_USER_ADDR, GTP_MANDATORY}, /* End User Address Mandatory 7.7.27 */
+            {GTP_EXT_APN, GTP_MANDATORY},       /* Access Point Name Mandatory 7.7.30 */
+            {GTP_EXT_GSN_ADDR, GTP_MANDATORY},  /* GGSN Address for Control Plane Mandatory 7.7.32 */
+            {GTP_EXT_MBMS_PROT_CONF_OPT, GTP_OPTIONAL}, /* MBMS Protocol Configuration Options Optional 7.7.58 */
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},   /* Private Extension Optional 7.7.46 */
+            {0, 0}
+        }
+    },
     {
-     GTP_MBMS_NOTIFY_RES, {
-                          {GTP_EXT_CAUSE, GTP_MANDATORY},      /* Cause Mandatory 7.7.1 */
-                          {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                          {0, 0}
-                          }
-     },
+        GTP_MBMS_NOTIFY_RES, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},     /* Cause Mandatory 7.7.1 */
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MBMS_NOTIFY_REJ_REQ, {
-                              {GTP_EXT_CAUSE, GTP_MANDATORY},  /* Cause Mandatory 7.7.1 */
-                              {GTP_EXT_TEID_CP, GTP_MANDATORY},        /* Tunnel Endpoint Identifier Control Plane Mandatory 7.7.14 */
-                              {GTP_EXT_NSAPI, GTP_MANDATORY},  /* NSAPI Mandatory 7.7.17 */
-                              {GTP_EXT_USER_ADDR, GTP_MANDATORY},      /* End User Address Mandatory 7.7.27 */
-                              {GTP_EXT_APN, GTP_MANDATORY},    /* Access Point Name Mandatory 7.7.30 */
-                              {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                              {0, 0}
-                              }
-     },
+        GTP_MBMS_NOTIFY_REJ_REQ, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},     /* Cause Mandatory 7.7.1 */
+            {GTP_EXT_TEID_CP, GTP_MANDATORY},   /* Tunnel Endpoint Identifier Control Plane Mandatory 7.7.14 */
+            {GTP_EXT_NSAPI, GTP_MANDATORY},     /* NSAPI Mandatory 7.7.17 */
+            {GTP_EXT_USER_ADDR, GTP_MANDATORY}, /* End User Address Mandatory 7.7.27 */
+            {GTP_EXT_APN, GTP_MANDATORY},       /* Access Point Name Mandatory 7.7.30 */
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MBMS_NOTIFY_REJ_RES, {
-                              {GTP_EXT_CAUSE, GTP_MANDATORY},  /* Cause Mandatory 7.7.1 */
-                              {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                              {0, 0}
-                              }
-     },
+        GTP_MBMS_NOTIFY_REJ_RES, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},     /* Cause Mandatory 7.7.1 */
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_CREATE_MBMS_CNTXT_REQ, {
-                                {GTP_EXT_IMSI, GTP_CONDITIONAL},       /* IMSI Conditional 7.7.2 */
-                                {GTP_EXT_RAI, GTP_MANDATORY},  /* Routeing Area Identity (RAI) Mandatory 7.7.3 */
-                                {GTP_EXT_RECOVER, GTP_OPTIONAL},       /* Recovery Optional 7.7.11 */
-                                {GTP_EXT_SEL_MODE, GTP_CONDITIONAL},   /* Selection mode Conditional 7.7.12 */
-                                {GTP_EXT_TEID_CP, GTP_CONDITIONAL},    /* Tunnel Endpoint Identifier Control Plane Conditional 7.7.14 */
-                                {GTP_EXT_TRACE_REF, GTP_OPTIONAL},     /* Trace Reference Optional 7.7.24 */
-                                {GTP_EXT_TRACE_TYPE, GTP_OPTIONAL},    /* Trace Type Optional 7.7.25 */
-                                {GTP_EXT_USER_ADDR, GTP_MANDATORY},    /* End User Address Mandatory 7.7.27 */
-                                {GTP_EXT_APN, GTP_MANDATORY},  /* Access Point Name Mandatory 7.7.30 */
-                                {GTP_EXT_GSN_ADDR, GTP_MANDATORY},     /* SGSN Address for signalling Mandatory GSN Address 7.7.32 */
-                                {GTP_EXT_MSISDN, GTP_CONDITIONAL},     /* MSISDN Conditional 7.7.33 */
-                                {GTP_EXT_TRIGGER_ID, GTP_OPTIONAL},    /* Trigger Id Optional 7.7.41 */
-                                {GTP_EXT_OMC_ID, GTP_OPTIONAL},        /* OMC Identity Optional 7.7.42 */
-                                {GTP_EXT_RAT_TYPE, GTP_OPTIONAL},      /* RAT Type Optional 7.7.50 */
-                                {GTP_EXT_USR_LOC_INF, GTP_OPTIONAL},   /* User Location Information Optional 7.7.51 */
-                                {GTP_EXT_MS_TIME_ZONE, GTP_OPTIONAL},  /* MS Time Zone Optional 7.7.52 */
-                                {GTP_EXT_IMEISV, GTP_OPTIONAL},        /* IMEI(SV) Optional 7.7.53 */
-                                {GTP_EXT_MBMS_PROT_CONF_OPT, GTP_OPTIONAL},    /* MBMS Protocol Configuration Options Optional 7.7.58 */
-                                {GTP_EXT_ADD_TRS_INF, GTP_OPTIONAL},   /* Additonal Trace Info Optional 7.7.62 */
-                                {GTP_EXT_ENH_NSAPI, GTP_MANDATORY},    /* Enhanced NSAPI Mandatory 7.7.67 */
-                                {GTP_EXT_ADD_MBMS_TRS_INF, GTP_OPTIONAL},      /* Additional MBMS Trace Info Optional 7.7.68 */
-                                {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                                {0, 0}
-                                }
-     },
+        GTP_CREATE_MBMS_CNTXT_REQ, {
+            {GTP_EXT_IMSI, GTP_CONDITIONAL},    /* IMSI Conditional 7.7.2 */
+            {GTP_EXT_RAI, GTP_MANDATORY},       /* Routeing Area Identity (RAI) Mandatory 7.7.3 */
+            {GTP_EXT_RECOVER, GTP_OPTIONAL},    /* Recovery Optional 7.7.11 */
+            {GTP_EXT_SEL_MODE, GTP_CONDITIONAL},        /* Selection mode Conditional 7.7.12 */
+            {GTP_EXT_TEID_CP, GTP_CONDITIONAL}, /* Tunnel Endpoint Identifier Control Plane Conditional 7.7.14 */
+            {GTP_EXT_TRACE_REF, GTP_OPTIONAL},  /* Trace Reference Optional 7.7.24 */
+            {GTP_EXT_TRACE_TYPE, GTP_OPTIONAL}, /* Trace Type Optional 7.7.25 */
+            {GTP_EXT_USER_ADDR, GTP_MANDATORY}, /* End User Address Mandatory 7.7.27 */
+            {GTP_EXT_APN, GTP_MANDATORY},       /* Access Point Name Mandatory 7.7.30 */
+            {GTP_EXT_GSN_ADDR, GTP_MANDATORY},  /* SGSN Address for signalling Mandatory GSN Address 7.7.32 */
+            {GTP_EXT_MSISDN, GTP_CONDITIONAL},  /* MSISDN Conditional 7.7.33 */
+            {GTP_EXT_TRIGGER_ID, GTP_OPTIONAL}, /* Trigger Id Optional 7.7.41 */
+            {GTP_EXT_OMC_ID, GTP_OPTIONAL},     /* OMC Identity Optional 7.7.42 */
+            {GTP_EXT_RAT_TYPE, GTP_OPTIONAL},   /* RAT Type Optional 7.7.50 */
+            {GTP_EXT_USR_LOC_INF, GTP_OPTIONAL},        /* User Location Information Optional 7.7.51 */
+            {GTP_EXT_MS_TIME_ZONE, GTP_OPTIONAL},       /* MS Time Zone Optional 7.7.52 */
+            {GTP_EXT_IMEISV, GTP_OPTIONAL},     /* IMEI(SV) Optional 7.7.53 */
+            {GTP_EXT_MBMS_PROT_CONF_OPT, GTP_OPTIONAL}, /* MBMS Protocol Configuration Options Optional 7.7.58 */
+            {GTP_EXT_ADD_TRS_INF, GTP_OPTIONAL},        /* Additonal Trace Info Optional 7.7.62 */
+            {GTP_EXT_ENH_NSAPI, GTP_MANDATORY}, /* Enhanced NSAPI Mandatory 7.7.67 */
+            {GTP_EXT_ADD_MBMS_TRS_INF, GTP_OPTIONAL},   /* Additional MBMS Trace Info Optional 7.7.68 */
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_CREATE_MBMS_CNTXT_RES, {
-                                {GTP_EXT_CAUSE, GTP_MANDATORY},        /* Cause Mandatory 7.7.1 */
-                                {GTP_EXT_RECOVER, GTP_OPTIONAL},       /* Recovery Optional 7.7.11 */
-                                {GTP_EXT_TEID_CP, GTP_CONDITIONAL},    /* Tunnel Endpoint Identifier Control Plane Conditional 7.7.14 */
-                                {GTP_EXT_CHRG_ID, GTP_CONDITIONAL},    /* Charging ID Conditional 7.7.26 */
-                                {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},   /* GGSN Address for Control Plane Conditional GSN Address 7.7.32 */
-                                {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},   /* Alternative GGSN Address for Control Plane Conditional GSN Address 7.7.32 */
-                                {GTP_EXT_CHRG_ADDR, GTP_OPTIONAL},     /* Charging Gateway Address Optional 7.7.44 */
-                                {GTP_EXT_CHRG_ADDR, GTP_OPTIONAL},     /* Alternative Charging Gateway Address Optional 7.7.44 */
-                                {GTP_EXT_MBMS_PROT_CONF_OPT, GTP_OPTIONAL},    /* MBMS Protocol Configuration Options Optional 7.7.58 */
-                                {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                                {0, 0}
-                                }
-     },
+        GTP_CREATE_MBMS_CNTXT_RES, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},     /* Cause Mandatory 7.7.1 */
+            {GTP_EXT_RECOVER, GTP_OPTIONAL},    /* Recovery Optional 7.7.11 */
+            {GTP_EXT_TEID_CP, GTP_CONDITIONAL}, /* Tunnel Endpoint Identifier Control Plane Conditional 7.7.14 */
+            {GTP_EXT_CHRG_ID, GTP_CONDITIONAL}, /* Charging ID Conditional 7.7.26 */
+            {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},        /* GGSN Address for Control Plane Conditional GSN Address 7.7.32 */
+            {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},        /* Alternative GGSN Address for Control Plane Conditional GSN Address 7.7.32 */
+            {GTP_EXT_CHRG_ADDR, GTP_OPTIONAL},  /* Charging Gateway Address Optional 7.7.44 */
+            {GTP_EXT_CHRG_ADDR, GTP_OPTIONAL},  /* Alternative Charging Gateway Address Optional 7.7.44 */
+            {GTP_EXT_MBMS_PROT_CONF_OPT, GTP_OPTIONAL}, /* MBMS Protocol Configuration Options Optional 7.7.58 */
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_UPD_MBMS_CNTXT_REQ, {
-                             {GTP_EXT_IMSI, GTP_CONDITIONAL},  /* IMSI Conditional 7.7.2 */
-                             {GTP_EXT_RAI, GTP_MANDATORY},     /* Routeing Area Identity (RAI) Mandatory 7.7.3 */
-                             {GTP_EXT_RECOVER, GTP_OPTIONAL},  /* Recovery Optional 7.7.11 */
-                             {GTP_EXT_TEID_CP, GTP_CONDITIONAL},       /* Tunnel Endpoint Identifier Control Plane Conditional 7.7.14 */
-                             {GTP_EXT_TRACE_REF, GTP_OPTIONAL},        /* Trace Reference Optional 7.7.24 */
-                             {GTP_EXT_TRACE_TYPE, GTP_OPTIONAL},       /* Trace Type Optional 7.7.25 */
-                             {GTP_EXT_GSN_ADDR, GTP_MANDATORY},        /* SGSN Address for Control Plane Mandatory GSN Address 7.7.32 */
-                             {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},      /* Alternative SGSN Address for Control Plane Conditional GSN Address 7.7.32 */
-                             {GTP_EXT_TRIGGER_ID, GTP_OPTIONAL},       /* Trigger Id Optional 7.7.41 */
-                             {GTP_EXT_OMC_ID, GTP_OPTIONAL},   /* OMC Identity Optional 7.7.42 */
-                             {GTP_EXT_RAT_TYPE, GTP_OPTIONAL}, /* RAT Type Optional 7.7.50 */
-                             {GTP_EXT_USR_LOC_INF, GTP_OPTIONAL},      /* User Location Information Optional 7.7.51 */
-                             {GTP_EXT_MS_TIME_ZONE, GTP_OPTIONAL},     /* MS Time Zone Optional 7.7.52 */
-                             {GTP_EXT_ADD_TRS_INF, GTP_OPTIONAL},      /* Additional Trace Info Optional 7.7.62 */
-                             {GTP_EXT_ENH_NSAPI, GTP_MANDATORY},       /* Enhanced NSAPI Mandatory 7.7.67 */
-                             {GTP_EXT_ADD_MBMS_TRS_INF, GTP_OPTIONAL}, /* Additional MBMS Trace Info Optional 7.7.68 */
-                             {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                             {0, 0}
-                             }
-     },
+        GTP_UPD_MBMS_CNTXT_REQ, {
+            {GTP_EXT_IMSI, GTP_CONDITIONAL},    /* IMSI Conditional 7.7.2 */
+            {GTP_EXT_RAI, GTP_MANDATORY},       /* Routeing Area Identity (RAI) Mandatory 7.7.3 */
+            {GTP_EXT_RECOVER, GTP_OPTIONAL},    /* Recovery Optional 7.7.11 */
+            {GTP_EXT_TEID_CP, GTP_CONDITIONAL}, /* Tunnel Endpoint Identifier Control Plane Conditional 7.7.14 */
+            {GTP_EXT_TRACE_REF, GTP_OPTIONAL},  /* Trace Reference Optional 7.7.24 */
+            {GTP_EXT_TRACE_TYPE, GTP_OPTIONAL}, /* Trace Type Optional 7.7.25 */
+            {GTP_EXT_GSN_ADDR, GTP_MANDATORY},  /* SGSN Address for Control Plane Mandatory GSN Address 7.7.32 */
+            {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},        /* Alternative SGSN Address for Control Plane Conditional GSN Address 7.7.32 */
+            {GTP_EXT_TRIGGER_ID, GTP_OPTIONAL}, /* Trigger Id Optional 7.7.41 */
+            {GTP_EXT_OMC_ID, GTP_OPTIONAL},     /* OMC Identity Optional 7.7.42 */
+            {GTP_EXT_RAT_TYPE, GTP_OPTIONAL},   /* RAT Type Optional 7.7.50 */
+            {GTP_EXT_USR_LOC_INF, GTP_OPTIONAL},        /* User Location Information Optional 7.7.51 */
+            {GTP_EXT_MS_TIME_ZONE, GTP_OPTIONAL},       /* MS Time Zone Optional 7.7.52 */
+            {GTP_EXT_ADD_TRS_INF, GTP_OPTIONAL},        /* Additional Trace Info Optional 7.7.62 */
+            {GTP_EXT_ENH_NSAPI, GTP_MANDATORY}, /* Enhanced NSAPI Mandatory 7.7.67 */
+            {GTP_EXT_ADD_MBMS_TRS_INF, GTP_OPTIONAL},   /* Additional MBMS Trace Info Optional 7.7.68 */
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_UPD_MBMS_CNTXT_RES, {
-                             {GTP_EXT_CAUSE, GTP_MANDATORY},   /* Cause Mandatory 7.7.1 */
-                             {GTP_EXT_RECOVER, GTP_OPTIONAL},  /* Recovery Optional 7.7.11 */
-                             {GTP_EXT_TEID_CP, GTP_MANDATORY}, /* Tunnel Endpoint Identifier Control Plane Conditional 7.7.14 */
-                             {GTP_EXT_CHRG_ID, GTP_CONDITIONAL},       /* Charging ID Conditional 7.7.26 */
-                             {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},      /* GGSN Address for Control Plane Conditional GSN Address 7.7.32 */
-                             {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},      /* Alternative GGSN Address for Control Plane Conditional GSN Address 7.7.32 */
-                             {GTP_EXT_CHRG_ADDR, GTP_OPTIONAL},        /* Charging Gateway Address Optional 7.7.44 */
-                             {GTP_EXT_CHRG_ADDR, GTP_OPTIONAL},        /* Alternative Charging Gateway Address Optional 7.7.44 */
-                             {GTP_EXT_PRIV_EXT, GTP_OPTIONAL}, /* Private Extension Optional 7.7.46 */
-                             {0, 0}
-                             }
-     },
+        GTP_UPD_MBMS_CNTXT_RES, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},     /* Cause Mandatory 7.7.1 */
+            {GTP_EXT_RECOVER, GTP_OPTIONAL},    /* Recovery Optional 7.7.11 */
+            {GTP_EXT_TEID_CP, GTP_MANDATORY},   /* Tunnel Endpoint Identifier Control Plane Conditional 7.7.14 */
+            {GTP_EXT_CHRG_ID, GTP_CONDITIONAL}, /* Charging ID Conditional 7.7.26 */
+            {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},        /* GGSN Address for Control Plane Conditional GSN Address 7.7.32 */
+            {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},        /* Alternative GGSN Address for Control Plane Conditional GSN Address 7.7.32 */
+            {GTP_EXT_CHRG_ADDR, GTP_OPTIONAL},  /* Charging Gateway Address Optional 7.7.44 */
+            {GTP_EXT_CHRG_ADDR, GTP_OPTIONAL},  /* Alternative Charging Gateway Address Optional 7.7.44 */
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},   /* Private Extension Optional 7.7.46 */
+            {0, 0}
+        }
+    },
     {
-     GTP_DEL_MBMS_CNTXT_REQ, {
-                             {GTP_EXT_IMSI, GTP_CONDITIONAL},  /* IMSI Conditional 7.7.2 */
-                             {GTP_EXT_TEID_CP, GTP_MANDATORY}, /* Tunnel Endpoint Identifier Control Plane Conditional 7.7.14 */
-                             {GTP_EXT_USER_ADDR, GTP_CONDITIONAL},     /* End User Address Conditional 7.7.27 */
-                             {GTP_EXT_APN, GTP_CONDITIONAL},   /* Access Point Name Conditional 7.7.30 */
-                             {GTP_EXT_MBMS_PROT_CONF_OPT, GTP_OPTIONAL},       /* MBMS Protocol Configuration Options Optional 7.7.58 */
-                             {GTP_EXT_ENH_NSAPI, GTP_MANDATORY},       /* Enhanced NSAPI Conditional 7.7.67 */
-                             {GTP_EXT_PRIV_EXT, GTP_OPTIONAL}, /* Private Extension Optional 7.7.46 */
-                             {0, 0}
-                             }
-     },
+        GTP_DEL_MBMS_CNTXT_REQ, {
+            {GTP_EXT_IMSI, GTP_CONDITIONAL},    /* IMSI Conditional 7.7.2 */
+            {GTP_EXT_TEID_CP, GTP_MANDATORY},   /* Tunnel Endpoint Identifier Control Plane Conditional 7.7.14 */
+            {GTP_EXT_USER_ADDR, GTP_CONDITIONAL},       /* End User Address Conditional 7.7.27 */
+            {GTP_EXT_APN, GTP_CONDITIONAL},     /* Access Point Name Conditional 7.7.30 */
+            {GTP_EXT_MBMS_PROT_CONF_OPT, GTP_OPTIONAL}, /* MBMS Protocol Configuration Options Optional 7.7.58 */
+            {GTP_EXT_ENH_NSAPI, GTP_MANDATORY}, /* Enhanced NSAPI Conditional 7.7.67 */
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},   /* Private Extension Optional 7.7.46 */
+            {0, 0}
+        }
+    },
     {
-     GTP_DEL_MBMS_CNTXT_RES, {
-                             {GTP_EXT_CAUSE, GTP_MANDATORY},   /* Cause Mandatory 7.7.1 */
-                             {GTP_EXT_MBMS_PROT_CONF_OPT, GTP_OPTIONAL},       /* MBMS Protocol Configuration Options Optional 7.7.58 */
-                             {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
-                             {0, 0}
-                             }
-     },
+        GTP_DEL_MBMS_CNTXT_RES, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},     /* Cause Mandatory 7.7.1 */
+            {GTP_EXT_MBMS_PROT_CONF_OPT, GTP_OPTIONAL}, /* MBMS Protocol Configuration Options Optional 7.7.58 */
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},
+            {0, 0}
+        }
+    },
     {
-     GTP_MBMS_REG_REQ, {
-                       {GTP_EXT_USER_ADDR, GTP_MANDATORY},     /* End User Address Mandatory 7.7.27 */
-                       {GTP_EXT_APN, GTP_MANDATORY},   /* Access Point Name Mandatory 7.7.30 */
-                       {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},       /* Private Extension Optional 7.7.46 */
-                       {0, 0}
-                       }
-     },
+        GTP_MBMS_REG_REQ, {
+            {GTP_EXT_USER_ADDR, GTP_MANDATORY}, /* End User Address Mandatory 7.7.27 */
+            {GTP_EXT_APN, GTP_MANDATORY},       /* Access Point Name Mandatory 7.7.30 */
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},   /* Private Extension Optional 7.7.46 */
+            {0, 0}
+        }
+    },
     {
-     GTP_MBMS_REG_RES, {
-                       {GTP_EXT_CAUSE, GTP_MANDATORY}, /* Cause Mandatory 7.7.1 */
-                       {GTP_EXT_TMGI, GTP_MANDATORY},  /* Temporary Mobile Group Identity (TMGI) Conditional 7.7.56 */
-                       {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},       /* Private Extension Optional 7.7.46 */
-                       {0, 0}
-                       }
-     },
+        GTP_MBMS_REG_RES, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},     /* Cause Mandatory 7.7.1 */
+            {GTP_EXT_TMGI, GTP_MANDATORY},      /* Temporary Mobile Group Identity (TMGI) Conditional 7.7.56 */
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},   /* Private Extension Optional 7.7.46 */
+            {0, 0}
+        }
+    },
     {
-     GTP_MBMS_DE_REG_REQ, {
-                          {GTP_EXT_USER_ADDR, GTP_MANDATORY},  /* End User Address Mandatory 7.7.27 */
-                          {GTP_EXT_APN, GTP_MANDATORY},        /* Access Point Name Mandatory 7.7.30 */
-                          {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},    /* Private Extension Optional 7.7.46 */
-                          {0, 0}
-                          }
-     },
+        GTP_MBMS_DE_REG_REQ, {
+            {GTP_EXT_USER_ADDR, GTP_MANDATORY}, /* End User Address Mandatory 7.7.27 */
+            {GTP_EXT_APN, GTP_MANDATORY},       /* Access Point Name Mandatory 7.7.30 */
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},   /* Private Extension Optional 7.7.46 */
+            {0, 0}
+        }
+    },
     {
-     GTP_MBMS_DE_REG_RES, {
-                          {GTP_EXT_CAUSE, GTP_MANDATORY},      /* Cause Mandatory 7.7.1 */
-                          {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},    /* Private Extension Optional 7.7.46 */
-                          {0, 0}
-                          }
-     },
+        GTP_MBMS_DE_REG_RES, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},     /* Cause Mandatory 7.7.1 */
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},   /* Private Extension Optional 7.7.46 */
+            {0, 0}
+        }
+    },
     {
-     GTP_MBMS_SES_START_REQ, {
-                             {GTP_EXT_RECOVER, GTP_OPTIONAL},  /* Recovery Optional 7.7.11 */
-                             {GTP_EXT_TEID_CP, GTP_CONDITIONAL},       /* Tunnel Endpoint Identifier Control Plane Conditional 7.7.14 */
-                             {GTP_EXT_USER_ADDR, GTP_MANDATORY},       /* End User Address Mandatory 7.7.27 */
-                             {GTP_EXT_APN, GTP_MANDATORY},     /* Access Point Name Mandatory 7.7.30 */
-                             {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},      /* GGSN Address for Control Plane Conditional GSN Address 7.7.32 */
-                             {GTP_EXT_QOS_UMTS, GTP_MANDATORY},        /* Quality of Service Profile Mandatory 7.7.34 */
-                             {GTP_EXT_COMMON_FLGS, GTP_OPTIONAL},      /* Common Flags Mandatory 7.7.48 */
-                             {GTP_EXT_TMGI, GTP_MANDATORY},    /* Temporary Mobile Group Identity (TMGI) Mandatory 7.7.56 */
-                             {GTP_EXT_MBMS_SES_DUR, GTP_MANDATORY},    /* MBMS Session Duration Mandatory 7.7.59 */
-                             {GTP_EXT_MBMS_SA, GTP_MANDATORY}, /* MBMS Service Area Mandatory 7.7.60 */
-                             {GTP_EXT_MBMS_SES_ID, GTP_OPTIONAL},      /* MBMS Session Identifier Optional 7.7.65 */
-                             {GTP_EXT_MBMS_2G_3G_IND, GTP_MANDATORY},  /* MBMS 2G/3G Indicator Mandatory 7.7.66 */
-                             {GTP_EXT_MBMS_SES_ID_REP_NO, GTP_OPTIONAL},       /* MBMS Session Identity Repetition Number Optional 7.7.69 */
-                             {GTP_EXT_MBMS_TIME_TO_DATA_TR, GTP_MANDATORY},    /* MBMS Time To Data Transfer Mandatory 7.7.70 */
-                             {GTP_EXT_PRIV_EXT, GTP_OPTIONAL}, /* Private Extension Optional 7.7.46 */
-                             {0, 0}
-                             }
-     },
+        GTP_MBMS_SES_START_REQ, {
+            {GTP_EXT_RECOVER, GTP_OPTIONAL},    /* Recovery Optional 7.7.11 */
+            {GTP_EXT_TEID_CP, GTP_CONDITIONAL}, /* Tunnel Endpoint Identifier Control Plane Conditional 7.7.14 */
+            {GTP_EXT_USER_ADDR, GTP_MANDATORY}, /* End User Address Mandatory 7.7.27 */
+            {GTP_EXT_APN, GTP_MANDATORY},       /* Access Point Name Mandatory 7.7.30 */
+            {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},        /* GGSN Address for Control Plane Conditional GSN Address 7.7.32 */
+            {GTP_EXT_QOS_UMTS, GTP_MANDATORY},  /* Quality of Service Profile Mandatory 7.7.34 */
+            {GTP_EXT_COMMON_FLGS, GTP_OPTIONAL},        /* Common Flags Mandatory 7.7.48 */
+            {GTP_EXT_TMGI, GTP_MANDATORY},      /* Temporary Mobile Group Identity (TMGI) Mandatory 7.7.56 */
+            {GTP_EXT_MBMS_SES_DUR, GTP_MANDATORY},      /* MBMS Session Duration Mandatory 7.7.59 */
+            {GTP_EXT_MBMS_SA, GTP_MANDATORY},   /* MBMS Service Area Mandatory 7.7.60 */
+            {GTP_EXT_MBMS_SES_ID, GTP_OPTIONAL},        /* MBMS Session Identifier Optional 7.7.65 */
+            {GTP_EXT_MBMS_2G_3G_IND, GTP_MANDATORY},    /* MBMS 2G/3G Indicator Mandatory 7.7.66 */
+            {GTP_EXT_MBMS_SES_ID_REP_NO, GTP_OPTIONAL}, /* MBMS Session Identity Repetition Number Optional 7.7.69 */
+            {GTP_EXT_MBMS_TIME_TO_DATA_TR, GTP_MANDATORY},      /* MBMS Time To Data Transfer Mandatory 7.7.70 */
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},   /* Private Extension Optional 7.7.46 */
+            {0, 0}
+        }
+    },
     {
-     GTP_MBMS_SES_START_RES, {
-                             {GTP_EXT_CAUSE, GTP_MANDATORY},   /* Cause Mandatory 7.7.1 */
-                             {GTP_EXT_RECOVER, GTP_OPTIONAL},  /* Recovery Optional 7.7.11 */
-                             {GTP_EXT_TEID, GTP_CONDITIONAL},  /* Tunnel Endpoint Identifier Data I Conditional 7.7.13 */
-                             {GTP_EXT_TEID_CP, GTP_CONDITIONAL},       /* Tunnel Endpoint Identifier Control Plane Conditional 7.7.14 */
-                             {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},      /* SGSN Address for Control Plane Conditional GSN Address 7.7.32 */
-                             {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},      /* SGSN Address for user traffic Conditional GSN Address 7.7.32 */
-                             {GTP_EXT_PRIV_EXT, GTP_OPTIONAL}, /* Private Extension Optional 7.7.46 */
-                             {0, 0}
-                             }
-     },
+        GTP_MBMS_SES_START_RES, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},     /* Cause Mandatory 7.7.1 */
+            {GTP_EXT_RECOVER, GTP_OPTIONAL},    /* Recovery Optional 7.7.11 */
+            {GTP_EXT_TEID, GTP_CONDITIONAL},    /* Tunnel Endpoint Identifier Data I Conditional 7.7.13 */
+            {GTP_EXT_TEID_CP, GTP_CONDITIONAL}, /* Tunnel Endpoint Identifier Control Plane Conditional 7.7.14 */
+            {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},        /* SGSN Address for Control Plane Conditional GSN Address 7.7.32 */
+            {GTP_EXT_GSN_ADDR, GTP_CONDITIONAL},        /* SGSN Address for user traffic Conditional GSN Address 7.7.32 */
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},   /* Private Extension Optional 7.7.46 */
+            {0, 0}
+        }
+    },
     {
-     GTP_MBMS_SES_STOP_REQ, {
-                            {GTP_EXT_USER_ADDR, GTP_MANDATORY},        /* End User Address Mandatory 7.7.27 */
-                            {GTP_EXT_APN, GTP_MANDATORY},      /* Access Point Name Mandatory 7.7.30 */
-                            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},  /* Private Extension Optional 7.7.46 */
-                            {0, 0}
-                            }
-     },
+        GTP_MBMS_SES_STOP_REQ, {
+            {GTP_EXT_USER_ADDR, GTP_MANDATORY}, /* End User Address Mandatory 7.7.27 */
+            {GTP_EXT_APN, GTP_MANDATORY},       /* Access Point Name Mandatory 7.7.30 */
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},   /* Private Extension Optional 7.7.46 */
+            {0, 0}
+        }
+    },
     {
-     GTP_MBMS_SES_STOP_RES, {
-                            {GTP_EXT_CAUSE, GTP_MANDATORY},    /* Cause Mandatory 7.7.1 */
-                            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},  /* Private Extension Optional 7.7.46 */
-                            {0, 0}
-                            }
-     },
+        GTP_MBMS_SES_STOP_RES, {
+            {GTP_EXT_CAUSE, GTP_MANDATORY},     /* Cause Mandatory 7.7.1 */
+            {GTP_EXT_PRIV_EXT, GTP_OPTIONAL},   /* Private Extension Optional 7.7.46 */
+            {0, 0}
+        }
+    },
     {
-     0, {
-        {0, 0}
-        }
-     }
+        0, {
+            {0, 0}
+        }
+    }
 };
 
 /* Data structure attached to a conversation,
-       to keep track of request/response-pairs
+        to keep track of request/response-pairs
  */
 typedef struct gtp_conv_info_t {
     struct gtp_conv_info_t *next;
@@ -2671,20 +2671,20 @@ static gtp_msg_hash_t *gtp_match_response(tvbuff_t * tvb, packet_info * pinfo, p
     case GTP_MSG_CREATE_PDP_REQ:
     case GTP_MSG_UPDATE_PDP_REQ:
     case GTP_MSG_DELETE_PDP_REQ:
-       gcr.is_request=TRUE;
-       gcr.req_frame=pinfo->fd->num;
+        gcr.is_request=TRUE;
+        gcr.req_frame=pinfo->fd->num;
         gcr.rep_frame=0;
-       break;
+        break;
     case GTP_MSG_ECHO_RESP:
     case GTP_MSG_CREATE_PDP_RESP:
     case GTP_MSG_UPDATE_PDP_RESP:
     case GTP_MSG_DELETE_PDP_RESP:
-       gcr.is_request=FALSE;
+        gcr.is_request=FALSE;
         gcr.req_frame=0;
-       gcr.rep_frame=pinfo->fd->num;
-       break;
-       default:;
-       break;
+        gcr.rep_frame=pinfo->fd->num;
+        break;
+        default:;
+        break;
     }
 
     gcrp = g_hash_table_lookup(gtp_info->matched, &gcr);
@@ -2695,12 +2695,12 @@ static gtp_msg_hash_t *gtp_match_response(tvbuff_t * tvb, packet_info * pinfo, p
 
     } else {
 
-       /*no match, let's try to make one*/     
-       switch (msgtype) {
+        /*no match, let's try to make one*/
+        switch (msgtype) {
         case GTP_MSG_ECHO_REQ:
-       case GTP_MSG_CREATE_PDP_REQ:
-       case GTP_MSG_UPDATE_PDP_REQ:
-       case GTP_MSG_DELETE_PDP_REQ:
+        case GTP_MSG_CREATE_PDP_REQ:
+        case GTP_MSG_UPDATE_PDP_REQ:
+        case GTP_MSG_DELETE_PDP_REQ:
             gcr.seq_nr=seq_nr;
 
             gcrp=g_hash_table_lookup(gtp_info->unmatched, &gcr);
@@ -2712,52 +2712,52 @@ static gtp_msg_hash_t *gtp_match_response(tvbuff_t * tvb, packet_info * pinfo, p
                 gcrp = se_alloc(sizeof(gtp_msg_hash_t));
             }
             gcrp->seq_nr=seq_nr;
-           gcrp->req_frame = pinfo->fd->num;
-           gcrp->req_time = pinfo->fd->abs_ts;
-           gcrp->rep_frame = 0;
-           gcrp->msgtype = msgtype;
-           gcrp->is_request = TRUE;
-           g_hash_table_insert(gtp_info->unmatched, gcrp, gcrp);
+            gcrp->req_frame = pinfo->fd->num;
+            gcrp->req_time = pinfo->fd->abs_ts;
+            gcrp->rep_frame = 0;
+            gcrp->msgtype = msgtype;
+            gcrp->is_request = TRUE;
+            g_hash_table_insert(gtp_info->unmatched, gcrp, gcrp);
             return NULL;
-           break;
+            break;
         case GTP_MSG_ECHO_RESP:
-       case GTP_MSG_CREATE_PDP_RESP:
-       case GTP_MSG_UPDATE_PDP_RESP:
-       case GTP_MSG_DELETE_PDP_RESP:
+        case GTP_MSG_CREATE_PDP_RESP:
+        case GTP_MSG_UPDATE_PDP_RESP:
+        case GTP_MSG_DELETE_PDP_RESP:
             gcr.seq_nr=seq_nr;
             gcrp=g_hash_table_lookup(gtp_info->unmatched, &gcr);
 
             if (gcrp) {
-               if (!gcrp->rep_frame) {
+                if (!gcrp->rep_frame) {
                     g_hash_table_remove(gtp_info->unmatched, gcrp);
                     gcrp->rep_frame=pinfo->fd->num;
                     gcrp->is_request=FALSE;
-                    g_hash_table_insert(gtp_info->matched, gcrp, gcrp);                        
+                    g_hash_table_insert(gtp_info->matched, gcrp, gcrp);
                 }
             }
             break;
-       default:;
-       break;
+        default:;
+        break;
         }
     }
-    
+
     /* we have found a match */
     if (gcrp) {
-       proto_item *it;
+        proto_item *it;
 
 
-       if (gcrp->is_request) {
-           it = proto_tree_add_uint(tree, hf_gtp_response_in, tvb, 0, 0, gcrp->rep_frame);
-           PROTO_ITEM_SET_GENERATED(it);
-       } else {
-           nstime_t ns;
+        if (gcrp->is_request) {
+            it = proto_tree_add_uint(tree, hf_gtp_response_in, tvb, 0, 0, gcrp->rep_frame);
+            PROTO_ITEM_SET_GENERATED(it);
+        } else {
+            nstime_t ns;
 
-           it = proto_tree_add_uint(tree, hf_gtp_response_to, tvb, 0, 0, gcrp->req_frame);
-           PROTO_ITEM_SET_GENERATED(it);
-           nstime_delta(&ns, &pinfo->fd->abs_ts, &gcrp->req_time);
-           it = proto_tree_add_time(tree, hf_gtp_time, tvb, 0, 0, &ns);
-           PROTO_ITEM_SET_GENERATED(it);
-       }
+            it = proto_tree_add_uint(tree, hf_gtp_response_to, tvb, 0, 0, gcrp->req_frame);
+            PROTO_ITEM_SET_GENERATED(it);
+            nstime_delta(&ns, &pinfo->fd->abs_ts, &gcrp->req_time);
+            it = proto_tree_add_time(tree, hf_gtp_time, tvb, 0, 0, &ns);
+            PROTO_ITEM_SET_GENERATED(it);
+        }
     }
     return gcrp;
 }
@@ -2771,33 +2771,33 @@ static int check_field_presence(guint8 message, guint8 field, int *position)
 
     switch (gtp_version) {
     case 0:
-       mess_items = gprs_mess_items;
-       break;
+        mess_items = gprs_mess_items;
+        break;
     case 1:
-       mess_items = umts_mess_items;
-       break;
+        mess_items = umts_mess_items;
+        break;
     default:
-       return -2;
+        return -2;
     }
 
     while (mess_items[i].code) {
-       if (mess_items[i].code == message) {
-
-           while (mess_items[i].fields[*position].code) {
-               if (mess_items[i].fields[*position].code == field) {
-                   (*position)++;
-                   return 0;
-               } else {
-                   if (mess_items[i].fields[*position].presence == GTP_MANDATORY) {
-                       return mess_items[i].fields[(*position)++].code;
-                   } else {
-                       (*position)++;
-                   }
-               }
-           }
-           return -1;
-       }
-       i++;
+        if (mess_items[i].code == message) {
+
+            while (mess_items[i].fields[*position].code) {
+                if (mess_items[i].fields[*position].code == field) {
+                    (*position)++;
+                    return 0;
+                } else {
+                    if (mess_items[i].fields[*position].presence == GTP_MANDATORY) {
+                        return mess_items[i].fields[(*position)++].code;
+                    } else {
+                        (*position)++;
+                    }
+                }
+            }
+            return -1;
+        }
+        i++;
     }
 
     return -2;
@@ -2805,8 +2805,8 @@ static int check_field_presence(guint8 message, guint8 field, int *position)
 
 /* Decoders of fields in extension headers, each function returns no of bytes from field */
 
-/* GPRS:       9.60 v7.6.0, chapter
- * UMTS:       29.060 v4.0, chapter
+/* GPRS:        9.60 v7.6.0, chapter
+ * UMTS:        29.060 v4.0, chapter
  */
 static int decode_gtp_cause(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -2820,8 +2820,8 @@ static int decode_gtp_cause(tvbuff_t * tvb, int offset, packet_info * pinfo _U_,
     return 2;
 }
 
-/* GPRS:       9.60 v7.6.0, chapter 7.9.2
- * UMTS:       29.060 v4.0, chapter 7.7.2
+/* GPRS:        9.60 v7.6.0, chapter 7.9.2
+ * UMTS:        29.060 v4.0, chapter 7.7.2
  */
 static int decode_gtp_imsi(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -2837,8 +2837,8 @@ static int decode_gtp_imsi(tvbuff_t * tvb, int offset, packet_info * pinfo _U_,
     return 9;
 }
 
-/* GPRS:       9.60 v7.6.0, chapter 7.9.3
- * UMTS:       29.060 v4.0, chapter 7.7.3
+/* GPRS:        9.60 v7.6.0, chapter 7.9.3
+ * UMTS:        29.060 v4.0, chapter 7.7.3
  */
 static int decode_gtp_rai(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -2856,9 +2856,9 @@ static int decode_gtp_rai(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, p
     byte[2] = tvb_get_guint8(tvb, offset + 3);
     mcc = (byte[0] & 0x0F) * 100 + ((byte[0] & 0xF0) >> 4) * 10 + (byte[1] & 0x0F);
     if ((byte[1] & 0xF0) == 0xF0)
-       mnc = (byte[2] & 0x0F) * 10 + ((byte[2] & 0xF0) >> 4);
+        mnc = (byte[2] & 0x0F) * 10 + ((byte[2] & 0xF0) >> 4);
     else
-       mnc = (byte[2] & 0x0F) * 100 + ((byte[2] & 0xF0) >> 4) * 10 + ((byte[1] & 0xF0) >> 4);
+        mnc = (byte[2] & 0x0F) * 100 + ((byte[2] & 0xF0) >> 4) * 10 + ((byte[1] & 0xF0) >> 4);
 
     proto_tree_add_uint(ext_tree_rai, hf_gtp_rai_mcc, tvb, offset + 1, 2, mcc);
     proto_tree_add_uint(ext_tree_rai, hf_gtp_rai_mnc, tvb, offset + 2, 2, mnc);
@@ -2868,8 +2868,8 @@ static int decode_gtp_rai(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, p
     return 7;
 }
 
-/* GPRS:       9.60 v7.6.0, chapter 7.9.4, page 39
- * UMTS:       29.060 v4.0, chapter 7.7.4, page 47
+/* GPRS:        9.60 v7.6.0, chapter 7.9.4, page 39
+ * UMTS:        29.060 v4.0, chapter 7.7.4, page 47
  */
 static int decode_gtp_tlli(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -2882,8 +2882,8 @@ static int decode_gtp_tlli(tvbuff_t * tvb, int offset, packet_info * pinfo _U_,
     return 5;
 }
 
-/* GPRS:       9.60 v7.6.0, chapter 7.9.5, page 39
- * UMTS:       29.060 v4.0, chapter 7.7.5, page 47
+/* GPRS:        9.60 v7.6.0, chapter 7.9.5, page 39
+ * UMTS:        29.060 v4.0, chapter 7.7.5, page 47
  */
 static int decode_gtp_ptmsi(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -2915,28 +2915,28 @@ static int decode_qos_gprs(tvbuff_t * tvb, int offset, proto_tree * tree, const
     mean = tvb_get_guint8(tvb, offset + 2) & GTP_EXT_QOS_MEAN_MASK;
 
     te = proto_tree_add_text(tree, tvb, offset - adjust, 3 + adjust, "%s: delay: %u, reliability: %u, peak: %u, precedence: %u, mean: %u",
-                            qos_str, (delay >> 3) & 0x07, reliability, (peak >> 4) & 0x0F, precedence, mean);
+                             qos_str, (delay >> 3) & 0x07, reliability, (peak >> 4) & 0x0F, precedence, mean);
     ext_tree_qos = proto_item_add_subtree(te, ett_gtp_qos);
 
     if (adjust != 0) {
-       proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_spare1, tvb, offset, 1, spare1);
-       proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_delay, tvb, offset, 1, delay);
-       proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_reliability, tvb, offset, 1, reliability);
-       proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_peak, tvb, offset + 1, 1, peak);
-       proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_spare2, tvb, offset + 1, 1, spare2);
-       proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_precedence, tvb, offset + 1, 1, precedence);
-       proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_spare3, tvb, offset + 2, 1, spare3);
-       proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_mean, tvb, offset + 2, 1, mean);
+        proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_spare1, tvb, offset, 1, spare1);
+        proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_delay, tvb, offset, 1, delay);
+        proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_reliability, tvb, offset, 1, reliability);
+        proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_peak, tvb, offset + 1, 1, peak);
+        proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_spare2, tvb, offset + 1, 1, spare2);
+        proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_precedence, tvb, offset + 1, 1, precedence);
+        proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_spare3, tvb, offset + 2, 1, spare3);
+        proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_mean, tvb, offset + 2, 1, mean);
     }
 
     return 3;
 }
 
-/* GPRS:       9.60 v7.6.0, chapter 7.9.6, page 39
- *             4.08
- *             3.60
- * UMTS:       not present
- * TODO:       check if length is included: ETSI 4.08 vs 9.60
+/* GPRS:        9.60 v7.6.0, chapter 7.9.6, page 39
+ *              4.08
+ *              3.60
+ * UMTS:        not present
+ * TODO:        check if length is included: ETSI 4.08 vs 9.60
  */
 static int decode_gtp_qos_gprs(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -2945,8 +2945,8 @@ static int decode_gtp_qos_gprs(tvbuff_t * tvb, int offset, packet_info * pinfo _
 
 }
 
-/* GPRS:       9.60 v7.6.0, chapter 7.9.7, page 39
- * UMTS:       29.060 v4.0, chapter 7.7.6, page 47
+/* GPRS:        9.60 v7.6.0, chapter 7.9.7, page 39
+ * UMTS:        29.060 v4.0, chapter 7.7.6, page 47
  */
 static int decode_gtp_reorder(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -2959,9 +2959,9 @@ static int decode_gtp_reorder(tvbuff_t * tvb, int offset, packet_info * pinfo _U
     return 2;
 }
 
-/* GPRS:       9.60 v7.6.0, chapter 7.9.8, page 40
- *             4.08 v7.1.2, chapter 10.5.3.1+
- * UMTS:       29.060 v4.0, chapter 7.7.7
+/* GPRS:        9.60 v7.6.0, chapter 7.9.8, page 40
+ *              4.08 v7.1.2, chapter 10.5.3.1+
+ * UMTS:        29.060 v4.0, chapter 7.7.7
  * TODO: Add blurb support by registering items in the protocol registration
  */
 static int decode_gtp_auth_tri(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
@@ -2980,10 +2980,10 @@ static int decode_gtp_auth_tri(tvbuff_t * tvb, int offset, packet_info * pinfo _
     return 1 + 16 + 4 + 8;
 }
 
-/* GPRS:       9.60 v7.6.0, chapter 7.9.9, page 40
- *             9.02 v7.7.0, page 1090
- * UMTS:       29.060 v4.0, chapter 7.7.8, page 48
- *             29.002 v4.2.1, chapter 17.5, page 268
+/* GPRS:        9.60 v7.6.0, chapter 7.9.9, page 40
+ *              9.02 v7.7.0, page 1090
+ * UMTS:        29.060 v4.0, chapter 7.7.8, page 48
+ *              29.002 v4.2.1, chapter 17.5, page 268
  */
 static int decode_gtp_map_cause(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -2996,8 +2996,8 @@ static int decode_gtp_map_cause(tvbuff_t * tvb, int offset, packet_info * pinfo
     return 2;
 }
 
-/* GPRS:       9.60 v7.6.0, chapter 7.9.10, page 41
- * UMTS:       29.060 v4.0, chapter 7.7.9, page 48
+/* GPRS:        9.60 v7.6.0, chapter 7.9.10, page 41
+ * UMTS:        29.060 v4.0, chapter 7.7.9, page 48
  */
 static int decode_gtp_ptmsi_sig(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -3010,8 +3010,8 @@ static int decode_gtp_ptmsi_sig(tvbuff_t * tvb, int offset, packet_info * pinfo
     return 4;
 }
 
-/* GPRS:       9.60 v7.6.0, chapter 7.9.11, page 41
- * UMTS:       29.060 v4.0, chapter 7.7.10, page 49
+/* GPRS:        9.60 v7.6.0, chapter 7.9.11, page 41
+ * UMTS:        29.060 v4.0, chapter 7.7.10, page 49
  */
 static int decode_gtp_ms_valid(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -3024,8 +3024,8 @@ static int decode_gtp_ms_valid(tvbuff_t * tvb, int offset, packet_info * pinfo _
     return 2;
 }
 
-/* GPRS:       9.60 v7.6.0, chapter 7.9.12, page 41
- * UMTS:       29.060 v4.0, chapter 7.7.11, page 49
+/* GPRS:        9.60 v7.6.0, chapter 7.9.12, page 41
+ * UMTS:        29.060 v4.0, chapter 7.7.11, page 49
  */
 static int decode_gtp_recovery(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -3038,8 +3038,8 @@ static int decode_gtp_recovery(tvbuff_t * tvb, int offset, packet_info * pinfo _
     return 2;
 }
 
-/* GPRS:       9.60 v7.6.0, chapter 7.9.13, page 42
- * UMTS:       29.060 v4.0, chapter 7.7.12, page 49
+/* GPRS:        9.60 v7.6.0, chapter 7.9.13, page 42
+ * UMTS:        29.060 v4.0, chapter 7.7.12, page 49
  */
 
 
@@ -3061,8 +3061,8 @@ static int decode_gtp_sel_mode(tvbuff_t * tvb, int offset, packet_info * pinfo _
     return 2;
 }
 
-/* GPRS:       9.60 v7.6.0, chapter 7.9.14, page 42
- * UMTS:       29.060 v4.0, chapter 7.7.13, page 50
+/* GPRS:        9.60 v7.6.0, chapter 7.9.14, page 42
+ * UMTS:        29.060 v4.0, chapter 7.7.13, page 50
  */
 static int decode_gtp_16(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -3072,24 +3072,24 @@ static int decode_gtp_16(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, pr
 
     switch (gtp_version) {
     case 0:
-       ext_flow_label = tvb_get_ntohs(tvb, offset + 1);
-       proto_tree_add_uint(tree, hf_gtp_ext_flow_label, tvb, offset, 3, ext_flow_label);
+        ext_flow_label = tvb_get_ntohs(tvb, offset + 1);
+        proto_tree_add_uint(tree, hf_gtp_ext_flow_label, tvb, offset, 3, ext_flow_label);
 
-       return 3;
+        return 3;
     case 1:
-       teid_data = tvb_get_ntohl(tvb, offset + 1);
-       proto_tree_add_uint(tree, hf_gtp_teid_data, tvb, offset, 5, teid_data);
+        teid_data = tvb_get_ntohl(tvb, offset + 1);
+        proto_tree_add_uint(tree, hf_gtp_teid_data, tvb, offset, 5, teid_data);
 
-       return 5;
+        return 5;
     default:
-       proto_tree_add_text(tree, tvb, offset, 1, "Flow label/TEID Data I : GTP version not supported");
+        proto_tree_add_text(tree, tvb, offset, 1, "Flow label/TEID Data I : GTP version not supported");
 
-       return 3;
+        return 3;
     }
 }
 
-/* GPRS:       9.60 v7.6.0, chapter 7.9.15, page 42
- * UMTS:       29.060 v4.0, chapter 7.7.14, page 42
+/* GPRS:        9.60 v7.6.0, chapter 7.9.15, page 42
+ * UMTS:        29.060 v4.0, chapter 7.7.14, page 42
  */
 static int decode_gtp_17(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -3099,21 +3099,21 @@ static int decode_gtp_17(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, pr
 
     switch (gtp_version) {
     case 0:
-       flow_sig = tvb_get_ntohs(tvb, offset + 1);
-       proto_tree_add_uint(tree, hf_gtp_flow_sig, tvb, offset, 3, flow_sig);
-       return 3;
+        flow_sig = tvb_get_ntohs(tvb, offset + 1);
+        proto_tree_add_uint(tree, hf_gtp_flow_sig, tvb, offset, 3, flow_sig);
+        return 3;
     case 1:
-       teid_cp = tvb_get_ntohl(tvb, offset + 1);
-       proto_tree_add_uint(tree, hf_gtp_teid_cp, tvb, offset, 5, teid_cp);
-       return 5;
+        teid_cp = tvb_get_ntohl(tvb, offset + 1);
+        proto_tree_add_uint(tree, hf_gtp_teid_cp, tvb, offset, 5, teid_cp);
+        return 5;
     default:
-       proto_tree_add_text(tree, tvb, offset, 1, "Flow label signalling/TEID control plane : GTP version not supported");
-       return 3;
+        proto_tree_add_text(tree, tvb, offset, 1, "Flow label signalling/TEID control plane : GTP version not supported");
+        return 3;
     }
 }
 
-/* GPRS:       9.60 v7.6.0, chapter 7.9.16, page 42
- * UMTS:       29.060 v4.0, chapter 7.7.15, page 51
+/* GPRS:        9.60 v7.6.0, chapter 7.9.16, page 42
+ * UMTS:        29.060 v4.0, chapter 7.7.15, page 51
  */
 static int decode_gtp_18(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -3125,35 +3125,35 @@ static int decode_gtp_18(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, pr
 
     switch (gtp_version) {
     case 0:
-       te = proto_tree_add_text(tree, tvb, offset, 4, "%s", val_to_str(GTP_EXT_FLOW_II, gtp_val, "Unknown message"));
-       ext_tree_flow_ii = proto_item_add_subtree(te, ett_gtp_flow_ii);
+        te = proto_tree_add_text(tree, tvb, offset, 4, "%s", val_to_str(GTP_EXT_FLOW_II, gtp_val, "Unknown message"));
+        ext_tree_flow_ii = proto_item_add_subtree(te, ett_gtp_flow_ii);
 
-       proto_tree_add_uint(ext_tree_flow_ii, hf_gtp_nsapi, tvb, offset + 1, 1, tvb_get_guint8(tvb, offset + 1) & 0x0F);
+        proto_tree_add_uint(ext_tree_flow_ii, hf_gtp_nsapi, tvb, offset + 1, 1, tvb_get_guint8(tvb, offset + 1) & 0x0F);
 
-       flow_ii = tvb_get_ntohs(tvb, offset + 2);
-       proto_tree_add_uint(ext_tree_flow_ii, hf_gtp_flow_ii, tvb, offset + 2, 2, flow_ii);
+        flow_ii = tvb_get_ntohs(tvb, offset + 2);
+        proto_tree_add_uint(ext_tree_flow_ii, hf_gtp_flow_ii, tvb, offset + 2, 2, flow_ii);
 
-       return 4;
+        return 4;
     case 1:
-       te = proto_tree_add_text(tree, tvb, offset, 6, "%s", val_to_str(GTP_EXT_TEID_II, gtpv1_val, "Unknown message"));
-       ext_tree_flow_ii = proto_item_add_subtree(te, ett_gtp_flow_ii);
+        te = proto_tree_add_text(tree, tvb, offset, 6, "%s", val_to_str(GTP_EXT_TEID_II, gtpv1_val, "Unknown message"));
+        ext_tree_flow_ii = proto_item_add_subtree(te, ett_gtp_flow_ii);
 
-       proto_tree_add_uint(ext_tree_flow_ii, hf_gtp_nsapi, tvb, offset + 1, 1, tvb_get_guint8(tvb, offset + 1) & 0x0F);
+        proto_tree_add_uint(ext_tree_flow_ii, hf_gtp_nsapi, tvb, offset + 1, 1, tvb_get_guint8(tvb, offset + 1) & 0x0F);
 
 
-       teid_ii = tvb_get_ntohl(tvb, offset + 2);
-       proto_tree_add_uint(ext_tree_flow_ii, hf_gtp_teid_ii, tvb, offset + 2, 4, teid_ii);
+        teid_ii = tvb_get_ntohl(tvb, offset + 2);
+        proto_tree_add_uint(ext_tree_flow_ii, hf_gtp_teid_ii, tvb, offset + 2, 4, teid_ii);
 
-       return 6;
+        return 6;
     default:
-       proto_tree_add_text(tree, tvb, offset, 1, "Flow data II/TEID Data II : GTP Version not supported");
+        proto_tree_add_text(tree, tvb, offset, 1, "Flow data II/TEID Data II : GTP Version not supported");
 
-       return 4;
+        return 4;
     }
 }
 
-/* GPRS:       9.60 v7.6.0, chapter 7.9.16A, page 43
- * UMTS:       29.060 v4.0, chapter 7.7.16, page 51
+/* GPRS:        9.60 v7.6.0, chapter 7.9.16A, page 43
+ * UMTS:        29.060 v4.0, chapter 7.7.16, page 51
  * Check if all ms_reason types are included
  */
 static int decode_gtp_19(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
@@ -3165,21 +3165,21 @@ static int decode_gtp_19(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, pr
 
     switch (gtp_version) {
     case 0:
-       proto_tree_add_uint(tree, hf_gtp_ms_reason, tvb, offset, 2, field19);
-       break;
+        proto_tree_add_uint(tree, hf_gtp_ms_reason, tvb, offset, 2, field19);
+        break;
     case 1:
-       proto_tree_add_boolean(tree, hf_gtp_tear_ind, tvb, offset, 2, field19 & 0x01);
-       break;
+        proto_tree_add_boolean(tree, hf_gtp_tear_ind, tvb, offset, 2, field19 & 0x01);
+        break;
     default:
-       proto_tree_add_text(tree, tvb, offset, 1, "Information Element Type = 19 : GTP Version not supported");
-       break;
+        proto_tree_add_text(tree, tvb, offset, 1, "Information Element Type = 19 : GTP Version not supported");
+        break;
     }
 
     return 2;
 }
 
-/* GPRS:       not present
- * UMTS:       29.060 v4.0, chapter 7.7.17, page 51
+/* GPRS:        not present
+ * UMTS:        29.060 v4.0, chapter 7.7.17, page 51
  */
 static int decode_gtp_nsapi(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -3192,8 +3192,8 @@ static int decode_gtp_nsapi(tvbuff_t * tvb, int offset, packet_info * pinfo _U_,
     return 2;
 }
 
-/* GPRS:       not present
- * UMTS:       29.060 v4.0, chapter 7.7.18, page 52
+/* GPRS:        not present
+ * UMTS:        29.060 v4.0, chapter 7.7.18, page 52
  */
 static int decode_gtp_ranap_cause(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -3203,46 +3203,46 @@ static int decode_gtp_ranap_cause(tvbuff_t * tvb, int offset, packet_info * pinf
     ranap = tvb_get_guint8(tvb, offset + 1);
 
     if (ranap > 0 && ranap <= 64)
-       proto_tree_add_uint_format(tree, hf_gtp_ranap_cause, tvb, offset, 2,
-                                  ranap, "%s (Radio Network Layer Cause) : %s (%u)",
-                                  val_to_str(GTP_EXT_RANAP_CAUSE, gtp_val, "Unknown"),
-                                  val_to_str(ranap, ranap_cause_type, "Unknown RANAP Cause"), ranap);
+        proto_tree_add_uint_format(tree, hf_gtp_ranap_cause, tvb, offset, 2,
+                                   ranap, "%s (Radio Network Layer Cause) : %s (%u)",
+                                   val_to_str(GTP_EXT_RANAP_CAUSE, gtp_val, "Unknown"),
+                                   val_to_str(ranap, ranap_cause_type, "Unknown RANAP Cause"), ranap);
 
     if (ranap > 64 && ranap <= 80)
-       proto_tree_add_uint_format(tree, hf_gtp_ranap_cause, tvb, offset, 2,
-                                  ranap, "%s (Transport Layer Cause) : %s (%u)",
-                                  val_to_str(GTP_EXT_RANAP_CAUSE, gtp_val, "Unknown"),
-                                  val_to_str(ranap, ranap_cause_type, "Unknown RANAP Cause"), ranap);
+        proto_tree_add_uint_format(tree, hf_gtp_ranap_cause, tvb, offset, 2,
+                                   ranap, "%s (Transport Layer Cause) : %s (%u)",
+                                   val_to_str(GTP_EXT_RANAP_CAUSE, gtp_val, "Unknown"),
+                                   val_to_str(ranap, ranap_cause_type, "Unknown RANAP Cause"), ranap);
 
     if (ranap > 80 && ranap <= 96)
-       proto_tree_add_uint_format(tree, hf_gtp_ranap_cause, tvb, offset, 2,
-                                  ranap, "%s (NAS Cause) : %s (%u)",
-                                  val_to_str(GTP_EXT_RANAP_CAUSE, gtp_val, "Unknown"),
-                                  val_to_str(ranap, ranap_cause_type, "Unknown RANAP Cause"), ranap);
+        proto_tree_add_uint_format(tree, hf_gtp_ranap_cause, tvb, offset, 2,
+                                   ranap, "%s (NAS Cause) : %s (%u)",
+                                   val_to_str(GTP_EXT_RANAP_CAUSE, gtp_val, "Unknown"),
+                                   val_to_str(ranap, ranap_cause_type, "Unknown RANAP Cause"), ranap);
 
     if (ranap > 96 && ranap <= 112)
-       proto_tree_add_uint_format(tree, hf_gtp_ranap_cause, tvb, offset, 2, ranap,
-                                  "%s (Protocol Cause) : %s (%u)",
-                                  val_to_str(GTP_EXT_RANAP_CAUSE, gtp_val, "Unknown"),
-                                  val_to_str(ranap, ranap_cause_type, "Unknown RANAP Cause"), ranap);
+        proto_tree_add_uint_format(tree, hf_gtp_ranap_cause, tvb, offset, 2, ranap,
+                                   "%s (Protocol Cause) : %s (%u)",
+                                   val_to_str(GTP_EXT_RANAP_CAUSE, gtp_val, "Unknown"),
+                                   val_to_str(ranap, ranap_cause_type, "Unknown RANAP Cause"), ranap);
 
     if (ranap > 112 && ranap <= 128)
-       proto_tree_add_uint_format(tree, hf_gtp_ranap_cause, tvb, offset, 2, ranap,
-                                  "%s (Miscellaneous Cause) : %s (%u)",
-                                  val_to_str(GTP_EXT_RANAP_CAUSE, gtp_val, "Unknown"),
-                                  val_to_str(ranap, ranap_cause_type, "Unknown RANAP Cause"), ranap);
+        proto_tree_add_uint_format(tree, hf_gtp_ranap_cause, tvb, offset, 2, ranap,
+                                   "%s (Miscellaneous Cause) : %s (%u)",
+                                   val_to_str(GTP_EXT_RANAP_CAUSE, gtp_val, "Unknown"),
+                                   val_to_str(ranap, ranap_cause_type, "Unknown RANAP Cause"), ranap);
 
     if (ranap > 128 /* && ranap <=255 */ )
-       proto_tree_add_uint_format(tree, hf_gtp_ranap_cause, tvb, offset, 2, ranap,
-                                  "%s (Non-standard Cause) : %s (%u)",
-                                  val_to_str(GTP_EXT_RANAP_CAUSE, gtp_val, "Unknown"),
-                                  val_to_str(ranap, ranap_cause_type, "Unknown RANAP Cause"), ranap);
+        proto_tree_add_uint_format(tree, hf_gtp_ranap_cause, tvb, offset, 2, ranap,
+                                   "%s (Non-standard Cause) : %s (%u)",
+                                   val_to_str(GTP_EXT_RANAP_CAUSE, gtp_val, "Unknown"),
+                                   val_to_str(ranap, ranap_cause_type, "Unknown RANAP Cause"), ranap);
 
     return 2;
 }
 
-/* GPRS:       not present
- * UMTS:       29.060 v4.0, chapter 7.7.19, page 52
+/* GPRS:        not present
+ * UMTS:        29.060 v4.0, chapter 7.7.19, page 52
  */
 static int decode_gtp_rab_cntxt(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -3266,8 +3266,8 @@ static int decode_gtp_rab_cntxt(tvbuff_t * tvb, int offset, packet_info * pinfo
 }
 
 
-/* GPRS:       not present
- * UMTS:       29.060 v4.0, chapter 7.7.20, page 53
+/* GPRS:        not present
+ * UMTS:        29.060 v4.0, chapter 7.7.20, page 53
  */
 static int decode_gtp_rp_sms(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -3280,8 +3280,8 @@ static int decode_gtp_rp_sms(tvbuff_t * tvb, int offset, packet_info * pinfo _U_
     return 2;
 }
 
-/* GPRS:       not present
- * UMTS:       29.060 v4.0, chapter 7.7.21, page 53
+/* GPRS:        not present
+ * UMTS:        29.060 v4.0, chapter 7.7.21, page 53
  */
 static int decode_gtp_rp(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -3304,8 +3304,8 @@ static int decode_gtp_rp(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, pr
     return 2;
 }
 
-/* GPRS:       not present
- * UMTS:       29.060 v4.0, chapter 7.7.22, page 53
+/* GPRS:        not present
+ * UMTS:        29.060 v4.0, chapter 7.7.22, page 53
  */
 static int decode_gtp_pkt_flow_id(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -3322,13 +3322,13 @@ static int decode_gtp_pkt_flow_id(tvbuff_t * tvb, int offset, packet_info * pinf
 
     proto_tree_add_uint(ext_tree_pkt_flow_id, hf_gtp_nsapi, tvb, offset + 1, 1, nsapi);
     proto_tree_add_uint_format(ext_tree_pkt_flow_id, hf_gtp_pkt_flow_id, tvb,
-                              offset + 2, 1, pkt_flow_id, "%s : %u", val_to_str(GTP_EXT_PKT_FLOW_ID, gtp_val, "Unknown message"), pkt_flow_id);
+                               offset + 2, 1, pkt_flow_id, "%s : %u", val_to_str(GTP_EXT_PKT_FLOW_ID, gtp_val, "Unknown message"), pkt_flow_id);
 
     return 3;
 }
 
-/* GPRS:       not present
- * UMTS:       29.060 v4.0, chapter 7.7.23, page 53
+/* GPRS:        not present
+ * UMTS:        29.060 v4.0, chapter 7.7.23, page 53
  * TODO: Differenciate these uints?
  */
 static int decode_gtp_chrg_char(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
@@ -3354,8 +3354,8 @@ static int decode_gtp_chrg_char(tvbuff_t * tvb, int offset, packet_info * pinfo
     return 3;
 }
 
-/* GPRS:       not present
- * UMTS:       29.060 v4.0, chapter 7.7.24, page
+/* GPRS:        not present
+ * UMTS:        29.060 v4.0, chapter 7.7.24, page
  */
 static int decode_gtp_trace_ref(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -3369,8 +3369,8 @@ static int decode_gtp_trace_ref(tvbuff_t * tvb, int offset, packet_info * pinfo
     return 3;
 }
 
-/* GPRS:       not present
- * UMTS:       29.060 v4.0, chapter 7.7.25, page
+/* GPRS:        not present
+ * UMTS:        29.060 v4.0, chapter 7.7.25, page
  */
 static int decode_gtp_trace_type(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -3384,8 +3384,8 @@ static int decode_gtp_trace_type(tvbuff_t * tvb, int offset, packet_info * pinfo
     return 3;
 }
 
-/* GPRS:       9.60 v7.6.0, chapter 7.9.16A
- * UMTS:       29.060 v4.0, chapter 7.7.25A, page
+/* GPRS:        9.60 v7.6.0, chapter 7.9.16A
+ * UMTS:        29.060 v4.0, chapter 7.7.25A, page
  */
 static int decode_gtp_ms_reason(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -3399,8 +3399,8 @@ static int decode_gtp_ms_reason(tvbuff_t * tvb, int offset, packet_info * pinfo
     return 2;
 }
 
-/* GPRS:       ?
- * UMTS:       29.060 v6.11.0, chapter 7.7.25B
+/* GPRS:        ?
+ * UMTS:        29.060 v6.11.0, chapter 7.7.25B
  * Radio Priority LCS
  */
 static int decode_gtp_ra_prio_lcs(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
@@ -3424,8 +3424,8 @@ static int decode_gtp_ra_prio_lcs(tvbuff_t * tvb, int offset, packet_info * pinf
 
 }
 
-/* GPRS:       12.15 v7.6.0, chapter 7.3.3, page 45
- * UMTS:       33.015
+/* GPRS:        12.15 v7.6.0, chapter 7.3.3, page 45
+ * UMTS:        33.015
  */
 static int decode_gtp_tr_comm(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -3439,8 +3439,8 @@ static int decode_gtp_tr_comm(tvbuff_t * tvb, int offset, packet_info * pinfo _U
     return 2;
 }
 
-/* GPRS:       9.60 v7.6.0, chapter 7.9.17, page 43
- * UMTS:       29.060 v4.0, chapter 7.7.26, page 55
+/* GPRS:        9.60 v7.6.0, chapter 7.9.17, page 43
+ * UMTS:        29.060 v4.0, chapter 7.7.26, page 55
  */
 static int decode_gtp_chrg_id(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -3453,8 +3453,8 @@ static int decode_gtp_chrg_id(tvbuff_t * tvb, int offset, packet_info * pinfo _U
     return 5;
 }
 
-/* GPRS:       9.60 v7.6.0, chapter 7.9.18, page 43
- * UMTS:       29.060 v4.0, chapter 7.7.27, page 55
+/* GPRS:        9.60 v7.6.0, chapter 7.9.18, page 43
+ * UMTS:        29.060 v4.0, chapter 7.7.27, page 55
  */
 static int decode_gtp_user_addr(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -3472,8 +3472,8 @@ static int decode_gtp_user_addr(tvbuff_t * tvb, int offset, packet_info * pinfo
     pdp_typ = tvb_get_guint8(tvb, offset + 4);
 
     te = proto_tree_add_text(tree, tvb, offset, 3 + length, "%s (%s/%s)",
-                            val_to_str(GTP_EXT_USER_ADDR, gtp_val, "Unknown message"),
-                            val_to_str(pdp_org, pdp_org_type, "Unknown PDP Organization"), val_to_str(pdp_typ, pdp_type, "Unknown PDP Type"));
+                             val_to_str(GTP_EXT_USER_ADDR, gtp_val, "Unknown message"),
+                             val_to_str(pdp_org, pdp_org_type, "Unknown PDP Organization"), val_to_str(pdp_typ, pdp_type, "Unknown PDP Type"));
     ext_tree_user = proto_item_add_subtree(te, ett_gtp_user);
 
     proto_tree_add_text(ext_tree_user, tvb, offset + 1, 2, "Length : %u", length);
@@ -3481,25 +3481,25 @@ static int decode_gtp_user_addr(tvbuff_t * tvb, int offset, packet_info * pinfo
     proto_tree_add_uint(ext_tree_user, hf_gtp_user_addr_pdp_type, tvb, offset + 4, 1, pdp_typ);
 
     if (length == 2) {
-       if (pdp_org == 0 && pdp_typ == 1)
-           proto_item_append_text(te, " (Point to Point Protocol)");
-       else if (pdp_typ == 2)
-           proto_item_append_text(te, " (Octet Stream Protocol)");
+        if (pdp_org == 0 && pdp_typ == 1)
+            proto_item_append_text(te, " (Point to Point Protocol)");
+        else if (pdp_typ == 2)
+            proto_item_append_text(te, " (Octet Stream Protocol)");
     } else if (length > 2) {
-       switch (pdp_typ) {
-       case 0x21:
-           addr_ipv4 = tvb_get_ipv4(tvb, offset + 5);
-           proto_tree_add_ipv4(ext_tree_user, hf_gtp_user_ipv4, tvb, offset + 5, 4, addr_ipv4);
-           proto_item_append_text(te, " : %s", ip_to_str((guint8 *) & addr_ipv4));
-           break;
-       case 0x57:
-           tvb_get_ipv6(tvb, offset + 5, &addr_ipv6);
-           proto_tree_add_ipv6(ext_tree_user, hf_gtp_user_ipv6, tvb, offset + 5, 16, (guint8 *) & addr_ipv6);
-           proto_item_append_text(te, " : %s", ip6_to_str((struct e_in6_addr *) &addr_ipv6));
-           break;
-       }
+        switch (pdp_typ) {
+        case 0x21:
+            addr_ipv4 = tvb_get_ipv4(tvb, offset + 5);
+            proto_tree_add_ipv4(ext_tree_user, hf_gtp_user_ipv4, tvb, offset + 5, 4, addr_ipv4);
+            proto_item_append_text(te, " : %s", ip_to_str((guint8 *) & addr_ipv4));
+            break;
+        case 0x57:
+            tvb_get_ipv6(tvb, offset + 5, &addr_ipv6);
+            proto_tree_add_ipv6(ext_tree_user, hf_gtp_user_ipv6, tvb, offset + 5, 16, (guint8 *) & addr_ipv6);
+            proto_item_append_text(te, " : %s", ip6_to_str((struct e_in6_addr *) &addr_ipv6));
+            break;
+        }
     } else
-       proto_item_append_text(te, " : empty PDP Address");
+        proto_item_append_text(te, " : empty PDP Address");
 
     return 3 + length;
 }
@@ -3512,12 +3512,12 @@ static int decode_triplet(tvbuff_t * tvb, int offset, proto_tree * tree, guint16
     guint16 i;
 
     for (i = 0; i < count; i++) {
-       te_trip = proto_tree_add_text(tree, tvb, offset + i * 28, 28, "Triplet no%x", i);
-       ext_tree_trip = proto_item_add_subtree(te_trip, ett_gtp_trip);
+        te_trip = proto_tree_add_text(tree, tvb, offset + i * 28, 28, "Triplet no%x", i);
+        ext_tree_trip = proto_item_add_subtree(te_trip, ett_gtp_trip);
 
-       proto_tree_add_text(ext_tree_trip, tvb, offset + i * 28, 16, "RAND: %s", tvb_bytes_to_str(tvb, offset + i * 28, 16));
-       proto_tree_add_text(ext_tree_trip, tvb, offset + i * 28 + 16, 4, "SRES: %s", tvb_bytes_to_str(tvb, offset + i * 28 + 16, 4));
-       proto_tree_add_text(ext_tree_trip, tvb, offset + i * 28 + 20, 8, "Kc: %s", tvb_bytes_to_str(tvb, offset + i * 28 + 20, 8));
+        proto_tree_add_text(ext_tree_trip, tvb, offset + i * 28, 16, "RAND: %s", tvb_bytes_to_str(tvb, offset + i * 28, 16));
+        proto_tree_add_text(ext_tree_trip, tvb, offset + i * 28 + 16, 4, "SRES: %s", tvb_bytes_to_str(tvb, offset + i * 28 + 16, 4));
+        proto_tree_add_text(ext_tree_trip, tvb, offset + i * 28 + 20, 8, "Kc: %s", tvb_bytes_to_str(tvb, offset + i * 28 + 20, 8));
     }
 
     return count * 28;
@@ -3537,38 +3537,38 @@ static int decode_quintuplet(tvbuff_t * tvb, int offset, proto_tree * tree, guin
 
     for (i = 0; i < count; i++) {
 
-       te_quint = proto_tree_add_text(tree, tvb, offset, -1, "Quintuplet #%x", i + 1);
-       ext_tree_quint = proto_item_add_subtree(te_quint, ett_gtp_quint);
-
-
-       proto_tree_add_text(ext_tree_quint, tvb, offset + q_offset, 16, "RAND: %s", tvb_bytes_to_str(tvb, offset, 16));
-       q_offset = q_offset + 16;
-       xres_len = tvb_get_guint8(tvb, offset + q_offset);
-       proto_tree_add_text(ext_tree_quint, tvb, offset + q_offset, 1, "XRES length: %u", xres_len);
-       q_offset++;
-       proto_tree_add_text(ext_tree_quint, tvb, offset + q_offset, xres_len, "XRES: %s", tvb_bytes_to_str(tvb, offset + q_offset, xres_len));
-       q_offset = q_offset + xres_len;
-       proto_tree_add_text(ext_tree_quint, tvb, offset + q_offset, 16, "Quintuplet Ciphering Key: %s", tvb_bytes_to_str(tvb, offset + q_offset, 16));
-       q_offset = q_offset + 16;
-       proto_tree_add_text(ext_tree_quint, tvb, offset + q_offset, 16, "Quintuplet Integrity Key: %s", tvb_bytes_to_str(tvb, offset + q_offset, 16));
-       q_offset = q_offset + 16;
-       auth_len = tvb_get_guint8(tvb, offset + q_offset);
-       proto_tree_add_text(ext_tree_quint, tvb, offset + q_offset, 1, "Authentication length: %u", auth_len);
-       q_offset++;
-       proto_tree_add_text(ext_tree_quint, tvb, offset + q_offset, auth_len, "AUTH: %s", tvb_bytes_to_str(tvb, offset + q_offset, auth_len));
-
-       q_offset = q_offset + auth_len;
-       proto_item_set_end(te_quint, tvb, offset + q_offset);
+        te_quint = proto_tree_add_text(tree, tvb, offset, -1, "Quintuplet #%x", i + 1);
+        ext_tree_quint = proto_item_add_subtree(te_quint, ett_gtp_quint);
+
+
+        proto_tree_add_text(ext_tree_quint, tvb, offset + q_offset, 16, "RAND: %s", tvb_bytes_to_str(tvb, offset, 16));
+        q_offset = q_offset + 16;
+        xres_len = tvb_get_guint8(tvb, offset + q_offset);
+        proto_tree_add_text(ext_tree_quint, tvb, offset + q_offset, 1, "XRES length: %u", xres_len);
+        q_offset++;
+        proto_tree_add_text(ext_tree_quint, tvb, offset + q_offset, xres_len, "XRES: %s", tvb_bytes_to_str(tvb, offset + q_offset, xres_len));
+        q_offset = q_offset + xres_len;
+        proto_tree_add_text(ext_tree_quint, tvb, offset + q_offset, 16, "Quintuplet Ciphering Key: %s", tvb_bytes_to_str(tvb, offset + q_offset, 16));
+        q_offset = q_offset + 16;
+        proto_tree_add_text(ext_tree_quint, tvb, offset + q_offset, 16, "Quintuplet Integrity Key: %s", tvb_bytes_to_str(tvb, offset + q_offset, 16));
+        q_offset = q_offset + 16;
+        auth_len = tvb_get_guint8(tvb, offset + q_offset);
+        proto_tree_add_text(ext_tree_quint, tvb, offset + q_offset, 1, "Authentication length: %u", auth_len);
+        q_offset++;
+        proto_tree_add_text(ext_tree_quint, tvb, offset + q_offset, auth_len, "AUTH: %s", tvb_bytes_to_str(tvb, offset + q_offset, auth_len));
+
+        q_offset = q_offset + auth_len;
+        proto_item_set_end(te_quint, tvb, offset + q_offset);
 
     }
 
     return q_offset;
 }
 
-/* GPRS:       9.60 v7.6.0, chapter 7.9.19 page
- * UMTS:       29.060 v4.0, chapter 7.7.28 page 57
- * TODO:       - check if for quintuplets first 2 bytes are length, according to AuthQuint
- *             - finish displaying last 3 parameters
+/* GPRS:        9.60 v7.6.0, chapter 7.9.19 page
+ * UMTS:        29.060 v4.0, chapter 7.7.28 page 57
+ * TODO:        - check if for quintuplets first 2 bytes are length, according to AuthQuint
+ *              - finish displaying last 3 parameters
  */
 static int decode_gtp_mm_cntxt(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -3588,7 +3588,7 @@ static int decode_gtp_mm_cntxt(tvbuff_t * tvb, int offset, packet_info * pinfo _
     /* Octet 2 - 3 */
     length = tvb_get_ntohs(tvb, offset + 1);
     if (length < 1)
-       return 3;
+        return 3;
 
     /* Octet 4 */
     cksn = tvb_get_guint8(tvb, offset + 3) & 0x07;
@@ -3598,62 +3598,62 @@ static int decode_gtp_mm_cntxt(tvbuff_t * tvb, int offset, packet_info * pinfo _
 
     proto_tree_add_text(ext_tree_mm, tvb, offset + 1, 2, "Length: %x", length);
     if (gtp_version == 0)
-       sec_mode = 1;
+        sec_mode = 1;
 
 
     switch (sec_mode) {
-    case 0:                    /* Used cipher value, UMTS keys and Quintuplets */
-       proto_tree_add_item(ext_tree_mm, hf_gtp_cksn_ksi, tvb, offset + 3, 1, FALSE);
-       proto_tree_add_item(ext_tree_mm, hf_gtp_security_mode, tvb, offset + 4, 1, FALSE);
-       proto_tree_add_item(ext_tree_mm, hf_gtp_no_of_vectors, tvb, offset + 4, 1, FALSE);
-       proto_tree_add_item(ext_tree_mm, hf_gtp_cipher_algorithm, tvb, offset + 4, 1, FALSE);
-       proto_tree_add_text(ext_tree_mm, tvb, offset + 5, 16, "Ciphering key CK: %s", tvb_bytes_to_str(tvb, offset + 5, 16));
-       proto_tree_add_text(ext_tree_mm, tvb, offset + 21, 16, "Integrity key IK: %s", tvb_bytes_to_str(tvb, offset + 21, 16));
-       quint_len = tvb_get_ntohs(tvb, offset + 37);
-       proto_tree_add_text(ext_tree_mm, tvb, offset + 37, 2, "Quintuplets length: 0x%x (%u)", quint_len, quint_len);
-
-       offset = offset + decode_quintuplet(tvb, offset + 39, ext_tree_mm, count) + 39;
-
-
-       break;
-    case 1:                    /* GSM key and triplets */
-       proto_tree_add_item(ext_tree_mm, hf_gtp_cksn, tvb, offset + 3, 1, FALSE);
-       if (gtp_version != 0)
-           proto_tree_add_item(ext_tree_mm, hf_gtp_security_mode, tvb, offset + 4, 1, FALSE);
-
-       proto_tree_add_item(ext_tree_mm, hf_gtp_no_of_vectors, tvb, offset + 4, 1, FALSE);
-       proto_tree_add_item(ext_tree_mm, hf_gtp_cipher_algorithm, tvb, offset + 4, 1, FALSE);
-       proto_tree_add_text(ext_tree_mm, tvb, offset + 5, 8, "Ciphering key Kc: %s", tvb_bytes_to_str(tvb, offset + 5, 8));
-
-       offset = offset + decode_triplet(tvb, offset + 13, ext_tree_mm, count) + 13;
-
-       break;
-    case 2:                    /* UMTS key and quintuplets */
-       proto_tree_add_item(ext_tree_mm, hf_gtp_ksi, tvb, offset + 3, 1, FALSE);
-       proto_tree_add_item(ext_tree_mm, hf_gtp_security_mode, tvb, offset + 4, 1, FALSE);
-       proto_tree_add_item(ext_tree_mm, hf_gtp_no_of_vectors, tvb, offset + 4, 1, FALSE);
-       proto_tree_add_text(ext_tree_mm, tvb, offset + 5, 16, "Ciphering key CK: %s", tvb_bytes_to_str(tvb, offset + 5, 16));
-       proto_tree_add_text(ext_tree_mm, tvb, offset + 21, 16, "Integrity key IK: %s", tvb_bytes_to_str(tvb, offset + 21, 16));
-       quint_len = tvb_get_ntohs(tvb, offset + 37);
-       proto_tree_add_text(ext_tree_mm, tvb, offset + 37, 2, "Quintuplets length: 0x%x (%u)", quint_len, quint_len);
-
-       offset = offset + decode_quintuplet(tvb, offset + 39, ext_tree_mm, count) + 39;
-
-       break;
-    case 3:                    /* GSM key and quintuplets */
-       proto_tree_add_item(ext_tree_mm, hf_gtp_cksn, tvb, offset + 3, 1, FALSE);
-       proto_tree_add_item(ext_tree_mm, hf_gtp_security_mode, tvb, offset + 4, 1, FALSE);
-       proto_tree_add_item(ext_tree_mm, hf_gtp_no_of_vectors, tvb, offset + 4, 1, FALSE);
-       proto_tree_add_item(ext_tree_mm, hf_gtp_cipher_algorithm, tvb, offset + 4, 1, FALSE);
-       proto_tree_add_text(ext_tree_mm, tvb, offset + 5, 8, "Ciphering key Kc: %s", tvb_bytes_to_str(tvb, offset + 5, 8));
-       quint_len = tvb_get_ntohs(tvb, offset + 13);
-       proto_tree_add_text(ext_tree_mm, tvb, offset + 13, 2, "Quintuplets length: 0x%x (%u)", quint_len, quint_len);
-
-       offset = offset + decode_quintuplet(tvb, offset + 15, ext_tree_mm, count) + 15;
-
-       break;
+    case 0:                     /* Used cipher value, UMTS keys and Quintuplets */
+        proto_tree_add_item(ext_tree_mm, hf_gtp_cksn_ksi, tvb, offset + 3, 1, FALSE);
+        proto_tree_add_item(ext_tree_mm, hf_gtp_security_mode, tvb, offset + 4, 1, FALSE);
+        proto_tree_add_item(ext_tree_mm, hf_gtp_no_of_vectors, tvb, offset + 4, 1, FALSE);
+        proto_tree_add_item(ext_tree_mm, hf_gtp_cipher_algorithm, tvb, offset + 4, 1, FALSE);
+        proto_tree_add_text(ext_tree_mm, tvb, offset + 5, 16, "Ciphering key CK: %s", tvb_bytes_to_str(tvb, offset + 5, 16));
+        proto_tree_add_text(ext_tree_mm, tvb, offset + 21, 16, "Integrity key IK: %s", tvb_bytes_to_str(tvb, offset + 21, 16));
+        quint_len = tvb_get_ntohs(tvb, offset + 37);
+        proto_tree_add_text(ext_tree_mm, tvb, offset + 37, 2, "Quintuplets length: 0x%x (%u)", quint_len, quint_len);
+
+        offset = offset + decode_quintuplet(tvb, offset + 39, ext_tree_mm, count) + 39;
+
+
+        break;
+    case 1:                     /* GSM key and triplets */
+        proto_tree_add_item(ext_tree_mm, hf_gtp_cksn, tvb, offset + 3, 1, FALSE);
+        if (gtp_version != 0)
+            proto_tree_add_item(ext_tree_mm, hf_gtp_security_mode, tvb, offset + 4, 1, FALSE);
+
+        proto_tree_add_item(ext_tree_mm, hf_gtp_no_of_vectors, tvb, offset + 4, 1, FALSE);
+        proto_tree_add_item(ext_tree_mm, hf_gtp_cipher_algorithm, tvb, offset + 4, 1, FALSE);
+        proto_tree_add_text(ext_tree_mm, tvb, offset + 5, 8, "Ciphering key Kc: %s", tvb_bytes_to_str(tvb, offset + 5, 8));
+
+        offset = offset + decode_triplet(tvb, offset + 13, ext_tree_mm, count) + 13;
+
+        break;
+    case 2:                     /* UMTS key and quintuplets */
+        proto_tree_add_item(ext_tree_mm, hf_gtp_ksi, tvb, offset + 3, 1, FALSE);
+        proto_tree_add_item(ext_tree_mm, hf_gtp_security_mode, tvb, offset + 4, 1, FALSE);
+        proto_tree_add_item(ext_tree_mm, hf_gtp_no_of_vectors, tvb, offset + 4, 1, FALSE);
+        proto_tree_add_text(ext_tree_mm, tvb, offset + 5, 16, "Ciphering key CK: %s", tvb_bytes_to_str(tvb, offset + 5, 16));
+        proto_tree_add_text(ext_tree_mm, tvb, offset + 21, 16, "Integrity key IK: %s", tvb_bytes_to_str(tvb, offset + 21, 16));
+        quint_len = tvb_get_ntohs(tvb, offset + 37);
+        proto_tree_add_text(ext_tree_mm, tvb, offset + 37, 2, "Quintuplets length: 0x%x (%u)", quint_len, quint_len);
+
+        offset = offset + decode_quintuplet(tvb, offset + 39, ext_tree_mm, count) + 39;
+
+        break;
+    case 3:                     /* GSM key and quintuplets */
+        proto_tree_add_item(ext_tree_mm, hf_gtp_cksn, tvb, offset + 3, 1, FALSE);
+        proto_tree_add_item(ext_tree_mm, hf_gtp_security_mode, tvb, offset + 4, 1, FALSE);
+        proto_tree_add_item(ext_tree_mm, hf_gtp_no_of_vectors, tvb, offset + 4, 1, FALSE);
+        proto_tree_add_item(ext_tree_mm, hf_gtp_cipher_algorithm, tvb, offset + 4, 1, FALSE);
+        proto_tree_add_text(ext_tree_mm, tvb, offset + 5, 8, "Ciphering key Kc: %s", tvb_bytes_to_str(tvb, offset + 5, 8));
+        quint_len = tvb_get_ntohs(tvb, offset + 13);
+        proto_tree_add_text(ext_tree_mm, tvb, offset + 13, 2, "Quintuplets length: 0x%x (%u)", quint_len, quint_len);
+
+        offset = offset + decode_quintuplet(tvb, offset + 15, ext_tree_mm, count) + 15;
+
+        break;
     default:
-       break;
+        break;
     }
 
 /*
@@ -3687,9 +3687,9 @@ static int decode_gtp_mm_cntxt(tvbuff_t * tvb, int offset, packet_info * pinfo _
 
     if (con_len > 0) {
 
-       l3_tvb = tvb_new_subset(tvb, offset, con_len, con_len);
-       if (!dissector_try_port(bssap_pdu_type_table, BSSAP_PDU_TYPE_DTAP, l3_tvb, pinfo, ext_tree_mm))
-           call_dissector(data_handle, l3_tvb, pinfo, ext_tree_mm);
+        l3_tvb = tvb_new_subset(tvb, offset, con_len, con_len);
+        if (!dissector_try_port(bssap_pdu_type_table, BSSAP_PDU_TYPE_DTAP, l3_tvb, pinfo, ext_tree_mm))
+            call_dissector(data_handle, l3_tvb, pinfo, ext_tree_mm);
     }
 
     return 3 + length;
@@ -3701,13 +3701,13 @@ static int decode_gtp_mm_cntxt(tvbuff_t * tvb, int offset, packet_info * pinfo _
 static guint8 hex2dec(guint8 x)
 {
     if ((x >= 'a') && (x <= 'f'))
-       x = x - 'a' + 10;
+        x = x - 'a' + 10;
     else if ((x >= 'A') && (x <= 'F'))
-       x = x - 'A' + 10;
+        x = x - 'A' + 10;
     else if ((x >= '0') && (x <= '9'))
-       x = x - '0';
+        x = x - '0';
     else
-       x = 0;
+        x = 0;
     return x;
 }
 
@@ -3717,9 +3717,9 @@ static guint8 hex2dec(guint8 x)
 static guint8 wrapped_tvb_get_guint8(tvbuff_t * tvb, int offset, int type)
 {
     if (type == 2)
-       return (hex2dec(tvb_get_guint8(tvb, offset)) << 4 | hex2dec(tvb_get_guint8(tvb, offset + 1)));
+        return (hex2dec(tvb_get_guint8(tvb, offset)) << 4 | hex2dec(tvb_get_guint8(tvb, offset + 1)));
     else
-       return tvb_get_guint8(tvb, offset);
+        return tvb_get_guint8(tvb, offset);
 }
 
  /* WARNING : actually length is coded on 2 octets for QoS profile but on 1 octet for PDP Context!
@@ -3766,56 +3766,56 @@ static int decode_qos_umts(tvbuff_t * tvb, int offset, proto_tree * tree, const
 
     switch (type) {
     case 1:
-       length = tvb_get_guint8(tvb, offset);
-       te = proto_tree_add_text(tree, tvb, offset, length + 1, "%s", qos_str);
-       ext_tree_qos = proto_item_add_subtree(te, ett_gtp_qos);
-       proto_tree_add_text(ext_tree_qos, tvb, offset, 1, "Length: %u", length);
-       offset++;
-       retval = length + 1;
-       break;
+        length = tvb_get_guint8(tvb, offset);
+        te = proto_tree_add_text(tree, tvb, offset, length + 1, "%s", qos_str);
+        ext_tree_qos = proto_item_add_subtree(te, ett_gtp_qos);
+        proto_tree_add_text(ext_tree_qos, tvb, offset, 1, "Length: %u", length);
+        offset++;
+        retval = length + 1;
+        break;
     case 2:
-       length = tvb_get_ntohs(tvb, offset + 1);
-       te = proto_tree_add_text(tree, tvb, offset, length + 3, "%s", qos_str);
-       ext_tree_qos = proto_item_add_subtree(te, ett_gtp_qos);
-       proto_tree_add_text(ext_tree_qos, tvb, offset + 1, 2, "Length: %u", length);
-       offset += 3;            /* +1 because of first 0x86 byte for UMTS QoS */
-       retval = length + 3;
-       break;
+        length = tvb_get_ntohs(tvb, offset + 1);
+        te = proto_tree_add_text(tree, tvb, offset, length + 3, "%s", qos_str);
+        ext_tree_qos = proto_item_add_subtree(te, ett_gtp_qos);
+        proto_tree_add_text(ext_tree_qos, tvb, offset + 1, 2, "Length: %u", length);
+        offset += 3;            /* +1 because of first 0x86 byte for UMTS QoS */
+        retval = length + 3;
+        break;
     case 3:
-       /* For QoS inside RADIUS Client messages from GGSN */
-       utf8_type = 2;
+        /* For QoS inside RADIUS Client messages from GGSN */
+        utf8_type = 2;
 
-       /* The field in the RADIUS message is the length of the tvb we were given */
-       length = tvb_length(tvb);
-       te = proto_tree_add_text(tree, tvb, offset, length, "%s", qos_str);
+        /* The field in the RADIUS message is the length of the tvb we were given */
+        length = tvb_length(tvb);
+        te = proto_tree_add_text(tree, tvb, offset, length, "%s", qos_str);
 
-       ext_tree_qos = proto_item_add_subtree(te, ett_gtp_qos);
+        ext_tree_qos = proto_item_add_subtree(te, ett_gtp_qos);
 
-       proto_tree_add_item(ext_tree_qos, hf_gtp_qos_version, tvb, offset, 2, FALSE);
+        proto_tree_add_item(ext_tree_qos, hf_gtp_qos_version, tvb, offset, 2, FALSE);
 
-       /* Hyphen handling */
-       hyphen = tvb_get_guint8(tvb, offset + 2);
-       if (hyphen == ((guint8) '-')) {
-           /* Hyphen is present, put in protocol tree */
-           proto_tree_add_text(ext_tree_qos, tvb, offset + 2, 1, "Hyphen separator: -");
-           offset++;           /* "Get rid" of hyphen */
-       }
+        /* Hyphen handling */
+        hyphen = tvb_get_guint8(tvb, offset + 2);
+        if (hyphen == ((guint8) '-')) {
+            /* Hyphen is present, put in protocol tree */
+            proto_tree_add_text(ext_tree_qos, tvb, offset + 2, 1, "Hyphen separator: -");
+            offset++;           /* "Get rid" of hyphen */
+        }
 
-       /* Now, we modify offset here and in order to use type later
-        * effectively.*/
-       offset++;
+        /* Now, we modify offset here and in order to use type later
+         * effectively.*/
+        offset++;
 
-       length -= offset;
-       length /= 2;
+        length -= offset;
+        length /= 2;
 
-       retval = length + 2;    /* Actually, will be ignored. */
-       break;
+        retval = length + 2;    /* Actually, will be ignored. */
+        break;
     default:
-       /* XXX - what should we do with the length here? */
-       length = 0;
-       retval = 0;
-       ext_tree_qos = NULL;
-       break;
+        /* XXX - what should we do with the length here? */
+        length = 0;
+        retval = 0;
+        ext_tree_qos = NULL;
+        break;
     }
 
     /* In RADIUS messages there is no allocation-retention priority
@@ -3842,7 +3842,7 @@ static int decode_qos_umts(tvbuff_t * tvb, int offset, proto_tree * tree, const
 
     /* In RADIUS messages there is no allocation-retention priority */
     if (type != 3)
-       proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_al_ret_priority, tvb, offset, 1, al_ret_priority);
+        proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_al_ret_priority, tvb, offset, 1, al_ret_priority);
 
     /* All additions must take care of the fact that QoS fields in RADIUS
      * messages are UTF-8 encoded, so we have to use the same trick as above.
@@ -3871,7 +3871,7 @@ static int decode_qos_umts(tvbuff_t * tvb, int offset, proto_tree * tree, const
     if (length > 4) {
 
         /* See above for the need of wrapping
-         * 
+         *
          */
         /* Octet 6 */
         traf_class = wrapped_tvb_get_guint8(tvb, offset + (4 - 1) * utf8_type + 1, utf8_type) & GTP_EXT_QOS_TRAF_CLASS_MASK;
@@ -3925,33 +3925,33 @@ static int decode_qos_umts(tvbuff_t * tvb, int offset, proto_tree * tree, const
             proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_max_ul, tvb, offset + (6 - 1) * utf8_type + 1, utf8_type, max_ul);
         if (max_ul > 0 && max_ul <= 63)
             proto_tree_add_uint_format(ext_tree_qos, hf_gtp_qos_max_ul, tvb, offset + (6 - 1) * utf8_type + 1, utf8_type, max_ul,
-                                      "Maximum bit rate for uplink: %u kbps", max_ul);
+                                       "Maximum bit rate for uplink: %u kbps", max_ul);
         if (max_ul > 63 && max_ul <= 127) {
             mu = 64 + (max_ul - 64) * 8;
             proto_tree_add_uint_format(ext_tree_qos, hf_gtp_qos_max_ul, tvb, offset + (6 - 1) * utf8_type + 1, utf8_type, mu,
-                                      "Maximum bit rate for uplink: %u kbps", mu);
+                                       "Maximum bit rate for uplink: %u kbps", mu);
         }
 
         if (max_ul > 127 && max_ul <= 254) {
             mu = 576 + (max_ul - 128) * 64;
             proto_tree_add_uint_format(ext_tree_qos, hf_gtp_qos_max_ul, tvb, offset + (6 - 1) * utf8_type + 1, utf8_type, mu,
-                                      "Maximum bit rate for uplink: %u kbps", mu);
+                                       "Maximum bit rate for uplink: %u kbps", mu);
         }
 
         if (max_dl == 0 || max_dl == 255)
             proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_max_dl, tvb, offset + (7 - 1) * utf8_type + 1, utf8_type, max_dl);
         if (max_dl > 0 && max_dl <= 63)
             proto_tree_add_uint_format(ext_tree_qos, hf_gtp_qos_max_dl, tvb, offset + (7 - 1) * utf8_type + 1, utf8_type, max_dl,
-                                      "Maximum bit rate for downlink: %u kbps", max_dl);
+                                       "Maximum bit rate for downlink: %u kbps", max_dl);
         if (max_dl > 63 && max_dl <= 127) {
             md = 64 + (max_dl - 64) * 8;
             proto_tree_add_uint_format(ext_tree_qos, hf_gtp_qos_max_dl, tvb, offset + (7 - 1) * utf8_type + 1, utf8_type, md,
-                                      "Maximum bit rate for downlink: %u kbps", md);
+                                       "Maximum bit rate for downlink: %u kbps", md);
         }
         if (max_dl > 127 && max_dl <= 254) {
             md = 576 + (max_dl - 128) * 64;
             proto_tree_add_uint_format(ext_tree_qos, hf_gtp_qos_max_dl, tvb, offset + (7 - 1) * utf8_type + 1, utf8_type, md,
-                                      "Maximum bit rate for downlink: %u kbps", md);
+                                       "Maximum bit rate for downlink: %u kbps", md);
         }
 
         proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_res_ber, tvb, offset + (8 - 1) * utf8_type + 1, utf8_type, res_ber);
@@ -3963,16 +3963,16 @@ static int decode_qos_umts(tvbuff_t * tvb, int offset, proto_tree * tree, const
             proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_guar_ul, tvb, offset + (10 - 1) * utf8_type + 1, utf8_type, guar_ul);
         if (guar_ul > 0 && guar_ul <= 63)
             proto_tree_add_uint_format(ext_tree_qos, hf_gtp_qos_guar_ul, tvb, offset + (10 - 1) * utf8_type + 1, utf8_type, guar_ul,
-                                      "Guaranteed bit rate for uplink: %u kbps", guar_ul);
+                                       "Guaranteed bit rate for uplink: %u kbps", guar_ul);
         if (guar_ul > 63 && guar_ul <= 127) {
             gu = 64 + (guar_ul - 64) * 8;
             proto_tree_add_uint_format(ext_tree_qos, hf_gtp_qos_guar_ul, tvb, offset + (10 - 1) * utf8_type + 1, utf8_type, gu,
-                                      "Guaranteed bit rate for uplink: %u kbps", gu);
+                                       "Guaranteed bit rate for uplink: %u kbps", gu);
         }
         if (guar_ul > 127 && guar_ul <= 254) {
             gu = 576 + (guar_ul - 128) * 64;
             proto_tree_add_uint_format(ext_tree_qos, hf_gtp_qos_guar_ul, tvb, offset + (10 - 1) * utf8_type + 1, utf8_type, gu,
-                                      "Guaranteed bit rate for uplink: %u kbps", gu);
+                                       "Guaranteed bit rate for uplink: %u kbps", gu);
         }
 
         /* Octet 13 */
@@ -3980,18 +3980,18 @@ static int decode_qos_umts(tvbuff_t * tvb, int offset, proto_tree * tree, const
             proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_guar_dl, tvb, offset + (11 - 1) * utf8_type + 1, utf8_type, guar_dl);
         if (guar_dl > 0 && guar_dl <= 63)
             proto_tree_add_uint_format(ext_tree_qos, hf_gtp_qos_guar_dl, tvb, offset + (11 - 1) * utf8_type + 1, utf8_type, guar_dl,
-                                      "Guaranteed bit rate for downlink: %u kbps", guar_dl);
+                                       "Guaranteed bit rate for downlink: %u kbps", guar_dl);
         if (guar_dl > 63 && guar_dl <= 127) {
             gd = 64 + (guar_dl - 64) * 8;
             proto_tree_add_uint_format(ext_tree_qos, hf_gtp_qos_guar_dl, tvb, offset + (11 - 1) * utf8_type + 1, utf8_type, gd,
-                                      "Guaranteed bit rate for downlink: %u kbps", gd);
+                                       "Guaranteed bit rate for downlink: %u kbps", gd);
         }
         if (guar_dl > 127 && guar_dl <= 254) {
             gd = 576 + (guar_dl - 128) * 64;
             proto_tree_add_uint_format(ext_tree_qos, hf_gtp_qos_guar_dl, tvb, offset + (11 - 1) * utf8_type + 1, utf8_type, gd,
-                                      "Guaranteed bit rate for downlink: %u kbps", gd);
+                                       "Guaranteed bit rate for downlink: %u kbps", gd);
         }
-               
+
         if(length > 13){
             proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_src_stat_desc, tvb, offset + (12 - 1) * utf8_type + 1, utf8_type, src_stat_desc);
             proto_tree_add_boolean(ext_tree_qos, hf_gtp_qos_sig_ind, tvb, offset + (12 - 1) * utf8_type + 1, utf8_type, sig_ind);
@@ -4083,7 +4083,7 @@ static int
 dissect_diameter_3gpp_qosprofile(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
 
     decode_qos_umts(tvb, 0, tree, "UMTS GTP QoS Profile", 3);
-       return tvb_length(tvb);
+    return tvb_length(tvb);
 }
 
 static const gchar *dissect_radius_qos_umts(proto_tree * tree, tvbuff_t * tvb)
@@ -4099,27 +4099,27 @@ static void decode_apn(tvbuff_t * tvb, int offset, guint16 length, proto_tree *
     int name_len, tmp;
 
     if (length > 0) {
-       name_len = tvb_get_guint8(tvb, offset);
-
-       if (name_len < 0x20) {
-           apn = tvb_get_ephemeral_string(tvb, offset + 1, length - 1);
-           for (;;) {
-               if (name_len >= length - 1)
-                   break;
-               tmp = name_len;
-               name_len = name_len + apn[tmp] + 1;
-               apn[tmp] = '.';
-           }
-       } else
-           apn = tvb_get_ephemeral_string(tvb, offset, length);
-
-       proto_tree_add_string(tree, hf_gtp_apn, tvb, offset, length, apn);
+        name_len = tvb_get_guint8(tvb, offset);
+
+        if (name_len < 0x20) {
+            apn = tvb_get_ephemeral_string(tvb, offset + 1, length - 1);
+            for (;;) {
+                if (name_len >= length - 1)
+                    break;
+                tmp = name_len;
+                name_len = name_len + apn[tmp] + 1;
+                apn[tmp] = '.';
+            }
+        } else
+            apn = tvb_get_ephemeral_string(tvb, offset, length);
+
+        proto_tree_add_string(tree, hf_gtp_apn, tvb, offset, length, apn);
     }
 }
 
-/* GPRS:       9.60 v7.6.0, chapter 7.9.20
- * UMTS:       29.060 v4.0, chapter 7.7.29
- * TODO:       unify addr functions
+/* GPRS:        9.60 v7.6.0, chapter 7.9.20
+ * UMTS:        29.060 v4.0, chapter 7.7.29
+ * TODO:        unify addr functions
  */
 static int decode_gtp_pdp_cntxt(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -4148,19 +4148,19 @@ static int decode_gtp_pdp_cntxt(tvbuff_t * tvb, int offset, packet_info * pinfo
 
     switch (gtp_version) {
     case 0:
-       decode_qos_gprs(tvb, offset + 5, ext_tree_pdp, "QoS subscribed", 0);
-       decode_qos_gprs(tvb, offset + 8, ext_tree_pdp, "QoS requested", 0);
-       decode_qos_gprs(tvb, offset + 11, ext_tree_pdp, "QoS negotiated", 0);
-       offset = offset + 14;
-       break;
+        decode_qos_gprs(tvb, offset + 5, ext_tree_pdp, "QoS subscribed", 0);
+        decode_qos_gprs(tvb, offset + 8, ext_tree_pdp, "QoS requested", 0);
+        decode_qos_gprs(tvb, offset + 11, ext_tree_pdp, "QoS negotiated", 0);
+        offset = offset + 14;
+        break;
     case 1:
-       offset = offset + 5;
-       offset = offset + decode_qos_umts(tvb, offset, ext_tree_pdp, "QoS subscribed", 1);
-       offset = offset + decode_qos_umts(tvb, offset, ext_tree_pdp, "QoS requested", 1);
-       offset = offset + decode_qos_umts(tvb, offset, ext_tree_pdp, "QoS negotiated", 1);
-       break;
+        offset = offset + 5;
+        offset = offset + decode_qos_umts(tvb, offset, ext_tree_pdp, "QoS subscribed", 1);
+        offset = offset + decode_qos_umts(tvb, offset, ext_tree_pdp, "QoS requested", 1);
+        offset = offset + decode_qos_umts(tvb, offset, ext_tree_pdp, "QoS negotiated", 1);
+        break;
     default:
-       break;
+        break;
     }
 
     sn_down = tvb_get_ntohs(tvb, offset);
@@ -4175,19 +4175,19 @@ static int decode_gtp_pdp_cntxt(tvbuff_t * tvb, int offset, packet_info * pinfo
 
     switch (gtp_version) {
     case 0:
-       up_flow = tvb_get_ntohs(tvb, offset + 6);
-       proto_tree_add_text(ext_tree_pdp, tvb, offset + 6, 2, "Uplink flow label signalling: %u", up_flow);
-       offset = offset + 8;
-       break;
+        up_flow = tvb_get_ntohs(tvb, offset + 6);
+        proto_tree_add_text(ext_tree_pdp, tvb, offset + 6, 2, "Uplink flow label signalling: %u", up_flow);
+        offset = offset + 8;
+        break;
     case 1:
-       pdp_cntxt_id = tvb_get_guint8(tvb, offset + 14);
-       proto_tree_add_item(ext_tree_pdp, hf_gtp_ulink_teid_cp, tvb, offset + 6, 4, FALSE);
-       proto_tree_add_item(ext_tree_pdp, hf_gtp_ulink_teid_data, tvb, offset + 10, 4, FALSE);
-       proto_tree_add_text(ext_tree_pdp, tvb, offset + 14, 1, "PDP context identifier: %u", pdp_cntxt_id);
-       offset = offset + 15;
-       break;
+        pdp_cntxt_id = tvb_get_guint8(tvb, offset + 14);
+        proto_tree_add_item(ext_tree_pdp, hf_gtp_ulink_teid_cp, tvb, offset + 6, 4, FALSE);
+        proto_tree_add_item(ext_tree_pdp, hf_gtp_ulink_teid_data, tvb, offset + 10, 4, FALSE);
+        proto_tree_add_text(ext_tree_pdp, tvb, offset + 14, 1, "PDP context identifier: %u", pdp_cntxt_id);
+        offset = offset + 15;
+        break;
     default:
-       break;
+        break;
     }
 
     pdp_type_org = tvb_get_guint8(tvb, offset) & 0x0F;
@@ -4199,18 +4199,18 @@ static int decode_gtp_pdp_cntxt(tvbuff_t * tvb, int offset, packet_info * pinfo
     proto_tree_add_text(ext_tree_pdp, tvb, offset + 2, 1, "PDP address length: %u", pdp_addr_len);
 
     if (pdp_addr_len > 0) {
-       switch (pdp_type_num) {
-       case 0x21:
-           addr_ipv4 = tvb_get_ipv4(tvb, offset + 3);
-           proto_tree_add_text(ext_tree_pdp, tvb, offset + 3, 4, "PDP address: %s", ip_to_str((guint8 *) & addr_ipv4));
-           break;
-       case 0x57:
-           tvb_get_ipv6(tvb, offset + 3, &addr_ipv6);
-           proto_tree_add_text(ext_tree_pdp, tvb, offset + 3, 16, "PDP address: %s", ip6_to_str((struct e_in6_addr *) &addr_ipv6));
-           break;
-       default:
-           break;
-       }
+        switch (pdp_type_num) {
+        case 0x21:
+            addr_ipv4 = tvb_get_ipv4(tvb, offset + 3);
+            proto_tree_add_text(ext_tree_pdp, tvb, offset + 3, 4, "PDP address: %s", ip_to_str((guint8 *) & addr_ipv4));
+            break;
+        case 0x57:
+            tvb_get_ipv6(tvb, offset + 3, &addr_ipv6);
+            proto_tree_add_text(ext_tree_pdp, tvb, offset + 3, 16, "PDP address: %s", ip6_to_str((struct e_in6_addr *) &addr_ipv6));
+            break;
+        default:
+            break;
+        }
     }
 
     offset = offset + 3 + pdp_addr_len;
@@ -4220,37 +4220,37 @@ static int decode_gtp_pdp_cntxt(tvbuff_t * tvb, int offset, packet_info * pinfo
 
     switch (ggsn_addr_len) {
     case 4:
-       addr_ipv4 = tvb_get_ipv4(tvb, offset + 1);
-       proto_tree_add_text(ext_tree_pdp, tvb, offset + 1, 4, "GGSN Address for control plane: %s", ip_to_str((guint8 *) & addr_ipv4));
-       break;
+        addr_ipv4 = tvb_get_ipv4(tvb, offset + 1);
+        proto_tree_add_text(ext_tree_pdp, tvb, offset + 1, 4, "GGSN Address for control plane: %s", ip_to_str((guint8 *) & addr_ipv4));
+        break;
     case 16:
-       tvb_get_ipv6(tvb, offset + 1, &addr_ipv6);
-       proto_tree_add_text(ext_tree_pdp, tvb, offset + 1, 16, "GGSN Address for User Traffic: %s", ip6_to_str((struct e_in6_addr *) &addr_ipv6));
-       break;
+        tvb_get_ipv6(tvb, offset + 1, &addr_ipv6);
+        proto_tree_add_text(ext_tree_pdp, tvb, offset + 1, 16, "GGSN Address for User Traffic: %s", ip6_to_str((struct e_in6_addr *) &addr_ipv6));
+        break;
     default:
-       break;
+        break;
     }
 
     offset = offset + 1 + ggsn_addr_len;
 
     if (gtp_version == 1) {
 
-       ggsn_addr_len = tvb_get_guint8(tvb, offset);
-       proto_tree_add_text(ext_tree_pdp, tvb, offset, 1, "GGSN 2 address length: %u", ggsn_addr_len);
-
-       switch (ggsn_addr_len) {
-       case 4:
-           addr_ipv4 = tvb_get_ipv4(tvb, offset + 1);
-           proto_tree_add_text(ext_tree_pdp, tvb, offset + 1, 4, "GGSN 2 address: %s", ip_to_str((guint8 *) & addr_ipv4));
-           break;
-       case 16:
-           tvb_get_ipv6(tvb, offset + 1, &addr_ipv6);
-           proto_tree_add_text(ext_tree_pdp, tvb, offset + 1, 16, "GGSN 2 address: %s", ip6_to_str((struct e_in6_addr *) &addr_ipv6));
-           break;
-       default:
-           break;
-       }
-       offset = offset + 1 + ggsn_addr_len;
+        ggsn_addr_len = tvb_get_guint8(tvb, offset);
+        proto_tree_add_text(ext_tree_pdp, tvb, offset, 1, "GGSN 2 address length: %u", ggsn_addr_len);
+
+        switch (ggsn_addr_len) {
+        case 4:
+            addr_ipv4 = tvb_get_ipv4(tvb, offset + 1);
+            proto_tree_add_text(ext_tree_pdp, tvb, offset + 1, 4, "GGSN 2 address: %s", ip_to_str((guint8 *) & addr_ipv4));
+            break;
+        case 16:
+            tvb_get_ipv6(tvb, offset + 1, &addr_ipv6);
+            proto_tree_add_text(ext_tree_pdp, tvb, offset + 1, 16, "GGSN 2 address: %s", ip6_to_str((struct e_in6_addr *) &addr_ipv6));
+            break;
+        default:
+            break;
+        }
+        offset = offset + 1 + ggsn_addr_len;
 
     }
 
@@ -4273,8 +4273,8 @@ static int decode_gtp_pdp_cntxt(tvbuff_t * tvb, int offset, packet_info * pinfo
     return 3 + length;
 }
 
-/* GPRS:       9.60, v7.6.0, chapter 7.9.21
- * UMTS:       29.060, v4.0, chapter 7.7.30
+/* GPRS:        9.60, v7.6.0, chapter 7.9.21
+ * UMTS:        29.060, v4.0, chapter 7.7.30
  */
 static int decode_gtp_apn(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -4294,10 +4294,10 @@ static int decode_gtp_apn(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, p
     return 3 + length;
 }
 
-/* GPRS:       9.60 v7.6.0, chapter 7.9.22
- *             4.08 v. 7.1.2, chapter 10.5.6.3 (p.580)
- * UMTS:       29.060 v4.0, chapter 7.7.31
- *             24.008, v4.2, chapter 10.5.6.3
+/* GPRS:        9.60 v7.6.0, chapter 7.9.22
+ *              4.08 v. 7.1.2, chapter 10.5.6.3 (p.580)
+ * UMTS:        29.060 v4.0, chapter 7.7.31
+ *              24.008, v4.2, chapter 10.5.6.3
  */
 int decode_gtp_proto_conf(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree * tree)
 {
@@ -4318,58 +4318,58 @@ int decode_gtp_proto_conf(tvbuff_t * tvb, int offset, packet_info * pinfo, proto
     proto_tree_add_text(ext_tree_proto, tvb, offset + 1, 2, "Length: %u", length);
 
     if (length < 1)
-       return 3;
+        return 3;
 
     conf = tvb_get_guint8(tvb, offset + 3) & 0x07;
     proto_tree_add_text(ext_tree_proto, tvb, offset + 3, 1, "Configuration protocol (00000xxx): %u", conf);
 
-    proto_offset = 1;          /* ... 1st byte is conf */
+    proto_offset = 1;           /* ... 1st byte is conf */
     offset += 4;
 
     for (;;) {
-       if (proto_offset >= length)
-           break;
-       proto_id = tvb_get_ntohs(tvb, offset);
-       proto_len = tvb_get_guint8(tvb, offset + 2);
-       proto_offset += proto_len + 3;  /* 3 = proto id + length byte */
-
-       if (proto_len > 0) {
-
-           proto_tree_add_text(ext_tree_proto, tvb, offset, 2, "Protocol %u ID: %s (0x%04x)",
-                               cnt, val_to_str(proto_id, ppp_vals, "Unknown"), proto_id);
-           proto_tree_add_text(ext_tree_proto, tvb, offset + 2, 1, "Protocol %u length: %u", cnt, proto_len);
-
-           /*
-            * Don't allow the dissector for the configuration
-            * protocol in question to update the columns - this
-            * is GTP, not PPP.
-            */
-           save_writable = col_get_writable(pinfo->cinfo);
-           col_set_writable(pinfo->cinfo, FALSE);
-
-           /*
-            * XXX - should we have our own dissector table,
-            * solely for configuration protocols, so that bogus
-            * values don't cause us to dissect the protocol
-            * data as, for example, IP?
-            */
-           next_tvb = tvb_new_subset(tvb, offset + 3, proto_len, proto_len);
-           if (!dissector_try_port(ppp_subdissector_table, proto_id, next_tvb, pinfo, ext_tree_proto)) {
-               call_dissector(data_handle, next_tvb, pinfo, ext_tree_proto);
-           }
-
-           col_set_writable(pinfo->cinfo, save_writable);
-       }
-
-       offset += proto_len + 3;
-       cnt++;
+        if (proto_offset >= length)
+            break;
+        proto_id = tvb_get_ntohs(tvb, offset);
+        proto_len = tvb_get_guint8(tvb, offset + 2);
+        proto_offset += proto_len + 3;  /* 3 = proto id + length byte */
+
+        if (proto_len > 0) {
+
+            proto_tree_add_text(ext_tree_proto, tvb, offset, 2, "Protocol %u ID: %s (0x%04x)",
+                                cnt, val_to_str(proto_id, ppp_vals, "Unknown"), proto_id);
+            proto_tree_add_text(ext_tree_proto, tvb, offset + 2, 1, "Protocol %u length: %u", cnt, proto_len);
+
+            /*
+             * Don't allow the dissector for the configuration
+             * protocol in question to update the columns - this
+             * is GTP, not PPP.
+             */
+            save_writable = col_get_writable(pinfo->cinfo);
+            col_set_writable(pinfo->cinfo, FALSE);
+
+            /*
+             * XXX - should we have our own dissector table,
+             * solely for configuration protocols, so that bogus
+             * values don't cause us to dissect the protocol
+             * data as, for example, IP?
+             */
+            next_tvb = tvb_new_subset(tvb, offset + 3, proto_len, proto_len);
+            if (!dissector_try_port(ppp_subdissector_table, proto_id, next_tvb, pinfo, ext_tree_proto)) {
+                call_dissector(data_handle, next_tvb, pinfo, ext_tree_proto);
+            }
+
+            col_set_writable(pinfo->cinfo, save_writable);
+        }
+
+        offset += proto_len + 3;
+        cnt++;
     }
 
     return 3 + length;
 }
 
-/* GPRS:       9.60 v7.6.0, chapter 7.9.23
- * UMTS:       29.060 v4.0, chapter 7.7.32
+/* GPRS:        9.60 v7.6.0, chapter 7.9.23
+ * UMTS:        29.060 v4.0, chapter 7.7.32
  */
 static int decode_gtp_gsn_addr(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -4388,47 +4388,47 @@ static int decode_gtp_gsn_addr(tvbuff_t * tvb, int offset, packet_info * pinfo _
 
     switch (length) {
     case 4:
-       proto_tree_add_text(ext_tree_gsn_addr, tvb, offset + 1, 2, "GSN address length : %u", length);
-       addr_ipv4 = tvb_get_ipv4(tvb, offset + 3);
-       proto_item_append_text(te, "%s", ip_to_str((guint8 *) & addr_ipv4));
-       proto_tree_add_ipv4(ext_tree_gsn_addr, hf_gtp_gsn_ipv4, tvb, offset + 3, 4, addr_ipv4);
-       break;
+        proto_tree_add_text(ext_tree_gsn_addr, tvb, offset + 1, 2, "GSN address length : %u", length);
+        addr_ipv4 = tvb_get_ipv4(tvb, offset + 3);
+        proto_item_append_text(te, "%s", ip_to_str((guint8 *) & addr_ipv4));
+        proto_tree_add_ipv4(ext_tree_gsn_addr, hf_gtp_gsn_ipv4, tvb, offset + 3, 4, addr_ipv4);
+        break;
     case 5:
-       proto_tree_add_text(ext_tree_gsn_addr, tvb, offset + 1, 2, "GSN address Information Element length : %u", length);
-       addr_type = tvb_get_guint8(tvb, offset + 3) & 0xC0;
-       proto_tree_add_uint(ext_tree_gsn_addr, hf_gtp_gsn_addr_type, tvb, offset + 3, 1, addr_type);
-       addr_len = tvb_get_guint8(tvb, offset + 3) & 0x3F;
-       proto_tree_add_uint(ext_tree_gsn_addr, hf_gtp_gsn_addr_len, tvb, offset + 3, 1, addr_len);
-       addr_ipv4 = tvb_get_ipv4(tvb, offset + 4);
-       proto_item_append_text(te, "%s", ip_to_str((guint8 *) & addr_ipv4));
-       proto_tree_add_ipv4(ext_tree_gsn_addr, hf_gtp_gsn_ipv4, tvb, offset + 4, 4, addr_ipv4);
-       break;
+        proto_tree_add_text(ext_tree_gsn_addr, tvb, offset + 1, 2, "GSN address Information Element length : %u", length);
+        addr_type = tvb_get_guint8(tvb, offset + 3) & 0xC0;
+        proto_tree_add_uint(ext_tree_gsn_addr, hf_gtp_gsn_addr_type, tvb, offset + 3, 1, addr_type);
+        addr_len = tvb_get_guint8(tvb, offset + 3) & 0x3F;
+        proto_tree_add_uint(ext_tree_gsn_addr, hf_gtp_gsn_addr_len, tvb, offset + 3, 1, addr_len);
+        addr_ipv4 = tvb_get_ipv4(tvb, offset + 4);
+        proto_item_append_text(te, "%s", ip_to_str((guint8 *) & addr_ipv4));
+        proto_tree_add_ipv4(ext_tree_gsn_addr, hf_gtp_gsn_ipv4, tvb, offset + 4, 4, addr_ipv4);
+        break;
     case 16:
-       proto_tree_add_text(ext_tree_gsn_addr, tvb, offset + 1, 2, "GSN address length : %u", length);
-       tvb_get_ipv6(tvb, offset + 3, &addr_ipv6);
-       proto_item_append_text(te, "%s", ip6_to_str((struct e_in6_addr *) &addr_ipv6));
-       proto_tree_add_ipv6(ext_tree_gsn_addr, hf_gtp_gsn_ipv6, tvb, offset + 3, 16, (guint8 *) & addr_ipv6);
-       break;
+        proto_tree_add_text(ext_tree_gsn_addr, tvb, offset + 1, 2, "GSN address length : %u", length);
+        tvb_get_ipv6(tvb, offset + 3, &addr_ipv6);
+        proto_item_append_text(te, "%s", ip6_to_str((struct e_in6_addr *) &addr_ipv6));
+        proto_tree_add_ipv6(ext_tree_gsn_addr, hf_gtp_gsn_ipv6, tvb, offset + 3, 16, (guint8 *) & addr_ipv6);
+        break;
     case 17:
-       proto_tree_add_text(ext_tree_gsn_addr, tvb, offset + 1, 2, "GSN address Information Element length : %u", length);
-       addr_type = tvb_get_guint8(tvb, offset + 3) & 0xC0;
-       proto_tree_add_uint(ext_tree_gsn_addr, hf_gtp_gsn_addr_type, tvb, offset + 3, 1, addr_type);
-       addr_len = tvb_get_guint8(tvb, offset + 3) & 0x3F;
-       proto_tree_add_uint(ext_tree_gsn_addr, hf_gtp_gsn_addr_len, tvb, offset + 3, 1, addr_len);
-       tvb_get_ipv6(tvb, offset + 4, &addr_ipv6);
-       proto_item_append_text(te, "%s", ip6_to_str((struct e_in6_addr *) &addr_ipv6));
-       proto_tree_add_ipv6(ext_tree_gsn_addr, hf_gtp_gsn_ipv6, tvb, offset + 4, 16, (guint8 *) & addr_ipv6);
-       break;
+        proto_tree_add_text(ext_tree_gsn_addr, tvb, offset + 1, 2, "GSN address Information Element length : %u", length);
+        addr_type = tvb_get_guint8(tvb, offset + 3) & 0xC0;
+        proto_tree_add_uint(ext_tree_gsn_addr, hf_gtp_gsn_addr_type, tvb, offset + 3, 1, addr_type);
+        addr_len = tvb_get_guint8(tvb, offset + 3) & 0x3F;
+        proto_tree_add_uint(ext_tree_gsn_addr, hf_gtp_gsn_addr_len, tvb, offset + 3, 1, addr_len);
+        tvb_get_ipv6(tvb, offset + 4, &addr_ipv6);
+        proto_item_append_text(te, "%s", ip6_to_str((struct e_in6_addr *) &addr_ipv6));
+        proto_tree_add_ipv6(ext_tree_gsn_addr, hf_gtp_gsn_ipv6, tvb, offset + 4, 16, (guint8 *) & addr_ipv6);
+        break;
     default:
-       proto_item_append_text(te, "unknown type or wrong length");
-       break;
+        proto_item_append_text(te, "unknown type or wrong length");
+        break;
     }
 
     return 3 + length;
 }
 
-/* GPRS:       9.60 v7.6.0, chapter 7.9.24
- * UMTS:       29.060 v4.0, chapter 7.7.33
+/* GPRS:        9.60 v7.6.0, chapter 7.9.24
+ * UMTS:        29.060 v4.0, chapter 7.7.33
  */
 static int decode_gtp_msisdn(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -4440,7 +4440,7 @@ static int decode_gtp_msisdn(tvbuff_t * tvb, int offset, packet_info * pinfo _U_
     length = tvb_get_ntohs(tvb, offset + 1);
 
     if (length < 1)
-       return 3;
+        return 3;
 
     msisdn_val = tvb_get_ptr(tvb, offset + 3, length);
     msisdn_str = msisdn_to_str(msisdn_val, length);
@@ -4450,9 +4450,9 @@ static int decode_gtp_msisdn(tvbuff_t * tvb, int offset, packet_info * pinfo _U_
     return 3 + length;
 }
 
-/* GPRS:       not present
- * UMTS:       29.060 v4.0, chapter 7.7.34
- *             24.008 v4.2, chapter 10.5.6.5
+/* GPRS:        not present
+ * UMTS:        29.060 v4.0, chapter 7.7.34
+ *              24.008 v4.2, chapter 10.5.6.5
  */
 static int decode_gtp_qos_umts(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -4460,8 +4460,8 @@ static int decode_gtp_qos_umts(tvbuff_t * tvb, int offset, packet_info * pinfo _
     return decode_qos_umts(tvb, offset, tree, "Quality of Service", 2);
 }
 
-/* GPRS:       not present
- * UMTS:       29.060 v4.0, chapter 7.7.35
+/* GPRS:        not present
+ * UMTS:        29.060 v4.0, chapter 7.7.35
  */
 static int decode_gtp_auth_qui(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -4503,9 +4503,9 @@ static int decode_gtp_auth_qui(tvbuff_t * tvb, int offset, packet_info * pinfo _
 
 }
 
-/* GPRS:       not present
- * UMTS:       29.060 v4.0, chapter 7.7.36
- *             24.008 v4.2, chapter 10.5.6.12
+/* GPRS:        not present
+ * UMTS:        29.060 v4.0, chapter 7.7.36
+ *              24.008 v4.2, chapter 10.5.6.12
  */
 static int decode_gtp_tft(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -4540,114 +4540,114 @@ static int decode_gtp_tft(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, p
 
     for (i = 0; i < no_packet_filters; i++) {
 
-       pf_id = tvb_get_guint8(tvb, offset);
-
-       tee = proto_tree_add_text(ext_tree_tft, tvb, offset, 1, "Packet filter id: %u", pf_id);
-       ext_tree_tft_pf = proto_item_add_subtree(tee, ett_gtp_tft_pf);
-       offset++;
-
-       if (tft_code != 2) {
-
-           pf_eval = tvb_get_guint8(tvb, offset);
-           pf_len = tvb_get_guint8(tvb, offset + 1);
-
-           proto_tree_add_uint(ext_tree_tft_pf, hf_gtp_tft_eval, tvb, offset, 1, pf_eval);
-           proto_tree_add_text(ext_tree_tft_pf, tvb, offset + 1, 1, "Content length: %u", pf_len);
-
-           offset = offset + 2;
-           pf_offset = 0;
-
-           while (pf_offset < pf_len) {
-
-               pf_content_id = tvb_get_guint8(tvb, offset + pf_offset);
-
-               switch (pf_content_id) {
-                   /* address IPv4 and mask = 8 bytes */
-               case 0x10:
-                   addr_ipv4 = tvb_get_ipv4(tvb, offset + pf_offset + 1);
-                   mask_ipv4 = tvb_get_ipv4(tvb, offset + pf_offset + 5);
-                   proto_tree_add_text(ext_tree_tft_pf, tvb, offset + pf_offset, 9, "ID 0x10: IPv4/mask: %s/%s", ip_to_str((guint8 *) & addr_ipv4),
-                                       ip_to_str((guint8 *) & mask_ipv4));
-                   pf_offset = pf_offset + 9;
-                   break;
-                   /* address IPv6 and mask = 32 bytes */
-               case 0x20:
-                   tvb_get_ipv6(tvb, offset + pf_offset + 1, &addr_ipv6);
-                   tvb_get_ipv6(tvb, offset + pf_offset + 17, &mask_ipv6);
-                   proto_tree_add_text(ext_tree_tft_pf, tvb, offset + pf_offset, 33, "ID 0x20: IPv6/mask: %s/%s",
-                                       ip6_to_str((struct e_in6_addr *) &addr_ipv6), ip6_to_str((struct e_in6_addr *) &mask_ipv6));
-                   pf_offset = pf_offset + 33;
-                   break;
-                   /* protocol identifier/next header type = 1 byte */
-               case 0x30:
-                   proto = tvb_get_guint8(tvb, offset + pf_offset + 1);
-                   proto_tree_add_text(ext_tree_tft_pf, tvb, offset + pf_offset, 2, "ID 0x30: IPv4 protocol identifier/IPv6 next header: %u (%x)",
-                                       proto, proto);
-                   pf_offset = pf_offset + 2;
-                   break;
-                   /* single destination port type = 2 bytes */
-               case 0x40:
-                   port1 = tvb_get_ntohs(tvb, offset + pf_offset + 1);
-                   proto_tree_add_text(ext_tree_tft_pf, tvb, offset + pf_offset, 3, "ID 0x40: destination port: %u", port1);
-                   pf_offset = pf_offset + 3;
-                   break;
-                   /* destination port range type = 4 bytes */
-               case 0x41:
-                   port1 = tvb_get_ntohs(tvb, offset + pf_offset + 1);
-                   port2 = tvb_get_ntohs(tvb, offset + pf_offset + 3);
-                   proto_tree_add_text(ext_tree_tft_pf, tvb, offset + pf_offset, 5, "ID 0x41: destination port range: %u - %u", port1, port2);
-                   pf_offset = pf_offset + 5;
-                   break;
-                   /* single source port type = 2 bytes */
-               case 0x50:
-                   port1 = tvb_get_ntohs(tvb, offset + pf_offset + 1);
-                   proto_tree_add_text(ext_tree_tft_pf, tvb, offset + pf_offset, 3, "ID 0x50: source port: %u", port1);
-                   pf_offset = pf_offset + 3;
-                   break;
-                   /* source port range type = 4 bytes */
-               case 0x51:
-                   port1 = tvb_get_ntohs(tvb, offset + pf_offset + 1);
-                   port2 = tvb_get_ntohs(tvb, offset + pf_offset + 3);
-                   proto_tree_add_text(ext_tree_tft_pf, tvb, offset + pf_offset, 5, "ID 0x51: source port range: %u - %u", port1, port2);
-                   pf_offset = pf_offset + 5;
-                   break;
-                   /* security parameter index type = 4 bytes */
-               case 0x60:
-                   ipsec_id = tvb_get_ntohl(tvb, offset + pf_offset + 1);
-                   proto_tree_add_text(ext_tree_tft_pf, tvb, offset + pf_offset, 5, "ID 0x60: security parameter index: %x", ipsec_id);
-                   pf_offset = pf_offset + 5;
-                   break;
-                   /* type of service/traffic class type = 2 bytes */
-               case 0x70:
-                   tos = tvb_get_ntohs(tvb, offset + pf_offset + 1);
-                   proto_tree_add_text(ext_tree_tft_pf, tvb, offset + pf_offset, 2, "ID 0x70: Type of Service/Traffic Class: %u (%x)", tos, tos);
-                   pf_offset = pf_offset + 3;
-                   break;
-                   /* flow label type = 3 bytes */
-               case 0x80:
-                   label = tvb_get_ntoh24(tvb, offset + pf_offset + 1) & 0x0FFFFF;
-                   proto_tree_add_text(ext_tree_tft_pf, tvb, offset + pf_offset, 4, "ID 0x80: Flow Label: %u (%x)", label, label);
-                   pf_offset = pf_offset + 4;
-                   break;
-
-               default:
-                   proto_tree_add_text(ext_tree_tft_pf, tvb, offset + pf_offset, 1, "Unknown value: %x ", pf_content_id);
-                   pf_offset++;        /* to avoid infinite loop */
-                   break;
-               }
-           }
-
-           offset = offset + pf_offset;
-       }
+        pf_id = tvb_get_guint8(tvb, offset);
+
+        tee = proto_tree_add_text(ext_tree_tft, tvb, offset, 1, "Packet filter id: %u", pf_id);
+        ext_tree_tft_pf = proto_item_add_subtree(tee, ett_gtp_tft_pf);
+        offset++;
+
+        if (tft_code != 2) {
+
+            pf_eval = tvb_get_guint8(tvb, offset);
+            pf_len = tvb_get_guint8(tvb, offset + 1);
+
+            proto_tree_add_uint(ext_tree_tft_pf, hf_gtp_tft_eval, tvb, offset, 1, pf_eval);
+            proto_tree_add_text(ext_tree_tft_pf, tvb, offset + 1, 1, "Content length: %u", pf_len);
+
+            offset = offset + 2;
+            pf_offset = 0;
+
+            while (pf_offset < pf_len) {
+
+                pf_content_id = tvb_get_guint8(tvb, offset + pf_offset);
+
+                switch (pf_content_id) {
+                    /* address IPv4 and mask = 8 bytes */
+                case 0x10:
+                    addr_ipv4 = tvb_get_ipv4(tvb, offset + pf_offset + 1);
+                    mask_ipv4 = tvb_get_ipv4(tvb, offset + pf_offset + 5);
+                    proto_tree_add_text(ext_tree_tft_pf, tvb, offset + pf_offset, 9, "ID 0x10: IPv4/mask: %s/%s", ip_to_str((guint8 *) & addr_ipv4),
+                                        ip_to_str((guint8 *) & mask_ipv4));
+                    pf_offset = pf_offset + 9;
+                    break;
+                    /* address IPv6 and mask = 32 bytes */
+                case 0x20:
+                    tvb_get_ipv6(tvb, offset + pf_offset + 1, &addr_ipv6);
+                    tvb_get_ipv6(tvb, offset + pf_offset + 17, &mask_ipv6);
+                    proto_tree_add_text(ext_tree_tft_pf, tvb, offset + pf_offset, 33, "ID 0x20: IPv6/mask: %s/%s",
+                                        ip6_to_str((struct e_in6_addr *) &addr_ipv6), ip6_to_str((struct e_in6_addr *) &mask_ipv6));
+                    pf_offset = pf_offset + 33;
+                    break;
+                    /* protocol identifier/next header type = 1 byte */
+                case 0x30:
+                    proto = tvb_get_guint8(tvb, offset + pf_offset + 1);
+                    proto_tree_add_text(ext_tree_tft_pf, tvb, offset + pf_offset, 2, "ID 0x30: IPv4 protocol identifier/IPv6 next header: %u (%x)",
+                                        proto, proto);
+                    pf_offset = pf_offset + 2;
+                    break;
+                    /* single destination port type = 2 bytes */
+                case 0x40:
+                    port1 = tvb_get_ntohs(tvb, offset + pf_offset + 1);
+                    proto_tree_add_text(ext_tree_tft_pf, tvb, offset + pf_offset, 3, "ID 0x40: destination port: %u", port1);
+                    pf_offset = pf_offset + 3;
+                    break;
+                    /* destination port range type = 4 bytes */
+                case 0x41:
+                    port1 = tvb_get_ntohs(tvb, offset + pf_offset + 1);
+                    port2 = tvb_get_ntohs(tvb, offset + pf_offset + 3);
+                    proto_tree_add_text(ext_tree_tft_pf, tvb, offset + pf_offset, 5, "ID 0x41: destination port range: %u - %u", port1, port2);
+                    pf_offset = pf_offset + 5;
+                    break;
+                    /* single source port type = 2 bytes */
+                case 0x50:
+                    port1 = tvb_get_ntohs(tvb, offset + pf_offset + 1);
+                    proto_tree_add_text(ext_tree_tft_pf, tvb, offset + pf_offset, 3, "ID 0x50: source port: %u", port1);
+                    pf_offset = pf_offset + 3;
+                    break;
+                    /* source port range type = 4 bytes */
+                case 0x51:
+                    port1 = tvb_get_ntohs(tvb, offset + pf_offset + 1);
+                    port2 = tvb_get_ntohs(tvb, offset + pf_offset + 3);
+                    proto_tree_add_text(ext_tree_tft_pf, tvb, offset + pf_offset, 5, "ID 0x51: source port range: %u - %u", port1, port2);
+                    pf_offset = pf_offset + 5;
+                    break;
+                    /* security parameter index type = 4 bytes */
+                case 0x60:
+                    ipsec_id = tvb_get_ntohl(tvb, offset + pf_offset + 1);
+                    proto_tree_add_text(ext_tree_tft_pf, tvb, offset + pf_offset, 5, "ID 0x60: security parameter index: %x", ipsec_id);
+                    pf_offset = pf_offset + 5;
+                    break;
+                    /* type of service/traffic class type = 2 bytes */
+                case 0x70:
+                    tos = tvb_get_ntohs(tvb, offset + pf_offset + 1);
+                    proto_tree_add_text(ext_tree_tft_pf, tvb, offset + pf_offset, 2, "ID 0x70: Type of Service/Traffic Class: %u (%x)", tos, tos);
+                    pf_offset = pf_offset + 3;
+                    break;
+                    /* flow label type = 3 bytes */
+                case 0x80:
+                    label = tvb_get_ntoh24(tvb, offset + pf_offset + 1) & 0x0FFFFF;
+                    proto_tree_add_text(ext_tree_tft_pf, tvb, offset + pf_offset, 4, "ID 0x80: Flow Label: %u (%x)", label, label);
+                    pf_offset = pf_offset + 4;
+                    break;
+
+                default:
+                    proto_tree_add_text(ext_tree_tft_pf, tvb, offset + pf_offset, 1, "Unknown value: %x ", pf_content_id);
+                    pf_offset++;        /* to avoid infinite loop */
+                    break;
+                }
+            }
+
+            offset = offset + pf_offset;
+        }
     }
 
     return 3 + length;
 }
 
-/* GPRS:       not present
- * UMTS:       29.060 v4.0, chapter 7.7.37
+/* GPRS:        not present
+ * UMTS:        29.060 v4.0, chapter 7.7.37
  * Type = 138 (Decimal)
- *             25.413(RANAP) TargetID 
+ *              25.413(RANAP) TargetID
  */
 static int decode_gtp_target_id(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -4673,8 +4673,8 @@ static int decode_gtp_target_id(tvbuff_t * tvb, int offset, packet_info * pinfo
 }
 
 
-/* GPRS:       not present
- * UMTS:       29.060 v4.0, chapter 7.7.38
+/* GPRS:        not present
+ * UMTS:        29.060 v4.0, chapter 7.7.38
  */
 static int decode_gtp_utran_cont(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -4693,15 +4693,15 @@ static int decode_gtp_utran_cont(tvbuff_t * tvb, int offset, packet_info * pinfo
     offset = offset + 2;
     next_tvb = tvb_new_subset(tvb, offset, length, length);
     if (data_handle)
-       call_dissector(data_handle, next_tvb, pinfo, ext_tree);
+        call_dissector(data_handle, next_tvb, pinfo, ext_tree);
 
     return 3 + length;
 
 }
 
 
-/* GPRS:       not present
- * UMTS:       29.060 v4.0, chapter 7.7.39
+/* GPRS:        not present
+ * UMTS:        29.060 v4.0, chapter 7.7.39
  */
 static int decode_gtp_rab_setup(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -4724,30 +4724,30 @@ static int decode_gtp_rab_setup(tvbuff_t * tvb, int offset, packet_info * pinfo
 
     if (length > 1) {
 
-       teid = tvb_get_ntohl(tvb, offset + 4);
-
-       proto_tree_add_uint(ext_tree_rab_setup, hf_gtp_teid_data, tvb, offset + 4, 4, teid);
-
-       switch (length) {
-       case 12:
-           addr_ipv4 = tvb_get_ipv4(tvb, offset + 8);
-           proto_tree_add_ipv4(ext_tree_rab_setup, hf_gtp_rnc_ipv4, tvb, offset + 8, 4, addr_ipv4);
-           break;
-       case 24:
-           tvb_get_ipv6(tvb, offset + 8, &addr_ipv6);
-           proto_tree_add_ipv6(ext_tree_rab_setup, hf_gtp_rnc_ipv6, tvb, offset + 8, 16, (guint8 *) & addr_ipv6);
-           break;
-       default:
-           break;
-       }
+        teid = tvb_get_ntohl(tvb, offset + 4);
+
+        proto_tree_add_uint(ext_tree_rab_setup, hf_gtp_teid_data, tvb, offset + 4, 4, teid);
+
+        switch (length) {
+        case 12:
+            addr_ipv4 = tvb_get_ipv4(tvb, offset + 8);
+            proto_tree_add_ipv4(ext_tree_rab_setup, hf_gtp_rnc_ipv4, tvb, offset + 8, 4, addr_ipv4);
+            break;
+        case 24:
+            tvb_get_ipv6(tvb, offset + 8, &addr_ipv6);
+            proto_tree_add_ipv6(ext_tree_rab_setup, hf_gtp_rnc_ipv6, tvb, offset + 8, 16, (guint8 *) & addr_ipv6);
+            break;
+        default:
+            break;
+        }
     }
 
     return 3 + length;
 }
 
 
-/* GPRS:       not present
- * UMTS:       29.060 v4.0, chapter 7.7.40
+/* GPRS:        not present
+ * UMTS:        29.060 v4.0, chapter 7.7.40
  */
 static int decode_gtp_hdr_list(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -4765,18 +4765,18 @@ static int decode_gtp_hdr_list(tvbuff_t * tvb, int offset, packet_info * pinfo _
     proto_tree_add_text(ext_tree_hdr_list, tvb, offset + 1, 1, "Number of Extension Header Types in list (i.e., length) : %u", length);
 
     for (i = 0; i < length; i++) {
-       hdr = tvb_get_guint8(tvb, offset + 2 + i);
+        hdr = tvb_get_guint8(tvb, offset + 2 + i);
 
-       proto_tree_add_text(ext_tree_hdr_list, tvb, offset + 2 + i, 1, "No. %u --> Extension Header Type value : %s (%u)", i + 1,
-                           val_to_str(hdr, gtp_val, "Unknown Extension Header Type"), hdr);
+        proto_tree_add_text(ext_tree_hdr_list, tvb, offset + 2 + i, 1, "No. %u --> Extension Header Type value : %s (%u)", i + 1,
+                            val_to_str(hdr, gtp_val, "Unknown Extension Header Type"), hdr);
     }
 
     return 2 + length;
 }
 
-/* GPRS:       not present
- * UMTS:       29.060 v4.0, chapter 7.7.41
- * TODO:       find TriggerID description
+/* GPRS:        not present
+ * UMTS:        29.060 v4.0, chapter 7.7.41
+ * TODO:        find TriggerID description
  */
 static int decode_gtp_trigger_id(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -4791,9 +4791,9 @@ static int decode_gtp_trigger_id(tvbuff_t * tvb, int offset, packet_info * pinfo
 
 }
 
-/* GPRS:       not present
- * UMTS:       29.060 v4.0, chapter 7.7.42
- * TODO:       find OMC-ID description
+/* GPRS:        not present
+ * UMTS:        29.060 v4.0, chapter 7.7.42
+ * TODO:        find OMC-ID description
  */
 static int decode_gtp_omc_id(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -4808,8 +4808,8 @@ static int decode_gtp_omc_id(tvbuff_t * tvb, int offset, packet_info * pinfo _U_
 
 }
 
-/* GPRS:       9.60 v7.6.0, chapter 7.9.25
- * UMTS:       29.060 v6.11.0, chapter 7.7.44 Charging Gateway Address
+/* GPRS:        9.60 v7.6.0, chapter 7.9.25
+ * UMTS:        29.060 v6.11.0, chapter 7.7.44 Charging Gateway Address
  */
 static int decode_gtp_chrg_addr(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -4829,25 +4829,25 @@ static int decode_gtp_chrg_addr(tvbuff_t * tvb, int offset, packet_info * pinfo
 
     switch (length) {
     case 4:
-       addr_ipv4 = tvb_get_ipv4(tvb, offset + 3);
-       proto_item_append_text(te, "%s", ip_to_str((guint8 *) & addr_ipv4));
-       proto_tree_add_ipv4(ext_tree_chrg_addr, hf_gtp_chrg_ipv4, tvb, offset + 3, 4, addr_ipv4);
-       break;
+        addr_ipv4 = tvb_get_ipv4(tvb, offset + 3);
+        proto_item_append_text(te, "%s", ip_to_str((guint8 *) & addr_ipv4));
+        proto_tree_add_ipv4(ext_tree_chrg_addr, hf_gtp_chrg_ipv4, tvb, offset + 3, 4, addr_ipv4);
+        break;
     case 16:
-       tvb_get_ipv6(tvb, offset + 3, &addr_ipv6);
-       proto_item_append_text(te, "%s", ip6_to_str((struct e_in6_addr *) &addr_ipv6));
-       proto_tree_add_ipv6(ext_tree_chrg_addr, hf_gtp_chrg_ipv6, tvb, offset + 3, 16, (guint8 *) & addr_ipv6);
-       break;
+        tvb_get_ipv6(tvb, offset + 3, &addr_ipv6);
+        proto_item_append_text(te, "%s", ip6_to_str((struct e_in6_addr *) &addr_ipv6));
+        proto_tree_add_ipv6(ext_tree_chrg_addr, hf_gtp_chrg_ipv6, tvb, offset + 3, 16, (guint8 *) & addr_ipv6);
+        break;
     default:
-       proto_item_append_text(te, "unknown type or wrong length");
-       break;
+        proto_item_append_text(te, "unknown type or wrong length");
+        break;
     }
 
     return 3 + length;
 }
 
-/* GPRS:       ?
- * UMTS:       29.060 v6.11.0, chapter 7.7.44 RAN Transparent Container
+/* GPRS:        ?
+ * UMTS:        29.060 v6.11.0, chapter 7.7.44 RAN Transparent Container
  */
 static int decode_gtp_ran_tr_cont(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -4870,8 +4870,8 @@ static int decode_gtp_ran_tr_cont(tvbuff_t * tvb, int offset, packet_info * pinf
 
 }
 
-/* GPRS:       ?
- * UMTS:       29.060 v6.11.0, chapter 7.7.45 PDP Context Prioritization
+/* GPRS:        ?
+ * UMTS:        29.060 v6.11.0, chapter 7.7.45 PDP Context Prioritization
  */
 static int decode_gtp_pdp_cont_prio(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -4894,8 +4894,8 @@ static int decode_gtp_pdp_cont_prio(tvbuff_t * tvb, int offset, packet_info * pi
 
 }
 
-/* GPRS:       ?
- * UMTS:       29.060 v6.11.0, chapter 7.7.45A Additional RAB Setup Information
+/* GPRS:        ?
+ * UMTS:        29.060 v6.11.0, chapter 7.7.45A Additional RAB Setup Information
  */
 static int decode_gtp_add_rab_setup_inf(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -4943,8 +4943,8 @@ static int decode_gtp_ssgn_no(tvbuff_t * tvb, int offset, packet_info * pinfo _U
 
 }
 
-/* GPRS:       ?
- * UMTS:       3GPP TS 29.060 version 7.8.0 Release 7, chapter 7.7.48 Common Flags
+/* GPRS:        ?
+ * UMTS:        3GPP TS 29.060 version 7.8.0 Release 7, chapter 7.7.48 Common Flags
  */
 static int decode_gtp_common_flgs(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -4979,8 +4979,8 @@ static int decode_gtp_common_flgs(tvbuff_t * tvb, int offset, packet_info * pinf
 
 }
 
-/* GPRS:       ?
- * UMTS:       29.060 v6.11.0, chapter 7.7.49
+/* GPRS:        ?
+ * UMTS:        29.060 v6.11.0, chapter 7.7.49
  */
 static int decode_gtp_apn_res(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -4999,19 +4999,19 @@ static int decode_gtp_apn_res(tvbuff_t * tvb, int offset, packet_info * pinfo _U
 
     /* Restriction Type value */
     if (length != 1) {
-       proto_item *expert_item;
-       expert_item = proto_tree_add_text(tree, tvb, 0, length, "Wrong length indicated. Expected 1, got %u", length);
-       expert_add_info_format(pinfo, expert_item, PI_MALFORMED, PI_ERROR, "Wrong length indicated. Expected 1, got %u", length);
-       PROTO_ITEM_SET_GENERATED(expert_item);
-       return 3 + length;
+        proto_item *expert_item;
+        expert_item = proto_tree_add_text(tree, tvb, 0, length, "Wrong length indicated. Expected 1, got %u", length);
+        expert_add_info_format(pinfo, expert_item, PI_MALFORMED, PI_ERROR, "Wrong length indicated. Expected 1, got %u", length);
+        PROTO_ITEM_SET_GENERATED(expert_item);
+        return 3 + length;
     }
 
     proto_tree_add_item(ext_tree_apn_res, hf_gtp_ext_apn_res, tvb, offset, length, FALSE);
     return 3 + length;
 }
 
-/* GPRS:       ?
- * UMTS:       29.060 v6.11.0, chapter 7.7.50
+/* GPRS:        ?
+ * UMTS:        29.060 v6.11.0, chapter 7.7.50
  * RAT Type
  * Type = 151 (Decimal)
  */
@@ -5033,11 +5033,11 @@ static int decode_gtp_rat_type(tvbuff_t * tvb, int offset, packet_info * pinfo _
 
     /* RAT Type value */
     if (length != 1) {
-       proto_item *expert_item;
-       expert_item = proto_tree_add_text(tree, tvb, 0, length, "Wrong length indicated. Expected 1, got %u", length);
-       expert_add_info_format(pinfo, expert_item, PI_MALFORMED, PI_ERROR, "Wrong length indicated. Expected 1, got %u", length);
-       PROTO_ITEM_SET_GENERATED(expert_item);
-       return 3 + length;
+        proto_item *expert_item;
+        expert_item = proto_tree_add_text(tree, tvb, 0, length, "Wrong length indicated. Expected 1, got %u", length);
+        expert_add_info_format(pinfo, expert_item, PI_MALFORMED, PI_ERROR, "Wrong length indicated. Expected 1, got %u", length);
+        PROTO_ITEM_SET_GENERATED(expert_item);
+        return 3 + length;
     }
 
    proto_tree_add_item(ext_tree_rat_type, hf_gtp_ext_rat_type, tvb, offset, length, FALSE);
@@ -5045,8 +5045,8 @@ static int decode_gtp_rat_type(tvbuff_t * tvb, int offset, packet_info * pinfo _
     return 3 + length;
 }
 
-/* GPRS:       ?
- * UMTS:       29.060 v6.11.0, chapter 7.7.51 
+/* GPRS:        ?
+ * UMTS:        29.060 v6.11.0, chapter 7.7.51
  * User Location Information
  * Type = 152 (Decimal)
  */
@@ -5064,13 +5064,13 @@ static const gchar *dissect_radius_user_loc(proto_tree * tree, tvbuff_t * tvb)
     offset++;
 
     if (geo_loc_type == 0)
-       /* Use gsm_a's function to dissect Geographic Location by faking disc ( last 0) */
-       be_cell_id_aux(tvb, tree, offset, length - 1, NULL, 0, 0);
+        /* Use gsm_a's function to dissect Geographic Location by faking disc ( last 0) */
+        be_cell_id_aux(tvb, tree, offset, length - 1, NULL, 0, 0);
     if (geo_loc_type == 1) {
-       /* Use gsm_a's function to dissect Geographic Location by faking disc ( last 4) */
-       be_cell_id_aux(tvb, tree, offset, length - 1, NULL, 0, 4);
-       offset = offset + 5;
-       proto_tree_add_item(tree, hf_gtp_ext_sac, tvb, offset, 2, FALSE);
+        /* Use gsm_a's function to dissect Geographic Location by faking disc ( last 4) */
+        be_cell_id_aux(tvb, tree, offset, length - 1, NULL, 0, 4);
+        offset = offset + 5;
+        proto_tree_add_item(tree, hf_gtp_ext_sac, tvb, offset, 2, FALSE);
     }
 
 
@@ -5099,13 +5099,13 @@ static int decode_gtp_usr_loc_inf(tvbuff_t * tvb, int offset, packet_info * pinf
     offset++;
 
     if (geo_loc_type == 0)
-       /* Use gsm_a's function to dissect Geographic Location by faking disc ( last 0) */
-       be_cell_id_aux(tvb, ext_tree, offset, length - 1, NULL, 0, 0);
+        /* Use gsm_a's function to dissect Geographic Location by faking disc ( last 0) */
+        be_cell_id_aux(tvb, ext_tree, offset, length - 1, NULL, 0, 0);
     if (geo_loc_type == 1) {
-       /* Use gsm_a's function to dissect Geographic Location by faking disc ( last 4) */
-       be_cell_id_aux(tvb, ext_tree, offset, length - 1, NULL, 0, 4);
-       offset = offset + 5;
-       proto_tree_add_item(ext_tree, hf_gtp_ext_sac, tvb, offset, 2, FALSE);
+        /* Use gsm_a's function to dissect Geographic Location by faking disc ( last 4) */
+        be_cell_id_aux(tvb, ext_tree, offset, length - 1, NULL, 0, 4);
+        offset = offset + 5;
+        proto_tree_add_item(ext_tree, hf_gtp_ext_sac, tvb, offset, 2, FALSE);
     }
 
     return 3 + length;
@@ -5120,12 +5120,12 @@ static const value_string daylight_saving_time_vals[] = {
     {0, NULL}
 };
 
-/* GPRS:       ?
- * UMTS:       29.060 v6.11.0, chapter 7.7.52 
+/* GPRS:        ?
+ * UMTS:        29.060 v6.11.0, chapter 7.7.52
  * MS Time Zone
  * Type = 153 (Decimal)
- * The ' MS Time Zone' IE is used to indicate the offset between universal time and local time 
- * in steps of 15 minutes of where the MS currently resides. The 'Time Zone' field uses the same 
+ * The ' MS Time Zone' IE is used to indicate the offset between universal time and local time
+ * in steps of 15 minutes of where the MS currently resides. The 'Time Zone' field uses the same
  * format as the 'Time Zone' IE in 3GPP TS 24.008 (10.5.3.8)
  * its value shall be set as defined in 3GPP TS 22.042
  */
@@ -5149,8 +5149,8 @@ static int decode_gtp_ms_time_zone(tvbuff_t * tvb, int offset, packet_info * pin
     /* 3GPP TS 23.040 version 6.6.0 Release 6
      * 9.2.3.11 TP-Service-Centre-Time-Stamp (TP-SCTS)
      * :
-     * The Time Zone indicates the difference, expressed in quarters of an hour, 
-     * between the local time and GMT. In the first of the two semi-octets, 
+     * The Time Zone indicates the difference, expressed in quarters of an hour,
+     * between the local time and GMT. In the first of the two semi-octets,
      * the first bit (bit 3 of the seventh octet of the TP-Service-Centre-Time-Stamp field)
      * represents the algebraic sign of this difference (0: positive, 1: negative).
      */
@@ -5170,8 +5170,8 @@ static int decode_gtp_ms_time_zone(tvbuff_t * tvb, int offset, packet_info * pin
 
 }
 
-/* GPRS:       ?
- * UMTS:       29.060 v6.11.0, chapter 7.7.53
+/* GPRS:        ?
+ * UMTS:        29.060 v6.11.0, chapter 7.7.53
  * International Mobile Equipment Identity (and Software Version) (IMEI(SV))
  * Type = 154 (Decimal)
  */
@@ -5192,7 +5192,7 @@ static int decode_gtp_imeisv(tvbuff_t * tvb, int offset, packet_info * pinfo _U_
     proto_tree_add_item(ext_imeisv, hf_gtp_ext_length, tvb, offset, 2, FALSE);
     offset = offset + 2;
 
-    /* IMEI(SV) 
+    /* IMEI(SV)
      * The structure of the IMEI and IMEISV are defined in sub-clause 6.2 of 3GPP TS 23.003 [2].
      * The 'IMEI(SV)' field shall contain the IMEISV if it is available. If only the IMEI is available,
      * then the IMEI shall be placed in the IMEI(SV) field and the last semi-octet of octet 11 shall be
@@ -5206,8 +5206,8 @@ static int decode_gtp_imeisv(tvbuff_t * tvb, int offset, packet_info * pinfo _U_
     return 3 + length;
 }
 
-/* GPRS:       ?
- * UMTS:       29.060 v6.11.0, chapter 7.7.54 
+/* GPRS:        ?
+ * UMTS:        29.060 v6.11.0, chapter 7.7.54
  * CAMEL Charging Information Container
  * Type = 155 (Decimal)
  */
@@ -5232,8 +5232,8 @@ static int decode_gtp_camel_chg_inf_con(tvbuff_t * tvb, int offset, packet_info
 
 }
 
-/* GPRS:       ?
- * UMTS:       29.060 v6.11.0, chapter 7.7.55 
+/* GPRS:        ?
+ * UMTS:        29.060 v6.11.0, chapter 7.7.55
  * MBMS UE Context
  */
 static int decode_gtp_mbms_ue_ctx(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
@@ -5257,8 +5257,8 @@ static int decode_gtp_mbms_ue_ctx(tvbuff_t * tvb, int offset, packet_info * pinf
 
 }
 
-/* GPRS:       ?
- * UMTS:       3GPP TS 29.060 version 7.8.0 Release 7, chapter 7.7.56
+/* GPRS:        ?
+ * UMTS:        3GPP TS 29.060 version 7.8.0 Release 7, chapter 7.7.56
  * Temporary Mobile Group Identity (TMGI)
  * The Temporary Mobile Group Identity (TMGI) information element contains
  * a TMGI allocated by the BM-SC. It is coded as in the value part defined
@@ -5290,8 +5290,8 @@ static int decode_gtp_tmgi(tvbuff_t * tvb, int offset, packet_info * pinfo _U_,
 
 }
 
-/* GPRS:       ?
- * UMTS:       29.060 v6.11.0, chapter 7.7.57
+/* GPRS:        ?
+ * UMTS:        29.060 v6.11.0, chapter 7.7.57
  * RIM Routing Address
  */
 static int decode_gtp_rim_ra(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
@@ -5310,7 +5310,7 @@ static int decode_gtp_rim_ra(tvbuff_t * tvb, int offset, packet_info * pinfo _U_
     offset = offset + 2;
     /* TODO add decoding of data */
     proto_tree_add_text(ext_tree, tvb, offset, length, "Data not decoded yet");
-    /*  
+    /*
      * Octets 4-n are coded according to 3GPP TS 48.018 [20] 11.3.77 RIM Routing Information IE octets 4-n.
      */
 
@@ -5318,8 +5318,8 @@ static int decode_gtp_rim_ra(tvbuff_t * tvb, int offset, packet_info * pinfo _U_
 
 }
 
-/* GPRS:       ?
- * UMTS:       29.060 v6.11.0, chapter 7.7.58
+/* GPRS:        ?
+ * UMTS:        29.060 v6.11.0, chapter 7.7.58
  * MBMS Protocol Configuration Options
  */
 static int decode_gtp_mbms_prot_conf_opt(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
@@ -5343,8 +5343,8 @@ static int decode_gtp_mbms_prot_conf_opt(tvbuff_t * tvb, int offset, packet_info
 
 }
 
-/* GPRS:       ?
- * UMTS:       3GPP TS 29.060 version 7.8.0 Release 7, chapter 7.7.59
+/* GPRS:        ?
+ * UMTS:        3GPP TS 29.060 version 7.8.0 Release 7, chapter 7.7.59
  * MBMS Session Duration
  */
 /* Used for Diameter */
@@ -5395,8 +5395,8 @@ static int decode_gtp_mbms_ses_dur(tvbuff_t * tvb, int offset, packet_info * pin
 
 }
 
-/* GPRS:       ?
- * UMTS:       3GPP TS 29.060 version 7.8.0 Release 7, chapter 7.7.60
+/* GPRS:        ?
+ * UMTS:        3GPP TS 29.060 version 7.8.0 Release 7, chapter 7.7.60
  * MBMS Service Area
  */
 static int decode_gtp_mbms_sa(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
@@ -5420,7 +5420,7 @@ static int decode_gtp_mbms_sa(tvbuff_t * tvb, int offset, packet_info * pinfo _U
      * which the Multimedia Broadcast/Multicast Service is to be distributed.
      * The payload shall be encoded as per the MBMS-Service-Area AVP defined
      * in 3GPP TS 29.061 [27], excluding the AVP Header fields (as defined in
-     * IETF RFC 3588 [36], section 4.1). 
+     * IETF RFC 3588 [36], section 4.1).
      */
     /* Number N of MBMS service area codes coded as:
      * 1 binary value is '00000000'
@@ -5429,26 +5429,26 @@ static int decode_gtp_mbms_sa(tvbuff_t * tvb, int offset, packet_info * pinfo _U
      */
     no_of_mbms_sa_codes = tvb_get_guint8(tvb, offset) + 1;
     if (length != ((no_of_mbms_sa_codes << 1) + 1)) {
-       expert_add_info_format(pinfo, item, PI_RESPONSE_CODE, PI_WARN,
-                              "Wrong length: %u. The length of an MBMS service area code is 2 octets", length);
+        expert_add_info_format(pinfo, item, PI_RESPONSE_CODE, PI_WARN,
+                               "Wrong length: %u. The length of an MBMS service area code is 2 octets", length);
     }
     proto_tree_add_uint(ext_tree, hf_gtp_no_of_mbms_sa_codes, tvb, offset, 1, no_of_mbms_sa_codes);
     offset++;
-    /* A consecutive list of N MBMS service area codes 
+    /* A consecutive list of N MBMS service area codes
      * The MBMS Service Area Identity and its semantics are defined in 3GPP TS 23.003
      * The length of an MBMS service area code is 2 octets.
      */
     for (i = 0; i < no_of_mbms_sa_codes; i++) {
-       proto_tree_add_item(ext_tree, hf_gtp_mbms_sa_code, tvb, offset, 2, FALSE);
-       offset = offset + 2;
+        proto_tree_add_item(ext_tree, hf_gtp_mbms_sa_code, tvb, offset, 2, FALSE);
+        offset = offset + 2;
     }
 
     return 3 + length;
 
 }
 
-/* GPRS:       ?
- * UMTS:       29.060 v6.11.0, chapter 7.7.61
+/* GPRS:        ?
+ * UMTS:        29.060 v6.11.0, chapter 7.7.61
  * Source RNC PDCP context info
  */
 static int decode_gtp_src_rnc_pdp_ctx_inf(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
@@ -5472,8 +5472,8 @@ static int decode_gtp_src_rnc_pdp_ctx_inf(tvbuff_t * tvb, int offset, packet_inf
 
 }
 
-/* GPRS:       ?
- * UMTS:       29.060 v6.11.0, chapter 7.7.62 
+/* GPRS:        ?
+ * UMTS:        29.060 v6.11.0, chapter 7.7.62
  * Additional Trace Info
  */
 static int decode_gtp_add_trs_inf(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
@@ -5497,8 +5497,8 @@ static int decode_gtp_add_trs_inf(tvbuff_t * tvb, int offset, packet_info * pinf
 
 }
 
-/* GPRS:       ?
- * UMTS:       29.060 v6.11.0, chapter 7.7.63 
+/* GPRS:        ?
+ * UMTS:        29.060 v6.11.0, chapter 7.7.63
  * Hop Counter
  */
 static int decode_gtp_hop_count(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
@@ -5522,8 +5522,8 @@ static int decode_gtp_hop_count(tvbuff_t * tvb, int offset, packet_info * pinfo
 
 }
 
-/* GPRS:       ?
- * UMTS:       29.060 v6.11.0, chapter 7.7.64 
+/* GPRS:        ?
+ * UMTS:        29.060 v6.11.0, chapter 7.7.64
  * Selected PLMN ID
  */
 static int decode_gtp_sel_plmn_id(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
@@ -5547,8 +5547,8 @@ static int decode_gtp_sel_plmn_id(tvbuff_t * tvb, int offset, packet_info * pinf
 
 }
 
-/* GPRS:       ?
- * UMTS:       29.060 v6.11.0, chapter 7.7.65
+/* GPRS:        ?
+ * UMTS:        29.060 v6.11.0, chapter 7.7.65
  * MBMS Session Identifier
  */
 static int decode_gtp_mbms_ses_id(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
@@ -5572,8 +5572,8 @@ static int decode_gtp_mbms_ses_id(tvbuff_t * tvb, int offset, packet_info * pinf
 
 }
 
-/* GPRS:       ?
- * UMTS:       29.060 v6.11.0, chapter 7.7.66
+/* GPRS:        ?
+ * UMTS:        29.060 v6.11.0, chapter 7.7.66
  * MBMS 2G/3G Indicator
  */
 static const value_string gtp_mbs_2g_3g_ind_vals[] = {
@@ -5604,8 +5604,8 @@ static int decode_gtp_mbms_2g_3g_ind(tvbuff_t * tvb, int offset, packet_info * p
 
 }
 
-/* GPRS:       ?
- * UMTS:       29.060 v6.11.0, chapter 7.7.67
+/* GPRS:        ?
+ * UMTS:        29.060 v6.11.0, chapter 7.7.67
  * Enhanced NSAPI
  */
 static int decode_gtp_enh_nsapi(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
@@ -5629,8 +5629,8 @@ static int decode_gtp_enh_nsapi(tvbuff_t * tvb, int offset, packet_info * pinfo
 
 }
 
-/* GPRS:       ?
- * UMTS:       29.060 v6.11.0, chapter 7.7.68
+/* GPRS:        ?
+ * UMTS:        29.060 v6.11.0, chapter 7.7.68
  * Additional MBMS Trace Info
  */
 static int decode_gtp_add_mbms_trs_inf(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
@@ -5654,8 +5654,8 @@ static int decode_gtp_add_mbms_trs_inf(tvbuff_t * tvb, int offset, packet_info *
 
 }
 
-/* GPRS:       ?
- * UMTS:       29.060 v6.11.0, chapter 7.7.69
+/* GPRS:        ?
+ * UMTS:        29.060 v6.11.0, chapter 7.7.69
  * MBMS Session Identity Repetition Number
  */
 static int decode_gtp_mbms_ses_id_rep_no(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
@@ -5679,8 +5679,8 @@ static int decode_gtp_mbms_ses_id_rep_no(tvbuff_t * tvb, int offset, packet_info
 
 }
 
-/* GPRS:       ?
- * UMTS:       3GPP TS 29.060 version 7.8.0 Release 7
+/* GPRS:        ?
+ * UMTS:        3GPP TS 29.060 version 7.8.0 Release 7
  * MBMS Time To Data Transfer
  */
 /* Used for Diameter */
@@ -5712,12 +5712,12 @@ static int decode_gtp_mbms_time_to_data_tr(tvbuff_t * tvb, int offset, packet_in
     offset++;
     proto_tree_add_item(ext_tree, hf_gtp_ext_length, tvb, offset, 2, FALSE);
     offset = offset + 2;
-    /* TODO add decoding of data 
+    /* TODO add decoding of data
      * The MBMS Time To Data Transfer is defined in 3GPP TS 23.246 [26].
-     * The MBMS Time To Data Transfer information element contains a 
-     * MBMS Time To Data Transfer allocated by the BM-SC. 
-     * The payload shall be encoded as per the MBMS-Time-To-Data-Transfer AVP 
-     * defined in 3GPP TS 29.061 [27], excluding the AVP Header fields 
+     * The MBMS Time To Data Transfer information element contains a
+     * MBMS Time To Data Transfer allocated by the BM-SC.
+     * The payload shall be encoded as per the MBMS-Time-To-Data-Transfer AVP
+     * defined in 3GPP TS 29.061 [27], excluding the AVP Header fields
      * (as defined in IETF RFC 3588 [36], section 4.1).
      */
     /* The coding is specified as per the Time to MBMS Data Transfer Value Part Coding
@@ -5737,11 +5737,11 @@ static int decode_gtp_mbms_time_to_data_tr(tvbuff_t * tvb, int offset, packet_in
 
 }
 
-/* GPRS:       ?
- * UMTS:       29.060 v6.11.0, chapter 7.7.71
+/* GPRS:        ?
+ * UMTS:        29.060 v6.11.0, chapter 7.7.71
  * PS Handover Request Context
  */
-static int 
+static int
 decode_gtp_ps_ho_req_ctx(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
 
@@ -5763,11 +5763,11 @@ decode_gtp_ps_ho_req_ctx(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, pr
 
 }
 
-/* GPRS:       ?
- * UMTS:       29.060 v6.11.0, chapter 7.7.72
+/* GPRS:        ?
+ * UMTS:        29.060 v6.11.0, chapter 7.7.72
  * BSS Container
  */
-static int 
+static int
 decode_gtp_bss_cont(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
 
@@ -5792,11 +5792,11 @@ decode_gtp_bss_cont(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_t
 
 }
 
-/* GPRS:       ?
- * UMTS:       29.060 v6.11.0, chapter 7.7.73
+/* GPRS:        ?
+ * UMTS:        29.060 v6.11.0, chapter 7.7.73
  * Cell Identification
  */
-static int 
+static int
 decode_gtp_cell_id(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
 
@@ -5825,11 +5825,11 @@ decode_gtp_cell_id(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tr
 
 }
 
-/* GPRS:       ?
- * UMTS:       29.060 v6.11.0, chapter 7.7.74
+/* GPRS:        ?
+ * UMTS:        29.060 v6.11.0, chapter 7.7.74
  * PDU Numbers
  */
-static int 
+static int
 decode_gtp_pdu_no(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
 
@@ -5851,11 +5851,11 @@ decode_gtp_pdu_no(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tre
 
 }
 
-/* GPRS:       ?
- * UMTS:       29.060 v6.11.0, chapter 7.7.75
+/* GPRS:        ?
+ * UMTS:        29.060 v6.11.0, chapter 7.7.75
  * BSSGP Cause
  */
-static int 
+static int
 decode_gtp_bssgp_cause(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
 
@@ -5871,7 +5871,7 @@ decode_gtp_bssgp_cause(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, prot
     proto_tree_add_item(ext_tree, hf_gtp_ext_length, tvb, offset, 2, FALSE);
     offset = offset + 2;
 
-    /*      
+    /*
      * The BSSGP Cause information element contains the cause as defined in 3GPP TS 48.018
      */
     proto_tree_add_item(ext_tree, hf_gtp_bssgp_cause, tvb, offset, 2, FALSE);
@@ -5881,9 +5881,9 @@ decode_gtp_bssgp_cause(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, prot
 }
 
 /*
- * Required MBMS bearer capabilities   7.7.76
+ * Required MBMS bearer capabilities    7.7.76
  */
-static int 
+static int
 decode_gtp_mbms_bearer_cap(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
     guint16 length;
@@ -5897,18 +5897,18 @@ decode_gtp_mbms_bearer_cap(tvbuff_t * tvb, int offset, packet_info * pinfo _U_,
     offset++;
     proto_tree_add_item(ext_tree, hf_gtp_ext_length, tvb, offset, 2, FALSE);
     offset = offset + 2;
-    /* The payload shall be encoded as per the 
+    /* The payload shall be encoded as per the
      * Required-MBMS-Bearer-Capabilities AVP defined in 3GPP TS 29.061 [27],
      * excluding the AVP Header fields (as defined in IETF RFC 3588 [36], section 4.1).
      */
     /* TODO Add decoding (call Diameter dissector???) */
-       return 3 + length;
+        return 3 + length;
 }
 
 /*
- * RIM Routing Address Discriminator   7.7.77
+ * RIM Routing Address Discriminator    7.7.77
  */
-static int 
+static int
 decode_gtp_rim_ra_disc(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
 
@@ -5930,9 +5930,9 @@ decode_gtp_rim_ra_disc(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, prot
 
 }
 /*
- * List of set-up PFCs 7.7.78
+ * List of set-up PFCs  7.7.78
  */
-static int 
+static int
 decode_gtp_lst_set_up_pfc(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
 
@@ -5954,7 +5954,7 @@ decode_gtp_lst_set_up_pfc(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, p
 
 }
 /*
- * PS Handover XID Parameters  7.7.79
+ * PS Handover XID Parameters   7.7.79
  */
 static int decode_gtp_ps_handover_xid(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -5983,17 +5983,17 @@ static int decode_gtp_ps_handover_xid(tvbuff_t * tvb, int offset, packet_info *
     offset++;
 
     if (sndcpxid_handle) {
-       next_tvb = tvb_new_subset_remaining(tvb, offset);
-       call_dissector(sndcpxid_handle, next_tvb, pinfo, tree);
+        next_tvb = tvb_new_subset_remaining(tvb, offset);
+        call_dissector(sndcpxid_handle, next_tvb, pinfo, tree);
     } else
-       proto_tree_add_text(tree, tvb, offset, 0, "Data");
+        proto_tree_add_text(tree, tvb, offset, 0, "Data");
 
     return 4 + length;
 
 }
 
 /*
- * MS Info Change Reporting Action     7.7.80
+ * MS Info Change Reporting Action      7.7.80
  */
 static int decode_gtp_ms_inf_chg_rep_act(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -6016,7 +6016,7 @@ static int decode_gtp_ms_inf_chg_rep_act(tvbuff_t * tvb, int offset, packet_info
 
 }
 /*
- * Direct Tunnel Flags 7.7.81
+ * Direct Tunnel Flags  7.7.81
  */
 static int decode_gtp_direct_tnl_flg(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -6043,7 +6043,7 @@ static int decode_gtp_direct_tnl_flg(tvbuff_t * tvb, int offset, packet_info * p
 
 }
 /*
- * Correlation-ID      7.7.82
+ * Correlation-ID       7.7.82
  */
 static int decode_gtp_corrl_id(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -6066,7 +6066,7 @@ static int decode_gtp_corrl_id(tvbuff_t * tvb, int offset, packet_info * pinfo _
 
 }
 /*
- * Bearer Control Mode 7.7.83
+ * Bearer Control Mode  7.7.83
  */
 static int decode_gtp_bearer_cntrl_mod(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -6088,8 +6088,8 @@ static int decode_gtp_bearer_cntrl_mod(tvbuff_t * tvb, int offset, packet_info *
     return 3 + length;
 
 }
-/* GPRS:       12.15
- * UMTS:       33.015
+/* GPRS:        12.15
+ * UMTS:        33.015
  */
 static int decode_gtp_rel_pack(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -6107,17 +6107,17 @@ static int decode_gtp_rel_pack(tvbuff_t * tvb, int offset, packet_info * pinfo _
 
     while (n < length) {
 
-       number = tvb_get_ntohs(tvb, offset + 3 + n);
-       proto_tree_add_text(ext_tree_rel_pack, tvb, offset + 3 + n, 2, "%u", number);
-       n = n + 2;
+        number = tvb_get_ntohs(tvb, offset + 3 + n);
+        proto_tree_add_text(ext_tree_rel_pack, tvb, offset + 3 + n, 2, "%u", number);
+        n = n + 2;
 
     }
 
     return 3 + length;
 }
 
-/* GPRS:       12.15
- * UMTS:       33.015
+/* GPRS:        12.15
+ * UMTS:        33.015
  */
 static int decode_gtp_can_pack(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -6135,9 +6135,9 @@ static int decode_gtp_can_pack(tvbuff_t * tvb, int offset, packet_info * pinfo _
 
     while (n < length) {
 
-       number = tvb_get_ntohs(tvb, offset + 3 + n);
-       proto_tree_add_text(ext_tree_can_pack, tvb, offset + 3 + n, 2, "%u", number);
-       n = n + 2;
+        number = tvb_get_ntohs(tvb, offset + 3 + n);
+        proto_tree_add_text(ext_tree_can_pack, tvb, offset + 3 + n, 2, "%u", number);
+        n = n + 2;
     }
 
     return 3 + length;
@@ -6167,16 +6167,16 @@ static int decode_gtp_data_req(tvbuff_t * tvb, int offset, packet_info * pinfo _
     proto_tree_add_text(ext_tree, tvb, offset + 5, 2, "Data record format version: %u", format_ver);
 
     if (gtpcdr_handle) {
-       next_tvb = tvb_new_subset_remaining(tvb, offset);
-       call_dissector(gtpcdr_handle, next_tvb, pinfo, tree);
+        next_tvb = tvb_new_subset_remaining(tvb, offset);
+        call_dissector(gtpcdr_handle, next_tvb, pinfo, tree);
     } else
-       proto_tree_add_text(tree, tvb, offset, 0, "Data");
+        proto_tree_add_text(tree, tvb, offset, 0, "Data");
 
     return 3 + length;
 }
 
-/* GPRS:       12.15
- * UMTS:       33.015
+/* GPRS:        12.15
+ * UMTS:        33.015
  */
 static int decode_gtp_data_resp(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -6194,9 +6194,9 @@ static int decode_gtp_data_resp(tvbuff_t * tvb, int offset, packet_info * pinfo
 
     while (n < length) {
 
-       number = tvb_get_ntohs(tvb, offset + 3 + n);
-       proto_tree_add_text(ext_tree_data_resp, tvb, offset + 3 + n, 2, "%u", number);
-       n = n + 2;
+        number = tvb_get_ntohs(tvb, offset + 3 + n);
+        proto_tree_add_text(ext_tree_data_resp, tvb, offset + 3 + n, 2, "%u", number);
+        n = n + 2;
 
     }
 
@@ -6204,8 +6204,8 @@ static int decode_gtp_data_resp(tvbuff_t * tvb, int offset, packet_info * pinfo
 
 }
 
-/* GPRS:       12.15
- * UMTS:       33.015
+/* GPRS:        12.15
+ * UMTS:        33.015
  */
 static int decode_gtp_node_addr(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
 {
@@ -6225,27 +6225,27 @@ static int decode_gtp_node_addr(tvbuff_t * tvb, int offset, packet_info * pinfo
 
     switch (length) {
     case 4:
-       addr_ipv4 = tvb_get_ipv4(tvb, offset + 3);
-       proto_item_append_text(te, "%s", ip_to_str((guint8 *) & addr_ipv4));
-       proto_tree_add_ipv4(ext_tree_node_addr, hf_gtp_node_ipv4, tvb, offset + 3, 4, addr_ipv4);
-       break;
+        addr_ipv4 = tvb_get_ipv4(tvb, offset + 3);
+        proto_item_append_text(te, "%s", ip_to_str((guint8 *) & addr_ipv4));
+        proto_tree_add_ipv4(ext_tree_node_addr, hf_gtp_node_ipv4, tvb, offset + 3, 4, addr_ipv4);
+        break;
     case 16:
-       tvb_get_ipv6(tvb, offset + 3, &addr_ipv6);
-       proto_item_append_text(te, "%s", ip6_to_str((struct e_in6_addr *) &addr_ipv6));
-       proto_tree_add_ipv6(ext_tree_node_addr, hf_gtp_node_ipv6, tvb, offset + 3, 16, (guint8 *) & addr_ipv6);
-       break;
+        tvb_get_ipv6(tvb, offset + 3, &addr_ipv6);
+        proto_item_append_text(te, "%s", ip6_to_str((struct e_in6_addr *) &addr_ipv6));
+        proto_tree_add_ipv6(ext_tree_node_addr, hf_gtp_node_ipv6, tvb, offset + 3, 16, (guint8 *) & addr_ipv6);
+        break;
     default:
-       proto_item_append_text(te, "unknown type or wrong length");
-       break;
+        proto_item_append_text(te, "unknown type or wrong length");
+        break;
     }
 
     return 3 + length;
 
 }
 
-/* GPRS:       9.60 v7.6.0, chapter 7.9.26
- * UMTS:       29.060 v4.0, chapter 7.7.46 Private Extension
- * 
+/* GPRS:        9.60 v7.6.0, chapter 7.9.26
+ * UMTS:        29.060 v4.0, chapter 7.7.46 Private Extension
+ *
  */
 
 static int decode_gtp_priv_ext(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
@@ -6263,16 +6263,16 @@ static int decode_gtp_priv_ext(tvbuff_t * tvb, int offset, packet_info * pinfo _
     proto_tree_add_item(ext_tree_priv_ext, hf_gtp_ext_length, tvb, offset, 2, FALSE);
     offset = offset + 2;
     if (length >= 2) {
-       ext_id = tvb_get_ntohs(tvb, offset);
-       proto_tree_add_uint(ext_tree_priv_ext, hf_gtp_ext_id, tvb, offset, 2, ext_id);
-       offset = offset + 2;
-
-       /*
-        * XXX - is this always a text string?  Or should it be
-        * displayed as hex data?
-        */
-       if (length > 2)
-           proto_tree_add_item(ext_tree_priv_ext, hf_gtp_ext_val, tvb, offset, length - 2, FALSE);
+        ext_id = tvb_get_ntohs(tvb, offset);
+        proto_tree_add_uint(ext_tree_priv_ext, hf_gtp_ext_id, tvb, offset, 2, ext_id);
+        offset = offset + 2;
+
+        /*
+         * XXX - is this always a text string?  Or should it be
+         * displayed as hex data?
+         */
+        if (length > 2)
+            proto_tree_add_item(ext_tree_priv_ext, hf_gtp_ext_val, tvb, offset, length - 2, FALSE);
     }
 
     return 3 + length;
@@ -6304,18 +6304,18 @@ static void dissect_gtp(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
     gtp_conv_info_t *gtp_info=(gtp_conv_info_t *)pinfo->private_data;
     void* pd_save;
 
-       /* 
-        * If this is GTPv2-C call the gtpv2 dissector if present 
-        * Should this be moved to after the conversation stuff to retain that functionality for GTPv2 ???
-        */
-       version = tvb_get_guint8(tvb,0)>>5;
-       if (version==2) {
-               /* GTPv2-C 3GPP TS 29.274 */
-               if (gtpv2_handle) {
-                       call_dissector(gtpv2_handle, tvb, pinfo, tree);
-                       return;
-               }
-       }
+        /*
+         * If this is GTPv2-C call the gtpv2 dissector if present
+         * Should this be moved to after the conversation stuff to retain that functionality for GTPv2 ???
+         */
+        version = tvb_get_guint8(tvb,0)>>5;
+        if (version==2) {
+                /* GTPv2-C 3GPP TS 29.274 */
+                if (gtpv2_handle) {
+                        call_dissector(gtpv2_handle, tvb, pinfo, tree);
+                        return;
+                }
+        }
 
     col_set_str(pinfo->cinfo, COL_PROTOCOL, "GTP");
     col_clear(pinfo->cinfo, COL_INFO);
@@ -6352,191 +6352,191 @@ static void dissect_gtp(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
     }
     pd_save = pinfo->private_data;
     pinfo->private_data = gtp_info;
-       
+
     tvb_memcpy(tvb, (guint8 *) & gtp_hdr, 0, 4);
 
     if (!(gtp_hdr.flags & 0x10))
-               gtp_prime = 1;
+                gtp_prime = 1;
     else
-               gtp_prime = 0;
+                gtp_prime = 0;
 
     switch ((gtp_hdr.flags >> 5) & 0x07) {
-           case 0:
-                       gtp_version = 0;
-                       break;
-               case 1:
-                       gtp_version = 1;
-                       break;
-           default:
-                       gtp_version = 1;
-                       break;
+            case 0:
+                        gtp_version = 0;
+                        break;
+                case 1:
+                        gtp_version = 1;
+                        break;
+            default:
+                        gtp_version = 1;
+                        break;
     }
 
     if (check_col(pinfo->cinfo, COL_INFO))
-               col_add_str(pinfo->cinfo, COL_INFO, val_to_str(gtp_hdr.message, message_type, "Unknown"));
+                col_add_str(pinfo->cinfo, COL_INFO, val_to_str(gtp_hdr.message, message_type, "Unknown"));
 
     if (tree) {
-       ti = proto_tree_add_item(tree, proto_gtp, tvb, 0, -1, FALSE);
-       gtp_tree = proto_item_add_subtree(ti, ett_gtp);
-
-       tf = proto_tree_add_uint(gtp_tree, hf_gtp_flags, tvb, 0, 1, gtp_hdr.flags);
-       flags_tree = proto_item_add_subtree(tf, ett_gtp_flags);
-
-       proto_tree_add_uint(flags_tree, hf_gtp_flags_ver, tvb, 0, 1, gtp_hdr.flags);
-       
-       if(version>=2){
-               proto_tree_add_text(tree, tvb, 0, -1, "No WS dissector for GTP version %u %s", version, val_to_str(version, ver_types, "Unknown"));
-               pinfo->private_data = pd_save;
-               return;
-       }
-
-       proto_tree_add_uint(flags_tree, hf_gtp_flags_pt, tvb, 0, 1, gtp_hdr.flags);
-
-       switch (gtp_version) {
-       case 0:
-           proto_tree_add_uint(flags_tree, hf_gtp_flags_spare1, tvb, 0, 1, gtp_hdr.flags);
-           proto_tree_add_boolean(flags_tree, hf_gtp_flags_snn, tvb, 0, 1, gtp_hdr.flags);
-           break;
-       case 1:
-           proto_tree_add_uint(flags_tree, hf_gtp_flags_spare2, tvb, 0, 1, gtp_hdr.flags);
-           proto_tree_add_boolean(flags_tree, hf_gtp_flags_e, tvb, 0, 1, gtp_hdr.flags);
-           proto_tree_add_boolean(flags_tree, hf_gtp_flags_s, tvb, 0, 1, gtp_hdr.flags);
-           proto_tree_add_boolean(flags_tree, hf_gtp_flags_pn, tvb, 0, 1, gtp_hdr.flags);
-           break;
-       default:
-           break;
-       }
-
-       proto_tree_add_uint(gtp_tree, hf_gtp_message_type, tvb, 1, 1, gtp_hdr.message);
-
-       gtp_hdr.length = g_ntohs(gtp_hdr.length);
-       proto_tree_add_uint(gtp_tree, hf_gtp_length, tvb, 2, 2, gtp_hdr.length);
-
-       offset = 4;
-
-       if (gtp_prime) {
-           seq_no = tvb_get_ntohs(tvb, offset);
-           proto_tree_add_uint(gtp_tree, hf_gtp_seq_number, tvb, offset, 2, seq_no);
-           offset += 2;
-       } else
-           switch (gtp_version) {
-           case 0:
-               seq_no = tvb_get_ntohs(tvb, offset);
-               proto_tree_add_uint(gtp_tree, hf_gtp_seq_number, tvb, offset, 2, seq_no);
-               offset += 2;
-
-               flow_label = tvb_get_ntohs(tvb, offset);
-               proto_tree_add_uint(gtp_tree, hf_gtp_flow_label, tvb, offset, 2, flow_label);
-               offset += 2;
-
-               pdu_no = tvb_get_guint8(tvb, offset);
-               proto_tree_add_uint(gtp_tree, hf_gtp_sndcp_number, tvb, offset, 1, pdu_no);
-               offset += 4;
-
-               tid_val = tvb_get_ptr(tvb, offset, 8);
-               tid_str = id_to_str(tid_val);
-               proto_tree_add_string(gtp_tree, hf_gtp_tid, tvb, offset, 8, tid_str);
-               offset += 8;
-               break;
-           case 1:
-               teid = tvb_get_ntohl(tvb, offset);
-               proto_tree_add_uint(gtp_tree, hf_gtp_teid, tvb, offset, 4, teid);
-               offset += 4;
-
-               if (gtp_hdr.flags & 0x07) {
-                   seq_no = tvb_get_ntohs(tvb, offset);
-                   proto_tree_add_uint(gtp_tree, hf_gtp_seq_number, tvb, offset, 2, seq_no);
-                   offset += 2;
-
-                   pdu_no = tvb_get_guint8(tvb, offset);
-                   proto_tree_add_uint(gtp_tree, hf_gtp_npdu_number, tvb, offset, 1, pdu_no);
-                   offset++;
-
-                   next_hdr = tvb_get_guint8(tvb, offset);
-                   proto_tree_add_uint(gtp_tree, hf_gtp_next, tvb, offset, 1, next_hdr);
-                   if (!next_hdr)
-                       offset++;
-               }
-               break;
-           default:
-               break;
-           }
-
-       if (gtp_hdr.message != GTP_MSG_TPDU) {
-           /* TODO: This code should be cleaned up to handle more than one
-            * header and possibly display the header content */
-           if (next_hdr) {
-               offset++;
-               switch (next_hdr) {
-               case 1:
-                   /* MBMS support indication */
-                   proto_tree_add_text(gtp_tree, tvb, offset, 4, "[--- MBMS support indication header ---]");
-                   offset += 3;
-                   break;
-               case 2:
-                   /* MS Info Change Reporting support indication */
-                   proto_tree_add_text(gtp_tree, tvb, offset, 4, "[--- MS Info Change Reporting support indication header ---]");
-                   offset += 3;
-                   break;
-               case 0xc0:
-                   /* PDCP PDU number */
-                   proto_tree_add_text(gtp_tree, tvb, offset, 4, "[--- PDCP PDU number header ---]");
-                   offset += 3;
-                   break;
-               case 0xc1:
-                   /* Suspend Request */
-                   proto_tree_add_text(gtp_tree, tvb, offset, 4, "[--- Suspend Request header ---]");
-                   offset += 3;
-                   break;
-               case 0xc2:
-                   /* Suspend Response */
-                   proto_tree_add_text(gtp_tree, tvb, offset, 4, "[--- Suspend Response header ---]");
-                   offset += 3;
-                   break;
-               default:
-                   proto_tree_add_text(gtp_tree, tvb, offset, 4, "[--- Unknown extension header ---]");
-                   offset += 3;
-                   break;
-               }
-               next_hdr = tvb_get_guint8(tvb, offset);
-               proto_tree_add_uint(gtp_tree, hf_gtp_next, tvb, offset, 1, next_hdr);
-               offset++;
-           }
-           proto_tree_add_text(gtp_tree, tvb, 0, 0, "[--- end of GTP header, beginning of extension headers ---]");
-           length = tvb_length(tvb);
-           mandatory = 0;      /* check order of GTP fields against ETSI */
-           for (;;) {
-               if (offset >= length)
-                   break;
-               if (next_hdr) {
-                   ext_hdr_val = next_hdr;
-                   next_hdr = 0;
-               } else
-                   ext_hdr_val = tvb_get_guint8(tvb, offset);
-               if (g_gtp_etsi_order) {
-                   checked_field = check_field_presence(gtp_hdr.message, ext_hdr_val, (int *) &mandatory);
-                   switch (checked_field) {
-                   case -2:
-                       proto_tree_add_text(gtp_tree, tvb, 0, 0, "[WARNING] message not found");
-                       break;
-                   case -1:
-                       proto_tree_add_text(gtp_tree, tvb, 0, 0, "[WARNING] field not present");
-                       break;
-                   case 0:
-                       break;
-                   default:
-                       proto_tree_add_text(gtp_tree, tvb, offset, 1, "[WARNING] wrong next field, should be: %s",
-                                           val_to_str(checked_field, gtp_val, "Unknown extension field"));
-                       break;
-                   }
-               }
-
-               i = -1;
-               while (gtpopt[++i].optcode)
-                   if (gtpopt[i].optcode == ext_hdr_val)
-                       break;
-               offset = offset + (*gtpopt[i].decode) (tvb, offset, pinfo, gtp_tree);
-           }
+        ti = proto_tree_add_item(tree, proto_gtp, tvb, 0, -1, FALSE);
+        gtp_tree = proto_item_add_subtree(ti, ett_gtp);
+
+        tf = proto_tree_add_uint(gtp_tree, hf_gtp_flags, tvb, 0, 1, gtp_hdr.flags);
+        flags_tree = proto_item_add_subtree(tf, ett_gtp_flags);
+
+        proto_tree_add_uint(flags_tree, hf_gtp_flags_ver, tvb, 0, 1, gtp_hdr.flags);
+
+        if(version>=2){
+                proto_tree_add_text(tree, tvb, 0, -1, "No WS dissector for GTP version %u %s", version, val_to_str(version, ver_types, "Unknown"));
+                pinfo->private_data = pd_save;
+                return;
+        }
+
+        proto_tree_add_uint(flags_tree, hf_gtp_flags_pt, tvb, 0, 1, gtp_hdr.flags);
+
+        switch (gtp_version) {
+        case 0:
+            proto_tree_add_uint(flags_tree, hf_gtp_flags_spare1, tvb, 0, 1, gtp_hdr.flags);
+            proto_tree_add_boolean(flags_tree, hf_gtp_flags_snn, tvb, 0, 1, gtp_hdr.flags);
+            break;
+        case 1:
+            proto_tree_add_uint(flags_tree, hf_gtp_flags_spare2, tvb, 0, 1, gtp_hdr.flags);
+            proto_tree_add_boolean(flags_tree, hf_gtp_flags_e, tvb, 0, 1, gtp_hdr.flags);
+            proto_tree_add_boolean(flags_tree, hf_gtp_flags_s, tvb, 0, 1, gtp_hdr.flags);
+            proto_tree_add_boolean(flags_tree, hf_gtp_flags_pn, tvb, 0, 1, gtp_hdr.flags);
+            break;
+        default:
+            break;
+        }
+
+        proto_tree_add_uint(gtp_tree, hf_gtp_message_type, tvb, 1, 1, gtp_hdr.message);
+
+        gtp_hdr.length = g_ntohs(gtp_hdr.length);
+        proto_tree_add_uint(gtp_tree, hf_gtp_length, tvb, 2, 2, gtp_hdr.length);
+
+        offset = 4;
+
+        if (gtp_prime) {
+            seq_no = tvb_get_ntohs(tvb, offset);
+            proto_tree_add_uint(gtp_tree, hf_gtp_seq_number, tvb, offset, 2, seq_no);
+            offset += 2;
+        } else
+            switch (gtp_version) {
+            case 0:
+                seq_no = tvb_get_ntohs(tvb, offset);
+                proto_tree_add_uint(gtp_tree, hf_gtp_seq_number, tvb, offset, 2, seq_no);
+                offset += 2;
+
+                flow_label = tvb_get_ntohs(tvb, offset);
+                proto_tree_add_uint(gtp_tree, hf_gtp_flow_label, tvb, offset, 2, flow_label);
+                offset += 2;
+
+                pdu_no = tvb_get_guint8(tvb, offset);
+                proto_tree_add_uint(gtp_tree, hf_gtp_sndcp_number, tvb, offset, 1, pdu_no);
+                offset += 4;
+
+                tid_val = tvb_get_ptr(tvb, offset, 8);
+                tid_str = id_to_str(tid_val);
+                proto_tree_add_string(gtp_tree, hf_gtp_tid, tvb, offset, 8, tid_str);
+                offset += 8;
+                break;
+            case 1:
+                teid = tvb_get_ntohl(tvb, offset);
+                proto_tree_add_uint(gtp_tree, hf_gtp_teid, tvb, offset, 4, teid);
+                offset += 4;
+
+                if (gtp_hdr.flags & 0x07) {
+                    seq_no = tvb_get_ntohs(tvb, offset);
+                    proto_tree_add_uint(gtp_tree, hf_gtp_seq_number, tvb, offset, 2, seq_no);
+                    offset += 2;
+
+                    pdu_no = tvb_get_guint8(tvb, offset);
+                    proto_tree_add_uint(gtp_tree, hf_gtp_npdu_number, tvb, offset, 1, pdu_no);
+                    offset++;
+
+                    next_hdr = tvb_get_guint8(tvb, offset);
+                    proto_tree_add_uint(gtp_tree, hf_gtp_next, tvb, offset, 1, next_hdr);
+                    if (!next_hdr)
+                        offset++;
+                }
+                break;
+            default:
+                break;
+            }
+
+        if (gtp_hdr.message != GTP_MSG_TPDU) {
+            /* TODO: This code should be cleaned up to handle more than one
+             * header and possibly display the header content */
+            if (next_hdr) {
+                offset++;
+                switch (next_hdr) {
+                case 1:
+                    /* MBMS support indication */
+                    proto_tree_add_text(gtp_tree, tvb, offset, 4, "[--- MBMS support indication header ---]");
+                    offset += 3;
+                    break;
+                case 2:
+                    /* MS Info Change Reporting support indication */
+                    proto_tree_add_text(gtp_tree, tvb, offset, 4, "[--- MS Info Change Reporting support indication header ---]");
+                    offset += 3;
+                    break;
+                case 0xc0:
+                    /* PDCP PDU number */
+                    proto_tree_add_text(gtp_tree, tvb, offset, 4, "[--- PDCP PDU number header ---]");
+                    offset += 3;
+                    break;
+                case 0xc1:
+                    /* Suspend Request */
+                    proto_tree_add_text(gtp_tree, tvb, offset, 4, "[--- Suspend Request header ---]");
+                    offset += 3;
+                    break;
+                case 0xc2:
+                    /* Suspend Response */
+                    proto_tree_add_text(gtp_tree, tvb, offset, 4, "[--- Suspend Response header ---]");
+                    offset += 3;
+                    break;
+                default:
+                    proto_tree_add_text(gtp_tree, tvb, offset, 4, "[--- Unknown extension header ---]");
+                    offset += 3;
+                    break;
+                }
+                next_hdr = tvb_get_guint8(tvb, offset);
+                proto_tree_add_uint(gtp_tree, hf_gtp_next, tvb, offset, 1, next_hdr);
+                offset++;
+            }
+            proto_tree_add_text(gtp_tree, tvb, 0, 0, "[--- end of GTP header, beginning of extension headers ---]");
+            length = tvb_length(tvb);
+            mandatory = 0;      /* check order of GTP fields against ETSI */
+            for (;;) {
+                if (offset >= length)
+                    break;
+                if (next_hdr) {
+                    ext_hdr_val = next_hdr;
+                    next_hdr = 0;
+                } else
+                    ext_hdr_val = tvb_get_guint8(tvb, offset);
+                if (g_gtp_etsi_order) {
+                    checked_field = check_field_presence(gtp_hdr.message, ext_hdr_val, (int *) &mandatory);
+                    switch (checked_field) {
+                    case -2:
+                        proto_tree_add_text(gtp_tree, tvb, 0, 0, "[WARNING] message not found");
+                        break;
+                    case -1:
+                        proto_tree_add_text(gtp_tree, tvb, 0, 0, "[WARNING] field not present");
+                        break;
+                    case 0:
+                        break;
+                    default:
+                        proto_tree_add_text(gtp_tree, tvb, offset, 1, "[WARNING] wrong next field, should be: %s",
+                                            val_to_str(checked_field, gtp_val, "Unknown extension field"));
+                        break;
+                    }
+                }
+
+                i = -1;
+                while (gtpopt[++i].optcode)
+                    if (gtpopt[i].optcode == ext_hdr_val)
+                        break;
+                offset = offset + (*gtpopt[i].decode) (tvb, offset, pinfo, gtp_tree);
+            }
 
             /*Use sequence number to track Req/Resp pairs*/
             if (seq_no) {
@@ -6548,55 +6548,55 @@ static void dissect_gtp(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
             }
         }
     }
-    
+
     if ((gtp_hdr.message == GTP_MSG_TPDU) && g_gtp_tpdu) {
 
-       if (gtp_prime)
-           offset = 6;
-       else if (gtp_version == 1) {
-           if (gtp_hdr.flags & 0x07) {
-               offset = 11;
-               if (tvb_get_guint8(tvb, offset) == 0)
-                   offset++;
-           } else
-               offset = 8;
-       } else
-           offset = 20;
-
-       sub_proto = tvb_get_guint8(tvb, offset);
-
-       if ((sub_proto >= 0x45) && (sub_proto <= 0x4e)) {
-           /* this is most likely an IPv4 packet
-            * we can exclude 0x40 - 0x44 because the minimum header size is 20 octets
-            * 0x4f is excluded because PPP protocol type "IPv6 header compression"
-            * with protocol field compression is more likely than a plain IPv4 packet with 60 octet header size */
-
-           next_tvb = tvb_new_subset_remaining(tvb, offset);
-           call_dissector(ip_handle, next_tvb, pinfo, tree);
-
-       } else if ((sub_proto & 0xf0) == 0x60) {
-           /* this is most likely an IPv6 packet */
-           next_tvb = tvb_new_subset_remaining(tvb, offset);
-           call_dissector(ipv6_handle, next_tvb, pinfo, tree);
-       } else {
-           /* this seems to be a PPP packet */
-
-           if (sub_proto == 0xff) {
-               /* this might be an address field, even it shouldn't be here */
-               control_field = tvb_get_guint8(tvb, offset + 1);
-               if (control_field == 0x03)
-                   /* now we are pretty sure that address and control field are mistakenly inserted -> ignore it for PPP dissection */
-                   acfield_len = 2;
-           }
-
-           next_tvb = tvb_new_subset_remaining(tvb, offset + acfield_len);
-           call_dissector(ppp_handle, next_tvb, pinfo, tree);
-       }
-
-       if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
-           col_prepend_fstr(pinfo->cinfo, COL_PROTOCOL, "GTP <");
-           col_append_str(pinfo->cinfo, COL_PROTOCOL, ">");
-       }
+        if (gtp_prime)
+            offset = 6;
+        else if (gtp_version == 1) {
+            if (gtp_hdr.flags & 0x07) {
+                offset = 11;
+                if (tvb_get_guint8(tvb, offset) == 0)
+                    offset++;
+            } else
+                offset = 8;
+        } else
+            offset = 20;
+
+        sub_proto = tvb_get_guint8(tvb, offset);
+
+        if ((sub_proto >= 0x45) && (sub_proto <= 0x4e)) {
+            /* this is most likely an IPv4 packet
+             * we can exclude 0x40 - 0x44 because the minimum header size is 20 octets
+             * 0x4f is excluded because PPP protocol type "IPv6 header compression"
+             * with protocol field compression is more likely than a plain IPv4 packet with 60 octet header size */
+
+            next_tvb = tvb_new_subset_remaining(tvb, offset);
+            call_dissector(ip_handle, next_tvb, pinfo, tree);
+
+        } else if ((sub_proto & 0xf0) == 0x60) {
+            /* this is most likely an IPv6 packet */
+            next_tvb = tvb_new_subset_remaining(tvb, offset);
+            call_dissector(ipv6_handle, next_tvb, pinfo, tree);
+        } else {
+            /* this seems to be a PPP packet */
+
+            if (sub_proto == 0xff) {
+                /* this might be an address field, even it shouldn't be here */
+                control_field = tvb_get_guint8(tvb, offset + 1);
+                if (control_field == 0x03)
+                    /* now we are pretty sure that address and control field are mistakenly inserted -> ignore it for PPP dissection */
+                    acfield_len = 2;
+            }
+
+            next_tvb = tvb_new_subset_remaining(tvb, offset + acfield_len);
+            call_dissector(ppp_handle, next_tvb, pinfo, tree);
+        }
+
+        if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
+            col_prepend_fstr(pinfo->cinfo, COL_PROTOCOL, "GTP <");
+            col_append_str(pinfo->cinfo, COL_PROTOCOL, ">");
+        }
     }
     pinfo->private_data = pd_save;
 }
@@ -6631,414 +6631,414 @@ void proto_register_gtp(void)
 {
     static hf_register_info hf_gtp[] = {
 
-       {&hf_gtp_response_in,
-        {"Response In", "gtp.response_in", FT_FRAMENUM, BASE_NONE, NULL, 0x0, "The response to this GTP request is in this frame", HFILL}},
-       {&hf_gtp_response_to,
-        {"Response To", "gtp.response_to", FT_FRAMENUM, BASE_NONE, NULL, 0x0, "This is a response to the GTP request in this frame", HFILL}},
-       {&hf_gtp_time, {"Time", "gtp.time", FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0, "The time between the Request and the Response", HFILL}},
-       {&hf_gtp_apn, {"APN", "gtp.apn", FT_STRING, BASE_NONE, NULL, 0, "Access Point Name", HFILL}},
-       {&hf_gtp_cause, {"Cause", "gtp.cause", FT_UINT8, BASE_DEC, VALS(cause_type), 0, "Cause of operation", HFILL}},
-       {&hf_gtp_chrg_char, {"Charging characteristics", "gtp.chrg_char", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL}},
-       {&hf_gtp_chrg_char_s, {"Spare", "gtp.chrg_char_s", FT_UINT16, BASE_DEC, NULL, GTP_MASK_CHRG_CHAR_S, NULL, HFILL}},
-       {&hf_gtp_chrg_char_n, {"Normal charging", "gtp.chrg_char_n", FT_UINT16, BASE_DEC, NULL, GTP_MASK_CHRG_CHAR_N, NULL, HFILL}},
-       {&hf_gtp_chrg_char_p, {"Prepaid charging", "gtp.chrg_char_p", FT_UINT16, BASE_DEC, NULL, GTP_MASK_CHRG_CHAR_P, NULL, HFILL}},
-       {&hf_gtp_chrg_char_f,
-        {"Flat rate charging", "gtp.chrg_char_f", FT_UINT16, BASE_DEC, NULL, GTP_MASK_CHRG_CHAR_F, NULL, HFILL}},
-       {&hf_gtp_chrg_char_h,
-        {"Hot billing charging", "gtp.chrg_char_h", FT_UINT16, BASE_DEC, NULL, GTP_MASK_CHRG_CHAR_H, NULL, HFILL}},
-       {&hf_gtp_chrg_char_r, {"Reserved", "gtp.chrg_char_r", FT_UINT16, BASE_DEC, NULL, GTP_MASK_CHRG_CHAR_R, NULL, HFILL}},
-       {&hf_gtp_chrg_id, {"Charging ID", "gtp.chrg_id", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL}},
-       {&hf_gtp_chrg_ipv4, {"CG address IPv4", "gtp.chrg_ipv4", FT_IPv4, BASE_NONE, NULL, 0, "Charging Gateway address IPv4", HFILL}},
-       {&hf_gtp_chrg_ipv6, {"CG address IPv6", "gtp.chrg_ipv6", FT_IPv6, BASE_NONE, NULL, 0, "Charging Gateway address IPv6", HFILL}},
-       {&hf_gtp_ext_flow_label, {"Flow Label Data I", "gtp.ext_flow_label", FT_UINT16, BASE_HEX, NULL, 0, "Flow label data", HFILL}},
-       {&hf_gtp_ext_id, {"Extension identifier", "gtp.ext_id", FT_UINT16, BASE_DEC, VALS(sminmpec_values), 0, "Extension Identifier", HFILL}},
-       {&hf_gtp_ext_val, {"Extension value", "gtp.ext_val", FT_BYTES, BASE_NONE, NULL, 0, "Extension Value", HFILL}},
-       {&hf_gtp_flags, {"Flags", "gtp.flags", FT_UINT8, BASE_HEX, NULL, 0, "Ver/PT/Spare...", HFILL}},
-       {&hf_gtp_flags_ver,
-        {"Version", "gtp.flags.version",
-         FT_UINT8, BASE_DEC, VALS(ver_types), GTP_VER_MASK,
-         "GTP Version", HFILL}
-        },
-       {&hf_gtp_flags_pt,
-        {"Protocol type", "gtp.flags.payload",
-         FT_UINT8, BASE_DEC, VALS(pt_types), GTP_PT_MASK,
-         "Protocol Type", HFILL}
-        },
-       {&hf_gtp_flags_spare1,
-        {"Reserved", "gtp.flags.reserved",
-         FT_UINT8, BASE_DEC, NULL, GTP_SPARE1_MASK,
-         "Reserved (shall be sent as '111' )", HFILL}
-        },
-       {&hf_gtp_flags_snn,
-        {"Is SNDCP N-PDU included?", "gtp.flags.snn", FT_BOOLEAN, 8, TFS(&yes_no_tfs), GTP_SNN_MASK,
-         "Is SNDCP N-PDU LLC Number included? (1 = yes, 0 = no)", HFILL}},
-       {&hf_gtp_flags_spare2,
-        {"Reserved", "gtp.flags.reserved", FT_UINT8, BASE_DEC, NULL, GTP_SPARE2_MASK, "Reserved (shall be sent as '1' )", HFILL}},
-       {&hf_gtp_flags_e,
-        {"Is Next Extension Header present?", "gtp.flags.e", FT_BOOLEAN, 8, TFS(&yes_no_tfs), GTP_E_MASK,
-         "Is Next Extension Header present? (1 = yes, 0 = no)", HFILL}},
-       {&hf_gtp_flags_s,
-        {"Is Sequence Number present?", "gtp.flags.s", FT_BOOLEAN, 8, TFS(&yes_no_tfs), GTP_S_MASK, "Is Sequence Number present? (1 = yes, 0 = no)",
-         HFILL}},
-       {&hf_gtp_flags_pn,
-        {"Is N-PDU number present?", "gtp.flags.pn", FT_BOOLEAN, 8, TFS(&yes_no_tfs), GTP_PN_MASK, "Is N-PDU number present? (1 = yes, 0 = no)",
-         HFILL}},
-       {&hf_gtp_flow_ii, {"Flow Label Data II", "gtp.flow_ii", FT_UINT16, BASE_DEC, NULL, 0, "Downlink flow label data", HFILL}},
-       {&hf_gtp_flow_label, {"Flow label", "gtp.flow_label", FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL}},
-       {&hf_gtp_flow_sig, {"Flow label Signalling", "gtp.flow_sig", FT_UINT16, BASE_HEX, NULL, 0, "Flow label signalling", HFILL}},
-       {&hf_gtp_gsn_addr_len,
-        {"GSN Address Length", "gtp.gsn_addr_len", FT_UINT8, BASE_DEC, NULL, GTP_EXT_GSN_ADDR_LEN_MASK, NULL, HFILL}},
-       {&hf_gtp_gsn_addr_type,
-        {"GSN Address Type", "gtp.gsn_addr_type", FT_UINT8, BASE_DEC, VALS(gsn_addr_type), GTP_EXT_GSN_ADDR_TYPE_MASK, NULL, HFILL}},
-       {&hf_gtp_gsn_ipv4, {"GSN address IPv4", "gtp.gsn_ipv4", FT_IPv4, BASE_NONE, NULL, 0, NULL, HFILL}},
-       {&hf_gtp_gsn_ipv6, {"GSN address IPv6", "gtp.gsn_ipv6", FT_IPv6, BASE_NONE, NULL, 0, NULL, HFILL}},
-       {&hf_gtp_imsi, {"IMSI", "gtp.imsi", FT_STRING, BASE_NONE, NULL, 0, "International Mobile Subscriber Identity number", HFILL}},
-       {&hf_gtp_length, {"Length", "gtp.length", FT_UINT16, BASE_DEC, NULL, 0, "Length (i.e. number of octets after TID or TEID)", HFILL}},
-       {&hf_gtp_map_cause, {"MAP cause", "gtp.map_cause", FT_UINT8, BASE_DEC, VALS(gsm_old_GSMMAPLocalErrorcode_vals), 0, NULL, HFILL}},
-       {&hf_gtp_message_type, {"Message Type", "gtp.message", FT_UINT8, BASE_HEX, VALS(message_type), 0x0, "GTP Message Type", HFILL}},
-       {&hf_gtp_ms_reason,
-        {"MS not reachable reason", "gtp.ms_reason", FT_UINT8, BASE_DEC, VALS(ms_not_reachable_type), 0, "MS Not Reachable Reason", HFILL}},
-       {&hf_gtp_ms_valid, {"MS validated", "gtp.ms_valid", FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL}},
-       {&hf_gtp_msisdn, {"MSISDN", "gtp.msisdn", FT_STRING, BASE_NONE, NULL, 0, "MS international PSTN/ISDN number", HFILL}},
-       {&hf_gtp_next,
-        {"Next extension header type", "gtp.next", FT_UINT8, BASE_HEX, VALS(next_extension_header_fieldvals), 0, "Next Extension Header Type",
-         HFILL}},
-       {&hf_gtp_node_ipv4, {"Node address IPv4", "gtp.node_ipv4", FT_IPv4, BASE_NONE, NULL, 0, "Recommended node address IPv4", HFILL}},
-       {&hf_gtp_node_ipv6, {"Node address IPv6", "gtp.node_ipv6", FT_IPv6, BASE_NONE, NULL, 0, "Recommended node address IPv6", HFILL}},
-       {&hf_gtp_npdu_number, {"N-PDU Number", "gtp.npdu_number", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL}},
-       {&hf_gtp_nsapi, {"NSAPI", "gtp.nsapi", FT_UINT8, BASE_DEC, NULL, 0, "Network layer Service Access Point Identifier", HFILL}},
-       {&hf_gtp_qos_version, {"Version", "gtp.qos_version", FT_STRING, BASE_NONE, NULL, 0, "Version of the QoS Profile", HFILL}},
-       {&hf_gtp_qos_spare1, {"Spare", "gtp.qos_spare1", FT_UINT8, BASE_DEC, NULL, GTP_EXT_QOS_SPARE1_MASK, "Spare (shall be sent as '00' )", HFILL}},
-       {&hf_gtp_qos_delay,
-        {"QoS delay", "gtp.qos_delay", FT_UINT8, BASE_DEC, VALS(qos_delay_type), GTP_EXT_QOS_DELAY_MASK, "Quality of Service Delay Class", HFILL}},
-       {&hf_gtp_qos_reliability,
-        {"QoS reliability", "gtp.qos_reliability", FT_UINT8, BASE_DEC, VALS(qos_reliability_type), GTP_EXT_QOS_RELIABILITY_MASK,
-         "Quality of Service Reliability Class", HFILL}},
-       {&hf_gtp_qos_peak,
-        {"QoS peak", "gtp.qos_peak", FT_UINT8, BASE_DEC, VALS(qos_peak_type), GTP_EXT_QOS_PEAK_MASK, "Quality of Service Peak Throughput", HFILL}},
-       {&hf_gtp_qos_spare2, {"Spare", "gtp.qos_spare2", FT_UINT8, BASE_DEC, NULL, GTP_EXT_QOS_SPARE2_MASK, "Spare (shall be sent as 0)", HFILL}},
-       {&hf_gtp_qos_precedence,
-        {"QoS precedence", "gtp.qos_precedence", FT_UINT8, BASE_DEC, VALS(qos_precedence_type), GTP_EXT_QOS_PRECEDENCE_MASK,
-         "Quality of Service Precedence Class", HFILL}},
-       {&hf_gtp_qos_spare3,
-        {"Spare", "gtp.qos_spare3", FT_UINT8, BASE_DEC, NULL, GTP_EXT_QOS_SPARE3_MASK, "Spare (shall be sent as '000' )", HFILL}},
-       {&hf_gtp_qos_mean,
-        {"QoS mean", "gtp.qos_mean", FT_UINT8, BASE_DEC, VALS(qos_mean_type), GTP_EXT_QOS_MEAN_MASK, "Quality of Service Mean Throughput", HFILL}},
-       {&hf_gtp_qos_al_ret_priority,
-        {"Allocation/Retention priority", "gtp.qos_al_ret_priority", FT_UINT8, BASE_DEC, NULL, 0, "Allocation/Retention Priority", HFILL}},
-       {&hf_gtp_qos_traf_class,
-        {"Traffic class", "gtp.qos_traf_class", FT_UINT8, BASE_DEC, VALS(qos_traf_class), GTP_EXT_QOS_TRAF_CLASS_MASK, "Traffic Class", HFILL}},
-       {&hf_gtp_qos_del_order,
-        {"Delivery order", "gtp.qos_del_order", FT_UINT8, BASE_DEC, VALS(qos_del_order), GTP_EXT_QOS_DEL_ORDER_MASK, "Delivery Order", HFILL}},
-       {&hf_gtp_qos_del_err_sdu,
-        {"Delivery of erroneous SDU", "gtp.qos_del_err_sdu", FT_UINT8, BASE_DEC, VALS(qos_del_err_sdu), GTP_EXT_QOS_DEL_ERR_SDU_MASK,
-         "Delivery of Erroneous SDU", HFILL}},
-       {&hf_gtp_qos_max_sdu_size,
-        {"Maximum SDU size", "gtp.qos_max_sdu_size", FT_UINT8, BASE_DEC, VALS(qos_max_sdu_size), 0, NULL, HFILL}},
-       {&hf_gtp_qos_max_ul,
-        {"Maximum bit rate for uplink", "gtp.qos_max_ul", FT_UINT8, BASE_DEC, VALS(qos_max_ul), 0, NULL, HFILL}},
-       {&hf_gtp_qos_max_dl,
-        {"Maximum bit rate for downlink", "gtp.qos_max_dl", FT_UINT8, BASE_DEC, VALS(qos_max_dl), 0, NULL, HFILL}},
-       {&hf_gtp_qos_res_ber,
-        {"Residual BER", "gtp.qos_res_ber", FT_UINT8, BASE_DEC, VALS(qos_res_ber), GTP_EXT_QOS_RES_BER_MASK, "Residual Bit Error Rate", HFILL}},
-       {&hf_gtp_qos_sdu_err_ratio,
-        {"SDU Error ratio", "gtp.qos_sdu_err_ratio", FT_UINT8, BASE_DEC, VALS(qos_sdu_err_ratio), GTP_EXT_QOS_SDU_ERR_RATIO_MASK, "SDU Error Ratio",
-         HFILL}},
-       {&hf_gtp_qos_trans_delay,
-        {"Transfer delay", "gtp.qos_trans_delay", FT_UINT8, BASE_DEC, VALS(qos_trans_delay), GTP_EXT_QOS_TRANS_DELAY_MASK, "Transfer Delay", HFILL}},
-       {&hf_gtp_qos_traf_handl_prio,
-        {"Traffic handling priority", "gtp.qos_traf_handl_prio", FT_UINT8, BASE_DEC, VALS(qos_traf_handl_prio), GTP_EXT_QOS_TRAF_HANDL_PRIORITY_MASK,
-         "Traffic Handling Priority", HFILL}},
-       {&hf_gtp_qos_guar_ul,
-        {"Guaranteed bit rate for uplink", "gtp.qos_guar_ul", FT_UINT8, BASE_DEC, VALS(qos_guar_ul), 0, NULL, HFILL}},
-       {&hf_gtp_qos_guar_dl,
-        {"Guaranteed bit rate for downlink", "gtp.qos_guar_dl", FT_UINT8, BASE_DEC, VALS(qos_guar_dl), 0, NULL,
-         HFILL}},
-       {&hf_gtp_qos_src_stat_desc,
-                {"Source Statistics Descriptor", "gtp.src_stat_desc", FT_UINT8, BASE_DEC, VALS(src_stat_desc_vals), GTP_EXT_QOS_SRC_STAT_DESC_MASK, NULL, HFILL}},
-       {&hf_gtp_qos_sig_ind,
-                {"Signalling Indication", "gtp.sig_ind", FT_BOOLEAN, 8, TFS(&gtp_sig_ind), GTP_EXT_QOS_SIG_IND_MASK, NULL, HFILL}},
-       {&hf_gtp_pkt_flow_id, {"Packet Flow ID", "gtp.pkt_flow_id", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL}},
-       {&hf_gtp_ptmsi, {"P-TMSI", "gtp.ptmsi", FT_UINT32, BASE_HEX, NULL, 0, "Packet-Temporary Mobile Subscriber Identity", HFILL}},
-       {&hf_gtp_ptmsi_sig, {"P-TMSI Signature", "gtp.ptmsi_sig", FT_UINT24, BASE_HEX, NULL, 0, NULL, HFILL}},
-       {&hf_gtp_rab_gtpu_dn, {"Downlink GTP-U seq number", "gtp.rab_gtp_dn", FT_UINT16, BASE_DEC, NULL, 0, "Downlink GTP-U sequence number", HFILL}},
-       {&hf_gtp_rab_gtpu_up, {"Uplink GTP-U seq number", "gtp.rab_gtp_up", FT_UINT16, BASE_DEC, NULL, 0, "Uplink GTP-U sequence number", HFILL}},
-       {&hf_gtp_rab_pdu_dn,
-        {"Downlink next PDCP-PDU seq number", "gtp.rab_pdu_dn", FT_UINT16, BASE_DEC, NULL, 0, "Downlink next PDCP-PDU sequence number", HFILL}},
-       {&hf_gtp_rab_pdu_up,
-        {"Uplink next PDCP-PDU seq number", "gtp.rab_pdu_up", FT_UINT16, BASE_DEC, NULL, 0, "Uplink next PDCP-PDU sequence number", HFILL}},
-       {&hf_gtp_rai_mcc, {"MCC", "gtp.mcc", FT_UINT16, BASE_DEC, NULL, 0, "Mobile Country Code", HFILL}},
-       {&hf_gtp_rai_mnc, {"MNC", "gtp.mnc", FT_UINT8, BASE_DEC, NULL, 0, "Mobile Network Code", HFILL}},
-       {&hf_gtp_rai_rac, {"RAC", "gtp.rac", FT_UINT8, BASE_DEC, NULL, 0, "Routing Area Code", HFILL}},
-       {&hf_gtp_rai_lac, {"LAC", "gtp.lac", FT_UINT16, BASE_DEC, NULL, 0, "Location Area Code", HFILL}},
-       {&hf_gtp_ranap_cause, {"RANAP cause", "gtp.ranap_cause", FT_UINT8, BASE_DEC, VALS(ranap_cause_type), 0, NULL, HFILL}},
-       {&hf_gtp_recovery, {"Recovery", "gtp.recovery", FT_UINT8, BASE_DEC, NULL, 0, "Restart counter", HFILL}},
-       {&hf_gtp_reorder, {"Reordering required", "gtp.reorder", FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL}},
-       {&hf_gtp_rnc_ipv4, {"RNC address IPv4", "gtp.rnc_ipv4", FT_IPv4, BASE_NONE, NULL, 0, "Radio Network Controller address IPv4", HFILL}},
-       {&hf_gtp_rnc_ipv6, {"RNC address IPv6", "gtp.rnc_ipv6", FT_IPv6, BASE_NONE, NULL, 0, "Radio Network Controller address IPv6", HFILL}},
-       {&hf_gtp_rp, {"Radio Priority", "gtp.rp", FT_UINT8, BASE_DEC, NULL, GTPv1_EXT_RP_MASK, "Radio Priority for uplink tx", HFILL}},
-       {&hf_gtp_rp_nsapi,
-        {"NSAPI in Radio Priority", "gtp.rp_nsapi", FT_UINT8, BASE_DEC, NULL, GTPv1_EXT_RP_NSAPI_MASK,
-         "Network layer Service Access Point Identifier in Radio Priority", HFILL}},
-       {&hf_gtp_rp_sms, {"Radio Priority SMS", "gtp.rp_sms", FT_UINT8, BASE_DEC, NULL, 0, "Radio Priority for MO SMS", HFILL}},
-       {&hf_gtp_rp_spare, {"Reserved", "gtp.rp_spare", FT_UINT8, BASE_DEC, NULL, GTPv1_EXT_RP_SPARE_MASK, "Spare bit", HFILL}},
-       {&hf_gtp_sel_mode,
-        {"Selection mode", "gtp.sel_mode",
-         FT_UINT8, BASE_DEC, VALS(sel_mode_type), 0x03,
-         "Selection Mode", HFILL}
-        },
-       {&hf_gtp_seq_number, {"Sequence number", "gtp.seq_number", FT_UINT16, BASE_HEX, NULL, 0, "Sequence Number", HFILL}},
-       {&hf_gtp_sndcp_number, {"SNDCP N-PDU LLC Number", "gtp.sndcp_number", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL}},
-       {&hf_gtp_tear_ind, {"Teardown Indicator", "gtp.tear_ind", FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL}},
-       {&hf_gtp_teid, {"TEID", "gtp.teid", FT_UINT32, BASE_HEX, NULL, 0, "Tunnel Endpoint Identifier", HFILL}},
-       {&hf_gtp_teid_cp, {"TEID Control Plane", "gtp.teid_cp", FT_UINT32, BASE_HEX, NULL, 0, "Tunnel Endpoint Identifier Control Plane", HFILL}},
-       {&hf_gtp_ulink_teid_cp,
-        {"Uplink TEID Control Plane", "gtp.ulink_teid_cp", FT_UINT32, BASE_HEX, NULL, 0, "Uplink Tunnel Endpoint Identifier Control Plane", HFILL}},
-       {&hf_gtp_teid_data, {"TEID Data I", "gtp.teid_data", FT_UINT32, BASE_HEX, NULL, 0, "Tunnel Endpoint Identifier Data I", HFILL}},
-       {&hf_gtp_ulink_teid_data,
-        {"Uplink TEID Data I", "gtp.ulink_teid_data", FT_UINT32, BASE_HEX, NULL, 0, "UplinkTunnel Endpoint Identifier Data I", HFILL}},
-       {&hf_gtp_teid_ii, {"TEID Data II", "gtp.teid_ii", FT_UINT32, BASE_HEX, NULL, 0, "Tunnel Endpoint Identifier Data II", HFILL}},
-       {&hf_gtp_tft_code,
-        {"TFT operation code", "gtp.tft_code", FT_UINT8, BASE_DEC, VALS(tft_code_type), GTPv1_TFT_CODE_MASK, NULL, HFILL}},
-       {&hf_gtp_tft_spare, {"TFT spare bit", "gtp.tft_spare", FT_UINT8, BASE_DEC, NULL, GTPv1_TFT_SPARE_MASK, NULL, HFILL}},
-       {&hf_gtp_tft_number,
-        {"Number of packet filters", "gtp.tft_number", FT_UINT8, BASE_DEC, NULL, GTPv1_TFT_NUMBER_MASK, NULL, HFILL}},
-       {&hf_gtp_tft_eval, {"Evaluation precedence", "gtp.tft_eval", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL}},
-       {&hf_gtp_tid, {"TID", "gtp.tid", FT_STRING, BASE_NONE, NULL, 0, "Tunnel Identifier", HFILL}},
-       {&hf_gtp_tlli, {"TLLI", "gtp.tlli", FT_UINT32, BASE_HEX, NULL, 0, "Temporary Logical Link Identity", HFILL}},
-       {&hf_gtp_tr_comm, {"Packet transfer command", "gtp.tr_comm", FT_UINT8, BASE_DEC, VALS(tr_comm_type), 0, "Packat transfer command", HFILL}},
-       {&hf_gtp_trace_ref, {"Trace reference", "gtp.trace_ref", FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL}},
-       {&hf_gtp_trace_type, {"Trace type", "gtp.trace_type", FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL}},
-       {&hf_gtp_unknown, {"Unknown data (length)", "gtp.unknown", FT_UINT16, BASE_DEC, NULL, 0, "Unknown data", HFILL}},
-       {&hf_gtp_user_addr_pdp_org,
-        {"PDP type organization", "gtp.user_addr_pdp_org", FT_UINT8, BASE_DEC, VALS(pdp_org_type), 0, NULL, HFILL}},
-       {&hf_gtp_user_addr_pdp_type, {"PDP type number", "gtp.user_addr_pdp_type", FT_UINT8, BASE_HEX, VALS(pdp_type), 0, "PDP type", HFILL}},
-       {&hf_gtp_user_ipv4, {"End user address IPv4", "gtp.user_ipv4", FT_IPv4, BASE_NONE, NULL, 0, NULL, HFILL}},
-       {&hf_gtp_user_ipv6, {"End user address IPv6", "gtp.user_ipv6", FT_IPv6, BASE_NONE, NULL, 0, NULL, HFILL}},
-       {&hf_gtp_security_mode,
-        {"Security Mode", "gtp.security_mode",
-         FT_UINT8, BASE_DEC, VALS(mm_sec_modep), 0xc0,
-         NULL, HFILL}
-        },
-       {&hf_gtp_no_of_vectors,
-        {"No of Vectors", "gtp.no_of_vectors",
-         FT_UINT8, BASE_DEC, NULL, 0x38,
-         NULL, HFILL}
-        },
-       {&hf_gtp_cipher_algorithm,
-        {"Cipher Algorithm", "gtp.no_of_vectors",
-         FT_UINT8, BASE_DEC, VALS(gtp_cipher_algorithm), 0x07,
-         NULL, HFILL}
-        },
-       {&hf_gtp_cksn_ksi,
-        {"Ciphering Key Sequence Number (CKSN)/Key Set Identifier (KSI)", "gtp.cksn_ksi",
-         FT_UINT8, BASE_DEC, NULL, 0x07,
-         "CKSN/KSI", HFILL}
-        },
-       {&hf_gtp_cksn,
-        {"Ciphering Key Sequence Number (CKSN)", "gtp.cksn_ksi",
-         FT_UINT8, BASE_DEC, NULL, 0x07,
-         "CKSN", HFILL}
-        },
-       {&hf_gtp_ksi,
-        {"Key Set Identifier (KSI)", "gtp.cksn_ksi",
-         FT_UINT8, BASE_DEC, NULL, 0x07,
-         "KSI", HFILL}
-        },
-       {&hf_gtp_ext_length,
-        {"Length", "gtp.ext_length",
-         FT_UINT16, BASE_DEC, NULL, 0x0,
-         "IE Length", HFILL}
-        },
-       {&hf_gtp_ext_apn_res,
-        {"Restriction Type", "gtp.ext_apn_res",
-         FT_UINT8, BASE_DEC, NULL, 0x0,
-         NULL, HFILL}
-        },
-       {&hf_gtp_ext_rat_type,   
-      {"RAT Type", "gtp.ext_rat_type",   
-       FT_UINT8, BASE_DEC, VALS(gtp_ext_rat_type_vals), 0x0,   
-       NULL, HFILL}   
-     }, 
-       {&hf_gtp_ext_geo_loc_type,
-        {"Geographic Location Type", "gtp.ext_geo_loc_type",
-         FT_UINT8, BASE_DEC, NULL, 0x0,
-         NULL, HFILL}
-        },
-       {&hf_gtp_ext_sac,
-        {"SAC", "gtp.ext_sac",
-         FT_UINT16, BASE_HEX, NULL, 0x0,
-         NULL, HFILL}
-        },
-       {&hf_gtp_ext_imeisv,
-        {"IMEI(SV)", "gtp.ext_imeisv",
-         FT_STRING, BASE_NONE, NULL, 0x0,
-         NULL, HFILL}
-        },
-    { &hf_gtp_targetRNC_ID,
-      { "targetRNC-ID", "gtp.targetRNC_ID",
-        FT_NONE, BASE_NONE, NULL, 0,
-        NULL, HFILL }},
-       {&hf_gtp_bssgp_cause,
-        {"BSSGP Cause", "gtp.bssgp_cause",
-         FT_UINT8, BASE_DEC, VALS(tab_cause), 0,
-         NULL, HFILL}},
-       {&hf_gtp_sapi,
-        {"PS Handover XID SAPI", "gtp.ps_handover_xid_sapi",
-         FT_UINT8, BASE_DEC, NULL, 0x0F,
-         "SAPI", HFILL}},
-       {&hf_gtp_xid_par_len,
-        {"PS Handover XID parameter length", "gtp.ps_handover_xid_par_len",
-         FT_UINT8, BASE_DEC, NULL, 0xFF,
-         "XID parameter length", HFILL}},
-       {&hf_gtp_cmn_flg_ppc,
-        {"Prohibit Payload Compression", "gtp.cmn_flg.ppc",
-         FT_BOOLEAN, 8, NULL, 0x01,
-         NULL, HFILL}},
-       {&hf_gtp_cmn_flg_mbs_srv_type,
-        {"MBMS Service Type", "gtp.cmn_flg.mbs_srv_type",
-         FT_BOOLEAN, 8, NULL, 0x02,
-         NULL, HFILL}},
-       {&hf_gtp_cmn_flg_mbs_ran_pcd_rdy,
-        {"RAN Procedures Ready", "gtp.cmn_flg.ran_pcd_rd",
-         FT_BOOLEAN, 8, NULL, 0x04,
-         NULL, HFILL}},
-       {&hf_gtp_cmn_flg_mbs_cnt_inf,
-        {"MBMS Counting Information", "gtp.cmn_flg.mbs_cnt_inf",
-         FT_BOOLEAN, 8, NULL, 0x08,
-         NULL, HFILL}},
-       {&hf_gtp_cmn_flg_no_qos_neg,
-        {"No QoS negotiation", "gtp.cmn_flg.no_qos_neg",
-         FT_BOOLEAN, 8, NULL, 0x10,
-         NULL, HFILL}},
-       {&hf_gtp_cmn_flg_nrsn,
-        {"NRSN bit field", "gtp.cmn_flg.nrsn",
-         FT_BOOLEAN, 8, NULL, 0x20,
-         NULL, HFILL}},
-       {&hf_gtp_cmn_flg_upgrd_qos_sup,
-        {"Upgrade QoS Supported", "gtp.cmn_flg.ran_pcd_rd",
-         FT_BOOLEAN, 8, NULL, 0x40,
-         NULL, HFILL}},
-       {&hf_gtp_tmgi,
-        {"Temporary Mobile Group Identity (TMGI)", "gtp.cmn_flg.ran_pcd_rd",
-         FT_BYTES, BASE_NONE, NULL, 0x0,
-         NULL, HFILL}},
-       {&hf_gtp_no_of_mbms_sa_codes,
-        {"Number of MBMS service area codes", "gtp.no_of_mbms_sa_codes",
-         FT_UINT8, BASE_DEC, NULL, 0x0,
-         "Number N of MBMS service area codes", HFILL}
-        },
-       {&hf_gtp_mbms_ses_dur_days,
-        {"Estimated session duration days", "gtp.mbms_ses_dur_days",
-         FT_UINT8, BASE_DEC, NULL, 0xfe,
-         NULL, HFILL}
-        },
-       {&hf_gtp_mbms_ses_dur_s,
-        {"Estimated session duration seconds", "gtp.mbms_ses_dur_s",
-         FT_UINT24, BASE_DEC, NULL, 0x01ffff,
-         NULL, HFILL}
-        },
-       {&hf_gtp_mbms_sa_code,
-        {"MBMS service area code", "gtp.mbms_sa_code",
-         FT_UINT16, BASE_DEC, NULL, 0x0,
-         NULL, HFILL}
-        },
-       {&hf_gtp_mbs_2g_3g_ind,
-        {"MBMS 2G/3G Indicator", "gtp.mbs_2g_3g_ind",
-         FT_UINT8, BASE_DEC, VALS(gtp_mbs_2g_3g_ind_vals), 0x0,
-         NULL, HFILL}
-        },
-       {&hf_gtp_time_2_dta_tr,
-        {"Time to MBMS Data Transfer", "gtp.time_2_dta_tr",
-         FT_UINT8, BASE_DEC, NULL, 0x0,
-         NULL, HFILL}
-        },
-        { &hf_gtp_ext_ei,
-        {"Error Indication (EI)", "gtp.ei",
-         FT_UINT8, BASE_DEC, NULL, 0x04,
-         NULL, HFILL}
-        },
-        {&hf_gtp_ext_gcsi,
-        {"GPRS-CSI (GCSI)", "gtp.gcsi",
-         FT_UINT8, BASE_DEC, NULL, 0x02,
-         NULL, HFILL}
-        },
-        { &hf_gtp_ext_dti,
-        {"Direct Tunnel Indicator (DTI)", "gtp.dti",
-         FT_UINT8, BASE_DEC, NULL, 0x01,
-         NULL, HFILL}
-        },
+        {&hf_gtp_response_in,
+         {"Response In", "gtp.response_in", FT_FRAMENUM, BASE_NONE, NULL, 0x0, "The response to this GTP request is in this frame", HFILL}},
+        {&hf_gtp_response_to,
+         {"Response To", "gtp.response_to", FT_FRAMENUM, BASE_NONE, NULL, 0x0, "This is a response to the GTP request in this frame", HFILL}},
+        {&hf_gtp_time, {"Time", "gtp.time", FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0, "The time between the Request and the Response", HFILL}},
+        {&hf_gtp_apn, {"APN", "gtp.apn", FT_STRING, BASE_NONE, NULL, 0, "Access Point Name", HFILL}},
+        {&hf_gtp_cause, {"Cause", "gtp.cause", FT_UINT8, BASE_DEC, VALS(cause_type), 0, "Cause of operation", HFILL}},
+        {&hf_gtp_chrg_char, {"Charging characteristics", "gtp.chrg_char", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL}},
+        {&hf_gtp_chrg_char_s, {"Spare", "gtp.chrg_char_s", FT_UINT16, BASE_DEC, NULL, GTP_MASK_CHRG_CHAR_S, NULL, HFILL}},
+        {&hf_gtp_chrg_char_n, {"Normal charging", "gtp.chrg_char_n", FT_UINT16, BASE_DEC, NULL, GTP_MASK_CHRG_CHAR_N, NULL, HFILL}},
+        {&hf_gtp_chrg_char_p, {"Prepaid charging", "gtp.chrg_char_p", FT_UINT16, BASE_DEC, NULL, GTP_MASK_CHRG_CHAR_P, NULL, HFILL}},
+        {&hf_gtp_chrg_char_f,
+         {"Flat rate charging", "gtp.chrg_char_f", FT_UINT16, BASE_DEC, NULL, GTP_MASK_CHRG_CHAR_F, NULL, HFILL}},
+        {&hf_gtp_chrg_char_h,
+         {"Hot billing charging", "gtp.chrg_char_h", FT_UINT16, BASE_DEC, NULL, GTP_MASK_CHRG_CHAR_H, NULL, HFILL}},
+        {&hf_gtp_chrg_char_r, {"Reserved", "gtp.chrg_char_r", FT_UINT16, BASE_DEC, NULL, GTP_MASK_CHRG_CHAR_R, NULL, HFILL}},
+        {&hf_gtp_chrg_id, {"Charging ID", "gtp.chrg_id", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL}},
+        {&hf_gtp_chrg_ipv4, {"CG address IPv4", "gtp.chrg_ipv4", FT_IPv4, BASE_NONE, NULL, 0, "Charging Gateway address IPv4", HFILL}},
+        {&hf_gtp_chrg_ipv6, {"CG address IPv6", "gtp.chrg_ipv6", FT_IPv6, BASE_NONE, NULL, 0, "Charging Gateway address IPv6", HFILL}},
+        {&hf_gtp_ext_flow_label, {"Flow Label Data I", "gtp.ext_flow_label", FT_UINT16, BASE_HEX, NULL, 0, "Flow label data", HFILL}},
+        {&hf_gtp_ext_id, {"Extension identifier", "gtp.ext_id", FT_UINT16, BASE_DEC, VALS(sminmpec_values), 0, "Extension Identifier", HFILL}},
+        {&hf_gtp_ext_val, {"Extension value", "gtp.ext_val", FT_BYTES, BASE_NONE, NULL, 0, "Extension Value", HFILL}},
+        {&hf_gtp_flags, {"Flags", "gtp.flags", FT_UINT8, BASE_HEX, NULL, 0, "Ver/PT/Spare...", HFILL}},
+        {&hf_gtp_flags_ver,
+         {"Version", "gtp.flags.version",
+          FT_UINT8, BASE_DEC, VALS(ver_types), GTP_VER_MASK,
+          "GTP Version", HFILL}
+        },
+        {&hf_gtp_flags_pt,
+         {"Protocol type", "gtp.flags.payload",
+          FT_UINT8, BASE_DEC, VALS(pt_types), GTP_PT_MASK,
+          "Protocol Type", HFILL}
+        },
+        {&hf_gtp_flags_spare1,
+         {"Reserved", "gtp.flags.reserved",
+          FT_UINT8, BASE_DEC, NULL, GTP_SPARE1_MASK,
+          "Reserved (shall be sent as '111' )", HFILL}
+        },
+        {&hf_gtp_flags_snn,
+         {"Is SNDCP N-PDU included?", "gtp.flags.snn", FT_BOOLEAN, 8, TFS(&yes_no_tfs), GTP_SNN_MASK,
+          "Is SNDCP N-PDU LLC Number included? (1 = yes, 0 = no)", HFILL}},
+        {&hf_gtp_flags_spare2,
+         {"Reserved", "gtp.flags.reserved", FT_UINT8, BASE_DEC, NULL, GTP_SPARE2_MASK, "Reserved (shall be sent as '1' )", HFILL}},
+        {&hf_gtp_flags_e,
+         {"Is Next Extension Header present?", "gtp.flags.e", FT_BOOLEAN, 8, TFS(&yes_no_tfs), GTP_E_MASK,
+          "Is Next Extension Header present? (1 = yes, 0 = no)", HFILL}},
+        {&hf_gtp_flags_s,
+         {"Is Sequence Number present?", "gtp.flags.s", FT_BOOLEAN, 8, TFS(&yes_no_tfs), GTP_S_MASK, "Is Sequence Number present? (1 = yes, 0 = no)",
+          HFILL}},
+        {&hf_gtp_flags_pn,
+         {"Is N-PDU number present?", "gtp.flags.pn", FT_BOOLEAN, 8, TFS(&yes_no_tfs), GTP_PN_MASK, "Is N-PDU number present? (1 = yes, 0 = no)",
+          HFILL}},
+        {&hf_gtp_flow_ii, {"Flow Label Data II", "gtp.flow_ii", FT_UINT16, BASE_DEC, NULL, 0, "Downlink flow label data", HFILL}},
+        {&hf_gtp_flow_label, {"Flow label", "gtp.flow_label", FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL}},
+        {&hf_gtp_flow_sig, {"Flow label Signalling", "gtp.flow_sig", FT_UINT16, BASE_HEX, NULL, 0, "Flow label signalling", HFILL}},
+        {&hf_gtp_gsn_addr_len,
+         {"GSN Address Length", "gtp.gsn_addr_len", FT_UINT8, BASE_DEC, NULL, GTP_EXT_GSN_ADDR_LEN_MASK, NULL, HFILL}},
+        {&hf_gtp_gsn_addr_type,
+         {"GSN Address Type", "gtp.gsn_addr_type", FT_UINT8, BASE_DEC, VALS(gsn_addr_type), GTP_EXT_GSN_ADDR_TYPE_MASK, NULL, HFILL}},
+        {&hf_gtp_gsn_ipv4, {"GSN address IPv4", "gtp.gsn_ipv4", FT_IPv4, BASE_NONE, NULL, 0, NULL, HFILL}},
+        {&hf_gtp_gsn_ipv6, {"GSN address IPv6", "gtp.gsn_ipv6", FT_IPv6, BASE_NONE, NULL, 0, NULL, HFILL}},
+        {&hf_gtp_imsi, {"IMSI", "gtp.imsi", FT_STRING, BASE_NONE, NULL, 0, "International Mobile Subscriber Identity number", HFILL}},
+        {&hf_gtp_length, {"Length", "gtp.length", FT_UINT16, BASE_DEC, NULL, 0, "Length (i.e. number of octets after TID or TEID)", HFILL}},
+        {&hf_gtp_map_cause, {"MAP cause", "gtp.map_cause", FT_UINT8, BASE_DEC, VALS(gsm_old_GSMMAPLocalErrorcode_vals), 0, NULL, HFILL}},
+        {&hf_gtp_message_type, {"Message Type", "gtp.message", FT_UINT8, BASE_HEX, VALS(message_type), 0x0, "GTP Message Type", HFILL}},
+        {&hf_gtp_ms_reason,
+         {"MS not reachable reason", "gtp.ms_reason", FT_UINT8, BASE_DEC, VALS(ms_not_reachable_type), 0, "MS Not Reachable Reason", HFILL}},
+        {&hf_gtp_ms_valid, {"MS validated", "gtp.ms_valid", FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+        {&hf_gtp_msisdn, {"MSISDN", "gtp.msisdn", FT_STRING, BASE_NONE, NULL, 0, "MS international PSTN/ISDN number", HFILL}},
+        {&hf_gtp_next,
+         {"Next extension header type", "gtp.next", FT_UINT8, BASE_HEX, VALS(next_extension_header_fieldvals), 0, "Next Extension Header Type",
+          HFILL}},
+        {&hf_gtp_node_ipv4, {"Node address IPv4", "gtp.node_ipv4", FT_IPv4, BASE_NONE, NULL, 0, "Recommended node address IPv4", HFILL}},
+        {&hf_gtp_node_ipv6, {"Node address IPv6", "gtp.node_ipv6", FT_IPv6, BASE_NONE, NULL, 0, "Recommended node address IPv6", HFILL}},
+        {&hf_gtp_npdu_number, {"N-PDU Number", "gtp.npdu_number", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL}},
+        {&hf_gtp_nsapi, {"NSAPI", "gtp.nsapi", FT_UINT8, BASE_DEC, NULL, 0, "Network layer Service Access Point Identifier", HFILL}},
+        {&hf_gtp_qos_version, {"Version", "gtp.qos_version", FT_STRING, BASE_NONE, NULL, 0, "Version of the QoS Profile", HFILL}},
+        {&hf_gtp_qos_spare1, {"Spare", "gtp.qos_spare1", FT_UINT8, BASE_DEC, NULL, GTP_EXT_QOS_SPARE1_MASK, "Spare (shall be sent as '00' )", HFILL}},
+        {&hf_gtp_qos_delay,
+         {"QoS delay", "gtp.qos_delay", FT_UINT8, BASE_DEC, VALS(qos_delay_type), GTP_EXT_QOS_DELAY_MASK, "Quality of Service Delay Class", HFILL}},
+        {&hf_gtp_qos_reliability,
+         {"QoS reliability", "gtp.qos_reliability", FT_UINT8, BASE_DEC, VALS(qos_reliability_type), GTP_EXT_QOS_RELIABILITY_MASK,
+          "Quality of Service Reliability Class", HFILL}},
+        {&hf_gtp_qos_peak,
+         {"QoS peak", "gtp.qos_peak", FT_UINT8, BASE_DEC, VALS(qos_peak_type), GTP_EXT_QOS_PEAK_MASK, "Quality of Service Peak Throughput", HFILL}},
+        {&hf_gtp_qos_spare2, {"Spare", "gtp.qos_spare2", FT_UINT8, BASE_DEC, NULL, GTP_EXT_QOS_SPARE2_MASK, "Spare (shall be sent as 0)", HFILL}},
+        {&hf_gtp_qos_precedence,
+         {"QoS precedence", "gtp.qos_precedence", FT_UINT8, BASE_DEC, VALS(qos_precedence_type), GTP_EXT_QOS_PRECEDENCE_MASK,
+          "Quality of Service Precedence Class", HFILL}},
+        {&hf_gtp_qos_spare3,
+         {"Spare", "gtp.qos_spare3", FT_UINT8, BASE_DEC, NULL, GTP_EXT_QOS_SPARE3_MASK, "Spare (shall be sent as '000' )", HFILL}},
+        {&hf_gtp_qos_mean,
+         {"QoS mean", "gtp.qos_mean", FT_UINT8, BASE_DEC, VALS(qos_mean_type), GTP_EXT_QOS_MEAN_MASK, "Quality of Service Mean Throughput", HFILL}},
+        {&hf_gtp_qos_al_ret_priority,
+         {"Allocation/Retention priority", "gtp.qos_al_ret_priority", FT_UINT8, BASE_DEC, NULL, 0, "Allocation/Retention Priority", HFILL}},
+        {&hf_gtp_qos_traf_class,
+         {"Traffic class", "gtp.qos_traf_class", FT_UINT8, BASE_DEC, VALS(qos_traf_class), GTP_EXT_QOS_TRAF_CLASS_MASK, "Traffic Class", HFILL}},
+        {&hf_gtp_qos_del_order,
+         {"Delivery order", "gtp.qos_del_order", FT_UINT8, BASE_DEC, VALS(qos_del_order), GTP_EXT_QOS_DEL_ORDER_MASK, "Delivery Order", HFILL}},
+        {&hf_gtp_qos_del_err_sdu,
+         {"Delivery of erroneous SDU", "gtp.qos_del_err_sdu", FT_UINT8, BASE_DEC, VALS(qos_del_err_sdu), GTP_EXT_QOS_DEL_ERR_SDU_MASK,
+          "Delivery of Erroneous SDU", HFILL}},
+        {&hf_gtp_qos_max_sdu_size,
+         {"Maximum SDU size", "gtp.qos_max_sdu_size", FT_UINT8, BASE_DEC, VALS(qos_max_sdu_size), 0, NULL, HFILL}},
+        {&hf_gtp_qos_max_ul,
+         {"Maximum bit rate for uplink", "gtp.qos_max_ul", FT_UINT8, BASE_DEC, VALS(qos_max_ul), 0, NULL, HFILL}},
+        {&hf_gtp_qos_max_dl,
+         {"Maximum bit rate for downlink", "gtp.qos_max_dl", FT_UINT8, BASE_DEC, VALS(qos_max_dl), 0, NULL, HFILL}},
+        {&hf_gtp_qos_res_ber,
+         {"Residual BER", "gtp.qos_res_ber", FT_UINT8, BASE_DEC, VALS(qos_res_ber), GTP_EXT_QOS_RES_BER_MASK, "Residual Bit Error Rate", HFILL}},
+        {&hf_gtp_qos_sdu_err_ratio,
+         {"SDU Error ratio", "gtp.qos_sdu_err_ratio", FT_UINT8, BASE_DEC, VALS(qos_sdu_err_ratio), GTP_EXT_QOS_SDU_ERR_RATIO_MASK, "SDU Error Ratio",
+          HFILL}},
+        {&hf_gtp_qos_trans_delay,
+         {"Transfer delay", "gtp.qos_trans_delay", FT_UINT8, BASE_DEC, VALS(qos_trans_delay), GTP_EXT_QOS_TRANS_DELAY_MASK, "Transfer Delay", HFILL}},
+        {&hf_gtp_qos_traf_handl_prio,
+         {"Traffic handling priority", "gtp.qos_traf_handl_prio", FT_UINT8, BASE_DEC, VALS(qos_traf_handl_prio), GTP_EXT_QOS_TRAF_HANDL_PRIORITY_MASK,
+          "Traffic Handling Priority", HFILL}},
+        {&hf_gtp_qos_guar_ul,
+         {"Guaranteed bit rate for uplink", "gtp.qos_guar_ul", FT_UINT8, BASE_DEC, VALS(qos_guar_ul), 0, NULL, HFILL}},
+        {&hf_gtp_qos_guar_dl,
+         {"Guaranteed bit rate for downlink", "gtp.qos_guar_dl", FT_UINT8, BASE_DEC, VALS(qos_guar_dl), 0, NULL,
+          HFILL}},
+        {&hf_gtp_qos_src_stat_desc,
+         {"Source Statistics Descriptor", "gtp.src_stat_desc", FT_UINT8, BASE_DEC, VALS(src_stat_desc_vals), GTP_EXT_QOS_SRC_STAT_DESC_MASK, NULL, HFILL}},
+        {&hf_gtp_qos_sig_ind,
+         {"Signalling Indication", "gtp.sig_ind", FT_BOOLEAN, 8, TFS(&gtp_sig_ind), GTP_EXT_QOS_SIG_IND_MASK, NULL, HFILL}},
+        {&hf_gtp_pkt_flow_id, {"Packet Flow ID", "gtp.pkt_flow_id", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL}},
+        {&hf_gtp_ptmsi, {"P-TMSI", "gtp.ptmsi", FT_UINT32, BASE_HEX, NULL, 0, "Packet-Temporary Mobile Subscriber Identity", HFILL}},
+        {&hf_gtp_ptmsi_sig, {"P-TMSI Signature", "gtp.ptmsi_sig", FT_UINT24, BASE_HEX, NULL, 0, NULL, HFILL}},
+        {&hf_gtp_rab_gtpu_dn, {"Downlink GTP-U seq number", "gtp.rab_gtp_dn", FT_UINT16, BASE_DEC, NULL, 0, "Downlink GTP-U sequence number", HFILL}},
+        {&hf_gtp_rab_gtpu_up, {"Uplink GTP-U seq number", "gtp.rab_gtp_up", FT_UINT16, BASE_DEC, NULL, 0, "Uplink GTP-U sequence number", HFILL}},
+        {&hf_gtp_rab_pdu_dn,
+         {"Downlink next PDCP-PDU seq number", "gtp.rab_pdu_dn", FT_UINT16, BASE_DEC, NULL, 0, "Downlink next PDCP-PDU sequence number", HFILL}},
+        {&hf_gtp_rab_pdu_up,
+         {"Uplink next PDCP-PDU seq number", "gtp.rab_pdu_up", FT_UINT16, BASE_DEC, NULL, 0, "Uplink next PDCP-PDU sequence number", HFILL}},
+        {&hf_gtp_rai_mcc, {"MCC", "gtp.mcc", FT_UINT16, BASE_DEC, NULL, 0, "Mobile Country Code", HFILL}},
+        {&hf_gtp_rai_mnc, {"MNC", "gtp.mnc", FT_UINT8, BASE_DEC, NULL, 0, "Mobile Network Code", HFILL}},
+        {&hf_gtp_rai_rac, {"RAC", "gtp.rac", FT_UINT8, BASE_DEC, NULL, 0, "Routing Area Code", HFILL}},
+        {&hf_gtp_rai_lac, {"LAC", "gtp.lac", FT_UINT16, BASE_DEC, NULL, 0, "Location Area Code", HFILL}},
+        {&hf_gtp_ranap_cause, {"RANAP cause", "gtp.ranap_cause", FT_UINT8, BASE_DEC, VALS(ranap_cause_type), 0, NULL, HFILL}},
+        {&hf_gtp_recovery, {"Recovery", "gtp.recovery", FT_UINT8, BASE_DEC, NULL, 0, "Restart counter", HFILL}},
+        {&hf_gtp_reorder, {"Reordering required", "gtp.reorder", FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+        {&hf_gtp_rnc_ipv4, {"RNC address IPv4", "gtp.rnc_ipv4", FT_IPv4, BASE_NONE, NULL, 0, "Radio Network Controller address IPv4", HFILL}},
+        {&hf_gtp_rnc_ipv6, {"RNC address IPv6", "gtp.rnc_ipv6", FT_IPv6, BASE_NONE, NULL, 0, "Radio Network Controller address IPv6", HFILL}},
+        {&hf_gtp_rp, {"Radio Priority", "gtp.rp", FT_UINT8, BASE_DEC, NULL, GTPv1_EXT_RP_MASK, "Radio Priority for uplink tx", HFILL}},
+        {&hf_gtp_rp_nsapi,
+         {"NSAPI in Radio Priority", "gtp.rp_nsapi", FT_UINT8, BASE_DEC, NULL, GTPv1_EXT_RP_NSAPI_MASK,
+          "Network layer Service Access Point Identifier in Radio Priority", HFILL}},
+        {&hf_gtp_rp_sms, {"Radio Priority SMS", "gtp.rp_sms", FT_UINT8, BASE_DEC, NULL, 0, "Radio Priority for MO SMS", HFILL}},
+        {&hf_gtp_rp_spare, {"Reserved", "gtp.rp_spare", FT_UINT8, BASE_DEC, NULL, GTPv1_EXT_RP_SPARE_MASK, "Spare bit", HFILL}},
+        {&hf_gtp_sel_mode,
+         {"Selection mode", "gtp.sel_mode",
+          FT_UINT8, BASE_DEC, VALS(sel_mode_type), 0x03,
+          "Selection Mode", HFILL}
+        },
+        {&hf_gtp_seq_number, {"Sequence number", "gtp.seq_number", FT_UINT16, BASE_HEX, NULL, 0, "Sequence Number", HFILL}},
+        {&hf_gtp_sndcp_number, {"SNDCP N-PDU LLC Number", "gtp.sndcp_number", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL}},
+        {&hf_gtp_tear_ind, {"Teardown Indicator", "gtp.tear_ind", FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+        {&hf_gtp_teid, {"TEID", "gtp.teid", FT_UINT32, BASE_HEX, NULL, 0, "Tunnel Endpoint Identifier", HFILL}},
+        {&hf_gtp_teid_cp, {"TEID Control Plane", "gtp.teid_cp", FT_UINT32, BASE_HEX, NULL, 0, "Tunnel Endpoint Identifier Control Plane", HFILL}},
+        {&hf_gtp_ulink_teid_cp,
+         {"Uplink TEID Control Plane", "gtp.ulink_teid_cp", FT_UINT32, BASE_HEX, NULL, 0, "Uplink Tunnel Endpoint Identifier Control Plane", HFILL}},
+        {&hf_gtp_teid_data, {"TEID Data I", "gtp.teid_data", FT_UINT32, BASE_HEX, NULL, 0, "Tunnel Endpoint Identifier Data I", HFILL}},
+        {&hf_gtp_ulink_teid_data,
+         {"Uplink TEID Data I", "gtp.ulink_teid_data", FT_UINT32, BASE_HEX, NULL, 0, "UplinkTunnel Endpoint Identifier Data I", HFILL}},
+        {&hf_gtp_teid_ii, {"TEID Data II", "gtp.teid_ii", FT_UINT32, BASE_HEX, NULL, 0, "Tunnel Endpoint Identifier Data II", HFILL}},
+        {&hf_gtp_tft_code,
+         {"TFT operation code", "gtp.tft_code", FT_UINT8, BASE_DEC, VALS(tft_code_type), GTPv1_TFT_CODE_MASK, NULL, HFILL}},
+        {&hf_gtp_tft_spare, {"TFT spare bit", "gtp.tft_spare", FT_UINT8, BASE_DEC, NULL, GTPv1_TFT_SPARE_MASK, NULL, HFILL}},
+        {&hf_gtp_tft_number,
+         {"Number of packet filters", "gtp.tft_number", FT_UINT8, BASE_DEC, NULL, GTPv1_TFT_NUMBER_MASK, NULL, HFILL}},
+        {&hf_gtp_tft_eval, {"Evaluation precedence", "gtp.tft_eval", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL}},
+        {&hf_gtp_tid, {"TID", "gtp.tid", FT_STRING, BASE_NONE, NULL, 0, "Tunnel Identifier", HFILL}},
+        {&hf_gtp_tlli, {"TLLI", "gtp.tlli", FT_UINT32, BASE_HEX, NULL, 0, "Temporary Logical Link Identity", HFILL}},
+        {&hf_gtp_tr_comm, {"Packet transfer command", "gtp.tr_comm", FT_UINT8, BASE_DEC, VALS(tr_comm_type), 0, "Packat transfer command", HFILL}},
+        {&hf_gtp_trace_ref, {"Trace reference", "gtp.trace_ref", FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL}},
+        {&hf_gtp_trace_type, {"Trace type", "gtp.trace_type", FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL}},
+        {&hf_gtp_unknown, {"Unknown data (length)", "gtp.unknown", FT_UINT16, BASE_DEC, NULL, 0, "Unknown data", HFILL}},
+        {&hf_gtp_user_addr_pdp_org,
+         {"PDP type organization", "gtp.user_addr_pdp_org", FT_UINT8, BASE_DEC, VALS(pdp_org_type), 0, NULL, HFILL}},
+        {&hf_gtp_user_addr_pdp_type, {"PDP type number", "gtp.user_addr_pdp_type", FT_UINT8, BASE_HEX, VALS(pdp_type), 0, "PDP type", HFILL}},
+        {&hf_gtp_user_ipv4, {"End user address IPv4", "gtp.user_ipv4", FT_IPv4, BASE_NONE, NULL, 0, NULL, HFILL}},
+        {&hf_gtp_user_ipv6, {"End user address IPv6", "gtp.user_ipv6", FT_IPv6, BASE_NONE, NULL, 0, NULL, HFILL}},
+        {&hf_gtp_security_mode,
+         {"Security Mode", "gtp.security_mode",
+          FT_UINT8, BASE_DEC, VALS(mm_sec_modep), 0xc0,
+          NULL, HFILL}
+        },
+        {&hf_gtp_no_of_vectors,
+         {"No of Vectors", "gtp.no_of_vectors",
+          FT_UINT8, BASE_DEC, NULL, 0x38,
+          NULL, HFILL}
+        },
+        {&hf_gtp_cipher_algorithm,
+         {"Cipher Algorithm", "gtp.no_of_vectors",
+          FT_UINT8, BASE_DEC, VALS(gtp_cipher_algorithm), 0x07,
+          NULL, HFILL}
+        },
+        {&hf_gtp_cksn_ksi,
+         {"Ciphering Key Sequence Number (CKSN)/Key Set Identifier (KSI)", "gtp.cksn_ksi",
+          FT_UINT8, BASE_DEC, NULL, 0x07,
+          "CKSN/KSI", HFILL}
+        },
+        {&hf_gtp_cksn,
+         {"Ciphering Key Sequence Number (CKSN)", "gtp.cksn_ksi",
+          FT_UINT8, BASE_DEC, NULL, 0x07,
+          "CKSN", HFILL}
+        },
+        {&hf_gtp_ksi,
+         {"Key Set Identifier (KSI)", "gtp.cksn_ksi",
+          FT_UINT8, BASE_DEC, NULL, 0x07,
+          "KSI", HFILL}
+        },
+        {&hf_gtp_ext_length,
+         {"Length", "gtp.ext_length",
+          FT_UINT16, BASE_DEC, NULL, 0x0,
+          "IE Length", HFILL}
+        },
+        {&hf_gtp_ext_apn_res,
+         {"Restriction Type", "gtp.ext_apn_res",
+          FT_UINT8, BASE_DEC, NULL, 0x0,
+          NULL, HFILL}
+        },
+        {&hf_gtp_ext_rat_type,
+         {"RAT Type", "gtp.ext_rat_type",
+          FT_UINT8, BASE_DEC, VALS(gtp_ext_rat_type_vals), 0x0,
+          NULL, HFILL}
+        },
+        {&hf_gtp_ext_geo_loc_type,
+         {"Geographic Location Type", "gtp.ext_geo_loc_type",
+          FT_UINT8, BASE_DEC, NULL, 0x0,
+          NULL, HFILL}
+        },
+        {&hf_gtp_ext_sac,
+         {"SAC", "gtp.ext_sac",
+          FT_UINT16, BASE_HEX, NULL, 0x0,
+          NULL, HFILL}
+        },
+        {&hf_gtp_ext_imeisv,
+         {"IMEI(SV)", "gtp.ext_imeisv",
+          FT_STRING, BASE_NONE, NULL, 0x0,
+          NULL, HFILL}
+        },
+        { &hf_gtp_targetRNC_ID,
+          { "targetRNC-ID", "gtp.targetRNC_ID",
+            FT_NONE, BASE_NONE, NULL, 0,
+            NULL, HFILL }},
+        {&hf_gtp_bssgp_cause,
+         {"BSSGP Cause", "gtp.bssgp_cause",
+          FT_UINT8, BASE_DEC, VALS(tab_cause), 0,
+          NULL, HFILL}},
+        {&hf_gtp_sapi,
+         {"PS Handover XID SAPI", "gtp.ps_handover_xid_sapi",
+          FT_UINT8, BASE_DEC, NULL, 0x0F,
+          "SAPI", HFILL}},
+        {&hf_gtp_xid_par_len,
+         {"PS Handover XID parameter length", "gtp.ps_handover_xid_par_len",
+          FT_UINT8, BASE_DEC, NULL, 0xFF,
+          "XID parameter length", HFILL}},
+        {&hf_gtp_cmn_flg_ppc,
+         {"Prohibit Payload Compression", "gtp.cmn_flg.ppc",
+          FT_BOOLEAN, 8, NULL, 0x01,
+          NULL, HFILL}},
+        {&hf_gtp_cmn_flg_mbs_srv_type,
+         {"MBMS Service Type", "gtp.cmn_flg.mbs_srv_type",
+          FT_BOOLEAN, 8, NULL, 0x02,
+          NULL, HFILL}},
+        {&hf_gtp_cmn_flg_mbs_ran_pcd_rdy,
+         {"RAN Procedures Ready", "gtp.cmn_flg.ran_pcd_rd",
+          FT_BOOLEAN, 8, NULL, 0x04,
+          NULL, HFILL}},
+        {&hf_gtp_cmn_flg_mbs_cnt_inf,
+         {"MBMS Counting Information", "gtp.cmn_flg.mbs_cnt_inf",
+          FT_BOOLEAN, 8, NULL, 0x08,
+          NULL, HFILL}},
+        {&hf_gtp_cmn_flg_no_qos_neg,
+         {"No QoS negotiation", "gtp.cmn_flg.no_qos_neg",
+          FT_BOOLEAN, 8, NULL, 0x10,
+          NULL, HFILL}},
+        {&hf_gtp_cmn_flg_nrsn,
+         {"NRSN bit field", "gtp.cmn_flg.nrsn",
+          FT_BOOLEAN, 8, NULL, 0x20,
+          NULL, HFILL}},
+        {&hf_gtp_cmn_flg_upgrd_qos_sup,
+         {"Upgrade QoS Supported", "gtp.cmn_flg.ran_pcd_rd",
+          FT_BOOLEAN, 8, NULL, 0x40,
+          NULL, HFILL}},
+        {&hf_gtp_tmgi,
+         {"Temporary Mobile Group Identity (TMGI)", "gtp.cmn_flg.ran_pcd_rd",
+          FT_BYTES, BASE_NONE, NULL, 0x0,
+          NULL, HFILL}},
+        {&hf_gtp_no_of_mbms_sa_codes,
+         {"Number of MBMS service area codes", "gtp.no_of_mbms_sa_codes",
+          FT_UINT8, BASE_DEC, NULL, 0x0,
+          "Number N of MBMS service area codes", HFILL}
+        },
+        {&hf_gtp_mbms_ses_dur_days,
+         {"Estimated session duration days", "gtp.mbms_ses_dur_days",
+          FT_UINT8, BASE_DEC, NULL, 0xfe,
+          NULL, HFILL}
+        },
+        {&hf_gtp_mbms_ses_dur_s,
+         {"Estimated session duration seconds", "gtp.mbms_ses_dur_s",
+          FT_UINT24, BASE_DEC, NULL, 0x01ffff,
+          NULL, HFILL}
+        },
+        {&hf_gtp_mbms_sa_code,
+         {"MBMS service area code", "gtp.mbms_sa_code",
+          FT_UINT16, BASE_DEC, NULL, 0x0,
+          NULL, HFILL}
+        },
+        {&hf_gtp_mbs_2g_3g_ind,
+         {"MBMS 2G/3G Indicator", "gtp.mbs_2g_3g_ind",
+          FT_UINT8, BASE_DEC, VALS(gtp_mbs_2g_3g_ind_vals), 0x0,
+          NULL, HFILL}
+        },
+        {&hf_gtp_time_2_dta_tr,
+         {"Time to MBMS Data Transfer", "gtp.time_2_dta_tr",
+          FT_UINT8, BASE_DEC, NULL, 0x0,
+          NULL, HFILL}
+        },
+        { &hf_gtp_ext_ei,
+          {"Error Indication (EI)", "gtp.ei",
+           FT_UINT8, BASE_DEC, NULL, 0x04,
+           NULL, HFILL}
+        },
+        {&hf_gtp_ext_gcsi,
+         {"GPRS-CSI (GCSI)", "gtp.gcsi",
+          FT_UINT8, BASE_DEC, NULL, 0x02,
+          NULL, HFILL}
+        },
+        { &hf_gtp_ext_dti,
+          {"Direct Tunnel Indicator (DTI)", "gtp.dti",
+           FT_UINT8, BASE_DEC, NULL, 0x01,
+           NULL, HFILL}
+        },
     };
 
     static gint *ett_gtp_array[] = {
-       &ett_gtp,
-       &ett_gtp_flags,
-       &ett_gtp_ext,
-       &ett_gtp_rai,
-       &ett_gtp_qos,
-       &ett_gtp_auth_tri,
-       &ett_gtp_flow_ii,
-       &ett_gtp_rab_cntxt,
-       &ett_gtp_rp,
-       &ett_gtp_pkt_flow_id,
-       &ett_gtp_chrg_char,
-       &ett_gtp_user,
-       &ett_gtp_mm,
-       &ett_gtp_trip,
-       &ett_gtp_quint,
-       &ett_gtp_pdp,
-       &ett_gtp_apn,
-       &ett_gtp_proto,
-       &ett_gtp_gsn_addr,
-       &ett_gtp_tft,
-       &ett_gtp_tft_pf,
-       &ett_gtp_tft_flags,
-       &ett_gtp_rab_setup,
-       &ett_gtp_hdr_list,
-       &ett_gtp_chrg_addr,
-       &ett_gtp_node_addr,
-       &ett_gtp_rel_pack,
-       &ett_gtp_can_pack,
-       &ett_gtp_data_resp,
-       &ett_gtp_priv_ext,
-       &ett_gtp_net_cap,
-       &ett_gtp_ext_tree_apn_res,
-       &ett_gtp_ext_rat_type,
-       &ett_gtp_ext_imeisv,
-       &ett_gtp_ext_ran_tr_cont,
-       &ett_gtp_ext_pdp_cont_prio,
-       &ett_gtp_ext_ssgn_no,
-       &ett_gtp_ext_rab_setup_inf,
-       &ett_gtp_ext_common_flgs,
-       &ett_gtp_ext_usr_loc_inf,
-       &ett_gtp_ext_ms_time_zone,
-       &ett_gtp_ext_camel_chg_inf_con,
-       &ett_GTP_EXT_MBMS_UE_CTX,
-       &ett_gtp_ext_tmgi,
-       &ett_gtp_tmgi,
-       &ett_gtp_ext_rim_ra,
-       &ett_gtp_ext_mbms_prot_conf_opt,
-       &ett_gtp_ext_mbms_sa,
-       &ett_gtp_ext_bms_ses_dur,
-       &ett_gtp_ext_src_rnc_pdp_ctx_inf,
-       &ett_gtp_ext_add_trs_inf,
-       &ett_gtp_ext_hop_count,
-       &ett_gtp_ext_sel_plmn_id,
-       &ett_gtp_ext_mbms_ses_id,
-       &ett_gtp_ext_mbms_2g_3g_ind,
-       &ett_gtp_ext_enh_nsapi,
-       &ett_gtp_ext_ad_mbms_trs_inf,
-       &ett_gtp_ext_mbms_ses_id_rep_no,
-       &ett_gtp_ext_mbms_time_to_data_tr,
-       &ett_gtp_ext_ps_ho_req_ctx,
-       &ett_gtp_ext_bss_cont,
-       &ett_gtp_ext_cell_id,
-       &ett_gtp_ext_pdu_no,
-       &ett_gtp_ext_bssgp_cause,
-       &ett_gtp_ext_ra_prio_lcs,
-       &ett_gtp_ext_ps_handover_xid,
-       &ett_gtp_target_id,
-       &ett_gtp_utran_cont,
+        &ett_gtp,
+        &ett_gtp_flags,
+        &ett_gtp_ext,
+        &ett_gtp_rai,
+        &ett_gtp_qos,
+        &ett_gtp_auth_tri,
+        &ett_gtp_flow_ii,
+        &ett_gtp_rab_cntxt,
+        &ett_gtp_rp,
+        &ett_gtp_pkt_flow_id,
+        &ett_gtp_chrg_char,
+        &ett_gtp_user,
+        &ett_gtp_mm,
+        &ett_gtp_trip,
+        &ett_gtp_quint,
+        &ett_gtp_pdp,
+        &ett_gtp_apn,
+        &ett_gtp_proto,
+        &ett_gtp_gsn_addr,
+        &ett_gtp_tft,
+        &ett_gtp_tft_pf,
+        &ett_gtp_tft_flags,
+        &ett_gtp_rab_setup,
+        &ett_gtp_hdr_list,
+        &ett_gtp_chrg_addr,
+        &ett_gtp_node_addr,
+        &ett_gtp_rel_pack,
+        &ett_gtp_can_pack,
+        &ett_gtp_data_resp,
+        &ett_gtp_priv_ext,
+        &ett_gtp_net_cap,
+        &ett_gtp_ext_tree_apn_res,
+        &ett_gtp_ext_rat_type,
+        &ett_gtp_ext_imeisv,
+        &ett_gtp_ext_ran_tr_cont,
+        &ett_gtp_ext_pdp_cont_prio,
+        &ett_gtp_ext_ssgn_no,
+        &ett_gtp_ext_rab_setup_inf,
+        &ett_gtp_ext_common_flgs,
+        &ett_gtp_ext_usr_loc_inf,
+        &ett_gtp_ext_ms_time_zone,
+        &ett_gtp_ext_camel_chg_inf_con,
+        &ett_GTP_EXT_MBMS_UE_CTX,
+        &ett_gtp_ext_tmgi,
+        &ett_gtp_tmgi,
+        &ett_gtp_ext_rim_ra,
+        &ett_gtp_ext_mbms_prot_conf_opt,
+        &ett_gtp_ext_mbms_sa,
+        &ett_gtp_ext_bms_ses_dur,
+        &ett_gtp_ext_src_rnc_pdp_ctx_inf,
+        &ett_gtp_ext_add_trs_inf,
+        &ett_gtp_ext_hop_count,
+        &ett_gtp_ext_sel_plmn_id,
+        &ett_gtp_ext_mbms_ses_id,
+        &ett_gtp_ext_mbms_2g_3g_ind,
+        &ett_gtp_ext_enh_nsapi,
+        &ett_gtp_ext_ad_mbms_trs_inf,
+        &ett_gtp_ext_mbms_ses_id_rep_no,
+        &ett_gtp_ext_mbms_time_to_data_tr,
+        &ett_gtp_ext_ps_ho_req_ctx,
+        &ett_gtp_ext_bss_cont,
+        &ett_gtp_ext_cell_id,
+        &ett_gtp_ext_pdu_no,
+        &ett_gtp_ext_bssgp_cause,
+        &ett_gtp_ext_ra_prio_lcs,
+        &ett_gtp_ext_ps_handover_xid,
+        &ett_gtp_target_id,
+        &ett_gtp_utran_cont,
     };
 
     module_t *gtp_module;
@@ -7051,9 +7051,9 @@ void proto_register_gtp(void)
 
     prefs_register_uint_preference(gtp_module, "v0_port", "GTPv0 port", "GTPv0 port (default 3386)", 10, &g_gtpv0_port);
     prefs_register_uint_preference(gtp_module, "v1c_port", "GTPv1 control plane (GTP-C) port", "GTPv1 control plane port (default 2123)", 10,
-                                  &g_gtpv1c_port);
+                                   &g_gtpv1c_port);
     prefs_register_uint_preference(gtp_module, "v1u_port", "GTPv1 user plane (GTP-U) port", "GTPv1 user plane port (default 2152)", 10,
-                                  &g_gtpv1u_port);
+                                   &g_gtpv1u_port);
     prefs_register_bool_preference(gtp_module, "dissect_tpdu", "Dissect T-PDU", "Dissect T-PDU", &g_gtp_tpdu);
 
     prefs_register_obsolete_preference(gtp_module, "v0_dissect_cdr_as");
@@ -7069,8 +7069,8 @@ void proto_register_gtp(void)
 
     register_dissector("gtp", dissect_gtp, proto_gtp);
 
-       register_init_routine(gtp_reinit);
-       gtp_tap=register_tap("gtp");
+    register_init_routine(gtp_reinit);
+    gtp_tap=register_tap("gtp");
 }
 
 void proto_reg_handoff_gtp(void)
@@ -7083,41 +7083,41 @@ void proto_reg_handoff_gtp(void)
     static guint gtpv1u_port;
 
     if (!Initialized) {
-       gtp_handle = find_dissector("gtp");
-       ppp_subdissector_table = find_dissector_table("ppp.protocol");
-
-       radius_register_avp_dissector(VENDOR_THE3GPP, 5, dissect_radius_qos_umts);
-       radius_register_avp_dissector(VENDOR_THE3GPP, 12, dissect_radius_selection_mode);
-       radius_register_avp_dissector(VENDOR_THE3GPP, 22, dissect_radius_user_loc);
-
-
-
-       ip_handle = find_dissector("ip");
-       ipv6_handle = find_dissector("ipv6");
-       ppp_handle = find_dissector("ppp");
-       data_handle = find_dissector("data");
-       gtpcdr_handle = find_dissector("gtpcdr");
-       sndcpxid_handle = find_dissector("sndcpxid");
-       gtpv2_handle = find_dissector("gtpv2");
-       bssap_pdu_type_table = find_dissector_table("bssap.pdu_type");
-       /* AVP Code: 5 3GPP-GPRS Negotiated QoS profile */
-       dissector_add("diameter.3gpp", 5, new_create_dissector_handle(dissect_diameter_3gpp_qosprofile, proto_gtp));
-       /* AVP Code: 904 MBMS-Session-Duration */
-       dissector_add("diameter.3gpp", 904, new_create_dissector_handle(dissect_gtp_mbms_ses_dur, proto_gtp));
-       /* AVP Code: 911 MBMS-Time-To-Data-Transfer */
-       dissector_add("diameter.3gpp", 911, new_create_dissector_handle(dissect_gtp_mbms_time_to_data_tr, proto_gtp));
-
-       Initialized = TRUE;
+        gtp_handle = find_dissector("gtp");
+        ppp_subdissector_table = find_dissector_table("ppp.protocol");
+
+        radius_register_avp_dissector(VENDOR_THE3GPP, 5, dissect_radius_qos_umts);
+        radius_register_avp_dissector(VENDOR_THE3GPP, 12, dissect_radius_selection_mode);
+        radius_register_avp_dissector(VENDOR_THE3GPP, 22, dissect_radius_user_loc);
+
+
+
+        ip_handle = find_dissector("ip");
+        ipv6_handle = find_dissector("ipv6");
+        ppp_handle = find_dissector("ppp");
+        data_handle = find_dissector("data");
+        gtpcdr_handle = find_dissector("gtpcdr");
+        sndcpxid_handle = find_dissector("sndcpxid");
+        gtpv2_handle = find_dissector("gtpv2");
+        bssap_pdu_type_table = find_dissector_table("bssap.pdu_type");
+        /* AVP Code: 5 3GPP-GPRS Negotiated QoS profile */
+        dissector_add("diameter.3gpp", 5, new_create_dissector_handle(dissect_diameter_3gpp_qosprofile, proto_gtp));
+        /* AVP Code: 904 MBMS-Session-Duration */
+        dissector_add("diameter.3gpp", 904, new_create_dissector_handle(dissect_gtp_mbms_ses_dur, proto_gtp));
+        /* AVP Code: 911 MBMS-Time-To-Data-Transfer */
+        dissector_add("diameter.3gpp", 911, new_create_dissector_handle(dissect_gtp_mbms_time_to_data_tr, proto_gtp));
+
+        Initialized = TRUE;
     } else {
-       dissector_delete("udp.port", gtpv0_port, gtp_handle);
-       dissector_delete("udp.port", gtpv1c_port, gtp_handle);
-       dissector_delete("udp.port", gtpv1u_port, gtp_handle);
-
-       if (gtp_over_tcp) {
-           dissector_delete("tcp.port", gtpv0_port, gtp_handle);
-           dissector_delete("tcp.port", gtpv1c_port, gtp_handle);
-           dissector_delete("tcp.port", gtpv1u_port, gtp_handle);
-       }
+        dissector_delete("udp.port", gtpv0_port, gtp_handle);
+        dissector_delete("udp.port", gtpv1c_port, gtp_handle);
+        dissector_delete("udp.port", gtpv1u_port, gtp_handle);
+
+        if (gtp_over_tcp) {
+            dissector_delete("tcp.port", gtpv0_port, gtp_handle);
+            dissector_delete("tcp.port", gtpv1c_port, gtp_handle);
+            dissector_delete("tcp.port", gtpv1u_port, gtp_handle);
+        }
     }
 
     gtp_over_tcp = g_gtp_over_tcp;
@@ -7130,9 +7130,9 @@ void proto_reg_handoff_gtp(void)
     dissector_add("udp.port", g_gtpv1u_port, gtp_handle);
 
     if (g_gtp_over_tcp) {
-       dissector_add("tcp.port", g_gtpv0_port, gtp_handle);
-       dissector_add("tcp.port", g_gtpv1c_port, gtp_handle);
-       dissector_add("tcp.port", g_gtpv1u_port, gtp_handle);
+        dissector_add("tcp.port", g_gtpv0_port, gtp_handle);
+        dissector_add("tcp.port", g_gtpv1c_port, gtp_handle);
+        dissector_add("tcp.port", g_gtpv1u_port, gtp_handle);
     }
 }
 
@@ -7142,9 +7142,9 @@ void proto_reg_handoff_gtp(void)
  * Local variables:
  * c-basic-offset: 4
  * tab-width: 8
- * indent-tabs-mode: t
+ * indent-tabs-mode: nil
  * End:
  *
- * vi: set shiftwidth=4 tabstop=8 noexpandtab
- * :indentSize=4:tabSize=8:noTabs=false:
+ * vi: set shiftwidth=4 tabstop=8 expandtab
+ * :indentSize=4:tabSize=8:noTabs=true:
  */
index c4442833d4fd50677818df709361ef99318dc5a3..882114e3396562b2655888fd4edd4bfc771c1e49 100644 (file)
@@ -173,217 +173,217 @@ static void dissect_gtpv2_ie_common(tvbuff_t * tvb, packet_info * pinfo _U_, pro
 
 /*Message Types for GTPv2 (Refer Pg19 29.274) (SB)*/
 static const value_string gtpv2_message_type_vals[] = {
-       {0, "Reserved"},
-       {1, "Echo Request"},
-       {2, "Echo Response"},
-       {3, "Version Not Supported Indication"},
-       /* 4-24 Reserved for S101 interface TS 29.276 */
-       /* 25-31 Reserved for Sv interface TS 29.280 */
-       /* SGSN/MME to PGW (S4/S11, S5/S8) */
-       {32, "Create Session Request"},
-       {33, "Create Session Response"},
-       {34, "Modify Bearer Request"},
-       {35, "Modify Bearer Response"},
-       {36, "Delete Session Request"},
-       {37, "Delete Session Response"},
-       /* SGSN to PGW (S4, S5/S8) */
-       {38, "Change Notification Request"},
-       {39, "Change Notification Response"},
-       /* 40-63 For future use */
-       /* Messages without explicit response */
-       {64, "Modify Bearer Command"},                                                  /* (MME/SGSN to PGW -S11/S4, S5/S8) */
-       {65, "Modify Bearer Failure Indication"},                               /*(PGW to MME/SGSN -S5/S8, S11/S4) */
-       {66, "Delete Bearer Command"},                                                  /* (MME to PGW -S11, S5/S8) */
-       {67, "Delete Bearer Failure Indication"},                               /* (PGW to MME -S5/S8, S11) */
-       {68, "Bearer Resource Command"},                                                /* (MME/SGSN to PGW -S11/S4, S5/S8) */
-       {69, "Bearer Resource Failure Indication"},                             /* (PGW to MME/SGSN -S5/S8, S11/S4) */
-       {70, "Downlink Data Notification Failure Indication"},  /*(SGSN/MME to SGW -S4/S11) */
-       {71, "Trace Session Activation"},
-       {72, "Trace Session Deactivation"},
-       {73, "Stop Paging Indication"},
-       /* 74-94 For future use */ 
-       /* PDN-GW to SGSN/MME (S5/S8, S4/S11) */
-       {95, "Create Bearer Request"},
-       {96, "Create Bearer Response"},
-       {97, "Update Bearer Request"},
-       {98, "Update Bearer Response"},
-       {99, "Delete Bearer Request"},
-       {100, "Delete Bearer Response"},
-       /* PGW to MME, MME to PGW, SGW to PGW, SGW to MME (S5/S8, S11) */
-       {101, "Delete PDN Connection Set Request"},
-       {102, "Delete PDN Connection Set Response"},
-       /* 103-127 For future use */
-       /* MME to MME, SGSN to MME, MME to SGSN, SGSN to SGSN (S3/10/S16) */
-       {128, "Identification Request"},
-       {129, "Identification Response"},
-       {130, "Context Request"},
-       {131, "Context Response"},
-       {132, "Context Acknowledge"},
-       {133, "Forward Relocation Request"},
-       {134, "Forward Relocation Response"},
-       {135, "Forward Relocation Complete Notification"},
-       {136, "Forward Relocation Complete Acknowledge"},
-       {137, "Forward Access Context Notification"},
-       {138, "Forward Access Context Acknowledge"},
-       {139, "Relocation Cancel Request"},
-       {140, "Relocation Cancel Response"},
-       {141, "Configuration Transfer Tunnel"},
-       /* 142-148 For future use */
-       /* SGSN to MME, MME to SGSN (S3)*/
-       {149, "Detach Notification"},
-       {150, "Detach Acknowledge"},
-       {151, "CS Paging Indication"},
-       {152, "RAN Information Relay"},
-       /* 153-159 For future use */
-       /* MME to SGW (S11) */
-       {160, "Create Forwarding Tunnel Request"},
-       {161, "Create Forwarding Tunnel Response"},
-       {162, "Suspend Notification"},
-       {163, "Suspend Acknowledge"},
-       {164, "Resume Notification"},
-       {165, "Resume Acknowledge"},
-       {166, "Create Indirect Data Forwarding Tunnel Request"},
-       {167, "Create Indirect Data Forwarding Tunnel Response"},
-       {168, "Delete Indirect Data Forwarding Tunnel Request"},
-       {169, "Delete Indirect Data Forwarding Tunnel Response"},
-       {170, "Release Access Bearers Request"},
-       {171, "Release Access Bearers Response"},
-       /* 172-175 For future use */
-       /* SGW to SGSN/MME (S4/S11) */
-       {176, "Downlink Data Notification "},
-       {177, "Downlink Data Notification Acknowledgement"},
-       /* SGW to SGSN (S4) */
-       {178, "Update Bearer Complete "},
-       /* 179-191 For future use */
-       /* Other */
-       /* 192-244 For future use */
-       /* 245-255 Reserved for GTP-U TS 29.281 [13] */
+    {0, "Reserved"},
+    {1, "Echo Request"},
+    {2, "Echo Response"},
+    {3, "Version Not Supported Indication"},
+    /* 4-24 Reserved for S101 interface TS 29.276 */
+    /* 25-31 Reserved for Sv interface TS 29.280 */
+    /* SGSN/MME to PGW (S4/S11, S5/S8) */
+    {32, "Create Session Request"},
+    {33, "Create Session Response"},
+    {34, "Modify Bearer Request"},
+    {35, "Modify Bearer Response"},
+    {36, "Delete Session Request"},
+    {37, "Delete Session Response"},
+    /* SGSN to PGW (S4, S5/S8) */
+    {38, "Change Notification Request"},
+    {39, "Change Notification Response"},
+    /* 40-63 For future use */
+    /* Messages without explicit response */
+    {64, "Modify Bearer Command"},                          /* (MME/SGSN to PGW -S11/S4, S5/S8) */
+    {65, "Modify Bearer Failure Indication"},               /*(PGW to MME/SGSN -S5/S8, S11/S4) */
+    {66, "Delete Bearer Command"},                          /* (MME to PGW -S11, S5/S8) */
+    {67, "Delete Bearer Failure Indication"},               /* (PGW to MME -S5/S8, S11) */
+    {68, "Bearer Resource Command"},                        /* (MME/SGSN to PGW -S11/S4, S5/S8) */
+    {69, "Bearer Resource Failure Indication"},             /* (PGW to MME/SGSN -S5/S8, S11/S4) */
+    {70, "Downlink Data Notification Failure Indication"},  /*(SGSN/MME to SGW -S4/S11) */
+    {71, "Trace Session Activation"},
+    {72, "Trace Session Deactivation"},
+    {73, "Stop Paging Indication"},
+    /* 74-94 For future use */
+    /* PDN-GW to SGSN/MME (S5/S8, S4/S11) */
+    {95, "Create Bearer Request"},
+    {96, "Create Bearer Response"},
+    {97, "Update Bearer Request"},
+    {98, "Update Bearer Response"},
+    {99, "Delete Bearer Request"},
+    {100, "Delete Bearer Response"},
+    /* PGW to MME, MME to PGW, SGW to PGW, SGW to MME (S5/S8, S11) */
+    {101, "Delete PDN Connection Set Request"},
+    {102, "Delete PDN Connection Set Response"},
+    /* 103-127 For future use */
+    /* MME to MME, SGSN to MME, MME to SGSN, SGSN to SGSN (S3/10/S16) */
+    {128, "Identification Request"},
+    {129, "Identification Response"},
+    {130, "Context Request"},
+    {131, "Context Response"},
+    {132, "Context Acknowledge"},
+    {133, "Forward Relocation Request"},
+    {134, "Forward Relocation Response"},
+    {135, "Forward Relocation Complete Notification"},
+    {136, "Forward Relocation Complete Acknowledge"},
+    {137, "Forward Access Context Notification"},
+    {138, "Forward Access Context Acknowledge"},
+    {139, "Relocation Cancel Request"},
+    {140, "Relocation Cancel Response"},
+    {141, "Configuration Transfer Tunnel"},
+    /* 142-148 For future use */
+    /* SGSN to MME, MME to SGSN (S3)*/
+    {149, "Detach Notification"},
+    {150, "Detach Acknowledge"},
+    {151, "CS Paging Indication"},
+    {152, "RAN Information Relay"},
+    /* 153-159 For future use */
+    /* MME to SGW (S11) */
+    {160, "Create Forwarding Tunnel Request"},
+    {161, "Create Forwarding Tunnel Response"},
+    {162, "Suspend Notification"},
+    {163, "Suspend Acknowledge"},
+    {164, "Resume Notification"},
+    {165, "Resume Acknowledge"},
+    {166, "Create Indirect Data Forwarding Tunnel Request"},
+    {167, "Create Indirect Data Forwarding Tunnel Response"},
+    {168, "Delete Indirect Data Forwarding Tunnel Request"},
+    {169, "Delete Indirect Data Forwarding Tunnel Response"},
+    {170, "Release Access Bearers Request"},
+    {171, "Release Access Bearers Response"},
+    /* 172-175 For future use */
+    /* SGW to SGSN/MME (S4/S11) */
+    {176, "Downlink Data Notification "},
+    {177, "Downlink Data Notification Acknowledgement"},
+    /* SGW to SGSN (S4) */
+    {178, "Update Bearer Complete "},
+    /* 179-191 For future use */
+    /* Other */
+    /* 192-244 For future use */
+    /* 245-255 Reserved for GTP-U TS 29.281 [13] */
     {0, NULL}
 };
 
-#define GTPV2_IE_RESERVED              0
-#define GTPV2_IE_IMSI                  1
-#define GTPV2_IE_CAUSE                 2
-#define GTPV2_REC_REST_CNT             3
-#define GTPV2_APN                              71
-#define GTPV2_AMBR              72 
-#define GTPV2_EBI                              73
-#define GTPV2_IP_ADDRESS               74 
-#define GTPV2_MEI                              75 
-#define GTPV2_IE_MSISDN                        76
-#define GTPV2_INDICATION               77
-#define GTPV2_PCO                              78
-#define GTPV2_PAA                              79
-#define GTPV2_BEARER_QOS               80
-#define GTPV2_FLOW_QOS                 81
-#define GTPV2_IE_RAT_TYPE              82
-#define GTPV2_IE_SERV_NET              83
-#define GTPV2_BEARER_TFT               84
-#define GTPV2_TAD                              85
-#define        GTPV2_ULI                               86
-#define GTPV2_F_TEID                   87
-#define GTPV2_G_CN_ID                  89
-#define GTPV2_DELAY_VALUE              92
-#define GTPV2_BEARER_CTX               93
+#define GTPV2_IE_RESERVED        0
+#define GTPV2_IE_IMSI            1
+#define GTPV2_IE_CAUSE           2
+#define GTPV2_REC_REST_CNT       3
+#define GTPV2_APN               71
+#define GTPV2_AMBR              72
+#define GTPV2_EBI               73
+#define GTPV2_IP_ADDRESS        74
+#define GTPV2_MEI               75
+#define GTPV2_IE_MSISDN         76
+#define GTPV2_INDICATION        77
+#define GTPV2_PCO               78
+#define GTPV2_PAA               79
+#define GTPV2_BEARER_QOS        80
+#define GTPV2_FLOW_QOS          81
+#define GTPV2_IE_RAT_TYPE       82
+#define GTPV2_IE_SERV_NET       83
+#define GTPV2_BEARER_TFT        84
+#define GTPV2_TAD               85
+#define GTPV2_ULI               86
+#define GTPV2_F_TEID            87
+#define GTPV2_G_CN_ID           89
+#define GTPV2_DELAY_VALUE       92
+#define GTPV2_BEARER_CTX        93
 #define GTPV2_CHARGING_ID       94
 #define GTPV2_CHARGING_CHARACTERISTIC       95
 #define GTPV2_BEARER_FLAG       97
-#define GTPV2_PDN_TYPE         99
-#define GTPV2_PTI                              100
-#define GTPV2_UE_TIME_ZONE             114
+#define GTPV2_PDN_TYPE          99
+#define GTPV2_PTI               100
+#define GTPV2_UE_TIME_ZONE      114
 #define GTPV2_APN_RESTRICTION   127
-#define GTPV2_SELEC_MODE        128 
-#define GTPV2_BEARER_CONTROL_MODE      130
-#define GTPV2_CNG_REP_ACT              131
-#define GTPV2_NODE_TYPE                        135 
+#define GTPV2_SELEC_MODE        128
+#define GTPV2_BEARER_CONTROL_MODE   130
+#define GTPV2_CNG_REP_ACT       131
+#define GTPV2_NODE_TYPE         135
 
-#define SPARE                                                          0X0
-#define CREATE_NEW_TFT                                         0X20
-#define DELETE_TFT                                                     0X40
-#define ADD_PACKET_FILTERS_TFT                         0X60
-#define REPLACE_PACKET_FILTERS_TFT                     0X80
-#define DELETE_PACKET_FILTERS_TFT                      0XA0
-#define NO_TFT_OPERATION                                       0XC0
-#define RESERVED                                                       0XE0
+#define SPARE                               0X0
+#define CREATE_NEW_TFT                      0X20
+#define DELETE_TFT                          0X40
+#define ADD_PACKET_FILTERS_TFT              0X60
+#define REPLACE_PACKET_FILTERS_TFT          0X80
+#define DELETE_PACKET_FILTERS_TFT           0XA0
+#define NO_TFT_OPERATION                    0XC0
+#define RESERVED                            0XE0
 
 
 /* Table 8.1-1: Information Element types for GTPv2 */
 static const value_string gtpv2_element_type_vals[] = {
-       {0, "Reserved"},
-       {1, "International Mobile Subscriber Identity (IMSI)"},                                         /* Variable Length / 8.3 */
-       {2, "Cause"},                                                                                                                           /* Variable Length / 8.4 */
-       {3, "Recovery (Restart Counter)"},                                                                                      /* Variable Length / 8.5 */
-       /* 4-50 Reserved for S101 interface Extendable / See 3GPP TS 29.276 [14] */
-       /* 51-70 Reserved for Sv interface Extendable / See 3GPP TS 29.280 [15] */
-       {71, "Access Point Name (APN)"},                                                                                        /* Variable Length / 8.6 */
-       {72, "Aggregate Maximum Bit Rate (AMBR)"},                                                                      /* Fixed Length / 8.7 */
-       {73, "EPS Bearer ID (EBI)"},                                                                                            /* Extendable / 8.8 */
-       {74, "IP Address"},                                                                                                                     /* Extendable / 8.9 */
-       {75, "Mobile Equipment Identity (MEI)"},                                                                        /* Variable Length / 8.10 */
-       {76, "MSISDN"},                                                                                                                         /* Variable Length / 8.11 */
-       {77, "Indication"},                                                                                                                     /* Extendable / 8.12 */
-       {78, "Protocol Configuration Options (PCO)"},                                                           /* Variable Length / 8.13 */
-       {79, "PDN Address Allocation (PAA)"},                                                                           /* Variable Length / 8.14 */
-       {80, "Bearer Level Quality of Service (Bearer QoS)"},                                           /* Variable Length / 8.15 */
-       {81, "Flow Quality of Service (Flow QoS)"},                                                                     /* Extendable / 8.16 */
-       {82, "RAT Type"},                                                                                                                       /* Extendable / 8.17 */
-       {83, "Serving Network"},                                                                                                        /* Extendable / 8.18 */
-       {84, "EPS Bearer Level Traffic Flow Template (Bearer TFT)"},                            /* Variable Length / 8.19 */
-       {85, "Traffic Aggregation Description (TAD)"},                                                          /* Variable Length / 8.20 */
-       {86, "User Location Info (ULI)"},                                                                                       /* Variable Length / 8.21 */
-       {87, "Fully Qualified Tunnel Endpoint Identifier (F-TEID)"},                            /* Extendable / 8.22 */
-       {88, "TMSI"},                                                                                                                           /* Variable Length / 8.23 */
-       {89, "Global CN-Id"},                                                                                                           /* Variable Length / 8.24 */
-       {90, "S103 PDN Data Forwarding Info (S103PDF)"},                                                        /* Variable Length / 8.25 */
-       {91, "S1-U Data Forwarding Info (S1UDF)"},                                                                      /* Variable Length/ 8.26 */
-       {92, "Delay Value"},                                                                                                            /* Extendable / 8.27 */
-       {93, "Bearer Context"},                                                                                                         /* Extendable / 8.28 */
-       {94, "Charging ID"},                                                                                                            /* Extendable / 8.29 */
-       {95, "Charging Characteristics"},                                                                                       /* Extendable / 8.30 */
-       {96, "Trace Information"},                                                                                                      /* Extendable / 8.31 */
-       {97, "Bearer Flags"},                                                                                                           /* Extendable / 8.32 */
-       {98, "Paging Cause"},                                                                                                           /* Variable Length / 8.33 */
-       {99, "PDN Type"},                                                                                                                       /* Extendable / 8.34 */
-       {100, "Procedure Transaction ID"},                                                                                      /* Extendable / 8.35 */
-       {101, "DRX Parameter"},                                                                                                         /* Variable Length/ 8.36 */
-       {102, "UE Network Capability"},                                                                                         /* Variable Length / 8.37 */
-       {103, "MM Context (GSM Key and Triplets)"},                                                                     /* Variable Length / 8.38 */
-       {104, "MM Context (UMTS Key, Used Cipher and Quintuplets)"},                            /* Variable Length / 8.38 */
-       {105, "MM Context (GSM Key, Used Cipher and Quintuplets)"},                                     /* Variable Length / 8.38 */
-       {106, "MM Context (UMTS Key and Quintuplets)"},                                                         /* Variable Length / 8.38 */
-       {107, "MM Context (EPS Security Context, Quadruplets and Quintuplets)"},        /* Variable Length / 8.38 */
-       {108, "MM Context (UMTS Key, Quadruplets and Quintuplets)"},                            /* Variable Length / 8.38 */
-       {109, "PDN Connection"},                                                                                                        /* Extendable / 8.39 */
-       {110, "PDU Numbers"},                                                                                                           /* Extendable / 8.40 */
-       {111, "P-TMSI"},                                                                                                                        /* Variable Length / 8.41 */
-       {112, "P-TMSI Signature"},                                                                                                      /* Variable Length / 8.42 */
-       {113, "Hop Counter"},                                                                                                           /* Extendable / 8.43 */
-       {114, "UE Time Zone"},                                                                                                          /* Variable Length / 8.44 */
-       {115, "Trace Reference"},                                                                                                       /* Fixed Length / 8.45 */
-       {116, "Complete Request Message"},                                                                                      /* Variable Length / 8.46 */
-       {117, "GUTI"},                                                                                                                          /* Variable Length / 8.47 */
-       {118, "F-Container"},                                                                                                           /* Variable Length / 8.48 */
-       {119, "F-Cause"},                                                                                                                       /* Variable Length / 8.49 */
-       {120, "Selected PLMN ID"},                                                                                                      /* Variable Length / 8.50 */
-       {121, "Target Identification"},                                                                                         /* Variable Length / 8.51 */
-       {122, "NSAPI"},                                                                                                                         /* Extendable / 8.52 */
-       {123, "Packet Flow ID"},                                                                                                        /* Variable Length / 8.53 */
-       {124, "RAB Context"},                                                                                                           /* Fixed Length / 8.54 */
-       {125, "Source RNC PDCP Context Info"},                                                                          /* Variable Length / 8.55 */
-       {126, "UDP Source Port Number"},                                                                                        /* Extendable / 8.56 */
-       {127, "APN Restriction"},                                                                                                       /* Extendable / 8.57 */
-       {128, "Selection Mode"},                                                                                                        /* Extendable / 8.58 */
-       {129, "Source Identification"},                                                                                         /* Variable Length / 8.50 */
-       {130, "Bearer Control Mode"},                                                                                           /* Extendable / 8.60 */
-       {131, "Change Reporting Action"},                                                                                       /* Variable Length / 8.61 */
-       {132, "Fully Qualified PDN Connection Set Identifier (FQ-CSID)"},                       /* Variable Length / 8.62 */
-       {133, "Channel needed"},                                                                                                        /* Extendable / 8.63 */
-       {134, "eMLPP Priority"},                                                                                                        /* Extendable / 8.64 */
-       {135, "Node Type"},                                                                                                                     /* Extendable / 8.65 */
-       {136, "Fully Qualified Domain Name (FQDN)"},                                                            /* Variable Length / 8.66 */
-       {137, "Transaction Identifier (TI)"},                                                                           /* Variable Length / 8.68 */
-       /* 138-254 "Spare."},   */                                                                                                      /* For future use. FFS */
-       {255, "Private"},                                                                                                                       /* Extension Extendable / 8.71 */
+    {0, "Reserved"},
+    {1, "International Mobile Subscriber Identity (IMSI)"},                     /* Variable Length / 8.3 */
+    {2, "Cause"},                                                               /* Variable Length / 8.4 */
+    {3, "Recovery (Restart Counter)"},                                          /* Variable Length / 8.5 */
+    /* 4-50 Reserved for S101 interface Extendable / See 3GPP TS 29.276 [14] */
+    /* 51-70 Reserved for Sv interface Extendable / See 3GPP TS 29.280 [15] */
+    {71, "Access Point Name (APN)"},                                            /* Variable Length / 8.6 */
+    {72, "Aggregate Maximum Bit Rate (AMBR)"},                                  /* Fixed Length / 8.7 */
+    {73, "EPS Bearer ID (EBI)"},                                                /* Extendable / 8.8 */
+    {74, "IP Address"},                                                         /* Extendable / 8.9 */
+    {75, "Mobile Equipment Identity (MEI)"},                                    /* Variable Length / 8.10 */
+    {76, "MSISDN"},                                                             /* Variable Length / 8.11 */
+    {77, "Indication"},                                                         /* Extendable / 8.12 */
+    {78, "Protocol Configuration Options (PCO)"},                               /* Variable Length / 8.13 */
+    {79, "PDN Address Allocation (PAA)"},                                       /* Variable Length / 8.14 */
+    {80, "Bearer Level Quality of Service (Bearer QoS)"},                       /* Variable Length / 8.15 */
+    {81, "Flow Quality of Service (Flow QoS)"},                                 /* Extendable / 8.16 */
+    {82, "RAT Type"},                                                           /* Extendable / 8.17 */
+    {83, "Serving Network"},                                                    /* Extendable / 8.18 */
+    {84, "EPS Bearer Level Traffic Flow Template (Bearer TFT)"},                /* Variable Length / 8.19 */
+    {85, "Traffic Aggregation Description (TAD)"},                              /* Variable Length / 8.20 */
+    {86, "User Location Info (ULI)"},                                           /* Variable Length / 8.21 */
+    {87, "Fully Qualified Tunnel Endpoint Identifier (F-TEID)"},                /* Extendable / 8.22 */
+    {88, "TMSI"},                                                               /* Variable Length / 8.23 */
+    {89, "Global CN-Id"},                                                       /* Variable Length / 8.24 */
+    {90, "S103 PDN Data Forwarding Info (S103PDF)"},                            /* Variable Length / 8.25 */
+    {91, "S1-U Data Forwarding Info (S1UDF)"},                                  /* Variable Length/ 8.26 */
+    {92, "Delay Value"},                                                        /* Extendable / 8.27 */
+    {93, "Bearer Context"},                                                     /* Extendable / 8.28 */
+    {94, "Charging ID"},                                                        /* Extendable / 8.29 */
+    {95, "Charging Characteristics"},                                           /* Extendable / 8.30 */
+    {96, "Trace Information"},                                                  /* Extendable / 8.31 */
+    {97, "Bearer Flags"},                                                       /* Extendable / 8.32 */
+    {98, "Paging Cause"},                                                       /* Variable Length / 8.33 */
+    {99, "PDN Type"},                                                           /* Extendable / 8.34 */
+    {100, "Procedure Transaction ID"},                                          /* Extendable / 8.35 */
+    {101, "DRX Parameter"},                                                     /* Variable Length/ 8.36 */
+    {102, "UE Network Capability"},                                             /* Variable Length / 8.37 */
+    {103, "MM Context (GSM Key and Triplets)"},                                 /* Variable Length / 8.38 */
+    {104, "MM Context (UMTS Key, Used Cipher and Quintuplets)"},                /* Variable Length / 8.38 */
+    {105, "MM Context (GSM Key, Used Cipher and Quintuplets)"},                 /* Variable Length / 8.38 */
+    {106, "MM Context (UMTS Key and Quintuplets)"},                             /* Variable Length / 8.38 */
+    {107, "MM Context (EPS Security Context, Quadruplets and Quintuplets)"},    /* Variable Length / 8.38 */
+    {108, "MM Context (UMTS Key, Quadruplets and Quintuplets)"},                /* Variable Length / 8.38 */
+    {109, "PDN Connection"},                                                    /* Extendable / 8.39 */
+    {110, "PDU Numbers"},                                                       /* Extendable / 8.40 */
+    {111, "P-TMSI"},                                                            /* Variable Length / 8.41 */
+    {112, "P-TMSI Signature"},                                                  /* Variable Length / 8.42 */
+    {113, "Hop Counter"},                                                       /* Extendable / 8.43 */
+    {114, "UE Time Zone"},                                                      /* Variable Length / 8.44 */
+    {115, "Trace Reference"},                                                   /* Fixed Length / 8.45 */
+    {116, "Complete Request Message"},                                          /* Variable Length / 8.46 */
+    {117, "GUTI"},                                                              /* Variable Length / 8.47 */
+    {118, "F-Container"},                                                       /* Variable Length / 8.48 */
+    {119, "F-Cause"},                                                           /* Variable Length / 8.49 */
+    {120, "Selected PLMN ID"},                                                  /* Variable Length / 8.50 */
+    {121, "Target Identification"},                                             /* Variable Length / 8.51 */
+    {122, "NSAPI"},                                                             /* Extendable / 8.52 */
+    {123, "Packet Flow ID"},                                                    /* Variable Length / 8.53 */
+    {124, "RAB Context"},                                                       /* Fixed Length / 8.54 */
+    {125, "Source RNC PDCP Context Info"},                                      /* Variable Length / 8.55 */
+    {126, "UDP Source Port Number"},                                            /* Extendable / 8.56 */
+    {127, "APN Restriction"},                                                   /* Extendable / 8.57 */
+    {128, "Selection Mode"},                                                    /* Extendable / 8.58 */
+    {129, "Source Identification"},                                             /* Variable Length / 8.50 */
+    {130, "Bearer Control Mode"},                                               /* Extendable / 8.60 */
+    {131, "Change Reporting Action"},                                           /* Variable Length / 8.61 */
+    {132, "Fully Qualified PDN Connection Set Identifier (FQ-CSID)"},           /* Variable Length / 8.62 */
+    {133, "Channel needed"},                                                    /* Extendable / 8.63 */
+    {134, "eMLPP Priority"},                                                    /* Extendable / 8.64 */
+    {135, "Node Type"},                                                         /* Extendable / 8.65 */
+    {136, "Fully Qualified Domain Name (FQDN)"},                                /* Variable Length / 8.66 */
+    {137, "Transaction Identifier (TI)"},                                       /* Variable Length / 8.68 */
+    /* 138-254 "Spare."},   */                                                  /* For future use. FFS */
+    {255, "Private"},                                                           /* Extension Extendable / 8.71 */
     {0, NULL}
 };
 
@@ -393,15 +393,15 @@ static void
 dissect_gtpv2_unknown(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 instance _U_)
 {
 
-       proto_tree_add_text(tree, tvb, 0, length, "IE data not dissected yet"); 
+    proto_tree_add_text(tree, tvb, 0, length, "IE data not dissected yet");
 }
 
-/* 
+/*
  * 8.3 International Mobile Subscriber Identity (IMSI)
  *
  * IMSI is defined in 3GPP TS 23.003
  * Editor's note: IMSI coding will be defined in 3GPP TS 24.301
- * Editor's note: In the first release of GTPv2 spec (TS 29.274v8.0.0) n = 8. 
+ * Editor's note: In the first release of GTPv2 spec (TS 29.274v8.0.0) n = 8.
  * That is, the overall length of the IE is 11 octets.
  */
 
@@ -413,10 +413,10 @@ static gchar *imsi_to_str(const guint8 * ad)
 
     for (i = 0; i < 8; i++)
     {
-       if (((ad[i] >> 4) & 0x0F) <= 9)
-               str[j++] = ((ad[i] >> 4) & 0x0F) + 0x30;
-       if ((ad[i] & 0x0F) <= 9)
-               str[j++] = (ad[i] & 0x0F) + 0x30; /* Adding 0x30(48 decimal) makes it a printable digit (Eg. Ascii value 0f 9 is 57 (9+48))*/
+        if (((ad[i] >> 4) & 0x0F) <= 9)
+            str[j++] = ((ad[i] >> 4) & 0x0F) + 0x30;
+        if ((ad[i] & 0x0F) <= 9)
+            str[j++] = (ad[i] & 0x0F) + 0x30; /* Adding 0x30(48 decimal) makes it a printable digit (Eg. Ascii value 0f 9 is 57 (9+48))*/
 
     }
     str[j] = '\0';
@@ -428,75 +428,75 @@ static void
 dissect_gtpv2_imsi(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 instance _U_)
 {
     int offset= 0;
-       guint8 imsi_val[8];
-       gchar *imsi_str;
+    guint8 imsi_val[8];
+    gchar *imsi_str;
 
-       tvb_memcpy(tvb, imsi_val, offset , 8);
-       imsi_str = imsi_to_str(imsi_val);
+    tvb_memcpy(tvb, imsi_val, offset , 8);
+    imsi_str = imsi_to_str(imsi_val);
 
-       proto_tree_add_string(tree, hf_gtpv2_imsi, tvb, offset, length, imsi_str);
+    proto_tree_add_string(tree, hf_gtpv2_imsi, tvb, offset, length, imsi_str);
 }
 
 /* Table 8.4-1: Cause values */
 static const value_string gtpv2_cause_vals[] = {
-       {0, "Reserved"},
-       /* Request */
-       {1, "Paging Cause"},
-       {2, "Local Detach"},
-       {3, "Complete Detach"},
-       {4, "RAT changed from 3GPP to Non-3GPP"},
-       {5, "ISR is activated"},
-       /* 6-15 Spare. This value range is reserved for Cause values in a request message */
-       /* Acceptance Response */
-       {16, "Request accepted"},
-       {17, "Request accepted partially"},
-       {18, "New PDN type due to network preference"},
-       {19, "New PDN type due to single address bearer only"},
-       /* 20-63 Spare. This value range is reserved for Cause values in acceptance response message */
-       /* Rejection Response */
-       {64, "Context Not Found"},
-       {65, "Invalid Message Format"},
-       {66, "Version not supported by next peer"},
-       {67, "Invalid length"},
-       {68, "Service not supported"},
-       {69, "Mandatory IE incorrect"},
-       {70, "Mandatory IE missing"},
-       {71, "Optional IE incorrect"},
-       {72, "System failure"},
-       {73, "No resources available"},
-       {74, "Semantic error in the TFT operation"},
-       {75, "Syntactic error in the TFT operation"},
-       {76, "Semantic errors in packet filter(s)"},
-       {77, "Syntactic errors in packet filter(s)"},
-       {78, "Missing or unknown APN"},
-       {79, "Unexpected repeated IE"},
-       {80, "GRE key not found"},
-       {81, "Reallocation failure"},
-       {82, "Denied in RAT"},
-       {83, "Preferred PDN type not supported"},
-       {84, "All dynamic addresses are occupied"},
-       {85, "UE context without TFT already activated"},
-       {86, "Protocol type not supported"},
-       {87, "UE not responding"},
-       {88, "UE refuses"},
-       {89, "Service denied"},
-       {90, "Unable to page UE"},
-       {91, "No memory available"},
-       {92, "User authentication failed"},
-       {93, "APN access denied - no subscription"},
-       {94, "Request rejected"},
-       {95, "P-TMSI Signature mismatch"},
-       {96, "IMSI not known"},
-       {97, "Semantic error in the TAD operation"},
-       {98, "Syntactic error in the TAD operation"},
-       {99, "Reserved Message Value Received"},
-       {100, "PGW not responding"},
-       {101, "Collision with network initiated request"},
-       {102, "Unable to page UE due to Suspension"},
-       {103, "Conditional IE missing"},
-       {104, "APN Restriction type Incompatible with currently active PDN connection"},
-       /* 105-219 Spare. This value range is reserved for Cause values in rejection response message */
-       /* 220-255 Reserved for 3GPP Specific PMIPv6 Error Codes as defined in 3GPP TS 29.275 [26] */
+    {0, "Reserved"},
+    /* Request */
+    {1, "Paging Cause"},
+    {2, "Local Detach"},
+    {3, "Complete Detach"},
+    {4, "RAT changed from 3GPP to Non-3GPP"},
+    {5, "ISR is activated"},
+    /* 6-15 Spare. This value range is reserved for Cause values in a request message */
+    /* Acceptance Response */
+    {16, "Request accepted"},
+    {17, "Request accepted partially"},
+    {18, "New PDN type due to network preference"},
+    {19, "New PDN type due to single address bearer only"},
+    /* 20-63 Spare. This value range is reserved for Cause values in acceptance response message */
+    /* Rejection Response */
+    {64, "Context Not Found"},
+    {65, "Invalid Message Format"},
+    {66, "Version not supported by next peer"},
+    {67, "Invalid length"},
+    {68, "Service not supported"},
+    {69, "Mandatory IE incorrect"},
+    {70, "Mandatory IE missing"},
+    {71, "Optional IE incorrect"},
+    {72, "System failure"},
+    {73, "No resources available"},
+    {74, "Semantic error in the TFT operation"},
+    {75, "Syntactic error in the TFT operation"},
+    {76, "Semantic errors in packet filter(s)"},
+    {77, "Syntactic errors in packet filter(s)"},
+    {78, "Missing or unknown APN"},
+    {79, "Unexpected repeated IE"},
+    {80, "GRE key not found"},
+    {81, "Reallocation failure"},
+    {82, "Denied in RAT"},
+    {83, "Preferred PDN type not supported"},
+    {84, "All dynamic addresses are occupied"},
+    {85, "UE context without TFT already activated"},
+    {86, "Protocol type not supported"},
+    {87, "UE not responding"},
+    {88, "UE refuses"},
+    {89, "Service denied"},
+    {90, "Unable to page UE"},
+    {91, "No memory available"},
+    {92, "User authentication failed"},
+    {93, "APN access denied - no subscription"},
+    {94, "Request rejected"},
+    {95, "P-TMSI Signature mismatch"},
+    {96, "IMSI not known"},
+    {97, "Semantic error in the TAD operation"},
+    {98, "Syntactic error in the TAD operation"},
+    {99, "Reserved Message Value Received"},
+    {100, "PGW not responding"},
+    {101, "Collision with network initiated request"},
+    {102, "Unable to page UE due to Suspension"},
+    {103, "Conditional IE missing"},
+    {104, "APN Restriction type Incompatible with currently active PDN connection"},
+    /* 105-219 Spare. This value range is reserved for Cause values in rejection response message */
+    /* 220-255 Reserved for 3GPP Specific PMIPv6 Error Codes as defined in 3GPP TS 29.275 [26] */
     {0, NULL}
 };
 
@@ -507,11 +507,11 @@ static const value_string gtpv2_cause_vals[] = {
 static void
 dissect_gtpv2_cause(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 instance _U_)
 {
-       int offset = 0;
-       /* Cause value octet 5 */
-       proto_tree_add_item(tree, hf_gtpv2_cause, tvb, offset, 1, FALSE);
-       offset++;
-       proto_tree_add_item(tree, hf_gtpv2_cause_cs, tvb, offset, 1, FALSE);
+    int offset = 0;
+    /* Cause value octet 5 */
+    proto_tree_add_item(tree, hf_gtpv2_cause, tvb, offset, 1, FALSE);
+    offset++;
+    proto_tree_add_item(tree, hf_gtpv2_cause_cs, tvb, offset, 1, FALSE);
 }
 
 /*
@@ -520,8 +520,8 @@ dissect_gtpv2_cause(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, pro
 static void
 dissect_gtpv2_recovery(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 instance _U_)
 {
-       int offset = 0;
-       proto_tree_add_item(tree, hf_gtpv2_rec, tvb, offset, 1, FALSE);
+    int offset = 0;
+    proto_tree_add_item(tree, hf_gtpv2_rec, tvb, offset, 1, FALSE);
 }
 
 /*
@@ -530,26 +530,26 @@ dissect_gtpv2_recovery(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
 static void
 dissect_gtpv2_apn(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 instance _U_)
 {
-       int offset = 0;
+    int offset = 0;
     guint8 *apn = NULL;
     int name_len, tmp;
 
     if (length > 0) {
-               name_len = tvb_get_guint8(tvb, offset);
-
-               if (name_len < 0x20) {
-                       apn = tvb_get_ephemeral_string(tvb, offset + 1, length - 1);
-                       for (;;) {
-                               if (name_len >= length - 1)
-                               break;
-                               tmp = name_len;
-                               name_len = name_len + apn[tmp] + 1;
-                               apn[tmp] = '.';
-                       }
-               } else{
-                       apn = tvb_get_ephemeral_string(tvb, offset, length);
-               }
-               proto_tree_add_string(tree, hf_gtpv2_apn, tvb, offset, length, apn);
+        name_len = tvb_get_guint8(tvb, offset);
+
+        if (name_len < 0x20) {
+            apn = tvb_get_ephemeral_string(tvb, offset + 1, length - 1);
+            for (;;) {
+                if (name_len >= length - 1)
+                break;
+                tmp = name_len;
+                name_len = name_len + apn[tmp] + 1;
+                apn[tmp] = '.';
+            }
+        } else{
+            apn = tvb_get_ephemeral_string(tvb, offset, length);
+        }
+        proto_tree_add_string(tree, hf_gtpv2_apn, tvb, offset, length, apn);
     }
 
 }
@@ -560,38 +560,38 @@ dissect_gtpv2_apn(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto
 static void
 dissect_gtpv2_ambr(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 instance _U_)
 {
-       int offset = 0;
-       proto_tree_add_item(tree, hf_gtpv2_ambr_up, tvb, offset, 4, FALSE);
-       offset= offset + 4;
-       proto_tree_add_item(tree, hf_gtpv2_ambr_down, tvb, offset, 4, FALSE);
+    int offset = 0;
+    proto_tree_add_item(tree, hf_gtpv2_ambr_up, tvb, offset, 4, FALSE);
+    offset= offset + 4;
+    proto_tree_add_item(tree, hf_gtpv2_ambr_down, tvb, offset, 4, FALSE);
 }
 
-/* 
+/*
  * 8.8 EPS Bearer ID (EBI)
  */
 static void
 dissect_gtpv2_ebi(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 instance _U_)
 {
 
-       int offset = 0;
-       /* Spare (all bits set to 0) B8 - B5*/
-       /* EPS Bearer ID (EBI) B4 - B1 */
-       proto_tree_add_item(tree, hf_gtpv2_ebi, tvb, offset, 1, FALSE);
+    int offset = 0;
+    /* Spare (all bits set to 0) B8 - B5*/
+    /* EPS Bearer ID (EBI) B4 - B1 */
+    proto_tree_add_item(tree, hf_gtpv2_ebi, tvb, offset, 1, FALSE);
 
 }
 /* 8.9 IP Address  */
 static void
 dissect_gtpv2_ip_address(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 instance _U_)
 {
-       int offset = 0;
-       if (length==4)
-       {
-               proto_tree_add_item(tree, hf_gtpv2_ip_address_ipv4, tvb, offset, length, FALSE);
+    int offset = 0;
+    if (length==4)
+    {
+        proto_tree_add_item(tree, hf_gtpv2_ip_address_ipv4, tvb, offset, length, FALSE);
+    }
+    else if (length==16)
+    {
+        proto_tree_add_item(tree, hf_gtpv2_ip_address_ipv6, tvb, offset, length, FALSE);
     }
-       else if (length==16)
-       {
-               proto_tree_add_item(tree, hf_gtpv2_ip_address_ipv6, tvb, offset, length, FALSE);
-       }
 }
 /* 8.10 Mobile Equipment Identity (MEI)*/
 static gchar *mei_to_str(const guint8 * ad)
@@ -600,10 +600,10 @@ static gchar *mei_to_str(const guint8 * ad)
     int i, j = 0;
     for (i = 0; i < 8; i++)
     {
-       if (((ad[i] >> 4) & 0x0F) <= 9)
-               str[j++] = ((ad[i] >> 4) & 0x0F) + 0x30;
-       if ((ad[i] & 0x0F) <= 9)
-               str[j++] = (ad[i] & 0x0F) + 0x30; /* Adding 0x30(48 decimal) makes it a printable digit (Eg. Ascii value 0f 9 is 57 (9+48))*/
+        if (((ad[i] >> 4) & 0x0F) <= 9)
+            str[j++] = ((ad[i] >> 4) & 0x0F) + 0x30;
+        if ((ad[i] & 0x0F) <= 9)
+            str[j++] = (ad[i] & 0x0F) + 0x30; /* Adding 0x30(48 decimal) makes it a printable digit (Eg. Ascii value 0f 9 is 57 (9+48))*/
     }
     str[j] = '\0';
     return str;
@@ -612,12 +612,12 @@ static gchar *mei_to_str(const guint8 * ad)
 static void
 dissect_gtpv2_mei(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 instance _U_)
 {
-       int offset= 0;
-       guint8 mei_val[8];
-       gchar *mei_str;
-       tvb_memcpy(tvb, mei_val, offset , 8);
-       mei_str = mei_to_str(mei_val);
-       proto_tree_add_string(tree, hf_gtpv2_mei, tvb, offset, length, mei_str);
+    int offset= 0;
+    guint8 mei_val[8];
+    gchar *mei_str;
+    tvb_memcpy(tvb, mei_val, offset , 8);
+    mei_str = mei_to_str(mei_val);
+    proto_tree_add_string(tree, hf_gtpv2_mei, tvb, offset, length, mei_str);
 }
 
 /*
@@ -629,11 +629,11 @@ dissect_gtpv2_mei(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto
 static void
 dissect_gtpv2_msisdn(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 instance _U_)
 {
-       const char     *digit_str;
+    const char     *digit_str;
 
-       dissect_e164_cc(tvb, tree, 0, TRUE);
-       digit_str = unpack_digits(tvb, 1);
-       proto_tree_add_string(tree, hf_gtpv2_address_digits, tvb, 1, -1, digit_str);
+    dissect_e164_cc(tvb, tree, 0, TRUE);
+    digit_str = unpack_digits(tvb, 1);
+    proto_tree_add_string(tree, hf_gtpv2_address_digits, tvb, 1, -1, digit_str);
 }
 
 /*
@@ -642,25 +642,25 @@ dissect_gtpv2_msisdn(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, pr
 static void
 dissect_gtpv2_ind(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 instance _U_)
 {
-       int offset = 0;
-       proto_tree_add_item(tree, hf_gtpv2_daf,                 tvb, offset, 1, FALSE);
-       proto_tree_add_item(tree, hf_gtpv2_dtf,                 tvb, offset, 1, FALSE);
-       proto_tree_add_item(tree, hf_gtpv2_hi,                  tvb, offset, 1, FALSE);
-       proto_tree_add_item(tree, hf_gtpv2_dfi,                 tvb, offset, 1, FALSE);
-       proto_tree_add_item(tree, hf_gtpv2_oi,                  tvb, offset, 1, FALSE);
-       proto_tree_add_item(tree, hf_gtpv2_isrsi,               tvb, offset, 1, FALSE);
-       proto_tree_add_item(tree, hf_gtpv2_israi,               tvb, offset, 1, FALSE);
-       proto_tree_add_item(tree, hf_gtpv2_sgwci,               tvb, offset, 1, FALSE);
-       if(length==1)
-       {
-               proto_tree_add_text(tree, tvb, 0, length, "Older version?, should be 2 octets in 8.0.0");
-               return;
-       }
-       offset++;
-       proto_tree_add_item(tree, hf_gtpv2_pt,                  tvb, offset, 1, FALSE);
-       proto_tree_add_item(tree, hf_gtpv2_tdi,                 tvb, offset, 1, FALSE);
-       proto_tree_add_item(tree, hf_gtpv2_si,                  tvb, offset, 1, FALSE);
-       proto_tree_add_item(tree, hf_gtpv2_msv,                 tvb, offset, 1, FALSE);
+    int offset = 0;
+    proto_tree_add_item(tree, hf_gtpv2_daf,         tvb, offset, 1, FALSE);
+    proto_tree_add_item(tree, hf_gtpv2_dtf,         tvb, offset, 1, FALSE);
+    proto_tree_add_item(tree, hf_gtpv2_hi,          tvb, offset, 1, FALSE);
+    proto_tree_add_item(tree, hf_gtpv2_dfi,         tvb, offset, 1, FALSE);
+    proto_tree_add_item(tree, hf_gtpv2_oi,          tvb, offset, 1, FALSE);
+    proto_tree_add_item(tree, hf_gtpv2_isrsi,       tvb, offset, 1, FALSE);
+    proto_tree_add_item(tree, hf_gtpv2_israi,       tvb, offset, 1, FALSE);
+    proto_tree_add_item(tree, hf_gtpv2_sgwci,       tvb, offset, 1, FALSE);
+    if(length==1)
+    {
+        proto_tree_add_text(tree, tvb, 0, length, "Older version?, should be 2 octets in 8.0.0");
+        return;
+    }
+    offset++;
+    proto_tree_add_item(tree, hf_gtpv2_pt,          tvb, offset, 1, FALSE);
+    proto_tree_add_item(tree, hf_gtpv2_tdi,         tvb, offset, 1, FALSE);
+    proto_tree_add_item(tree, hf_gtpv2_si,          tvb, offset, 1, FALSE);
+    proto_tree_add_item(tree, hf_gtpv2_msv,         tvb, offset, 1, FALSE);
 }
 
 /*
@@ -671,9 +671,9 @@ dissect_gtpv2_ind(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto
 static void
 dissect_gtpv2_pco(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 instance _U_)
 {
-       /* pinfo needed */
-       gsm_a_dtap_pinfo = pinfo;
-       de_sm_pco(tvb, tree, 0, length, NULL, 0);
+    /* pinfo needed */
+    gsm_a_dtap_pinfo = pinfo;
+    de_sm_pco(tvb, tree, 0, length, NULL, 0);
 }
 
 /*
@@ -683,44 +683,44 @@ dissect_gtpv2_pco(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto
 static const value_string gtpv2_pdn_type_vals[] = {
     {1, "IPv4"},
     {2, "IPv6"},
-       {3, "IPv4/IPv6"},
+    {3, "IPv4/IPv6"},
     {0, NULL}
 };
 
 static void
 dissect_gtpv2_paa(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 instance _U_)
 {
-       int offset = 0;
-       guint8 pdn_type;
-       pdn_type  = tvb_get_guint8(tvb, offset);
+    int offset = 0;
+    guint8 pdn_type;
+    pdn_type  = tvb_get_guint8(tvb, offset);
     proto_tree_add_item(tree, hf_gtpv2_pdn_type, tvb, offset, 1, FALSE);
-       offset++;
-       switch(pdn_type)
-       {
-               case 1:
-                       /* IPv4 */
-                       proto_tree_add_item(tree, hf_gtpv2_pdn_ipv4, tvb, offset, 4, FALSE);
-                       offset+=4;
-                       break;
-               case 2:
-                       /* IPv6*/
-                       proto_tree_add_item(tree, hf_gtpv2_pdn_ipv6_len, tvb, offset, 1, FALSE);
-                       offset++;
-                       proto_tree_add_item(tree, hf_gtpv2_pdn_ipv6, tvb, offset, 16, FALSE);
-                       offset+=16;
-                       break;
-               case 3:
-                       /* IPv4/IPv6 */
-                       proto_tree_add_item(tree, hf_gtpv2_pdn_ipv6_len, tvb, offset, 1, FALSE);
-                       offset++;
-                       proto_tree_add_item(tree, hf_gtpv2_pdn_ipv6, tvb, offset, 16, FALSE);
-                       offset+=16;
-                       proto_tree_add_item(tree, hf_gtpv2_pdn_ipv4, tvb, offset, 4, FALSE);
-                       offset+=4;
-                       break;
-               default:
-                       break;
-       }
+    offset++;
+    switch(pdn_type)
+    {
+    case 1:
+        /* IPv4 */
+        proto_tree_add_item(tree, hf_gtpv2_pdn_ipv4, tvb, offset, 4, FALSE);
+        offset+=4;
+        break;
+    case 2:
+        /* IPv6*/
+        proto_tree_add_item(tree, hf_gtpv2_pdn_ipv6_len, tvb, offset, 1, FALSE);
+        offset++;
+        proto_tree_add_item(tree, hf_gtpv2_pdn_ipv6, tvb, offset, 16, FALSE);
+        offset+=16;
+        break;
+    case 3:
+        /* IPv4/IPv6 */
+        proto_tree_add_item(tree, hf_gtpv2_pdn_ipv6_len, tvb, offset, 1, FALSE);
+        offset++;
+        proto_tree_add_item(tree, hf_gtpv2_pdn_ipv6, tvb, offset, 16, FALSE);
+        offset+=16;
+        proto_tree_add_item(tree, hf_gtpv2_pdn_ipv4, tvb, offset, 4, FALSE);
+        offset+=4;
+        break;
+    default:
+        break;
+    }
 }
 /*
  * 8.15 Bearer Quality of Service (Bearer QoS)
@@ -729,21 +729,21 @@ dissect_gtpv2_paa(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto
 static void
 dissect_gtpv2_bearer_qos(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 instance _U_)
 {
-       int offset = 0;
-       proto_tree_add_item(tree, hf_gtpv2_bearer_qos_pvi, tvb, offset, 1, FALSE);
-       proto_tree_add_item(tree, hf_gtpv2_bearer_qos_pl, tvb, offset, 1, FALSE);
-       proto_tree_add_item(tree, hf_gtpv2_bearer_qos_pci, tvb, offset, 1, FALSE);
-       offset++;
-       proto_tree_add_item(tree, hf_gtpv2_bearer_qos_label_qci, tvb, offset, 1, FALSE);
-       offset++;
-       proto_tree_add_item(tree, hf_gtpv2_bearer_qos_mbr_up, tvb, offset, 5, FALSE);
-       offset= offset+5;
-       proto_tree_add_item(tree, hf_gtpv2_bearer_qos_mbr_down, tvb, offset, 5, FALSE);
-       offset= offset+5;
-       proto_tree_add_item(tree, hf_gtpv2_bearer_qos_gbr_up, tvb, offset, 5, FALSE);
-       offset= offset+5;
-       proto_tree_add_item(tree, hf_gtpv2_bearer_qos_gbr_down, tvb, offset, 5, FALSE);
-       offset= offset+5;
+    int offset = 0;
+    proto_tree_add_item(tree, hf_gtpv2_bearer_qos_pvi, tvb, offset, 1, FALSE);
+    proto_tree_add_item(tree, hf_gtpv2_bearer_qos_pl, tvb, offset, 1, FALSE);
+    proto_tree_add_item(tree, hf_gtpv2_bearer_qos_pci, tvb, offset, 1, FALSE);
+    offset++;
+    proto_tree_add_item(tree, hf_gtpv2_bearer_qos_label_qci, tvb, offset, 1, FALSE);
+    offset++;
+    proto_tree_add_item(tree, hf_gtpv2_bearer_qos_mbr_up, tvb, offset, 5, FALSE);
+    offset= offset+5;
+    proto_tree_add_item(tree, hf_gtpv2_bearer_qos_mbr_down, tvb, offset, 5, FALSE);
+    offset= offset+5;
+    proto_tree_add_item(tree, hf_gtpv2_bearer_qos_gbr_up, tvb, offset, 5, FALSE);
+    offset= offset+5;
+    proto_tree_add_item(tree, hf_gtpv2_bearer_qos_gbr_down, tvb, offset, 5, FALSE);
+    offset= offset+5;
 }
 
 /*
@@ -753,37 +753,37 @@ dissect_gtpv2_bearer_qos(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree
 static void
 dissect_gtpv2_flow_qos(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 instance _U_)
 {
-       int offset = 0;
-       proto_tree_add_item(tree, hf_gtpv2_flow_qos_label_qci, tvb, offset, 1, FALSE);
-       offset++;
-       proto_tree_add_item(tree, hf_gtpv2_flow_qos_mbr_up, tvb, offset, 5, FALSE);
-       offset= offset+5;
-       proto_tree_add_item(tree, hf_gtpv2_flow_qos_mbr_down, tvb, offset, 5, FALSE);
-       offset= offset+5;
-       proto_tree_add_item(tree, hf_gtpv2_flow_qos_gbr_up, tvb, offset, 5, FALSE);
-       offset= offset+5;
-       proto_tree_add_item(tree, hf_gtpv2_flow_qos_gbr_down, tvb, offset, 5, FALSE);
-       offset= offset+5;
+    int offset = 0;
+    proto_tree_add_item(tree, hf_gtpv2_flow_qos_label_qci, tvb, offset, 1, FALSE);
+    offset++;
+    proto_tree_add_item(tree, hf_gtpv2_flow_qos_mbr_up, tvb, offset, 5, FALSE);
+    offset= offset+5;
+    proto_tree_add_item(tree, hf_gtpv2_flow_qos_mbr_down, tvb, offset, 5, FALSE);
+    offset= offset+5;
+    proto_tree_add_item(tree, hf_gtpv2_flow_qos_gbr_up, tvb, offset, 5, FALSE);
+    offset= offset+5;
+    proto_tree_add_item(tree, hf_gtpv2_flow_qos_gbr_down, tvb, offset, 5, FALSE);
+    offset= offset+5;
 }
 
 /*
  * 8.17 RAT Type
  */
 static const value_string gtpv2_rat_type_vals[] = {
-       {0, "Reserved"},
-       {1, "UTRAN"},
-       {2, "GERAN"},
-       {3, "WLAN"},
-       {4, "GAN"},
-       {5, "HSPA Evolution"},
-       {6, "EUTRAN"},
-       {0, NULL}
+    {0, "Reserved"},
+    {1, "UTRAN"},
+    {2, "GERAN"},
+    {3, "WLAN"},
+    {4, "GAN"},
+    {5, "HSPA Evolution"},
+    {6, "EUTRAN"},
+    {0, NULL}
 };
 
 static void
 dissect_gtpv2_rat_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 instance _U_)
 {
-       proto_tree_add_item(tree, hf_gtpv2_rat_type, tvb, 0, 1, FALSE);
+    proto_tree_add_item(tree, hf_gtpv2_rat_type, tvb, 0, 1, FALSE);
 }
 
 /*
@@ -792,343 +792,343 @@ dissect_gtpv2_rat_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
 static void
 dissect_gtpv2_serv_net(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 instance _U_)
 {
-       dissect_e212_mcc_mnc(tvb, pinfo, tree, 0, TRUE); 
+    dissect_e212_mcc_mnc(tvb, pinfo, tree, 0, TRUE);
 }
 
 /*
  * 8.19 EPS Bearer Level Traffic Flow Template (Bearer TFT) */
 
 static const value_string gtpv2_opcode_vals[] = {
-       {0, "Spare"},
-       {1, "Create New TFT"},
-       {2, "Delete Existing TFT"},
-       {3, "Add Packet filters to existing TFT"},
-       {4, "Replace Packet filters in existing TFT"},
-       {5, "Delete Packet filters from existing TFT"},
-       {6, "No TFT Operation"},
-       {7, "Reserved"},
-       {0, NULL}
+    {0, "Spare"},
+    {1, "Create New TFT"},
+    {2, "Delete Existing TFT"},
+    {3, "Add Packet filters to existing TFT"},
+    {4, "Replace Packet filters in existing TFT"},
+    {5, "Delete Packet filters from existing TFT"},
+    {6, "No TFT Operation"},
+    {7, "Reserved"},
+    {0, NULL}
 };
 static const value_string gtpv2_comp_type_vals[] = {
-       {16, "IPV4 remote address type"},
-       {32, "IPV6 remote address type"},
-       {48, "Protocol Identifier"},
-       {64, "Single local port type"},
-       {65, "Local port range type"},
-       {80, "Single remote port type"},
-       {81, "Remote port range type"},
-       {96, "Security Parameter Index type"},
-       {112, "Type of Service/Traffic class type"},
-       {128, "Flow Label type"},
-       {0, NULL}
+    {16, "IPV4 remote address type"},
+    {32, "IPV6 remote address type"},
+    {48, "Protocol Identifier"},
+    {64, "Single local port type"},
+    {65, "Local port range type"},
+    {80, "Single remote port type"},
+    {81, "Remote port range type"},
+    {96, "Security Parameter Index type"},
+    {112, "Type of Service/Traffic class type"},
+    {128, "Flow Label type"},
+    {0, NULL}
 };
 static const value_string gtpv2_direction_vals[] = {
-       {0, "Pre Rel-7 TFT filter"},
-       {1, "Downlink only"},
-       {2, "uplink only"},
-       {3, "bidirectional"},
-       {0, NULL}
+    {0, "Pre Rel-7 TFT filter"},
+    {1, "Downlink only"},
+    {2, "uplink only"},
+    {3, "bidirectional"},
+    {0, NULL}
 };
 
 static void
 dissect_gtpv2_bearer_tft(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 instance _U_)
 {
-       int offset= 0,i=0,newoffset2;
-       guint8 number, opcode, ebit, comptype, length1;
-       proto_tree *ie_tree;
-       proto_item *ti;
-       number = tvb_get_guint8(tvb,offset)& 0x0f;
-       opcode = tvb_get_guint8(tvb,offset)& 0xe0;
-       ebit = tvb_get_guint8(tvb,offset)& 0x10;
-       proto_tree_add_item(tree, hf_gtpv2_b_tft_opcode, tvb, offset, 1, FALSE);
-       proto_tree_add_item(tree, hf_gtpv2_b_tft_number, tvb, offset, 1, FALSE);
-       proto_tree_add_item(tree, hf_gtpv2_b_tft_ebit, tvb, offset, 1, FALSE);
-       offset++;
-       switch(opcode)
-               {
-                       case SPARE:
-                               /* Spare */
-                               break;
-                       case CREATE_NEW_TFT:
-                               /* Create New TFT */
-                       case ADD_PACKET_FILTERS_TFT:
-                               /* Add packet filters to existing TFT */
-                       case REPLACE_PACKET_FILTERS_TFT:
-                               /*Replace Packet filters in existing TFT */
-                               while (i<number)
-                               {
-                                       i++;newoffset2=0;
-                                       length1 =tvb_get_guint8(tvb,offset+2);
-                                       ti = proto_tree_add_text(tree, tvb, offset, 3+length1, "Packet Filter %d",i);
-                                       ie_tree = proto_item_add_subtree(ti, ett_gtpv2_ie);
-                                       proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_id, tvb, offset, 1, FALSE);
-                                       proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_direction, tvb, offset, 1, FALSE);
-                                       offset++;
-                                       proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_eval, tvb, offset, 1, FALSE);
-                                       offset++;
-                                       proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_length, tvb, offset, 1, FALSE);
-                                       offset++;
-
-                                       while (newoffset2<length1)
-                                       {
-                                       proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_comp_type, tvb, offset, 1, FALSE);
-                                       comptype = tvb_get_guint8(tvb,offset);
-                                       offset++;
-                                       newoffset2++;
-                                               if (comptype==16)
-                                               {
-                                                       proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_ipv4, tvb, offset, 4, FALSE);
-                                                       proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_ipv4_mask, tvb, offset, 4, FALSE);
-                                                       offset+=8;
-                                                       newoffset2+=8;
-                                               }
-                                               if (comptype==32)
-                                               {
-                                                       proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_ipv6, tvb, offset, 16, FALSE);
-                                                       proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_ipv6_mask, tvb, offset, 16, FALSE);
-                                                       offset+=32;
-                                                       newoffset2+=32;
-                                               }
-                                               if (comptype==48)
-                                               {
-                                                       proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_prot_id, tvb, offset, 1, FALSE);
-                                                       offset+=1;
-                                                       newoffset2+=1;
-                                               }
-                                               if (comptype==64)
-                                               {
-                                                       proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_single_local, tvb, offset, 2, FALSE);
-                                                       offset+=2;
-                                                       newoffset2+=2;
-                                               }
-                                               if (comptype==65)
-                                               {
-                                                       proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_local_port_low, tvb, offset, 2, FALSE);
-                                                       offset+=2;
-                                                       newoffset2+=2;
-                                                       proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_local_port_high, tvb, offset, 2, FALSE);
-                                                       offset+=2;
-                                                       newoffset2+=2;
-                                               }
-                                               if (comptype==80)
-                                               {
-                                                       proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_single_remote, tvb, offset, 2, FALSE);
-                                                       offset+=2;
-                                                       newoffset2+=2;
-                                               }
-                                               if (comptype==81)
-                                               {
-                                                       proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_remote_port_low, tvb, offset, 2, FALSE);
-                                                       offset+=2;
-                                                       newoffset2+=2;
-                                                       proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_remote_port_high, tvb, offset, 2, FALSE);
-                                                       offset+=2;
-                                                       newoffset2+=2;
-                                               }
-                                               if (comptype==96)
-                                               {
-                                                       proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_security, tvb, offset, 4, FALSE);
-                                                       offset+=4;
-                                                       newoffset2+=4;
-                                               }
-                                               if (comptype==112)
-                                               {
-                                                       proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_service_type, tvb, offset, 1, FALSE);
-                                                       proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_service_type_mask, tvb, offset, 1, FALSE);
-                                                       offset+=2;
-                                                       newoffset2+=2;
-                                               }
-                                               if (comptype==128)
-                                               {
-                                                       proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_flow_label, tvb, offset, 3, FALSE);
-                                                       offset+=3;
-                                                       newoffset2+=3;
-                                               }
-                                 }
-                               }
-
-                               break;
-                       case DELETE_TFT:
-                               /* Delete Existing TFT */
-                               break;
-
-                       case DELETE_PACKET_FILTERS_TFT:
-                               /* Delete Packet filters from existing TFT */
-                               while (i<number)
-                               {
-                                       i++;
-                                       ti = proto_tree_add_text(tree, tvb, offset, 1, "Packet Filter %d",i);
-                                       ie_tree = proto_item_add_subtree(ti, ett_gtpv2_ie);
-                                       proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_id, tvb, offset, 1, FALSE);
-                                       proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_direction, tvb, offset, 1, FALSE);
-                                       offset++;
-                               }
-                               break;
-                       case NO_TFT_OPERATION:
-                               /* No TFT operation */
-                               break;
-                       case RESERVED:
-                               /* Reserved */
-                               break;
-                       default:
-                               break;
-               }
+    int offset= 0,i=0,newoffset2;
+    guint8 number, opcode, ebit, comptype, length1;
+    proto_tree *ie_tree;
+    proto_item *ti;
+    number = tvb_get_guint8(tvb,offset)& 0x0f;
+    opcode = tvb_get_guint8(tvb,offset)& 0xe0;
+    ebit = tvb_get_guint8(tvb,offset)& 0x10;
+    proto_tree_add_item(tree, hf_gtpv2_b_tft_opcode, tvb, offset, 1, FALSE);
+    proto_tree_add_item(tree, hf_gtpv2_b_tft_number, tvb, offset, 1, FALSE);
+    proto_tree_add_item(tree, hf_gtpv2_b_tft_ebit, tvb, offset, 1, FALSE);
+    offset++;
+    switch(opcode)
+    {
+    case SPARE:
+        /* Spare */
+        break;
+    case CREATE_NEW_TFT:
+        /* Create New TFT */
+    case ADD_PACKET_FILTERS_TFT:
+        /* Add packet filters to existing TFT */
+    case REPLACE_PACKET_FILTERS_TFT:
+        /*Replace Packet filters in existing TFT */
+        while (i<number)
+        {
+            i++;newoffset2=0;
+            length1 =tvb_get_guint8(tvb,offset+2);
+            ti = proto_tree_add_text(tree, tvb, offset, 3+length1, "Packet Filter %d",i);
+            ie_tree = proto_item_add_subtree(ti, ett_gtpv2_ie);
+            proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_id, tvb, offset, 1, FALSE);
+            proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_direction, tvb, offset, 1, FALSE);
+            offset++;
+            proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_eval, tvb, offset, 1, FALSE);
+            offset++;
+            proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_length, tvb, offset, 1, FALSE);
+            offset++;
+
+            while (newoffset2<length1)
+            {
+                proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_comp_type, tvb, offset, 1, FALSE);
+                comptype = tvb_get_guint8(tvb,offset);
+                offset++;
+                newoffset2++;
+                if (comptype==16)
+                {
+                    proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_ipv4, tvb, offset, 4, FALSE);
+                    proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_ipv4_mask, tvb, offset, 4, FALSE);
+                    offset+=8;
+                    newoffset2+=8;
+                }
+                if (comptype==32)
+                {
+                    proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_ipv6, tvb, offset, 16, FALSE);
+                    proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_ipv6_mask, tvb, offset, 16, FALSE);
+                    offset+=32;
+                    newoffset2+=32;
+                }
+                if (comptype==48)
+                {
+                    proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_prot_id, tvb, offset, 1, FALSE);
+                    offset+=1;
+                    newoffset2+=1;
+                }
+                if (comptype==64)
+                {
+                    proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_single_local, tvb, offset, 2, FALSE);
+                    offset+=2;
+                    newoffset2+=2;
+                }
+                if (comptype==65)
+                {
+                    proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_local_port_low, tvb, offset, 2, FALSE);
+                    offset+=2;
+                    newoffset2+=2;
+                    proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_local_port_high, tvb, offset, 2, FALSE);
+                    offset+=2;
+                    newoffset2+=2;
+                }
+                if (comptype==80)
+                {
+                    proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_single_remote, tvb, offset, 2, FALSE);
+                    offset+=2;
+                    newoffset2+=2;
+                }
+                if (comptype==81)
+                {
+                    proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_remote_port_low, tvb, offset, 2, FALSE);
+                    offset+=2;
+                    newoffset2+=2;
+                    proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_remote_port_high, tvb, offset, 2, FALSE);
+                    offset+=2;
+                    newoffset2+=2;
+                }
+                if (comptype==96)
+                {
+                    proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_security, tvb, offset, 4, FALSE);
+                    offset+=4;
+                    newoffset2+=4;
+                }
+                if (comptype==112)
+                {
+                    proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_service_type, tvb, offset, 1, FALSE);
+                    proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_service_type_mask, tvb, offset, 1, FALSE);
+                    offset+=2;
+                    newoffset2+=2;
+                }
+                if (comptype==128)
+                {
+                    proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_flow_label, tvb, offset, 3, FALSE);
+                    offset+=3;
+                    newoffset2+=3;
+                }
+            }
+        }
+
+        break;
+    case DELETE_TFT:
+        /* Delete Existing TFT */
+        break;
+
+    case DELETE_PACKET_FILTERS_TFT:
+        /* Delete Packet filters from existing TFT */
+        while (i<number)
+        {
+            i++;
+            ti = proto_tree_add_text(tree, tvb, offset, 1, "Packet Filter %d",i);
+            ie_tree = proto_item_add_subtree(ti, ett_gtpv2_ie);
+            proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_id, tvb, offset, 1, FALSE);
+            proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_direction, tvb, offset, 1, FALSE);
+            offset++;
+        }
+        break;
+    case NO_TFT_OPERATION:
+        /* No TFT operation */
+        break;
+    case RESERVED:
+        /* Reserved */
+        break;
+    default:
+        break;
+    }
 
 }
- /* 8.20 Traffic Aggregate Description (TAD) 
+ /* 8.20 Traffic Aggregate Description (TAD)
  */
 static void
 dissect_gtpv2_tad(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 instance _U_)
 {
-       int offset= 0,i=0,newoffset2;
-               guint8 number, opcode, ebit, comptype, length1;
-               proto_tree *ie_tree;
-               proto_item *ti;
-               number = tvb_get_guint8(tvb,offset)& 0x0f;
-               opcode = tvb_get_guint8(tvb,offset)& 0xe0;
-               ebit = tvb_get_guint8(tvb,offset)& 0x10;
-               proto_tree_add_item(tree, hf_gtpv2_b_tft_opcode, tvb, offset, 1, FALSE);
-               proto_tree_add_item(tree, hf_gtpv2_b_tft_number, tvb, offset, 1, FALSE);
-               proto_tree_add_item(tree, hf_gtpv2_b_tft_ebit, tvb, offset, 1, FALSE);
-               offset++;
-               switch(opcode)
-                       {
-                               case SPARE:
-                                       /* Spare */
-                                       break;
-                               case CREATE_NEW_TFT:
-                                       /* Create New TFT */
-                               case ADD_PACKET_FILTERS_TFT:
-                                       /* Add packet filters to existing TFT */
-                               case REPLACE_PACKET_FILTERS_TFT:
-                                       /*Replace Packet filters in existing TFT */
-                                       while (i<number)
-                                       {
-                                               i++;newoffset2=0;
-                                               length1 =tvb_get_guint8(tvb,offset+2);
-                                               ti = proto_tree_add_text(tree, tvb, offset, 3+length1, "Packet Filter %d",i);
-                                               ie_tree = proto_item_add_subtree(ti, ett_gtpv2_ie);
-                                               proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_id, tvb, offset, 1, FALSE);
-                                               proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_direction, tvb, offset, 1, FALSE);
-                                               offset++;
-                                               proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_eval, tvb, offset, 1, FALSE);
-                                               offset++;
-                                               proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_length, tvb, offset, 1, FALSE);
-                                               offset++;
-
-                                               while (newoffset2<length1)
-                                               {
-                                               proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_comp_type, tvb, offset, 1, FALSE);
-                                               comptype = tvb_get_guint8(tvb,offset);
-                                               offset++;
-                                               newoffset2++;
-                                                       if (comptype==16)
-                                                       {
-                                                               proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_ipv4, tvb, offset, 4, FALSE);
-                                                               proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_ipv4_mask, tvb, offset, 4, FALSE);
-                                                               offset+=8;
-                                                               newoffset2+=8;
-                                                       }
-                                                       if (comptype==32)
-                                                       {
-                                                               proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_ipv6, tvb, offset, 16, FALSE);
-                                                               proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_ipv6_mask, tvb, offset, 16, FALSE);
-                                                               offset+=32;
-                                                               newoffset2+=32;
-                                                       }
-                                                       if (comptype==48)
-                                                       {
-                                                               proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_prot_id, tvb, offset, 1, FALSE);
-                                                               offset+=1;
-                                                               newoffset2+=1;
-                                                       }
-                                                       if (comptype==64)
-                                                       {
-                                                               proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_single_local, tvb, offset, 2, FALSE);
-                                                               offset+=2;
-                                                               newoffset2+=2;
-                                                       }
-                                                       if (comptype==65)
-                                                       {
-                                                               proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_local_port_low, tvb, offset, 2, FALSE);
-                                                               offset+=2;
-                                                               newoffset2+=2;
-                                                               proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_local_port_high, tvb, offset, 2, FALSE);
-                                                               offset+=2;
-                                                               newoffset2+=2;
-                                                       }
-                                                       if (comptype==80)
-                                                       {
-                                                               proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_single_remote, tvb, offset, 2, FALSE);
-                                                               offset+=2;
-                                                               newoffset2+=2;
-                                                       }
-                                                       if (comptype==81)
-                                                       {
-                                                               proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_remote_port_low, tvb, offset, 2, FALSE);
-                                                               offset+=2;
-                                                               newoffset2+=2;
-                                                               proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_remote_port_high, tvb, offset, 2, FALSE);
-                                                               offset+=2;
-                                                               newoffset2+=2;
-                                                       }
-                                                       if (comptype==96)
-                                                       {
-                                                               proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_security, tvb, offset, 4, FALSE);
-                                                               offset+=4;
-                                                               newoffset2+=4;
-                                                       }
-                                                       if (comptype==112)
-                                                       {
-                                                               proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_service_type, tvb, offset, 1, FALSE);
-                                                               proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_service_type_mask, tvb, offset, 1, FALSE);
-                                                               offset+=2;
-                                                               newoffset2+=2;
-                                                       }
-                                                       if (comptype==128)
-                                                       {
-                                                               proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_flow_label, tvb, offset, 3, FALSE);
-                                                               offset+=3;
-                                                               newoffset2+=3;
-                                                       }
-                                         }
-                                       }
-
-                                       break;
-                               case DELETE_TFT:
-                                       /* Delete Existing TFT */
-                                       break;
-
-                               case DELETE_PACKET_FILTERS_TFT:
-                                       /* Delete Packet filters from existing TFT */
-                                       while (i<number)
-                                       {
-                                               i++;
-                                               ti = proto_tree_add_text(tree, tvb, offset, 1, "Packet Filter %d",i);
-                                               ie_tree = proto_item_add_subtree(ti, ett_gtpv2_ie);
-                                               proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_id, tvb, offset, 1, FALSE);
-                                               proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_direction, tvb, offset, 1, FALSE);
-                                               offset++;
-                                       }
-                                       break;
-                               case NO_TFT_OPERATION:
-                                       /* No TFT operation */
-                                       break;
-                               case RESERVED:
-                                       /* Reserved */
-                                       break;
-                               default:
-                                       break;
-                       }
+    int offset= 0,i=0,newoffset2;
+    guint8 number, opcode, ebit, comptype, length1;
+    proto_tree *ie_tree;
+    proto_item *ti;
+    number = tvb_get_guint8(tvb,offset)& 0x0f;
+    opcode = tvb_get_guint8(tvb,offset)& 0xe0;
+    ebit = tvb_get_guint8(tvb,offset)& 0x10;
+    proto_tree_add_item(tree, hf_gtpv2_b_tft_opcode, tvb, offset, 1, FALSE);
+    proto_tree_add_item(tree, hf_gtpv2_b_tft_number, tvb, offset, 1, FALSE);
+    proto_tree_add_item(tree, hf_gtpv2_b_tft_ebit, tvb, offset, 1, FALSE);
+    offset++;
+    switch(opcode)
+    {
+    case SPARE:
+        /* Spare */
+        break;
+    case CREATE_NEW_TFT:
+        /* Create New TFT */
+    case ADD_PACKET_FILTERS_TFT:
+        /* Add packet filters to existing TFT */
+    case REPLACE_PACKET_FILTERS_TFT:
+        /*Replace Packet filters in existing TFT */
+        while (i<number)
+        {
+            i++;newoffset2=0;
+            length1 =tvb_get_guint8(tvb,offset+2);
+            ti = proto_tree_add_text(tree, tvb, offset, 3+length1, "Packet Filter %d",i);
+            ie_tree = proto_item_add_subtree(ti, ett_gtpv2_ie);
+            proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_id, tvb, offset, 1, FALSE);
+            proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_direction, tvb, offset, 1, FALSE);
+            offset++;
+            proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_eval, tvb, offset, 1, FALSE);
+            offset++;
+            proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_length, tvb, offset, 1, FALSE);
+            offset++;
+
+            while (newoffset2<length1)
+            {
+                proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_comp_type, tvb, offset, 1, FALSE);
+                comptype = tvb_get_guint8(tvb,offset);
+                offset++;
+                newoffset2++;
+                if (comptype==16)
+                {
+                    proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_ipv4, tvb, offset, 4, FALSE);
+                    proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_ipv4_mask, tvb, offset, 4, FALSE);
+                    offset+=8;
+                    newoffset2+=8;
+                }
+                if (comptype==32)
+                {
+                    proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_ipv6, tvb, offset, 16, FALSE);
+                    proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_ipv6_mask, tvb, offset, 16, FALSE);
+                    offset+=32;
+                    newoffset2+=32;
+                }
+                if (comptype==48)
+                {
+                    proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_prot_id, tvb, offset, 1, FALSE);
+                    offset+=1;
+                    newoffset2+=1;
+                }
+                if (comptype==64)
+                {
+                    proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_single_local, tvb, offset, 2, FALSE);
+                    offset+=2;
+                    newoffset2+=2;
+                }
+                if (comptype==65)
+                {
+                    proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_local_port_low, tvb, offset, 2, FALSE);
+                    offset+=2;
+                    newoffset2+=2;
+                    proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_local_port_high, tvb, offset, 2, FALSE);
+                    offset+=2;
+                    newoffset2+=2;
+                }
+                if (comptype==80)
+                {
+                    proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_single_remote, tvb, offset, 2, FALSE);
+                    offset+=2;
+                    newoffset2+=2;
+                }
+                if (comptype==81)
+                {
+                    proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_remote_port_low, tvb, offset, 2, FALSE);
+                    offset+=2;
+                    newoffset2+=2;
+                    proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_remote_port_high, tvb, offset, 2, FALSE);
+                    offset+=2;
+                    newoffset2+=2;
+                }
+                if (comptype==96)
+                {
+                    proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_security, tvb, offset, 4, FALSE);
+                    offset+=4;
+                    newoffset2+=4;
+                }
+                if (comptype==112)
+                {
+                    proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_service_type, tvb, offset, 1, FALSE);
+                    proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_service_type_mask, tvb, offset, 1, FALSE);
+                    offset+=2;
+                    newoffset2+=2;
+                }
+                if (comptype==128)
+                {
+                    proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_flow_label, tvb, offset, 3, FALSE);
+                    offset+=3;
+                    newoffset2+=3;
+                }
+            }
+        }
+
+        break;
+    case DELETE_TFT:
+        /* Delete Existing TFT */
+        break;
+
+    case DELETE_PACKET_FILTERS_TFT:
+        /* Delete Packet filters from existing TFT */
+        while (i<number)
+        {
+            i++;
+            ti = proto_tree_add_text(tree, tvb, offset, 1, "Packet Filter %d",i);
+            ie_tree = proto_item_add_subtree(ti, ett_gtpv2_ie);
+            proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_id, tvb, offset, 1, FALSE);
+            proto_tree_add_item(ie_tree, hf_gtpv2_b_tft_pf_direction, tvb, offset, 1, FALSE);
+            offset++;
+        }
+        break;
+    case NO_TFT_OPERATION:
+        /* No TFT operation */
+        break;
+    case RESERVED:
+        /* Reserved */
+        break;
+    default:
+        break;
+    }
 }
 /*
  * 8.21 User Location Info (ULI)
  *
  * The flags ECGI, TAI, RAI, SAI and CGI in octed 5 indicate if the corresponding
- * fields are present in the IE or not. If one of these flags is set to "0", 
+ * fields are present in the IE or not. If one of these flags is set to "0",
  * the corresponding field is not present at all. The respective identities are defined in 3GPP
  * TS 23.003 [2].
- * Editor's Note: The definition of ECGI is missing in 3GPP TS 23.003 v8.1.0. 
+ * Editor's Note: The definition of ECGI is missing in 3GPP TS 23.003 v8.1.0.
  * It can be found in 3GPP TS 36.413 v8.3.0, but it is expected that it will be moved
  * to 23.003 in a future version.
  */
@@ -1136,141 +1136,141 @@ dissect_gtpv2_tad(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto
 static void
 dissect_gtpv2_uli(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 instance _U_)
 {
-       int offset = 0;
-       guint flags;
-       flags = tvb_get_guint8(tvb,offset)&0x1f;
-       /* ECGI B5 */
-       proto_tree_add_item(tree, hf_gtpv2_uli_ecgi_flg, tvb, offset, 1, FALSE);
-       /* TAI B4  */
-       proto_tree_add_item(tree, hf_gtpv2_uli_tai_flg, tvb, offset, 1, FALSE);
-       /* RAI B3  */
-       proto_tree_add_item(tree, hf_gtpv2_uli_rai_flg, tvb, offset, 1, FALSE);
-       /* SAI B2  */
-       proto_tree_add_item(tree, hf_gtpv2_uli_sai_flg, tvb, offset, 1, FALSE);
-       /* CGI B1  */
-       proto_tree_add_item(tree, hf_gtpv2_uli_cgi_flg, tvb, offset, 1, FALSE);
-       offset++;
-
-       /* 8.22.1 CGI field  */
-       if (flags&0x01)
-       {
-               dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, TRUE);
-               offset+=3;
-               proto_tree_add_item(tree, hf_gtpv2_uli_cgi_lac, tvb, offset, 2, FALSE);
-               proto_tree_add_item(tree, hf_gtpv2_uli_cgi_ci, tvb, offset, 2, FALSE);
-               offset+=4;
-               if(offset==length)
-                       return;
-       }
-
-       /* 8.22.2 SAI field  */
-       if (flags&0x02)
-       {
-               dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, TRUE);
-               offset+=3;
-               proto_tree_add_item(tree, hf_gtpv2_uli_sai_lac, tvb, offset, 2, FALSE);
-               proto_tree_add_item(tree, hf_gtpv2_uli_sai_sac, tvb, offset, 2, FALSE);
-               offset+=4;
-               if(offset==length)
-                       return;
-       }
-       /* 8.22.3 RAI field  */
-       if (flags&0x04)
-       {
-               dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, TRUE);
-               offset+=3;
-               proto_tree_add_item(tree, hf_gtpv2_uli_rai_lac, tvb, offset, 2, FALSE);
-               proto_tree_add_item(tree, hf_gtpv2_uli_rai_rac, tvb, offset, 2, FALSE);
-               offset+=4;
-               if(offset==length)
-                       return;
-       }
-       /* 8.22.4 TAI field  */
-       if (flags&0x08)
-       {
-               dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, TRUE);
-               offset+=3;
-               proto_tree_add_item(tree, hf_gtpv2_uli_tai_tac, tvb, offset, 2, FALSE);
-               offset+=2;
-               if(offset==length)
-                       return;
-       }
-       /* 8.22.5 ECGI field */
-       if (flags&0x10)
-       {
-               dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, TRUE);
-               offset+=3;
-               /* The bits 8 through 5, of octet e+3 (Fig 8.21.5-1 in TS 29.274 V8.2.0) are spare
-               and hence they would not make any difference to the hex string following it, thus we directly read 4 bytes from tvb */
-
-               proto_tree_add_item(tree, hf_gtpv2_uli_ecgi_eci, tvb, offset, 3, FALSE);
-               offset+=3;
-               if(offset==length)
-                       return;
-
-       }
+    int offset = 0;
+    guint flags;
+    flags = tvb_get_guint8(tvb,offset)&0x1f;
+    /* ECGI B5 */
+    proto_tree_add_item(tree, hf_gtpv2_uli_ecgi_flg, tvb, offset, 1, FALSE);
+    /* TAI B4  */
+    proto_tree_add_item(tree, hf_gtpv2_uli_tai_flg, tvb, offset, 1, FALSE);
+    /* RAI B3  */
+    proto_tree_add_item(tree, hf_gtpv2_uli_rai_flg, tvb, offset, 1, FALSE);
+    /* SAI B2  */
+    proto_tree_add_item(tree, hf_gtpv2_uli_sai_flg, tvb, offset, 1, FALSE);
+    /* CGI B1  */
+    proto_tree_add_item(tree, hf_gtpv2_uli_cgi_flg, tvb, offset, 1, FALSE);
+    offset++;
+
+    /* 8.22.1 CGI field  */
+    if (flags&0x01)
+    {
+        dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, TRUE);
+        offset+=3;
+        proto_tree_add_item(tree, hf_gtpv2_uli_cgi_lac, tvb, offset, 2, FALSE);
+        proto_tree_add_item(tree, hf_gtpv2_uli_cgi_ci, tvb, offset, 2, FALSE);
+        offset+=4;
+        if(offset==length)
+            return;
+    }
+
+    /* 8.22.2 SAI field  */
+    if (flags&0x02)
+    {
+        dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, TRUE);
+        offset+=3;
+        proto_tree_add_item(tree, hf_gtpv2_uli_sai_lac, tvb, offset, 2, FALSE);
+        proto_tree_add_item(tree, hf_gtpv2_uli_sai_sac, tvb, offset, 2, FALSE);
+        offset+=4;
+        if(offset==length)
+            return;
+    }
+    /* 8.22.3 RAI field  */
+    if (flags&0x04)
+    {
+        dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, TRUE);
+        offset+=3;
+        proto_tree_add_item(tree, hf_gtpv2_uli_rai_lac, tvb, offset, 2, FALSE);
+        proto_tree_add_item(tree, hf_gtpv2_uli_rai_rac, tvb, offset, 2, FALSE);
+        offset+=4;
+        if(offset==length)
+            return;
+    }
+    /* 8.22.4 TAI field  */
+    if (flags&0x08)
+    {
+        dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, TRUE);
+        offset+=3;
+        proto_tree_add_item(tree, hf_gtpv2_uli_tai_tac, tvb, offset, 2, FALSE);
+        offset+=2;
+        if(offset==length)
+            return;
+    }
+    /* 8.22.5 ECGI field */
+    if (flags&0x10)
+    {
+        dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, TRUE);
+        offset+=3;
+        /* The bits 8 through 5, of octet e+3 (Fig 8.21.5-1 in TS 29.274 V8.2.0) are spare
+        and hence they would not make any difference to the hex string following it, thus we directly read 4 bytes from tvb */
+
+        proto_tree_add_item(tree, hf_gtpv2_uli_ecgi_eci, tvb, offset, 3, FALSE);
+        offset+=3;
+        if(offset==length)
+            return;
+
+    }
 }
 
 /*
- * 8.22 Fully Qualified TEID (F-TEID) 
+ * 8.22 Fully Qualified TEID (F-TEID)
  */
 static const value_string gtpv2_f_teid_interface_type_vals[] = {
-       {0, "S1-U eNodeB GTP-U interface"},
-       {1, "S1-U SGW GTP-U interface"},
-       {2, "S12 RNC GTP-U interface"},
-       {3, "S12 SGW GTP-U interface"},
-       {4, "S5/S8 SGW GTP-U interface"},
-       {5, "S5/S8 PGW GTP-U interface"},
-       {6, "S5/S8 SGW GTP-C interface"},
-       {7, "S5/S8 PGW GTP-C interface"},
-       {8, "S5/S8 SGW PMIPv6 interface (the 32 bit GRE key is encoded in 32 bit TEID field "
-               "and since alternate CoA is not used the control plane and user plane addresses are the same for PMIPv6)"},
-       {9, "S5/S8 PGW PMIPv6 interface (the 32 bit GRE key is encoded in 32 bit TEID field "
-               "and the control plane and user plane addresses are the same for PMIPv6)"},
-       {10, "S11 MME GTP-C interface"},
-       {11, "S11/S4 SGW GTP-C interface"},
-       {12, "S10 MME GTP-C interface"},
-       {13, "S3 MME GTP-C interface"},
-       {14, "S3 SGSN GTP-C interface"},
-       {15, "S4 SGSN GTP-U interface"},
-       {16, "S4 SGW GTP-U interface"},
-       {17, "S4 SGSN GTP-C interface"},
-       {18, "S16 SGSN GTP-C interface"},
-       {19, "eNodeB GTP-U interface for DL data forwarding"},
-       {20, "eNodeB GTP-U interface for UL data forwarding"},
-       {21, "RNC GTP-U interface for data forwarding"},
-       {22, "SGSN GTP-U interface for data forwarding"},
-       {23, "SGW GTP-U interface for data forwarding"},
-       {0, NULL}
+    {0, "S1-U eNodeB GTP-U interface"},
+    {1, "S1-U SGW GTP-U interface"},
+    {2, "S12 RNC GTP-U interface"},
+    {3, "S12 SGW GTP-U interface"},
+    {4, "S5/S8 SGW GTP-U interface"},
+    {5, "S5/S8 PGW GTP-U interface"},
+    {6, "S5/S8 SGW GTP-C interface"},
+    {7, "S5/S8 PGW GTP-C interface"},
+    {8, "S5/S8 SGW PMIPv6 interface (the 32 bit GRE key is encoded in 32 bit TEID field "
+        "and since alternate CoA is not used the control plane and user plane addresses are the same for PMIPv6)"},
+    {9, "S5/S8 PGW PMIPv6 interface (the 32 bit GRE key is encoded in 32 bit TEID field "
+        "and the control plane and user plane addresses are the same for PMIPv6)"},
+    {10, "S11 MME GTP-C interface"},
+    {11, "S11/S4 SGW GTP-C interface"},
+    {12, "S10 MME GTP-C interface"},
+    {13, "S3 MME GTP-C interface"},
+    {14, "S3 SGSN GTP-C interface"},
+    {15, "S4 SGSN GTP-U interface"},
+    {16, "S4 SGW GTP-U interface"},
+    {17, "S4 SGSN GTP-C interface"},
+    {18, "S16 SGSN GTP-C interface"},
+    {19, "eNodeB GTP-U interface for DL data forwarding"},
+    {20, "eNodeB GTP-U interface for UL data forwarding"},
+    {21, "RNC GTP-U interface for data forwarding"},
+    {22, "SGSN GTP-U interface for data forwarding"},
+    {23, "SGW GTP-U interface for data forwarding"},
+    {0, NULL}
 };
 static void
 dissect_gtpv2_f_teid(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 instance _U_)
 {
-       int offset = 0;
-       guint8 v4, v6;
-       v4 = tvb_get_guint8(tvb,offset)& 0x80;
-       v6 = tvb_get_guint8(tvb,offset)& 0x40;
-       proto_tree_add_item(tree, hf_gtpv2_f_teid_v4, tvb, offset, 1, FALSE);
-       proto_tree_add_item(tree, hf_gtpv2_f_teid_v6, tvb, offset, 1, FALSE);
-       proto_tree_add_item(tree, hf_gtpv2_f_teid_interface_type, tvb, offset, 1, FALSE);
-
-       offset++;
-       proto_tree_add_item(tree, hf_gtpv2_f_teid_gre_key, tvb, offset, 4, FALSE);
-
-       offset= offset+4;
-       if (v4)
-       {
-               proto_tree_add_item(tree, hf_gtpv2_f_teid_ipv4, tvb, offset, 4, FALSE);
-               offset= offset+4;
-       }
-       if (v6)
-       {
-               proto_tree_add_item(tree, hf_gtpv2_f_teid_ipv6, tvb, offset, 16, FALSE);
-               offset= offset+16;
-       }
+    int offset = 0;
+    guint8 v4, v6;
+    v4 = tvb_get_guint8(tvb,offset)& 0x80;
+    v6 = tvb_get_guint8(tvb,offset)& 0x40;
+    proto_tree_add_item(tree, hf_gtpv2_f_teid_v4, tvb, offset, 1, FALSE);
+    proto_tree_add_item(tree, hf_gtpv2_f_teid_v6, tvb, offset, 1, FALSE);
+    proto_tree_add_item(tree, hf_gtpv2_f_teid_interface_type, tvb, offset, 1, FALSE);
+
+    offset++;
+    proto_tree_add_item(tree, hf_gtpv2_f_teid_gre_key, tvb, offset, 4, FALSE);
+
+    offset= offset+4;
+    if (v4)
+    {
+        proto_tree_add_item(tree, hf_gtpv2_f_teid_ipv4, tvb, offset, 4, FALSE);
+        offset= offset+4;
+    }
+    if (v6)
+    {
+        proto_tree_add_item(tree, hf_gtpv2_f_teid_ipv6, tvb, offset, 16, FALSE);
+        offset= offset+16;
+    }
 }
 /*
- * 8.23 TMSI 
+ * 8.23 TMSI
  */
 /*
  * 8.24 Global CN-Id
@@ -1279,12 +1279,12 @@ dissect_gtpv2_f_teid(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, pr
 static void
 dissect_gtpv2_g_cn_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 instance _U_)
 {
-       proto_tree_add_text(tree, tvb, 0, length, "IE data not dissected yet"); 
+    proto_tree_add_text(tree, tvb, 0, length, "IE data not dissected yet");
 }
 /*
  * 8.25 S103 PDN Data Forwarding Info (S103PDF)
  * 8.26 S1-U Data Forwarding (S1UDF) */
+
 /*8.27 Delay Value
  */
 
@@ -1292,9 +1292,9 @@ static void
 dissect_gtpv2_delay_value(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 instance _U_)
 {
 
-       int offset = 0;
+    int offset = 0;
 
-       proto_tree_add_item(tree, hf_gtpv2_delay_value, tvb, offset, 1, FALSE);
+    proto_tree_add_item(tree, hf_gtpv2_delay_value, tvb, offset, 1, FALSE);
 
 
 }
@@ -1303,12 +1303,12 @@ dissect_gtpv2_delay_value(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre
 static void
 dissect_gtpv2_bearer_ctx(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, proto_item *item _U_, guint16 length _U_, guint8 instance _U_)
 {
-       int offset= 0;
-       proto_tree *grouped_tree;
-       
-       proto_item_append_text(item, "[Grouped IE]");
-       grouped_tree = proto_item_add_subtree(item, ett_gtpv2_bearer_ctx);
-       dissect_gtpv2_ie_common(tvb, pinfo, grouped_tree, offset);
+    int offset= 0;
+    proto_tree *grouped_tree;
+
+    proto_item_append_text(item, "[Grouped IE]");
+    grouped_tree = proto_item_add_subtree(item, ett_gtpv2_bearer_ctx);
+    dissect_gtpv2_ie_common(tvb, pinfo, grouped_tree, offset);
 
 }
 /* 8.29 Charging ID */
@@ -1316,18 +1316,18 @@ static void
 dissect_gtpv2_charging_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 instance _U_)
 {
 
-       int offset = 0;
+    int offset = 0;
 
-       proto_tree_add_item(tree, hf_gtpv2_charging_id, tvb, offset, length, FALSE);
+    proto_tree_add_item(tree, hf_gtpv2_charging_id, tvb, offset, length, FALSE);
 
 
 }
 
 
- /* 8.30 Charging Characteristics  
+ /* 8.30 Charging Characteristics
   * The charging characteristics information element is defined in 3GPP TS 32.251 [8]
-  * and is a way of informing both the SGW and PGW of the rules for producing charging 
-  * information based on operator configured triggers. For the encoding of this 
+  * and is a way of informing both the SGW and PGW of the rules for producing charging
+  * information based on operator configured triggers. For the encoding of this
   * information element see 3GPP TS 32.298 [9].
   */
 
@@ -1335,14 +1335,14 @@ static void
 dissect_gtpv2_charging_characteristic(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 instance _U_)
 {
 
-       int offset = 0;
+    int offset = 0;
 
-       proto_tree_add_item(tree, hf_gtpv2_charging_characteristic, tvb, offset, 2, FALSE);
-       if(length>2){
-               offset+=2;
-               /* These octet(s) is/are present only if explicitly specified */
-               proto_tree_add_text(tree, tvb, offset, length-2, "Remaining octets");
-       }
+    proto_tree_add_item(tree, hf_gtpv2_charging_characteristic, tvb, offset, 2, FALSE);
+    if(length>2){
+        offset+=2;
+        /* These octet(s) is/are present only if explicitly specified */
+        proto_tree_add_text(tree, tvb, offset, length-2, "Remaining octets");
+    }
 
 }
 /* 8.30 Bearer Flag  */
@@ -1350,9 +1350,9 @@ static void
 dissect_gtpv2_bearer_flag(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 instance _U_)
 {
 
-       int offset = 0;
+    int offset = 0;
 
-       proto_tree_add_item(tree, hf_gtpv2_bearer_flag, tvb, offset, length, FALSE);
+    proto_tree_add_item(tree, hf_gtpv2_bearer_flag, tvb, offset, length, FALSE);
 
 
 }
@@ -1361,37 +1361,37 @@ static void
 dissect_gtpv2_pdn_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 instance _U_)
 {
 
-       int offset = 0;
+    int offset = 0;
 
-       if (length != 1) {
-               proto_item *expert_item;
-               expert_item = proto_tree_add_text(tree, tvb, 0, length, "Wrong length indicated. Expected 1, got %u", length);
-               expert_add_info_format(pinfo, expert_item, PI_MALFORMED, PI_ERROR, "Wrong length indicated. Expected 1, got %u", length);
-               PROTO_ITEM_SET_GENERATED(expert_item);
-               return;
-       }
+    if (length != 1) {
+        proto_item *expert_item;
+        expert_item = proto_tree_add_text(tree, tvb, 0, length, "Wrong length indicated. Expected 1, got %u", length);
+        expert_add_info_format(pinfo, expert_item, PI_MALFORMED, PI_ERROR, "Wrong length indicated. Expected 1, got %u", length);
+        PROTO_ITEM_SET_GENERATED(expert_item);
+        return;
+    }
 
-       proto_tree_add_item(tree, hf_gtpv2_pdn_type, tvb, offset, length, FALSE);
+    proto_tree_add_item(tree, hf_gtpv2_pdn_type, tvb, offset, length, FALSE);
 
 
 }
 
 /* 8.31 Trace Information
- * 8.33 Paging Cause 
+ * 8.33 Paging Cause
   */
 
 /* 8.35 Procedure Transaction ID (PTI) */
 static void
 dissect_gtpv2_pti(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 instance _U_)
 {
-       proto_tree_add_item(tree, hf_gtpv2_pti, tvb, 0, 1, FALSE);
+    proto_tree_add_item(tree, hf_gtpv2_pti, tvb, 0, 1, FALSE);
 }
 /*
- * 8.36 DRX Parameter 
+ * 8.36 DRX Parameter
  * 8.37 UE Network Capability
- * 8.38 MM Context 
+ * 8.38 MM Context
  * 8.39 PDN Connection (grouped IE)
- * 8.40 PDU Numbers 
+ * 8.40 PDU Numbers
  * 8.41 Packet TMSI (P-TMSI)
  * 8.42 P-TMSI Signature
  * 8.43 Hop Counter
@@ -1402,7 +1402,7 @@ dissect_gtpv2_pti(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto
 static const value_string gtpv2_ue_time_zone_dst_vals[] = {
     {0, "No Adjustments for Daylight Saving Time"},
     {1, "+1 Hour Adjustments for Daylight Saving Time"},
-       {2, "+2 Hour Adjustments for Daylight Saving Time"},
+    {2, "+2 Hour Adjustments for Daylight Saving Time"},
     {3, "Spare"},
     {0, NULL}
 };
@@ -1410,11 +1410,11 @@ static void
 dissect_gtpv2_ue_time_zone(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 instance _U_)
 {
 
-       int offset = 0;
-       proto_tree_add_item(tree, hf_gtpv2_ue_time_zone, tvb, offset, 1, FALSE);
+    int offset = 0;
+    proto_tree_add_item(tree, hf_gtpv2_ue_time_zone, tvb, offset, 1, FALSE);
 
-       offset= offset+ 1;
-       proto_tree_add_item(tree, hf_gtpv2_ue_time_zone_dst, tvb, offset, 1, FALSE);
+    offset= offset+ 1;
+    proto_tree_add_item(tree, hf_gtpv2_ue_time_zone_dst, tvb, offset, 1, FALSE);
 
 
 }
@@ -1436,14 +1436,14 @@ dissect_gtpv2_ue_time_zone(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr
 static void
 dissect_gtpv2_apn_rest(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 instance _U_)
 {
-       proto_tree_add_item(tree, hf_gtpv2_apn_rest, tvb, 0, 1, FALSE);
+    proto_tree_add_item(tree, hf_gtpv2_apn_rest, tvb, 0, 1, FALSE);
 }
 
 /* 8.58 Selection Mode */
 static const value_string gtpv2_selec_mode_vals[] = {
     {0, "MS or network provided APN, subscribed verified"},
     {1, "MS provided APN, subscription not verified"},
-       {2, "Network provided APN, subscription not verified"},
+    {2, "Network provided APN, subscription not verified"},
     {3, "Network provided APN, subscription not verified (Basically for Future use"},
     {0, NULL}
 };
@@ -1451,9 +1451,9 @@ static const value_string gtpv2_selec_mode_vals[] = {
 static void
 dissect_gtpv2_selec_mode(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 instance _U_)
 {
-       int offset=0;
+    int offset=0;
 
-       proto_tree_add_item(tree, hf_gtpv2_selec_mode, tvb, offset, 1, FALSE);
+    proto_tree_add_item(tree, hf_gtpv2_selec_mode, tvb, offset, 1, FALSE);
 }
 
 
@@ -1463,30 +1463,30 @@ dissect_gtpv2_selec_mode(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree
  static const value_string gtpv2_bearer_control_mode_vals[] = {
     {0, "Selected Bearer Control Mode-'MS_only'"},
     {1, "Selected Bearer Control Mode-'Network_only'"},
-       {2, "Selected Bearer Control Mode-'MS/NW'"},
+    {2, "Selected Bearer Control Mode-'MS/NW'"},
     {0, NULL}
 };
 
 static void
 dissect_gtpv2_bearer_control_mode(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 instance _U_)
 {
-       proto_tree_add_item(tree, hf_gtpv2_bearer_control_mode, tvb, 0, 1, FALSE);
+    proto_tree_add_item(tree, hf_gtpv2_bearer_control_mode, tvb, 0, 1, FALSE);
 }
 /*
  * 8.61 Change Reporting Action
  */
 static const value_string gtpv2_cng_rep_act_vals[] = {
-       {0, "Stop Reporting"},
-       {1, "Start Reporting CGI/SAI"},
-       {2, "Start Reporting RAI"},
-       {0, NULL}
+    {0, "Stop Reporting"},
+    {1, "Start Reporting CGI/SAI"},
+    {2, "Start Reporting RAI"},
+    {0, NULL}
 };
 
 static void
 dissect_cng_rep_act(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 instance _U_)
 {
 
-       proto_tree_add_item(tree, hf_gtpv2_cng_rep_act, tvb, 0, 1, FALSE); 
+    proto_tree_add_item(tree, hf_gtpv2_cng_rep_act, tvb, 0, 1, FALSE);
 }
 /*
  * 8.62 Fully qualified PDN Connection Set Identifier (FQ-CSID)
@@ -1496,16 +1496,16 @@ dissect_cng_rep_act(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, pro
 
 /*8.65 Node Type */
 static const value_string gtpv2_node_type_vals[] = {
-       {0, "MME"},
-       {1, "SGSN"},
-       {0, NULL}
+    {0, "MME"},
+    {1, "SGSN"},
+    {0, NULL}
 };
 
 static void
 dissect_node_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_, guint8 instance _U_)
 {
 
-       proto_tree_add_item(tree, hf_gtpv2_node_type, tvb, 0, 1, FALSE);
+    proto_tree_add_item(tree, hf_gtpv2_node_type, tvb, 0, 1, FALSE);
 }
 
  /* 8.66 Fully Qualified Domain Name (FQDN)
@@ -1518,45 +1518,45 @@ typedef struct _gtpv2_ie {
 
 static const gtpv2_ie_t gtpv2_ies[] = {
     {GTPV2_IE_IMSI, dissect_gtpv2_imsi},
-       {GTPV2_IE_CAUSE, dissect_gtpv2_cause},                          /* 2, Cause (without embedded offending IE) 8.4 */
-       {GTPV2_REC_REST_CNT, dissect_gtpv2_recovery},           /* 3, Recovery (Restart Counter) 8.5 */
-                                                                                                               /* 4-50 Reserved for S101 interface Extendable / See 3GPP TS 29.276 [14] */
-                                                                                                               /* 51-70 Reserved for Sv interface Extendable / See 3GPP TS 29.280 [15] */
-       {GTPV2_APN, dissect_gtpv2_apn},                                         /* 71, Access Point Name (APN) 8.6 */
-       {GTPV2_AMBR, dissect_gtpv2_ambr},                                       /* 72, Aggregate Maximum Bit Rate (AMBR) */
-       {GTPV2_EBI, dissect_gtpv2_ebi},                                         /* 73, EPS Bearer ID (EBI)  8.8 */
-       {GTPV2_IP_ADDRESS, dissect_gtpv2_ip_address},           /* 74, IP Address */
-       {GTPV2_MEI, dissect_gtpv2_mei},                                 /* 74, Mobile Equipment Identity */
-       {GTPV2_IE_MSISDN, dissect_gtpv2_msisdn},                        /* 76, MSISDN 8.11 */
-       {GTPV2_INDICATION, dissect_gtpv2_ind},                          /* 77 Indication 8.12 */
-       {GTPV2_PCO, dissect_gtpv2_pco},                                         /* 78 Protocol Configuration Options (PCO) 8.13 */
-       {GTPV2_PAA, dissect_gtpv2_paa},                                         /* 79 PDN Address Allocation (PAA) 8.14 */
-       {GTPV2_BEARER_QOS,dissect_gtpv2_bearer_qos},            /* 80 Bearer Level Quality of Service (Bearer QoS) 8.15 */
-       {GTPV2_FLOW_QOS, dissect_gtpv2_flow_qos},                       /* 81 Flow Quality of Service (Flow QoS) 8.16 */
-       {GTPV2_IE_RAT_TYPE, dissect_gtpv2_rat_type},            /* 82, RAT Type  8.17 */
-       {GTPV2_IE_SERV_NET, dissect_gtpv2_serv_net},            /* 83, Serving Network 8.18 */
-       {GTPV2_BEARER_TFT, dissect_gtpv2_bearer_tft},           /* 84, Bearer TFT 8.19 */
-       {GTPV2_TAD, dissect_gtpv2_tad},                                         /* 85, Traffic Aggregate Description 8.20 */
-       {GTPV2_ULI, dissect_gtpv2_uli},                                         /* 86, User Location Info (ULI) 8.22 */
-       {GTPV2_F_TEID, dissect_gtpv2_f_teid},                           /* 87, Fully Qualified Tunnel Endpoint Identifier (F-TEID) 8.23 */
-       {GTPV2_G_CN_ID, dissect_gtpv2_g_cn_id},                         /* 89, Global CN-Id 8.25 */
-       {GTPV2_DELAY_VALUE, dissect_gtpv2_delay_value},         /* 92, Delay Value 8.29 */
-       {GTPV2_BEARER_CTX,dissect_gtpv2_bearer_ctx},            /* 93, Bearer Context  8.31 */
-       {GTPV2_CHARGING_ID, dissect_gtpv2_charging_id},     /* 94, Charging Id */
-       {GTPV2_CHARGING_CHARACTERISTIC,                                         /* 95 Charging Characteristic */
-        dissect_gtpv2_charging_characteristic},
-       {GTPV2_BEARER_FLAG, dissect_gtpv2_bearer_flag},     /* 97, Bearer Flag */
-       {GTPV2_PDN_TYPE, dissect_gtpv2_pdn_type},                       /* 99, PDN Type */
-       {GTPV2_PTI, dissect_gtpv2_pti},                                         /* 100 Procedure Transaction Id */
-       {GTPV2_UE_TIME_ZONE, dissect_gtpv2_ue_time_zone},   /* 114, UE Time Zone */
-       {GTPV2_APN_RESTRICTION,                                                         /* 127, APN Restriction */
-       dissect_gtpv2_apn_rest},
-       {GTPV2_SELEC_MODE,dissect_gtpv2_selec_mode},            /* 128 Selection Mode */
-       {GTPV2_BEARER_CONTROL_MODE,
-       dissect_gtpv2_bearer_control_mode},                                     /* 130 Bearer Control Mode*/
-       {GTPV2_CNG_REP_ACT ,dissect_cng_rep_act},                       /* 131 Change Reporting Action 8.61 */
-       {GTPV2_NODE_TYPE ,dissect_node_type},                           /* 135 Node Type 8.65 */
-                                                                                                               /* 137-254 Spare. For future use. FFS */
+    {GTPV2_IE_CAUSE, dissect_gtpv2_cause},              /* 2, Cause (without embedded offending IE) 8.4 */
+    {GTPV2_REC_REST_CNT, dissect_gtpv2_recovery},       /* 3, Recovery (Restart Counter) 8.5 */
+                                                        /* 4-50 Reserved for S101 interface Extendable / See 3GPP TS 29.276 [14] */
+                                                        /* 51-70 Reserved for Sv interface Extendable / See 3GPP TS 29.280 [15] */
+    {GTPV2_APN, dissect_gtpv2_apn},                     /* 71, Access Point Name (APN) 8.6 */
+    {GTPV2_AMBR, dissect_gtpv2_ambr},                   /* 72, Aggregate Maximum Bit Rate (AMBR) */
+    {GTPV2_EBI, dissect_gtpv2_ebi},                     /* 73, EPS Bearer ID (EBI)  8.8 */
+    {GTPV2_IP_ADDRESS, dissect_gtpv2_ip_address},       /* 74, IP Address */
+    {GTPV2_MEI, dissect_gtpv2_mei},                     /* 74, Mobile Equipment Identity */
+    {GTPV2_IE_MSISDN, dissect_gtpv2_msisdn},            /* 76, MSISDN 8.11 */
+    {GTPV2_INDICATION, dissect_gtpv2_ind},              /* 77 Indication 8.12 */
+    {GTPV2_PCO, dissect_gtpv2_pco},                     /* 78 Protocol Configuration Options (PCO) 8.13 */
+    {GTPV2_PAA, dissect_gtpv2_paa},                     /* 79 PDN Address Allocation (PAA) 8.14 */
+    {GTPV2_BEARER_QOS,dissect_gtpv2_bearer_qos},        /* 80 Bearer Level Quality of Service (Bearer QoS) 8.15 */
+    {GTPV2_FLOW_QOS, dissect_gtpv2_flow_qos},           /* 81 Flow Quality of Service (Flow QoS) 8.16 */
+    {GTPV2_IE_RAT_TYPE, dissect_gtpv2_rat_type},        /* 82, RAT Type  8.17 */
+    {GTPV2_IE_SERV_NET, dissect_gtpv2_serv_net},        /* 83, Serving Network 8.18 */
+    {GTPV2_BEARER_TFT, dissect_gtpv2_bearer_tft},       /* 84, Bearer TFT 8.19 */
+    {GTPV2_TAD, dissect_gtpv2_tad},                     /* 85, Traffic Aggregate Description 8.20 */
+    {GTPV2_ULI, dissect_gtpv2_uli},                     /* 86, User Location Info (ULI) 8.22 */
+    {GTPV2_F_TEID, dissect_gtpv2_f_teid},               /* 87, Fully Qualified Tunnel Endpoint Identifier (F-TEID) 8.23 */
+    {GTPV2_G_CN_ID, dissect_gtpv2_g_cn_id},             /* 89, Global CN-Id 8.25 */
+    {GTPV2_DELAY_VALUE, dissect_gtpv2_delay_value},     /* 92, Delay Value 8.29 */
+    {GTPV2_BEARER_CTX,dissect_gtpv2_bearer_ctx},        /* 93, Bearer Context  8.31 */
+    {GTPV2_CHARGING_ID, dissect_gtpv2_charging_id},     /* 94, Charging Id */
+    {GTPV2_CHARGING_CHARACTERISTIC,                     /* 95 Charging Characteristic */
+     dissect_gtpv2_charging_characteristic},
+    {GTPV2_BEARER_FLAG, dissect_gtpv2_bearer_flag},     /* 97, Bearer Flag */
+    {GTPV2_PDN_TYPE, dissect_gtpv2_pdn_type},           /* 99, PDN Type */
+    {GTPV2_PTI, dissect_gtpv2_pti},                     /* 100 Procedure Transaction Id */
+    {GTPV2_UE_TIME_ZONE, dissect_gtpv2_ue_time_zone},   /* 114, UE Time Zone */
+    {GTPV2_APN_RESTRICTION,                             /* 127, APN Restriction */
+    dissect_gtpv2_apn_rest},
+    {GTPV2_SELEC_MODE,dissect_gtpv2_selec_mode},        /* 128 Selection Mode */
+    {GTPV2_BEARER_CONTROL_MODE,
+    dissect_gtpv2_bearer_control_mode},                 /* 130 Bearer Control Mode*/
+    {GTPV2_CNG_REP_ACT ,dissect_cng_rep_act},           /* 131 Change Reporting Action 8.61 */
+    {GTPV2_NODE_TYPE ,dissect_node_type},               /* 135 Node Type 8.65 */
+                                                        /* 137-254 Spare. For future use. FFS */
 
     {0, dissect_gtpv2_unknown}
 };
@@ -1566,57 +1566,57 @@ static const gtpv2_ie_t gtpv2_ies[] = {
 static void
 dissect_gtpv2_ie_common(tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree, gint offset)
 {
-       proto_tree *ie_tree;
-       proto_item *ti;
-       tvbuff_t *ie_tvb;
-       guint8 type, instance;
-       guint16 length;
-       int i;
-       /*
-        * Octets       8       7       6       5               4       3       2       1
-        *      1               Type
-        *      2-3             Length = n
-        *      4               CR                      Spare   Instance
-        * 5-(n+4)      IE specific data
-        */
-       while(offset < (gint)tvb_reported_length(tvb)){
-               /* Get the type and length */
-               type = tvb_get_guint8(tvb,offset);
-               length = tvb_get_ntohs(tvb, offset+1);
-               ti = proto_tree_add_text(tree, tvb, offset, 4 + length, "%s : ", val_to_str(type, gtpv2_element_type_vals, "Unknown")); 
-               ie_tree = proto_item_add_subtree(ti, ett_gtpv2_ie);
-               /* Octet 1 */
-               proto_tree_add_item(ie_tree, hf_gtpv2_ie, tvb, offset, 1, FALSE);
-               offset++;
-               
-               /*Octet 2 - 3 */
-               proto_tree_add_item(ie_tree, hf_gtpv2_ie_len, tvb, offset, 2, FALSE);
-               offset+=2;
-               /* CR Spare Instance Octet 4*/
-               proto_tree_add_item(ie_tree, hf_gtpv2_cr, tvb, offset, 1, FALSE);
-
-               instance = tvb_get_guint8(tvb,offset)& 0x0f;
-               proto_tree_add_item(ie_tree, hf_gtpv2_instance, tvb, offset, 1, FALSE);
-               offset++;
-               
-               /* TODO: call IE dissector here */
-               if(type==GTPV2_IE_RESERVED){
-                       /* Treat IE type zero specal as type zero is used to end the loop in the else branch */
-                       proto_tree_add_text(ie_tree, tvb, offset, length, "IE type Zero is Reserved and should not be used");
-               }else{
-                       i = -1;
-                       /* Loop over the IE dissector list to se if we find an entry, the last entry will have ie_type=0 breaking the loop */
-                       while (gtpv2_ies[++i].ie_type){
-                               if (gtpv2_ies[i].ie_type == type)
-                                       break;
-                       }
-                       /* Just give the IE dissector the IE */
-                       ie_tvb = tvb_new_subset(tvb, offset, length, length);
-                       (*gtpv2_ies[i].decode) (ie_tvb, pinfo , ie_tree, ti, length, instance);
-               }
-
-               offset = offset + length;
-       }
+    proto_tree *ie_tree;
+    proto_item *ti;
+    tvbuff_t *ie_tvb;
+    guint8 type, instance;
+    guint16 length;
+    int i;
+    /*
+     * Octets   8   7   6   5       4   3   2   1
+     *  1       Type
+     *  2-3     Length = n
+     *  4       CR          Spare   Instance
+     * 5-(n+4)  IE specific data
+     */
+    while(offset < (gint)tvb_reported_length(tvb)){
+        /* Get the type and length */
+        type = tvb_get_guint8(tvb,offset);
+        length = tvb_get_ntohs(tvb, offset+1);
+        ti = proto_tree_add_text(tree, tvb, offset, 4 + length, "%s : ", val_to_str(type, gtpv2_element_type_vals, "Unknown"));
+        ie_tree = proto_item_add_subtree(ti, ett_gtpv2_ie);
+        /* Octet 1 */
+        proto_tree_add_item(ie_tree, hf_gtpv2_ie, tvb, offset, 1, FALSE);
+        offset++;
+
+        /*Octet 2 - 3 */
+        proto_tree_add_item(ie_tree, hf_gtpv2_ie_len, tvb, offset, 2, FALSE);
+        offset+=2;
+        /* CR Spare Instance Octet 4*/
+        proto_tree_add_item(ie_tree, hf_gtpv2_cr, tvb, offset, 1, FALSE);
+
+        instance = tvb_get_guint8(tvb,offset)& 0x0f;
+        proto_tree_add_item(ie_tree, hf_gtpv2_instance, tvb, offset, 1, FALSE);
+        offset++;
+
+        /* TODO: call IE dissector here */
+        if(type==GTPV2_IE_RESERVED){
+            /* Treat IE type zero specal as type zero is used to end the loop in the else branch */
+            proto_tree_add_text(ie_tree, tvb, offset, length, "IE type Zero is Reserved and should not be used");
+        }else{
+            i = -1;
+            /* Loop over the IE dissector list to se if we find an entry, the last entry will have ie_type=0 breaking the loop */
+            while (gtpv2_ies[++i].ie_type){
+                if (gtpv2_ies[i].ie_type == type)
+                    break;
+            }
+            /* Just give the IE dissector the IE */
+            ie_tvb = tvb_new_subset(tvb, offset, length, length);
+            (*gtpv2_ies[i].decode) (ie_tvb, pinfo , ie_tree, ti, length, instance);
+        }
+
+        offset = offset + length;
+    }
 }
 
 static void
@@ -1624,628 +1624,621 @@ dissect_gtpv2(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
 {
     proto_tree *gtpv2_tree, *flags_tree;
     proto_item *ti, *tf;
-       guint8 message_type, t_flag;
-       int offset = 0;
+    guint8 message_type, t_flag;
+    int offset = 0;
 
 
-       /* Currently we get called from the GTP dissector no need to check the version */
+    /* Currently we get called from the GTP dissector no need to check the version */
     col_set_str(pinfo->cinfo, COL_PROTOCOL, "GTPv2");
     col_clear(pinfo->cinfo, COL_INFO);
 
-       /* message type is in octet 2 */
-       message_type = tvb_get_guint8(tvb,1);
+    /* message type is in octet 2 */
+    message_type = tvb_get_guint8(tvb,1);
     if (check_col(pinfo->cinfo, COL_INFO))
-               col_add_str(pinfo->cinfo, COL_INFO, val_to_str(message_type, gtpv2_message_type_vals, "Unknown"));
+        col_add_str(pinfo->cinfo, COL_INFO, val_to_str(message_type, gtpv2_message_type_vals, "Unknown"));
 
 
-       proto_tree_add_item(tree, proto_gtpv2, tvb, offset, -1, FALSE);
+    proto_tree_add_item(tree, proto_gtpv2, tvb, offset, -1, FALSE);
 
     if (tree) {
-               ti = proto_tree_add_text(tree, tvb, offset, -1, "%s", val_to_str(message_type, gtpv2_message_type_vals, "Unknown"));
-               gtpv2_tree = proto_item_add_subtree(ti, ett_gtpv2);
-       
-               /* Control Plane GTP uses a variable length header. Control Plane GTP header 
-                * length shall be a multiple of 4 octets.
-                * Figure 5.1-1 illustrates the format of the GTPv2-C Header.
-                * Bits           8  7  6       5               4       3               2               1
-                * Octets       1 Version       Spare   T       Spare   Spare   Spare
-                *                      2 Message Type
-                *                      3 Message Length (1st Octet)
-                *                      4 Message Length (2nd Octet)
-                *      m-k(m+3)        If T flag is set to 1, then TEID shall be placed into octets 5-8.
-                *                              Otherwise, TEID field is not present at all.
-                *      n-(n+1)   Sequence Number
-                * (n+2)-(n+3) Spare
-                * Figure 5.1-1: General format of GTPv2 Header for Control Plane
-                */
-               tf = proto_tree_add_item(gtpv2_tree, hf_gtpv2_flags, tvb, offset, 1, FALSE);
-               flags_tree = proto_item_add_subtree(tf, ett_gtpv2_flags);
-
-               /* Octet 1 */
-               t_flag = (tvb_get_guint8(tvb,offset) & 0x08)>>3;
-               proto_tree_add_item(flags_tree, hf_gtpv2_version, tvb, offset, 1, FALSE);
-               proto_tree_add_item(flags_tree, hf_gtpv2_t, tvb, offset, 1, FALSE);
-               offset++;
-
-               /* Octet 2 */
-               proto_tree_add_item(gtpv2_tree, hf_gtpv2_message_type, tvb, offset, 1, FALSE);
-               offset++;
-               /* Octet 3 - 4 */
-               proto_tree_add_item(gtpv2_tree, hf_gtpv2_msg_length, tvb, offset, 2, FALSE);
-               offset+=2;
-
-               if(t_flag){
-                       /* Tunnel Endpoint Identifier 4 octets */
-                       proto_tree_add_item(gtpv2_tree, hf_gtpv2_teid, tvb, offset, 4, FALSE);
-                       offset+=4;
-               }
-               /* Sequence Number 2 octets */
-               proto_tree_add_item(gtpv2_tree, hf_gtpv2_seq, tvb, offset, 2, FALSE);
-               offset+=2;
-
-               /* Spare 2 octets */
-               proto_tree_add_item(gtpv2_tree, hf_gtpv2_spare, tvb, offset, 2, FALSE);
-               offset+=2;
-
-               dissect_gtpv2_ie_common(tvb, pinfo, gtpv2_tree, offset);
-       }
+        ti = proto_tree_add_text(tree, tvb, offset, -1, "%s", val_to_str(message_type, gtpv2_message_type_vals, "Unknown"));
+        gtpv2_tree = proto_item_add_subtree(ti, ett_gtpv2);
+
+        /* Control Plane GTP uses a variable length header. Control Plane GTP header
+         * length shall be a multiple of 4 octets.
+         * Figure 5.1-1 illustrates the format of the GTPv2-C Header.
+         * Bits       8  7  6   5       4   3       2       1
+         * Octets   1 Version   Spare   T   Spare   Spare   Spare
+         *          2 Message Type
+         *          3 Message Length (1st Octet)
+         *          4 Message Length (2nd Octet)
+         *  m-k(m+3)    If T flag is set to 1, then TEID shall be placed into octets 5-8.
+         *              Otherwise, TEID field is not present at all.
+         *  n-(n+1)   Sequence Number
+         * (n+2)-(n+3) Spare
+         * Figure 5.1-1: General format of GTPv2 Header for Control Plane
+         */
+        tf = proto_tree_add_item(gtpv2_tree, hf_gtpv2_flags, tvb, offset, 1, FALSE);
+        flags_tree = proto_item_add_subtree(tf, ett_gtpv2_flags);
+
+        /* Octet 1 */
+        t_flag = (tvb_get_guint8(tvb,offset) & 0x08)>>3;
+        proto_tree_add_item(flags_tree, hf_gtpv2_version, tvb, offset, 1, FALSE);
+        proto_tree_add_item(flags_tree, hf_gtpv2_t, tvb, offset, 1, FALSE);
+        offset++;
+
+        /* Octet 2 */
+        proto_tree_add_item(gtpv2_tree, hf_gtpv2_message_type, tvb, offset, 1, FALSE);
+        offset++;
+        /* Octet 3 - 4 */
+        proto_tree_add_item(gtpv2_tree, hf_gtpv2_msg_length, tvb, offset, 2, FALSE);
+        offset+=2;
+
+        if(t_flag){
+            /* Tunnel Endpoint Identifier 4 octets */
+            proto_tree_add_item(gtpv2_tree, hf_gtpv2_teid, tvb, offset, 4, FALSE);
+            offset+=4;
+        }
+        /* Sequence Number 2 octets */
+        proto_tree_add_item(gtpv2_tree, hf_gtpv2_seq, tvb, offset, 2, FALSE);
+        offset+=2;
+
+        /* Spare 2 octets */
+        proto_tree_add_item(gtpv2_tree, hf_gtpv2_spare, tvb, offset, 2, FALSE);
+        offset+=2;
+
+        dissect_gtpv2_ie_common(tvb, pinfo, gtpv2_tree, offset);
+    }
 
 
 }
 void proto_register_gtpv2(void)
 {
     static hf_register_info hf_gtpv2[] = {
-               {&hf_gtpv2_flags,
-               {"Flags", "gtpv2.flags",
-               FT_UINT8, BASE_DEC, NULL, 0x0,
-               NULL, HFILL}
-               },
-               {&hf_gtpv2_version,
-               {"Version", "gtpv2.version",
-               FT_UINT8, BASE_DEC, NULL, 0xe0,
-               NULL, HFILL}
-               },
-               { &hf_gtpv2_t,
-               {"T", "gtpv2.t",
-               FT_UINT8, BASE_DEC, NULL, 0x08,
-               "If TEID field is present or not", HFILL}
-               },
-               { &hf_gtpv2_message_type,
-               {"Message Type", "gtpv2.message_type",
-               FT_UINT8, BASE_DEC, VALS(gtpv2_message_type_vals), 0x0,
-               NULL, HFILL}
-               },
-               { &hf_gtpv2_msg_length,
-               {"Message Length", "gtpv2.msg_lengt",
-               FT_UINT16, BASE_DEC, NULL, 0x0,
-               NULL, HFILL}
-               },
-               { &hf_gtpv2_teid,
-               {"Tunnel Endpoint Identifier", "gtpv2.teid",
-               FT_UINT32, BASE_DEC, NULL, 0x0,
-               "TEID", HFILL}
-               },
-               { &hf_gtpv2_seq,
-               {"Sequence Number", "gtpv2.seq",
-               FT_UINT32, BASE_DEC, NULL, 0x0,
-               "SEQ", HFILL}
-               },
-               { &hf_gtpv2_spare,
-               {"Spare", "gtpv2.spare",
-               FT_UINT16, BASE_DEC, NULL, 0x0,
-               NULL, HFILL}
-               },
-               { &hf_gtpv2_ie,
-               {"IE Type", "gtpv2.ie_type",
-               FT_UINT8, BASE_DEC, VALS(gtpv2_element_type_vals), 0x0,
-               NULL, HFILL}
-               },
-               { &hf_gtpv2_ie_len,
-               {"IE Length", "gtpv2.ie_len",
-               FT_UINT16, BASE_DEC, NULL, 0x0,
-               "length of the information element excluding the first four octets", HFILL}
-               },
-               { &hf_gtpv2_cr,
-               {"CR flag", "gtpv2.cr",
-               FT_UINT8, BASE_DEC, NULL, 0xe0,
-               NULL, HFILL}
-               },
-               { &hf_gtpv2_instance,
-               {"Instance", "gtpv2.instance",
-               FT_UINT8, BASE_DEC, NULL, 0x0f,
-               NULL, HFILL}
-               },
-               {&hf_gtpv2_imsi,
-               {"IMSI(International Mobile Subscriber Identity number)", "gtpv2.imsi",
-               FT_STRING, BASE_NONE, NULL, 0,
-               NULL, HFILL}
-               },
-               { &hf_gtpv2_cause,
-               {"Cause", "gtpv2.cause",
-               FT_UINT8, BASE_DEC, VALS(gtpv2_cause_vals), 0x0,
-               NULL, HFILL}
-               },
-               {&hf_gtpv2_cause_cs,
-               {"Cause Source (CS: True-Error originated by remote node, False-Error originated by Node sending the Message)","gtpv2.cs",
-               FT_BOOLEAN, 8, NULL, 0x01,
-               NULL, HFILL}
-               },
-               { &hf_gtpv2_rec,
-               {"Restart Counter", "gtpv2.rec",
-               FT_UINT8, BASE_DEC, NULL, 0x0,
-               NULL, HFILL}
-               },
-               {&hf_gtpv2_apn,
-               {"APN (Access Point Name)", "gtpv2.apn",
-               FT_STRING, BASE_NONE, NULL, 0x0,
-               NULL, HFILL}
-               },
-               {&hf_gtpv2_ambr_up,
-               {"AMBR Uplink (Aggregate Maximum Bit Rate for Uplink)", "gtpv2.ambr_up",
-               FT_UINT32, BASE_DEC, NULL, 0x0,
-               NULL, HFILL}
-               },
-               {&hf_gtpv2_ambr_down,
-               {"AMBR Downlink(Aggregate Maximum Bit Rate for Downlink)", "gtpv2.ambr_down",
-               FT_UINT32, BASE_DEC, NULL, 0x0,
-               NULL, HFILL}
-               },
-               {&hf_gtpv2_ebi,
-               {"EPS Bearer ID (EBI)", "gtpv2.ebi",
-               FT_UINT8, BASE_DEC, NULL, 0x0f,
-               NULL, HFILL}
-               },
-               { &hf_gtpv2_ip_address_ipv4,
-               {"IP address IPv4", "gtpv2.ip_address_ipv4",
-               FT_IPv4, BASE_NONE, NULL, 0x0,
-               NULL, HFILL}
-               },
-               { &hf_gtpv2_ip_address_ipv6,
-               {"IP address IPv6", "gtpv2.ip_address_ipv6",
-               FT_IPv6, BASE_NONE, NULL, 0x0,
-               NULL, HFILL}
-               },
-               {&hf_gtpv2_mei,
-               {"MEI(Mobile Equipment Identity)", "gtpv2.mei",
-               FT_STRING, BASE_NONE, NULL, 0,
-               NULL, HFILL}
-               },
-
-               {&hf_gtpv2_daf, 
-               {"DAF (Dual Address Bearer Flag)", "gtpv2.daf", 
-               FT_BOOLEAN, 8, NULL, 0x80, "DAF", HFILL}
-               },
-               {&hf_gtpv2_dtf,
-               {"DTF (Direct Tunnel Flag)","gtpv2.dtf",
-               FT_BOOLEAN, 8, NULL, 0x40, "DTF", HFILL}
-               },
-               {&hf_gtpv2_hi,
-               {"HI (Handover Indication)", "gtpv2.hi",
-               FT_BOOLEAN, 8, NULL, 0x20, "HI", HFILL}
-               },
-               {&hf_gtpv2_dfi,
-               {"DFI (Direct Forwarding Indication)", "gtpv2.dfi",
-               FT_BOOLEAN, 8, NULL, 0x10, "DFI", HFILL}
-               },
-               {&hf_gtpv2_oi,
-               {"OI (Operation Indication)","gtpv2.oi",
-               FT_BOOLEAN, 8, NULL, 0x08, "OI", HFILL}
-               },
-               {&hf_gtpv2_isrsi,
-               {"ISRSI (Idle mode Signalling Reduction Supported Indication)", "gtpv2.isrsi",
-               FT_BOOLEAN, 8, NULL, 0x04, "ISRSI", HFILL}
-               },
-               {&hf_gtpv2_israi,
-               {"ISRAI (Idle mode Signalling Reduction Activation Indication)",        "gtpv2.israi",
-               FT_BOOLEAN, 8, NULL, 0x02, "ISRAI", HFILL}
-               },
-               {&hf_gtpv2_sgwci,
-               {"SGWCI (SGW Change Indication)", "gtpv2.sgwci", 
-               FT_BOOLEAN, 8, NULL, 0x01, "SGWCI", HFILL}
-               },
-               {&hf_gtpv2_pt,
-               {"PT (Protocol Type)", "gtpv2.pt", 
-               FT_BOOLEAN, 8, NULL, 0x08, "PT", HFILL}
-               },
-               {&hf_gtpv2_tdi,
-               {"TDI (Teardown Indication)", "gtpv2.tdi", 
-               FT_BOOLEAN, 8, NULL, 0x04, "TDI", HFILL}
-               },
-               {&hf_gtpv2_si,
-               {"SI (Scope Indication)", "gtpv2.si", 
-               FT_BOOLEAN, 8, NULL, 0x02, "SI", HFILL}
-               },
-               {&hf_gtpv2_msv,
-               {"MSV (MS Validated)", "gtpv2.msv", 
-               FT_BOOLEAN, 8, NULL, 0x01, "MSV", HFILL}
-               },
-               { &hf_gtpv2_pdn_type,
-               {"PDN Type", "gtpv2.pdn_type",
-               FT_UINT8, BASE_DEC, VALS(gtpv2_pdn_type_vals), 0x07,
-               NULL, HFILL}
-               },
-               { &hf_gtpv2_pdn_ipv4,
-               {"PDN IPv4", "gtpv2.pdn_ipv4",
-               FT_IPv4, BASE_NONE, NULL, 0x0,
-               NULL, HFILL}
-               },
-               { &hf_gtpv2_pdn_ipv6_len,
-               {"IPv6 Prefix Length", "gtpv2.pdn_ipv6_len",
-               FT_UINT8, BASE_DEC, NULL, 0x0,
-               NULL, HFILL}
-               },
-               { &hf_gtpv2_pdn_ipv6,
-               {"PDN IPv6", "gtpv2.pdn_ipv6",
-               FT_IPv6, BASE_NONE, NULL, 0x0,
-               NULL, HFILL}
-               },
-               {&hf_gtpv2_bearer_qos_pvi,
-               {"PVI (Pre-emption Vulnerability)", "gtpv2.bearer_qos_pvi",
-               FT_BOOLEAN, 8, NULL, 0x01,
-               NULL, HFILL}
-               },
-               {&hf_gtpv2_bearer_qos_pl,
-               {"PL (Priority Level)", "gtpv2.bearer_qos_pl",
-               FT_UINT8, BASE_DEC, NULL, 0x3c,
-               NULL, HFILL}
-               },
-               {&hf_gtpv2_bearer_qos_pci,
-               {"PCI (Pre-emption Capability)", "gtpv2.bearer_qos_pci",
-               FT_BOOLEAN, 8, NULL, 0x40,
-               NULL, HFILL}
-               },
-               {&hf_gtpv2_bearer_qos_label_qci,
-               {"Label (QCI)", "gtpv2.bearer_qos_label_qci",
-               FT_UINT8, BASE_DEC, NULL, 0x0,
-               NULL, HFILL}
-               },
-               {&hf_gtpv2_bearer_qos_mbr_up,
-               {"Maximum Bit Rate For Uplink", "gtpv2.bearer_qos_mbr_up",
-               FT_UINT64, BASE_DEC, NULL, 0x0,
-               NULL, HFILL}
-               },
-               {&hf_gtpv2_bearer_qos_mbr_down,
-               {"Maximum Bit Rate For Downlink", "gtpv2.bearer_qos_mbr_down",
-               FT_UINT64, BASE_DEC, NULL, 0x0,
-               NULL, HFILL}
-               },
-               {&hf_gtpv2_bearer_qos_gbr_up,
-               {"Guaranteed Bit Rate For Uplink", "gtpv2.bearer_qos_gbr_up",
-               FT_UINT64, BASE_DEC, NULL, 0x0,
-               NULL, HFILL}
-               },
-               {&hf_gtpv2_bearer_qos_gbr_down,
-               {"Guaranteed Bit Rate For Downlink", "gtpv2.bearer_qos_gbr_down",
-               FT_UINT64, BASE_DEC, NULL, 0x0,
-               NULL, HFILL}
-               },
-               {&hf_gtpv2_flow_qos_label_qci,
-               {"Label (QCI)", "gtpv2.flow_qos_label_qci",
-               FT_UINT8, BASE_DEC, NULL, 0x0,
-               NULL, HFILL}
-               },
-               {&hf_gtpv2_flow_qos_mbr_up,
-               {"Maximum Bit Rate For Uplink", "gtpv2.flow_qos_mbr_up",
-               FT_UINT64, BASE_DEC, NULL, 0x0,
-               NULL, HFILL}
-               },
-               {&hf_gtpv2_flow_qos_mbr_down,
-               {"Maximum Bit Rate For Downlink", "gtpv2.flow_qos_mbr_down",
-               FT_UINT64, BASE_DEC, NULL, 0x0,
-               NULL, HFILL}
-               },
-               {&hf_gtpv2_flow_qos_gbr_up,
-               {"Guaranteed Bit Rate For Uplink", "gtpv2.flow_qos_gbr_up",
-               FT_UINT64, BASE_DEC, NULL, 0x0,
-               NULL, HFILL}
-               },
-               {&hf_gtpv2_flow_qos_gbr_down,
-               {"Guaranteed Bit Rate For Downlink", "gtpv2.flow_qos_gbr_down",
-               FT_UINT64, BASE_DEC, NULL, 0x0,
-               NULL, HFILL}
-               },
-               { &hf_gtpv2_rat_type,
-               {"RAT Type", "gtpv2.rat_type",
-               FT_UINT8, BASE_DEC, VALS(gtpv2_rat_type_vals), 0x0,
-               NULL, HFILL}
-               },
-               {&hf_gtpv2_b_tft_opcode,
-               {"Operation Code", "gtpv2.b_tft_opcode",
-               FT_UINT8, BASE_DEC, VALS(gtpv2_opcode_vals), 0xe0,
-               NULL , HFILL}
-               },
-               {&hf_gtpv2_b_tft_ebit,
-               {"Ebit", "gtpv2.b_tft_ebit",
-               FT_BOOLEAN, 8, NULL, 0x10,
-               NULL , HFILL}
-               },
-               {&hf_gtpv2_b_tft_number,
-               {"Number of Packet Filters", "gtpv2.b_tft_number",
-               FT_UINT8, BASE_DEC, NULL, 0x0f,
-               NULL , HFILL}
-               },
-               {&hf_gtpv2_b_tft_pf_id,
-               {"Packet Filter Identifier", "gtpv2.b_tft_pf_id",
-               FT_UINT8, BASE_DEC, NULL, 0x0f,
-               NULL , HFILL}
-               },
-               {&hf_gtpv2_b_tft_pf_direction,
-               {"Direction", "gtpv2.b_tft_pf_direction",
-               FT_UINT8, BASE_DEC, VALS(gtpv2_direction_vals), 0x30,
-               NULL , HFILL}
-               },
-               {&hf_gtpv2_b_tft_pf_eval,
-               {"Evaluation Precedence", "gtpv2.b_tft_pf_eval",
-               FT_UINT8, BASE_DEC, NULL, 0x0,
-               NULL , HFILL}
-               },
-               {&hf_gtpv2_b_tft_pf_length,
-               {"Length of Packet Filter", "gtpv2.b_tft_pf_length",
-               FT_UINT8, BASE_DEC, NULL, 0x0,
-               NULL , HFILL}
-               },
-               {&hf_gtpv2_b_tft_pf_comp_type,
-               {"Component Type", "gtpv2.b_tft_pf_comp_type",
-               FT_UINT8, BASE_DEC, VALS(gtpv2_comp_type_vals), 0x0,
-               NULL , HFILL}
-               },
-               { &hf_gtpv2_b_tft_pf_ipv4,
-               {"IPv4 address", "gtpv2.b_tft_pf_ipv4",
-               FT_IPv4, BASE_NONE, NULL, 0x0,
-               NULL, HFILL}
-               },
-               { &hf_gtpv2_b_tft_pf_ipv6,
-               {"IPv6 address", "gtpv2.b_tft_pf_ipv6",
-               FT_IPv6, BASE_NONE, NULL, 0x0,
-               NULL, HFILL}
-               },
-               {&hf_gtpv2_b_tft_pf_ipv4_mask,
-               {"IPV4 address mask field", "gtpv2.b_tft_pf_ipv4_mask",
-               FT_UINT32, BASE_DEC, NULL, 0x0,
-               NULL , HFILL}
-               },
-               {&hf_gtpv2_b_tft_pf_ipv6_mask,
-               {"IPV6 address mask field", "gtpv2.b_tft_pf_ipv6_mask",
-               FT_UINT32, BASE_DEC, NULL, 0x0,
-               NULL , HFILL}
-               },
-               {&hf_gtpv2_b_tft_pf_prot_id,
-               {"Protocol Identifier/Next Header type", "gtpv2.b_tft_pf_prot_id",
-               FT_UINT8, BASE_DEC, NULL, 0x0,
-               NULL , HFILL}
-               },
-               {&hf_gtpv2_b_tft_pf_single_local,
-               {"Single Local port type", "gtpv2.b_tft_pf_single_local",
-               FT_UINT16, BASE_DEC, NULL, 0x0,
-               NULL , HFILL}
-               },
-               {&hf_gtpv2_b_tft_pf_local_port_low,
-               {"Local port range low limit", "gtpv2.b_tft_pf_local_port_low",
-               FT_UINT16, BASE_DEC, NULL, 0x0,
-               NULL , HFILL}
-               },
-               {&hf_gtpv2_b_tft_pf_local_port_high,
-               {"Local port range high limit", "gtpv2.b_tft_pf_local_port_high",
-               FT_UINT16, BASE_DEC, NULL, 0x0,
-               NULL , HFILL}
-               },
-               {&hf_gtpv2_b_tft_pf_single_remote,
-               {"Single remote port type", "gtpv2.b_tft_pf_single_remote",
-               FT_UINT16, BASE_DEC, NULL, 0x0,
-               NULL , HFILL}
-               },
-               {&hf_gtpv2_b_tft_pf_remote_port_low,
-               {"Remote port range low limit", "gtpv2.b_tft_pf_remote_port_low",
-               FT_UINT16, BASE_DEC, NULL, 0x0,
-               NULL , HFILL}
-               },
-               {&hf_gtpv2_b_tft_pf_remote_port_high,
-               {"Remote port range high limit", "gtpv2.b_tft_pf_remote_port_high",
-               FT_UINT16, BASE_DEC, NULL, 0x0,
-               NULL , HFILL}
-               },
-               {&hf_gtpv2_b_tft_pf_security,
-               {"Security Parameter Index", "gtpv2.b_tft_pf_security",
-               FT_UINT8, BASE_DEC, NULL, 0x0,
-               NULL , HFILL}
-               },
-               {&hf_gtpv2_b_tft_pf_service_type,
-               {"Type of Service/Traffic Class type", "gtpv2.b_tft_pf_service_type",
-               FT_UINT8, BASE_DEC, NULL, 0x0,
-               NULL , HFILL}
-               },
-               {&hf_gtpv2_b_tft_pf_service_type_mask,
-               {"Type of Service/Traffic Class mask", "gtpv2.b_tft_pf_service_type_mask",
-               FT_UINT8, BASE_DEC, NULL, 0x0,
-               NULL , HFILL}
-               },
-               {&hf_gtpv2_b_tft_pf_flow_label,
-               {"Flow Label Type", "gtpv2.b_tft_pf_flow_label",
-               FT_UINT32, BASE_DEC, NULL, 0x0,
-               NULL, HFILL}
-               },
-               { &hf_gtpv2_uli_ecgi_flg,
-               {"ECGI Present Flag)", "gtpv2.uli_ecgi_flg",    
-               FT_BOOLEAN, 8, NULL, 0x10, 
-               NULL, HFILL}
-               },
-               { &hf_gtpv2_uli_tai_flg,
-               {"TAI Present Flag)", "gtpv2.uli_tai_flg",      
-               FT_BOOLEAN, 8, NULL, 0x08, 
-               NULL, HFILL}
-               },
-               { &hf_gtpv2_uli_rai_flg,
-               {"RAI Present Flag)", "gtpv2.uli_rai_flg",      
-               FT_BOOLEAN, 8, NULL, 0x04, 
-               NULL, HFILL}
-               },
-               { &hf_gtpv2_uli_sai_flg,
-               {"SAI Present Flag)", "gtpv2.uli_sai_flg",      
-               FT_BOOLEAN, 8, NULL, 0x02, 
-               NULL, HFILL}
-               },
-               { &hf_gtpv2_uli_cgi_flg,
-               {"CGI Present Flag)", "gtpv2.uli_cgi_flg",      
-               FT_BOOLEAN, 8, NULL, 0x01, 
-               NULL, HFILL}
-               },
-               { &hf_gtpv2_uli_cgi_lac,
-               {"Location Area Code", "gtpv2.uli_cgi_lac",
-               FT_UINT16, BASE_DEC, NULL, 0x0,
-               NULL, HFILL}
-               },
-               { &hf_gtpv2_uli_cgi_ci,
-               {"Cell Identity", "gtpv2.uli_cgi_ci",
-               FT_UINT16, BASE_DEC, NULL, 0x0,
-               NULL, HFILL}
-               },
-               { &hf_gtpv2_uli_sai_lac,
-               {"Location Area Code", "gtpv2.uli_sai_lac",
-               FT_UINT16, BASE_DEC, NULL, 0x0,
-               NULL, HFILL}
-               },
-               { &hf_gtpv2_uli_sai_sac,
-               {"Service Area Code", "gtpv2.uli_sai_sac",
-               FT_UINT16, BASE_DEC, NULL, 0x0,
-               NULL, HFILL}
-               },
-               { &hf_gtpv2_uli_rai_lac,
-               {"Location Area Code", "gtpv2.uli_rai_lac",
-               FT_UINT16, BASE_DEC, NULL, 0x0,
-               NULL, HFILL}
-               },
-               { &hf_gtpv2_uli_rai_rac,
-               {"Routing Area Code", "gtpv2.uli_rai_rac",
-               FT_UINT16, BASE_DEC, NULL, 0x0,
-               NULL, HFILL}
-               },
-               { &hf_gtpv2_uli_tai_tac,
-               {"Tracking Area Code", "gtpv2.uli_tai_tac",
-               FT_UINT16, BASE_DEC, NULL, 0x0,
-               NULL, HFILL}
-               },
-               {&hf_gtpv2_uli_ecgi_eci,
-               {"ECI (E-UTRAN Cell Identifier)", "gtpv2.uli_ecgi_eci",
-               FT_UINT32, BASE_DEC, NULL, 0x0,
-               NULL, HFILL}
-               },
-               {&hf_gtpv2_f_teid_v4,
-               {"V4 (True-IPV4 address field Exists,False-Doesn't Exist in F-TEID)", "gtpv2.f_teid_v4",
-               FT_BOOLEAN, 8, NULL, 0x80,
-               NULL, HFILL}
-               },
-               {&hf_gtpv2_f_teid_v6,
-               {"V6 (True-IPV6 address field Exists,False-Doesn't Exist in F-TEID)", "gtpv2.f_teid_v6",
-               FT_BOOLEAN, 8, NULL, 0x40,
-               NULL, HFILL}
-               },
-               {&hf_gtpv2_f_teid_interface_type,
-               {"Interface Type", "gtpv2.f_teid_interface_type",
-               FT_UINT8, BASE_DEC, VALS(gtpv2_f_teid_interface_type_vals), 0x1f,
-               NULL , HFILL}
-               },
-               {&hf_gtpv2_f_teid_gre_key,
-               {"TEID/GRE Key", "gtpv2.f_teid_gre_key",
-               FT_UINT32, BASE_DEC, NULL, 0x0,
-               NULL , HFILL}
-               },
-               { &hf_gtpv2_f_teid_ipv4,
-               {"F-TEID IPv4", "gtpv2.f_teid_ipv4",
-               FT_IPv4, BASE_NONE, NULL, 0x0,
-               NULL, HFILL}
-               },
-               { &hf_gtpv2_f_teid_ipv6,
-               {"F-TEID IPv6", "gtpv2.f_teid_ipv6",
-               FT_IPv6, BASE_NONE, NULL, 0x0,
-               NULL, HFILL}
-               },
-               {&hf_gtpv2_delay_value,
-               {"Delay Value (In integer multiples of 50 milliseconds or zero)", "gtpv2.delay_value",
-               FT_UINT8, BASE_DEC, NULL, 0x0,
-               NULL, HFILL}
-               },
-               {&hf_gtpv2_charging_id,
-               {"Charging id", "gtpv2.charging_id",
-               FT_UINT32, BASE_DEC, NULL, 0x0,
-               NULL, HFILL}
-               },
-               {&hf_gtpv2_charging_characteristic,
-               {"Charging Characteristic", "gtpv2.charging_characteristic",
-               FT_UINT16, BASE_DEC, NULL, 0x0,
-               NULL, HFILL}
-               },
-               {&hf_gtpv2_bearer_flag,
-               {"Bearer Flags(PPC(Prohibit Payload Compression) True-SGSN attempts to compress the payload, False-SGSN doesn't attempt to compress the payload)",
-               "gtpv2.bearer_flag",
-               FT_BOOLEAN, 8, NULL, 0x01,
-               NULL, HFILL}
-               },
-               {&hf_gtpv2_pti,
-               {"Procedure Transaction Id", "gtpv2.pti",
-               FT_UINT8, BASE_DEC, NULL, 0x0,
-               NULL, HFILL}
-               },
-               {&hf_gtpv2_ue_time_zone,
-               {"Time Zone","gtpv2.ue_time_zone",
-               FT_UINT8, BASE_DEC, NULL,0x0,
-               NULL, HFILL}
-               },
-               {&hf_gtpv2_ue_time_zone_dst,
-               {"Daylight Saving Time","gtpv2.ue_time_zone_dst",
-               FT_UINT8, BASE_DEC, VALS(gtpv2_ue_time_zone_dst_vals),0x03,
-               NULL, HFILL}
-               },
-               {&hf_gtpv2_apn_rest,
-               {"APN Restriction", "gtpv2.apn_rest",
-               FT_UINT8, BASE_DEC, NULL, 0x0,
-               NULL, HFILL}
-               },
-               {&hf_gtpv2_selec_mode,
-               {"Selection Mode","gtpv2.selec_mode",
-               FT_UINT8, BASE_DEC, VALS(gtpv2_selec_mode_vals),0x03,
-               NULL, HFILL}
-               },
-               {&hf_gtpv2_bearer_control_mode,
-               {"Bearer Control Mode","gtpv2.bearer_control_mode",
-               FT_UINT8, BASE_DEC, VALS(gtpv2_bearer_control_mode_vals),0x0,
-               NULL, HFILL}
-               },
-               { &hf_gtpv2_cng_rep_act,
-               {"Change Reporting Action", "gtpv2.cng_rep_act",
-               FT_UINT8, BASE_DEC, VALS(gtpv2_cng_rep_act_vals), 0x0,
-               NULL, HFILL}
-               },
-               { &hf_gtpv2_node_type,
-               {"Node Type", "gtpv2.node_type",
-               FT_UINT8, BASE_DEC, VALS(gtpv2_node_type_vals), 0x0,
-               NULL, HFILL}
-               },
-               { &hf_gtpv2_address_digits,
-                       { "Address digits", "gtpv2.address_digits",
-                       FT_STRING, BASE_NONE, NULL, 0,
-                       NULL, HFILL }
-               },
-
-        };
+        {&hf_gtpv2_flags,
+        {"Flags", "gtpv2.flags",
+        FT_UINT8, BASE_DEC, NULL, 0x0,
+        NULL, HFILL}
+        },
+        {&hf_gtpv2_version,
+        {"Version", "gtpv2.version",
+        FT_UINT8, BASE_DEC, NULL, 0xe0,
+        NULL, HFILL}
+        },
+        { &hf_gtpv2_t,
+        {"T", "gtpv2.t",
+        FT_UINT8, BASE_DEC, NULL, 0x08,
+        "If TEID field is present or not", HFILL}
+        },
+        { &hf_gtpv2_message_type,
+        {"Message Type", "gtpv2.message_type",
+        FT_UINT8, BASE_DEC, VALS(gtpv2_message_type_vals), 0x0,
+        NULL, HFILL}
+        },
+        { &hf_gtpv2_msg_length,
+        {"Message Length", "gtpv2.msg_lengt",
+        FT_UINT16, BASE_DEC, NULL, 0x0,
+        NULL, HFILL}
+        },
+        { &hf_gtpv2_teid,
+        {"Tunnel Endpoint Identifier", "gtpv2.teid",
+        FT_UINT32, BASE_DEC, NULL, 0x0,
+        "TEID", HFILL}
+        },
+        { &hf_gtpv2_seq,
+        {"Sequence Number", "gtpv2.seq",
+        FT_UINT32, BASE_DEC, NULL, 0x0,
+        "SEQ", HFILL}
+        },
+        { &hf_gtpv2_spare,
+        {"Spare", "gtpv2.spare",
+        FT_UINT16, BASE_DEC, NULL, 0x0,
+        NULL, HFILL}
+        },
+        { &hf_gtpv2_ie,
+        {"IE Type", "gtpv2.ie_type",
+        FT_UINT8, BASE_DEC, VALS(gtpv2_element_type_vals), 0x0,
+        NULL, HFILL}
+        },
+        { &hf_gtpv2_ie_len,
+        {"IE Length", "gtpv2.ie_len",
+        FT_UINT16, BASE_DEC, NULL, 0x0,
+        "length of the information element excluding the first four octets", HFILL}
+        },
+        { &hf_gtpv2_cr,
+        {"CR flag", "gtpv2.cr",
+        FT_UINT8, BASE_DEC, NULL, 0xe0,
+        NULL, HFILL}
+        },
+        { &hf_gtpv2_instance,
+        {"Instance", "gtpv2.instance",
+        FT_UINT8, BASE_DEC, NULL, 0x0f,
+        NULL, HFILL}
+        },
+        {&hf_gtpv2_imsi,
+        {"IMSI(International Mobile Subscriber Identity number)", "gtpv2.imsi",
+        FT_STRING, BASE_NONE, NULL, 0,
+        NULL, HFILL}
+        },
+        { &hf_gtpv2_cause,
+        {"Cause", "gtpv2.cause",
+        FT_UINT8, BASE_DEC, VALS(gtpv2_cause_vals), 0x0,
+        NULL, HFILL}
+        },
+        {&hf_gtpv2_cause_cs,
+        {"Cause Source (CS: True-Error originated by remote node, False-Error originated by Node sending the Message)","gtpv2.cs",
+        FT_BOOLEAN, 8, NULL, 0x01,
+        NULL, HFILL}
+        },
+        { &hf_gtpv2_rec,
+        {"Restart Counter", "gtpv2.rec",
+        FT_UINT8, BASE_DEC, NULL, 0x0,
+        NULL, HFILL}
+        },
+        {&hf_gtpv2_apn,
+        {"APN (Access Point Name)", "gtpv2.apn",
+        FT_STRING, BASE_NONE, NULL, 0x0,
+        NULL, HFILL}
+        },
+        {&hf_gtpv2_ambr_up,
+        {"AMBR Uplink (Aggregate Maximum Bit Rate for Uplink)", "gtpv2.ambr_up",
+        FT_UINT32, BASE_DEC, NULL, 0x0,
+        NULL, HFILL}
+        },
+        {&hf_gtpv2_ambr_down,
+        {"AMBR Downlink(Aggregate Maximum Bit Rate for Downlink)", "gtpv2.ambr_down",
+        FT_UINT32, BASE_DEC, NULL, 0x0,
+        NULL, HFILL}
+        },
+        {&hf_gtpv2_ebi,
+        {"EPS Bearer ID (EBI)", "gtpv2.ebi",
+        FT_UINT8, BASE_DEC, NULL, 0x0f,
+        NULL, HFILL}
+        },
+        { &hf_gtpv2_ip_address_ipv4,
+        {"IP address IPv4", "gtpv2.ip_address_ipv4",
+        FT_IPv4, BASE_NONE, NULL, 0x0,
+        NULL, HFILL}
+        },
+        { &hf_gtpv2_ip_address_ipv6,
+        {"IP address IPv6", "gtpv2.ip_address_ipv6",
+        FT_IPv6, BASE_NONE, NULL, 0x0,
+        NULL, HFILL}
+        },
+        {&hf_gtpv2_mei,
+        {"MEI(Mobile Equipment Identity)", "gtpv2.mei",
+        FT_STRING, BASE_NONE, NULL, 0,
+        NULL, HFILL}
+        },
+
+        {&hf_gtpv2_daf,
+        {"DAF (Dual Address Bearer Flag)", "gtpv2.daf",
+        FT_BOOLEAN, 8, NULL, 0x80, "DAF", HFILL}
+        },
+        {&hf_gtpv2_dtf,
+        {"DTF (Direct Tunnel Flag)","gtpv2.dtf",
+        FT_BOOLEAN, 8, NULL, 0x40, "DTF", HFILL}
+        },
+        {&hf_gtpv2_hi,
+        {"HI (Handover Indication)", "gtpv2.hi",
+        FT_BOOLEAN, 8, NULL, 0x20, "HI", HFILL}
+        },
+        {&hf_gtpv2_dfi,
+        {"DFI (Direct Forwarding Indication)", "gtpv2.dfi",
+        FT_BOOLEAN, 8, NULL, 0x10, "DFI", HFILL}
+        },
+        {&hf_gtpv2_oi,
+        {"OI (Operation Indication)","gtpv2.oi",
+        FT_BOOLEAN, 8, NULL, 0x08, "OI", HFILL}
+        },
+        {&hf_gtpv2_isrsi,
+        {"ISRSI (Idle mode Signalling Reduction Supported Indication)", "gtpv2.isrsi",
+        FT_BOOLEAN, 8, NULL, 0x04, "ISRSI", HFILL}
+        },
+        {&hf_gtpv2_israi,
+        {"ISRAI (Idle mode Signalling Reduction Activation Indication)",    "gtpv2.israi",
+        FT_BOOLEAN, 8, NULL, 0x02, "ISRAI", HFILL}
+        },
+        {&hf_gtpv2_sgwci,
+        {"SGWCI (SGW Change Indication)", "gtpv2.sgwci",
+        FT_BOOLEAN, 8, NULL, 0x01, "SGWCI", HFILL}
+        },
+        {&hf_gtpv2_pt,
+        {"PT (Protocol Type)", "gtpv2.pt",
+        FT_BOOLEAN, 8, NULL, 0x08, "PT", HFILL}
+        },
+        {&hf_gtpv2_tdi,
+        {"TDI (Teardown Indication)", "gtpv2.tdi",
+        FT_BOOLEAN, 8, NULL, 0x04, "TDI", HFILL}
+        },
+        {&hf_gtpv2_si,
+        {"SI (Scope Indication)", "gtpv2.si",
+        FT_BOOLEAN, 8, NULL, 0x02, "SI", HFILL}
+        },
+        {&hf_gtpv2_msv,
+        {"MSV (MS Validated)", "gtpv2.msv",
+        FT_BOOLEAN, 8, NULL, 0x01, "MSV", HFILL}
+        },
+        { &hf_gtpv2_pdn_type,
+        {"PDN Type", "gtpv2.pdn_type",
+        FT_UINT8, BASE_DEC, VALS(gtpv2_pdn_type_vals), 0x07,
+        NULL, HFILL}
+        },
+        { &hf_gtpv2_pdn_ipv4,
+        {"PDN IPv4", "gtpv2.pdn_ipv4",
+        FT_IPv4, BASE_NONE, NULL, 0x0,
+        NULL, HFILL}
+        },
+        { &hf_gtpv2_pdn_ipv6_len,
+        {"IPv6 Prefix Length", "gtpv2.pdn_ipv6_len",
+        FT_UINT8, BASE_DEC, NULL, 0x0,
+        NULL, HFILL}
+        },
+        { &hf_gtpv2_pdn_ipv6,
+        {"PDN IPv6", "gtpv2.pdn_ipv6",
+        FT_IPv6, BASE_NONE, NULL, 0x0,
+        NULL, HFILL}
+        },
+        {&hf_gtpv2_bearer_qos_pvi,
+        {"PVI (Pre-emption Vulnerability)", "gtpv2.bearer_qos_pvi",
+        FT_BOOLEAN, 8, NULL, 0x01,
+        NULL, HFILL}
+        },
+        {&hf_gtpv2_bearer_qos_pl,
+        {"PL (Priority Level)", "gtpv2.bearer_qos_pl",
+        FT_UINT8, BASE_DEC, NULL, 0x3c,
+        NULL, HFILL}
+        },
+        {&hf_gtpv2_bearer_qos_pci,
+        {"PCI (Pre-emption Capability)", "gtpv2.bearer_qos_pci",
+        FT_BOOLEAN, 8, NULL, 0x40,
+        NULL, HFILL}
+        },
+        {&hf_gtpv2_bearer_qos_label_qci,
+        {"Label (QCI)", "gtpv2.bearer_qos_label_qci",
+        FT_UINT8, BASE_DEC, NULL, 0x0,
+        NULL, HFILL}
+        },
+        {&hf_gtpv2_bearer_qos_mbr_up,
+        {"Maximum Bit Rate For Uplink", "gtpv2.bearer_qos_mbr_up",
+        FT_UINT64, BASE_DEC, NULL, 0x0,
+        NULL, HFILL}
+        },
+        {&hf_gtpv2_bearer_qos_mbr_down,
+        {"Maximum Bit Rate For Downlink", "gtpv2.bearer_qos_mbr_down",
+        FT_UINT64, BASE_DEC, NULL, 0x0,
+        NULL, HFILL}
+        },
+        {&hf_gtpv2_bearer_qos_gbr_up,
+        {"Guaranteed Bit Rate For Uplink", "gtpv2.bearer_qos_gbr_up",
+        FT_UINT64, BASE_DEC, NULL, 0x0,
+        NULL, HFILL}
+        },
+        {&hf_gtpv2_bearer_qos_gbr_down,
+        {"Guaranteed Bit Rate For Downlink", "gtpv2.bearer_qos_gbr_down",
+        FT_UINT64, BASE_DEC, NULL, 0x0,
+        NULL, HFILL}
+        },
+        {&hf_gtpv2_flow_qos_label_qci,
+        {"Label (QCI)", "gtpv2.flow_qos_label_qci",
+        FT_UINT8, BASE_DEC, NULL, 0x0,
+        NULL, HFILL}
+        },
+        {&hf_gtpv2_flow_qos_mbr_up,
+        {"Maximum Bit Rate For Uplink", "gtpv2.flow_qos_mbr_up",
+        FT_UINT64, BASE_DEC, NULL, 0x0,
+        NULL, HFILL}
+        },
+        {&hf_gtpv2_flow_qos_mbr_down,
+        {"Maximum Bit Rate For Downlink", "gtpv2.flow_qos_mbr_down",
+        FT_UINT64, BASE_DEC, NULL, 0x0,
+        NULL, HFILL}
+        },
+        {&hf_gtpv2_flow_qos_gbr_up,
+        {"Guaranteed Bit Rate For Uplink", "gtpv2.flow_qos_gbr_up",
+        FT_UINT64, BASE_DEC, NULL, 0x0,
+        NULL, HFILL}
+        },
+        {&hf_gtpv2_flow_qos_gbr_down,
+        {"Guaranteed Bit Rate For Downlink", "gtpv2.flow_qos_gbr_down",
+        FT_UINT64, BASE_DEC, NULL, 0x0,
+        NULL, HFILL}
+        },
+        { &hf_gtpv2_rat_type,
+        {"RAT Type", "gtpv2.rat_type",
+        FT_UINT8, BASE_DEC, VALS(gtpv2_rat_type_vals), 0x0,
+        NULL, HFILL}
+        },
+        {&hf_gtpv2_b_tft_opcode,
+        {"Operation Code", "gtpv2.b_tft_opcode",
+        FT_UINT8, BASE_DEC, VALS(gtpv2_opcode_vals), 0xe0,
+        NULL , HFILL}
+        },
+        {&hf_gtpv2_b_tft_ebit,
+        {"Ebit", "gtpv2.b_tft_ebit",
+        FT_BOOLEAN, 8, NULL, 0x10,
+        NULL , HFILL}
+        },
+        {&hf_gtpv2_b_tft_number,
+        {"Number of Packet Filters", "gtpv2.b_tft_number",
+        FT_UINT8, BASE_DEC, NULL, 0x0f,
+        NULL , HFILL}
+        },
+        {&hf_gtpv2_b_tft_pf_id,
+        {"Packet Filter Identifier", "gtpv2.b_tft_pf_id",
+        FT_UINT8, BASE_DEC, NULL, 0x0f,
+        NULL , HFILL}
+        },
+        {&hf_gtpv2_b_tft_pf_direction,
+        {"Direction", "gtpv2.b_tft_pf_direction",
+        FT_UINT8, BASE_DEC, VALS(gtpv2_direction_vals), 0x30,
+        NULL , HFILL}
+        },
+        {&hf_gtpv2_b_tft_pf_eval,
+        {"Evaluation Precedence", "gtpv2.b_tft_pf_eval",
+        FT_UINT8, BASE_DEC, NULL, 0x0,
+        NULL , HFILL}
+        },
+        {&hf_gtpv2_b_tft_pf_length,
+        {"Length of Packet Filter", "gtpv2.b_tft_pf_length",
+        FT_UINT8, BASE_DEC, NULL, 0x0,
+        NULL , HFILL}
+        },
+        {&hf_gtpv2_b_tft_pf_comp_type,
+        {"Component Type", "gtpv2.b_tft_pf_comp_type",
+        FT_UINT8, BASE_DEC, VALS(gtpv2_comp_type_vals), 0x0,
+        NULL , HFILL}
+        },
+        { &hf_gtpv2_b_tft_pf_ipv4,
+        {"IPv4 address", "gtpv2.b_tft_pf_ipv4",
+        FT_IPv4, BASE_NONE, NULL, 0x0,
+        NULL, HFILL}
+        },
+        { &hf_gtpv2_b_tft_pf_ipv6,
+        {"IPv6 address", "gtpv2.b_tft_pf_ipv6",
+        FT_IPv6, BASE_NONE, NULL, 0x0,
+        NULL, HFILL}
+        },
+        {&hf_gtpv2_b_tft_pf_ipv4_mask,
+        {"IPV4 address mask field", "gtpv2.b_tft_pf_ipv4_mask",
+        FT_UINT32, BASE_DEC, NULL, 0x0,
+        NULL , HFILL}
+        },
+        {&hf_gtpv2_b_tft_pf_ipv6_mask,
+        {"IPV6 address mask field", "gtpv2.b_tft_pf_ipv6_mask",
+        FT_UINT32, BASE_DEC, NULL, 0x0,
+        NULL , HFILL}
+        },
+        {&hf_gtpv2_b_tft_pf_prot_id,
+        {"Protocol Identifier/Next Header type", "gtpv2.b_tft_pf_prot_id",
+        FT_UINT8, BASE_DEC, NULL, 0x0,
+        NULL , HFILL}
+        },
+        {&hf_gtpv2_b_tft_pf_single_local,
+        {"Single Local port type", "gtpv2.b_tft_pf_single_local",
+        FT_UINT16, BASE_DEC, NULL, 0x0,
+        NULL , HFILL}
+        },
+        {&hf_gtpv2_b_tft_pf_local_port_low,
+        {"Local port range low limit", "gtpv2.b_tft_pf_local_port_low",
+        FT_UINT16, BASE_DEC, NULL, 0x0,
+        NULL , HFILL}
+        },
+        {&hf_gtpv2_b_tft_pf_local_port_high,
+        {"Local port range high limit", "gtpv2.b_tft_pf_local_port_high",
+        FT_UINT16, BASE_DEC, NULL, 0x0,
+        NULL , HFILL}
+        },
+        {&hf_gtpv2_b_tft_pf_single_remote,
+        {"Single remote port type", "gtpv2.b_tft_pf_single_remote",
+        FT_UINT16, BASE_DEC, NULL, 0x0,
+        NULL , HFILL}
+        },
+        {&hf_gtpv2_b_tft_pf_remote_port_low,
+        {"Remote port range low limit", "gtpv2.b_tft_pf_remote_port_low",
+        FT_UINT16, BASE_DEC, NULL, 0x0,
+        NULL , HFILL}
+        },
+        {&hf_gtpv2_b_tft_pf_remote_port_high,
+        {"Remote port range high limit", "gtpv2.b_tft_pf_remote_port_high",
+        FT_UINT16, BASE_DEC, NULL, 0x0,
+        NULL , HFILL}
+        },
+        {&hf_gtpv2_b_tft_pf_security,
+        {"Security Parameter Index", "gtpv2.b_tft_pf_security",
+        FT_UINT8, BASE_DEC, NULL, 0x0,
+        NULL , HFILL}
+        },
+        {&hf_gtpv2_b_tft_pf_service_type,
+        {"Type of Service/Traffic Class type", "gtpv2.b_tft_pf_service_type",
+        FT_UINT8, BASE_DEC, NULL, 0x0,
+        NULL , HFILL}
+        },
+        {&hf_gtpv2_b_tft_pf_service_type_mask,
+        {"Type of Service/Traffic Class mask", "gtpv2.b_tft_pf_service_type_mask",
+        FT_UINT8, BASE_DEC, NULL, 0x0,
+        NULL , HFILL}
+        },
+        {&hf_gtpv2_b_tft_pf_flow_label,
+        {"Flow Label Type", "gtpv2.b_tft_pf_flow_label",
+        FT_UINT32, BASE_DEC, NULL, 0x0,
+        NULL, HFILL}
+        },
+        { &hf_gtpv2_uli_ecgi_flg,
+        {"ECGI Present Flag)", "gtpv2.uli_ecgi_flg",
+        FT_BOOLEAN, 8, NULL, 0x10,
+        NULL, HFILL}
+        },
+        { &hf_gtpv2_uli_tai_flg,
+        {"TAI Present Flag)", "gtpv2.uli_tai_flg",
+        FT_BOOLEAN, 8, NULL, 0x08,
+        NULL, HFILL}
+        },
+        { &hf_gtpv2_uli_rai_flg,
+        {"RAI Present Flag)", "gtpv2.uli_rai_flg",
+        FT_BOOLEAN, 8, NULL, 0x04,
+        NULL, HFILL}
+        },
+        { &hf_gtpv2_uli_sai_flg,
+        {"SAI Present Flag)", "gtpv2.uli_sai_flg",
+        FT_BOOLEAN, 8, NULL, 0x02,
+        NULL, HFILL}
+        },
+        { &hf_gtpv2_uli_cgi_flg,
+        {"CGI Present Flag)", "gtpv2.uli_cgi_flg",
+        FT_BOOLEAN, 8, NULL, 0x01,
+        NULL, HFILL}
+        },
+        { &hf_gtpv2_uli_cgi_lac,
+        {"Location Area Code", "gtpv2.uli_cgi_lac",
+        FT_UINT16, BASE_DEC, NULL, 0x0,
+        NULL, HFILL}
+        },
+        { &hf_gtpv2_uli_cgi_ci,
+        {"Cell Identity", "gtpv2.uli_cgi_ci",
+        FT_UINT16, BASE_DEC, NULL, 0x0,
+        NULL, HFILL}
+        },
+        { &hf_gtpv2_uli_sai_lac,
+        {"Location Area Code", "gtpv2.uli_sai_lac",
+        FT_UINT16, BASE_DEC, NULL, 0x0,
+        NULL, HFILL}
+        },
+        { &hf_gtpv2_uli_sai_sac,
+        {"Service Area Code", "gtpv2.uli_sai_sac",
+        FT_UINT16, BASE_DEC, NULL, 0x0,
+        NULL, HFILL}
+        },
+        { &hf_gtpv2_uli_rai_lac,
+        {"Location Area Code", "gtpv2.uli_rai_lac",
+        FT_UINT16, BASE_DEC, NULL, 0x0,
+        NULL, HFILL}
+        },
+        { &hf_gtpv2_uli_rai_rac,
+        {"Routing Area Code", "gtpv2.uli_rai_rac",
+        FT_UINT16, BASE_DEC, NULL, 0x0,
+        NULL, HFILL}
+        },
+        { &hf_gtpv2_uli_tai_tac,
+        {"Tracking Area Code", "gtpv2.uli_tai_tac",
+        FT_UINT16, BASE_DEC, NULL, 0x0,
+        NULL, HFILL}
+        },
+        {&hf_gtpv2_uli_ecgi_eci,
+        {"ECI (E-UTRAN Cell Identifier)", "gtpv2.uli_ecgi_eci",
+        FT_UINT32, BASE_DEC, NULL, 0x0,
+        NULL, HFILL}
+        },
+        {&hf_gtpv2_f_teid_v4,
+        {"V4 (True-IPV4 address field Exists,False-Doesn't Exist in F-TEID)", "gtpv2.f_teid_v4",
+        FT_BOOLEAN, 8, NULL, 0x80,
+        NULL, HFILL}
+        },
+        {&hf_gtpv2_f_teid_v6,
+        {"V6 (True-IPV6 address field Exists,False-Doesn't Exist in F-TEID)", "gtpv2.f_teid_v6",
+        FT_BOOLEAN, 8, NULL, 0x40,
+        NULL, HFILL}
+        },
+        {&hf_gtpv2_f_teid_interface_type,
+        {"Interface Type", "gtpv2.f_teid_interface_type",
+        FT_UINT8, BASE_DEC, VALS(gtpv2_f_teid_interface_type_vals), 0x1f,
+        NULL , HFILL}
+        },
+        {&hf_gtpv2_f_teid_gre_key,
+        {"TEID/GRE Key", "gtpv2.f_teid_gre_key",
+        FT_UINT32, BASE_DEC, NULL, 0x0,
+        NULL , HFILL}
+        },
+        { &hf_gtpv2_f_teid_ipv4,
+        {"F-TEID IPv4", "gtpv2.f_teid_ipv4",
+        FT_IPv4, BASE_NONE, NULL, 0x0,
+        NULL, HFILL}
+        },
+        { &hf_gtpv2_f_teid_ipv6,
+        {"F-TEID IPv6", "gtpv2.f_teid_ipv6",
+        FT_IPv6, BASE_NONE, NULL, 0x0,
+        NULL, HFILL}
+        },
+        {&hf_gtpv2_delay_value,
+        {"Delay Value (In integer multiples of 50 milliseconds or zero)", "gtpv2.delay_value",
+        FT_UINT8, BASE_DEC, NULL, 0x0,
+        NULL, HFILL}
+        },
+        {&hf_gtpv2_charging_id,
+        {"Charging id", "gtpv2.charging_id",
+        FT_UINT32, BASE_DEC, NULL, 0x0,
+        NULL, HFILL}
+        },
+        {&hf_gtpv2_charging_characteristic,
+        {"Charging Characteristic", "gtpv2.charging_characteristic",
+        FT_UINT16, BASE_DEC, NULL, 0x0,
+        NULL, HFILL}
+        },
+        {&hf_gtpv2_bearer_flag,
+        {"Bearer Flags(PPC(Prohibit Payload Compression) True-SGSN attempts to compress the payload, False-SGSN doesn't attempt to compress the payload)",
+        "gtpv2.bearer_flag",
+        FT_BOOLEAN, 8, NULL, 0x01,
+        NULL, HFILL}
+        },
+        {&hf_gtpv2_pti,
+        {"Procedure Transaction Id", "gtpv2.pti",
+        FT_UINT8, BASE_DEC, NULL, 0x0,
+        NULL, HFILL}
+        },
+        {&hf_gtpv2_ue_time_zone,
+        {"Time Zone","gtpv2.ue_time_zone",
+        FT_UINT8, BASE_DEC, NULL,0x0,
+        NULL, HFILL}
+        },
+        {&hf_gtpv2_ue_time_zone_dst,
+        {"Daylight Saving Time","gtpv2.ue_time_zone_dst",
+        FT_UINT8, BASE_DEC, VALS(gtpv2_ue_time_zone_dst_vals),0x03,
+        NULL, HFILL}
+        },
+        {&hf_gtpv2_apn_rest,
+        {"APN Restriction", "gtpv2.apn_rest",
+        FT_UINT8, BASE_DEC, NULL, 0x0,
+        NULL, HFILL}
+        },
+        {&hf_gtpv2_selec_mode,
+        {"Selection Mode","gtpv2.selec_mode",
+        FT_UINT8, BASE_DEC, VALS(gtpv2_selec_mode_vals),0x03,
+        NULL, HFILL}
+        },
+        {&hf_gtpv2_bearer_control_mode,
+        {"Bearer Control Mode","gtpv2.bearer_control_mode",
+        FT_UINT8, BASE_DEC, VALS(gtpv2_bearer_control_mode_vals),0x0,
+        NULL, HFILL}
+        },
+        { &hf_gtpv2_cng_rep_act,
+        {"Change Reporting Action", "gtpv2.cng_rep_act",
+        FT_UINT8, BASE_DEC, VALS(gtpv2_cng_rep_act_vals), 0x0,
+        NULL, HFILL}
+        },
+        { &hf_gtpv2_node_type,
+        {"Node Type", "gtpv2.node_type",
+        FT_UINT8, BASE_DEC, VALS(gtpv2_node_type_vals), 0x0,
+        NULL, HFILL}
+        },
+        { &hf_gtpv2_address_digits,
+            { "Address digits", "gtpv2.address_digits",
+            FT_STRING, BASE_NONE, NULL, 0,
+            NULL, HFILL }
+        },
+
+     };
 
     static gint *ett_gtpv2_array[] = {
-               &ett_gtpv2,
-               &ett_gtpv2_flags,
-               &ett_gtpv2_ie,
-               &ett_gtpv2_bearer_ctx,
+        &ett_gtpv2,
+        &ett_gtpv2_flags,
+        &ett_gtpv2_ie,
+        &ett_gtpv2_bearer_ctx,
     };
 
-       proto_gtpv2 = proto_register_protocol("GPRS Tunneling Protocol V2", "GTPv2", "gtpv2");
+    proto_gtpv2 = proto_register_protocol("GPRS Tunneling Protocol V2", "GTPv2", "gtpv2");
     proto_register_field_array(proto_gtpv2, hf_gtpv2, array_length(hf_gtpv2));
     proto_register_subtree_array(ett_gtpv2_array, array_length(ett_gtpv2_array));
 
-       register_dissector("gtpv2", dissect_gtpv2, proto_gtpv2);
+    register_dissector("gtpv2", dissect_gtpv2, proto_gtpv2);
 }
 
-/* The registration hand-off routine */
-void
-proto_reg_handoff_gtpv2(void)
-{
-
-  
-}
index f052e20990790636674aba225e50a5b7a47a53e0..5a508de458aecc19b39e0e52f92c43ebf23ed7ca 100644 (file)
  * modify it under the terms of the GNU General Public License
  * as published by the Free Software Foundation; either version 2
  * of the License, or (at your option) any later version.
- * 
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -276,7 +276,7 @@ static const value_string isns_function_ids[] = {
 static const value_string isns_entity_protocol[] = {
     {ISNS_ENTITY_PROTOCOL_NO_PROTOCOL, "No Protocol"},
     {ISNS_ENTITY_PROTOCOL_ISCSI,       "iSCSI"},
-    {ISNS_ENTITY_PROTOCOL_IFCP,        "iFCP"}, 
+    {ISNS_ENTITY_PROTOCOL_IFCP,        "iFCP"},
 
     {0x0,NULL},
 };
@@ -306,7 +306,7 @@ static const value_string isns_errorcode[] = {
     {21,"ESI Not Available"},
     {22,"Invalid Deregistration"},
     {23,"Registration Feature Not Supported"},
-       
+
     {0x0,NULL}
 };
 
@@ -562,29 +562,29 @@ dissect_isns_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     /* Set up structures needed to add the protocol subtree and manage it */
     proto_item *ti = NULL;
     proto_tree *isns_tree = NULL;
-    
+
     /* Make entries in Protocol column and Info column on summary display */
     col_set_str(pinfo->cinfo, COL_PROTOCOL, "iSNS");
     col_clear(pinfo->cinfo, COL_INFO);
 
-    /* Get the protocol version - only version one at the moment*/ 
+    /* Get the protocol version - only version one at the moment*/
     isns_protocol_version = tvb_get_ntohs(tvb, offset + 0);
-    
+
     /* Get the function id from the packet */
     function_id =  tvb_get_ntohs(tvb, offset + 2);
-    
+
     /* Add the function name in the info col */
-    if (check_col(pinfo->cinfo, COL_INFO)) 
+    if (check_col(pinfo->cinfo, COL_INFO))
        col_add_str(pinfo->cinfo, COL_INFO,
                    val_to_str(function_id, isns_function_ids,
                               "Unknown function ID 0x%04x"));
-    
+
     /* In the interest of speed, if "tree" is NULL, don't do any work not
-     * necessary to generate protocol tree items. 
+     * necessary to generate protocol tree items.
      */
     if (tree) {
-       guint16 b;      
-       guint16 flags;  
+       guint16 b;
+       guint16 flags;
        proto_tree *tt;
        proto_item *tflags;
        proto_item *tpayload;
@@ -594,7 +594,7 @@ dissect_isns_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
         * display window when the line in the protocol tree display
         * corresponding to that item is selected.
         *  tvb_length(tvb) is a handy way to highlight all data from the offset to
-        *  the end of the packet. 
+        *  the end of the packet.
         */
 
        /* create display subtree for the protocol */
@@ -690,7 +690,7 @@ dissect_isns_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        }
        case ISNS_FUNC_DEVATTRREG:
        case ISNS_FUNC_DEVATTRQRY:
-       case ISNS_FUNC_DEVGETNEXT: 
+       case ISNS_FUNC_DEVGETNEXT:
        case ISNS_FUNC_DEREGDEV:
        case ISNS_FUNC_SCNREG:
        case ISNS_FUNC_SCNDEREG:
@@ -732,247 +732,247 @@ get_isns_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset)
 
 static int
 dissect_isns_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
-{      
-       gint length = tvb_length(tvb);
-       guint16 isns_protocol_version;
-       guint16 function_id;
-
-       if (length < ISNS_HEADER_SIZE) {
-               /*
-                * Not enough room to see if this is valid iSNS.
-                */
-               return 0;
-       }
+{
+    gint length = tvb_length(tvb);
+    guint16 isns_protocol_version;
+    guint16 function_id;
+
+    if (length < ISNS_HEADER_SIZE) {
+        /*
+         * Not enough room to see if this is valid iSNS.
+         */
+        return 0;
+    }
 
-       /* Get the protocol version - only version one at the moment*/ 
-       isns_protocol_version = tvb_get_ntohs(tvb, 0);
-       if (isns_protocol_version != ISNS_PROTO_VER)
-               return 0;
+    /* Get the protocol version - only version one at the moment*/
+    isns_protocol_version = tvb_get_ntohs(tvb, 0);
+    if (isns_protocol_version != ISNS_PROTO_VER)
+        return 0;
 
-       /* Get the function id from the packet */
-       function_id =  tvb_get_ntohs(tvb, 2);
-       if (match_strval(function_id, isns_function_ids) == NULL) {
-               /* Unknown function ID */
-               return 0;
-       }
+    /* Get the function id from the packet */
+    function_id =  tvb_get_ntohs(tvb, 2);
+    if (match_strval(function_id, isns_function_ids) == NULL) {
+        /* Unknown function ID */
+        return 0;
+    }
 
-       tcp_dissect_pdus(tvb, pinfo, tree, isns_desegment, 12, get_isns_pdu_len,
-               dissect_isns_pdu);
-       return length;
+    tcp_dissect_pdus(tvb, pinfo, tree, isns_desegment, 12, get_isns_pdu_len,
+                     dissect_isns_pdu);
+    return length;
 }
 
 static int
 dissect_isns_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
-{      
-       gint length = tvb_length(tvb);
-       guint16 isns_protocol_version;
-       guint16 function_id;
-
-       if (length < ISNS_HEADER_SIZE) {
-               /*
-                * Not enough room to see if this is valid iSNS.
-                */
-               return 0;
-       }
+{
+    gint length = tvb_length(tvb);
+    guint16 isns_protocol_version;
+    guint16 function_id;
 
-       /* Get the protocol version - only version one at the moment*/ 
-       isns_protocol_version = tvb_get_ntohs(tvb, 0);
-       if (isns_protocol_version != ISNS_PROTO_VER)
-               return 0;
+    if (length < ISNS_HEADER_SIZE) {
+        /*
+         * Not enough room to see if this is valid iSNS.
+         */
+        return 0;
+    }
 
-       /* Get the function id from the packet */
-       function_id =  tvb_get_ntohs(tvb, 2);
-       if (match_strval(function_id, isns_function_ids) == NULL) {
-               /* Unknown function ID */
-               return 0;
-       }
+    /* Get the protocol version - only version one at the moment*/
+    isns_protocol_version = tvb_get_ntohs(tvb, 0);
+    if (isns_protocol_version != ISNS_PROTO_VER)
+        return 0;
 
-       dissect_isns_pdu(tvb, pinfo, tree);
-       return length;
+    /* Get the function id from the packet */
+    function_id =  tvb_get_ntohs(tvb, 2);
+    if (match_strval(function_id, isns_function_ids) == NULL) {
+        /* Unknown function ID */
+        return 0;
+    }
+
+    dissect_isns_pdu(tvb, pinfo, tree);
+    return length;
 }
 
 
 static guint
 dissect_isns_attr_ip_address(tvbuff_t *tvb, guint offset, proto_tree *parent_tree, int hf_index, guint32 tag, guint32 len)
 {
-       proto_item *item=NULL;
-       proto_tree *tree=NULL;
+    proto_item *item=NULL;
+    proto_tree *tree=NULL;
 
-       if(parent_tree){
-               item=proto_tree_add_item(parent_tree, hf_index, tvb, offset + 8, len, FALSE);
-               tree = proto_item_add_subtree(item, ett_isns_attribute);
-       }
+    if(parent_tree){
+        item=proto_tree_add_item(parent_tree, hf_index, tvb, offset + 8, len, FALSE);
+        tree = proto_item_add_subtree(item, ett_isns_attribute);
+    }
 
-       proto_tree_add_uint(tree, hf_isns_attr_tag, tvb, offset, 4, tag);
-       proto_tree_add_uint(tree, hf_isns_attr_len, tvb, offset+4, 4, len);
+    proto_tree_add_uint(tree, hf_isns_attr_tag, tvb, offset, 4, tag);
+    proto_tree_add_uint(tree, hf_isns_attr_len, tvb, offset+4, 4, len);
 
-       return offset+8+len;
+    return offset+8+len;
 }
 
 static guint
 dissect_isns_attr_string(tvbuff_t *tvb, guint offset, proto_tree *parent_tree, int hf_index, guint32 tag, guint32 len)
 {
-       proto_item *item=NULL;
-       proto_tree *tree=NULL;
+    proto_item *item=NULL;
+    proto_tree *tree=NULL;
 
-       if(parent_tree){
-               item=proto_tree_add_item(parent_tree, hf_index, tvb, offset + 8, len, FALSE);
-               tree = proto_item_add_subtree(item, ett_isns_attribute);
-       }
+    if(parent_tree){
+        item=proto_tree_add_item(parent_tree, hf_index, tvb, offset + 8, len, FALSE);
+        tree = proto_item_add_subtree(item, ett_isns_attribute);
+    }
 
-       proto_tree_add_uint(tree, hf_isns_attr_tag, tvb, offset, 4, tag);
-       proto_tree_add_uint(tree, hf_isns_attr_len, tvb, offset+4, 4, len);
+    proto_tree_add_uint(tree, hf_isns_attr_tag, tvb, offset, 4, tag);
+    proto_tree_add_uint(tree, hf_isns_attr_len, tvb, offset+4, 4, len);
 
-       return offset+8+len;
+    return offset+8+len;
 }
 
 static guint
 dissect_isns_attr_integer(tvbuff_t *tvb, guint offset, proto_tree *parent_tree, int hf_index, guint32 tag, guint32 len, guint16 function_id)
 {
-       proto_item *item=NULL;
-       proto_tree *tree=NULL;
-
-       /*
-        * 5.6.5.1
-        * in a DevAttrReg , the PGT (tag 51) may be sent as 0 length
-        * which then means that we wish to register the portal group tag
-        * as NULL.
-        * (At least) some servers will respond with PGT as a 0 length 
-        * value in these instances in the DevAttrRegRsp (eventhough I can
-        * not find this mentioned in the standard) so allow it for the 
-        * response as well.
-        */
-       if(len){
-               if(parent_tree){
-                       item=proto_tree_add_item(parent_tree, hf_index, tvb, offset + 8, len, FALSE);
-                       tree = proto_item_add_subtree(item, ett_isns_attribute);
-               }
-       } else if((tag==ISNS_ATTR_TAG_PORTAL_GROUP_TAG)&&((function_id==ISNS_FUNC_DEVATTRREG)||(function_id==ISNS_FUNC_RSP_DEVATTRREG))){
-               /* 5.6.5.1 */
-               if(parent_tree){
-                       item=proto_tree_add_uint_format(parent_tree, hf_isns_portal_group_tag, tvb, offset, 8, 0, "PG Tag: <NULL>");
-                       tree = proto_item_add_subtree(item, ett_isns_attribute);
-               }
-       } else {
-               if(parent_tree){
-                       item=proto_tree_add_text(parent_tree, tvb, offset, 8, "Oops, you surprised me here. a 0 byte integer.");
-                       tree = proto_item_add_subtree(item, ett_isns_attribute);
-               }
-       }
+    proto_item *item=NULL;
+    proto_tree *tree=NULL;
+
+    /*
+     * 5.6.5.1
+     * in a DevAttrReg , the PGT (tag 51) may be sent as 0 length
+     * which then means that we wish to register the portal group tag
+     * as NULL.
+     * (At least) some servers will respond with PGT as a 0 length
+     * value in these instances in the DevAttrRegRsp (eventhough I can
+     * not find this mentioned in the standard) so allow it for the
+     * response as well.
+     */
+    if(len){
+        if(parent_tree){
+            item=proto_tree_add_item(parent_tree, hf_index, tvb, offset + 8, len, FALSE);
+            tree = proto_item_add_subtree(item, ett_isns_attribute);
+        }
+    } else if((tag==ISNS_ATTR_TAG_PORTAL_GROUP_TAG)&&((function_id==ISNS_FUNC_DEVATTRREG)||(function_id==ISNS_FUNC_RSP_DEVATTRREG))){
+        /* 5.6.5.1 */
+        if(parent_tree){
+            item=proto_tree_add_uint_format(parent_tree, hf_isns_portal_group_tag, tvb, offset, 8, 0, "PG Tag: <NULL>");
+            tree = proto_item_add_subtree(item, ett_isns_attribute);
+        }
+    } else {
+        if(parent_tree){
+            item=proto_tree_add_text(parent_tree, tvb, offset, 8, "Oops, you surprised me here. a 0 byte integer.");
+            tree = proto_item_add_subtree(item, ett_isns_attribute);
+        }
+    }
 
-       proto_tree_add_uint(tree, hf_isns_attr_tag, tvb, offset, 4, tag);
-       proto_tree_add_uint(tree, hf_isns_attr_len, tvb, offset+4, 4, len);
+    proto_tree_add_uint(tree, hf_isns_attr_tag, tvb, offset, 4, tag);
+    proto_tree_add_uint(tree, hf_isns_attr_len, tvb, offset+4, 4, len);
 
-       return offset+8+len;
+    return offset+8+len;
 }
 
 static guint
 dissect_isns_attr_port(tvbuff_t *tvb, guint offset, proto_tree *parent_tree, int hf_index, guint32 tag, guint32 len,
                        guint16 isns_port_type, packet_info *pinfo)
 {
-       proto_item *tree=NULL;
-       proto_item *item=NULL;
-       guint16 port = tvb_get_ntohs(tvb, offset + 10);
-       guint16 isudp = tvb_get_ntohs(tvb, offset + 8)&0x01;
-        conversation_t *conversation;
-
-       if(parent_tree){
-            item = proto_tree_add_uint(parent_tree, hf_index, tvb, offset+8, 4, port);
-            tree = proto_item_add_subtree(item, ett_isns_port);
-       }
+    proto_item *tree=NULL;
+    proto_item *item=NULL;
+    guint16 port = tvb_get_ntohs(tvb, offset + 10);
+    guint16 isudp = tvb_get_ntohs(tvb, offset + 8)&0x01;
+    conversation_t *conversation;
+
+    if(parent_tree){
+        item = proto_tree_add_uint(parent_tree, hf_index, tvb, offset+8, 4, port);
+        tree = proto_item_add_subtree(item, ett_isns_port);
+    }
 
-       proto_tree_add_boolean(tree, hf_isns_port_type, tvb, offset+8, 2, isudp);
+    proto_tree_add_boolean(tree, hf_isns_port_type, tvb, offset+8, 2, isudp);
 
-       proto_tree_add_uint(tree, hf_isns_attr_tag, tvb, offset, 4, tag);
-       proto_tree_add_uint(tree, hf_isns_attr_len, tvb, offset+4, 4, len);
+    proto_tree_add_uint(tree, hf_isns_attr_tag, tvb, offset, 4, tag);
+    proto_tree_add_uint(tree, hf_isns_attr_len, tvb, offset+4, 4, len);
 
-        if ((isns_port_type == ISNS_ESI_PORT) || (isns_port_type == ISNS_SCN_PORT)) {
-            if (isudp) {
-                conversation = find_conversation (pinfo->fd->num, &pinfo->src, &pinfo->dst, PT_UDP,
-                                                  port, 0, NO_PORT_B);
-                if (conversation == NULL) {
-                    conversation = conversation_new (pinfo->fd->num, &pinfo->src, &pinfo->dst,
-                                                     PT_UDP, port, 0, NO_PORT2_FORCE);
-                    conversation_set_dissector (conversation, isns_udp_handle);
-                }
+    if ((isns_port_type == ISNS_ESI_PORT) || (isns_port_type == ISNS_SCN_PORT)) {
+        if (isudp) {
+            conversation = find_conversation (pinfo->fd->num, &pinfo->src, &pinfo->dst, PT_UDP,
+                                              port, 0, NO_PORT_B);
+            if (conversation == NULL) {
+                conversation = conversation_new (pinfo->fd->num, &pinfo->src, &pinfo->dst,
+                                                 PT_UDP, port, 0, NO_PORT2_FORCE);
+                conversation_set_dissector (conversation, isns_udp_handle);
             }
-            else {
-                conversation = find_conversation (pinfo->fd->num, &pinfo->src, &pinfo->dst, PT_TCP,
-                                                  port, 0, NO_PORT_B);
-                if (conversation == NULL) {
-                    conversation = conversation_new (pinfo->fd->num, &pinfo->src, &pinfo->dst,
-                                                     PT_TCP, port, 0, NO_PORT2_FORCE);
-                    conversation_set_dissector (conversation, isns_tcp_handle);
-                }
+        }
+        else {
+            conversation = find_conversation (pinfo->fd->num, &pinfo->src, &pinfo->dst, PT_TCP,
+                                              port, 0, NO_PORT_B);
+            if (conversation == NULL) {
+                conversation = conversation_new (pinfo->fd->num, &pinfo->src, &pinfo->dst,
+                                                 PT_TCP, port, 0, NO_PORT2_FORCE);
+                conversation_set_dissector (conversation, isns_tcp_handle);
             }
         }
+    }
 
-       return offset+8+len;
+    return offset+8+len;
 }
 
 static guint
 dissect_isns_attr_none(tvbuff_t *tvb, guint offset, proto_tree *parent_tree, int hf_index, guint32 tag, guint32 len)
 {
-       proto_item *tree=NULL;
-       proto_item *item=NULL;
+    proto_item *tree=NULL;
+    proto_item *item=NULL;
 
-       if(parent_tree){
-               item=proto_tree_add_item(parent_tree, hf_index, tvb, offset, 8, FALSE);
-               tree = proto_item_add_subtree(item, ett_isns_port);
-       }
+    if(parent_tree){
+        item=proto_tree_add_item(parent_tree, hf_index, tvb, offset, 8, FALSE);
+        tree = proto_item_add_subtree(item, ett_isns_port);
+    }
 
-       proto_tree_add_uint(tree, hf_isns_attr_tag, tvb, offset, 4, tag);
-       proto_tree_add_uint(tree, hf_isns_attr_len, tvb, offset+4, 4, len);
+    proto_tree_add_uint(tree, hf_isns_attr_tag, tvb, offset, 4, tag);
+    proto_tree_add_uint(tree, hf_isns_attr_len, tvb, offset+4, 4, len);
 
-       return offset+8+len;
+    return offset+8+len;
 }
 
 static guint
 dissect_isns_attr_not_decoded_yet(tvbuff_t *tvb, guint offset, proto_tree *parent_tree, int hf_index, guint32 tag, guint32 len)
 {
-       proto_item *tree=NULL;
-       proto_item *item=NULL;
+    proto_item *tree=NULL;
+    proto_item *item=NULL;
 
-       if(parent_tree){
-               item=proto_tree_add_item(parent_tree, hf_index, tvb, offset + 8, len, FALSE);
-               tree = proto_item_add_subtree(item, ett_isns_port);
-       }
+    if(parent_tree){
+        item=proto_tree_add_item(parent_tree, hf_index, tvb, offset + 8, len, FALSE);
+        tree = proto_item_add_subtree(item, ett_isns_port);
+    }
 
-       proto_tree_add_uint(tree, hf_isns_attr_tag, tvb, offset, 4, tag);
-       proto_tree_add_uint(tree, hf_isns_attr_len, tvb, offset+4, 4, len);
+    proto_tree_add_uint(tree, hf_isns_attr_tag, tvb, offset, 4, tag);
+    proto_tree_add_uint(tree, hf_isns_attr_len, tvb, offset+4, 4, len);
 
-       return offset+8+len;
+    return offset+8+len;
 }
 
 static guint
 dissect_isns_attr_iscsi_node_type(tvbuff_t *tvb, guint offset, proto_tree *parent_tree, int hf_index, guint32 tag, guint32 len)
 {
-       proto_item *item=NULL;
-       proto_tree *tree=NULL;
-       guint32 node_type=tvb_get_ntohl(tvb, offset + 8);
+    proto_item *item=NULL;
+    proto_tree *tree=NULL;
+    guint32 node_type=tvb_get_ntohl(tvb, offset + 8);
 
-       if(parent_tree){
-               item=proto_tree_add_item(parent_tree, hf_index, tvb, offset + 8, len, FALSE);
-               tree = proto_item_add_subtree(item, ett_isns_attribute);
-       }
+    if(parent_tree){
+        item=proto_tree_add_item(parent_tree, hf_index, tvb, offset + 8, len, FALSE);
+        tree = proto_item_add_subtree(item, ett_isns_attribute);
+    }
 
-       proto_tree_add_boolean(tree, hf_isns_isnt_control,   tvb, offset+8, 4, node_type);
-       if(node_type&0x00000004){
-               proto_item_append_text(item, " Control");
-       }
-       proto_tree_add_boolean(tree, hf_isns_isnt_initiator, tvb, offset+8, 4, node_type);
-       if(node_type&0x00000002){
-               proto_item_append_text(item, " Initiator");
-       }
-       proto_tree_add_boolean(tree, hf_isns_isnt_target,    tvb, offset+8, 4, node_type);
-       if(node_type&0x00000001){
-               proto_item_append_text(item, " Target");
-       }
+    proto_tree_add_boolean(tree, hf_isns_isnt_control,   tvb, offset+8, 4, node_type);
+    if(node_type&0x00000004){
+        proto_item_append_text(item, " Control");
+    }
+    proto_tree_add_boolean(tree, hf_isns_isnt_initiator, tvb, offset+8, 4, node_type);
+    if(node_type&0x00000002){
+        proto_item_append_text(item, " Initiator");
+    }
+    proto_tree_add_boolean(tree, hf_isns_isnt_target,    tvb, offset+8, 4, node_type);
+    if(node_type&0x00000001){
+        proto_item_append_text(item, " Target");
+    }
 
-       proto_tree_add_uint(tree, hf_isns_attr_tag, tvb, offset, 4, tag);
-       proto_tree_add_uint(tree, hf_isns_attr_len, tvb, offset+4, 4, len);
+    proto_tree_add_uint(tree, hf_isns_attr_tag, tvb, offset, 4, tag);
+    proto_tree_add_uint(tree, hf_isns_attr_len, tvb, offset+4, 4, len);
 
-       return offset+8+len;
+    return offset+8+len;
 }
 
 
@@ -980,27 +980,27 @@ dissect_isns_attr_iscsi_node_type(tvbuff_t *tvb, guint offset, proto_tree *paren
 static guint
 dissect_isns_attr_portal_security_bitmap(tvbuff_t *tvb, guint offset, proto_tree *parent_tree, int hf_index, guint32 tag, guint32 len)
 {
-       proto_item *item=NULL;
-       proto_tree *tree=NULL;
-       guint32 psb=tvb_get_ntohl(tvb, offset + 8);
+    proto_item *item=NULL;
+    proto_tree *tree=NULL;
+    guint32 psb=tvb_get_ntohl(tvb, offset + 8);
 
-       if(parent_tree){
-               item=proto_tree_add_item(parent_tree, hf_index, tvb, offset + 8, len, FALSE);
-               tree = proto_item_add_subtree(item, ett_isns_attribute);
-       }
+    if(parent_tree){
+        item=proto_tree_add_item(parent_tree, hf_index, tvb, offset + 8, len, FALSE);
+        tree = proto_item_add_subtree(item, ett_isns_attribute);
+    }
 
-       proto_tree_add_boolean(tree, hf_isns_psb_tunnel_mode,     tvb, offset+8, 4, psb);
-       proto_tree_add_boolean(tree, hf_isns_psb_transport_mode,  tvb, offset+8, 4, psb);
-       proto_tree_add_boolean(tree, hf_isns_psb_pfs,             tvb, offset+8, 4, psb);
-       proto_tree_add_boolean(tree, hf_isns_psb_aggressive_mode, tvb, offset+8, 4, psb);
-       proto_tree_add_boolean(tree, hf_isns_psb_main_mode,       tvb, offset+8, 4, psb);
-       proto_tree_add_boolean(tree, hf_isns_psb_ike_ipsec,       tvb, offset+8, 4, psb);
-       proto_tree_add_boolean(tree, hf_isns_psb_bitmap,          tvb, offset+8, 4, psb);
+    proto_tree_add_boolean(tree, hf_isns_psb_tunnel_mode,     tvb, offset+8, 4, psb);
+    proto_tree_add_boolean(tree, hf_isns_psb_transport_mode,  tvb, offset+8, 4, psb);
+    proto_tree_add_boolean(tree, hf_isns_psb_pfs,             tvb, offset+8, 4, psb);
+    proto_tree_add_boolean(tree, hf_isns_psb_aggressive_mode, tvb, offset+8, 4, psb);
+    proto_tree_add_boolean(tree, hf_isns_psb_main_mode,       tvb, offset+8, 4, psb);
+    proto_tree_add_boolean(tree, hf_isns_psb_ike_ipsec,       tvb, offset+8, 4, psb);
+    proto_tree_add_boolean(tree, hf_isns_psb_bitmap,          tvb, offset+8, 4, psb);
 
-       proto_tree_add_uint(tree, hf_isns_attr_tag, tvb, offset, 4, tag);
-       proto_tree_add_uint(tree, hf_isns_attr_len, tvb, offset+4, 4, len);
+    proto_tree_add_uint(tree, hf_isns_attr_tag, tvb, offset, 4, tag);
+    proto_tree_add_uint(tree, hf_isns_attr_len, tvb, offset+4, 4, len);
 
-       return offset+8+len;
+    return offset+8+len;
 }
 
 
@@ -1008,39 +1008,39 @@ dissect_isns_attr_portal_security_bitmap(tvbuff_t *tvb, guint offset, proto_tree
 static guint
 dissect_isns_attr_scn_bitmap(tvbuff_t *tvb, guint offset, proto_tree *parent_tree, int hf_index, guint32 tag, guint32 len)
 {
-       proto_item *item=NULL;
-       proto_tree *tree=NULL;
-       guint32 scn_bitmap=tvb_get_ntohl(tvb, offset + 8);
+    proto_item *item=NULL;
+    proto_tree *tree=NULL;
+    guint32 scn_bitmap=tvb_get_ntohl(tvb, offset + 8);
 
-       if(parent_tree){
-               item=proto_tree_add_item(parent_tree, hf_index, tvb, offset + 8, len, FALSE);
-               tree = proto_item_add_subtree(item, ett_isns_attribute);
-       }
+    if(parent_tree){
+        item=proto_tree_add_item(parent_tree, hf_index, tvb, offset + 8, len, FALSE);
+        tree = proto_item_add_subtree(item, ett_isns_attribute);
+    }
 
 
-       /*
-        24              INITIATOR AND SELF INFORMATION ONLY 
-        25              TARGET AND SELF INFORMATION ONLY  
-        26              MANAGEMENT REGISTRATION/SCN 
-        27              OBJECT REMOVED 
-        28              OBJECT ADDED 
-        29              OBJECT UPDATED 
-        30              DD/DDS MEMBER REMOVED (Mgmt Reg/SCN only) 
-        31 (Lsb)        DD/DDS MEMBER ADDED (Mgmt Reg/SCN only) 
-       */
-       proto_tree_add_boolean(tree, hf_isns_scn_bitmap_initiator_and_self_information_only, tvb, offset+8, 4, scn_bitmap);
-       proto_tree_add_boolean(tree, hf_isns_scn_bitmap_target_and_self_information_only,    tvb, offset+8, 4, scn_bitmap);
-       proto_tree_add_boolean(tree, hf_isns_scn_bitmap_management_registration_scn,         tvb, offset+8, 4, scn_bitmap);
-       proto_tree_add_boolean(tree, hf_isns_scn_bitmap_object_removed,                      tvb, offset+8, 4, scn_bitmap);
-       proto_tree_add_boolean(tree, hf_isns_scn_bitmap_object_added,                        tvb, offset+8, 4, scn_bitmap);
-       proto_tree_add_boolean(tree, hf_isns_scn_bitmap_object_updated,                      tvb, offset+8, 4, scn_bitmap);
-       proto_tree_add_boolean(tree, hf_isns_scn_bitmap_dd_dds_member_removed,               tvb, offset+8, 4, scn_bitmap);
-       proto_tree_add_boolean(tree, hf_isns_scn_bitmap_dd_dds_member_added,                 tvb, offset+8, 4, scn_bitmap);
-
-       proto_tree_add_uint(tree, hf_isns_attr_tag, tvb, offset, 4, tag);
-       proto_tree_add_uint(tree, hf_isns_attr_len, tvb, offset+4, 4, len);
-
-       return offset+8+len;
+    /*
+      24              INITIATOR AND SELF INFORMATION ONLY
+      25              TARGET AND SELF INFORMATION ONLY
+      26              MANAGEMENT REGISTRATION/SCN
+      27              OBJECT REMOVED
+      28              OBJECT ADDED
+      29              OBJECT UPDATED
+      30              DD/DDS MEMBER REMOVED (Mgmt Reg/SCN only)
+      31 (Lsb)        DD/DDS MEMBER ADDED (Mgmt Reg/SCN only)
+    */
+    proto_tree_add_boolean(tree, hf_isns_scn_bitmap_initiator_and_self_information_only, tvb, offset+8, 4, scn_bitmap);
+    proto_tree_add_boolean(tree, hf_isns_scn_bitmap_target_and_self_information_only,    tvb, offset+8, 4, scn_bitmap);
+    proto_tree_add_boolean(tree, hf_isns_scn_bitmap_management_registration_scn,         tvb, offset+8, 4, scn_bitmap);
+    proto_tree_add_boolean(tree, hf_isns_scn_bitmap_object_removed,                      tvb, offset+8, 4, scn_bitmap);
+    proto_tree_add_boolean(tree, hf_isns_scn_bitmap_object_added,                        tvb, offset+8, 4, scn_bitmap);
+    proto_tree_add_boolean(tree, hf_isns_scn_bitmap_object_updated,                      tvb, offset+8, 4, scn_bitmap);
+    proto_tree_add_boolean(tree, hf_isns_scn_bitmap_dd_dds_member_removed,               tvb, offset+8, 4, scn_bitmap);
+    proto_tree_add_boolean(tree, hf_isns_scn_bitmap_dd_dds_member_added,                 tvb, offset+8, 4, scn_bitmap);
+
+    proto_tree_add_uint(tree, hf_isns_attr_tag, tvb, offset, 4, tag);
+    proto_tree_add_uint(tree, hf_isns_attr_len, tvb, offset+4, 4, len);
+
+    return offset+8+len;
 }
 
 
@@ -1066,7 +1066,7 @@ AddAttribute(packet_info *pinfo, tvbuff_t *tvb, proto_tree *tree, guint offset,
         }
         return (offset+8);
     }
-    
+
     tvb_ensure_bytes_exist(tvb, offset, len+8);
 
     switch( tag )
@@ -1078,30 +1078,30 @@ AddAttribute(packet_info *pinfo, tvbuff_t *tvb, proto_tree *tree, guint offset,
        dissect_isns_attr_string(tvb, offset, tree, hf_isns_entity_identifier, tag, len);
        break;
     case ISNS_ATTR_TAG_ENTITY_PROTOCOL:
-    if(len != 4) THROW(ReportedBoundsError);
+        if(len != 4) THROW(ReportedBoundsError);
        dissect_isns_attr_integer(tvb, offset, tree, hf_isns_entity_protocol, tag, len, function_id);
        break;
     case ISNS_ATTR_TAG_MGMT_IP_ADDRESS:
-    if(len != 16) THROW(ReportedBoundsError);
+        if(len != 16) THROW(ReportedBoundsError);
        dissect_isns_attr_ip_address(tvb, offset, tree, hf_isns_mgmt_ip_addr, tag, len);
        break;
     case ISNS_ATTR_TAG_TIMESTAMP:
-    if(len != 8) THROW(ReportedBoundsError);
+        if(len != 8) THROW(ReportedBoundsError);
        dissect_isns_attr_integer(tvb, offset, tree, hf_isns_timestamp, tag, len, function_id);
        break;
     case ISNS_ATTR_TAG_PROTOCOL_VERSION_RANGE:
        dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
        break;
     case ISNS_ATTR_TAG_REGISTRATION_PERIOD:
-    if(len != 4) THROW(ReportedBoundsError);
+        if(len != 4) THROW(ReportedBoundsError);
        dissect_isns_attr_integer(tvb, offset, tree, hf_isns_registration_period, tag, len, function_id);
        break;
     case ISNS_ATTR_TAG_ENTITY_INDEX:
-    if(len != 4) THROW(ReportedBoundsError);
+        if(len != 4) THROW(ReportedBoundsError);
        dissect_isns_attr_integer(tvb, offset, tree, hf_isns_entity_index, tag, len, function_id);
        break;
     case ISNS_ATTR_TAG_ENTITY_NEXT_INDEX:
-    if(len != 4) THROW(ReportedBoundsError);
+        if(len != 4) THROW(ReportedBoundsError);
        dissect_isns_attr_integer(tvb, offset, tree, hf_isns_entity_next_index, tag, len, function_id);
        break;
     case ISNS_ATTR_TAG_ENTITY_ISAKMP_PHASE_1:
@@ -1113,43 +1113,43 @@ AddAttribute(packet_info *pinfo, tvbuff_t *tvb, proto_tree *tree, guint offset,
     case ISNS_ATTR_TAG_PORTAL_IP_ADDRESS:
        switch(len){
        case 64:
-               proto_tree_add_text(tree, tvb, offset, -1, "Broken iSNS implementation. The PORTAL_IP_ADDRESS tag should be 16 bytes in length");
+            proto_tree_add_text(tree, tvb, offset, -1, "Broken iSNS implementation. The PORTAL_IP_ADDRESS tag should be 16 bytes in length");
        case 16:
-               dissect_isns_attr_ip_address(tvb, offset, tree, hf_isns_portal_ip_addr, tag, 16);
-               break;
+            dissect_isns_attr_ip_address(tvb, offset, tree, hf_isns_portal_ip_addr, tag, 16);
+            break;
        default:
-               THROW(ReportedBoundsError);
+            THROW(ReportedBoundsError);
        }
        break;
     case ISNS_ATTR_TAG_PORTAL_PORT:
-    if(len != 4) THROW(ReportedBoundsError);
+        if(len != 4) THROW(ReportedBoundsError);
        dissect_isns_attr_port(tvb, offset, tree, hf_isns_portal_port, tag, len, ISNS_OTHER_PORT, pinfo);
        break;
     case ISNS_ATTR_TAG_PORTAL_SYMBOLIC_NAME:
        dissect_isns_attr_string(tvb, offset, tree, hf_isns_portal_symbolic_name, tag, len);
        break;
     case ISNS_ATTR_TAG_ESI_INTERVAL:
-    if(len != 4) THROW(ReportedBoundsError);
+        if(len != 4) THROW(ReportedBoundsError);
        dissect_isns_attr_integer(tvb, offset, tree, hf_isns_esi_interval, tag, len, function_id);
        break;
     case ISNS_ATTR_TAG_ESI_PORT:
-    if(len != 4) THROW(ReportedBoundsError);
+        if(len != 4) THROW(ReportedBoundsError);
        dissect_isns_attr_port(tvb, offset, tree, hf_isns_esi_port, tag, len, ISNS_ESI_PORT, pinfo);
        break;
     case ISNS_ATTR_TAG_PORTAL_INDEX:
-    if(len != 4) THROW(ReportedBoundsError);
+        if(len != 4) THROW(ReportedBoundsError);
        dissect_isns_attr_integer(tvb, offset, tree, hf_isns_portal_index, tag, len, function_id);
        break;
     case ISNS_ATTR_TAG_SCN_PORT:
-    if(len != 4) THROW(ReportedBoundsError);
+        if(len != 4) THROW(ReportedBoundsError);
        dissect_isns_attr_port(tvb, offset, tree, hf_isns_scn_port, tag, len, ISNS_SCN_PORT, pinfo);
        break;
     case ISNS_ATTR_TAG_PORTAL_NEXT_INDEX:
-    if(len != 4) THROW(ReportedBoundsError);
+        if(len != 4) THROW(ReportedBoundsError);
        dissect_isns_attr_integer(tvb, offset, tree, hf_isns_portal_next_index, tag, len, function_id);
        break;
     case ISNS_ATTR_TAG_PORTAL_SECURITY_BITMAP:
-    if(len != 4) THROW(ReportedBoundsError);
+        if(len != 4) THROW(ReportedBoundsError);
        dissect_isns_attr_portal_security_bitmap(tvb, offset, tree, hf_isns_psb, tag, len);
        break;
     case ISNS_ATTR_TAG_PORTAL_ISAKMP_PHASE_1:
@@ -1165,26 +1165,26 @@ AddAttribute(packet_info *pinfo, tvbuff_t *tvb, proto_tree *tree, guint offset,
        dissect_isns_attr_string(tvb, offset, tree, hf_isns_iscsi_name, tag, len);
        break;
     case ISNS_ATTR_TAG_ISCSI_NODE_TYPE:
-    if(len != 4) THROW(ReportedBoundsError);
+        if(len != 4) THROW(ReportedBoundsError);
        dissect_isns_attr_iscsi_node_type(tvb, offset, tree, hf_isns_iscsi_node_type, tag, len);
        break;
     case ISNS_ATTR_TAG_ISCSI_ALIAS:
        dissect_isns_attr_string(tvb, offset, tree, hf_isns_iscsi_alias, tag, len);
        break;
     case ISNS_ATTR_TAG_ISCSI_SCN_BITMAP:
-    if(len != 4) THROW(ReportedBoundsError);
+        if(len != 4) THROW(ReportedBoundsError);
        dissect_isns_attr_scn_bitmap(tvb, offset, tree, hf_isns_scn_bitmap, tag, len);
        break;
     case ISNS_ATTR_TAG_ISCSI_NODE_INDEX:
-    if(len != 4) THROW(ReportedBoundsError);
+        if(len != 4) THROW(ReportedBoundsError);
        dissect_isns_attr_integer(tvb, offset, tree, hf_isns_node_index, tag, len, function_id);
        break;
     case ISNS_ATTR_TAG_WWNN_TOKEN:
-    if(len != 8) THROW(ReportedBoundsError);
+        if(len != 8) THROW(ReportedBoundsError);
        dissect_isns_attr_integer(tvb, offset, tree, hf_isns_wwnn_token, tag, len, function_id);
        break;
     case ISNS_ATTR_TAG_ISCSI_NODE_NEXT_INDEX:
-    if(len != 4) THROW(ReportedBoundsError);
+        if(len != 4) THROW(ReportedBoundsError);
        dissect_isns_attr_integer(tvb, offset, tree, hf_isns_node_next_index, tag, len, function_id);
        break;
     case ISNS_ATTR_TAG_ISCSI_AUTH_METHOD:
@@ -1196,64 +1196,64 @@ AddAttribute(packet_info *pinfo, tvbuff_t *tvb, proto_tree *tree, guint offset,
     case ISNS_ATTR_TAG_PG_PORTAL_IP_ADDR:
        switch(len){
        case 64:
-               proto_tree_add_text(tree, tvb, offset, -1, "Broken iSNS implementation. The PG_PORTAL_IP_ADDRESS tag should be 16 bytes in length");
+            proto_tree_add_text(tree, tvb, offset, -1, "Broken iSNS implementation. The PG_PORTAL_IP_ADDRESS tag should be 16 bytes in length");
        case 16:
-               dissect_isns_attr_ip_address(tvb, offset, tree, hf_isns_pg_portal_ip_addr, tag, 16);
-               break;
+            dissect_isns_attr_ip_address(tvb, offset, tree, hf_isns_pg_portal_ip_addr, tag, 16);
+            break;
        default:
-               THROW(ReportedBoundsError);
+            THROW(ReportedBoundsError);
        }
        break;
     case ISNS_ATTR_TAG_PG_PORTAL_PORT:
-    if(len != 4) THROW(ReportedBoundsError);
+        if(len != 4) THROW(ReportedBoundsError);
        dissect_isns_attr_port(tvb, offset, tree, hf_isns_pg_portal_port, tag, len, ISNS_OTHER_PORT, pinfo);
        break;
     case ISNS_ATTR_TAG_PORTAL_GROUP_TAG:
-    if(len != 4) THROW(ReportedBoundsError);
+        if(len != 4) THROW(ReportedBoundsError);
        dissect_isns_attr_integer(tvb, offset, tree, hf_isns_portal_group_tag, tag, len, function_id);
        break;
     case ISNS_ATTR_TAG_PORTAL_GROUP_INDEX:
-    if(len != 4) THROW(ReportedBoundsError);
+        if(len != 4) THROW(ReportedBoundsError);
        dissect_isns_attr_integer(tvb, offset, tree, hf_isns_pg_index, tag, len, function_id);
        break;
     case ISNS_ATTR_TAG_PORTAL_GROUP_NEXT_INDEX:
-    if(len != 4) THROW(ReportedBoundsError);
+        if(len != 4) THROW(ReportedBoundsError);
        dissect_isns_attr_integer(tvb, offset, tree, hf_isns_pg_next_index, tag, len, function_id);
        break;
     case ISNS_ATTR_TAG_FC_PORT_NAME_WWPN:
-    if(len != 8) THROW(ReportedBoundsError);
+        if(len != 8) THROW(ReportedBoundsError);
        dissect_isns_attr_integer(tvb, offset, tree, hf_isns_fc_port_name_wwpn, tag, len, function_id);
        break;
     case ISNS_ATTR_TAG_PORT_ID:
-    if(len != 3) THROW(ReportedBoundsError);
+        if(len != 3) THROW(ReportedBoundsError);
        dissect_isns_attr_integer(tvb, offset, tree, hf_isns_port_id, tag, len, function_id);
        break;
     case ISNS_ATTR_TAG_FC_PORT_TYPE:
        dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
        break;
        /*
-         0x0000           Unidentified/Null Entry 
-         0x0001           Fibre Channel N_Port 
-         0x0002           Fibre Channel NL_Port 
-         0x0003           Fibre Channel F/NL_Port 
-         0x0081           Fibre Channel F_Port 
-         0x0082           Fibre Channel FL_Port 
-         0x0084           Fibre Channel E_Port 
-         0xFF12           iFCP Port 
+         0x0000           Unidentified/Null Entry
+         0x0001           Fibre Channel N_Port
+         0x0002           Fibre Channel NL_Port
+         0x0003           Fibre Channel F/NL_Port
+         0x0081           Fibre Channel F_Port
+         0x0082           Fibre Channel FL_Port
+         0x0084           Fibre Channel E_Port
+         0xFF12           iFCP Port
        */
     case ISNS_ATTR_TAG_SYMBOLIC_PORT_NAME:
        dissect_isns_attr_string(tvb, offset, tree, hf_isns_symbolic_port_name, tag, len);
        break;
     case ISNS_ATTR_TAG_FABRIC_PORT_NAME:
-    if(len != 8) THROW(ReportedBoundsError);
+        if(len != 8) THROW(ReportedBoundsError);
        dissect_isns_attr_integer(tvb, offset, tree, hf_isns_fabric_port_name, tag, len, function_id);
        break;
     case ISNS_ATTR_TAG_HARD_ADDRESS:
-    if(len != 3) THROW(ReportedBoundsError);
+        if(len != 3) THROW(ReportedBoundsError);
        dissect_isns_attr_integer(tvb, offset, tree, hf_isns_hard_address, tag, len, function_id);
        break;
     case ISNS_ATTR_TAG_PORT_IP_ADDRESS:
-    if(len != 16) THROW(ReportedBoundsError);
+        if(len != 16) THROW(ReportedBoundsError);
        dissect_isns_attr_ip_address(tvb, offset, tree, hf_isns_port_ip_addr, tag, len);
        break;
     case ISNS_ATTR_TAG_CLASS_OF_SERVICE:
@@ -1289,12 +1289,12 @@ AddAttribute(packet_info *pinfo, tvbuff_t *tvb, proto_tree *tree, guint offset,
        dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
        break;
        /*
-         bit 29              Control 
-         bit 30              FCP Initiator 
-         bit 31 (Lsb)        FCP Target 
+         bit 29              Control
+         bit 30              FCP Initiator
+         bit 31 (Lsb)        FCP Target
        */
     case ISNS_ATTR_TAG_PERMANENT_PORT_NAME:
-    if(len != 8) THROW(ReportedBoundsError);
+        if(len != 8) THROW(ReportedBoundsError);
        dissect_isns_attr_integer(tvb, offset, tree, hf_isns_permanent_port_name, tag, len, function_id);
        break;
     case ISNS_ATTR_TAG_FC4_TYPE_CODE:
@@ -1302,44 +1302,44 @@ AddAttribute(packet_info *pinfo, tvbuff_t *tvb, proto_tree *tree, guint offset,
        break;
        /* 8bit type code in byte0 */
     case ISNS_ATTR_TAG_FC_NODE_NAME_WWNN:
-    if(len != 8) THROW(ReportedBoundsError);
+        if(len != 8) THROW(ReportedBoundsError);
        dissect_isns_attr_integer(tvb, offset, tree, hf_isns_fc_node_name_wwnn, tag, len, function_id);
        break;
     case ISNS_ATTR_TAG_SYMBOLIC_NODE_NAME:
        dissect_isns_attr_string(tvb, offset, tree, hf_isns_symbolic_node_name, tag, len);
        break;
     case ISNS_ATTR_TAG_NODE_IP_ADDRESS:
-    if(len != 16) THROW(ReportedBoundsError);
+        if(len != 16) THROW(ReportedBoundsError);
        dissect_isns_attr_ip_address(tvb, offset, tree, hf_isns_node_ip_addr, tag, len);
        break;
     case ISNS_ATTR_TAG_NODE_IPA:
-    if(len != 8) THROW(ReportedBoundsError);
+        if(len != 8) THROW(ReportedBoundsError);
        dissect_isns_attr_integer(tvb, offset, tree, hf_isns_node_ipa, tag, len, function_id);
        break;
     case ISNS_ATTR_TAG_PROXY_ISCSI_NAME:
        dissect_isns_attr_string(tvb, offset, tree, hf_isns_proxy_iscsi_name, tag, len);
        break;
     case ISNS_ATTR_TAG_SWITCH_NAME:
-    if(len != 8) THROW(ReportedBoundsError);
+        if(len != 8) THROW(ReportedBoundsError);
        dissect_isns_attr_integer(tvb, offset, tree, hf_isns_switch_name, tag, len, function_id);
        break;
     case ISNS_ATTR_TAG_PREFERRED_ID:
-    if(len != 4) THROW(ReportedBoundsError);
+        if(len != 4) THROW(ReportedBoundsError);
        dissect_isns_attr_integer(tvb, offset, tree, hf_isns_preferred_id, tag, len, function_id);
        break;
     case ISNS_ATTR_TAG_ASSIGNED_ID:
-    if(len != 4) THROW(ReportedBoundsError);
+        if(len != 4) THROW(ReportedBoundsError);
        dissect_isns_attr_integer(tvb, offset, tree, hf_isns_assigned_id, tag, len, function_id);
        break;
     case ISNS_ATTR_TAG_VIRTUAL_FABRIC_ID:
        dissect_isns_attr_string(tvb, offset, tree, hf_isns_virtual_fabric_id, tag, len);
        break;
     case ISNS_ATTR_TAG_VENDOR_OUI:
-    if(len != 4) THROW(ReportedBoundsError);
+        if(len != 4) THROW(ReportedBoundsError);
        dissect_isns_attr_integer(tvb, offset, tree, hf_isns_vendor_oui, tag, len, function_id);
        break;
     case ISNS_ATTR_TAG_DD_SET_ID:
-    if(len != 4) THROW(ReportedBoundsError);
+        if(len != 4) THROW(ReportedBoundsError);
        dissect_isns_attr_integer(tvb, offset, tree, hf_isns_dd_set_id, tag, len, function_id);
        break;
     case ISNS_ATTR_TAG_DD_SET_SYMBOLIC_NAME:
@@ -1349,52 +1349,52 @@ AddAttribute(packet_info *pinfo, tvbuff_t *tvb, proto_tree *tree, guint offset,
        dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
        break;
     case ISNS_ATTR_TAG_DD_SET_NEXT_ID:
-    if(len != 4) THROW(ReportedBoundsError);
+        if(len != 4) THROW(ReportedBoundsError);
        dissect_isns_attr_integer(tvb, offset, tree, hf_isns_dd_set_next_id, tag, len, function_id);
        break;
     case ISNS_ATTR_TAG_DD_ID:
-    if(len != 4) THROW(ReportedBoundsError);
+        if(len != 4) THROW(ReportedBoundsError);
        dissect_isns_attr_integer(tvb, offset, tree, hf_isns_dd_id, tag, len, function_id);
        break;
     case ISNS_ATTR_TAG_DD_SYMBOLIC_NAME:
        dissect_isns_attr_string(tvb, offset, tree, hf_isns_dd_symbolic_name, tag, len);
        break;
     case ISNS_ATTR_TAG_DD_MEMBER_ISCSI_INDEX:
-    if(len != 4) THROW(ReportedBoundsError);
+        if(len != 4) THROW(ReportedBoundsError);
        dissect_isns_attr_integer(tvb, offset, tree, hf_isns_member_iscsi_index, tag, len, function_id);
        break;
     case ISNS_ATTR_TAG_DD_MEMBER_ISCSI_NAME:
        dissect_isns_attr_string(tvb, offset, tree, hf_isns_dd_member_iscsi_name, tag, len);
        break;
     case ISNS_ATTR_TAG_DD_MEMBER_FC_PORT_NAME:
-    if(len != 4) THROW(ReportedBoundsError);
+        if(len != 4) THROW(ReportedBoundsError);
        dissect_isns_attr_integer(tvb, offset, tree, hf_isns_member_fc_port_name, tag, len, function_id);
        break;
     case ISNS_ATTR_TAG_DD_MEMBER_PORTAL_INDEX:
-    if(len != 4) THROW(ReportedBoundsError);
+        if(len != 4) THROW(ReportedBoundsError);
        dissect_isns_attr_integer(tvb, offset, tree, hf_isns_member_portal_index, tag, len, function_id);
        break;
     case ISNS_ATTR_TAG_DD_MEMBER_PORTAL_IP_ADDRESS:
-    if(len != 16) THROW(ReportedBoundsError);
+        if(len != 16) THROW(ReportedBoundsError);
        dissect_isns_attr_ip_address(tvb, offset, tree, hf_isns_dd_member_portal_ip_addr, tag, len);
        break;
     case ISNS_ATTR_TAG_DD_MEMBER_PORTAL_PORT:
-    if(len != 4) THROW(ReportedBoundsError);
+        if(len != 4) THROW(ReportedBoundsError);
        dissect_isns_attr_port(tvb, offset, tree, hf_isns_dd_member_portal_port,
-                                        tag, len, ISNS_OTHER_PORT, pinfo);
+                               tag, len, ISNS_OTHER_PORT, pinfo);
        break;
     case ISNS_ATTR_TAG_DD_FEATURES:
        dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
        break;
     case ISNS_ATTR_TAG_DD_ID_NEXT_ID:
-    if(len != 4) THROW(ReportedBoundsError);
+        if(len != 4) THROW(ReportedBoundsError);
        dissect_isns_attr_integer(tvb, offset, tree, hf_isns_dd_id_next_id, tag, len, function_id);
        break;
     default:
        dissect_isns_attr_not_decoded_yet(tvb, offset, tree, hf_isns_not_decoded_yet, tag, len);
     }
 
-    
+
     /* move on the offset to next attribute */
 
     return offset+len+8;
@@ -1415,12 +1415,12 @@ void proto_register_isns(void)
        /* The Header Stuff */
        { &hf_isns_version,
          { "iSNSP Version","isns.PVer",
-           FT_UINT16, BASE_DEC, NULL, 0,          
+           FT_UINT16, BASE_DEC, NULL, 0,
            "iSNS Protocol Version" ,HFILL}
        },
        { &hf_isns_function_id,
-         { "Function ID","isns.functionid",        
-           FT_UINT16, BASE_DEC,VALS(isns_function_ids),0,          
+         { "Function ID","isns.functionid",
+           FT_UINT16, BASE_DEC,VALS(isns_function_ids),0,
            "iSNS Function ID" ,HFILL}
        },
        { &hf_isns_pdu_length,
index 152e022a476d6804a9adc8b761efc38302ff8355..44d022a81ad95dfe237d2fc39802bea306d12863 100644 (file)
 #include <epan/in_cksum.h>
 #include "packet-pim.h"
 
-#define PIM_TYPE(x)    ((x) & 0x0f)
-#define PIM_VER(x)     (((x) & 0xf0) >> 4)
+#define PIM_TYPE(x)     ((x) & 0x0f)
+#define PIM_VER(x)      (((x) & 0xf0) >> 4)
 
 enum pimv2_addrtype {
-       pimv2_unicast, pimv2_group, pimv2_source
+    pimv2_unicast, pimv2_group, pimv2_source
 };
 
 static int proto_pim = -1;
@@ -59,7 +59,7 @@ static dissector_handle_t ipv6_handle;
 /*
  * For PIM v1, see
  *
- *     ftp://ftp.usc.edu/pub/csinfo/tech-reports/papers/95-599.ps.Z
+ *      ftp://ftp.usc.edu/pub/csinfo/tech-reports/papers/95-599.ps.Z
  */
 static const char *
 dissect_pimv1_addr(tvbuff_t *tvb, int offset) {
@@ -67,13 +67,13 @@ dissect_pimv1_addr(tvbuff_t *tvb, int offset) {
 
     flags_masklen = tvb_get_ntohs(tvb, offset);
     if (flags_masklen & 0x0180) {
-       return ep_strdup_printf("(%s%s%s) ",
-           flags_masklen & 0x0100 ? "S" : "",
-           flags_masklen & 0x0080 ? "W" : "",
-           flags_masklen & 0x0040 ? "R" : "");
+        return ep_strdup_printf("(%s%s%s) ",
+                                flags_masklen & 0x0100 ? "S" : "",
+                                flags_masklen & 0x0080 ? "W" : "",
+                                flags_masklen & 0x0040 ? "R" : "");
     } else {
-       return ep_strdup_printf("%s/%u",
-           ip_to_str(tvb_get_ptr(tvb, offset + 2, 4)), flags_masklen & 0x3f);
+        return ep_strdup_printf("%s/%u",
+                                ip_to_str(tvb_get_ptr(tvb, offset + 2, 4)), flags_masklen & 0x3f);
     }
 }
 
@@ -93,7 +93,7 @@ static const value_string type1vals[] = {
 /* This function is only called from the IGMP dissector */
 int
 dissect_pimv1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
-             int offset) {
+              int offset) {
     guint8 pim_type;
     guint8 pim_ver;
     guint length, pim_length;
@@ -105,44 +105,44 @@ dissect_pimv1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
     proto_item *tiopt;
 
     if (!proto_is_protocol_enabled(find_protocol_by_id(proto_pim))) {
-       /*
-        * We are not enabled; skip entire packet to be nice to the
-        * IGMP layer (so clicking on IGMP will display the data).
-        */
-       return offset+tvb_length_remaining(tvb, offset);
+        /*
+         * We are not enabled; skip entire packet to be nice to the
+         * IGMP layer (so clicking on IGMP will display the data).
+         */
+        return offset+tvb_length_remaining(tvb, offset);
     }
 
     col_set_str(pinfo->cinfo, COL_PROTOCOL, "PIMv1");
     col_clear(pinfo->cinfo, COL_INFO);
 
-       ti = proto_tree_add_item(tree, proto_pim, tvb, offset, -1, FALSE);
-       pim_tree = proto_item_add_subtree(ti, ett_pim);
+    ti = proto_tree_add_item(tree, proto_pim, tvb, offset, -1, FALSE);
+    pim_tree = proto_item_add_subtree(ti, ett_pim);
 
-       /* Put IGMP type, 0x14, into the tree */
-       proto_tree_add_text(pim_tree, tvb, offset, 1,
-           "Type: PIM (0x14)");
+    /* Put IGMP type, 0x14, into the tree */
+    proto_tree_add_text(pim_tree, tvb, offset, 1,
+                        "Type: PIM (0x14)");
     offset += 1;
 
     pim_type = tvb_get_guint8(tvb, offset);
     if (check_col(pinfo->cinfo, COL_INFO))
-       col_add_str(pinfo->cinfo, COL_INFO,
-           val_to_str(pim_type, type1vals, "Unknown (%u)"));
+        col_add_str(pinfo->cinfo, COL_INFO,
+                    val_to_str(pim_type, type1vals, "Unknown (%u)"));
 
-       proto_tree_add_uint(pim_tree, hf_pim_code, tvb, offset, 1, pim_type);
+    proto_tree_add_uint(pim_tree, hf_pim_code, tvb, offset, 1, pim_type);
     offset += 1;
 
     pim_cksum = tvb_get_ntohs(tvb, offset);
     pim_ver = PIM_VER(tvb_get_guint8(tvb, offset + 2));
     if (pim_ver != 1) {
-       /*
-        * Not PIMv1 - what gives?
-        */
-           proto_tree_add_uint(pim_tree, hf_pim_cksum, tvb,
-                   offset, 2, pim_cksum);
-
-       offset += 2;
-    proto_tree_add_item(pim_tree, hf_pim_version, tvb, offset, 1, FALSE);
-       return offset+tvb_length_remaining(tvb, offset);
+        /*
+         * Not PIMv1 - what gives?
+         */
+        proto_tree_add_uint(pim_tree, hf_pim_cksum, tvb,
+                            offset, 2, pim_cksum);
+
+        offset += 2;
+        proto_tree_add_item(pim_tree, hf_pim_version, tvb, offset, 1, FALSE);
+        return offset+tvb_length_remaining(tvb, offset);
     }
 
     /*
@@ -152,311 +152,311 @@ dissect_pimv1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
      */
     length = tvb_length(tvb);
     if (pim_type == 1) {
-       /*
-        * Register message - the PIM header is 8 bytes long.
-        * Also set the columns non-writable. Otherwise the IPv4 or
-        * IPv6 dissector for the encapsulated packet that caused
-        * this register will overwrite the PIM info in the columns.
-        */
-       pim_length = 8;
-       col_set_writable(pinfo->cinfo, FALSE);
+        /*
+         * Register message - the PIM header is 8 bytes long.
+         * Also set the columns non-writable. Otherwise the IPv4 or
+         * IPv6 dissector for the encapsulated packet that caused
+         * this register will overwrite the PIM info in the columns.
+         */
+        pim_length = 8;
+        col_set_writable(pinfo->cinfo, FALSE);
     } else {
-       /*
-        * Other message - checksum the entire packet.
-        */
-       pim_length = tvb_reported_length(tvb);
+        /*
+         * Other message - checksum the entire packet.
+         */
+        pim_length = tvb_reported_length(tvb);
     }
 
-       if (!pinfo->fragmented && length >= pim_length) {
-           /*
-            * The packet isn't part of a fragmented datagram and isn't
-            * truncated, so we can checksum it.
-            */
-           cksum_vec[0].ptr = tvb_get_ptr(tvb, 0, pim_length);
-           cksum_vec[0].len = pim_length;
-           computed_cksum = in_cksum(&cksum_vec[0], 1);
-           if (computed_cksum == 0) {
-               proto_tree_add_uint_format(pim_tree, hf_pim_cksum, tvb,
-                           offset, 2, pim_cksum,
-                           "Checksum: 0x%04x [correct]",
-                           pim_cksum);
-           } else {
-               proto_tree_add_uint_format(pim_tree, hf_pim_cksum, tvb,
-                           offset, 2, pim_cksum,
-                           "Checksum: 0x%04x [incorrect, should be 0x%04x]",
-                           pim_cksum, in_cksum_shouldbe(pim_cksum, computed_cksum));
-           }
-       } else {
-           proto_tree_add_uint(pim_tree, hf_pim_cksum, tvb,
-                   offset, 2, pim_cksum);
+    if (!pinfo->fragmented && length >= pim_length) {
+        /*
+         * The packet isn't part of a fragmented datagram and isn't
+         * truncated, so we can checksum it.
+         */
+        cksum_vec[0].ptr = tvb_get_ptr(tvb, 0, pim_length);
+        cksum_vec[0].len = pim_length;
+        computed_cksum = in_cksum(&cksum_vec[0], 1);
+        if (computed_cksum == 0) {
+            proto_tree_add_uint_format(pim_tree, hf_pim_cksum, tvb,
+                                       offset, 2, pim_cksum,
+                                       "Checksum: 0x%04x [correct]",
+                                       pim_cksum);
+        } else {
+            proto_tree_add_uint_format(pim_tree, hf_pim_cksum, tvb,
+                                       offset, 2, pim_cksum,
+                                       "Checksum: 0x%04x [incorrect, should be 0x%04x]",
+                                       pim_cksum, in_cksum_shouldbe(pim_cksum, computed_cksum));
         }
+    } else {
+        proto_tree_add_uint(pim_tree, hf_pim_cksum, tvb,
+                            offset, 2, pim_cksum);
+    }
     offset += 2;
 
-       proto_tree_add_item(pim_tree, hf_pim_version, tvb, offset, 1, FALSE);
+    proto_tree_add_item(pim_tree, hf_pim_version, tvb, offset, 1, FALSE);
     offset += 1;
 
-    offset += 3;       /* skip reserved stuff */
-
-       if (tvb_reported_length_remaining(tvb, offset) > 0) {
-           tiopt = proto_tree_add_text(pim_tree, tvb, offset, -1,
-                   "PIM parameters");
-           pimopt_tree = proto_item_add_subtree(tiopt, ett_pim);
-       } else
-           goto done;
-
-       /* version 1 decoder */
-       switch (pim_type) {
-       case 0: /* query */
-         {
-           guint8 mode;
-           guint16 holdtime;
-           static const value_string pimv1_modevals[] = {
-               { 0, "Dense" },
-               { 1, "Sparse" },
-               { 2, "Sparse-Dense" },
-               { 0, NULL },
-           };
-
-           mode = tvb_get_guint8(tvb, offset) >> 4;
-           proto_tree_add_text(pimopt_tree, tvb, offset, 1,
-               "Mode: %s",
-               val_to_str(mode, pimv1_modevals, "Unknown (%u)"));
-           offset += 2;
-           holdtime = tvb_get_ntohs(tvb, offset);
-           proto_tree_add_text(pimopt_tree, tvb, offset, 2,
-               "Holdtime: %u%s", holdtime,
-               holdtime == 0xffff ? " (infty)" : "");
-           offset += 2;
-           break;
-         }
-
-       case 1: /* register */
-         {
-           guint8 v_hl;
-           tvbuff_t *next_tvb;
-
-           /*
-            * The rest of the packet is a multicast data packet.
-            */
-           next_tvb = tvb_new_subset_remaining(tvb, offset);
-
-           /*
-            * It's an IP packet - determine whether it's IPv4 or IPv6.
-            */
-           v_hl = tvb_get_guint8(tvb, offset);
-           switch((v_hl & 0xf0) >> 4) {
-           case 0:     /* Null-Register dummy header.
-                        * Has the same address family as the encapsulating PIM packet,
-                        * e.g. an IPv6 data packet is encapsulated in IPv6 PIM packet.
-                        */
-                   if (pinfo->src.type == AT_IPv4) {
-                           proto_tree_add_text(pimopt_tree, tvb, offset, -1,
-                                               "IPv4 dummy header");
-                           proto_tree_add_text(pimopt_tree, tvb, offset + 12, 4,
-                                               "Source: %s",
-                                               ip_to_str(tvb_get_ptr(tvb, offset + 12, 4)));
-                           proto_tree_add_text(pimopt_tree, tvb, offset + 16, 4,
-                                               "Group: %s",
-                                               ip_to_str(tvb_get_ptr(tvb, offset + 16, 4)));
-                   } else if (pinfo->src.type == AT_IPv6) {
-                           struct ip6_hdr ip6_hdr;
-                           tvb_memcpy(tvb, (guint8 *)&ip6_hdr, offset,
-                                      sizeof ip6_hdr);
-                           proto_tree_add_text(pimopt_tree, tvb, offset, -1,
-                                               "IPv6 dummy header");
-                           proto_tree_add_text(pimopt_tree, tvb,
-                                               offset + offsetof(struct ip6_hdr, ip6_src), 16,
-                                               "Source: %s",
-                                               ip6_to_str(&ip6_hdr.ip6_src));
-                           proto_tree_add_text(pimopt_tree, tvb,
-                                               offset + offsetof(struct ip6_hdr, ip6_dst), 16,
-                                               "Group: %s",
-                                               ip6_to_str(&ip6_hdr.ip6_dst));
-                   } else
-                           proto_tree_add_text(pimopt_tree, tvb, offset, -1,
-                                               "Dummy header for an unknown protocol");
-                   break;
-           case 4:     /* IPv4 */
+    offset += 3;        /* skip reserved stuff */
+
+    if (tvb_reported_length_remaining(tvb, offset) > 0) {
+        tiopt = proto_tree_add_text(pim_tree, tvb, offset, -1,
+                                    "PIM parameters");
+        pimopt_tree = proto_item_add_subtree(tiopt, ett_pim);
+    } else
+        goto done;
+
+    /* version 1 decoder */
+    switch (pim_type) {
+    case 0:     /* query */
+    {
+        guint8 mode;
+        guint16 holdtime;
+        static const value_string pimv1_modevals[] = {
+            { 0, "Dense" },
+            { 1, "Sparse" },
+            { 2, "Sparse-Dense" },
+            { 0, NULL },
+        };
+
+        mode = tvb_get_guint8(tvb, offset) >> 4;
+        proto_tree_add_text(pimopt_tree, tvb, offset, 1,
+                            "Mode: %s",
+                            val_to_str(mode, pimv1_modevals, "Unknown (%u)"));
+        offset += 2;
+        holdtime = tvb_get_ntohs(tvb, offset);
+        proto_tree_add_text(pimopt_tree, tvb, offset, 2,
+                            "Holdtime: %u%s", holdtime,
+                            holdtime == 0xffff ? " (infty)" : "");
+        offset += 2;
+        break;
+    }
+
+    case 1:     /* register */
+    {
+        guint8 v_hl;
+        tvbuff_t *next_tvb;
+
+        /*
+         * The rest of the packet is a multicast data packet.
+         */
+        next_tvb = tvb_new_subset_remaining(tvb, offset);
+
+        /*
+         * It's an IP packet - determine whether it's IPv4 or IPv6.
+         */
+        v_hl = tvb_get_guint8(tvb, offset);
+        switch((v_hl & 0xf0) >> 4) {
+        case 0:     /* Null-Register dummy header.
+                     * Has the same address family as the encapsulating PIM packet,
+                     * e.g. an IPv6 data packet is encapsulated in IPv6 PIM packet.
+                     */
+            if (pinfo->src.type == AT_IPv4) {
+                proto_tree_add_text(pimopt_tree, tvb, offset, -1,
+                                    "IPv4 dummy header");
+                proto_tree_add_text(pimopt_tree, tvb, offset + 12, 4,
+                                    "Source: %s",
+                                    ip_to_str(tvb_get_ptr(tvb, offset + 12, 4)));
+                proto_tree_add_text(pimopt_tree, tvb, offset + 16, 4,
+                                    "Group: %s",
+                                    ip_to_str(tvb_get_ptr(tvb, offset + 16, 4)));
+            } else if (pinfo->src.type == AT_IPv6) {
+                struct ip6_hdr ip6_hdr;
+                tvb_memcpy(tvb, (guint8 *)&ip6_hdr, offset,
+                           sizeof ip6_hdr);
+                proto_tree_add_text(pimopt_tree, tvb, offset, -1,
+                                    "IPv6 dummy header");
+                proto_tree_add_text(pimopt_tree, tvb,
+                                    offset + offsetof(struct ip6_hdr, ip6_src), 16,
+                                    "Source: %s",
+                                    ip6_to_str(&ip6_hdr.ip6_src));
+                proto_tree_add_text(pimopt_tree, tvb,
+                                    offset + offsetof(struct ip6_hdr, ip6_dst), 16,
+                                    "Group: %s",
+                                    ip6_to_str(&ip6_hdr.ip6_dst));
+            } else
+                proto_tree_add_text(pimopt_tree, tvb, offset, -1,
+                                    "Dummy header for an unknown protocol");
+            break;
+        case 4: /* IPv4 */
 #if 0
-                   call_dissector(ip_handle, next_tvb, pinfo, tree);
+            call_dissector(ip_handle, next_tvb, pinfo, tree);
 #else
-                   call_dissector(ip_handle, next_tvb, pinfo, pimopt_tree);
+            call_dissector(ip_handle, next_tvb, pinfo, pimopt_tree);
 #endif
-                   break;
-           case 6:     /* IPv6 */
+            break;
+        case 6: /* IPv6 */
 #if 0
-                   call_dissector(ipv6_handle, next_tvb, pinfo, tree);
+            call_dissector(ipv6_handle, next_tvb, pinfo, tree);
 #else
-                   call_dissector(ipv6_handle, next_tvb, pinfo, pimopt_tree);
+            call_dissector(ipv6_handle, next_tvb, pinfo, pimopt_tree);
 #endif
-                   break;
-           default:
-                   proto_tree_add_text(pimopt_tree, tvb, offset, -1,
-                       "Unknown IP version %d", (v_hl & 0xf0) >> 4);
-                   break;
-           }
-           break;
-         }
-
-       case 2: /* register-stop */
-         {
-           proto_tree_add_text(pimopt_tree, tvb, offset, 4,
-               "Group: %s",
-               ip_to_str(tvb_get_ptr(tvb, offset, 4)));
-           offset += 4;
-           proto_tree_add_text(pimopt_tree, tvb, offset, 4,
-               "Source: %s",
-               ip_to_str(tvb_get_ptr(tvb, offset, 4)));
-           offset += 4;
-           break;
-         }
-
-       case 3: /* join/prune */
-       case 6: /* graft */
-       case 7: /* graft-ack */
-         {
-           int off;
-           const char *s;
-           int ngroup, i, njoin, nprune, j;
-           guint16 holdtime;
-           guint8 mask_len;
-           guint8 adr_len;
-           proto_tree *grouptree = NULL;
-           proto_item *tigroup;
-           proto_tree *subtree = NULL;
-           proto_item *tisub;
-
-           proto_tree_add_text(pimopt_tree, tvb, offset, 4,
-               "Upstream-neighbor: %s",
-               ip_to_str(tvb_get_ptr(tvb, offset, 4)));
-           offset += 4;
-
-           offset += 2;        /* skip reserved stuff */
-
-           holdtime = tvb_get_ntohs(tvb, offset);
-           proto_tree_add_text(pimopt_tree, tvb, offset, 2,
-               "Holdtime: %u%s", holdtime,
-               holdtime == 0xffff ? " (infty)" : "");
-           offset += 2;
-
-           offset += 1;        /* skip reserved stuff */
-
-           mask_len = tvb_get_guint8(tvb, offset);
-           proto_tree_add_text(pimopt_tree, tvb, offset, 1,
-               "Mask length: %u", mask_len);
-           offset += 1;
-
-           adr_len = tvb_get_guint8(tvb, offset);
-           proto_tree_add_text(pimopt_tree, tvb, offset, 1,
-               "Address length: %u", adr_len);
-           offset += 1;
-
-           ngroup = tvb_get_guint8(tvb, offset);
-           proto_tree_add_text(pimopt_tree, tvb, offset, 1,
-               "Groups: %u", ngroup);
-           offset += 1;
-
-           for (i = 0; i < ngroup; i++) {
-               /*
-                * XXX - does the group address have the length "adr_len"
-                * and the group mask the length "mask_len"?
-                */
-               tigroup = proto_tree_add_text(pimopt_tree, tvb, offset, 4,
-                   "Group %d: %s", i,
-                   ip_to_str(tvb_get_ptr(tvb, offset, 4)));
-               grouptree = proto_item_add_subtree(tigroup, ett_pim);
-               offset += 4;
-
-               proto_tree_add_text(grouptree, tvb, offset, 4,
-                   "Group %d Mask: %s", i,
-                   ip_to_str(tvb_get_ptr(tvb, offset, 4)));
-               offset += 4;
-
-               njoin = tvb_get_ntohs(tvb, offset);
-               nprune = tvb_get_ntohs(tvb, offset + 2);
-
-               tisub = proto_tree_add_text(grouptree, tvb, offset, 2,
-                   "Join: %d", njoin);
-               subtree = proto_item_add_subtree(tisub, ett_pim);
-               off = offset + 4;
-               for (j = 0; j < njoin; j++) {
-                   s = dissect_pimv1_addr(tvb, off);
-                   proto_tree_add_text(subtree, tvb, off, 6,
-                       "IP address: %s", s);
-                   off += 6;
-               }
-
-               tisub = proto_tree_add_text(grouptree, tvb, offset + 2, 2,
-                   "Prune: %d", nprune);
-               subtree = proto_item_add_subtree(tisub, ett_pim);
-               for (j = 0; j < nprune; j++) {
-                   s = dissect_pimv1_addr(tvb, off);
-                   proto_tree_add_text(subtree, tvb, off, 6,
-                       "IP address: %s", s);
-                   off += 6;
-               }
-               offset = off;
-           }
-           break;
-         }
-
-       case 4: /* rp-reachability */
-         {
-           guint16 holdtime;
-
-           proto_tree_add_text(pimopt_tree, tvb, offset, 4,
-               "Group Address: %s",
-               ip_to_str(tvb_get_ptr(tvb, offset, 4)));
-           offset += 4;
-
-           proto_tree_add_text(pimopt_tree, tvb, offset, 4,
-               "Group Mask: %s",
-               ip_to_str(tvb_get_ptr(tvb, offset, 4)));
-           offset += 4;
-
-           proto_tree_add_text(pimopt_tree, tvb, offset, 4,
-               "RP Address: %s",
-               ip_to_str(tvb_get_ptr(tvb, offset, 4)));
-           offset += 4;
-
-           offset += 2;        /* skip reserved stuff */
-
-           holdtime = tvb_get_ntohs(tvb, offset);
-           proto_tree_add_text(pimopt_tree, tvb, offset, 2,
-               "Holdtime: %u%s", holdtime,
-               holdtime == 0xffff ? " (infty)" : "");
-           offset += 2;
-           break;
-         }
-
-       case 5: /* assert */
-         {
-           proto_tree_add_text(pimopt_tree, tvb, offset, 4,
-               "Group Address: %s",
-               ip_to_str(tvb_get_ptr(tvb, offset, 4)));
-           offset += 4;
-
-           proto_tree_add_text(pimopt_tree, tvb, offset, 4,
-               "Group Mask: %s",
-               ip_to_str(tvb_get_ptr(tvb, offset, 4)));
-           offset += 4;
-
-           proto_tree_add_text(pimopt_tree, tvb, offset, 1, "%s",
-               decode_boolean_bitfield(tvb_get_guint8(tvb, offset), 0x80, 8,
-                   "RP Tree", "Not RP Tree"));
-           proto_tree_add_text(pimopt_tree, tvb, offset, 4, "Preference: %u",
-               tvb_get_ntohl(tvb, offset) & 0x7fffffff);
-           offset += 4;
-
-           proto_tree_add_text(pimopt_tree, tvb, offset, 4, "Metric: %u",
-               tvb_get_ntohl(tvb, offset));
-
-           break;
-         }
-
-       default:
-           break;
-       }
+            break;
+        default:
+            proto_tree_add_text(pimopt_tree, tvb, offset, -1,
+                                "Unknown IP version %d", (v_hl & 0xf0) >> 4);
+            break;
+        }
+        break;
+    }
+
+    case 2:     /* register-stop */
+    {
+        proto_tree_add_text(pimopt_tree, tvb, offset, 4,
+                            "Group: %s",
+                            ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+        offset += 4;
+        proto_tree_add_text(pimopt_tree, tvb, offset, 4,
+                            "Source: %s",
+                            ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+        offset += 4;
+        break;
+    }
+
+    case 3:     /* join/prune */
+    case 6:     /* graft */
+    case 7:     /* graft-ack */
+    {
+        int off;
+        const char *s;
+        int ngroup, i, njoin, nprune, j;
+        guint16 holdtime;
+        guint8 mask_len;
+        guint8 adr_len;
+        proto_tree *grouptree = NULL;
+        proto_item *tigroup;
+        proto_tree *subtree = NULL;
+        proto_item *tisub;
+
+        proto_tree_add_text(pimopt_tree, tvb, offset, 4,
+                            "Upstream-neighbor: %s",
+                            ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+        offset += 4;
+
+        offset += 2;    /* skip reserved stuff */
+
+        holdtime = tvb_get_ntohs(tvb, offset);
+        proto_tree_add_text(pimopt_tree, tvb, offset, 2,
+                            "Holdtime: %u%s", holdtime,
+                            holdtime == 0xffff ? " (infty)" : "");
+        offset += 2;
+
+        offset += 1;    /* skip reserved stuff */
+
+        mask_len = tvb_get_guint8(tvb, offset);
+        proto_tree_add_text(pimopt_tree, tvb, offset, 1,
+                            "Mask length: %u", mask_len);
+        offset += 1;
+
+        adr_len = tvb_get_guint8(tvb, offset);
+        proto_tree_add_text(pimopt_tree, tvb, offset, 1,
+                            "Address length: %u", adr_len);
+        offset += 1;
+
+        ngroup = tvb_get_guint8(tvb, offset);
+        proto_tree_add_text(pimopt_tree, tvb, offset, 1,
+                            "Groups: %u", ngroup);
+        offset += 1;
+
+        for (i = 0; i < ngroup; i++) {
+            /*
+             * XXX - does the group address have the length "adr_len"
+             * and the group mask the length "mask_len"?
+             */
+            tigroup = proto_tree_add_text(pimopt_tree, tvb, offset, 4,
+                                          "Group %d: %s", i,
+                                          ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+            grouptree = proto_item_add_subtree(tigroup, ett_pim);
+            offset += 4;
+
+            proto_tree_add_text(grouptree, tvb, offset, 4,
+                                "Group %d Mask: %s", i,
+                                ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+            offset += 4;
+
+            njoin = tvb_get_ntohs(tvb, offset);
+            nprune = tvb_get_ntohs(tvb, offset + 2);
+
+            tisub = proto_tree_add_text(grouptree, tvb, offset, 2,
+                                        "Join: %d", njoin);
+            subtree = proto_item_add_subtree(tisub, ett_pim);
+            off = offset + 4;
+            for (j = 0; j < njoin; j++) {
+                s = dissect_pimv1_addr(tvb, off);
+                proto_tree_add_text(subtree, tvb, off, 6,
+                                    "IP address: %s", s);
+                off += 6;
+            }
+
+            tisub = proto_tree_add_text(grouptree, tvb, offset + 2, 2,
+                                        "Prune: %d", nprune);
+            subtree = proto_item_add_subtree(tisub, ett_pim);
+            for (j = 0; j < nprune; j++) {
+                s = dissect_pimv1_addr(tvb, off);
+                proto_tree_add_text(subtree, tvb, off, 6,
+                                    "IP address: %s", s);
+                off += 6;
+            }
+            offset = off;
+        }
+        break;
+    }
+
+    case 4:     /* rp-reachability */
+    {
+        guint16 holdtime;
+
+        proto_tree_add_text(pimopt_tree, tvb, offset, 4,
+                            "Group Address: %s",
+                            ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+        offset += 4;
+
+        proto_tree_add_text(pimopt_tree, tvb, offset, 4,
+                            "Group Mask: %s",
+                            ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+        offset += 4;
+
+        proto_tree_add_text(pimopt_tree, tvb, offset, 4,
+                            "RP Address: %s",
+                            ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+        offset += 4;
+
+        offset += 2;    /* skip reserved stuff */
+
+        holdtime = tvb_get_ntohs(tvb, offset);
+        proto_tree_add_text(pimopt_tree, tvb, offset, 2,
+                            "Holdtime: %u%s", holdtime,
+                            holdtime == 0xffff ? " (infty)" : "");
+        offset += 2;
+        break;
+    }
+
+    case 5:     /* assert */
+    {
+        proto_tree_add_text(pimopt_tree, tvb, offset, 4,
+                            "Group Address: %s",
+                            ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+        offset += 4;
+
+        proto_tree_add_text(pimopt_tree, tvb, offset, 4,
+                            "Group Mask: %s",
+                            ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+        offset += 4;
+
+        proto_tree_add_text(pimopt_tree, tvb, offset, 1, "%s",
+                            decode_boolean_bitfield(tvb_get_guint8(tvb, offset), 0x80, 8,
+                                                    "RP Tree", "Not RP Tree"));
+        proto_tree_add_text(pimopt_tree, tvb, offset, 4, "Preference: %u",
+                            tvb_get_ntohl(tvb, offset) & 0x7fffffff);
+        offset += 4;
+
+        proto_tree_add_text(pimopt_tree, tvb, offset, 4, "Metric: %u",
+                            tvb_get_ntohl(tvb, offset));
+
+        break;
+    }
+
+    default:
+        break;
+    }
 done:;
 
     return offset+tvb_length_remaining(tvb, offset);
@@ -464,7 +464,7 @@ done:;
 
 static const char *
 dissect_pim_addr(tvbuff_t *tvb, int offset, enum pimv2_addrtype at,
-       int *advance) {
+                 int *advance) {
     emem_strbuf_t *strbuf;
     guint8 af;
     guint8 et;
@@ -474,89 +474,89 @@ dissect_pim_addr(tvbuff_t *tvb, int offset, enum pimv2_addrtype at,
 
     af = tvb_get_guint8(tvb, offset);
     if (af != AFNUM_INET && af != AFNUM_INET6) {
-       /*
-        * We don't handle the other formats, and addresses don't include
-        * a length field, so we can't even show them as raw bytes.
-        */
-       return NULL;
+        /*
+         * We don't handle the other formats, and addresses don't include
+         * a length field, so we can't even show them as raw bytes.
+         */
+        return NULL;
     }
 
     et = tvb_get_guint8(tvb, offset + 1);
     if (et != 0) {
-       /*
-        * The only defined encoding type is 0, for the native encoding;
-        * again, as addresses don't include a length field, we can't
-        * even show addresses with a different encoding type as raw
-        * bytes.
-        */
-       return NULL;
+        /*
+         * The only defined encoding type is 0, for the native encoding;
+         * again, as addresses don't include a length field, we can't
+         * even show addresses with a different encoding type as raw
+         * bytes.
+         */
+        return NULL;
     }
 
     strbuf = ep_strbuf_new_label(NULL);
     switch (at) {
     case pimv2_unicast:
-       switch (af) {
-       case AFNUM_INET:
-           len = 4;
-           ep_strbuf_printf(strbuf, "%s", ip_to_str(tvb_get_ptr(tvb, offset + 2, len)));
-           break;
-
-       case AFNUM_INET6:
-           len = 16;
-           ep_strbuf_printf(strbuf, "%s", ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset + 2, len)));
-           break;
-       }
-       if (advance)
-           *advance = 2 + len;
-       break;
+        switch (af) {
+        case AFNUM_INET:
+            len = 4;
+            ep_strbuf_printf(strbuf, "%s", ip_to_str(tvb_get_ptr(tvb, offset + 2, len)));
+            break;
+
+        case AFNUM_INET6:
+            len = 16;
+            ep_strbuf_printf(strbuf, "%s", ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset + 2, len)));
+            break;
+        }
+        if (advance)
+            *advance = 2 + len;
+        break;
 
     case pimv2_group:
-       mask_len = tvb_get_guint8(tvb, offset + 3);
-       switch (af) {
-       case AFNUM_INET:
-           len = 4;
-           ep_strbuf_printf(strbuf, "%s/%u",
-               ip_to_str(tvb_get_ptr(tvb, offset + 4, len)), mask_len);
-           break;
-
-       case AFNUM_INET6:
-           len = 16;
-           ep_strbuf_printf(strbuf, "%s/%u",
-               ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset + 4, len)), mask_len);
-           break;
-       }
-       if (advance)
-           *advance = 4 + len;
-       break;
+        mask_len = tvb_get_guint8(tvb, offset + 3);
+        switch (af) {
+        case AFNUM_INET:
+            len = 4;
+            ep_strbuf_printf(strbuf, "%s/%u",
+                             ip_to_str(tvb_get_ptr(tvb, offset + 4, len)), mask_len);
+            break;
+
+        case AFNUM_INET6:
+            len = 16;
+            ep_strbuf_printf(strbuf, "%s/%u",
+                             ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset + 4, len)), mask_len);
+            break;
+        }
+        if (advance)
+            *advance = 4 + len;
+        break;
 
     case pimv2_source:
-       flags = tvb_get_guint8(tvb, offset + 2);
-       mask_len = tvb_get_guint8(tvb, offset + 3);
-       switch (af) {
-       case AFNUM_INET:
-           len = 4;
-           ep_strbuf_printf(strbuf, "%s/%u",
-               ip_to_str(tvb_get_ptr(tvb, offset + 4, len)), mask_len);
-           break;
-
-       case AFNUM_INET6:
-           len = 16;
-           ep_strbuf_printf(strbuf, "%s/%u",
-               ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset + 4, len)), mask_len);
-           break;
-       }
-       if (flags) {
-           ep_strbuf_append_printf(strbuf,
-               " (%s%s%s)",
-               flags & 0x04 ? "S" : "",
-               flags & 0x02 ? "W" : "",
-               flags & 0x01 ? "R" : "");
-       }
-       if (advance)
-           *advance = 4 + len;
-       break;
+        flags = tvb_get_guint8(tvb, offset + 2);
+        mask_len = tvb_get_guint8(tvb, offset + 3);
+        switch (af) {
+        case AFNUM_INET:
+            len = 4;
+            ep_strbuf_printf(strbuf, "%s/%u",
+                             ip_to_str(tvb_get_ptr(tvb, offset + 4, len)), mask_len);
+            break;
+
+        case AFNUM_INET6:
+            len = 16;
+            ep_strbuf_printf(strbuf, "%s/%u",
+                             ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset + 4, len)), mask_len);
+            break;
+        }
+        if (flags) {
+            ep_strbuf_append_printf(strbuf,
+                                    " (%s%s%s)",
+                                    flags & 0x04 ? "S" : "",
+                                    flags & 0x02 ? "W" : "",
+                                    flags & 0x01 ? "R" : "");
+        }
+        if (advance)
+            *advance = 4 + len;
+        break;
     default:
-       return NULL;
+        return NULL;
     }
 
     return strbuf->str;
@@ -602,642 +602,642 @@ dissect_pim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
 
     switch (PIM_VER(pim_typever)) {
     case 2:
-       typestr = val_to_str(PIM_TYPE(pim_typever), type2vals, "Unknown (%u)");
-       break;
-    case 1:    /* PIMv1 - we should never see this */
+        typestr = val_to_str(PIM_TYPE(pim_typever), type2vals, "Unknown (%u)");
+        break;
+    case 1:     /* PIMv1 - we should never see this */
     default:
-       typestr = "Unknown";
-       break;
+        typestr = "Unknown";
+        break;
     }
 
     if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
         col_add_fstr(pinfo->cinfo, COL_PROTOCOL, "PIMv%d",
-           PIM_VER(pim_typever));
+                     PIM_VER(pim_typever));
     }
     if (check_col(pinfo->cinfo, COL_INFO))
-       col_add_str(pinfo->cinfo, COL_INFO, typestr);
-
-       ti = proto_tree_add_item(tree, proto_pim, tvb, offset, -1, FALSE);
-       pim_tree = proto_item_add_subtree(ti, ett_pim);
-
-       proto_tree_add_item(pim_tree, hf_pim_version, tvb, offset, 1, FALSE);
-       proto_tree_add_item(pim_tree, hf_pim_type, tvb, offset, 1, FALSE);
-       proto_tree_add_item(pim_tree, hf_pim_res_bytes, tvb, offset + 1, 1, FALSE);
-       pim_cksum = tvb_get_ntohs(tvb, offset + 2);
-       length = tvb_length(tvb);
-       if (PIM_VER(pim_typever) == 2) {
-           /*
-            * Well, it's PIM v2, so we can check whether this is a Register
-            * message, and thus can figure out how much to checksum and
-            * whether to make the columns read-only.
-            */
-           if (PIM_TYPE(pim_typever) == 1) {
-               /*
-                * Register message - the PIM header is 8 bytes long.
-                * Also set the columns non-writable. Otherwise the IPv4 or
-                * IPv6 dissector for the encapsulated packet that caused
-                * this register will overwrite the PIM info in the columns.
-                */
-               pim_length = 8;
-               col_set_writable(pinfo->cinfo, FALSE);
-           } else {
-               /*
-                * Other message - checksum the entire packet.
-                */
-               pim_length = tvb_reported_length(tvb);
-           }
-       } else {
-           /*
-            * We don't know what type of message this is, so say that
-            * the length is 0, to force it not to be checksummed.
-            */
-           pim_length = 0;
-       }
-       if (!pinfo->fragmented && length >= pim_length) {
-           /*
-            * The packet isn't part of a fragmented datagram and isn't
-            * truncated, so we can checksum it.
-            */
-
-           switch (pinfo->src.type) {
-           case AT_IPv4:
-               cksum_vec[0].ptr = tvb_get_ptr(tvb, 0, pim_length);
-               cksum_vec[0].len = pim_length;
-               computed_cksum = in_cksum(&cksum_vec[0], 1);
-               break;
-           case AT_IPv6:
-               /* Set up the fields of the pseudo-header. */
-               cksum_vec[0].ptr = pinfo->src.data;
-               cksum_vec[0].len = pinfo->src.len;
-               cksum_vec[1].ptr = pinfo->dst.data;
-               cksum_vec[1].len = pinfo->dst.len;
-               cksum_vec[2].ptr = (const guint8 *)&phdr;
-               phdr[0] = g_htonl(pim_length);
-               phdr[1] = g_htonl(IP_PROTO_PIM);
-               cksum_vec[2].len = 8;
-               cksum_vec[3].ptr = tvb_get_ptr(tvb, 0, pim_length);
-               cksum_vec[3].len = pim_length;
-               computed_cksum = in_cksum(&cksum_vec[0], 4);
-               break;
-           default:
-               /* PIM is available for IPv4 and IPv6 right now */
-               computed_cksum = 0;     /* squelch GCC complaints */
-               DISSECTOR_ASSERT_NOT_REACHED();
-               break;
-           }
-
-           if (computed_cksum == 0) {
-               proto_tree_add_uint_format(pim_tree, hf_pim_cksum, tvb,
-                       offset + 2, 2, pim_cksum,
-                       "Checksum: 0x%04x [correct]",
-                       pim_cksum);
-           } else {
-               proto_tree_add_uint_format(pim_tree, hf_pim_cksum, tvb,
-                       offset + 2, 2, pim_cksum,
-                       "Checksum: 0x%04x [incorrect, should be 0x%04x]",
-                       pim_cksum, in_cksum_shouldbe(pim_cksum, computed_cksum));
-           }
-       } else {
-           proto_tree_add_uint(pim_tree, hf_pim_cksum, tvb,
-               offset + 2, 2, pim_cksum);
-       }
-
-       offset += 4;
-
-       if (tvb_reported_length_remaining(tvb, offset) > 0) {
-           tiopt = proto_tree_add_text(pim_tree, tvb, offset, -1,
-               "PIM parameters");
-           pimopt_tree = proto_item_add_subtree(tiopt, ett_pim);
-       } else
-           goto done;
-
-       if (PIM_VER(pim_typever) != 2)
-           goto done;
-
-       /* version 2 decoder */
-       switch (PIM_TYPE(pim_typever)) {
-       case 0: /*hello*/
-         {
-           while (tvb_reported_length_remaining(tvb, offset) >= 2) {
-               guint16 hello_opt, opt_len;
-               guint16 holdtime;
-               guint16 lan_delay;
-               guint16 override_interval;
-               guint32 priority;
-               guint32 opt_value = 0;
-
-               hello_opt = tvb_get_ntohs(tvb, offset);
-               opt_len = tvb_get_ntohs(tvb, offset + 2);
-
-               if(opt_len == 2)
-                       opt_value = tvb_get_ntohs(tvb, offset + 4);
-               if(opt_len == 4)
-                       opt_value = tvb_get_ntohl(tvb, offset + 4);
-
-               switch(hello_opt) {
-               case 1: /* holdtime */
-                       holdtime = opt_value;
-                       proto_tree_add_text(pimopt_tree, tvb, offset, 4 + opt_len,
-                                           "Holdtime (%u): %us %s", hello_opt, holdtime,
-                                           holdtime == 0xffff ? " (infty)" : "");
-                       break;
-               case 2: /* LAN prune delay
-                         *
-                         * 0                   1                   2                   3
-                         * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-                         * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-                         * |            Type = 2           |           Length = 4          |
-                         * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-                         * |T|       LAN Prune Delay       |       Override Interval       |
-                         * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-                         */
-               {
-                       proto_tree *sub_tree = NULL;
-                       proto_item *landelay_option;
-
-                       landelay_option = proto_tree_add_text(pimopt_tree, tvb, offset, 4 + opt_len,
-                                                       "LAN Prune Delay (%u)", hello_opt);
-                       sub_tree = proto_item_add_subtree(landelay_option, ett_pim);
-
-                       lan_delay = (opt_value & 0x7fff0000) >> 16;
-                       override_interval = opt_value & 0x0000ffff;
-                       proto_tree_add_text(sub_tree, tvb, offset + 4, 1,
-                                           "T bit is %s",
-                                           (opt_value & 0x80000000) ? "set" : "not set");
-                       proto_tree_add_text(sub_tree, tvb, offset + 4, 2,
-                                           "LAN Delay: %ums", lan_delay);
-                       proto_tree_add_text(sub_tree, tvb, offset + 6, 2,
-                                           "Override Interval: %ums", override_interval);
-                       break;
-               }
-               case 19: /* priority */
-                       priority = opt_value;
-                       proto_tree_add_text(pimopt_tree, tvb, offset, 4 + opt_len,
-                                       "DR Priority (%u): %u", hello_opt, priority);
-                       break;
-               case 20: /* generation ID */
-                       proto_tree_add_text(pimopt_tree, tvb, offset, 4 + opt_len,
-                                           "Generation ID (%u): %d", hello_opt, opt_value);
-                       break;
-
-               case 24: /* address list */
-               case 65001: /* address list (old implementations) */
-               {
-                       int i;
-                       proto_tree *sub_tree = NULL;
-                       proto_item *addrlist_option;
-
-                       addrlist_option = proto_tree_add_text(pimopt_tree, tvb, offset, 4 + opt_len,
-                                           "%sAddress List (%u)",
-                                           hello_opt == 65001 ? "old " : "",
-                                            hello_opt);
-                       sub_tree = proto_item_add_subtree(addrlist_option, ett_pim);
-
-                       for (i = offset + 4; i < offset + 4 + opt_len; ) {
-                               int advance;
-                               const char *s;
-
-                               s = dissect_pim_addr(tvb, i, pimv2_unicast, &advance);
-                               if (s == NULL)
-                                       break;
-                               proto_tree_add_text(sub_tree, tvb, offset, 
-                                                   advance, "Address: %s", s);
-                               i += advance;
-                       }
-                       break;
-               }
-               default:
-                       proto_tree_add_text(pimopt_tree, tvb, offset, 4 + opt_len,
-                                           "Unknown option (%u), length: %u, value: 0x%x",
-                                           hello_opt, opt_len, opt_value);
-                       break;
-               }
-               offset += 4 + opt_len;
-           }
-           break;
-         }
-
-       case 1: /* register */
-         {
-           guint32 flags;
-           guint8 v_hl;
-           tvbuff_t *next_tvb;
-           proto_tree *flag_tree = NULL;
-           proto_item *tiflag;
-
-           flags = tvb_get_ntohl(tvb, offset);
-           tiflag = proto_tree_add_text(pimopt_tree, tvb, offset, 4,
-               "Flags: 0x%08x", flags);
-           flag_tree = proto_item_add_subtree(tiflag, ett_pim);
-           proto_tree_add_text(flag_tree, tvb, offset, 1, "%s",
-               decode_boolean_bitfield(flags, 0x80000000, 32,
-                   "Border", "Not border"));
-           proto_tree_add_text(flag_tree, tvb, offset, 1, "%s",
-               decode_boolean_bitfield(flags, 0x40000000, 32,
-                   "Null-Register", "Not Null-Register"));
-           offset += 4;
-
-           /*
-            * The rest of the packet is a multicast data packet.
-            */
-           next_tvb = tvb_new_subset_remaining(tvb, offset);
-
-           /*
-            * It's an IP packet - determine whether it's IPv4 or IPv6.
-            */
-           v_hl = tvb_get_guint8(tvb, offset);
-           switch((v_hl & 0xf0) >> 4) {
-           case 0:     /* Null-Register dummy header.
-                        * Has the same address family as the encapsulating PIM packet,
-                        * e.g. an IPv6 data packet is encapsulated in IPv6 PIM packet.
-                        */
-                   if (pinfo->src.type == AT_IPv4) {
-                           proto_tree_add_text(pimopt_tree, tvb, offset, -1,
-                                               "IPv4 dummy header");
-                           proto_tree_add_text(pimopt_tree, tvb, offset + 12, 4,
-                                               "Source: %s",
-                                               ip_to_str(tvb_get_ptr(tvb, offset + 12, 4)));
-                           proto_tree_add_text(pimopt_tree, tvb, offset + 16, 4,
-                                               "Group: %s",
-                                               ip_to_str(tvb_get_ptr(tvb, offset + 16, 4)));
-                   } else if (pinfo->src.type == AT_IPv6) {
-                           struct ip6_hdr ip6_hdr;
-                           tvb_memcpy(tvb, (guint8 *)&ip6_hdr, offset,
-                                      sizeof ip6_hdr);
-                           proto_tree_add_text(pimopt_tree, tvb, offset, -1,
-                                               "IPv6 dummy header");
-                           proto_tree_add_text(pimopt_tree, tvb,
-                                               offset + offsetof(struct ip6_hdr, ip6_src), 16,
-                                               "Source: %s",
-                                               ip6_to_str(&ip6_hdr.ip6_src));
-                           proto_tree_add_text(pimopt_tree, tvb,
-                                               offset + offsetof(struct ip6_hdr, ip6_dst), 16,
-                                               "Group: %s",
-                                               ip6_to_str(&ip6_hdr.ip6_dst));
-                   } else
-                           proto_tree_add_text(pimopt_tree, tvb, offset, -1,
-                                               "Dummy header for an unknown protocol");
-                   break;
-           case 4:     /* IPv4 */
+        col_add_str(pinfo->cinfo, COL_INFO, typestr);
+
+    ti = proto_tree_add_item(tree, proto_pim, tvb, offset, -1, FALSE);
+    pim_tree = proto_item_add_subtree(ti, ett_pim);
+
+    proto_tree_add_item(pim_tree, hf_pim_version, tvb, offset, 1, FALSE);
+    proto_tree_add_item(pim_tree, hf_pim_type, tvb, offset, 1, FALSE);
+    proto_tree_add_item(pim_tree, hf_pim_res_bytes, tvb, offset + 1, 1, FALSE);
+    pim_cksum = tvb_get_ntohs(tvb, offset + 2);
+    length = tvb_length(tvb);
+    if (PIM_VER(pim_typever) == 2) {
+        /*
+         * Well, it's PIM v2, so we can check whether this is a Register
+         * message, and thus can figure out how much to checksum and
+         * whether to make the columns read-only.
+         */
+        if (PIM_TYPE(pim_typever) == 1) {
+            /*
+             * Register message - the PIM header is 8 bytes long.
+             * Also set the columns non-writable. Otherwise the IPv4 or
+             * IPv6 dissector for the encapsulated packet that caused
+             * this register will overwrite the PIM info in the columns.
+             */
+            pim_length = 8;
+            col_set_writable(pinfo->cinfo, FALSE);
+        } else {
+            /*
+             * Other message - checksum the entire packet.
+             */
+            pim_length = tvb_reported_length(tvb);
+        }
+    } else {
+        /*
+         * We don't know what type of message this is, so say that
+         * the length is 0, to force it not to be checksummed.
+         */
+        pim_length = 0;
+    }
+    if (!pinfo->fragmented && length >= pim_length) {
+        /*
+         * The packet isn't part of a fragmented datagram and isn't
+         * truncated, so we can checksum it.
+         */
+
+        switch (pinfo->src.type) {
+        case AT_IPv4:
+            cksum_vec[0].ptr = tvb_get_ptr(tvb, 0, pim_length);
+            cksum_vec[0].len = pim_length;
+            computed_cksum = in_cksum(&cksum_vec[0], 1);
+            break;
+        case AT_IPv6:
+            /* Set up the fields of the pseudo-header. */
+            cksum_vec[0].ptr = pinfo->src.data;
+            cksum_vec[0].len = pinfo->src.len;
+            cksum_vec[1].ptr = pinfo->dst.data;
+            cksum_vec[1].len = pinfo->dst.len;
+            cksum_vec[2].ptr = (const guint8 *)&phdr;
+            phdr[0] = g_htonl(pim_length);
+            phdr[1] = g_htonl(IP_PROTO_PIM);
+            cksum_vec[2].len = 8;
+            cksum_vec[3].ptr = tvb_get_ptr(tvb, 0, pim_length);
+            cksum_vec[3].len = pim_length;
+            computed_cksum = in_cksum(&cksum_vec[0], 4);
+            break;
+        default:
+            /* PIM is available for IPv4 and IPv6 right now */
+            computed_cksum = 0; /* squelch GCC complaints */
+            DISSECTOR_ASSERT_NOT_REACHED();
+            break;
+        }
+
+        if (computed_cksum == 0) {
+            proto_tree_add_uint_format(pim_tree, hf_pim_cksum, tvb,
+                                       offset + 2, 2, pim_cksum,
+                                       "Checksum: 0x%04x [correct]",
+                                       pim_cksum);
+        } else {
+            proto_tree_add_uint_format(pim_tree, hf_pim_cksum, tvb,
+                                       offset + 2, 2, pim_cksum,
+                                       "Checksum: 0x%04x [incorrect, should be 0x%04x]",
+                                       pim_cksum, in_cksum_shouldbe(pim_cksum, computed_cksum));
+        }
+    } else {
+        proto_tree_add_uint(pim_tree, hf_pim_cksum, tvb,
+                            offset + 2, 2, pim_cksum);
+    }
+
+    offset += 4;
+
+    if (tvb_reported_length_remaining(tvb, offset) > 0) {
+        tiopt = proto_tree_add_text(pim_tree, tvb, offset, -1,
+                                    "PIM parameters");
+        pimopt_tree = proto_item_add_subtree(tiopt, ett_pim);
+    } else
+        goto done;
+
+    if (PIM_VER(pim_typever) != 2)
+        goto done;
+
+    /* version 2 decoder */
+    switch (PIM_TYPE(pim_typever)) {
+    case 0:     /*hello*/
+    {
+        while (tvb_reported_length_remaining(tvb, offset) >= 2) {
+            guint16 hello_opt, opt_len;
+            guint16 holdtime;
+            guint16 lan_delay;
+            guint16 override_interval;
+            guint32 priority;
+            guint32 opt_value = 0;
+
+            hello_opt = tvb_get_ntohs(tvb, offset);
+            opt_len = tvb_get_ntohs(tvb, offset + 2);
+
+            if(opt_len == 2)
+                opt_value = tvb_get_ntohs(tvb, offset + 4);
+            if(opt_len == 4)
+                opt_value = tvb_get_ntohl(tvb, offset + 4);
+
+            switch(hello_opt) {
+            case 1: /* holdtime */
+                holdtime = opt_value;
+                proto_tree_add_text(pimopt_tree, tvb, offset, 4 + opt_len,
+                                    "Holdtime (%u): %us %s", hello_opt, holdtime,
+                                    holdtime == 0xffff ? " (infty)" : "");
+                break;
+            case 2: /* LAN prune delay
+                     *
+                     * 0                   1                   2                   3
+                     * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+                     * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+                     * |            Type = 2           |           Length = 4          |
+                     * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+                     * |T|       LAN Prune Delay       |       Override Interval       |
+                     * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+                     */
+            {
+                proto_tree *sub_tree = NULL;
+                proto_item *landelay_option;
+
+                landelay_option = proto_tree_add_text(pimopt_tree, tvb, offset, 4 + opt_len,
+                                                      "LAN Prune Delay (%u)", hello_opt);
+                sub_tree = proto_item_add_subtree(landelay_option, ett_pim);
+
+                lan_delay = (opt_value & 0x7fff0000) >> 16;
+                override_interval = opt_value & 0x0000ffff;
+                proto_tree_add_text(sub_tree, tvb, offset + 4, 1,
+                                    "T bit is %s",
+                                    (opt_value & 0x80000000) ? "set" : "not set");
+                proto_tree_add_text(sub_tree, tvb, offset + 4, 2,
+                                    "LAN Delay: %ums", lan_delay);
+                proto_tree_add_text(sub_tree, tvb, offset + 6, 2,
+                                    "Override Interval: %ums", override_interval);
+                break;
+            }
+            case 19: /* priority */
+                priority = opt_value;
+                proto_tree_add_text(pimopt_tree, tvb, offset, 4 + opt_len,
+                                    "DR Priority (%u): %u", hello_opt, priority);
+                break;
+            case 20: /* generation ID */
+                proto_tree_add_text(pimopt_tree, tvb, offset, 4 + opt_len,
+                                    "Generation ID (%u): %d", hello_opt, opt_value);
+                break;
+
+            case 24: /* address list */
+            case 65001: /* address list (old implementations) */
+            {
+                int i;
+                proto_tree *sub_tree = NULL;
+                proto_item *addrlist_option;
+
+                addrlist_option = proto_tree_add_text(pimopt_tree, tvb, offset, 4 + opt_len,
+                                                      "%sAddress List (%u)",
+                                                      hello_opt == 65001 ? "old " : "",
+                                                      hello_opt);
+                sub_tree = proto_item_add_subtree(addrlist_option, ett_pim);
+
+                for (i = offset + 4; i < offset + 4 + opt_len; ) {
+                    int advance;
+                    const char *s;
+
+                    s = dissect_pim_addr(tvb, i, pimv2_unicast, &advance);
+                    if (s == NULL)
+                        break;
+                    proto_tree_add_text(sub_tree, tvb, offset, 
+                                        advance, "Address: %s", s);
+                    i += advance;
+                }
+                break;
+            }
+            default:
+                proto_tree_add_text(pimopt_tree, tvb, offset, 4 + opt_len,
+                                    "Unknown option (%u), length: %u, value: 0x%x",
+                                    hello_opt, opt_len, opt_value);
+                break;
+            }
+            offset += 4 + opt_len;
+        }
+        break;
+    }
+
+    case 1:     /* register */
+    {
+        guint32 flags;
+        guint8 v_hl;
+        tvbuff_t *next_tvb;
+        proto_tree *flag_tree = NULL;
+        proto_item *tiflag;
+
+        flags = tvb_get_ntohl(tvb, offset);
+        tiflag = proto_tree_add_text(pimopt_tree, tvb, offset, 4,
+                                     "Flags: 0x%08x", flags);
+        flag_tree = proto_item_add_subtree(tiflag, ett_pim);
+        proto_tree_add_text(flag_tree, tvb, offset, 1, "%s",
+                            decode_boolean_bitfield(flags, 0x80000000, 32,
+                                                    "Border", "Not border"));
+        proto_tree_add_text(flag_tree, tvb, offset, 1, "%s",
+                            decode_boolean_bitfield(flags, 0x40000000, 32,
+                                                    "Null-Register", "Not Null-Register"));
+        offset += 4;
+
+        /*
+         * The rest of the packet is a multicast data packet.
+         */
+        next_tvb = tvb_new_subset_remaining(tvb, offset);
+
+        /*
+         * It's an IP packet - determine whether it's IPv4 or IPv6.
+         */
+        v_hl = tvb_get_guint8(tvb, offset);
+        switch((v_hl & 0xf0) >> 4) {
+        case 0:     /* Null-Register dummy header.
+                     * Has the same address family as the encapsulating PIM packet,
+                     * e.g. an IPv6 data packet is encapsulated in IPv6 PIM packet.
+                     */
+            if (pinfo->src.type == AT_IPv4) {
+                proto_tree_add_text(pimopt_tree, tvb, offset, -1,
+                                    "IPv4 dummy header");
+                proto_tree_add_text(pimopt_tree, tvb, offset + 12, 4,
+                                    "Source: %s",
+                                    ip_to_str(tvb_get_ptr(tvb, offset + 12, 4)));
+                proto_tree_add_text(pimopt_tree, tvb, offset + 16, 4,
+                                    "Group: %s",
+                                    ip_to_str(tvb_get_ptr(tvb, offset + 16, 4)));
+            } else if (pinfo->src.type == AT_IPv6) {
+                struct ip6_hdr ip6_hdr;
+                tvb_memcpy(tvb, (guint8 *)&ip6_hdr, offset,
+                           sizeof ip6_hdr);
+                proto_tree_add_text(pimopt_tree, tvb, offset, -1,
+                                    "IPv6 dummy header");
+                proto_tree_add_text(pimopt_tree, tvb,
+                                    offset + offsetof(struct ip6_hdr, ip6_src), 16,
+                                    "Source: %s",
+                                    ip6_to_str(&ip6_hdr.ip6_src));
+                proto_tree_add_text(pimopt_tree, tvb,
+                                    offset + offsetof(struct ip6_hdr, ip6_dst), 16,
+                                    "Group: %s",
+                                    ip6_to_str(&ip6_hdr.ip6_dst));
+            } else
+                proto_tree_add_text(pimopt_tree, tvb, offset, -1,
+                                    "Dummy header for an unknown protocol");
+            break;
+        case 4: /* IPv4 */
 #if 0
-                   call_dissector(ip_handle, next_tvb, pinfo, tree);
+            call_dissector(ip_handle, next_tvb, pinfo, tree);
 #else
-                   call_dissector(ip_handle, next_tvb, pinfo, pimopt_tree);
+            call_dissector(ip_handle, next_tvb, pinfo, pimopt_tree);
 #endif
-                   break;
-           case 6:     /* IPv6 */
+            break;
+        case 6: /* IPv6 */
 #if 0
-                   call_dissector(ipv6_handle, next_tvb, pinfo, tree);
+            call_dissector(ipv6_handle, next_tvb, pinfo, tree);
 #else
-                   call_dissector(ipv6_handle, next_tvb, pinfo, pimopt_tree);
+            call_dissector(ipv6_handle, next_tvb, pinfo, pimopt_tree);
 #endif
-                   break;
-           default:
-                   proto_tree_add_text(pimopt_tree, tvb, offset, -1,
-                       "Unknown IP version %d", (v_hl & 0xf0) >> 4);
-                   break;
-           }
-           break;
-         }
-
-       case 2: /* register-stop */
-         {
-           int advance;
-           const char *s;
-
-           s = dissect_pim_addr(tvb, offset, pimv2_group, &advance);
-           if (s == NULL)
-               break;
-           proto_tree_add_text(pimopt_tree, tvb, offset, advance, "Group: %s", s);
-           offset += advance;
-           s = dissect_pim_addr(tvb, offset, pimv2_unicast, &advance);
-           if (s == NULL)
-               break;
-           proto_tree_add_text(pimopt_tree, tvb, offset, advance, "Source: %s", s);
-           break;
-         }
-
-       case 3: /* join/prune */
-       case 6: /* graft */
-       case 7: /* graft-ack */
-         {
-           int advance;
-           int off;
-           const char *s;
-           int ngroup, i, njoin, nprune, j;
-           guint16 holdtime;
-           proto_tree *grouptree = NULL;
-           proto_item *tigroup;
-           proto_tree *subtree = NULL;
-           proto_item *tisub;
-
-               s = dissect_pim_addr(tvb, offset, pimv2_unicast, &advance);
-               if (s == NULL)
-                   break;
-               proto_tree_add_text(pimopt_tree, tvb, offset, advance,
-                   "Upstream-neighbor: %s", s);
-               offset += advance;
-
-           offset += 1;        /* skip reserved field */
-
-           ngroup = tvb_get_guint8(tvb, offset);
-           proto_tree_add_text(pimopt_tree, tvb, offset, 1,
-               "Groups: %u", ngroup);
-           offset += 1;
-
-               holdtime = tvb_get_ntohs(tvb, offset);
-               proto_tree_add_text(pimopt_tree, tvb, offset, 2,
-                   "Holdtime: %u%s", holdtime,
-                   holdtime == 0xffff ? " (infty)" : "");
-
-           offset += 2;
-
-           for (i = 0; i < ngroup; i++) {
-               s = dissect_pim_addr(tvb, offset, pimv2_group, &advance);
-               if (s == NULL)
-                   goto breakbreak3;
-               tigroup = proto_tree_add_text(pimopt_tree, tvb, offset, advance,
-                   "Group %d: %s", i, s);
-               grouptree = proto_item_add_subtree(tigroup, ett_pim);
-               offset += advance;
-
-               njoin = tvb_get_ntohs(tvb, offset);
-               nprune = tvb_get_ntohs(tvb, offset + 2);
-
-               tisub = proto_tree_add_text(grouptree, tvb, offset, 2,
-                   "Join: %d", njoin);
-               subtree = proto_item_add_subtree(tisub, ett_pim);
-               off = offset + 4;
-               for (j = 0; j < njoin; j++) {
-                   s = dissect_pim_addr(tvb, off, pimv2_source,
-                       &advance);
-                   if (s == NULL)
-                       goto breakbreak3;
-                   proto_tree_add_text(subtree, tvb, off, advance,
-                       "IP address: %s", s);
-                   off += advance;
-               }
-
-               tisub = proto_tree_add_text(grouptree, tvb, offset + 2, 2,
-                   "Prune: %d", nprune);
-               subtree = proto_item_add_subtree(tisub, ett_pim);
-               for (j = 0; j < nprune; j++) {
-                   s = dissect_pim_addr(tvb, off, pimv2_source,
-                       &advance);
-                   if (s == NULL)
-                       goto breakbreak3;
-                   proto_tree_add_text(subtree, tvb, off, advance,
-                       "IP address: %s", s);
-                   off += advance;
-               }
-               offset = off;
-           }
+            break;
+        default:
+            proto_tree_add_text(pimopt_tree, tvb, offset, -1,
+                                "Unknown IP version %d", (v_hl & 0xf0) >> 4);
+            break;
+        }
+        break;
+    }
+
+    case 2:     /* register-stop */
+    {
+        int advance;
+        const char *s;
+
+        s = dissect_pim_addr(tvb, offset, pimv2_group, &advance);
+        if (s == NULL)
+            break;
+        proto_tree_add_text(pimopt_tree, tvb, offset, advance, "Group: %s", s);
+        offset += advance;
+        s = dissect_pim_addr(tvb, offset, pimv2_unicast, &advance);
+        if (s == NULL)
+            break;
+        proto_tree_add_text(pimopt_tree, tvb, offset, advance, "Source: %s", s);
+        break;
+    }
+
+    case 3:     /* join/prune */
+    case 6:     /* graft */
+    case 7:     /* graft-ack */
+    {
+        int advance;
+        int off;
+        const char *s;
+        int ngroup, i, njoin, nprune, j;
+        guint16 holdtime;
+        proto_tree *grouptree = NULL;
+        proto_item *tigroup;
+        proto_tree *subtree = NULL;
+        proto_item *tisub;
+
+        s = dissect_pim_addr(tvb, offset, pimv2_unicast, &advance);
+        if (s == NULL)
+            break;
+        proto_tree_add_text(pimopt_tree, tvb, offset, advance,
+                            "Upstream-neighbor: %s", s);
+        offset += advance;
+
+        offset += 1;    /* skip reserved field */
+
+        ngroup = tvb_get_guint8(tvb, offset);
+        proto_tree_add_text(pimopt_tree, tvb, offset, 1,
+                            "Groups: %u", ngroup);
+        offset += 1;
+
+        holdtime = tvb_get_ntohs(tvb, offset);
+        proto_tree_add_text(pimopt_tree, tvb, offset, 2,
+                            "Holdtime: %u%s", holdtime,
+                            holdtime == 0xffff ? " (infty)" : "");
+
+        offset += 2;
+
+        for (i = 0; i < ngroup; i++) {
+            s = dissect_pim_addr(tvb, offset, pimv2_group, &advance);
+            if (s == NULL)
+                goto breakbreak3;
+            tigroup = proto_tree_add_text(pimopt_tree, tvb, offset, advance,
+                                          "Group %d: %s", i, s);
+            grouptree = proto_item_add_subtree(tigroup, ett_pim);
+            offset += advance;
+
+            njoin = tvb_get_ntohs(tvb, offset);
+            nprune = tvb_get_ntohs(tvb, offset + 2);
+
+            tisub = proto_tree_add_text(grouptree, tvb, offset, 2,
+                                        "Join: %d", njoin);
+            subtree = proto_item_add_subtree(tisub, ett_pim);
+            off = offset + 4;
+            for (j = 0; j < njoin; j++) {
+                s = dissect_pim_addr(tvb, off, pimv2_source,
+                                     &advance);
+                if (s == NULL)
+                    goto breakbreak3;
+                proto_tree_add_text(subtree, tvb, off, advance,
+                                    "IP address: %s", s);
+                off += advance;
+            }
+
+            tisub = proto_tree_add_text(grouptree, tvb, offset + 2, 2,
+                                        "Prune: %d", nprune);
+            subtree = proto_item_add_subtree(tisub, ett_pim);
+            for (j = 0; j < nprune; j++) {
+                s = dissect_pim_addr(tvb, off, pimv2_source,
+                                     &advance);
+                if (s == NULL)
+                    goto breakbreak3;
+                proto_tree_add_text(subtree, tvb, off, advance,
+                                    "IP address: %s", s);
+                off += advance;
+            }
+            offset = off;
+        }
     breakbreak3:
-           break;
-         }
-
-       case 4: /* bootstrap */
-         {
-           const char *s;
-           int advance;
-           int i, j;
-           int frpcnt;
-           guint16 holdtime;
-           proto_tree *grouptree = NULL;
-           proto_item *tigroup;
-
-           proto_tree_add_text(pimopt_tree, tvb, offset, 2,
-               "Fragment tag: 0x%04x", tvb_get_ntohs(tvb, offset));
-           offset += 2;
-
-           proto_tree_add_text(pimopt_tree, tvb, offset, 1,
-               "Hash mask len: %u", tvb_get_guint8(tvb, offset));
-           offset += 1;
-           proto_tree_add_text(pimopt_tree, tvb, offset, 1,
-               "BSR priority: %u", tvb_get_guint8(tvb, offset));
-           offset += 1;
-
-           s = dissect_pim_addr(tvb, offset, pimv2_unicast, &advance);
-           if (s == NULL)
-               break;
-           proto_tree_add_text(pimopt_tree, tvb, offset, advance, "BSR: %s", s);
-           offset += advance;
-
-           for (i = 0; tvb_reported_length_remaining(tvb, offset) > 0; i++) {
-               s = dissect_pim_addr(tvb, offset, pimv2_group, &advance);
-               if (s == NULL)
-                   goto breakbreak4;
-               tigroup = proto_tree_add_text(pimopt_tree, tvb, offset, advance,
-                   "Group %d: %s", i, s);
-               grouptree = proto_item_add_subtree(tigroup, ett_pim);
-               offset += advance;
-
-               proto_tree_add_text(grouptree, tvb, offset, 1,
-                   "RP count: %u", tvb_get_guint8(tvb, offset));
-               offset += 1;
-               frpcnt = tvb_get_guint8(tvb, offset);
-               proto_tree_add_text(grouptree, tvb, offset, 1,
-                   "FRP count: %u", frpcnt);
-               offset += 3;
-
-               for (j = 0; j < frpcnt; j++) {
-                   s = dissect_pim_addr(tvb, offset, pimv2_unicast, &advance);
-                   if (s == NULL)
-                       goto breakbreak4;
-                   proto_tree_add_text(grouptree, tvb, offset, advance,
-                       "RP %d: %s", j, s);
-                   offset += advance;
-
-                   holdtime = tvb_get_ntohs(tvb, offset);
-                   proto_tree_add_text(grouptree, tvb, offset, 2,
-                       "Holdtime: %u%s", holdtime,
-                       holdtime == 0xffff ? " (infty)" : "");
-                   offset += 2;
-                   proto_tree_add_text(grouptree, tvb, offset, 1,
-                       "Priority: %u", tvb_get_guint8(tvb, offset));
-                   offset += 2;        /* also skips reserved field */
-               }
-           }
+        break;
+    }
+
+    case 4:     /* bootstrap */
+    {
+        const char *s;
+        int advance;
+        int i, j;
+        int frpcnt;
+        guint16 holdtime;
+        proto_tree *grouptree = NULL;
+        proto_item *tigroup;
+
+        proto_tree_add_text(pimopt_tree, tvb, offset, 2,
+                            "Fragment tag: 0x%04x", tvb_get_ntohs(tvb, offset));
+        offset += 2;
+
+        proto_tree_add_text(pimopt_tree, tvb, offset, 1,
+                            "Hash mask len: %u", tvb_get_guint8(tvb, offset));
+        offset += 1;
+        proto_tree_add_text(pimopt_tree, tvb, offset, 1,
+                            "BSR priority: %u", tvb_get_guint8(tvb, offset));
+        offset += 1;
+
+        s = dissect_pim_addr(tvb, offset, pimv2_unicast, &advance);
+        if (s == NULL)
+            break;
+        proto_tree_add_text(pimopt_tree, tvb, offset, advance, "BSR: %s", s);
+        offset += advance;
+
+        for (i = 0; tvb_reported_length_remaining(tvb, offset) > 0; i++) {
+            s = dissect_pim_addr(tvb, offset, pimv2_group, &advance);
+            if (s == NULL)
+                goto breakbreak4;
+            tigroup = proto_tree_add_text(pimopt_tree, tvb, offset, advance,
+                                          "Group %d: %s", i, s);
+            grouptree = proto_item_add_subtree(tigroup, ett_pim);
+            offset += advance;
+
+            proto_tree_add_text(grouptree, tvb, offset, 1,
+                                "RP count: %u", tvb_get_guint8(tvb, offset));
+            offset += 1;
+            frpcnt = tvb_get_guint8(tvb, offset);
+            proto_tree_add_text(grouptree, tvb, offset, 1,
+                                "FRP count: %u", frpcnt);
+            offset += 3;
+
+            for (j = 0; j < frpcnt; j++) {
+                s = dissect_pim_addr(tvb, offset, pimv2_unicast, &advance);
+                if (s == NULL)
+                    goto breakbreak4;
+                proto_tree_add_text(grouptree, tvb, offset, advance,
+                                    "RP %d: %s", j, s);
+                offset += advance;
+
+                holdtime = tvb_get_ntohs(tvb, offset);
+                proto_tree_add_text(grouptree, tvb, offset, 2,
+                                    "Holdtime: %u%s", holdtime,
+                                    holdtime == 0xffff ? " (infty)" : "");
+                offset += 2;
+                proto_tree_add_text(grouptree, tvb, offset, 1,
+                                    "Priority: %u", tvb_get_guint8(tvb, offset));
+                offset += 2;    /* also skips reserved field */
+            }
+        }
 
     breakbreak4:
-           break;
-         }
-
-       case 5: /* assert */
-         {
-           const char *s;
-           int advance;
-
-           s = dissect_pim_addr(tvb, offset, pimv2_group, &advance);
-           if (s == NULL)
-               break;
-           proto_tree_add_text(pimopt_tree, tvb, offset, advance, "Group: %s", s);
-           offset += advance;
-
-           s = dissect_pim_addr(tvb, offset, pimv2_unicast, &advance);
-           if (s == NULL)
-               break;
-           proto_tree_add_text(pimopt_tree, tvb, offset, advance, "Source: %s", s);
-           offset += advance;
-
-           proto_tree_add_text(pimopt_tree, tvb, offset, 1, "%s",
-               decode_boolean_bitfield(tvb_get_guint8(tvb, offset), 0x80, 8,
-                   "RP Tree", "Not RP Tree"));
-           proto_tree_add_text(pimopt_tree, tvb, offset, 4, "Preference: %u",
-               tvb_get_ntohl(tvb, offset) & 0x7fffffff);
-           offset += 4;
-
-           proto_tree_add_text(pimopt_tree, tvb, offset, 4, "Metric: %u",
-               tvb_get_ntohl(tvb, offset));
-
-           break;
-         }
-
-       case 8: /* Candidate-RP-Advertisement */
-         {
-           const char *s;
-           int advance;
-           int pfxcnt;
-           guint16 holdtime;
-           int i;
-
-           pfxcnt = tvb_get_guint8(tvb, offset);
-           proto_tree_add_text(pimopt_tree, tvb, offset, 1,
-               "Prefix-count: %u", pfxcnt);
-           offset += 1;
-           proto_tree_add_text(pimopt_tree, tvb, offset, 1,
-               "Priority: %u", tvb_get_guint8(tvb, offset));
-           offset += 1;
-           holdtime = tvb_get_ntohs(tvb, offset);
-           proto_tree_add_text(pimopt_tree, tvb, offset, 2,
-               "Holdtime: %u%s", holdtime,
-               holdtime == 0xffff ? " (infty)" : "");
-           offset += 2;
-
-           s = dissect_pim_addr(tvb, offset, pimv2_unicast, &advance);
-           if (s == NULL)
-               break;
-           proto_tree_add_text(pimopt_tree, tvb, offset, advance, "RP: %s", s);
-           offset += advance;
-
-           for (i = 0; i < pfxcnt; i++) {
-               s = dissect_pim_addr(tvb, offset, pimv2_group, &advance);
-               if (s == NULL)
-                   goto breakbreak8;
-               proto_tree_add_text(pimopt_tree, tvb, offset, advance,
-                   "Group %d: %s", i, s);
-               offset += advance;
-           }
+        break;
+    }
+
+    case 5:     /* assert */
+    {
+        const char *s;
+        int advance;
+
+        s = dissect_pim_addr(tvb, offset, pimv2_group, &advance);
+        if (s == NULL)
+            break;
+        proto_tree_add_text(pimopt_tree, tvb, offset, advance, "Group: %s", s);
+        offset += advance;
+
+        s = dissect_pim_addr(tvb, offset, pimv2_unicast, &advance);
+        if (s == NULL)
+            break;
+        proto_tree_add_text(pimopt_tree, tvb, offset, advance, "Source: %s", s);
+        offset += advance;
+
+        proto_tree_add_text(pimopt_tree, tvb, offset, 1, "%s",
+                            decode_boolean_bitfield(tvb_get_guint8(tvb, offset), 0x80, 8,
+                                                    "RP Tree", "Not RP Tree"));
+        proto_tree_add_text(pimopt_tree, tvb, offset, 4, "Preference: %u",
+                            tvb_get_ntohl(tvb, offset) & 0x7fffffff);
+        offset += 4;
+
+        proto_tree_add_text(pimopt_tree, tvb, offset, 4, "Metric: %u",
+                            tvb_get_ntohl(tvb, offset));
+
+        break;
+    }
+
+    case 8:     /* Candidate-RP-Advertisement */
+    {
+        const char *s;
+        int advance;
+        int pfxcnt;
+        guint16 holdtime;
+        int i;
+
+        pfxcnt = tvb_get_guint8(tvb, offset);
+        proto_tree_add_text(pimopt_tree, tvb, offset, 1,
+                            "Prefix-count: %u", pfxcnt);
+        offset += 1;
+        proto_tree_add_text(pimopt_tree, tvb, offset, 1,
+                            "Priority: %u", tvb_get_guint8(tvb, offset));
+        offset += 1;
+        holdtime = tvb_get_ntohs(tvb, offset);
+        proto_tree_add_text(pimopt_tree, tvb, offset, 2,
+                            "Holdtime: %u%s", holdtime,
+                            holdtime == 0xffff ? " (infty)" : "");
+        offset += 2;
+
+        s = dissect_pim_addr(tvb, offset, pimv2_unicast, &advance);
+        if (s == NULL)
+            break;
+        proto_tree_add_text(pimopt_tree, tvb, offset, advance, "RP: %s", s);
+        offset += advance;
+
+        for (i = 0; i < pfxcnt; i++) {
+            s = dissect_pim_addr(tvb, offset, pimv2_group, &advance);
+            if (s == NULL)
+                goto breakbreak8;
+            proto_tree_add_text(pimopt_tree, tvb, offset, advance,
+                                "Group %d: %s", i, s);
+            offset += advance;
+        }
     breakbreak8:
-           break;
-         }
-
-       case 9: /* State-Refresh */
-         {
-           const char *s;
-           int advance;
-
-           s = dissect_pim_addr(tvb, offset, pimv2_group, &advance);
-           if (s == NULL)
-               break;
-           proto_tree_add_text(pimopt_tree, tvb, offset, advance,
-               "Group: %s", s);
-           offset += advance;
-
-           s = dissect_pim_addr(tvb, offset, pimv2_unicast, &advance);
-           if (s == NULL)
-               break;
-           proto_tree_add_text(pimopt_tree, tvb, offset, advance,
-               "Source: %s", s);
-           offset += advance;
-
-           s = dissect_pim_addr(tvb, offset, pimv2_unicast, &advance);
-           if (s == NULL)
-               break;
-           proto_tree_add_text(pimopt_tree, tvb, offset, advance,
-               "Originator: %s", s);
-           offset += advance;
-
-           proto_tree_add_text(pimopt_tree, tvb, offset, 1, "Rendezvous Point Tree %s",
-               decode_boolean_bitfield(tvb_get_guint8(tvb, offset), 1, 1,
-                   "set", "clear"));
-           proto_tree_add_text(pimopt_tree, tvb, offset, 4,
-               "Metric Preference: %u", tvb_get_ntohl(tvb, offset) & 0x7FFFFFFF);
-           offset += 4;
-
-           proto_tree_add_text(pimopt_tree, tvb, offset, 4,
-               "Metric: %u", tvb_get_ntohl(tvb, offset));
-           offset += 4;
-
-           proto_tree_add_text(pimopt_tree, tvb, offset, 1,
-               "Masklen: %u", tvb_get_guint8(tvb, offset));
-           offset += 1;
-
-           proto_tree_add_text(pimopt_tree, tvb, offset, 1,
-               "TTL: %u", tvb_get_guint8(tvb, offset));
-           offset += 1;
-
-           proto_tree_add_text(pimopt_tree, tvb, offset, 1, "Prune indicator %s",
-               decode_boolean_bitfield(tvb_get_guint8(tvb, offset), 0x80, 8,
-                   "set", "clear"));
-           proto_tree_add_text(pimopt_tree, tvb, offset, 1, "Prune now %s",
-               decode_boolean_bitfield(tvb_get_guint8(tvb, offset), 0x40, 8,
-                   "set", "clear"));
-           proto_tree_add_text(pimopt_tree, tvb, offset, 1, "Assert override %s",
-               decode_boolean_bitfield(tvb_get_guint8(tvb, offset), 0x20, 8,
-                   "set", "clear"));
-           offset += 1;
-
-           proto_tree_add_text(pimopt_tree, tvb, offset, 1,
-               "Interval: %u", tvb_get_guint8(tvb, offset));
-           offset += 1;
-
-           break;
-         }
-
-       default:
-           break;
-       }
+        break;
+    }
+
+    case 9:     /* State-Refresh */
+    {
+        const char *s;
+        int advance;
+
+        s = dissect_pim_addr(tvb, offset, pimv2_group, &advance);
+        if (s == NULL)
+            break;
+        proto_tree_add_text(pimopt_tree, tvb, offset, advance,
+                            "Group: %s", s);
+        offset += advance;
+
+        s = dissect_pim_addr(tvb, offset, pimv2_unicast, &advance);
+        if (s == NULL)
+            break;
+        proto_tree_add_text(pimopt_tree, tvb, offset, advance,
+                            "Source: %s", s);
+        offset += advance;
+
+        s = dissect_pim_addr(tvb, offset, pimv2_unicast, &advance);
+        if (s == NULL)
+            break;
+        proto_tree_add_text(pimopt_tree, tvb, offset, advance,
+                            "Originator: %s", s);
+        offset += advance;
+
+        proto_tree_add_text(pimopt_tree, tvb, offset, 1, "Rendezvous Point Tree %s",
+                            decode_boolean_bitfield(tvb_get_guint8(tvb, offset), 1, 1,
+                                                    "set", "clear"));
+        proto_tree_add_text(pimopt_tree, tvb, offset, 4,
+                            "Metric Preference: %u", tvb_get_ntohl(tvb, offset) & 0x7FFFFFFF);
+        offset += 4;
+
+        proto_tree_add_text(pimopt_tree, tvb, offset, 4,
+                            "Metric: %u", tvb_get_ntohl(tvb, offset));
+        offset += 4;
+
+        proto_tree_add_text(pimopt_tree, tvb, offset, 1,
+                            "Masklen: %u", tvb_get_guint8(tvb, offset));
+        offset += 1;
+
+        proto_tree_add_text(pimopt_tree, tvb, offset, 1,
+                            "TTL: %u", tvb_get_guint8(tvb, offset));
+        offset += 1;
+
+        proto_tree_add_text(pimopt_tree, tvb, offset, 1, "Prune indicator %s",
+                            decode_boolean_bitfield(tvb_get_guint8(tvb, offset), 0x80, 8,
+                                                    "set", "clear"));
+        proto_tree_add_text(pimopt_tree, tvb, offset, 1, "Prune now %s",
+                            decode_boolean_bitfield(tvb_get_guint8(tvb, offset), 0x40, 8,
+                                                    "set", "clear"));
+        proto_tree_add_text(pimopt_tree, tvb, offset, 1, "Assert override %s",
+                            decode_boolean_bitfield(tvb_get_guint8(tvb, offset), 0x20, 8,
+                                                    "set", "clear"));
+        offset += 1;
+
+        proto_tree_add_text(pimopt_tree, tvb, offset, 1,
+                            "Interval: %u", tvb_get_guint8(tvb, offset));
+        offset += 1;
+
+        break;
+    }
+
+    default:
+        break;
+    }
 done:;
 }
 
 void
 proto_register_pim(void)
 {
-       static hf_register_info hf[] =
-       {
-       { &hf_pim_version,
-               { "Version", "pim.version",
-               FT_UINT8, BASE_DEC, NULL, 0xf0,
-               NULL, HFILL }
-       },
-       { &hf_pim_type,
-               { "Type", "pim.type",
-               FT_UINT8, BASE_DEC, VALS(type2vals), 0x0f,
-               NULL, HFILL }
-       },
-       { &hf_pim_code,
-               { "Code", "pim.code",
-               FT_UINT8, BASE_DEC, VALS(type1vals), 0x0,
-               NULL, HFILL }
-       },
-       { &hf_pim_cksum,
-               { "Checksum", "pim.cksum",
-               FT_UINT16, BASE_HEX, NULL, 0x0,
-               NULL, HFILL }
-       },
-       { &hf_pim_res_bytes,
-               { "Reserved byte(s)", "pim.res_bytes",
-               FT_BYTES, BASE_NONE, NULL, 0x0,
-               NULL, HFILL }
-       },
-    };
+    static hf_register_info hf[] =
+        {
+            { &hf_pim_version,
+              { "Version", "pim.version",
+                FT_UINT8, BASE_DEC, NULL, 0xf0,
+                NULL, HFILL }
+            },
+            { &hf_pim_type,
+              { "Type", "pim.type",
+                FT_UINT8, BASE_DEC, VALS(type2vals), 0x0f,
+                NULL, HFILL }
+            },
+            { &hf_pim_code,
+              { "Code", "pim.code",
+                FT_UINT8, BASE_DEC, VALS(type1vals), 0x0,
+                NULL, HFILL }
+            },
+            { &hf_pim_cksum,
+              { "Checksum", "pim.cksum",
+                FT_UINT16, BASE_HEX, NULL, 0x0,
+                NULL, HFILL }
+            },
+            { &hf_pim_res_bytes,
+              { "Reserved byte(s)", "pim.res_bytes",
+                FT_BYTES, BASE_NONE, NULL, 0x0,
+                NULL, HFILL }
+            },
+        };
     static gint *ett[] = {
         &ett_pim,
     };
 
     proto_pim = proto_register_protocol("Protocol Independent Multicast",
-       "PIM", "pim");
+                                        "PIM", "pim");
     proto_register_field_array(proto_pim, hf, array_length(hf));
     proto_register_subtree_array(ett, array_length(ett));
 }
index 149ed45ff6dac566f621af004fde17082dd13aa3..e4e031fda736adfd99709968c838ee03e4e376fa 100644 (file)
@@ -52,7 +52,7 @@
 
 
 /**********************************************************/
-/* Port definition's for PTP                                                     */
+/* Port definition's for PTP                              */
 /**********************************************************/
 #define EVENT_PORT_PTP      319
 #define GENERAL_PORT_PTP    320
@@ -67,405 +67,408 @@ static int proto_ptp = -1;
 
 
 /**********************************************************/
-/* Offsets of fields within a PTPv1 packet.                              */
+/* Offsets of fields within a PTPv1 packet.               */
 /**********************************************************/
 
 /*Common offsets for all Messages (Synch, Delay_Req, Follow_Up, Delay_Resp ....)*/
-#define        PTP_VERSIONPTP_OFFSET                   0
-#define        PTP_VERSIONNETWORK_OFFSET               2
-#define        PTP_SUBDOMAIN_OFFSET                    4
-#define        PTP_MESSAGETYPE_OFFSET                  20
-#define        PTP_SOURCECOMMUNICATIONTECHNOLOGY_OFFSET        21
-#define        PTP_SOURCEUUID_OFFSET                   22
-#define        PTP_SOURCEPORTID_OFFSET                 28
-#define        PTP_SEQUENCEID_OFFSET                   30
-#define        PTP_CONTROL_OFFSET                              32
-#define        PTP_FLAGS_OFFSET                                34
-#define        PTP_FLAGS_LI61_OFFSET                   34
-#define        PTP_FLAGS_LI59_OFFSET                   34
-#define        PTP_FLAGS_BOUNDARY_CLOCK_OFFSET 34
-#define        PTP_FLAGS_ASSIST_OFFSET                 34
-#define        PTP_FLAGS_EXT_SYNC_OFFSET               34
-#define        PTP_FLAGS_PARENT_STATS_OFFSET   34
-#define        PTP_FLAGS_SYNC_BURST_OFFSET             34
+#define PTP_VERSIONPTP_OFFSET                        0
+#define PTP_VERSIONNETWORK_OFFSET                    2
+#define PTP_SUBDOMAIN_OFFSET                         4
+#define PTP_MESSAGETYPE_OFFSET                      20
+#define PTP_SOURCECOMMUNICATIONTECHNOLOGY_OFFSET    21
+#define PTP_SOURCEUUID_OFFSET                       22
+#define PTP_SOURCEPORTID_OFFSET                     28
+#define PTP_SEQUENCEID_OFFSET                       30
+#define PTP_CONTROL_OFFSET                          32
+#define PTP_FLAGS_OFFSET                            34
+#define PTP_FLAGS_LI61_OFFSET                       34
+#define PTP_FLAGS_LI59_OFFSET                       34
+#define PTP_FLAGS_BOUNDARY_CLOCK_OFFSET             34
+#define PTP_FLAGS_ASSIST_OFFSET                     34
+#define PTP_FLAGS_EXT_SYNC_OFFSET                   34
+#define PTP_FLAGS_PARENT_STATS_OFFSET               34
+#define PTP_FLAGS_SYNC_BURST_OFFSET                 34
 
 /*Offsets for PTP_Sync and Delay_Req (=SDR) messages*/
-#define PTP_SDR_ORIGINTIMESTAMP_OFFSET                                         40
-#define        PTP_SDR_ORIGINTIMESTAMP_SECONDS_OFFSET                          40
-#define        PTP_SDR_ORIGINTIMESTAMP_NANOSECONDS_OFFSET                      44
-#define        PTP_SDR_EPOCHNUMBER_OFFSET                                                      48
-#define        PTP_SDR_CURRENTUTCOFFSET_OFFSET                                         50
-#define        PTP_SDR_GRANDMASTERCOMMUNICATIONTECHNOLOGY_OFFSET       53
-#define        PTP_SDR_GRANDMASTERCLOCKUUID_OFFSET                                     54
-#define        PTP_SDR_GRANDMASTERPORTID_OFFSET                                        60
-#define        PTP_SDR_GRANDMASTERSEQUENCEID_OFFSET                            62
-#define        PTP_SDR_GRANDMASTERCLOCKSTRATUM_OFFSET                          67
-#define        PTP_SDR_GRANDMASTERCLOCKIDENTIFIER_OFFSET                       68
-#define        PTP_SDR_GRANDMASTERCLOCKVARIANCE_OFFSET                         74
-#define        PTP_SDR_GRANDMASTERPREFERRED_OFFSET                                     77
-#define        PTP_SDR_GRANDMASTERISBOUNDARYCLOCK_OFFSET                       79
-#define        PTP_SDR_SYNCINTERVAL_OFFSET                                                     83
-#define        PTP_SDR_LOCALCLOCKVARIANCE_OFFSET                                       86
-#define        PTP_SDR_LOCALSTEPSREMOVED_OFFSET                                        90
-#define        PTP_SDR_LOCALCLOCKSTRATUM_OFFSET                                        95
-#define        PTP_SDR_LOCALCLOCKIDENTIFIER_OFFSET                                     96
-#define        PTP_SDR_PARENTCOMMUNICATIONTECHNOLOGY_OFFSET            101
-#define        PTP_SDR_PARENTUUID_OFFSET                                                       102
-#define        PTP_SDR_PARENTPORTFIELD_OFFSET                                          110
-#define        PTP_SDR_ESTIMATEDMASTERVARIANCE_OFFSET                          114
-#define        PTP_SDR_ESTIMATEDMASTERDRIFT_OFFSET                                     116
-#define        PTP_SDR_UTCREASONABLE_OFFSET                                            123
+#define PTP_SDR_ORIGINTIMESTAMP_OFFSET                       40
+#define PTP_SDR_ORIGINTIMESTAMP_SECONDS_OFFSET               40
+#define PTP_SDR_ORIGINTIMESTAMP_NANOSECONDS_OFFSET           44
+#define PTP_SDR_EPOCHNUMBER_OFFSET                           48
+#define PTP_SDR_CURRENTUTCOFFSET_OFFSET                      50
+#define PTP_SDR_GRANDMASTERCOMMUNICATIONTECHNOLOGY_OFFSET    53
+#define PTP_SDR_GRANDMASTERCLOCKUUID_OFFSET                  54
+#define PTP_SDR_GRANDMASTERPORTID_OFFSET                     60
+#define PTP_SDR_GRANDMASTERSEQUENCEID_OFFSET                 62
+#define PTP_SDR_GRANDMASTERCLOCKSTRATUM_OFFSET               67
+#define PTP_SDR_GRANDMASTERCLOCKIDENTIFIER_OFFSET            68
+#define PTP_SDR_GRANDMASTERCLOCKVARIANCE_OFFSET              74
+#define PTP_SDR_GRANDMASTERPREFERRED_OFFSET                  77
+#define PTP_SDR_GRANDMASTERISBOUNDARYCLOCK_OFFSET            79
+#define PTP_SDR_SYNCINTERVAL_OFFSET                          83
+#define PTP_SDR_LOCALCLOCKVARIANCE_OFFSET                    86
+#define PTP_SDR_LOCALSTEPSREMOVED_OFFSET                     90
+#define PTP_SDR_LOCALCLOCKSTRATUM_OFFSET                     95
+#define PTP_SDR_LOCALCLOCKIDENTIFIER_OFFSET                  96
+#define PTP_SDR_PARENTCOMMUNICATIONTECHNOLOGY_OFFSET        101
+#define PTP_SDR_PARENTUUID_OFFSET                           102
+#define PTP_SDR_PARENTPORTFIELD_OFFSET                      110
+#define PTP_SDR_ESTIMATEDMASTERVARIANCE_OFFSET              114
+#define PTP_SDR_ESTIMATEDMASTERDRIFT_OFFSET                 116
+#define PTP_SDR_UTCREASONABLE_OFFSET                        123
 
 /*Offsets for Follow_Up (=FU) messages*/
-#define        PTP_FU_ASSOCIATEDSEQUENCEID_OFFSET                                      42
-#define        PTP_FU_PRECISEORIGINTIMESTAMP_OFFSET                            44
-#define        PTP_FU_PRECISEORIGINTIMESTAMP_SECONDS_OFFSET            44
-#define        PTP_FU_PRECISEORIGINTIMESTAMP_NANOSECONDS_OFFSET        48
+#define PTP_FU_ASSOCIATEDSEQUENCEID_OFFSET                   42
+#define PTP_FU_PRECISEORIGINTIMESTAMP_OFFSET                 44
+#define PTP_FU_PRECISEORIGINTIMESTAMP_SECONDS_OFFSET         44
+#define PTP_FU_PRECISEORIGINTIMESTAMP_NANOSECONDS_OFFSET     48
 
 /*Offsets for Delay_Resp (=DR) messages*/
-#define        PTP_DR_DELAYRECEIPTTIMESTAMP_OFFSET                                     40
-#define        PTP_DR_DELAYRECEIPTTIMESTAMP_SECONDS_OFFSET                     40
-#define        PTP_DR_DELAYRECEIPTTIMESTAMP_NANOSECONDS_OFFSET         44
-#define        PTP_DR_REQUESTINGSOURCECOMMUNICATIONTECHNOLOGY_OFFSET   49
-#define        PTP_DR_REQUESTINGSOURCEUUID_OFFSET                                      50
-#define        PTP_DR_REQUESTINGSOURCEPORTID_OFFSET                            56
-#define        PTP_DR_REQUESTINGSOURCESEQUENCEID_OFFSET                        58
+#define PTP_DR_DELAYRECEIPTTIMESTAMP_OFFSET                     40
+#define PTP_DR_DELAYRECEIPTTIMESTAMP_SECONDS_OFFSET             40
+#define PTP_DR_DELAYRECEIPTTIMESTAMP_NANOSECONDS_OFFSET         44
+#define PTP_DR_REQUESTINGSOURCECOMMUNICATIONTECHNOLOGY_OFFSET   49
+#define PTP_DR_REQUESTINGSOURCEUUID_OFFSET                      50
+#define PTP_DR_REQUESTINGSOURCEPORTID_OFFSET                    56
+#define PTP_DR_REQUESTINGSOURCESEQUENCEID_OFFSET                58
 
 /*Offsets for Management (=MM) messages*/
-#define        PTP_MM_TARGETCOMMUNICATIONTECHNOLOGY_OFFSET                     41
-#define        PTP_MM_TARGETUUID_OFFSET                                                        42
-#define        PTP_MM_TARGETPORTID_OFFSET                                                      48
-#define        PTP_MM_STARTINGBOUNDARYHOPS_OFFSET                                      50
-#define        PTP_MM_BOUNDARYHOPS_OFFSET                                                      52
-#define        PTP_MM_MANAGEMENTMESSAGEKEY_OFFSET                                      55
-#define        PTP_MM_PARAMETERLENGTH_OFFSET                                           58
-       /*PARAMETERLENGTH > 0*/
-#define        PTP_MM_MESSAGEPARAMETERS_OFFSET                                         60
-       /*PTP_MM_CLOCK_IDENTITY (PARAMETERLENGTH = 64)*/
-#define        PTP_MM_CLOCK_IDENTITY_CLOCKCOMMUNICATIONTECHNOLOGY_OFFSET       63
-#define        PTP_MM_CLOCK_IDENTITY_CLOCKUUIDFIELD_OFFSET                                     64
-#define        PTP_MM_CLOCK_IDENTITY_CLOCKPORTFIELD_OFFSET                                     74
-#define        PTP_MM_CLOCK_IDENTITY_MANUFACTURERIDENTITY_OFFSET                       76
-
-       /*PTP_MM_INITIALIZE_CLOCK (PARAMETERLENGTH = 4)*/
-#define        PTP_MM_INITIALIZE_CLOCK_INITIALISATIONKEY_OFFSET                        62
-
-       /*PTP_MM_SET_SUBDOMAIN (PARAMETERLENGTH = 16)*/
-#define        PTP_MM_SET_SUBDOMAIN_SUBDOMAINNAME_OFFSET                                       60
-
-       /*PTP_MM_DEFAULT_DATA_SET (PARAMETERLENGTH = 76)*/
-#define        PTP_MM_DEFAULT_DATA_SET_CLOCKCOMMUNICATIONTECHNOLOGY_OFFSET     63
-#define        PTP_MM_DEFAULT_DATA_SET_CLOCKUUIDFIELD_OFFSET                           64
-#define        PTP_MM_DEFAULT_DATA_SET_CLOCKPORTFIELD_OFFSET                           74
-#define        PTP_MM_DEFAULT_DATA_SET_CLOCKSTRATUM_OFFSET                                     79
-#define        PTP_MM_DEFAULT_DATA_SET_CLOCKIDENTIFIER_OFFSET                          80
-#define        PTP_MM_DEFAULT_DATA_SET_CLOCKVARIANCE_OFFSET                            86
-#define        PTP_MM_DEFAULT_DATA_SET_CLOCKFOLLOWUPCAPABLE_OFFSET                     89
-#define        PTP_MM_DEFAULT_DATA_SET_PREFERRED_OFFSET                                        95
-#define        PTP_MM_DEFAULT_DATA_SET_INITIALIZABLE_OFFSET                            99
-#define        PTP_MM_DEFAULT_DATA_SET_EXTERNALTIMING_OFFSET                           103
-#define        PTP_MM_DEFAULT_DATA_SET_ISBOUNDARYCLOCK_OFFSET                          107
-#define        PTP_MM_DEFAULT_DATA_SET_SYNCINTERVAL_OFFSET                                     111
-#define        PTP_MM_DEFAULT_DATA_SET_SUBDOMAINNAME_OFFSET                            112
-#define        PTP_MM_DEFAULT_DATA_SET_NUMBERPORTS_OFFSET                                      130
-#define        PTP_MM_DEFAULT_DATA_SET_NUMBERFOREIGNRECORDS_OFFSET                     134
-
-       /*PTP_MM_UPDATE_DEFAULT_DATA_SET (PARAMETERLENGTH = 36)*/
-#define        PTP_MM_UPDATE_DEFAULT_DATA_SET_CLOCKSTRATUM_OFFSET                      63
-#define        PTP_MM_UPDATE_DEFAULT_DATA_SET_CLOCKIDENTIFIER_OFFSET           64
-#define        PTP_MM_UPDATE_DEFAULT_DATA_SET_CLOCKVARIANCE_OFFSET                     70
-#define        PTP_MM_UPDATE_DEFAULT_DATA_SET_PREFERRED_OFFSET                         75
-#define        PTP_MM_UPDATE_DEFAULT_DATA_SET_SYNCINTERVAL_OFFSET                      79
-#define        PTP_MM_UPDATE_DEFAULT_DATA_SET_SUBDOMAINNAME_OFFSET                     80
-
-       /*PTP_MM_CURRENT_DATA_SET (PARAMETERLENGTH = 20)*/
-#define        PTP_MM_CURRENT_DATA_SET_STEPSREMOVED_OFFSET                                     62
-#define        PTP_MM_CURRENT_DATA_SET_OFFSETFROMMASTER_OFFSET                         64
-#define        PTP_MM_CURRENT_DATA_SET_OFFSETFROMMASTERSECONDS_OFFSET          64
-#define        PTP_MM_CURRENT_DATA_SET_OFFSETFROMMASTERNANOSECONDS_OFFSET      68
-#define        PTP_MM_CURRENT_DATA_SET_ONEWAYDELAY_OFFSET                                      72
-#define        PTP_MM_CURRENT_DATA_SET_ONEWAYDELAYSECONDS_OFFSET                       72
-#define        PTP_MM_CURRENT_DATA_SET_ONEWAYDELAYNANOSECONDS_OFFSET           76
-
-       /*PTP_MM_PARENT_DATA_SET (PARAMETERLENGTH = 90)*/
-#define        PTP_MM_PARENT_DATA_SET_PARENTCOMMUNICATIONTECHNOLOGY_OFFSET     63
-#define        PTP_MM_PARENT_DATA_SET_PARENTUUID_OFFSET                                        64
-#define        PTP_MM_PARENT_DATA_SET_PARENTPORTID_OFFSET                                      74
-#define        PTP_MM_PARENT_DATA_SET_PARENTLASTSYNCSEQUENCENUMBER_OFFSET      78
-#define        PTP_MM_PARENT_DATA_SET_PARENTFOLLOWUPCAPABLE_OFFSET                     83
-#define        PTP_MM_PARENT_DATA_SET_PARENTEXTERNALTIMING_OFFSET                      87
-#define        PTP_MM_PARENT_DATA_SET_PARENTVARIANCE_OFFSET                            90
-#define        PTP_MM_PARENT_DATA_SET_PARENTSTATS_OFFSET                                       95
-#define        PTP_MM_PARENT_DATA_SET_OBSERVEDVARIANCE_OFFSET                          98
-#define        PTP_MM_PARENT_DATA_SET_OBSERVEDDRIFT_OFFSET                                     100
-#define        PTP_MM_PARENT_DATA_SET_UTCREASONABLE_OFFSET                                     107
-#define        PTP_MM_PARENT_DATA_SET_GRANDMASTERCOMMUNICATIONTECHNOLOGY_OFFSET        111
-#define        PTP_MM_PARENT_DATA_SET_GRANDMASTERUUIDFIELD_OFFSET                      112
-#define        PTP_MM_PARENT_DATA_SET_GRANDMASTERPORTIDFIELD_OFFSET            122
-#define        PTP_MM_PARENT_DATA_SET_GRANDMASTERSTRATUM_OFFSET                        127
-#define        PTP_MM_PARENT_DATA_SET_GRANDMASTERIDENTIFIER_OFFSET                     128
-#define        PTP_MM_PARENT_DATA_SET_GRANDMASTERVARIANCE_OFFSET                       134
-#define        PTP_MM_PARENT_DATA_SET_GRANDMASTERPREFERRED_OFFSET                      139
-#define        PTP_MM_PARENT_DATA_SET_GRANDMASTERISBOUNDARYCLOCK_OFFSET        143
-#define        PTP_MM_PARENT_DATA_SET_GRANDMASTERSEQUENCENUMBER_OFFSET         146
-
-       /*PTP_MM_PORT_DATA_SET (PARAMETERLENGTH = 52)*/
-#define        PTP_MM_PORT_DATA_SET_RETURNEDPORTNUMBER_OFFSET                          62
-#define        PTP_MM_PORT_DATA_SET_PORTSTATE_OFFSET                                           67
-#define        PTP_MM_PORT_DATA_SET_LASTSYNCEVENTSEQUENCENUMBER_OFFSET         70
-#define        PTP_MM_PORT_DATA_SET_LASTGENERALEVENTSEQUENCENUMBER_OFFSET      74
-#define        PTP_MM_PORT_DATA_SET_PORTCOMMUNICATIONTECHNOLOGY_OFFSET         79
-#define        PTP_MM_PORT_DATA_SET_PORTUUIDFIELD_OFFSET                                       80
-#define        PTP_MM_PORT_DATA_SET_PORTIDFIELD_OFFSET                                         90
-#define        PTP_MM_PORT_DATA_SET_BURSTENABLED_OFFSET                                        95
-#define        PTP_MM_PORT_DATA_SET_SUBDOMAINADDRESSOCTETS_OFFSET                      97
-#define        PTP_MM_PORT_DATA_SET_EVENTPORTADDRESSOCTETS_OFFSET                      98
-#define        PTP_MM_PORT_DATA_SET_GENERALPORTADDRESSOCTETS_OFFSET            99
-#define        PTP_MM_PORT_DATA_SET_SUBDOMAINADDRESS_OFFSET                            100
-#define        PTP_MM_PORT_DATA_SET_EVENTPORTADDRESS_OFFSET                            106
-#define        PTP_MM_PORT_DATA_SET_GENERALPORTADDRESS_OFFSET                          110
-
-       /*PTP_MM_GLOBAL_TIME_DATA_SET (PARAMETERLENGTH = 24)*/
-#define        PTP_MM_GLOBAL_TIME_DATA_SET_LOCALTIME_OFFSET                            60
-#define        PTP_MM_GLOBAL_TIME_DATA_SET_LOCALTIMESECONDS_OFFSET                     60
-#define        PTP_MM_GLOBAL_TIME_DATA_SET_LOCALTIMENANOSECONDS_OFFSET         64
-#define        PTP_MM_GLOBAL_TIME_DATA_SET_CURRENTUTCOFFSET_OFFSET                     70
-#define        PTP_MM_GLOBAL_TIME_DATA_SET_LEAP59_OFFSET                                       75
-#define        PTP_MM_GLOBAL_TIME_DATA_SET_LEAP61_OFFSET                                       79
-#define        PTP_MM_GLOBAL_TIME_DATA_SET_EPOCHNUMBER_OFFSET                          82
-
-       /*PTP_MM_UPDATE_GLOBAL_TIME_PROPERTIES (PARAMETERLENGTH = 16)*/
-#define        PTP_MM_UPDATE_GLOBAL_TIME_PROPERTIES_CURRENTUTCOFFSET_OFFSET    62
-#define        PTP_MM_UPDATE_GLOBAL_TIME_PROPERTIES_LEAP59_OFFSET                      67
-#define        PTP_MM_UPDATE_GLOBAL_TIME_PROPERTIES_LEAP61_OFFSET                      71
-#define        PTP_MM_UPDATE_GLOBAL_TIME_PROPERTIES_EPOCHNUMBER_OFFSET         74
-
-       /*PTP_MM_GET_FOREIGN_DATA_SET (PARAMETERLENGTH = 4)*/
-#define        PTP_MM_GET_FOREIGN_DATA_SET_RECORDKEY_OFFSET                            62
-
-       /*PTP_MM_FOREIGN_DATA_SET (PARAMETERLENGTH = 28)*/
-#define        PTP_MM_FOREIGN_DATA_SET_RETURNEDPORTNUMBER_OFFSET                       62
-#define        PTP_MM_FOREIGN_DATA_SET_RETURNEDRECORDNUMBER_OFFSET                     66
-#define        PTP_MM_FOREIGN_DATA_SET_FOREIGNMASTERCOMMUNICATIONTECHNOLOGY_OFFSET     71
-#define        PTP_MM_FOREIGN_DATA_SET_FOREIGNMASTERUUIDFIELD_OFFSET           72
-#define        PTP_MM_FOREIGN_DATA_SET_FOREIGNMASTERPORTIDFIELD_OFFSET         82
-#define        PTP_MM_FOREIGN_DATA_SET_FOREIGNMASTERSYNCS_OFFSET                       86
-
-       /*PTP_MM_SET_SYNC_INTERVAL (PARAMETERLENGTH = 4)*/
-#define        PTP_MM_SET_SYNC_INTERVAL_SYNCINTERVAL_OFFSET                            62
-
-       /*PTP_MM_SET_TIME (PARAMETERLENGTH = 8)*/
-#define        PTP_MM_SET_TIME_LOCALTIME_OFFSET                                                        60
-#define        PTP_MM_SET_TIME_LOCALTIMESECONDS_OFFSET                                         60
-#define        PTP_MM_SET_TIME_LOCALTIMENANOSECONDS_OFFSET                                     64
+#define PTP_MM_TARGETCOMMUNICATIONTECHNOLOGY_OFFSET             41
+#define PTP_MM_TARGETUUID_OFFSET                                42
+#define PTP_MM_TARGETPORTID_OFFSET                              48
+#define PTP_MM_STARTINGBOUNDARYHOPS_OFFSET                      50
+#define PTP_MM_BOUNDARYHOPS_OFFSET                              52
+#define PTP_MM_MANAGEMENTMESSAGEKEY_OFFSET                      55
+#define PTP_MM_PARAMETERLENGTH_OFFSET                           58
+
+    /*PARAMETERLENGTH > 0*/
+#define PTP_MM_MESSAGEPARAMETERS_OFFSET                         60
+
+    /*PTP_MM_CLOCK_IDENTITY (PARAMETERLENGTH = 64)*/
+#define PTP_MM_CLOCK_IDENTITY_CLOCKCOMMUNICATIONTECHNOLOGY_OFFSET    63
+#define PTP_MM_CLOCK_IDENTITY_CLOCKUUIDFIELD_OFFSET                  64
+#define PTP_MM_CLOCK_IDENTITY_CLOCKPORTFIELD_OFFSET                  74
+#define PTP_MM_CLOCK_IDENTITY_MANUFACTURERIDENTITY_OFFSET            76
+
+    /*PTP_MM_INITIALIZE_CLOCK (PARAMETERLENGTH = 4)*/
+#define PTP_MM_INITIALIZE_CLOCK_INITIALISATIONKEY_OFFSET             62
+
+    /*PTP_MM_SET_SUBDOMAIN (PARAMETERLENGTH = 16)*/
+#define PTP_MM_SET_SUBDOMAIN_SUBDOMAINNAME_OFFSET                    60
+
+    /*PTP_MM_DEFAULT_DATA_SET (PARAMETERLENGTH = 76)*/
+#define PTP_MM_DEFAULT_DATA_SET_CLOCKCOMMUNICATIONTECHNOLOGY_OFFSET  63
+#define PTP_MM_DEFAULT_DATA_SET_CLOCKUUIDFIELD_OFFSET                64
+#define PTP_MM_DEFAULT_DATA_SET_CLOCKPORTFIELD_OFFSET                74
+#define PTP_MM_DEFAULT_DATA_SET_CLOCKSTRATUM_OFFSET                  79
+#define PTP_MM_DEFAULT_DATA_SET_CLOCKIDENTIFIER_OFFSET               80
+#define PTP_MM_DEFAULT_DATA_SET_CLOCKVARIANCE_OFFSET                 86
+#define PTP_MM_DEFAULT_DATA_SET_CLOCKFOLLOWUPCAPABLE_OFFSET          89
+#define PTP_MM_DEFAULT_DATA_SET_PREFERRED_OFFSET                     95
+#define PTP_MM_DEFAULT_DATA_SET_INITIALIZABLE_OFFSET                 99
+#define PTP_MM_DEFAULT_DATA_SET_EXTERNALTIMING_OFFSET               103
+#define PTP_MM_DEFAULT_DATA_SET_ISBOUNDARYCLOCK_OFFSET              107
+#define PTP_MM_DEFAULT_DATA_SET_SYNCINTERVAL_OFFSET                 111
+#define PTP_MM_DEFAULT_DATA_SET_SUBDOMAINNAME_OFFSET                112
+#define PTP_MM_DEFAULT_DATA_SET_NUMBERPORTS_OFFSET                  130
+#define PTP_MM_DEFAULT_DATA_SET_NUMBERFOREIGNRECORDS_OFFSET         134
+
+    /*PTP_MM_UPDATE_DEFAULT_DATA_SET (PARAMETERLENGTH = 36)*/
+#define PTP_MM_UPDATE_DEFAULT_DATA_SET_CLOCKSTRATUM_OFFSET           63
+#define PTP_MM_UPDATE_DEFAULT_DATA_SET_CLOCKIDENTIFIER_OFFSET        64
+#define PTP_MM_UPDATE_DEFAULT_DATA_SET_CLOCKVARIANCE_OFFSET          70
+#define PTP_MM_UPDATE_DEFAULT_DATA_SET_PREFERRED_OFFSET              75
+#define PTP_MM_UPDATE_DEFAULT_DATA_SET_SYNCINTERVAL_OFFSET           79
+#define PTP_MM_UPDATE_DEFAULT_DATA_SET_SUBDOMAINNAME_OFFSET          80
+
+    /*PTP_MM_CURRENT_DATA_SET (PARAMETERLENGTH = 20)*/
+#define PTP_MM_CURRENT_DATA_SET_STEPSREMOVED_OFFSET                  62
+#define PTP_MM_CURRENT_DATA_SET_OFFSETFROMMASTER_OFFSET              64
+#define PTP_MM_CURRENT_DATA_SET_OFFSETFROMMASTERSECONDS_OFFSET       64
+#define PTP_MM_CURRENT_DATA_SET_OFFSETFROMMASTERNANOSECONDS_OFFSET   68
+#define PTP_MM_CURRENT_DATA_SET_ONEWAYDELAY_OFFSET                   72
+#define PTP_MM_CURRENT_DATA_SET_ONEWAYDELAYSECONDS_OFFSET            72
+#define PTP_MM_CURRENT_DATA_SET_ONEWAYDELAYNANOSECONDS_OFFSET        76
+
+    /*PTP_MM_PARENT_DATA_SET (PARAMETERLENGTH = 90)*/
+#define PTP_MM_PARENT_DATA_SET_PARENTCOMMUNICATIONTECHNOLOGY_OFFSET  63
+#define PTP_MM_PARENT_DATA_SET_PARENTUUID_OFFSET                     64
+#define PTP_MM_PARENT_DATA_SET_PARENTPORTID_OFFSET                   74
+#define PTP_MM_PARENT_DATA_SET_PARENTLASTSYNCSEQUENCENUMBER_OFFSET   78
+#define PTP_MM_PARENT_DATA_SET_PARENTFOLLOWUPCAPABLE_OFFSET          83
+#define PTP_MM_PARENT_DATA_SET_PARENTEXTERNALTIMING_OFFSET           87
+#define PTP_MM_PARENT_DATA_SET_PARENTVARIANCE_OFFSET                 90
+#define PTP_MM_PARENT_DATA_SET_PARENTSTATS_OFFSET                    95
+#define PTP_MM_PARENT_DATA_SET_OBSERVEDVARIANCE_OFFSET               98
+#define PTP_MM_PARENT_DATA_SET_OBSERVEDDRIFT_OFFSET                 100
+#define PTP_MM_PARENT_DATA_SET_UTCREASONABLE_OFFSET                 107
+#define PTP_MM_PARENT_DATA_SET_GRANDMASTERCOMMUNICATIONTECHNOLOGY_OFFSET    111
+#define PTP_MM_PARENT_DATA_SET_GRANDMASTERUUIDFIELD_OFFSET          112
+#define PTP_MM_PARENT_DATA_SET_GRANDMASTERPORTIDFIELD_OFFSET        122
+#define PTP_MM_PARENT_DATA_SET_GRANDMASTERSTRATUM_OFFSET            127
+#define PTP_MM_PARENT_DATA_SET_GRANDMASTERIDENTIFIER_OFFSET         128
+#define PTP_MM_PARENT_DATA_SET_GRANDMASTERVARIANCE_OFFSET           134
+#define PTP_MM_PARENT_DATA_SET_GRANDMASTERPREFERRED_OFFSET          139
+#define PTP_MM_PARENT_DATA_SET_GRANDMASTERISBOUNDARYCLOCK_OFFSET    143
+#define PTP_MM_PARENT_DATA_SET_GRANDMASTERSEQUENCENUMBER_OFFSET     146
+
+    /*PTP_MM_PORT_DATA_SET (PARAMETERLENGTH = 52)*/
+#define PTP_MM_PORT_DATA_SET_RETURNEDPORTNUMBER_OFFSET               62
+#define PTP_MM_PORT_DATA_SET_PORTSTATE_OFFSET                        67
+#define PTP_MM_PORT_DATA_SET_LASTSYNCEVENTSEQUENCENUMBER_OFFSET      70
+#define PTP_MM_PORT_DATA_SET_LASTGENERALEVENTSEQUENCENUMBER_OFFSET   74
+#define PTP_MM_PORT_DATA_SET_PORTCOMMUNICATIONTECHNOLOGY_OFFSET      79
+#define PTP_MM_PORT_DATA_SET_PORTUUIDFIELD_OFFSET                    80
+#define PTP_MM_PORT_DATA_SET_PORTIDFIELD_OFFSET                      90
+#define PTP_MM_PORT_DATA_SET_BURSTENABLED_OFFSET                     95
+#define PTP_MM_PORT_DATA_SET_SUBDOMAINADDRESSOCTETS_OFFSET           97
+#define PTP_MM_PORT_DATA_SET_EVENTPORTADDRESSOCTETS_OFFSET           98
+#define PTP_MM_PORT_DATA_SET_GENERALPORTADDRESSOCTETS_OFFSET         99
+#define PTP_MM_PORT_DATA_SET_SUBDOMAINADDRESS_OFFSET                100
+#define PTP_MM_PORT_DATA_SET_EVENTPORTADDRESS_OFFSET                106
+#define PTP_MM_PORT_DATA_SET_GENERALPORTADDRESS_OFFSET              110
+
+    /*PTP_MM_GLOBAL_TIME_DATA_SET (PARAMETERLENGTH = 24)*/
+#define PTP_MM_GLOBAL_TIME_DATA_SET_LOCALTIME_OFFSET                 60
+#define PTP_MM_GLOBAL_TIME_DATA_SET_LOCALTIMESECONDS_OFFSET          60
+#define PTP_MM_GLOBAL_TIME_DATA_SET_LOCALTIMENANOSECONDS_OFFSET      64
+#define PTP_MM_GLOBAL_TIME_DATA_SET_CURRENTUTCOFFSET_OFFSET          70
+#define PTP_MM_GLOBAL_TIME_DATA_SET_LEAP59_OFFSET                    75
+#define PTP_MM_GLOBAL_TIME_DATA_SET_LEAP61_OFFSET                    79
+#define PTP_MM_GLOBAL_TIME_DATA_SET_EPOCHNUMBER_OFFSET               82
+
+    /*PTP_MM_UPDATE_GLOBAL_TIME_PROPERTIES (PARAMETERLENGTH = 16)*/
+#define PTP_MM_UPDATE_GLOBAL_TIME_PROPERTIES_CURRENTUTCOFFSET_OFFSET 62
+#define PTP_MM_UPDATE_GLOBAL_TIME_PROPERTIES_LEAP59_OFFSET           67
+#define PTP_MM_UPDATE_GLOBAL_TIME_PROPERTIES_LEAP61_OFFSET           71
+#define PTP_MM_UPDATE_GLOBAL_TIME_PROPERTIES_EPOCHNUMBER_OFFSET      74
+
+    /*PTP_MM_GET_FOREIGN_DATA_SET (PARAMETERLENGTH = 4)*/
+#define PTP_MM_GET_FOREIGN_DATA_SET_RECORDKEY_OFFSET                 62
+
+    /*PTP_MM_FOREIGN_DATA_SET (PARAMETERLENGTH = 28)*/
+#define PTP_MM_FOREIGN_DATA_SET_RETURNEDPORTNUMBER_OFFSET            62
+#define PTP_MM_FOREIGN_DATA_SET_RETURNEDRECORDNUMBER_OFFSET          66
+#define PTP_MM_FOREIGN_DATA_SET_FOREIGNMASTERCOMMUNICATIONTECHNOLOGY_OFFSET 71
+#define PTP_MM_FOREIGN_DATA_SET_FOREIGNMASTERUUIDFIELD_OFFSET        72
+#define PTP_MM_FOREIGN_DATA_SET_FOREIGNMASTERPORTIDFIELD_OFFSET      82
+#define PTP_MM_FOREIGN_DATA_SET_FOREIGNMASTERSYNCS_OFFSET            86
+
+    /*PTP_MM_SET_SYNC_INTERVAL (PARAMETERLENGTH = 4)*/
+#define PTP_MM_SET_SYNC_INTERVAL_SYNCINTERVAL_OFFSET                 62
+
+    /*PTP_MM_SET_TIME (PARAMETERLENGTH = 8)*/
+#define PTP_MM_SET_TIME_LOCALTIME_OFFSET                             60
+#define PTP_MM_SET_TIME_LOCALTIMESECONDS_OFFSET                      60
+#define PTP_MM_SET_TIME_LOCALTIMENANOSECONDS_OFFSET                  64
 
 /*END Offsets of fields within a PTP packet.*/
 
 /**********************************************************/
-/* flag-field-mask-definitions                                                           */
+/* flag-field-mask-definitions                            */
 /**********************************************************/
-#define        PTP_FLAGS_LI61_BITMASK                          0x01
-#define        PTP_FLAGS_LI59_BITMASK                          0x02
-#define        PTP_FLAGS_BOUNDARY_CLOCK_BITMASK        0x04
-#define        PTP_FLAGS_ASSIST_BITMASK                        0x08
-#define        PTP_FLAGS_EXT_SYNC_BITMASK                      0x10
-#define        PTP_FLAGS_PARENT_STATS_BITMASK          0x20
-#define        PTP_FLAGS_SYNC_BURST_BITMASK            0x40
+#define PTP_FLAGS_LI61_BITMASK              0x01
+#define PTP_FLAGS_LI59_BITMASK              0x02
+#define PTP_FLAGS_BOUNDARY_CLOCK_BITMASK    0x04
+#define PTP_FLAGS_ASSIST_BITMASK            0x08
+#define PTP_FLAGS_EXT_SYNC_BITMASK          0x10
+#define PTP_FLAGS_PARENT_STATS_BITMASK      0x20
+#define PTP_FLAGS_SYNC_BURST_BITMASK        0x40
 
 /*END flag-field-mask-definitions*/
 
 /**********************************************************/
-/* managementMessage definitions                                                 */
+/* managementMessage definitions                          */
 /**********************************************************/
-#define        PTP_MM_NULL                                                     0
-#define        PTP_MM_OBTAIN_IDENTITY                          1
-#define        PTP_MM_CLOCK_IDENTITY                           2
-#define        PTP_MM_INITIALIZE_CLOCK                         3
-#define        PTP_MM_SET_SUBDOMAIN                            4
-#define        PTP_MM_CLEAR_DESIGNATED_PREFERRED_MASTER        5
-#define        PTP_MM_SET_DESIGNATED_PREFERRED_MASTER          6
-#define        PTP_MM_GET_DEFAULT_DATA_SET                     7
-#define        PTP_MM_DEFAULT_DATA_SET                         8
-#define        PTP_MM_UPDATE_DEFAULT_DATA_SET          9
-#define        PTP_MM_GET_CURRENT_DATA_SET             10
-#define        PTP_MM_CURRENT_DATA_SET                         11
-#define        PTP_MM_GET_PARENT_DATA_SET                      12
-#define        PTP_MM_PARENT_DATA_SET                          13
-#define        PTP_MM_GET_PORT_DATA_SET                        14
-#define        PTP_MM_PORT_DATA_SET                            15
-#define        PTP_MM_GET_GLOBAL_TIME_DATA_SET         16
-#define        PTP_MM_GLOBAL_TIME_DATA_SET                     17
-#define        PTP_MM_UPDATE_GLOBAL_TIME_PROPERTIES    18
-#define        PTP_MM_GOTO_FAULTY_STATE                        19
-#define        PTP_MM_GET_FOREIGN_DATA_SET             20
-#define        PTP_MM_FOREIGN_DATA_SET                         21
-#define        PTP_MM_SET_SYNC_INTERVAL                        22
-#define        PTP_MM_DISABLE_PORT                                     23
-#define        PTP_MM_ENABLE_PORT                                      24
-#define        PTP_MM_DISABLE_BURST                            25
-#define        PTP_MM_ENABLE_BURST                                     26
-#define        PTP_MM_SET_TIME                                         27
+#define PTP_MM_NULL                               0
+#define PTP_MM_OBTAIN_IDENTITY                    1
+#define PTP_MM_CLOCK_IDENTITY                     2
+#define PTP_MM_INITIALIZE_CLOCK                   3
+#define PTP_MM_SET_SUBDOMAIN                      4
+#define PTP_MM_CLEAR_DESIGNATED_PREFERRED_MASTER  5
+#define PTP_MM_SET_DESIGNATED_PREFERRED_MASTER    6
+#define PTP_MM_GET_DEFAULT_DATA_SET               7
+#define PTP_MM_DEFAULT_DATA_SET                   8
+#define PTP_MM_UPDATE_DEFAULT_DATA_SET            9
+#define PTP_MM_GET_CURRENT_DATA_SET              10
+#define PTP_MM_CURRENT_DATA_SET                  11
+#define PTP_MM_GET_PARENT_DATA_SET               12
+#define PTP_MM_PARENT_DATA_SET                   13
+#define PTP_MM_GET_PORT_DATA_SET                 14
+#define PTP_MM_PORT_DATA_SET                     15
+#define PTP_MM_GET_GLOBAL_TIME_DATA_SET          16
+#define PTP_MM_GLOBAL_TIME_DATA_SET              17
+#define PTP_MM_UPDATE_GLOBAL_TIME_PROPERTIES     18
+#define PTP_MM_GOTO_FAULTY_STATE                 19
+#define PTP_MM_GET_FOREIGN_DATA_SET              20
+#define PTP_MM_FOREIGN_DATA_SET                  21
+#define PTP_MM_SET_SYNC_INTERVAL                 22
+#define PTP_MM_DISABLE_PORT                      23
+#define PTP_MM_ENABLE_PORT                       24
+#define PTP_MM_DISABLE_BURST                     25
+#define PTP_MM_ENABLE_BURST                      26
+#define PTP_MM_SET_TIME                          27
 
 static const value_string ptp_managementMessageKey_vals[] = {
-  {PTP_MM_NULL,  "PTP_MM_NULL"},
-  {PTP_MM_OBTAIN_IDENTITY,  "PTP_MM_OBTAIN_IDENTITY"},
-  {PTP_MM_CLOCK_IDENTITY,  "PTP_MM_CLOCK_IDENTITY"},
-  {PTP_MM_INITIALIZE_CLOCK,  "PTP_MM_INITIALIZE_CLOCK"},
-  {PTP_MM_SET_SUBDOMAIN,  "PTP_MM_SET_SUBDOMAIN"},
-  {PTP_MM_CLEAR_DESIGNATED_PREFERRED_MASTER,  "PTP_MM_CLEAR_DESIGNATED_PREFERRED_MASTER"},
-  {PTP_MM_SET_DESIGNATED_PREFERRED_MASTER,  "PTP_MM_SET_DESIGNATED_PREFERRED_MASTER"},
-  {PTP_MM_GET_DEFAULT_DATA_SET,  "PTP_MM_GET_DEFAULT_DATA_SET"},
-  {PTP_MM_DEFAULT_DATA_SET,  "PTP_MM_DEFAULT_DATA_SET"},
-  {PTP_MM_UPDATE_DEFAULT_DATA_SET,  "PTP_MM_UPDATE_DEFAULT_DATA_SET"},
-  {PTP_MM_GET_CURRENT_DATA_SET,  "PTP_MM_GET_CURRENT_DATA_SET"},
-  {PTP_MM_CURRENT_DATA_SET,  "PTP_MM_CURRENT_DATA_SET"},
-  {PTP_MM_GET_PARENT_DATA_SET,  "PTP_MM_GET_PARENT_DATA_SET"},
-  {PTP_MM_PARENT_DATA_SET,  "PTP_MM_PARENT_DATA_SET"},
-  {PTP_MM_GET_PORT_DATA_SET,  "PTP_MM_GET_PORT_DATA_SET"},
-  {PTP_MM_PORT_DATA_SET,  "PTP_MM_PORT_DATA_SET"},
-  {PTP_MM_GET_GLOBAL_TIME_DATA_SET,  "PTP_MM_GET_GLOBAL_TIME_DATA_SET"},
-  {PTP_MM_GLOBAL_TIME_DATA_SET,  "PTP_MM_GLOBAL_TIME_DATA_SET"},
-  {PTP_MM_UPDATE_GLOBAL_TIME_PROPERTIES,  "PTP_MM_UPDATE_GLOBAL_TIME_PROPERTIES"},
-  {PTP_MM_GOTO_FAULTY_STATE,  "PTP_MM_GOTO_FAULTY_STATE"},
-  {PTP_MM_GET_FOREIGN_DATA_SET,  "PTP_MM_GET_FOREIGN_DATA_SET"},
-  {PTP_MM_FOREIGN_DATA_SET,  "PTP_MM_FOREIGN_DATA_SET"},
-  {PTP_MM_SET_SYNC_INTERVAL,  "PTP_MM_SET_SYNC_INTERVAL"},
-  {PTP_MM_DISABLE_PORT,  "PTP_MM_DISABLE_PORT"},
-  {PTP_MM_ENABLE_PORT,  "PTP_MM_ENABLE_PORT"},
-  {PTP_MM_DISABLE_BURST,  "PTP_MM_DISABLE_BURST"},
-  {PTP_MM_ENABLE_BURST,  "PTP_MM_ENABLE_BURST"},
-  {PTP_MM_SET_TIME,  "PTP_MM_SET_TIME"},
-  {0,              NULL          } };
-       /*same again but better readable text for info column*/
-  static const value_string ptp_managementMessageKey_infocolumn_vals[] = {
-  {PTP_MM_NULL,  "Null"},
-  {PTP_MM_OBTAIN_IDENTITY,  "Obtain Identity"},
-  {PTP_MM_CLOCK_IDENTITY,  "Clock Identity"},
-  {PTP_MM_INITIALIZE_CLOCK,  "Initialize Clock"},
-  {PTP_MM_SET_SUBDOMAIN,  "Set Subdomain"},
-  {PTP_MM_CLEAR_DESIGNATED_PREFERRED_MASTER,  "Clear Designated Preferred Master"},
-  {PTP_MM_SET_DESIGNATED_PREFERRED_MASTER,  "Set Designated Preferred Master"},
-  {PTP_MM_GET_DEFAULT_DATA_SET,  "Get Default Data Set"},
-  {PTP_MM_DEFAULT_DATA_SET,  "Default Data Set"},
-  {PTP_MM_UPDATE_DEFAULT_DATA_SET,  "Update Default Data Set"},
-  {PTP_MM_GET_CURRENT_DATA_SET,  "Get Current Data Set"},
-  {PTP_MM_CURRENT_DATA_SET,  "Current Data Set"},
-  {PTP_MM_GET_PARENT_DATA_SET,  "Get Parent Data Set"},
-  {PTP_MM_PARENT_DATA_SET,  "Parent Data Set"},
-  {PTP_MM_GET_PORT_DATA_SET,  "Get Port Data Set"},
-  {PTP_MM_PORT_DATA_SET,  "Port Data Set"},
-  {PTP_MM_GET_GLOBAL_TIME_DATA_SET,  "Get Global Time Data Set"},
-  {PTP_MM_GLOBAL_TIME_DATA_SET,  "Global Time Data Set"},
-  {PTP_MM_UPDATE_GLOBAL_TIME_PROPERTIES,  "Update Global Time Properties"},
-  {PTP_MM_GOTO_FAULTY_STATE,  "Goto Faulty State"},
-  {PTP_MM_GET_FOREIGN_DATA_SET,  "Get Foreign Data Set"},
-  {PTP_MM_FOREIGN_DATA_SET,  "Foreign Data Set"},
-  {PTP_MM_SET_SYNC_INTERVAL,  "Set Sync Interval"},
-  {PTP_MM_DISABLE_PORT,  "Disable Port"},
-  {PTP_MM_ENABLE_PORT,  "Enable Port"},
-  {PTP_MM_DISABLE_BURST,  "Disable Burst"},
-  {PTP_MM_ENABLE_BURST,  "Enable Burst"},
-  {PTP_MM_SET_TIME,  "Set Time"},
-  {0,              NULL          } };
+    {PTP_MM_NULL                              , "PTP_MM_NULL"},
+    {PTP_MM_OBTAIN_IDENTITY                   , "PTP_MM_OBTAIN_IDENTITY"},
+    {PTP_MM_CLOCK_IDENTITY                    , "PTP_MM_CLOCK_IDENTITY"},
+    {PTP_MM_INITIALIZE_CLOCK                  , "PTP_MM_INITIALIZE_CLOCK"},
+    {PTP_MM_SET_SUBDOMAIN                     , "PTP_MM_SET_SUBDOMAIN"},
+    {PTP_MM_CLEAR_DESIGNATED_PREFERRED_MASTER , "PTP_MM_CLEAR_DESIGNATED_PREFERRED_MASTER"},
+    {PTP_MM_SET_DESIGNATED_PREFERRED_MASTER   , "PTP_MM_SET_DESIGNATED_PREFERRED_MASTER"},
+    {PTP_MM_GET_DEFAULT_DATA_SET              , "PTP_MM_GET_DEFAULT_DATA_SET"},
+    {PTP_MM_DEFAULT_DATA_SET                  , "PTP_MM_DEFAULT_DATA_SET"},
+    {PTP_MM_UPDATE_DEFAULT_DATA_SET           , "PTP_MM_UPDATE_DEFAULT_DATA_SET"},
+    {PTP_MM_GET_CURRENT_DATA_SET              , "PTP_MM_GET_CURRENT_DATA_SET"},
+    {PTP_MM_CURRENT_DATA_SET                  , "PTP_MM_CURRENT_DATA_SET"},
+    {PTP_MM_GET_PARENT_DATA_SET               , "PTP_MM_GET_PARENT_DATA_SET"},
+    {PTP_MM_PARENT_DATA_SET                   , "PTP_MM_PARENT_DATA_SET"},
+    {PTP_MM_GET_PORT_DATA_SET                 , "PTP_MM_GET_PORT_DATA_SET"},
+    {PTP_MM_PORT_DATA_SET                     , "PTP_MM_PORT_DATA_SET"},
+    {PTP_MM_GET_GLOBAL_TIME_DATA_SET          , "PTP_MM_GET_GLOBAL_TIME_DATA_SET"},
+    {PTP_MM_GLOBAL_TIME_DATA_SET              , "PTP_MM_GLOBAL_TIME_DATA_SET"},
+    {PTP_MM_UPDATE_GLOBAL_TIME_PROPERTIES     , "PTP_MM_UPDATE_GLOBAL_TIME_PROPERTIES"},
+    {PTP_MM_GOTO_FAULTY_STATE                 , "PTP_MM_GOTO_FAULTY_STATE"},
+    {PTP_MM_GET_FOREIGN_DATA_SET              , "PTP_MM_GET_FOREIGN_DATA_SET"},
+    {PTP_MM_FOREIGN_DATA_SET                  , "PTP_MM_FOREIGN_DATA_SET"},
+    {PTP_MM_SET_SYNC_INTERVAL                 , "PTP_MM_SET_SYNC_INTERVAL"},
+    {PTP_MM_DISABLE_PORT                      , "PTP_MM_DISABLE_PORT"},
+    {PTP_MM_ENABLE_PORT                       , "PTP_MM_ENABLE_PORT"},
+    {PTP_MM_DISABLE_BURST                     , "PTP_MM_DISABLE_BURST"},
+    {PTP_MM_ENABLE_BURST                      , "PTP_MM_ENABLE_BURST"},
+    {PTP_MM_SET_TIME                          , "PTP_MM_SET_TIME"},
+    {0,              NULL          } };
+
+/*same again but better readable text for info column*/
+static const value_string ptp_managementMessageKey_infocolumn_vals[] = {
+    {PTP_MM_NULL                              , "Null"},
+    {PTP_MM_OBTAIN_IDENTITY                   , "Obtain Identity"},
+    {PTP_MM_CLOCK_IDENTITY                    , "Clock Identity"},
+    {PTP_MM_INITIALIZE_CLOCK                  , "Initialize Clock"},
+    {PTP_MM_SET_SUBDOMAIN                     , "Set Subdomain"},
+    {PTP_MM_CLEAR_DESIGNATED_PREFERRED_MASTER , "Clear Designated Preferred Master"},
+    {PTP_MM_SET_DESIGNATED_PREFERRED_MASTER   , "Set Designated Preferred Master"},
+    {PTP_MM_GET_DEFAULT_DATA_SET              , "Get Default Data Set"},
+    {PTP_MM_DEFAULT_DATA_SET                  , "Default Data Set"},
+    {PTP_MM_UPDATE_DEFAULT_DATA_SET           , "Update Default Data Set"},
+    {PTP_MM_GET_CURRENT_DATA_SET              , "Get Current Data Set"},
+    {PTP_MM_CURRENT_DATA_SET                  , "Current Data Set"},
+    {PTP_MM_GET_PARENT_DATA_SET               , "Get Parent Data Set"},
+    {PTP_MM_PARENT_DATA_SET                   , "Parent Data Set"},
+    {PTP_MM_GET_PORT_DATA_SET                 , "Get Port Data Set"},
+    {PTP_MM_PORT_DATA_SET                     , "Port Data Set"},
+    {PTP_MM_GET_GLOBAL_TIME_DATA_SET          , "Get Global Time Data Set"},
+    {PTP_MM_GLOBAL_TIME_DATA_SET              , "Global Time Data Set"},
+    {PTP_MM_UPDATE_GLOBAL_TIME_PROPERTIES     , "Update Global Time Properties"},
+    {PTP_MM_GOTO_FAULTY_STATE                 , "Goto Faulty State"},
+    {PTP_MM_GET_FOREIGN_DATA_SET              , "Get Foreign Data Set"},
+    {PTP_MM_FOREIGN_DATA_SET                  , "Foreign Data Set"},
+    {PTP_MM_SET_SYNC_INTERVAL                 , "Set Sync Interval"},
+    {PTP_MM_DISABLE_PORT                      , "Disable Port"},
+    {PTP_MM_ENABLE_PORT                       , "Enable Port"},
+    {PTP_MM_DISABLE_BURST                     , "Disable Burst"},
+    {PTP_MM_ENABLE_BURST                      , "Enable Burst"},
+    {PTP_MM_SET_TIME                          , "Set Time"},
+    {0,              NULL          } };
 
 /*END managementMessage definitions*/
 
 /**********************************************************/
-/* CommunicationId definitions                                                           */
+/* CommunicationId definitions                            */
 /**********************************************************/
-#define        PTP_CLOSED                              0
-#define        PTP_ETHER                               1
-#define        PTP_FFBUS                               4
-#define        PTP_PROFIBUS                    5
-#define        PTP_LON                                 6
-#define        PTP_DNET                                7
-#define        PTP_SDS                                 8
-#define        PTP_CONTROLNET                  9
-#define        PTP_CANOPEN                             10
-#define        PTP_IEEE1394                    243
-#define PTP_IEEE802_11A                        244
-#define        PTP_IEEE_WIRELESS               245
-#define        PTP_INFINIBAND                  246
-#define        PTP_BLUETOOTH                   247
-#define        PTP_IEEE802_15_1                248
-#define        PTP_IEEE1451_3                  249
-#define        PTP_IEEE1451_5                  250
-#define        PTP_USB                                 251
-#define        PTP_ISA                                 252
-#define        PTP_PCI                                 253
-#define        PTP_VXI                                 254
-#define        PTP_DEFAULT                             255
+#define PTP_CLOSED                0
+#define PTP_ETHER                 1
+#define PTP_FFBUS                 4
+#define PTP_PROFIBUS              5
+#define PTP_LON                   6
+#define PTP_DNET                  7
+#define PTP_SDS                   8
+#define PTP_CONTROLNET            9
+#define PTP_CANOPEN              10
+#define PTP_IEEE1394            243
+#define PTP_IEEE802_11A         244
+#define PTP_IEEE_WIRELESS       245
+#define PTP_INFINIBAND          246
+#define PTP_BLUETOOTH           247
+#define PTP_IEEE802_15_1        248
+#define PTP_IEEE1451_3          249
+#define PTP_IEEE1451_5          250
+#define PTP_USB                 251
+#define PTP_ISA                 252
+#define PTP_PCI                 253
+#define PTP_VXI                 254
+#define PTP_DEFAULT             255
 
 static const value_string ptp_communicationid_vals[] = {
-  {PTP_CLOSED,  "Closed system outside the scope of this standard."},
-  {PTP_ETHER,  "IEEE 802.3 (Ethernet)"},
-  {PTP_FFBUS,  "FOUNDATION Fieldbus"},
-  {PTP_PROFIBUS,  "PROFIBUS"},
-  {PTP_LON,  "LonTalk"},
-  {PTP_DNET,  "DeviceNet"},
-  {PTP_SDS,  "SmartDistributedSystem"},
-  {PTP_CONTROLNET,  "ControlNet"},
-  {PTP_CANOPEN,  "CANopen"},
-  {PTP_IEEE1394,  "IEEE 1394"},
-  {PTP_IEEE802_11A,  "IEEE 802.11a"},
-  {PTP_IEEE_WIRELESS,  "IEEE 802.11b"},
-  {PTP_INFINIBAND,  "InfiniBand"},
-  {PTP_BLUETOOTH,  "Bluetooth wireless"},
-  {PTP_IEEE802_15_1,  "IEEE 802.15.1"},
-  {PTP_IEEE1451_3,  "IEEE 1451.3"},
-  {PTP_IEEE1451_5,  "IEEE 1451.5"},
-  {PTP_USB,  "USB bus"},
-  {PTP_ISA,  "ISA bus"},
-  {PTP_PCI,  "PCI bus"},
-  {PTP_VXI,  "VXI bus"},
-  {PTP_DEFAULT,  "Default value"},
-  {0,              NULL          } };
+    {PTP_CLOSED        , "Closed system outside the scope of this standard."},
+    {PTP_ETHER         , "IEEE 802.3 (Ethernet)"},
+    {PTP_FFBUS         , "FOUNDATION Fieldbus"},
+    {PTP_PROFIBUS      , "PROFIBUS"},
+    {PTP_LON           , "LonTalk"},
+    {PTP_DNET          , "DeviceNet"},
+    {PTP_SDS           , "SmartDistributedSystem"},
+    {PTP_CONTROLNET    , "ControlNet"},
+    {PTP_CANOPEN       , "CANopen"},
+    {PTP_IEEE1394      , "IEEE 1394"},
+    {PTP_IEEE802_11A   , "IEEE 802.11a"},
+    {PTP_IEEE_WIRELESS , "IEEE 802.11b"},
+    {PTP_INFINIBAND    , "InfiniBand"},
+    {PTP_BLUETOOTH     , "Bluetooth wireless"},
+    {PTP_IEEE802_15_1  , "IEEE 802.15.1"},
+    {PTP_IEEE1451_3    , "IEEE 1451.3"},
+    {PTP_IEEE1451_5    , "IEEE 1451.5"},
+    {PTP_USB           , "USB bus"},
+    {PTP_ISA           , "ISA bus"},
+    {PTP_PCI           , "PCI bus"},
+    {PTP_VXI           , "VXI bus"},
+    {PTP_DEFAULT       , "Default value"},
+    {0,              NULL          } };
 
 /*END CommunicationId definitions*/
 
 /**********************************************************/
-/* PTP message types   (PTP_CONTROL field)                               */
+/* PTP message types    (PTP_CONTROL field)               */
 /**********************************************************/
-#define        PTP_SYNC_MESSAGE                0x00
-#define        PTP_DELAY_REQ_MESSAGE   0x01
-#define        PTP_FOLLOWUP_MESSAGE    0x02
-#define        PTP_DELAY_RESP_MESSAGE  0x03
-#define        PTP_MANAGEMENT_MESSAGE  0x04
-#define        PTP_OTHER_MESSAGE               0x05
+#define PTP_SYNC_MESSAGE        0x00
+#define PTP_DELAY_REQ_MESSAGE   0x01
+#define PTP_FOLLOWUP_MESSAGE    0x02
+#define PTP_DELAY_RESP_MESSAGE  0x03
+#define PTP_MANAGEMENT_MESSAGE  0x04
+#define PTP_OTHER_MESSAGE       0x05
 
 static const value_string ptp_control_vals[] = {
-  {PTP_SYNC_MESSAGE,           "Sync Message"},
-  {PTP_DELAY_REQ_MESSAGE,      "Delay_Req Message"},
-  {PTP_FOLLOWUP_MESSAGE,    "Follow_Up Message"},
-  {PTP_DELAY_RESP_MESSAGE,     "Delay_Resp Message"},
-  {PTP_MANAGEMENT_MESSAGE,  "Management Message"},
-  {PTP_OTHER_MESSAGE,          "Other Message"},
-  {0,                                  NULL          } };
+    {PTP_SYNC_MESSAGE       , "Sync Message"},
+    {PTP_DELAY_REQ_MESSAGE  , "Delay_Req Message"},
+    {PTP_FOLLOWUP_MESSAGE   , "Follow_Up Message"},
+    {PTP_DELAY_RESP_MESSAGE , "Delay_Resp Message"},
+    {PTP_MANAGEMENT_MESSAGE , "Management Message"},
+    {PTP_OTHER_MESSAGE      , "Other Message"},
+    {0,                       NULL          } };
 
 /*END PTP message types*/
 
 /**********************************************************/
-/* Channel values for the PTP_MESSAGETYPE field                          */
+/* Channel values for the PTP_MESSAGETYPE field           */
 /**********************************************************/
-#define        PTP_MESSAGETYPE_EVENT   0x01
-#define        PTP_MESSAGETYPE_GENERAL 0x02
+#define PTP_MESSAGETYPE_EVENT   0x01
+#define PTP_MESSAGETYPE_GENERAL 0x02
 
 static const value_string ptp_messagetype_vals[] = {
-  {PTP_MESSAGETYPE_EVENT, "Event Message"},
-  {PTP_MESSAGETYPE_GENERAL, "General Message"},
-  {0,              NULL          } };
+    {PTP_MESSAGETYPE_EVENT   , "Event Message"},
+    {PTP_MESSAGETYPE_GENERAL , "General Message"},
+    {0,              NULL          } };
 
 /*END channel values for the PTP_MESSAGETYPE field*/
 
 /* Channel values for boolean vals (FLAGS)*/
 
 static const value_string ptp_bool_vals[] = {
-  {1, "True"},
-  {0, "False"},
-  {0,              NULL          }};
+    {1, "True"},
+    {0, "False"},
+    {0,              NULL          }};
 
 /**********************************************************/
-/* Initialize the protocol and registered fields                 */
+/* Initialize the protocol and registered fields          */
 /**********************************************************/
 
 static int hf_ptp_versionptp = -1;
@@ -487,7 +490,7 @@ static int hf_ptp_flags_parent = -1;
 static int hf_ptp_flags_sync_burst = -1;
 
 /*Fields for ptp_sync and delay_req (=sdr) messages*/
-static int hf_ptp_sdr_origintimestamp = -1;    /*Field for seconds & nanoseconds*/
+static int hf_ptp_sdr_origintimestamp = -1; /*Field for seconds & nanoseconds*/
 static int hf_ptp_sdr_origintimestamp_seconds = -1;
 static int hf_ptp_sdr_origintimestamp_nanoseconds = -1;
 static int hf_ptp_sdr_epochnumber = -1;
@@ -536,21 +539,21 @@ static int hf_ptp_mm_startingboundaryhops = -1;
 static int hf_ptp_mm_boundaryhops = -1;
 static int hf_ptp_mm_managementmessagekey = -1;
 static int hf_ptp_mm_parameterlength = -1;
-       /*parameterlength > 0*/
+    /*parameterlength > 0*/
 static int hf_ptp_mm_messageparameters = -1;
-       /*ptp_mm_clock_identity (parameterlength = 64)*/
+    /*ptp_mm_clock_identity (parameterlength = 64)*/
 static int hf_ptp_mm_clock_identity_clockcommunicationtechnology = -1;
 static int hf_ptp_mm_clock_identity_clockuuidfield = -1;
 static int hf_ptp_mm_clock_identity_clockportfield = -1;
 static int hf_ptp_mm_clock_identity_manufactureridentity = -1;
 
-       /*ptp_mm_initialize_clock (parameterlength = 4)*/
+    /*ptp_mm_initialize_clock (parameterlength = 4)*/
 static int hf_ptp_mm_initialize_clock_initialisationkey = -1;
 
-       /*ptp_mm_set_subdomain (parameterlength = 16)*/
+    /*ptp_mm_set_subdomain (parameterlength = 16)*/
 static int hf_ptp_mm_set_subdomain_subdomainname = -1;
 
-       /*ptp_mm_default_data_set (parameterlength = 76)*/
+    /*ptp_mm_default_data_set (parameterlength = 76)*/
 static int hf_ptp_mm_default_data_set_clockcommunicationtechnology = -1;
 static int hf_ptp_mm_default_data_set_clockuuidfield = -1;
 static int hf_ptp_mm_default_data_set_clockportfield = -1;
@@ -567,7 +570,7 @@ static int hf_ptp_mm_default_data_set_subdomainname = -1;
 static int hf_ptp_mm_default_data_set_numberports = -1;
 static int hf_ptp_mm_default_data_set_numberforeignrecords = -1;
 
-       /*ptp_mm_update_default_data_set (parameterlength = 36)*/
+    /*ptp_mm_update_default_data_set (parameterlength = 36)*/
 static int hf_ptp_mm_update_default_data_set_clockstratum = -1;
 static int hf_ptp_mm_update_default_data_set_clockidentifier = -1;
 static int hf_ptp_mm_update_default_data_set_clockvariance = -1;
@@ -575,7 +578,7 @@ static int hf_ptp_mm_update_default_data_set_preferred = -1;
 static int hf_ptp_mm_update_default_data_set_syncinterval = -1;
 static int hf_ptp_mm_update_default_data_set_subdomainname = -1;
 
-       /*ptp_mm_current_data_set (parameterlength = 20)*/
+    /*ptp_mm_current_data_set (parameterlength = 20)*/
 static int hf_ptp_mm_current_data_set_stepsremoved = -1;
 static int hf_ptp_mm_current_data_set_offsetfrommaster = -1;
 static int hf_ptp_mm_current_data_set_offsetfrommasterseconds = -1;
@@ -584,7 +587,7 @@ static int hf_ptp_mm_current_data_set_onewaydelay = -1;
 static int hf_ptp_mm_current_data_set_onewaydelayseconds = -1;
 static int hf_ptp_mm_current_data_set_onewaydelaynanoseconds = -1;
 
-       /*ptp_mm_parent_data_set (parameterlength = 90)*/
+    /*ptp_mm_parent_data_set (parameterlength = 90)*/
 static int hf_ptp_mm_parent_data_set_parentcommunicationtechnology = -1;
 static int hf_ptp_mm_parent_data_set_parentuuid = -1;
 static int hf_ptp_mm_parent_data_set_parentportid = -1;
@@ -606,7 +609,7 @@ static int hf_ptp_mm_parent_data_set_grandmasterpreferred = -1;
 static int hf_ptp_mm_parent_data_set_grandmasterisboundaryclock = -1;
 static int hf_ptp_mm_parent_data_set_grandmastersequencenumber = -1;
 
-       /*ptp_mm_port_data_set (parameterlength = 52)*/
+    /*ptp_mm_port_data_set (parameterlength = 52)*/
 static int hf_ptp_mm_port_data_set_returnedportnumber = -1;
 static int hf_ptp_mm_port_data_set_portstate = -1;
 static int hf_ptp_mm_port_data_set_lastsynceventsequencenumber = -1;
@@ -622,7 +625,7 @@ static int hf_ptp_mm_port_data_set_subdomainaddress = -1;
 static int hf_ptp_mm_port_data_set_eventportaddress = -1;
 static int hf_ptp_mm_port_data_set_generalportaddress = -1;
 
-       /*ptp_mm_global_time_data_set (parameterlength = 24)*/
+    /*ptp_mm_global_time_data_set (parameterlength = 24)*/
 static int hf_ptp_mm_global_time_data_set_localtime = -1;
 static int hf_ptp_mm_global_time_data_set_localtimeseconds = -1;
 static int hf_ptp_mm_global_time_data_set_localtimenanoseconds = -1;
@@ -631,16 +634,16 @@ static int hf_ptp_mm_global_time_data_set_leap59 = -1;
 static int hf_ptp_mm_global_time_data_set_leap61 = -1;
 static int hf_ptp_mm_global_time_data_set_epochnumber = -1;
 
-       /*ptp_mm_update_global_time_properties (parameterlength = 16)*/
+    /*ptp_mm_update_global_time_properties (parameterlength = 16)*/
 static int hf_ptp_mm_update_global_time_properties_currentutcoffset = -1;
 static int hf_ptp_mm_update_global_time_properties_leap59 = -1;
 static int hf_ptp_mm_update_global_time_properties_leap61 = -1;
 static int hf_ptp_mm_update_global_time_properties_epochnumber = -1;
 
-       /*ptp_mm_get_foreign_data_set (parameterlength = 4)*/
+    /*ptp_mm_get_foreign_data_set (parameterlength = 4)*/
 static int hf_ptp_mm_get_foreign_data_set_recordkey = -1;
 
-       /*ptp_mm_foreign_data_set (parameterlength = 28)*/
+    /*ptp_mm_foreign_data_set (parameterlength = 28)*/
 static int hf_ptp_mm_foreign_data_set_returnedportnumber = -1;
 static int hf_ptp_mm_foreign_data_set_returnedrecordnumber = -1;
 static int hf_ptp_mm_foreign_data_set_foreignmastercommunicationtechnology = -1;
@@ -648,10 +651,10 @@ static int hf_ptp_mm_foreign_data_set_foreignmasteruuidfield = -1;
 static int hf_ptp_mm_foreign_data_set_foreignmasterportidfield = -1;
 static int hf_ptp_mm_foreign_data_set_foreignmastersyncs = -1;
 
-       /*ptp_mm_set_sync_interval (parameterlength = 4)*/
+    /*ptp_mm_set_sync_interval (parameterlength = 4)*/
 static int hf_ptp_mm_set_sync_interval_syncinterval = -1;
 
-       /*ptp_mm_set_time (parameterlength = 8)*/
+    /*ptp_mm_set_time (parameterlength = 8)*/
 static int hf_ptp_mm_set_time_localtime = -1;
 static int hf_ptp_mm_set_time_localtimeseconds = -1;
 static int hf_ptp_mm_set_time_localtimenanoseconds = -1;
@@ -676,479 +679,479 @@ static gint ett_ptp_time2 = -1;
 
 
 /**********************************************************/
-/* Offsets of fields within a PTPv2 packet.                              */
+/* Offsets of fields within a PTPv2 packet.               */
 /**********************************************************/
 
 /*Common offsets for all Messages (Sync, Delay_Req, Follow_Up, Delay_Resp ....)*/
-#define        PTP_V2_TRANSPORT_SPECIFIC_MESSAGE_ID_OFFSET                 0
-#define        PTP_V2_VERSIONPTP_OFFSET                                                1
-#define        PTP_V2_MESSAGE_LENGTH_OFFSET                                    2
-#define        PTP_V2_DOMAIN_NUMBER_OFFSET                                             4
-#define        PTP_V2_FLAGS_OFFSET                                         6
-#define        PTP_V2_CORRECTION_OFFSET                                    8
-#define        PTP_V2_CORRECTIONNS_OFFSET                                  8
-#define        PTP_V2_CORRECTIONSUBNS_OFFSET                               14
-#define        PTP_V2_CLOCKIDENTITY_OFFSET                                                                     20
-#define        PTP_V2_SOURCEPORTID_OFFSET                                  28
-#define        PTP_V2_SEQUENCEID_OFFSET                                    30
-#define        PTP_V2_CONTROL_OFFSET                                       32
-#define        PTP_V2_LOGMESSAGEPERIOD_OFFSET                              33
+#define PTP_V2_TRANSPORT_SPECIFIC_MESSAGE_ID_OFFSET                  0
+#define PTP_V2_VERSIONPTP_OFFSET                                     1
+#define PTP_V2_MESSAGE_LENGTH_OFFSET                                 2
+#define PTP_V2_DOMAIN_NUMBER_OFFSET                                  4
+#define PTP_V2_FLAGS_OFFSET                                          6
+#define PTP_V2_CORRECTION_OFFSET                                     8
+#define PTP_V2_CORRECTIONNS_OFFSET                                   8
+#define PTP_V2_CORRECTIONSUBNS_OFFSET                               14
+#define PTP_V2_CLOCKIDENTITY_OFFSET                                 20
+#define PTP_V2_SOURCEPORTID_OFFSET                                  28
+#define PTP_V2_SEQUENCEID_OFFSET                                    30
+#define PTP_V2_CONTROL_OFFSET                                       32
+#define PTP_V2_LOGMESSAGEPERIOD_OFFSET                              33
 
 
 /*Offsets for PTP_Announce (=AN) messages*/
-#define        PTP_V2_AN_ORIGINTIMESTAMP_OFFSET                            34
-#define        PTP_V2_AN_ORIGINTIMESTAMPSECONDS_OFFSET                     34
-#define        PTP_V2_AN_ORIGINTIMESTAMPNANOSECONDS_OFFSET                 40
-#define        PTP_V2_AN_ORIGINCURRENTUTCOFFSET_OFFSET                     44
-#define        PTP_V2_AN_PRIORITY_1_OFFSET                                 47
-#define        PTP_V2_AN_GRANDMASTERCLOCKCLASS_OFFSET                          48
-#define        PTP_V2_AN_GRANDMASTERCLOCKACCURACY_OFFSET                       49
-#define        PTP_V2_AN_GRANDMASTERCLOCKVARIANCE_OFFSET                       50
-#define        PTP_V2_AN_PRIORITY_2_OFFSET                                 52
-#define        PTP_V2_AN_GRANDMASTERCLOCKIDENTITY_OFFSET                   53
-#define        PTP_V2_AN_LOCALSTEPSREMOVED_OFFSET                          61
-#define        PTP_V2_AN_TIMESOURCE_OFFSET                                     63
-#define        PTP_V2_AN_TLV_OFFSET                                        64
+#define PTP_V2_AN_ORIGINTIMESTAMP_OFFSET                            34
+#define PTP_V2_AN_ORIGINTIMESTAMPSECONDS_OFFSET                     34
+#define PTP_V2_AN_ORIGINTIMESTAMPNANOSECONDS_OFFSET                 40
+#define PTP_V2_AN_ORIGINCURRENTUTCOFFSET_OFFSET                     44
+#define PTP_V2_AN_PRIORITY_1_OFFSET                                 47
+#define PTP_V2_AN_GRANDMASTERCLOCKCLASS_OFFSET                      48
+#define PTP_V2_AN_GRANDMASTERCLOCKACCURACY_OFFSET                   49
+#define PTP_V2_AN_GRANDMASTERCLOCKVARIANCE_OFFSET                   50
+#define PTP_V2_AN_PRIORITY_2_OFFSET                                 52
+#define PTP_V2_AN_GRANDMASTERCLOCKIDENTITY_OFFSET                   53
+#define PTP_V2_AN_LOCALSTEPSREMOVED_OFFSET                          61
+#define PTP_V2_AN_TIMESOURCE_OFFSET                                 63
+#define PTP_V2_AN_TLV_OFFSET                                        64
 /* Announce TLV field offsets */
-#define        PTP_V2_AN_TLV_TYPE_OFFSET                                    0
-#define        PTP_V2_AN_TLV_LENGTHFIELD_OFFSET                             2
+#define PTP_V2_AN_TLV_TYPE_OFFSET                                    0
+#define PTP_V2_AN_TLV_LENGTHFIELD_OFFSET                             2
 /* PTP_V2_TLV_TYPE_ALTERNATE_TIME_OFFSET_INDICATOR field offsets */
-#define        PTP_V2_AN_TLV_ATOI_KEYFIELD_OFFSET                           4
-#define        PTP_V2_AN_TLV_ATOI_CURRENTOFFSET_OFFSET                      5
-#define        PTP_V2_AN_TLV_ATOI_JUMPSECONDS_OFFSET                        9
-#define        PTP_V2_AN_TLV_ATOI_TIMEOFNEXTJUMP_OFFSET                    13
-#define        PTP_V2_AN_TLV_ATOI_DISPLAYNAME_OFFSET                       19
+#define PTP_V2_AN_TLV_ATOI_KEYFIELD_OFFSET                           4
+#define PTP_V2_AN_TLV_ATOI_CURRENTOFFSET_OFFSET                      5
+#define PTP_V2_AN_TLV_ATOI_JUMPSECONDS_OFFSET                        9
+#define PTP_V2_AN_TLV_ATOI_TIMEOFNEXTJUMP_OFFSET                    13
+#define PTP_V2_AN_TLV_ATOI_DISPLAYNAME_OFFSET                       19
 /* Undissected TLV field offset */
-#define        PTP_V2_AN_TLV_DATA_OFFSET                                    4
+#define PTP_V2_AN_TLV_DATA_OFFSET                                    4
 
 /*Offsets for PTP_Sync AND PTP_DelayRequest (=SDR) messages*/
-#define        PTP_V2_SDR_ORIGINTIMESTAMP_OFFSET                           34
-#define        PTP_V2_SDR_ORIGINTIMESTAMPSECONDS_OFFSET                    34
-#define        PTP_V2_SDR_ORIGINTIMESTAMPNANOSECONDS_OFFSET                40
+#define PTP_V2_SDR_ORIGINTIMESTAMP_OFFSET                           34
+#define PTP_V2_SDR_ORIGINTIMESTAMPSECONDS_OFFSET                    34
+#define PTP_V2_SDR_ORIGINTIMESTAMPNANOSECONDS_OFFSET                40
 
 
 /*Offsets for PTP_Follow_Up (=FU) messages*/
-#define        PTP_V2_FU_PRECISEORIGINTIMESTAMP_OFFSET                     34
-#define        PTP_V2_FU_PRECISEORIGINTIMESTAMPSECONDS_OFFSET              34
-#define        PTP_V2_FU_PRECISEORIGINTIMESTAMPNANOSECONDS_OFFSET          40
+#define PTP_V2_FU_PRECISEORIGINTIMESTAMP_OFFSET                     34
+#define PTP_V2_FU_PRECISEORIGINTIMESTAMPSECONDS_OFFSET              34
+#define PTP_V2_FU_PRECISEORIGINTIMESTAMPNANOSECONDS_OFFSET          40
 
 /*Offsets for PTP_DelayResponse (=DR) messages*/
-#define        PTP_V2_DR_RECEIVETIMESTAMP_OFFSET                           34
-#define        PTP_V2_DR_RECEIVETIMESTAMPSECONDS_OFFSET                    34
-#define        PTP_V2_DR_RECEIVETIMESTAMPNANOSECONDS_OFFSET                40
-#define        PTP_V2_DR_REQUESTINGPORTIDENTITY_OFFSET                     44
-#define        PTP_V2_DR_REQUESTINGSOURCEPORTID_OFFSET                     52
+#define PTP_V2_DR_RECEIVETIMESTAMP_OFFSET                           34
+#define PTP_V2_DR_RECEIVETIMESTAMPSECONDS_OFFSET                    34
+#define PTP_V2_DR_RECEIVETIMESTAMPNANOSECONDS_OFFSET                40
+#define PTP_V2_DR_REQUESTINGPORTIDENTITY_OFFSET                     44
+#define PTP_V2_DR_REQUESTINGSOURCEPORTID_OFFSET                     52
 
 
 /*Offsets for PTP_PDelayRequest (=PDRQ) messages*/
-#define        PTP_V2_PDRQ_ORIGINTIMESTAMP_OFFSET                          34
-#define        PTP_V2_PDRQ_ORIGINTIMESTAMPSECONDS_OFFSET                   34
-#define        PTP_V2_PDRQ_ORIGINTIMESTAMPNANOSECONDS_OFFSET               40
-#define        PTP_V2_PDRQ_RESERVED_OFFSET                                             44
+#define PTP_V2_PDRQ_ORIGINTIMESTAMP_OFFSET                          34
+#define PTP_V2_PDRQ_ORIGINTIMESTAMPSECONDS_OFFSET                   34
+#define PTP_V2_PDRQ_ORIGINTIMESTAMPNANOSECONDS_OFFSET               40
+#define PTP_V2_PDRQ_RESERVED_OFFSET                                 44
 
 
 /*Offsets for PTP_PDelayResponse (=PDRS) messages*/
-#define        PTP_V2_PDRS_REQUESTRECEIPTTIMESTAMP_OFFSET                  34
-#define        PTP_V2_PDRS_REQUESTRECEIPTTIMESTAMPSECONDS_OFFSET           34
-#define        PTP_V2_PDRS_REQUESTRECEIPTTIMESTAMPNANOSECONDS_OFFSET       40
-#define        PTP_V2_PDRS_REQUESTINGPORTIDENTITY_OFFSET                   44 /* ++ */
-#define        PTP_V2_PDRS_REQUESTINGSOURCEPORTID_OFFSET                   52 /* ++ */
+#define PTP_V2_PDRS_REQUESTRECEIPTTIMESTAMP_OFFSET                  34
+#define PTP_V2_PDRS_REQUESTRECEIPTTIMESTAMPSECONDS_OFFSET           34
+#define PTP_V2_PDRS_REQUESTRECEIPTTIMESTAMPNANOSECONDS_OFFSET       40
+#define PTP_V2_PDRS_REQUESTINGPORTIDENTITY_OFFSET                   44 /* ++ */
+#define PTP_V2_PDRS_REQUESTINGSOURCEPORTID_OFFSET                   52 /* ++ */
 
 
 /*Offsets for PTP_PDelayResponseFollowUp (=PDFU) messages*/
-#define        PTP_V2_PDFU_RESPONSEORIGINTIMESTAMP_OFFSET                  34
-#define        PTP_V2_PDFU_RESPONSEORIGINTIMESTAMPSECONDS_OFFSET           34
-#define        PTP_V2_PDFU_RESPONSEORIGINTIMESTAMPNANOSECONDS_OFFSET       40
-#define        PTP_V2_PDFU_REQUESTINGPORTIDENTITY_OFFSET                   44 /* ++ */
-#define        PTP_V2_PDFU_REQUESTINGSOURCEPORTID_OFFSET                   52
+#define PTP_V2_PDFU_RESPONSEORIGINTIMESTAMP_OFFSET                  34
+#define PTP_V2_PDFU_RESPONSEORIGINTIMESTAMPSECONDS_OFFSET           34
+#define PTP_V2_PDFU_RESPONSEORIGINTIMESTAMPNANOSECONDS_OFFSET       40
+#define PTP_V2_PDFU_REQUESTINGPORTIDENTITY_OFFSET                   44 /* ++ */
+#define PTP_V2_PDFU_REQUESTINGSOURCEPORTID_OFFSET                   52
 
 
 /*Offsets for PTP_Signalling (=SIG) messages*/
-#define        PTP_V2_SIG_TARGETPORTIDENTITY_OFFSET                            34
-#define        PTP_V2_SIG_TARGETPORTID_OFFSET                                  42
+#define PTP_V2_SIG_TARGETPORTIDENTITY_OFFSET                        34
+#define PTP_V2_SIG_TARGETPORTID_OFFSET                              42
 
 
 /*Offsets for PTP_V2_Management (=MM) messages*/
-#define        PTP_V2_MM_TARGETPORTIDENTITY_OFFSET             34
-#define        PTP_V2_MM_TARGETPORTID_OFFSET                   42
-#define        PTP_V2_MM_STARTINGBOUNDARYHOPS_OFFSET           44
-#define        PTP_V2_MM_BOUNDARYHOPS_OFFSET                   45
-#define        PTP_V2_MM_ACTION_OFFSET                         46
-#define        PTP_V2_MM_RESERVED_OFFSET                       47
-
-#define        PTP_V2_MM_MANAGEMENTTLV_OFFSET                                  48
+#define PTP_V2_MM_TARGETPORTIDENTITY_OFFSET             34
+#define PTP_V2_MM_TARGETPORTID_OFFSET                   42
+#define PTP_V2_MM_STARTINGBOUNDARYHOPS_OFFSET           44
+#define PTP_V2_MM_BOUNDARYHOPS_OFFSET                   45
+#define PTP_V2_MM_ACTION_OFFSET                         46
+#define PTP_V2_MM_RESERVED_OFFSET                       47
+
+#define PTP_V2_MM_MANAGEMENTTLV_OFFSET                  48
 /* Management TLV */
-#define        PTP_V2_MM_TLV_TYPE_OFFSET                                               48
-#define        PTP_V2_MM_TLV_LENGTHFIELD_OFFSET                                50
-#define        PTP_V2_MM_TLV_MANAGEMENTID_OFFSET                               52
-#define        PTP_V2_MM_TLV_MANAGEMENTERRORID_OFFSET                  52
-#define        PTP_V2_MM_TLV_DATAFIELD_OFFSET                                  54
+#define PTP_V2_MM_TLV_TYPE_OFFSET                       48
+#define PTP_V2_MM_TLV_LENGTHFIELD_OFFSET                50
+#define PTP_V2_MM_TLV_MANAGEMENTID_OFFSET               52
+#define PTP_V2_MM_TLV_MANAGEMENTERRORID_OFFSET          52
+#define PTP_V2_MM_TLV_DATAFIELD_OFFSET                  54
 
 /* TLV Types */
-#define PTP_V2_TLV_TYPE_RESERVED                                               0x0000
-#define PTP_V2_TLV_TYPE_MANAGEMENT                                             0x0001
-#define PTP_V2_TLV_TYPE_MANAGEMENT_ERROR_STATUS                        0x0002
-#define PTP_V2_TLV_TYPE_ORGANIZATION_EXTENSION                 0x0003
-#define PTP_V2_TLV_TYPE_REQUEST_UNICAST_TRANSMISSION   0x0004
-#define PTP_V2_TLV_TYPE_GRANT_UNICAST_TRANSMISSION             0x0005
-#define PTP_V2_TLV_TYPE_CANCEL_UNICAST_TRANSMISSION            0x0006
-#define PTP_V2_TLV_TYPE_ACKNOWLEDGE_CANCEL_UNICAST_TRANSMISSION        0x0007
-#define PTP_V2_TLV_TYPE_PATH_TRACE                                             0x0008
-#define PTP_V2_TLV_TYPE_ALTERNATE_TIME_OFFSET_INDICATOR        0x0009
-#define PTP_V2_TLV_TYPE_AUTHENTICATION                                 0x2000
-#define PTP_V2_TLV_TYPE_AUTHENTICATION_CHALLENGE               0x2001
-#define PTP_V2_TLV_TYPE_SECURITY_ASSOCIATION_UPDATE            0x2002
-#define PTP_V2_TLV_TYPE_CUM_FREQ_SCALE_FACTOR_OFFSET   0x2003
+#define PTP_V2_TLV_TYPE_RESERVED                                0x0000
+#define PTP_V2_TLV_TYPE_MANAGEMENT                              0x0001
+#define PTP_V2_TLV_TYPE_MANAGEMENT_ERROR_STATUS                 0x0002
+#define PTP_V2_TLV_TYPE_ORGANIZATION_EXTENSION                  0x0003
+#define PTP_V2_TLV_TYPE_REQUEST_UNICAST_TRANSMISSION            0x0004
+#define PTP_V2_TLV_TYPE_GRANT_UNICAST_TRANSMISSION              0x0005
+#define PTP_V2_TLV_TYPE_CANCEL_UNICAST_TRANSMISSION             0x0006
+#define PTP_V2_TLV_TYPE_ACKNOWLEDGE_CANCEL_UNICAST_TRANSMISSION 0x0007
+#define PTP_V2_TLV_TYPE_PATH_TRACE                              0x0008
+#define PTP_V2_TLV_TYPE_ALTERNATE_TIME_OFFSET_INDICATOR         0x0009
+#define PTP_V2_TLV_TYPE_AUTHENTICATION                          0x2000
+#define PTP_V2_TLV_TYPE_AUTHENTICATION_CHALLENGE                0x2001
+#define PTP_V2_TLV_TYPE_SECURITY_ASSOCIATION_UPDATE             0x2002
+#define PTP_V2_TLV_TYPE_CUM_FREQ_SCALE_FACTOR_OFFSET            0x2003
 
 /* PTPv2 Management clockType Boolean[16] Bits mask */
-#define CLOCKTYPE_ORDINARY_CLOCK                                               0x8000
-#define CLOCKTYPE_BOUNDARY_CLOCK                                               0x4000
-#define CLOCKTYPE_P2P_TC                                                               0x2000
-#define CLOCKTYPE_E2E_TC                                                               0x1000
-#define CLOCKTYPE_MANAGEMENT_NODE                                              0x0800
-#define CLOCKTYPE_RESERVED                                                             0x07FF
+#define CLOCKTYPE_ORDINARY_CLOCK                                0x8000
+#define CLOCKTYPE_BOUNDARY_CLOCK                                0x4000
+#define CLOCKTYPE_P2P_TC                                        0x2000
+#define CLOCKTYPE_E2E_TC                                        0x1000
+#define CLOCKTYPE_MANAGEMENT_NODE                               0x0800
+#define CLOCKTYPE_RESERVED                                      0x07FF
 
 /* PTPv2 Management IDs */
-#define        PTP_V2_MM_ID_NULL_MANAGEMENT                                    0x0000
-#define        PTP_V2_MM_ID_CLOCK_DESCRIPTION                                  0x0001
-#define        PTP_V2_MM_ID_USER_DESCRIPTION                                   0x0002
-#define        PTP_V2_MM_ID_SAVE_IN_NON_VOLATILE_STORAGE               0x0003
-#define        PTP_V2_MM_ID_RESET_NON_VOLATILE_STORAGE                 0x0004
-#define        PTP_V2_MM_ID_INITIALIZE                                                 0x0005
-#define        PTP_V2_MM_ID_FAULT_LOG                                                  0x0006
-#define        PTP_V2_MM_ID_FAULT_LOG_RESET                                    0x0007
-#define        PTP_V2_MM_ID_DEFAULT_DATA_SET                                   0x2000
-#define        PTP_V2_MM_ID_CURRENT_DATA_SET                                   0x2001
-#define        PTP_V2_MM_ID_PARENT_DATA_SET                                    0x2002
-#define        PTP_V2_MM_ID_TIME_PROPERTIES_DATA_SET                   0x2003
-#define        PTP_V2_MM_ID_PORT_DATA_SET                                              0x2004
-#define        PTP_V2_MM_ID_PRIORITY1                                                  0x2005
-#define        PTP_V2_MM_ID_PRIORITY2                                                  0x2006
-#define        PTP_V2_MM_ID_DOMAIN                                                             0x2007
-#define        PTP_V2_MM_ID_SLAVE_ONLY                                                 0x2008
-#define        PTP_V2_MM_ID_LOG_ANNOUNCE_INTERVAL                              0x2009
-#define        PTP_V2_MM_ID_ANNOUNCE_RECEIPT_TIMEOUT                   0x200A
-#define        PTP_V2_MM_ID_LOG_SYNC_INTERVAL                                  0x200B
-#define        PTP_V2_MM_ID_VERSION_NUMBER                                             0x200C
-#define        PTP_V2_MM_ID_ENABLE_PORT                                                0x200D
-#define        PTP_V2_MM_ID_DISABLE_PORT                                               0x200E
-#define        PTP_V2_MM_ID_TIME                                                               0x200F
-#define        PTP_V2_MM_ID_CLOCK_ACCURACY                                             0x2010
-#define        PTP_V2_MM_ID_UTC_PROPERTIES                                             0x2011
-#define        PTP_V2_MM_ID_TRACEABILITY_PROPERTIES                    0x2012
-#define        PTP_V2_MM_ID_TIMESCALE_PROPERTIES                               0x2013
-#define        PTP_V2_MM_ID_UNICAST_NEGOTIATION_ENABLE                 0x2014
-#define        PTP_V2_MM_ID_PATH_TRACE_LIST                                    0x2015
-#define        PTP_V2_MM_ID_PATH_TRACE_ENABLE                                  0x2016
-#define        PTP_V2_MM_ID_GRANDMASTER_CLUSTER_TABLE                  0x2017
-#define        PTP_V2_MM_ID_UNICAST_MASTER_TABLE                               0x2018
-#define        PTP_V2_MM_ID_UNICAST_MASTER_MAX_TABLE_SIZE              0x2019
-#define        PTP_V2_MM_ID_ACCEPTABLE_MASTER_TABLE                    0x201A
-#define        PTP_V2_MM_ID_ACCEPTABLE_MASTER_TABLE_ENABLED    0x201B
-#define        PTP_V2_MM_ID_ACCEPTABLE_MASTER_MAX_TABLE_SIZE   0x201C
-#define        PTP_V2_MM_ID_ALTERNATE_MASTER                                   0x201D
-#define        PTP_V2_MM_ID_ALTERNATE_TIME_OFFSET_ENABLE               0x201E
-#define        PTP_V2_MM_ID_ALTERNATE_TIME_OFFSET_NAME                 0x201F
-#define        PTP_V2_MM_ID_ALTERNATE_TIME_OFFSET_MAX_KEY              0x2020
-#define        PTP_V2_MM_ID_ALTERNATE_TIME_OFFSET_PROPERTIES   0x2021
-#define        PTP_V2_MM_ID_TC_DEFAULT_DATA_SET                                0x4000
-#define        PTP_V2_MM_ID_TC_PORT_DATA_SET                                   0x4001
-#define        PTP_V2_MM_ID_PRIMARY_DOMAIN                                             0x4002
-#define        PTP_V2_MM_ID_DELAY_MECHANISM                                    0x6000
-#define        PTP_V2_MM_ID_LOG_MIN_PDELAY_REQ_INTERVAL                0x6001
+#define PTP_V2_MM_ID_NULL_MANAGEMENT                            0x0000
+#define PTP_V2_MM_ID_CLOCK_DESCRIPTION                          0x0001
+#define PTP_V2_MM_ID_USER_DESCRIPTION                           0x0002
+#define PTP_V2_MM_ID_SAVE_IN_NON_VOLATILE_STORAGE               0x0003
+#define PTP_V2_MM_ID_RESET_NON_VOLATILE_STORAGE                 0x0004
+#define PTP_V2_MM_ID_INITIALIZE                                 0x0005
+#define PTP_V2_MM_ID_FAULT_LOG                                  0x0006
+#define PTP_V2_MM_ID_FAULT_LOG_RESET                            0x0007
+#define PTP_V2_MM_ID_DEFAULT_DATA_SET                           0x2000
+#define PTP_V2_MM_ID_CURRENT_DATA_SET                           0x2001
+#define PTP_V2_MM_ID_PARENT_DATA_SET                            0x2002
+#define PTP_V2_MM_ID_TIME_PROPERTIES_DATA_SET                   0x2003
+#define PTP_V2_MM_ID_PORT_DATA_SET                              0x2004
+#define PTP_V2_MM_ID_PRIORITY1                                  0x2005
+#define PTP_V2_MM_ID_PRIORITY2                                  0x2006
+#define PTP_V2_MM_ID_DOMAIN                                     0x2007
+#define PTP_V2_MM_ID_SLAVE_ONLY                                 0x2008
+#define PTP_V2_MM_ID_LOG_ANNOUNCE_INTERVAL                      0x2009
+#define PTP_V2_MM_ID_ANNOUNCE_RECEIPT_TIMEOUT                   0x200A
+#define PTP_V2_MM_ID_LOG_SYNC_INTERVAL                          0x200B
+#define PTP_V2_MM_ID_VERSION_NUMBER                             0x200C
+#define PTP_V2_MM_ID_ENABLE_PORT                                0x200D
+#define PTP_V2_MM_ID_DISABLE_PORT                               0x200E
+#define PTP_V2_MM_ID_TIME                                       0x200F
+#define PTP_V2_MM_ID_CLOCK_ACCURACY                             0x2010
+#define PTP_V2_MM_ID_UTC_PROPERTIES                             0x2011
+#define PTP_V2_MM_ID_TRACEABILITY_PROPERTIES                    0x2012
+#define PTP_V2_MM_ID_TIMESCALE_PROPERTIES                       0x2013
+#define PTP_V2_MM_ID_UNICAST_NEGOTIATION_ENABLE                 0x2014
+#define PTP_V2_MM_ID_PATH_TRACE_LIST                            0x2015
+#define PTP_V2_MM_ID_PATH_TRACE_ENABLE                          0x2016
+#define PTP_V2_MM_ID_GRANDMASTER_CLUSTER_TABLE                  0x2017
+#define PTP_V2_MM_ID_UNICAST_MASTER_TABLE                       0x2018
+#define PTP_V2_MM_ID_UNICAST_MASTER_MAX_TABLE_SIZE              0x2019
+#define PTP_V2_MM_ID_ACCEPTABLE_MASTER_TABLE                    0x201A
+#define PTP_V2_MM_ID_ACCEPTABLE_MASTER_TABLE_ENABLED            0x201B
+#define PTP_V2_MM_ID_ACCEPTABLE_MASTER_MAX_TABLE_SIZE           0x201C
+#define PTP_V2_MM_ID_ALTERNATE_MASTER                           0x201D
+#define PTP_V2_MM_ID_ALTERNATE_TIME_OFFSET_ENABLE               0x201E
+#define PTP_V2_MM_ID_ALTERNATE_TIME_OFFSET_NAME                 0x201F
+#define PTP_V2_MM_ID_ALTERNATE_TIME_OFFSET_MAX_KEY              0x2020
+#define PTP_V2_MM_ID_ALTERNATE_TIME_OFFSET_PROPERTIES           0x2021
+#define PTP_V2_MM_ID_TC_DEFAULT_DATA_SET                        0x4000
+#define PTP_V2_MM_ID_TC_PORT_DATA_SET                           0x4001
+#define PTP_V2_MM_ID_PRIMARY_DOMAIN                             0x4002
+#define PTP_V2_MM_ID_DELAY_MECHANISM                            0x6000
+#define PTP_V2_MM_ID_LOG_MIN_PDELAY_REQ_INTERVAL                0x6001
 
 /* Management DataField for DefaultDS */
-#define PTP_V2_MM_RESERVED1                                                            PTP_V2_MM_TLV_DATAFIELD_OFFSET + 1
-#define PTP_V2_MM_NUMBERPORTS                                                  PTP_V2_MM_TLV_DATAFIELD_OFFSET + 2
-#define PTP_V2_MM_PRIORITY1                                                            PTP_V2_MM_TLV_DATAFIELD_OFFSET + 4
-#define PTP_V2_MM_CLOCKQUALITY                                                 PTP_V2_MM_TLV_DATAFIELD_OFFSET + 5
-#define PTP_V2_MM_PRIORITY2                                                            PTP_V2_MM_TLV_DATAFIELD_OFFSET + 9
-#define PTP_V2_MM_CLOCKIDENTITY                                                        PTP_V2_MM_TLV_DATAFIELD_OFFSET + 10
-#define PTP_V2_MM_DOMAINNUMBER                                                 PTP_V2_MM_TLV_DATAFIELD_OFFSET + 18
-#define PTP_V2_MM_RESERVED2                                                            PTP_V2_MM_TLV_DATAFIELD_OFFSET + 19
+#define PTP_V2_MM_RESERVED1                             PTP_V2_MM_TLV_DATAFIELD_OFFSET + 1
+#define PTP_V2_MM_NUMBERPORTS                           PTP_V2_MM_TLV_DATAFIELD_OFFSET + 2
+#define PTP_V2_MM_PRIORITY1                             PTP_V2_MM_TLV_DATAFIELD_OFFSET + 4
+#define PTP_V2_MM_CLOCKQUALITY                          PTP_V2_MM_TLV_DATAFIELD_OFFSET + 5
+#define PTP_V2_MM_PRIORITY2                             PTP_V2_MM_TLV_DATAFIELD_OFFSET + 9
+#define PTP_V2_MM_CLOCKIDENTITY                         PTP_V2_MM_TLV_DATAFIELD_OFFSET + 10
+#define PTP_V2_MM_DOMAINNUMBER                          PTP_V2_MM_TLV_DATAFIELD_OFFSET + 18
+#define PTP_V2_MM_RESERVED2                             PTP_V2_MM_TLV_DATAFIELD_OFFSET + 19
 
-#define PTP_V2_TRANSPORTSPECIFIC_V1COMPATIBILITY_BITMASK                       0x10
+#define PTP_V2_TRANSPORTSPECIFIC_V1COMPATIBILITY_BITMASK              0x10
 
 
 
 /**********************************************************/
-/* flag-field-mask-definitions                                                           */
+/* flag-field-mask-definitions                            */
 /**********************************************************/
-#define        PTP_V2_FLAGS_LI61_BITMASK                                                               0x0001
-#define        PTP_V2_FLAGS_LI59_BITMASK                                                               0x0002
-#define        PTP_V2_FLAGS_UTC_OFFSET_VALID_BITMASK                                   0x0004
-#define        PTP_V2_FLAGS_PTP_TIMESCALE_BITMASK                                              0x0008
-#define        PTP_V2_FLAGS_TIME_TRACEABLE_BITMASK                                             0x0010
-#define        PTP_V2_FLAGS_FREQUENCY_TRACEABLE_BITMASK                                    0x0020
-#define        PTP_V2_FLAGS_ALTERNATE_BITMASK                                                  0x0100
-#define        PTP_V2_FLAGS_TWO_STEP_BITMASK                                                   0x0200
-#define        PTP_V2_FLAGS_UNICAST_BITMASK                                                    0x0400
-#define        PTP_V2_FLAGS_SPECIFIC1_BITMASK                                                  0x2000
-#define        PTP_V2_FLAGS_SPECIFIC2_BITMASK                                                  0x4000
-#define        PTP_V2_FLAGS_SECURITY_BITMASK                                                   0x8000
+#define PTP_V2_FLAGS_LI61_BITMASK                                   0x0001
+#define PTP_V2_FLAGS_LI59_BITMASK                                   0x0002
+#define PTP_V2_FLAGS_UTC_OFFSET_VALID_BITMASK                       0x0004
+#define PTP_V2_FLAGS_PTP_TIMESCALE_BITMASK                          0x0008
+#define PTP_V2_FLAGS_TIME_TRACEABLE_BITMASK                         0x0010
+#define PTP_V2_FLAGS_FREQUENCY_TRACEABLE_BITMASK                    0x0020
+#define PTP_V2_FLAGS_ALTERNATE_BITMASK                              0x0100
+#define PTP_V2_FLAGS_TWO_STEP_BITMASK                               0x0200
+#define PTP_V2_FLAGS_UNICAST_BITMASK                                0x0400
+#define PTP_V2_FLAGS_SPECIFIC1_BITMASK                              0x2000
+#define PTP_V2_FLAGS_SPECIFIC2_BITMASK                              0x4000
+#define PTP_V2_FLAGS_SECURITY_BITMASK                               0x8000
 
 
 
 /**********************************************************/
-/* PTP v2 message ids  (ptp messageid field)                 */
+/* PTP v2 message ids   (ptp messageid field)             */
 /**********************************************************/
-#define        PTP_V2_SYNC_MESSAGE                     0x00
-#define        PTP_V2_DELAY_REQ_MESSAGE                0x01
-#define        PTP_V2_PATH_DELAY_REQ_MESSAGE           0x02
-#define        PTP_V2_PATH_DELAY_RESP_MESSAGE          0x03
-#define        PTP_V2_FOLLOWUP_MESSAGE                 0x08
-#define        PTP_V2_DELAY_RESP_MESSAGE               0x09
-#define        PTP_V2_PATH_DELAY_FOLLOWUP_MESSAGE      0x0A
-#define        PTP_V2_ANNOUNCE_MESSAGE                 0x0B
-#define        PTP_V2_SIGNALLING_MESSAGE               0x0C
-#define        PTP_V2_MANAGEMENT_MESSAGE               0x0D
+#define PTP_V2_SYNC_MESSAGE                     0x00
+#define PTP_V2_DELAY_REQ_MESSAGE                0x01
+#define PTP_V2_PATH_DELAY_REQ_MESSAGE           0x02
+#define PTP_V2_PATH_DELAY_RESP_MESSAGE          0x03
+#define PTP_V2_FOLLOWUP_MESSAGE                 0x08
+#define PTP_V2_DELAY_RESP_MESSAGE               0x09
+#define PTP_V2_PATH_DELAY_FOLLOWUP_MESSAGE      0x0A
+#define PTP_V2_ANNOUNCE_MESSAGE                 0x0B
+#define PTP_V2_SIGNALLING_MESSAGE               0x0C
+#define PTP_V2_MANAGEMENT_MESSAGE               0x0D
 
 
 static const value_string ptp_v2_managementID_vals[] = {
-       {PTP_V2_MM_ID_NULL_MANAGEMENT                                   ,"NULL_MANAGEMENT"},
-       {PTP_V2_MM_ID_CLOCK_DESCRIPTION                                 ,"CLOCK_DESCRIPTION"},
-       {PTP_V2_MM_ID_USER_DESCRIPTION                                  ,"USER_DESCRIPTION"},
-       {PTP_V2_MM_ID_SAVE_IN_NON_VOLATILE_STORAGE              ,"SAVE_IN_NON_VOLATILE_STORAGE"},
-       {PTP_V2_MM_ID_RESET_NON_VOLATILE_STORAGE                ,"RESET_NON_VOLATILE_STORAGE"},
-       {PTP_V2_MM_ID_INITIALIZE                                                ,"INITIALIZE"},
-       {PTP_V2_MM_ID_FAULT_LOG                                                 ,"FAULT_LOG"},
-       {PTP_V2_MM_ID_FAULT_LOG_RESET                                   ,"FAULT_LOG_RESET"},
-       {PTP_V2_MM_ID_DEFAULT_DATA_SET                                  ,"DEFAULT_DATA_SET"},
-       {PTP_V2_MM_ID_CURRENT_DATA_SET                                  ,"CURRENT_DATA_SET"},
-       {PTP_V2_MM_ID_PARENT_DATA_SET                                   ,"PARENT_DATA_SET"},
-       {PTP_V2_MM_ID_TIME_PROPERTIES_DATA_SET                  ,"TIME_PROPERTIES_DATA_SET"},
-       {PTP_V2_MM_ID_PORT_DATA_SET                                             ,"PORT_DATA_SET"},
-       {PTP_V2_MM_ID_PRIORITY1                                                 ,"PRIORITY1"},
-       {PTP_V2_MM_ID_PRIORITY2                                                 ,"PRIORITY2"},
-       {PTP_V2_MM_ID_DOMAIN                                                    ,"DOMAIN"},
-       {PTP_V2_MM_ID_SLAVE_ONLY                                                ,"SLAVE_ONLY"},
-       {PTP_V2_MM_ID_LOG_ANNOUNCE_INTERVAL                             ,"LOG_ANNOUNCE_INTERVAL"},
-       {PTP_V2_MM_ID_ANNOUNCE_RECEIPT_TIMEOUT                  ,"ANNOUNCE_RECEIPT_TIMEOUT"},
-       {PTP_V2_MM_ID_LOG_SYNC_INTERVAL                                 ,"LOG_SYNC_INTERVAL"},
-       {PTP_V2_MM_ID_VERSION_NUMBER                                    ,"VERSION_NUMBER"},
-       {PTP_V2_MM_ID_ENABLE_PORT                                               ,"ENABLE_PORT"},
-       {PTP_V2_MM_ID_DISABLE_PORT                                              ,"DISABLE_PORT"},
-       {PTP_V2_MM_ID_TIME                                                              ,"TIME"},
-       {PTP_V2_MM_ID_CLOCK_ACCURACY                                    ,"CLOCK_ACCURACY"},
-       {PTP_V2_MM_ID_UTC_PROPERTIES                                    ,"UTC_PROPERTIES"},
-       {PTP_V2_MM_ID_TRACEABILITY_PROPERTIES                   ,"TRACEABILITY_PROPERTIES"},
-       {PTP_V2_MM_ID_TIMESCALE_PROPERTIES                              ,"TIMESCALE_PROPERTIES"},
-       {PTP_V2_MM_ID_UNICAST_NEGOTIATION_ENABLE                ,"UNICAST_NEGOTIATION_ENABLE"},
-       {PTP_V2_MM_ID_PATH_TRACE_LIST                                   ,"PATH_TRACE_LIST"},
-       {PTP_V2_MM_ID_PATH_TRACE_ENABLE                                 ,"PATH_TRACE_ENABLE"},
-       {PTP_V2_MM_ID_GRANDMASTER_CLUSTER_TABLE                 ,"GRANDMASTER_CLUSTER_TABLE"},
-       {PTP_V2_MM_ID_UNICAST_MASTER_TABLE                              ,"UNICAST_MASTER_TABLE"},
-       {PTP_V2_MM_ID_UNICAST_MASTER_MAX_TABLE_SIZE             ,"UNICAST_MASTER_MAX_TABLE_SIZE"},
-       {PTP_V2_MM_ID_ACCEPTABLE_MASTER_TABLE                   ,"ACCEPTABLE_MASTER_TABLE"},
-       {PTP_V2_MM_ID_ACCEPTABLE_MASTER_TABLE_ENABLED   ,"ACCEPTABLE_MASTER_TABLE_ENABLED"},
-       {PTP_V2_MM_ID_ACCEPTABLE_MASTER_MAX_TABLE_SIZE  ,"ACCEPTABLE_MASTER_MAX_TABLE_SIZE"},
-       {PTP_V2_MM_ID_ALTERNATE_MASTER                                  ,"ALTERNATE_MASTER"},
-       {PTP_V2_MM_ID_ALTERNATE_TIME_OFFSET_ENABLE              ,"ALTERNATE_TIME_OFFSET_ENABLE"},
-       {PTP_V2_MM_ID_ALTERNATE_TIME_OFFSET_NAME                ,"ALTERNATE_TIME_OFFSET_NAME"},
-       {PTP_V2_MM_ID_ALTERNATE_TIME_OFFSET_MAX_KEY             ,"ALTERNATE_TIME_OFFSET_MAX_KEY"},
-       {PTP_V2_MM_ID_ALTERNATE_TIME_OFFSET_PROPERTIES  ,"ALTERNATE_TIME_OFFSET_PROPERTIES"},
-       {PTP_V2_MM_ID_TC_DEFAULT_DATA_SET                               ,"TC_DEFAULT_DATA_SET"},
-       {PTP_V2_MM_ID_TC_PORT_DATA_SET                                  ,"TC_PORT_DATA_SET"},
-       {PTP_V2_MM_ID_PRIMARY_DOMAIN                                    ,"PRIMARY_DOMAIN"},
-       {PTP_V2_MM_ID_DELAY_MECHANISM                                   ,"DELAY_MECHANISM"},
-       {PTP_V2_MM_ID_LOG_MIN_PDELAY_REQ_INTERVAL               ,"LOG_MIN_PDELAY_REQ_INTERVAL"},
-    {0                                                                                         ,NULL} };
+    {PTP_V2_MM_ID_NULL_MANAGEMENT                   ,"NULL_MANAGEMENT"},
+    {PTP_V2_MM_ID_CLOCK_DESCRIPTION                 ,"CLOCK_DESCRIPTION"},
+    {PTP_V2_MM_ID_USER_DESCRIPTION                  ,"USER_DESCRIPTION"},
+    {PTP_V2_MM_ID_SAVE_IN_NON_VOLATILE_STORAGE      ,"SAVE_IN_NON_VOLATILE_STORAGE"},
+    {PTP_V2_MM_ID_RESET_NON_VOLATILE_STORAGE        ,"RESET_NON_VOLATILE_STORAGE"},
+    {PTP_V2_MM_ID_INITIALIZE                        ,"INITIALIZE"},
+    {PTP_V2_MM_ID_FAULT_LOG                         ,"FAULT_LOG"},
+    {PTP_V2_MM_ID_FAULT_LOG_RESET                   ,"FAULT_LOG_RESET"},
+    {PTP_V2_MM_ID_DEFAULT_DATA_SET                  ,"DEFAULT_DATA_SET"},
+    {PTP_V2_MM_ID_CURRENT_DATA_SET                  ,"CURRENT_DATA_SET"},
+    {PTP_V2_MM_ID_PARENT_DATA_SET                   ,"PARENT_DATA_SET"},
+    {PTP_V2_MM_ID_TIME_PROPERTIES_DATA_SET          ,"TIME_PROPERTIES_DATA_SET"},
+    {PTP_V2_MM_ID_PORT_DATA_SET                     ,"PORT_DATA_SET"},
+    {PTP_V2_MM_ID_PRIORITY1                         ,"PRIORITY1"},
+    {PTP_V2_MM_ID_PRIORITY2                         ,"PRIORITY2"},
+    {PTP_V2_MM_ID_DOMAIN                            ,"DOMAIN"},
+    {PTP_V2_MM_ID_SLAVE_ONLY                        ,"SLAVE_ONLY"},
+    {PTP_V2_MM_ID_LOG_ANNOUNCE_INTERVAL             ,"LOG_ANNOUNCE_INTERVAL"},
+    {PTP_V2_MM_ID_ANNOUNCE_RECEIPT_TIMEOUT          ,"ANNOUNCE_RECEIPT_TIMEOUT"},
+    {PTP_V2_MM_ID_LOG_SYNC_INTERVAL                 ,"LOG_SYNC_INTERVAL"},
+    {PTP_V2_MM_ID_VERSION_NUMBER                    ,"VERSION_NUMBER"},
+    {PTP_V2_MM_ID_ENABLE_PORT                       ,"ENABLE_PORT"},
+    {PTP_V2_MM_ID_DISABLE_PORT                      ,"DISABLE_PORT"},
+    {PTP_V2_MM_ID_TIME                              ,"TIME"},
+    {PTP_V2_MM_ID_CLOCK_ACCURACY                    ,"CLOCK_ACCURACY"},
+    {PTP_V2_MM_ID_UTC_PROPERTIES                    ,"UTC_PROPERTIES"},
+    {PTP_V2_MM_ID_TRACEABILITY_PROPERTIES           ,"TRACEABILITY_PROPERTIES"},
+    {PTP_V2_MM_ID_TIMESCALE_PROPERTIES              ,"TIMESCALE_PROPERTIES"},
+    {PTP_V2_MM_ID_UNICAST_NEGOTIATION_ENABLE        ,"UNICAST_NEGOTIATION_ENABLE"},
+    {PTP_V2_MM_ID_PATH_TRACE_LIST                   ,"PATH_TRACE_LIST"},
+    {PTP_V2_MM_ID_PATH_TRACE_ENABLE                 ,"PATH_TRACE_ENABLE"},
+    {PTP_V2_MM_ID_GRANDMASTER_CLUSTER_TABLE         ,"GRANDMASTER_CLUSTER_TABLE"},
+    {PTP_V2_MM_ID_UNICAST_MASTER_TABLE              ,"UNICAST_MASTER_TABLE"},
+    {PTP_V2_MM_ID_UNICAST_MASTER_MAX_TABLE_SIZE     ,"UNICAST_MASTER_MAX_TABLE_SIZE"},
+    {PTP_V2_MM_ID_ACCEPTABLE_MASTER_TABLE           ,"ACCEPTABLE_MASTER_TABLE"},
+    {PTP_V2_MM_ID_ACCEPTABLE_MASTER_TABLE_ENABLED   ,"ACCEPTABLE_MASTER_TABLE_ENABLED"},
+    {PTP_V2_MM_ID_ACCEPTABLE_MASTER_MAX_TABLE_SIZE  ,"ACCEPTABLE_MASTER_MAX_TABLE_SIZE"},
+    {PTP_V2_MM_ID_ALTERNATE_MASTER                  ,"ALTERNATE_MASTER"},
+    {PTP_V2_MM_ID_ALTERNATE_TIME_OFFSET_ENABLE      ,"ALTERNATE_TIME_OFFSET_ENABLE"},
+    {PTP_V2_MM_ID_ALTERNATE_TIME_OFFSET_NAME        ,"ALTERNATE_TIME_OFFSET_NAME"},
+    {PTP_V2_MM_ID_ALTERNATE_TIME_OFFSET_MAX_KEY     ,"ALTERNATE_TIME_OFFSET_MAX_KEY"},
+    {PTP_V2_MM_ID_ALTERNATE_TIME_OFFSET_PROPERTIES  ,"ALTERNATE_TIME_OFFSET_PROPERTIES"},
+    {PTP_V2_MM_ID_TC_DEFAULT_DATA_SET               ,"TC_DEFAULT_DATA_SET"},
+    {PTP_V2_MM_ID_TC_PORT_DATA_SET                  ,"TC_PORT_DATA_SET"},
+    {PTP_V2_MM_ID_PRIMARY_DOMAIN                    ,"PRIMARY_DOMAIN"},
+    {PTP_V2_MM_ID_DELAY_MECHANISM                   ,"DELAY_MECHANISM"},
+    {PTP_V2_MM_ID_LOG_MIN_PDELAY_REQ_INTERVAL       ,"LOG_MIN_PDELAY_REQ_INTERVAL"},
+    {0                                              ,NULL} };
 
 /*same again but better readable text for info column*/
 static const value_string ptp_v2_managementID_infocolumn_vals[] = {
-       {PTP_V2_MM_ID_NULL_MANAGEMENT                                   ,"Null management"},
-       {PTP_V2_MM_ID_CLOCK_DESCRIPTION                                 ,"Clock description"},
-       {PTP_V2_MM_ID_USER_DESCRIPTION                                  ,"User description"},
-       {PTP_V2_MM_ID_SAVE_IN_NON_VOLATILE_STORAGE              ,"Save in non volatile storage"},
-       {PTP_V2_MM_ID_RESET_NON_VOLATILE_STORAGE                ,"Reset non volatile storage"},
-       {PTP_V2_MM_ID_INITIALIZE                                                ,"Initialize"},
-       {PTP_V2_MM_ID_FAULT_LOG                                                 ,"Fault log"},
-       {PTP_V2_MM_ID_FAULT_LOG_RESET                                   ,"Fault log reset"},
-       {PTP_V2_MM_ID_DEFAULT_DATA_SET                                  ,"Default dataset"},
-       {PTP_V2_MM_ID_CURRENT_DATA_SET                                  ,"Current dataset"},
-       {PTP_V2_MM_ID_PARENT_DATA_SET                                   ,"Parent dataset"},
-       {PTP_V2_MM_ID_TIME_PROPERTIES_DATA_SET                  ,"Time properties dataset"},
-       {PTP_V2_MM_ID_PORT_DATA_SET                                             ,"Port dataset"},
-       {PTP_V2_MM_ID_PRIORITY1                                                 ,"Priority 1"},
-       {PTP_V2_MM_ID_PRIORITY2                                                 ,"Priority 2"},
-       {PTP_V2_MM_ID_DOMAIN                                                    ,"Domain"},
-       {PTP_V2_MM_ID_SLAVE_ONLY                                                ,"Slave only"},
-       {PTP_V2_MM_ID_LOG_ANNOUNCE_INTERVAL                             ,"Log announce interval"},
-       {PTP_V2_MM_ID_ANNOUNCE_RECEIPT_TIMEOUT                  ,"Announce receipt timeout"},
-       {PTP_V2_MM_ID_LOG_SYNC_INTERVAL                                 ,"Log sync interval"},
-       {PTP_V2_MM_ID_VERSION_NUMBER                                    ,"Version number"},
-       {PTP_V2_MM_ID_ENABLE_PORT                                               ,"Enable port"},
-       {PTP_V2_MM_ID_DISABLE_PORT                                              ,"Disable port"},
-       {PTP_V2_MM_ID_TIME                                                              ,"Time"},
-       {PTP_V2_MM_ID_CLOCK_ACCURACY                                    ,"Clock accuracy"},
-       {PTP_V2_MM_ID_UTC_PROPERTIES                                    ,"UTC properties"},
-       {PTP_V2_MM_ID_TRACEABILITY_PROPERTIES                   ,"Traceability properties"},
-       {PTP_V2_MM_ID_TIMESCALE_PROPERTIES                              ,"Timescale properties"},
-       {PTP_V2_MM_ID_UNICAST_NEGOTIATION_ENABLE                ,"Unicast negotiation enable"},
-       {PTP_V2_MM_ID_PATH_TRACE_LIST                                   ,"Path trace list"},
-       {PTP_V2_MM_ID_PATH_TRACE_ENABLE                                 ,"Path trace enable"},
-       {PTP_V2_MM_ID_GRANDMASTER_CLUSTER_TABLE                 ,"Grandmaster cluster table"},
-       {PTP_V2_MM_ID_UNICAST_MASTER_TABLE                              ,"Unicast master table"},
-       {PTP_V2_MM_ID_UNICAST_MASTER_MAX_TABLE_SIZE             ,"Unicast master max table size"},
-       {PTP_V2_MM_ID_ACCEPTABLE_MASTER_TABLE                   ,"Acceptable master table"},
-       {PTP_V2_MM_ID_ACCEPTABLE_MASTER_TABLE_ENABLED   ,"Acceptable master table enabled"},
-       {PTP_V2_MM_ID_ACCEPTABLE_MASTER_MAX_TABLE_SIZE  ,"Acceptable master max table size"},
-       {PTP_V2_MM_ID_ALTERNATE_MASTER                                  ,"Alternate master"},
-       {PTP_V2_MM_ID_ALTERNATE_TIME_OFFSET_ENABLE              ,"Alternate time offset enable"},
-       {PTP_V2_MM_ID_ALTERNATE_TIME_OFFSET_NAME                ,"Alternate time offset name"},
-       {PTP_V2_MM_ID_ALTERNATE_TIME_OFFSET_MAX_KEY             ,"Alternate time offset max key"},
-       {PTP_V2_MM_ID_ALTERNATE_TIME_OFFSET_PROPERTIES  ,"Alternate time offset properties"},
-       {PTP_V2_MM_ID_TC_DEFAULT_DATA_SET                               ,"Transparent clock default dataset"},
-       {PTP_V2_MM_ID_TC_PORT_DATA_SET                                  ,"Transparent clock port dataset"},
-       {PTP_V2_MM_ID_PRIMARY_DOMAIN                                    ,"Primary domain"},
-       {PTP_V2_MM_ID_DELAY_MECHANISM                                   ,"Delay mechanism"},
-       {PTP_V2_MM_ID_LOG_MIN_PDELAY_REQ_INTERVAL               ,"Log min pdelay req. interval"},
-    {0                                                                                         , NULL} };
+    {PTP_V2_MM_ID_NULL_MANAGEMENT                   ,"Null management"},
+    {PTP_V2_MM_ID_CLOCK_DESCRIPTION                 ,"Clock description"},
+    {PTP_V2_MM_ID_USER_DESCRIPTION                  ,"User description"},
+    {PTP_V2_MM_ID_SAVE_IN_NON_VOLATILE_STORAGE      ,"Save in non volatile storage"},
+    {PTP_V2_MM_ID_RESET_NON_VOLATILE_STORAGE        ,"Reset non volatile storage"},
+    {PTP_V2_MM_ID_INITIALIZE                        ,"Initialize"},
+    {PTP_V2_MM_ID_FAULT_LOG                         ,"Fault log"},
+    {PTP_V2_MM_ID_FAULT_LOG_RESET                   ,"Fault log reset"},
+    {PTP_V2_MM_ID_DEFAULT_DATA_SET                  ,"Default dataset"},
+    {PTP_V2_MM_ID_CURRENT_DATA_SET                  ,"Current dataset"},
+    {PTP_V2_MM_ID_PARENT_DATA_SET                   ,"Parent dataset"},
+    {PTP_V2_MM_ID_TIME_PROPERTIES_DATA_SET          ,"Time properties dataset"},
+    {PTP_V2_MM_ID_PORT_DATA_SET                     ,"Port dataset"},
+    {PTP_V2_MM_ID_PRIORITY1                         ,"Priority 1"},
+    {PTP_V2_MM_ID_PRIORITY2                         ,"Priority 2"},
+    {PTP_V2_MM_ID_DOMAIN                            ,"Domain"},
+    {PTP_V2_MM_ID_SLAVE_ONLY                        ,"Slave only"},
+    {PTP_V2_MM_ID_LOG_ANNOUNCE_INTERVAL             ,"Log announce interval"},
+    {PTP_V2_MM_ID_ANNOUNCE_RECEIPT_TIMEOUT          ,"Announce receipt timeout"},
+    {PTP_V2_MM_ID_LOG_SYNC_INTERVAL                 ,"Log sync interval"},
+    {PTP_V2_MM_ID_VERSION_NUMBER                    ,"Version number"},
+    {PTP_V2_MM_ID_ENABLE_PORT                       ,"Enable port"},
+    {PTP_V2_MM_ID_DISABLE_PORT                      ,"Disable port"},
+    {PTP_V2_MM_ID_TIME                              ,"Time"},
+    {PTP_V2_MM_ID_CLOCK_ACCURACY                    ,"Clock accuracy"},
+    {PTP_V2_MM_ID_UTC_PROPERTIES                    ,"UTC properties"},
+    {PTP_V2_MM_ID_TRACEABILITY_PROPERTIES           ,"Traceability properties"},
+    {PTP_V2_MM_ID_TIMESCALE_PROPERTIES              ,"Timescale properties"},
+    {PTP_V2_MM_ID_UNICAST_NEGOTIATION_ENABLE        ,"Unicast negotiation enable"},
+    {PTP_V2_MM_ID_PATH_TRACE_LIST                   ,"Path trace list"},
+    {PTP_V2_MM_ID_PATH_TRACE_ENABLE                 ,"Path trace enable"},
+    {PTP_V2_MM_ID_GRANDMASTER_CLUSTER_TABLE         ,"Grandmaster cluster table"},
+    {PTP_V2_MM_ID_UNICAST_MASTER_TABLE              ,"Unicast master table"},
+    {PTP_V2_MM_ID_UNICAST_MASTER_MAX_TABLE_SIZE     ,"Unicast master max table size"},
+    {PTP_V2_MM_ID_ACCEPTABLE_MASTER_TABLE           ,"Acceptable master table"},
+    {PTP_V2_MM_ID_ACCEPTABLE_MASTER_TABLE_ENABLED   ,"Acceptable master table enabled"},
+    {PTP_V2_MM_ID_ACCEPTABLE_MASTER_MAX_TABLE_SIZE  ,"Acceptable master max table size"},
+    {PTP_V2_MM_ID_ALTERNATE_MASTER                  ,"Alternate master"},
+    {PTP_V2_MM_ID_ALTERNATE_TIME_OFFSET_ENABLE      ,"Alternate time offset enable"},
+    {PTP_V2_MM_ID_ALTERNATE_TIME_OFFSET_NAME        ,"Alternate time offset name"},
+    {PTP_V2_MM_ID_ALTERNATE_TIME_OFFSET_MAX_KEY     ,"Alternate time offset max key"},
+    {PTP_V2_MM_ID_ALTERNATE_TIME_OFFSET_PROPERTIES  ,"Alternate time offset properties"},
+    {PTP_V2_MM_ID_TC_DEFAULT_DATA_SET               ,"Transparent clock default dataset"},
+    {PTP_V2_MM_ID_TC_PORT_DATA_SET                  ,"Transparent clock port dataset"},
+    {PTP_V2_MM_ID_PRIMARY_DOMAIN                    ,"Primary domain"},
+    {PTP_V2_MM_ID_DELAY_MECHANISM                   ,"Delay mechanism"},
+    {PTP_V2_MM_ID_LOG_MIN_PDELAY_REQ_INTERVAL       ,"Log min pdelay req. interval"},
+    {0                                              , NULL} };
 
 static const value_string ptp_v2_TLV_type_vals[] = {
-       {PTP_V2_TLV_TYPE_RESERVED                                               ,"Reserved"},
-       {PTP_V2_TLV_TYPE_MANAGEMENT                                             ,"Management"},
-       {PTP_V2_TLV_TYPE_MANAGEMENT_ERROR_STATUS                ,"Management error status"},
-       {PTP_V2_TLV_TYPE_ORGANIZATION_EXTENSION                 ,"Organization extension"},
-       {PTP_V2_TLV_TYPE_REQUEST_UNICAST_TRANSMISSION   ,"Request unicast transmission"},
-       {PTP_V2_TLV_TYPE_GRANT_UNICAST_TRANSMISSION             ,"Grant unicast transmission"},
-       {PTP_V2_TLV_TYPE_CANCEL_UNICAST_TRANSMISSION    ,"Cancel unicast transmission"},
-       {PTP_V2_TLV_TYPE_ACKNOWLEDGE_CANCEL_UNICAST_TRANSMISSION        ,"Acknowledge cancel unicast transmission"},
-       {PTP_V2_TLV_TYPE_PATH_TRACE                                             ,"Path trace"},
-       {PTP_V2_TLV_TYPE_ALTERNATE_TIME_OFFSET_INDICATOR,"Alternate time offset indicator"},
-       {PTP_V2_TLV_TYPE_AUTHENTICATION                                 ,"Authentication"},
-       {PTP_V2_TLV_TYPE_AUTHENTICATION_CHALLENGE               ,"Authentication challenge"},
-       {PTP_V2_TLV_TYPE_SECURITY_ASSOCIATION_UPDATE    ,"Security association update"},
-       {PTP_V2_TLV_TYPE_CUM_FREQ_SCALE_FACTOR_OFFSET   ,"Cum. freq. scale factor offset"},
-    {0                                                                                         , NULL} };
+    {PTP_V2_TLV_TYPE_RESERVED                       ,"Reserved"},
+    {PTP_V2_TLV_TYPE_MANAGEMENT                     ,"Management"},
+    {PTP_V2_TLV_TYPE_MANAGEMENT_ERROR_STATUS        ,"Management error status"},
+    {PTP_V2_TLV_TYPE_ORGANIZATION_EXTENSION         ,"Organization extension"},
+    {PTP_V2_TLV_TYPE_REQUEST_UNICAST_TRANSMISSION   ,"Request unicast transmission"},
+    {PTP_V2_TLV_TYPE_GRANT_UNICAST_TRANSMISSION     ,"Grant unicast transmission"},
+    {PTP_V2_TLV_TYPE_CANCEL_UNICAST_TRANSMISSION    ,"Cancel unicast transmission"},
+    {PTP_V2_TLV_TYPE_ACKNOWLEDGE_CANCEL_UNICAST_TRANSMISSION    ,"Acknowledge cancel unicast transmission"},
+    {PTP_V2_TLV_TYPE_PATH_TRACE                     ,"Path trace"},
+    {PTP_V2_TLV_TYPE_ALTERNATE_TIME_OFFSET_INDICATOR,"Alternate time offset indicator"},
+    {PTP_V2_TLV_TYPE_AUTHENTICATION                 ,"Authentication"},
+    {PTP_V2_TLV_TYPE_AUTHENTICATION_CHALLENGE       ,"Authentication challenge"},
+    {PTP_V2_TLV_TYPE_SECURITY_ASSOCIATION_UPDATE    ,"Security association update"},
+    {PTP_V2_TLV_TYPE_CUM_FREQ_SCALE_FACTOR_OFFSET   ,"Cum. freq. scale factor offset"},
+    {0                                              , NULL} };
 
 
 static const value_string ptp2_networkProtocol_vals[] = {
-  {0x0000,  "Reserved"},
-  {0x0001,  "UDP/IPv4"},
-  {0x0002,  "UDP/IPv6"},
-  {0x0003,  "IEEE 802.3"},
-  {0x0004,  "DeviceNet"},
-  {0x0005,  "ControlNet"},
-  {0x0006,  "PROFINET"},
-  {0x0007,  "Reserved"},
-  {0xFFFE,  "Unknown Protocol"},
-  {0xFFFF,  "Reserved"},
-  {0,              NULL          } };
+    {0x0000,  "Reserved"},
+    {0x0001,  "UDP/IPv4"},
+    {0x0002,  "UDP/IPv6"},
+    {0x0003,  "IEEE 802.3"},
+    {0x0004,  "DeviceNet"},
+    {0x0005,  "ControlNet"},
+    {0x0006,  "PROFINET"},
+    {0x0007,  "Reserved"},
+    {0xFFFE,  "Unknown Protocol"},
+    {0xFFFF,  "Reserved"},
+    {0,              NULL          } };
 
 
 static const value_string ptp_v2_messageid_vals[] = {
-    {PTP_V2_SYNC_MESSAGE,                              "Sync Message"},
-    {PTP_V2_DELAY_REQ_MESSAGE,                 "Delay_Req Message"},
-    {PTP_V2_PATH_DELAY_REQ_MESSAGE,            "Path_Delay_Req Message"},
-    {PTP_V2_PATH_DELAY_RESP_MESSAGE,   "Path_Delay_Resp Message"},
-    {PTP_V2_FOLLOWUP_MESSAGE,                  "Follow_Up Message"},
-    {PTP_V2_DELAY_RESP_MESSAGE,                        "Delay_Resp Message"},
+    {PTP_V2_SYNC_MESSAGE,               "Sync Message"},
+    {PTP_V2_DELAY_REQ_MESSAGE,          "Delay_Req Message"},
+    {PTP_V2_PATH_DELAY_REQ_MESSAGE,     "Path_Delay_Req Message"},
+    {PTP_V2_PATH_DELAY_RESP_MESSAGE,    "Path_Delay_Resp Message"},
+    {PTP_V2_FOLLOWUP_MESSAGE,           "Follow_Up Message"},
+    {PTP_V2_DELAY_RESP_MESSAGE,         "Delay_Resp Message"},
     {PTP_V2_PATH_DELAY_FOLLOWUP_MESSAGE,"Path_Delay_Resp_Follow_Up Message"},
-    {PTP_V2_ANNOUNCE_MESSAGE,                  "Announce Message"},
-    {PTP_V2_SIGNALLING_MESSAGE,                        "Signalling Message"},
-    {PTP_V2_MANAGEMENT_MESSAGE,                        "Management Message"},
-    {0,                                                                         NULL }
+    {PTP_V2_ANNOUNCE_MESSAGE,           "Announce Message"},
+    {PTP_V2_SIGNALLING_MESSAGE,         "Signalling Message"},
+    {PTP_V2_MANAGEMENT_MESSAGE,         "Management Message"},
+    {0,                                  NULL }
 };
 
 static const value_string ptp_v2_clockaccuracy_vals[] = {
     {0x20,  "The time is accurate to within 25 ns"},
-       {0x21,  "The time is accurate to within 100 ns"},
-       {0x22,  "The time is accurate to within 250 ns"},
-       {0x23,  "The time is accurate to within 1 us"},
-       {0x24,  "The time is accurate to within 2,5 us"},
-       {0x25,  "The time is accurate to within 10 us"},
-       {0x26,  "The time is accurate to within 25 us"},
-       {0x27,  "The time is accurate to within 100 us"},
-       {0x28,  "The time is accurate to within 250 us"},
-       {0x29,  "The time is accurate to within 1 ms"},
-       {0x2A,  "The time is accurate to within 2,5 ms"},
-       {0x2B,  "The time is accurate to within 10 ms"},
-       {0x2C,  "The time is accurate to within 25 ms"},
-       {0x2D,  "The time is accurate to within 100 ms"},
-       {0x2E,  "The time is accurate to within 250 ms"},
-       {0x2F,  "The time is accurate to within 1 s"},
-       {0x30,  "The time is accurate to within 10 s"},
-       {0x31,  "The time is accurate to >10 s"},
-       {0x32,  "reserved"},
-       {0x80,  "For use by alternate PTP profiles"},
-       {0xFE,  "Accuracy Unknown"},
-       {0xFF,  "reserved"},
-       {0,              NULL          }
+    {0x21,  "The time is accurate to within 100 ns"},
+    {0x22,  "The time is accurate to within 250 ns"},
+    {0x23,  "The time is accurate to within 1 us"},
+    {0x24,  "The time is accurate to within 2,5 us"},
+    {0x25,  "The time is accurate to within 10 us"},
+    {0x26,  "The time is accurate to within 25 us"},
+    {0x27,  "The time is accurate to within 100 us"},
+    {0x28,  "The time is accurate to within 250 us"},
+    {0x29,  "The time is accurate to within 1 ms"},
+    {0x2A,  "The time is accurate to within 2,5 ms"},
+    {0x2B,  "The time is accurate to within 10 ms"},
+    {0x2C,  "The time is accurate to within 25 ms"},
+    {0x2D,  "The time is accurate to within 100 ms"},
+    {0x2E,  "The time is accurate to within 250 ms"},
+    {0x2F,  "The time is accurate to within 1 s"},
+    {0x30,  "The time is accurate to within 10 s"},
+    {0x31,  "The time is accurate to >10 s"},
+    {0x32,  "reserved"},
+    {0x80,  "For use by alternate PTP profiles"},
+    {0xFE,  "Accuracy Unknown"},
+    {0xFF,  "reserved"},
+    {0,              NULL          }
 };
 
 static const value_string ptp_v2_timesource_vals[] = {
     {0x10,  "ATOMIC_CLOCK"},
-       {0x20,  "GPS"},
-       {0x30,  "TERRESTRIAL_RADIO"},
-       {0x40,  "PTP"},
-       {0x50,  "NTP"},
-       {0x60,  "HAND_SET"},
-       {0x90,  "OTHER"},
-       {0xA0,  "INTERNAL_OSCILLATOR"},
-       {0xFF,  "reserved"},
-       {0,              NULL          }
+    {0x20,  "GPS"},
+    {0x30,  "TERRESTRIAL_RADIO"},
+    {0x40,  "PTP"},
+    {0x50,  "NTP"},
+    {0x60,  "HAND_SET"},
+    {0x90,  "OTHER"},
+    {0xA0,  "INTERNAL_OSCILLATOR"},
+    {0xFF,  "reserved"},
+    {0,              NULL          }
 };
 
 static const value_string ptp_v2_mm_action_vals[] = {
     {0x0,  "GET"},
-       {0x1,  "SET"},
-       {0x2,  "RESPONSE"},
-       {0x3,  "COMMAND"},
-       {0x4,  "ACKNOWLEDGE"},
-       {0,              NULL          }
+    {0x1,  "SET"},
+    {0x2,  "RESPONSE"},
+    {0x3,  "COMMAND"},
+    {0x4,  "ACKNOWLEDGE"},
+    {0,              NULL          }
 };
 
 static const value_string ptp2_severityCode_vals[] = {
-  {0x00,  "Emergency: system is unusable"},
-  {0x01,  "Alert: immediate action needed"},
-  {0x02,  "Critical: critical conditions"},
-  {0x03,  "Error: error conditions"},
-  {0x04,  "Warning: warning conditions"},
-  {0x05,  "Notice: normal but significant condition"},
-  {0x06,  "Informational: informational messages"},
-  {0x07,  "Debug: debug-level messages"},
-  {0x08,  "Reserved"},
-  {0xFF,  "Reserved"},
-  {0,      NULL}
+    {0x00,  "Emergency: system is unusable"},
+    {0x01,  "Alert: immediate action needed"},
+    {0x02,  "Critical: critical conditions"},
+    {0x03,  "Error: error conditions"},
+    {0x04,  "Warning: warning conditions"},
+    {0x05,  "Notice: normal but significant condition"},
+    {0x06,  "Informational: informational messages"},
+    {0x07,  "Debug: debug-level messages"},
+    {0x08,  "Reserved"},
+    {0xFF,  "Reserved"},
+    {0,      NULL}
 };
 
 static const value_string ptp2_portState_vals[] = {
-  {0x01,  "INITIALIZING"},
-  {0x02,  "FAULTY"},
-  {0x03,  "DISABLED"},
-  {0x04,  "LISTENING"},
-  {0x05,  "PRE_MASTER"},
-  {0x06,  "MASTER"},
-  {0x07,  "PASSIVE"},
-  {0x08,  "UNCALIBRATED"},
-  {0x09,  "SLAVE"},
-  {0,     NULL}
+    {0x01,  "INITIALIZING"},
+    {0x02,  "FAULTY"},
+    {0x03,  "DISABLED"},
+    {0x04,  "LISTENING"},
+    {0x05,  "PRE_MASTER"},
+    {0x06,  "MASTER"},
+    {0x07,  "PASSIVE"},
+    {0x08,  "UNCALIBRATED"},
+    {0x09,  "SLAVE"},
+    {0,     NULL}
 };
 
 static const value_string ptp2_delayMechanism_vals[] = {
-  {0x01,  "E2E"},
-  {0x02,  "P2P"},
-  {0xFE,  "DISABLED"},
-  {0,     NULL}
+    {0x01,  "E2E"},
+    {0x02,  "P2P"},
+    {0xFE,  "DISABLED"},
+    {0,     NULL}
 };
 
 static const value_string ptp2_managementErrorId_vals[] = {
-  {0x0000,  "Reserved"},
-  {0x0001,  "RESPONSE_TOO_BIG"},
-  {0x0002,  "NO_SUCH_ID"},
-  {0x0003,  "WRONG_LENGTH"},
-  {0x0004,  "WRONG_VALUE"},
-  {0x0005,  "NOT_SETABLE"},
-  {0x0006,  "NOT_SUPPORTED"},
-  {0x0007,  "Reserved"},
-  {0xFFFE,  "GENERAL_ERROR"},
-  {0xFFFF,  "Reserved"},
-  {0,     NULL}
+    {0x0000,  "Reserved"},
+    {0x0001,  "RESPONSE_TOO_BIG"},
+    {0x0002,  "NO_SUCH_ID"},
+    {0x0003,  "WRONG_LENGTH"},
+    {0x0004,  "WRONG_VALUE"},
+    {0x0005,  "NOT_SETABLE"},
+    {0x0006,  "NOT_SUPPORTED"},
+    {0x0007,  "Reserved"},
+    {0xFFFE,  "GENERAL_ERROR"},
+    {0xFFFF,  "Reserved"},
+    {0,     NULL}
 };
 
 /**********************************************************/
-/* Initialize the protocol and registered fields                 */
+/* Initialize the protocol and registered fields          */
 /**********************************************************/
 
 static int hf_ptp_v2_transportspecific = -1;
@@ -1181,7 +1184,7 @@ static int hf_ptp_v2_logmessageperiod = -1;
 
 
 /*Fields for PTP_Announce (=an) messages*/
-static int hf_ptp_v2_an_origintimestamp = -1;  /*Field for seconds & nanoseconds*/
+static int hf_ptp_v2_an_origintimestamp = -1;   /*Field for seconds & nanoseconds*/
 static int hf_ptp_v2_an_origintimestamp_seconds = -1;
 static int hf_ptp_v2_an_origintimestamp_nanoseconds = -1;
 static int hf_ptp_v2_an_origincurrentutcoffset = -1;
@@ -1209,19 +1212,19 @@ static int hf_ptp_v2_atoi_tlv_displayname_length = -1;
 static int hf_ptp_v2_an_tlv_data = -1;
 
 /*Fields for PTP_Sync AND PTP_DelayRequest (=sdr) messages*/
-static int hf_ptp_v2_sdr_origintimestamp = -1; /*Field for seconds & nanoseconds*/
+static int hf_ptp_v2_sdr_origintimestamp = -1;  /*Field for seconds & nanoseconds*/
 static int hf_ptp_v2_sdr_origintimestamp_seconds = -1;
 static int hf_ptp_v2_sdr_origintimestamp_nanoseconds = -1;
 
 
 /*Fields for PTP_Follow_Up (=fu) messages*/
-static int hf_ptp_v2_fu_preciseorigintimestamp = -1;   /*Field for seconds & nanoseconds*/
+static int hf_ptp_v2_fu_preciseorigintimestamp = -1;    /*Field for seconds & nanoseconds*/
 static int hf_ptp_v2_fu_preciseorigintimestamp_seconds = -1;
 static int hf_ptp_v2_fu_preciseorigintimestamp_nanoseconds = -1;
 
 
 /*Fields for PTP_DelayResponse (=dr) messages*/
-static int hf_ptp_v2_dr_receivetimestamp = -1; /*Field for seconds & nanoseconds*/
+static int hf_ptp_v2_dr_receivetimestamp = -1;  /*Field for seconds & nanoseconds*/
 static int hf_ptp_v2_dr_receivetimestamp_seconds = -1;
 static int hf_ptp_v2_dr_receivetimestamp_nanoseconds = -1;
 static int hf_ptp_v2_dr_requestingportidentity = -1;
@@ -1229,13 +1232,13 @@ static int hf_ptp_v2_dr_requestingsourceportid = -1;
 
 
 /*Fields for PTP_PDelayRequest (=pdrq) messages*/
-static int hf_ptp_v2_pdrq_origintimestamp = -1;        /*Field for seconds & nanoseconds*/
+static int hf_ptp_v2_pdrq_origintimestamp = -1; /*Field for seconds & nanoseconds*/
 static int hf_ptp_v2_pdrq_origintimestamp_seconds = -1;
 static int hf_ptp_v2_pdrq_origintimestamp_nanoseconds = -1;
 
 
 /*Fields for PTP_PDelayResponse (=pdrs) messages*/
-static int hf_ptp_v2_pdrs_requestreceipttimestamp = -1;        /*Field for seconds & nanoseconds*/
+static int hf_ptp_v2_pdrs_requestreceipttimestamp = -1; /*Field for seconds & nanoseconds*/
 static int hf_ptp_v2_pdrs_requestreceipttimestamp_seconds = -1;
 static int hf_ptp_v2_pdrs_requestreceipttimestamp_nanoseconds = -1;
 static int hf_ptp_v2_pdrs_requestingportidentity = -1;
@@ -1243,7 +1246,7 @@ static int hf_ptp_v2_pdrs_requestingsourceportid = -1;
 
 
 /*Fields for PTP_PDelayResponseFollowUp (=pdfu) messages*/
-static int hf_ptp_v2_pdfu_responseorigintimestamp = -1;        /*Field for seconds & nanoseconds*/
+static int hf_ptp_v2_pdfu_responseorigintimestamp = -1; /*Field for seconds & nanoseconds*/
 static int hf_ptp_v2_pdfu_responseorigintimestamp_seconds = -1;
 static int hf_ptp_v2_pdfu_responseorigintimestamp_nanoseconds = -1;
 static int hf_ptp_v2_pdfu_requestingportidentity = -1;
@@ -1419,7 +1422,7 @@ static void
 dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
 
 /**********************************************************/
-/* Implementation of the functions                               */
+/* Implementation of the functions                        */
 /**********************************************************/
 
 
@@ -1428,16 +1431,16 @@ dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
 static void
 dissect_ptp_oE(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 {
-       ptpv2_oE = TRUE;
-       /* PTP over Ethernet only available with PTPv2 */
-       dissect_ptp_v2(tvb, pinfo, tree);
+    ptpv2_oE = TRUE;
+    /* PTP over Ethernet only available with PTPv2 */
+    dissect_ptp_v2(tvb, pinfo, tree);
 }
 
 static void
 dissect_ptp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 {
-       ptpv2_oE = FALSE;
-       if(is_ptp_v1(tvb))
+    ptpv2_oE = FALSE;
+    if(is_ptp_v1(tvb))
         dissect_ptp_v1(tvb, pinfo, tree);
     else if(is_ptp_v2(tvb))
         dissect_ptp_v2(tvb, pinfo, tree);
@@ -1477,662 +1480,662 @@ is_ptp_v2(tvbuff_t *tvb)
 static void
 dissect_ptp_v1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 {
-    guint8     ptp_control, ptp_mm_messagekey = 0;
-       nstime_t ts;    /*time structure with seconds and nanoseconds*/
+    guint8  ptp_control, ptp_mm_messagekey = 0;
+    nstime_t ts;    /*time structure with seconds and nanoseconds*/
 
 /* Set up structures needed to add the protocol subtree and manage it */
-       proto_item *ti, *flags_ti, *time_ti, *time2_ti;
-       proto_tree *ptp_tree, *ptp_flags_tree, *ptp_time_tree, *ptp_time2_tree;
+    proto_item *ti, *flags_ti, *time_ti, *time2_ti;
+    proto_tree *ptp_tree, *ptp_flags_tree, *ptp_time_tree, *ptp_time2_tree;
 
 /* Make entries in Protocol column and Info column on summary display */
-       col_set_str(pinfo->cinfo, COL_PROTOCOL, "PTPv1");
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, "PTPv1");
 
 
 /* Get control field (what kind of message is this? (Sync, DelayReq, ...) */
 
-       ptp_control = tvb_get_guint8 (tvb, PTP_CONTROL_OFFSET);
-       /* MGMT packet? */
-       if ( ptp_control == PTP_MANAGEMENT_MESSAGE ){
-               /* Get the managementMessageKey */
-                       ptp_mm_messagekey = tvb_get_guint8(tvb, PTP_MM_MANAGEMENTMESSAGEKEY_OFFSET);
-       }
+    ptp_control = tvb_get_guint8 (tvb, PTP_CONTROL_OFFSET);
+    /* MGMT packet? */
+    if ( ptp_control == PTP_MANAGEMENT_MESSAGE ){
+        /* Get the managementMessageKey */
+        ptp_mm_messagekey = tvb_get_guint8(tvb, PTP_MM_MANAGEMENTMESSAGEKEY_OFFSET);
+    }
 
 /* Create and set the string for "Info" column */
-       switch(ptp_control){
-               case PTP_SYNC_MESSAGE:{
-                       col_set_str(pinfo->cinfo, COL_INFO, "Sync Message");
-                       break;
-               }
-               case PTP_DELAY_REQ_MESSAGE:{
-                       col_set_str(pinfo->cinfo, COL_INFO, "Delay_Request Message");
-                       break;
-               }
-               case PTP_FOLLOWUP_MESSAGE:{
-                       col_set_str(pinfo->cinfo, COL_INFO, "Follow_Up Message");
-                       break;
-               }
-               case PTP_DELAY_RESP_MESSAGE:{
-                       col_set_str(pinfo->cinfo, COL_INFO, "Delay_Response Message");
-                       break;
-               }
-               case PTP_MANAGEMENT_MESSAGE:{
-                       if (check_col(pinfo->cinfo, COL_INFO)){
-                               col_add_fstr(pinfo->cinfo, COL_INFO, "Management Message (%s)",
-                                   val_to_str(ptp_mm_messagekey,
-                                       ptp_managementMessageKey_infocolumn_vals,
-                                       "Unknown message key %u"));
-                       }
-                       break;
-               }
-               default:{
-                       col_set_str(pinfo->cinfo, COL_INFO, "Unknown Message");
-                       break;
-               }
-       }
-
-       if (tree) {
+    switch(ptp_control){
+        case PTP_SYNC_MESSAGE:{
+            col_set_str(pinfo->cinfo, COL_INFO, "Sync Message");
+            break;
+        }
+        case PTP_DELAY_REQ_MESSAGE:{
+            col_set_str(pinfo->cinfo, COL_INFO, "Delay_Request Message");
+            break;
+        }
+        case PTP_FOLLOWUP_MESSAGE:{
+            col_set_str(pinfo->cinfo, COL_INFO, "Follow_Up Message");
+            break;
+        }
+        case PTP_DELAY_RESP_MESSAGE:{
+            col_set_str(pinfo->cinfo, COL_INFO, "Delay_Response Message");
+            break;
+        }
+        case PTP_MANAGEMENT_MESSAGE:{
+            if (check_col(pinfo->cinfo, COL_INFO)){
+                col_add_fstr(pinfo->cinfo, COL_INFO, "Management Message (%s)",
+                             val_to_str(ptp_mm_messagekey,
+                                        ptp_managementMessageKey_infocolumn_vals,
+                                        "Unknown message key %u"));
+            }
+            break;
+        }
+        default:{
+            col_set_str(pinfo->cinfo, COL_INFO, "Unknown Message");
+            break;
+        }
+    }
 
-               /* create display subtree for the protocol */
-               ti = proto_tree_add_item(tree, proto_ptp, tvb, 0, -1, FALSE);
+    if (tree) {
 
-               ptp_tree = proto_item_add_subtree(ti, ett_ptp);
+        /* create display subtree for the protocol */
+        ti = proto_tree_add_item(tree, proto_ptp, tvb, 0, -1, FALSE);
 
-               proto_tree_add_item(ptp_tree,
-                   hf_ptp_versionptp, tvb, PTP_VERSIONPTP_OFFSET, 2, FALSE);
+        ptp_tree = proto_item_add_subtree(ti, ett_ptp);
 
-               proto_tree_add_item(ptp_tree,
-                   hf_ptp_versionnetwork, tvb, PTP_VERSIONNETWORK_OFFSET, 2, FALSE);
+        proto_tree_add_item(ptp_tree,
+            hf_ptp_versionptp, tvb, PTP_VERSIONPTP_OFFSET, 2, FALSE);
 
-               proto_tree_add_item(ptp_tree,
-                   hf_ptp_subdomain, tvb, PTP_SUBDOMAIN_OFFSET, 16, FALSE);
+        proto_tree_add_item(ptp_tree,
+            hf_ptp_versionnetwork, tvb, PTP_VERSIONNETWORK_OFFSET, 2, FALSE);
 
-               proto_tree_add_item(ptp_tree,
-                   hf_ptp_messagetype, tvb, PTP_MESSAGETYPE_OFFSET, 1, FALSE);
+        proto_tree_add_item(ptp_tree,
+            hf_ptp_subdomain, tvb, PTP_SUBDOMAIN_OFFSET, 16, FALSE);
 
-               proto_tree_add_item(ptp_tree,
-                   hf_ptp_sourcecommunicationtechnology, tvb, PTP_SOURCECOMMUNICATIONTECHNOLOGY_OFFSET, 1, FALSE);
+        proto_tree_add_item(ptp_tree,
+            hf_ptp_messagetype, tvb, PTP_MESSAGETYPE_OFFSET, 1, FALSE);
 
-               proto_tree_add_item(ptp_tree,
-                   hf_ptp_sourceuuid, tvb, PTP_SOURCEUUID_OFFSET, 6, FALSE);
+        proto_tree_add_item(ptp_tree,
+            hf_ptp_sourcecommunicationtechnology, tvb, PTP_SOURCECOMMUNICATIONTECHNOLOGY_OFFSET, 1, FALSE);
 
-               proto_tree_add_item(ptp_tree,
-                   hf_ptp_sourceportid, tvb, PTP_SOURCEPORTID_OFFSET, 2, FALSE);
+        proto_tree_add_item(ptp_tree,
+            hf_ptp_sourceuuid, tvb, PTP_SOURCEUUID_OFFSET, 6, FALSE);
 
-               proto_tree_add_item(ptp_tree,
-                   hf_ptp_sequenceid, tvb, PTP_SEQUENCEID_OFFSET, 2, FALSE);
+        proto_tree_add_item(ptp_tree,
+            hf_ptp_sourceportid, tvb, PTP_SOURCEPORTID_OFFSET, 2, FALSE);
 
-               proto_tree_add_item(ptp_tree,
-                   hf_ptp_control, tvb, PTP_CONTROL_OFFSET, 1, FALSE);
+        proto_tree_add_item(ptp_tree,
+            hf_ptp_sequenceid, tvb, PTP_SEQUENCEID_OFFSET, 2, FALSE);
+
+        proto_tree_add_item(ptp_tree,
+            hf_ptp_control, tvb, PTP_CONTROL_OFFSET, 1, FALSE);
 
-               /*Subtree for the flag-field*/
-               if(tree){
-                       flags_ti = proto_tree_add_item(ptp_tree,
-                       hf_ptp_flags, tvb, PTP_FLAGS_OFFSET, 2, FALSE);
+        /*Subtree for the flag-field*/
+        if(tree){
+            flags_ti = proto_tree_add_item(ptp_tree,
+                hf_ptp_flags, tvb, PTP_FLAGS_OFFSET, 2, FALSE);
 
-                       ptp_flags_tree = proto_item_add_subtree(flags_ti, ett_ptp_flags);
+            ptp_flags_tree = proto_item_add_subtree(flags_ti, ett_ptp_flags);
 
-                       proto_tree_add_item(ptp_flags_tree,
-                       hf_ptp_flags_li61, tvb, PTP_FLAGS_LI61_OFFSET, 2, FALSE);
+            proto_tree_add_item(ptp_flags_tree,
+                hf_ptp_flags_li61, tvb, PTP_FLAGS_LI61_OFFSET, 2, FALSE);
 
-                       proto_tree_add_item(ptp_flags_tree,
-                       hf_ptp_flags_li59, tvb, PTP_FLAGS_LI59_OFFSET, 2, FALSE);
+            proto_tree_add_item(ptp_flags_tree,
+                hf_ptp_flags_li59, tvb, PTP_FLAGS_LI59_OFFSET, 2, FALSE);
 
-                       proto_tree_add_item(ptp_flags_tree,
-                       hf_ptp_flags_boundary_clock, tvb, PTP_FLAGS_BOUNDARY_CLOCK_OFFSET, 2, FALSE);
+            proto_tree_add_item(ptp_flags_tree,
+                hf_ptp_flags_boundary_clock, tvb, PTP_FLAGS_BOUNDARY_CLOCK_OFFSET, 2, FALSE);
 
-                       proto_tree_add_item(ptp_flags_tree,
-                       hf_ptp_flags_assist, tvb, PTP_FLAGS_ASSIST_OFFSET, 2, FALSE);
+            proto_tree_add_item(ptp_flags_tree,
+                hf_ptp_flags_assist, tvb, PTP_FLAGS_ASSIST_OFFSET, 2, FALSE);
 
-                       proto_tree_add_item(ptp_flags_tree,
-                               hf_ptp_flags_ext_sync, tvb, PTP_FLAGS_EXT_SYNC_OFFSET, 2, FALSE);
+            proto_tree_add_item(ptp_flags_tree,
+                hf_ptp_flags_ext_sync, tvb, PTP_FLAGS_EXT_SYNC_OFFSET, 2, FALSE);
 
-                       proto_tree_add_item(ptp_flags_tree,
-                       hf_ptp_flags_parent, tvb, PTP_FLAGS_PARENT_STATS_OFFSET, 2, FALSE);
+            proto_tree_add_item(ptp_flags_tree,
+                hf_ptp_flags_parent, tvb, PTP_FLAGS_PARENT_STATS_OFFSET, 2, FALSE);
 
-                       proto_tree_add_item(ptp_flags_tree,
-                       hf_ptp_flags_sync_burst, tvb, PTP_FLAGS_SYNC_BURST_OFFSET, 2, FALSE);
-               }
+            proto_tree_add_item(ptp_flags_tree,
+                hf_ptp_flags_sync_burst, tvb, PTP_FLAGS_SYNC_BURST_OFFSET, 2, FALSE);
+        }
 
-               /* The rest of the ptp-dissector depends on the control-field  */
+        /* The rest of the ptp-dissector depends on the control-field  */
 
-               switch(ptp_control){
-                       case PTP_SYNC_MESSAGE:
-                       case PTP_DELAY_REQ_MESSAGE:{
+        switch(ptp_control){
+            case PTP_SYNC_MESSAGE:
+            case PTP_DELAY_REQ_MESSAGE:{
 
-                       /*Subtree for the timestamp-field*/
-                       ts.secs = tvb_get_ntohl(tvb, PTP_SDR_ORIGINTIMESTAMP_SECONDS_OFFSET);
-                       ts.nsecs =  tvb_get_ntohl(tvb, PTP_SDR_ORIGINTIMESTAMP_NANOSECONDS_OFFSET);
-                       if(tree){
-                               time_ti = proto_tree_add_time(ptp_tree,
-                               hf_ptp_sdr_origintimestamp, tvb, PTP_SDR_ORIGINTIMESTAMP_OFFSET, 8, &ts);
+                /*Subtree for the timestamp-field*/
+                ts.secs = tvb_get_ntohl(tvb, PTP_SDR_ORIGINTIMESTAMP_SECONDS_OFFSET);
+                ts.nsecs =  tvb_get_ntohl(tvb, PTP_SDR_ORIGINTIMESTAMP_NANOSECONDS_OFFSET);
+                if(tree){
+                    time_ti = proto_tree_add_time(ptp_tree,
+                                      hf_ptp_sdr_origintimestamp, tvb, PTP_SDR_ORIGINTIMESTAMP_OFFSET, 8, &ts);
 
-                               ptp_time_tree = proto_item_add_subtree(time_ti, ett_ptp_time);
+                    ptp_time_tree = proto_item_add_subtree(time_ti, ett_ptp_time);
 
-                               proto_tree_add_item(ptp_time_tree,
-                                               hf_ptp_sdr_origintimestamp_seconds, tvb,
-                                               PTP_SDR_ORIGINTIMESTAMP_SECONDS_OFFSET, 4, FALSE);
+                    proto_tree_add_item(ptp_time_tree,
+                            hf_ptp_sdr_origintimestamp_seconds, tvb,
+                            PTP_SDR_ORIGINTIMESTAMP_SECONDS_OFFSET, 4, FALSE);
 
-                                       proto_tree_add_item(ptp_time_tree, hf_ptp_sdr_origintimestamp_nanoseconds, tvb,
-                                                       PTP_SDR_ORIGINTIMESTAMP_NANOSECONDS_OFFSET, 4, FALSE);
-                               }
+                    proto_tree_add_item(ptp_time_tree, hf_ptp_sdr_origintimestamp_nanoseconds, tvb,
+                            PTP_SDR_ORIGINTIMESTAMP_NANOSECONDS_OFFSET, 4, FALSE);
+                }
 
-                               proto_tree_add_item(ptp_tree,
-                                               hf_ptp_sdr_epochnumber, tvb, PTP_SDR_EPOCHNUMBER_OFFSET, 2, FALSE);
+                proto_tree_add_item(ptp_tree,
+                        hf_ptp_sdr_epochnumber, tvb, PTP_SDR_EPOCHNUMBER_OFFSET, 2, FALSE);
 
-                               proto_tree_add_item(ptp_tree,
-                                   hf_ptp_sdr_currentutcoffset, tvb, PTP_SDR_CURRENTUTCOFFSET_OFFSET, 2, FALSE);
+                proto_tree_add_item(ptp_tree,
+                        hf_ptp_sdr_currentutcoffset, tvb, PTP_SDR_CURRENTUTCOFFSET_OFFSET, 2, FALSE);
 
-                               proto_tree_add_item(ptp_tree, hf_ptp_sdr_grandmastercommunicationtechnology, tvb,
-                                               PTP_SDR_GRANDMASTERCOMMUNICATIONTECHNOLOGY_OFFSET, 1, FALSE);
+                proto_tree_add_item(ptp_tree, hf_ptp_sdr_grandmastercommunicationtechnology, tvb,
+                        PTP_SDR_GRANDMASTERCOMMUNICATIONTECHNOLOGY_OFFSET, 1, FALSE);
 
-                               proto_tree_add_item(ptp_tree,
-                                   hf_ptp_sdr_grandmasterclockuuid, tvb, PTP_SDR_GRANDMASTERCLOCKUUID_OFFSET, 6, FALSE);
+                proto_tree_add_item(ptp_tree,
+                        hf_ptp_sdr_grandmasterclockuuid, tvb, PTP_SDR_GRANDMASTERCLOCKUUID_OFFSET, 6, FALSE);
 
-                               proto_tree_add_item(ptp_tree,
-                                   hf_ptp_sdr_grandmasterportid, tvb, PTP_SDR_GRANDMASTERPORTID_OFFSET, 2, FALSE);
+                proto_tree_add_item(ptp_tree,
+                        hf_ptp_sdr_grandmasterportid, tvb, PTP_SDR_GRANDMASTERPORTID_OFFSET, 2, FALSE);
 
-                               proto_tree_add_item(ptp_tree,
-                                   hf_ptp_sdr_grandmastersequenceid, tvb, PTP_SDR_GRANDMASTERSEQUENCEID_OFFSET, 2, FALSE);
+                proto_tree_add_item(ptp_tree,
+                        hf_ptp_sdr_grandmastersequenceid, tvb, PTP_SDR_GRANDMASTERSEQUENCEID_OFFSET, 2, FALSE);
 
-                               proto_tree_add_item(ptp_tree,
-                                   hf_ptp_sdr_grandmasterclockstratum, tvb,
-                                               PTP_SDR_GRANDMASTERCLOCKSTRATUM_OFFSET, 1, FALSE);
+                proto_tree_add_item(ptp_tree,
+                        hf_ptp_sdr_grandmasterclockstratum, tvb,
+                        PTP_SDR_GRANDMASTERCLOCKSTRATUM_OFFSET, 1, FALSE);
 
-                               proto_tree_add_item(ptp_tree, hf_ptp_sdr_grandmasterclockidentifier, tvb,
-                                               PTP_SDR_GRANDMASTERCLOCKIDENTIFIER_OFFSET, 4, FALSE);
+                proto_tree_add_item(ptp_tree, hf_ptp_sdr_grandmasterclockidentifier, tvb,
+                        PTP_SDR_GRANDMASTERCLOCKIDENTIFIER_OFFSET, 4, FALSE);
 
-                               proto_tree_add_item(ptp_tree,
-                                   hf_ptp_sdr_grandmasterclockvariance, tvb,
-                                               PTP_SDR_GRANDMASTERCLOCKVARIANCE_OFFSET, 2, FALSE);
+                proto_tree_add_item(ptp_tree,
+                        hf_ptp_sdr_grandmasterclockvariance, tvb,
+                        PTP_SDR_GRANDMASTERCLOCKVARIANCE_OFFSET, 2, FALSE);
 
-                               proto_tree_add_item(ptp_tree,
-                                   hf_ptp_sdr_grandmasterpreferred, tvb, PTP_SDR_GRANDMASTERPREFERRED_OFFSET, 1, FALSE);
+                proto_tree_add_item(ptp_tree,
+                        hf_ptp_sdr_grandmasterpreferred, tvb, PTP_SDR_GRANDMASTERPREFERRED_OFFSET, 1, FALSE);
 
-                               proto_tree_add_item(ptp_tree, hf_ptp_sdr_grandmasterisboundaryclock, tvb,
-                                               PTP_SDR_GRANDMASTERISBOUNDARYCLOCK_OFFSET, 1, FALSE);
+                proto_tree_add_item(ptp_tree, hf_ptp_sdr_grandmasterisboundaryclock, tvb,
+                        PTP_SDR_GRANDMASTERISBOUNDARYCLOCK_OFFSET, 1, FALSE);
 
-                               proto_tree_add_item(ptp_tree,
-                                   hf_ptp_sdr_syncinterval, tvb, PTP_SDR_SYNCINTERVAL_OFFSET, 1, FALSE);
+                proto_tree_add_item(ptp_tree,
+                        hf_ptp_sdr_syncinterval, tvb, PTP_SDR_SYNCINTERVAL_OFFSET, 1, FALSE);
 
-                               proto_tree_add_item(ptp_tree,
-                                   hf_ptp_sdr_localclockvariance, tvb, PTP_SDR_LOCALCLOCKVARIANCE_OFFSET, 2, FALSE);
+                proto_tree_add_item(ptp_tree,
+                        hf_ptp_sdr_localclockvariance, tvb, PTP_SDR_LOCALCLOCKVARIANCE_OFFSET, 2, FALSE);
 
-                               proto_tree_add_item(ptp_tree,
-                                   hf_ptp_sdr_localstepsremoved, tvb, PTP_SDR_LOCALSTEPSREMOVED_OFFSET, 2, FALSE);
+                proto_tree_add_item(ptp_tree,
+                        hf_ptp_sdr_localstepsremoved, tvb, PTP_SDR_LOCALSTEPSREMOVED_OFFSET, 2, FALSE);
 
-                               proto_tree_add_item(ptp_tree,
-                                   hf_ptp_sdr_localclockstratum, tvb, PTP_SDR_LOCALCLOCKSTRATUM_OFFSET, 1, FALSE);
+                proto_tree_add_item(ptp_tree,
+                        hf_ptp_sdr_localclockstratum, tvb, PTP_SDR_LOCALCLOCKSTRATUM_OFFSET, 1, FALSE);
 
-                               proto_tree_add_item(ptp_tree,
-                                   hf_ptp_sdr_localclockidentifier, tvb, PTP_SDR_LOCALCLOCKIDENTIFIER_OFFSET, 4, FALSE);
+                proto_tree_add_item(ptp_tree,
+                        hf_ptp_sdr_localclockidentifier, tvb, PTP_SDR_LOCALCLOCKIDENTIFIER_OFFSET, 4, FALSE);
 
-                               proto_tree_add_item(ptp_tree, hf_ptp_sdr_parentcommunicationtechnology, tvb,
-                                               PTP_SDR_PARENTCOMMUNICATIONTECHNOLOGY_OFFSET, 1, FALSE);
+                proto_tree_add_item(ptp_tree, hf_ptp_sdr_parentcommunicationtechnology, tvb,
+                        PTP_SDR_PARENTCOMMUNICATIONTECHNOLOGY_OFFSET, 1, FALSE);
 
-                               proto_tree_add_item(ptp_tree,
-                                   hf_ptp_sdr_parentuuid, tvb, PTP_SDR_PARENTUUID_OFFSET, 6, FALSE);
+                proto_tree_add_item(ptp_tree,
+                        hf_ptp_sdr_parentuuid, tvb, PTP_SDR_PARENTUUID_OFFSET, 6, FALSE);
 
-                               proto_tree_add_item(ptp_tree,
-                                   hf_ptp_sdr_parentportfield, tvb, PTP_SDR_PARENTPORTFIELD_OFFSET, 2, FALSE);
+                proto_tree_add_item(ptp_tree,
+                        hf_ptp_sdr_parentportfield, tvb, PTP_SDR_PARENTPORTFIELD_OFFSET, 2, FALSE);
 
-                               proto_tree_add_item(ptp_tree,
-                                   hf_ptp_sdr_estimatedmastervariance, tvb,
-                                               PTP_SDR_ESTIMATEDMASTERVARIANCE_OFFSET, 2, FALSE);
+                proto_tree_add_item(ptp_tree,
+                        hf_ptp_sdr_estimatedmastervariance, tvb,
+                        PTP_SDR_ESTIMATEDMASTERVARIANCE_OFFSET, 2, FALSE);
 
-                               proto_tree_add_item(ptp_tree,
-                                   hf_ptp_sdr_estimatedmasterdrift, tvb, PTP_SDR_ESTIMATEDMASTERDRIFT_OFFSET, 4, FALSE);
+                proto_tree_add_item(ptp_tree,
+                        hf_ptp_sdr_estimatedmasterdrift, tvb, PTP_SDR_ESTIMATEDMASTERDRIFT_OFFSET, 4, FALSE);
 
-                               proto_tree_add_item(ptp_tree,
-                                   hf_ptp_sdr_utcreasonable, tvb, PTP_SDR_UTCREASONABLE_OFFSET, 1, FALSE);
-                               break;
-                       }
-                       case PTP_FOLLOWUP_MESSAGE:{
-                               proto_tree_add_item(ptp_tree,
-                                   hf_ptp_fu_associatedsequenceid, tvb, PTP_FU_ASSOCIATEDSEQUENCEID_OFFSET, 2, FALSE);
+                proto_tree_add_item(ptp_tree,
+                        hf_ptp_sdr_utcreasonable, tvb, PTP_SDR_UTCREASONABLE_OFFSET, 1, FALSE);
+                break;
+            }
+            case PTP_FOLLOWUP_MESSAGE:{
+                proto_tree_add_item(ptp_tree,
+                        hf_ptp_fu_associatedsequenceid, tvb, PTP_FU_ASSOCIATEDSEQUENCEID_OFFSET, 2, FALSE);
+
+                /*Subtree for the timestamp-field*/
+                ts.secs = tvb_get_ntohl(tvb, PTP_FU_PRECISEORIGINTIMESTAMP_SECONDS_OFFSET);
+                ts.nsecs = tvb_get_ntohl(tvb, PTP_FU_PRECISEORIGINTIMESTAMP_NANOSECONDS_OFFSET);
+                if(tree){
+                    time_ti = proto_tree_add_time(ptp_tree,
+                            hf_ptp_fu_preciseorigintimestamp, tvb,
+                            PTP_FU_PRECISEORIGINTIMESTAMP_OFFSET, 8, &ts);
+
+                    ptp_time_tree = proto_item_add_subtree(time_ti, ett_ptp_time);
+
+                    proto_tree_add_item(ptp_time_tree, hf_ptp_fu_preciseorigintimestamp_seconds, tvb,
+                            PTP_FU_PRECISEORIGINTIMESTAMP_SECONDS_OFFSET, 4, FALSE);
+
+                    proto_tree_add_item(ptp_time_tree, hf_ptp_fu_preciseorigintimestamp_nanoseconds, tvb,
+                            PTP_FU_PRECISEORIGINTIMESTAMP_NANOSECONDS_OFFSET, 4, FALSE);
+                }
+                break;
+            }
+            case PTP_DELAY_RESP_MESSAGE:{
+                /*Subtree for the timestamp-field*/
+                ts.secs = tvb_get_ntohl(tvb, PTP_DR_DELAYRECEIPTTIMESTAMP_SECONDS_OFFSET);
+                ts.nsecs = tvb_get_ntohl(tvb, PTP_DR_DELAYRECEIPTTIMESTAMP_NANOSECONDS_OFFSET);
+                if(tree){
+                    time_ti = proto_tree_add_time(ptp_tree,
+                            hf_ptp_dr_delayreceipttimestamp, tvb,
+                            PTP_DR_DELAYRECEIPTTIMESTAMP_OFFSET, 8, &ts);
 
-                               /*Subtree for the timestamp-field*/
-                               ts.secs = tvb_get_ntohl(tvb, PTP_FU_PRECISEORIGINTIMESTAMP_SECONDS_OFFSET);
-                               ts.nsecs = tvb_get_ntohl(tvb, PTP_FU_PRECISEORIGINTIMESTAMP_NANOSECONDS_OFFSET);
-                               if(tree){
-                                       time_ti = proto_tree_add_time(ptp_tree,
-                                               hf_ptp_fu_preciseorigintimestamp, tvb,
-                                                       PTP_FU_PRECISEORIGINTIMESTAMP_OFFSET, 8, &ts);
+                    ptp_time_tree = proto_item_add_subtree(time_ti, ett_ptp_time);
 
-                                       ptp_time_tree = proto_item_add_subtree(time_ti, ett_ptp_time);
+                    proto_tree_add_item(ptp_time_tree, hf_ptp_dr_delayreceipttimestamp_seconds, tvb,
+                            PTP_DR_DELAYRECEIPTTIMESTAMP_SECONDS_OFFSET, 4, FALSE);
 
-                                       proto_tree_add_item(ptp_time_tree, hf_ptp_fu_preciseorigintimestamp_seconds, tvb,
-                                                       PTP_FU_PRECISEORIGINTIMESTAMP_SECONDS_OFFSET, 4, FALSE);
+                    proto_tree_add_item(ptp_time_tree, hf_ptp_dr_delayreceipttimestamp_nanoseconds, tvb,
+                            PTP_DR_DELAYRECEIPTTIMESTAMP_NANOSECONDS_OFFSET, 4, FALSE);
+                }
 
-                                       proto_tree_add_item(ptp_time_tree, hf_ptp_fu_preciseorigintimestamp_nanoseconds, tvb,
-                                                       PTP_FU_PRECISEORIGINTIMESTAMP_NANOSECONDS_OFFSET, 4, FALSE);
-                               }
-                               break;
-                       }
-                       case PTP_DELAY_RESP_MESSAGE:{
-                               /*Subtree for the timestamp-field*/
-                               ts.secs = tvb_get_ntohl(tvb, PTP_DR_DELAYRECEIPTTIMESTAMP_SECONDS_OFFSET);
-                               ts.nsecs = tvb_get_ntohl(tvb, PTP_DR_DELAYRECEIPTTIMESTAMP_NANOSECONDS_OFFSET);
-                               if(tree){
-                                       time_ti = proto_tree_add_time(ptp_tree,
-                                               hf_ptp_dr_delayreceipttimestamp, tvb,
-                                                       PTP_DR_DELAYRECEIPTTIMESTAMP_OFFSET, 8, &ts);
+                proto_tree_add_item(ptp_tree, hf_ptp_dr_requestingsourcecommunicationtechnology, tvb,
+                    PTP_DR_REQUESTINGSOURCECOMMUNICATIONTECHNOLOGY_OFFSET, 1, FALSE);
 
-                                       ptp_time_tree = proto_item_add_subtree(time_ti, ett_ptp_time);
+                proto_tree_add_item(ptp_tree,
+                        hf_ptp_dr_requestingsourceuuid, tvb, PTP_DR_REQUESTINGSOURCEUUID_OFFSET, 6, FALSE);
 
-                                       proto_tree_add_item(ptp_time_tree, hf_ptp_dr_delayreceipttimestamp_seconds, tvb,
-                                                       PTP_DR_DELAYRECEIPTTIMESTAMP_SECONDS_OFFSET, 4, FALSE);
+                proto_tree_add_item(ptp_tree,
+                        hf_ptp_dr_requestingsourceportid, tvb, PTP_DR_REQUESTINGSOURCEPORTID_OFFSET, 2, FALSE);
 
-                                       proto_tree_add_item(ptp_time_tree, hf_ptp_dr_delayreceipttimestamp_nanoseconds, tvb,
-                                                       PTP_DR_DELAYRECEIPTTIMESTAMP_NANOSECONDS_OFFSET, 4, FALSE);
-                               }
+                proto_tree_add_item(ptp_tree,
+                        hf_ptp_dr_requestingsourcesequenceid, tvb,
+                        PTP_DR_REQUESTINGSOURCESEQUENCEID_OFFSET, 2, FALSE);
+                break;
+            }
+            case PTP_MANAGEMENT_MESSAGE:{
+                proto_tree_add_item(ptp_tree, hf_ptp_mm_targetcommunicationtechnology, tvb,
+                        PTP_MM_TARGETCOMMUNICATIONTECHNOLOGY_OFFSET, 1, FALSE);
 
-                               proto_tree_add_item(ptp_tree, hf_ptp_dr_requestingsourcecommunicationtechnology, tvb,
-                                       PTP_DR_REQUESTINGSOURCECOMMUNICATIONTECHNOLOGY_OFFSET, 1, FALSE);
+                proto_tree_add_item(ptp_tree,
+                        hf_ptp_mm_targetuuid, tvb, PTP_MM_TARGETUUID_OFFSET, 6, FALSE);
 
-                               proto_tree_add_item(ptp_tree,
-                                   hf_ptp_dr_requestingsourceuuid, tvb, PTP_DR_REQUESTINGSOURCEUUID_OFFSET, 6, FALSE);
+                proto_tree_add_item(ptp_tree,
+                        hf_ptp_mm_targetportid, tvb, PTP_MM_TARGETPORTID_OFFSET, 2, FALSE);
 
-                               proto_tree_add_item(ptp_tree,
-                                   hf_ptp_dr_requestingsourceportid, tvb, PTP_DR_REQUESTINGSOURCEPORTID_OFFSET, 2, FALSE);
+                proto_tree_add_item(ptp_tree,
+                        hf_ptp_mm_startingboundaryhops, tvb, PTP_MM_STARTINGBOUNDARYHOPS_OFFSET, 2, FALSE);
 
-                               proto_tree_add_item(ptp_tree,
-                                   hf_ptp_dr_requestingsourcesequenceid, tvb,
-                                               PTP_DR_REQUESTINGSOURCESEQUENCEID_OFFSET, 2, FALSE);
-                               break;
-                       }
-                       case PTP_MANAGEMENT_MESSAGE:{
-                               proto_tree_add_item(ptp_tree, hf_ptp_mm_targetcommunicationtechnology, tvb,
-                                               PTP_MM_TARGETCOMMUNICATIONTECHNOLOGY_OFFSET, 1, FALSE);
+                proto_tree_add_item(ptp_tree,
+                        hf_ptp_mm_boundaryhops, tvb, PTP_MM_BOUNDARYHOPS_OFFSET, 2, FALSE);
 
-                               proto_tree_add_item(ptp_tree,
-                                   hf_ptp_mm_targetuuid, tvb, PTP_MM_TARGETUUID_OFFSET, 6, FALSE);
 
-                               proto_tree_add_item(ptp_tree,
-                                   hf_ptp_mm_targetportid, tvb, PTP_MM_TARGETPORTID_OFFSET, 2, FALSE);
+                proto_tree_add_item(ptp_tree,
+                        hf_ptp_mm_managementmessagekey, tvb, PTP_MM_MANAGEMENTMESSAGEKEY_OFFSET, 1, FALSE);
 
-                               proto_tree_add_item(ptp_tree,
-                                   hf_ptp_mm_startingboundaryhops, tvb, PTP_MM_STARTINGBOUNDARYHOPS_OFFSET, 2, FALSE);
+                proto_tree_add_item(ptp_tree,
+                        hf_ptp_mm_parameterlength, tvb, PTP_MM_PARAMETERLENGTH_OFFSET, 2, FALSE);
 
-                               proto_tree_add_item(ptp_tree,
-                                   hf_ptp_mm_boundaryhops, tvb, PTP_MM_BOUNDARYHOPS_OFFSET, 2, FALSE);
+                switch(ptp_mm_messagekey){
+                    case PTP_MM_CLOCK_IDENTITY:{
+                        proto_tree_add_item(ptp_tree,
+                                hf_ptp_mm_clock_identity_clockcommunicationtechnology, tvb,
+                                PTP_MM_CLOCK_IDENTITY_CLOCKCOMMUNICATIONTECHNOLOGY_OFFSET, 1, FALSE);
 
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_clock_identity_clockuuidfield, tvb,
+                                PTP_MM_CLOCK_IDENTITY_CLOCKUUIDFIELD_OFFSET, 6, FALSE);
 
-                               proto_tree_add_item(ptp_tree,
-                                   hf_ptp_mm_managementmessagekey, tvb, PTP_MM_MANAGEMENTMESSAGEKEY_OFFSET, 1, FALSE);
-
-                               proto_tree_add_item(ptp_tree,
-                                   hf_ptp_mm_parameterlength, tvb, PTP_MM_PARAMETERLENGTH_OFFSET, 2, FALSE);
-
-                               switch(ptp_mm_messagekey){
-                                       case PTP_MM_CLOCK_IDENTITY:{
-                                               proto_tree_add_item(ptp_tree,
-                                                               hf_ptp_mm_clock_identity_clockcommunicationtechnology, tvb,
-                                                               PTP_MM_CLOCK_IDENTITY_CLOCKCOMMUNICATIONTECHNOLOGY_OFFSET, 1, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_clock_identity_clockportfield, tvb,
+                                PTP_MM_CLOCK_IDENTITY_CLOCKPORTFIELD_OFFSET, 2, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_clock_identity_clockuuidfield, tvb,
-                                                               PTP_MM_CLOCK_IDENTITY_CLOCKUUIDFIELD_OFFSET, 6, FALSE);
-
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_clock_identity_clockportfield, tvb,
-                                                               PTP_MM_CLOCK_IDENTITY_CLOCKPORTFIELD_OFFSET, 2, FALSE);
-
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_clock_identity_manufactureridentity, tvb,
-                                                               PTP_MM_CLOCK_IDENTITY_MANUFACTURERIDENTITY_OFFSET, 48, FALSE);
-                                               break;
-                                       }
-                                       case PTP_MM_INITIALIZE_CLOCK:{
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_initialize_clock_initialisationkey, tvb,
-                                                       PTP_MM_INITIALIZE_CLOCK_INITIALISATIONKEY_OFFSET, 2, FALSE);
-                                               break;
-                                       }
-                                       case PTP_MM_SET_SUBDOMAIN:{
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_set_subdomain_subdomainname, tvb,
-                                                               PTP_MM_SET_SUBDOMAIN_SUBDOMAINNAME_OFFSET, 16, FALSE);
-                                               break;
-                                       }
-                                       case PTP_MM_DEFAULT_DATA_SET:{
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_default_data_set_clockcommunicationtechnology,
-                                                               tvb, PTP_MM_DEFAULT_DATA_SET_CLOCKCOMMUNICATIONTECHNOLOGY_OFFSET,
-                                                                1, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_clock_identity_manufactureridentity, tvb,
+                                PTP_MM_CLOCK_IDENTITY_MANUFACTURERIDENTITY_OFFSET, 48, FALSE);
+                        break;
+                    }
+                    case PTP_MM_INITIALIZE_CLOCK:{
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_initialize_clock_initialisationkey, tvb,
+                            PTP_MM_INITIALIZE_CLOCK_INITIALISATIONKEY_OFFSET, 2, FALSE);
+                        break;
+                    }
+                    case PTP_MM_SET_SUBDOMAIN:{
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_set_subdomain_subdomainname, tvb,
+                                PTP_MM_SET_SUBDOMAIN_SUBDOMAINNAME_OFFSET, 16, FALSE);
+                        break;
+                    }
+                    case PTP_MM_DEFAULT_DATA_SET:{
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_default_data_set_clockcommunicationtechnology,
+                                tvb, PTP_MM_DEFAULT_DATA_SET_CLOCKCOMMUNICATIONTECHNOLOGY_OFFSET,
+                                 1, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_default_data_set_clockuuidfield, tvb,
-                                                               PTP_MM_DEFAULT_DATA_SET_CLOCKUUIDFIELD_OFFSET, 6, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_default_data_set_clockuuidfield, tvb,
+                                PTP_MM_DEFAULT_DATA_SET_CLOCKUUIDFIELD_OFFSET, 6, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_default_data_set_clockportfield, tvb,
-                                                               PTP_MM_DEFAULT_DATA_SET_CLOCKPORTFIELD_OFFSET, 2, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_default_data_set_clockportfield, tvb,
+                                PTP_MM_DEFAULT_DATA_SET_CLOCKPORTFIELD_OFFSET, 2, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_default_data_set_clockstratum, tvb,
-                                                               PTP_MM_DEFAULT_DATA_SET_CLOCKSTRATUM_OFFSET, 1, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_default_data_set_clockstratum, tvb,
+                                PTP_MM_DEFAULT_DATA_SET_CLOCKSTRATUM_OFFSET, 1, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_default_data_set_clockidentifier, tvb,
-                                                               PTP_MM_DEFAULT_DATA_SET_CLOCKIDENTIFIER_OFFSET, 4, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_default_data_set_clockidentifier, tvb,
+                                PTP_MM_DEFAULT_DATA_SET_CLOCKIDENTIFIER_OFFSET, 4, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_default_data_set_clockvariance, tvb,
-                                                               PTP_MM_DEFAULT_DATA_SET_CLOCKVARIANCE_OFFSET, 2, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_default_data_set_clockvariance, tvb,
+                                PTP_MM_DEFAULT_DATA_SET_CLOCKVARIANCE_OFFSET, 2, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_default_data_set_clockfollowupcapable, tvb,
-                                                               PTP_MM_DEFAULT_DATA_SET_CLOCKFOLLOWUPCAPABLE_OFFSET, 1, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_default_data_set_clockfollowupcapable, tvb,
+                                PTP_MM_DEFAULT_DATA_SET_CLOCKFOLLOWUPCAPABLE_OFFSET, 1, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_default_data_set_preferred, tvb,
-                                                               PTP_MM_DEFAULT_DATA_SET_PREFERRED_OFFSET, 1, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_default_data_set_preferred, tvb,
+                                PTP_MM_DEFAULT_DATA_SET_PREFERRED_OFFSET, 1, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_default_data_set_initializable, tvb,
-                                                               PTP_MM_DEFAULT_DATA_SET_INITIALIZABLE_OFFSET, 1, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_default_data_set_initializable, tvb,
+                                PTP_MM_DEFAULT_DATA_SET_INITIALIZABLE_OFFSET, 1, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_default_data_set_externaltiming, tvb,
-                                                               PTP_MM_DEFAULT_DATA_SET_EXTERNALTIMING_OFFSET, 1, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_default_data_set_externaltiming, tvb,
+                                PTP_MM_DEFAULT_DATA_SET_EXTERNALTIMING_OFFSET, 1, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_default_data_set_isboundaryclock, tvb,
-                                                               PTP_MM_DEFAULT_DATA_SET_ISBOUNDARYCLOCK_OFFSET, 1, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_default_data_set_isboundaryclock, tvb,
+                                PTP_MM_DEFAULT_DATA_SET_ISBOUNDARYCLOCK_OFFSET, 1, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_default_data_set_syncinterval, tvb,
-                                                               PTP_MM_DEFAULT_DATA_SET_SYNCINTERVAL_OFFSET, 1, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_default_data_set_syncinterval, tvb,
+                                PTP_MM_DEFAULT_DATA_SET_SYNCINTERVAL_OFFSET, 1, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_default_data_set_subdomainname, tvb,
-                                                               PTP_MM_DEFAULT_DATA_SET_SUBDOMAINNAME_OFFSET, 16, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_default_data_set_subdomainname, tvb,
+                                PTP_MM_DEFAULT_DATA_SET_SUBDOMAINNAME_OFFSET, 16, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_default_data_set_numberports, tvb,
-                                                               PTP_MM_DEFAULT_DATA_SET_NUMBERPORTS_OFFSET, 2, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_default_data_set_numberports, tvb,
+                                PTP_MM_DEFAULT_DATA_SET_NUMBERPORTS_OFFSET, 2, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_default_data_set_numberforeignrecords, tvb,
-                                                               PTP_MM_DEFAULT_DATA_SET_NUMBERFOREIGNRECORDS_OFFSET, 2, FALSE);
-                                               break;
-                                       }
-                                       case PTP_MM_UPDATE_DEFAULT_DATA_SET:{
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_update_default_data_set_clockstratum, tvb,
-                                                               PTP_MM_UPDATE_DEFAULT_DATA_SET_CLOCKSTRATUM_OFFSET, 1, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_default_data_set_numberforeignrecords, tvb,
+                                PTP_MM_DEFAULT_DATA_SET_NUMBERFOREIGNRECORDS_OFFSET, 2, FALSE);
+                        break;
+                    }
+                    case PTP_MM_UPDATE_DEFAULT_DATA_SET:{
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_update_default_data_set_clockstratum, tvb,
+                                PTP_MM_UPDATE_DEFAULT_DATA_SET_CLOCKSTRATUM_OFFSET, 1, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_update_default_data_set_clockidentifier, tvb,
-                                                               PTP_MM_UPDATE_DEFAULT_DATA_SET_CLOCKIDENTIFIER_OFFSET, 4, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_update_default_data_set_clockidentifier, tvb,
+                                PTP_MM_UPDATE_DEFAULT_DATA_SET_CLOCKIDENTIFIER_OFFSET, 4, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_update_default_data_set_clockvariance, tvb,
-                                                               PTP_MM_UPDATE_DEFAULT_DATA_SET_CLOCKVARIANCE_OFFSET, 2, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_update_default_data_set_clockvariance, tvb,
+                                PTP_MM_UPDATE_DEFAULT_DATA_SET_CLOCKVARIANCE_OFFSET, 2, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_update_default_data_set_preferred, tvb,
-                                                               PTP_MM_UPDATE_DEFAULT_DATA_SET_PREFERRED_OFFSET, 1, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_update_default_data_set_preferred, tvb,
+                                PTP_MM_UPDATE_DEFAULT_DATA_SET_PREFERRED_OFFSET, 1, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_update_default_data_set_syncinterval, tvb,
-                                                               PTP_MM_UPDATE_DEFAULT_DATA_SET_SYNCINTERVAL_OFFSET, 1, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_update_default_data_set_syncinterval, tvb,
+                                PTP_MM_UPDATE_DEFAULT_DATA_SET_SYNCINTERVAL_OFFSET, 1, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_update_default_data_set_subdomainname, tvb,
-                                                               PTP_MM_UPDATE_DEFAULT_DATA_SET_SUBDOMAINNAME_OFFSET, 16, FALSE);
-                                               break;
-                                       }
-                                       case PTP_MM_CURRENT_DATA_SET:{
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_current_data_set_stepsremoved, tvb,
-                                                               PTP_MM_CURRENT_DATA_SET_STEPSREMOVED_OFFSET, 2, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_update_default_data_set_subdomainname, tvb,
+                                PTP_MM_UPDATE_DEFAULT_DATA_SET_SUBDOMAINNAME_OFFSET, 16, FALSE);
+                        break;
+                    }
+                    case PTP_MM_CURRENT_DATA_SET:{
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_current_data_set_stepsremoved, tvb,
+                                PTP_MM_CURRENT_DATA_SET_STEPSREMOVED_OFFSET, 2, FALSE);
 
-                                               /* Subtree for offset from master*/
-                                               ts.secs = tvb_get_ntohl(tvb, PTP_MM_CURRENT_DATA_SET_OFFSETFROMMASTERSECONDS_OFFSET);
+                        /* Subtree for offset from master*/
+                        ts.secs = tvb_get_ntohl(tvb, PTP_MM_CURRENT_DATA_SET_OFFSETFROMMASTERSECONDS_OFFSET);
 
-                                               ts.nsecs = tvb_get_ntohl(tvb,
-                                                               PTP_MM_CURRENT_DATA_SET_OFFSETFROMMASTERNANOSECONDS_OFFSET);
+                        ts.nsecs = tvb_get_ntohl(tvb,
+                                PTP_MM_CURRENT_DATA_SET_OFFSETFROMMASTERNANOSECONDS_OFFSET);
 
-                                               if (ts.nsecs & 0x80000000) ts.nsecs = ts.nsecs & 0x7FFFFFFF;
+                        if (ts.nsecs & 0x80000000) ts.nsecs = ts.nsecs & 0x7FFFFFFF;
 
-                                               if(tree){
-                                                       time_ti = proto_tree_add_time(ptp_tree,
-                                                                       hf_ptp_mm_current_data_set_offsetfrommaster, tvb,
-                                                                       PTP_MM_CURRENT_DATA_SET_OFFSETFROMMASTER_OFFSET, 8, &ts);
+                        if(tree){
+                            time_ti = proto_tree_add_time(ptp_tree,
+                                    hf_ptp_mm_current_data_set_offsetfrommaster, tvb,
+                                    PTP_MM_CURRENT_DATA_SET_OFFSETFROMMASTER_OFFSET, 8, &ts);
 
-                                                       ptp_time_tree = proto_item_add_subtree(time_ti, ett_ptp_time);
+                            ptp_time_tree = proto_item_add_subtree(time_ti, ett_ptp_time);
 
-                                                       proto_tree_add_item(ptp_time_tree,
-                                                                       hf_ptp_mm_current_data_set_offsetfrommasterseconds, tvb,
-                                                                       PTP_MM_CURRENT_DATA_SET_OFFSETFROMMASTERSECONDS_OFFSET, 4, FALSE);
+                            proto_tree_add_item(ptp_time_tree,
+                                    hf_ptp_mm_current_data_set_offsetfrommasterseconds, tvb,
+                                    PTP_MM_CURRENT_DATA_SET_OFFSETFROMMASTERSECONDS_OFFSET, 4, FALSE);
 
-                                                       proto_tree_add_item(ptp_time_tree,
-                                                                       hf_ptp_mm_current_data_set_offsetfrommasternanoseconds, tvb,
-                                                                       PTP_MM_CURRENT_DATA_SET_OFFSETFROMMASTERNANOSECONDS_OFFSET, 4, FALSE);
-                                               }
+                            proto_tree_add_item(ptp_time_tree,
+                                    hf_ptp_mm_current_data_set_offsetfrommasternanoseconds, tvb,
+                                    PTP_MM_CURRENT_DATA_SET_OFFSETFROMMASTERNANOSECONDS_OFFSET, 4, FALSE);
+                        }
 
-                                               /* Subtree for offset from master*/
-                                               ts.secs = tvb_get_ntohl(tvb, PTP_MM_CURRENT_DATA_SET_ONEWAYDELAYSECONDS_OFFSET);
+                        /* Subtree for offset from master*/
+                        ts.secs = tvb_get_ntohl(tvb, PTP_MM_CURRENT_DATA_SET_ONEWAYDELAYSECONDS_OFFSET);
 
-                                               ts.nsecs = tvb_get_ntohl(tvb, PTP_MM_CURRENT_DATA_SET_ONEWAYDELAYNANOSECONDS_OFFSET);
+                        ts.nsecs = tvb_get_ntohl(tvb, PTP_MM_CURRENT_DATA_SET_ONEWAYDELAYNANOSECONDS_OFFSET);
 
-                                               if(tree){
-                                                       time2_ti = proto_tree_add_time(ptp_tree,
-                                                                       hf_ptp_mm_current_data_set_onewaydelay, tvb,
-                                                                       PTP_MM_CURRENT_DATA_SET_ONEWAYDELAY_OFFSET, 8, &ts);
+                        if(tree){
+                            time2_ti = proto_tree_add_time(ptp_tree,
+                                    hf_ptp_mm_current_data_set_onewaydelay, tvb,
+                                    PTP_MM_CURRENT_DATA_SET_ONEWAYDELAY_OFFSET, 8, &ts);
 
-                                                       ptp_time2_tree = proto_item_add_subtree(time2_ti, ett_ptp_time2);
+                            ptp_time2_tree = proto_item_add_subtree(time2_ti, ett_ptp_time2);
 
-                                                       proto_tree_add_item(ptp_time2_tree, hf_ptp_mm_current_data_set_onewaydelayseconds,
-                                                                       tvb, PTP_MM_CURRENT_DATA_SET_ONEWAYDELAYSECONDS_OFFSET, 4, FALSE);
+                            proto_tree_add_item(ptp_time2_tree, hf_ptp_mm_current_data_set_onewaydelayseconds,
+                                    tvb, PTP_MM_CURRENT_DATA_SET_ONEWAYDELAYSECONDS_OFFSET, 4, FALSE);
 
-                                                       proto_tree_add_item(ptp_time2_tree,
-                                                                       hf_ptp_mm_current_data_set_onewaydelaynanoseconds,
-                                                                       tvb, PTP_MM_CURRENT_DATA_SET_ONEWAYDELAYNANOSECONDS_OFFSET, 4, FALSE);
-                                               }
-                                               break;
-                                       }
-                                       case PTP_MM_PARENT_DATA_SET:{
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_parent_data_set_parentcommunicationtechnology,
-                                                               tvb, PTP_MM_PARENT_DATA_SET_PARENTCOMMUNICATIONTECHNOLOGY_OFFSET,
-                                                               1, FALSE);
+                            proto_tree_add_item(ptp_time2_tree,
+                                    hf_ptp_mm_current_data_set_onewaydelaynanoseconds,
+                                    tvb, PTP_MM_CURRENT_DATA_SET_ONEWAYDELAYNANOSECONDS_OFFSET, 4, FALSE);
+                        }
+                        break;
+                    }
+                    case PTP_MM_PARENT_DATA_SET:{
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_parent_data_set_parentcommunicationtechnology,
+                                tvb, PTP_MM_PARENT_DATA_SET_PARENTCOMMUNICATIONTECHNOLOGY_OFFSET,
+                                1, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_parent_data_set_parentuuid, tvb,
-                                                               PTP_MM_PARENT_DATA_SET_PARENTUUID_OFFSET, 6, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_parent_data_set_parentuuid, tvb,
+                                PTP_MM_PARENT_DATA_SET_PARENTUUID_OFFSET, 6, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_parent_data_set_parentportid, tvb,
-                                                               PTP_MM_PARENT_DATA_SET_PARENTPORTID_OFFSET, 2, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_parent_data_set_parentportid, tvb,
+                                PTP_MM_PARENT_DATA_SET_PARENTPORTID_OFFSET, 2, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_parent_data_set_parentlastsyncsequencenumber,
-                                                               tvb, PTP_MM_PARENT_DATA_SET_PARENTLASTSYNCSEQUENCENUMBER_OFFSET,
-                                                               2, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_parent_data_set_parentlastsyncsequencenumber,
+                                tvb, PTP_MM_PARENT_DATA_SET_PARENTLASTSYNCSEQUENCENUMBER_OFFSET,
+                                2, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_parent_data_set_parentfollowupcapable, tvb,
-                                                               PTP_MM_PARENT_DATA_SET_PARENTFOLLOWUPCAPABLE_OFFSET, 1, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_parent_data_set_parentfollowupcapable, tvb,
+                                PTP_MM_PARENT_DATA_SET_PARENTFOLLOWUPCAPABLE_OFFSET, 1, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_parent_data_set_parentexternaltiming, tvb,
-                                                               PTP_MM_PARENT_DATA_SET_PARENTEXTERNALTIMING_OFFSET, 1, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_parent_data_set_parentexternaltiming, tvb,
+                                PTP_MM_PARENT_DATA_SET_PARENTEXTERNALTIMING_OFFSET, 1, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_parent_data_set_parentvariance, tvb,
-                                                               PTP_MM_PARENT_DATA_SET_PARENTVARIANCE_OFFSET, 2, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_parent_data_set_parentvariance, tvb,
+                                PTP_MM_PARENT_DATA_SET_PARENTVARIANCE_OFFSET, 2, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_parent_data_set_parentstats, tvb,
-                                                               PTP_MM_PARENT_DATA_SET_PARENTSTATS_OFFSET, 1, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_parent_data_set_parentstats, tvb,
+                                PTP_MM_PARENT_DATA_SET_PARENTSTATS_OFFSET, 1, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_parent_data_set_observedvariance, tvb,
-                                                               PTP_MM_PARENT_DATA_SET_OBSERVEDVARIANCE_OFFSET, 2, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_parent_data_set_observedvariance, tvb,
+                                PTP_MM_PARENT_DATA_SET_OBSERVEDVARIANCE_OFFSET, 2, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_parent_data_set_observeddrift, tvb,
-                                                               PTP_MM_PARENT_DATA_SET_OBSERVEDDRIFT_OFFSET, 4, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_parent_data_set_observeddrift, tvb,
+                                PTP_MM_PARENT_DATA_SET_OBSERVEDDRIFT_OFFSET, 4, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_parent_data_set_utcreasonable, tvb,
-                                                               PTP_MM_PARENT_DATA_SET_UTCREASONABLE_OFFSET, 1, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_parent_data_set_utcreasonable, tvb,
+                                PTP_MM_PARENT_DATA_SET_UTCREASONABLE_OFFSET, 1, FALSE);
 
-                                               proto_tree_add_item(ptp_tree,
-                                                               hf_ptp_mm_parent_data_set_grandmastercommunicationtechnology,
-                                                               tvb, PTP_MM_PARENT_DATA_SET_GRANDMASTERCOMMUNICATIONTECHNOLOGY_OFFSET, 1,
-                                                               FALSE);
+                        proto_tree_add_item(ptp_tree,
+                                hf_ptp_mm_parent_data_set_grandmastercommunicationtechnology,
+                                tvb, PTP_MM_PARENT_DATA_SET_GRANDMASTERCOMMUNICATIONTECHNOLOGY_OFFSET, 1,
+                                FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_parent_data_set_grandmasteruuidfield, tvb,
-                                                               PTP_MM_PARENT_DATA_SET_GRANDMASTERUUIDFIELD_OFFSET, 6, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_parent_data_set_grandmasteruuidfield, tvb,
+                                PTP_MM_PARENT_DATA_SET_GRANDMASTERUUIDFIELD_OFFSET, 6, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_parent_data_set_grandmasterportidfield, tvb,
-                                                               PTP_MM_PARENT_DATA_SET_GRANDMASTERPORTIDFIELD_OFFSET, 2, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_parent_data_set_grandmasterportidfield, tvb,
+                                PTP_MM_PARENT_DATA_SET_GRANDMASTERPORTIDFIELD_OFFSET, 2, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_parent_data_set_grandmasterstratum, tvb,
-                                                               PTP_MM_PARENT_DATA_SET_GRANDMASTERSTRATUM_OFFSET, 1, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_parent_data_set_grandmasterstratum, tvb,
+                                PTP_MM_PARENT_DATA_SET_GRANDMASTERSTRATUM_OFFSET, 1, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_parent_data_set_grandmasteridentifier, tvb,
-                                                               PTP_MM_PARENT_DATA_SET_GRANDMASTERIDENTIFIER_OFFSET, 4, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_parent_data_set_grandmasteridentifier, tvb,
+                                PTP_MM_PARENT_DATA_SET_GRANDMASTERIDENTIFIER_OFFSET, 4, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_parent_data_set_grandmastervariance, tvb,
-                                                               PTP_MM_PARENT_DATA_SET_GRANDMASTERVARIANCE_OFFSET, 2, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_parent_data_set_grandmastervariance, tvb,
+                                PTP_MM_PARENT_DATA_SET_GRANDMASTERVARIANCE_OFFSET, 2, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_parent_data_set_grandmasterpreferred, tvb,
-                                                               PTP_MM_PARENT_DATA_SET_GRANDMASTERPREFERRED_OFFSET, 1, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_parent_data_set_grandmasterpreferred, tvb,
+                                PTP_MM_PARENT_DATA_SET_GRANDMASTERPREFERRED_OFFSET, 1, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_parent_data_set_grandmasterisboundaryclock, tvb,
-                                                               PTP_MM_PARENT_DATA_SET_GRANDMASTERISBOUNDARYCLOCK_OFFSET, 1, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_parent_data_set_grandmasterisboundaryclock, tvb,
+                                PTP_MM_PARENT_DATA_SET_GRANDMASTERISBOUNDARYCLOCK_OFFSET, 1, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_parent_data_set_grandmastersequencenumber, tvb,
-                                                               PTP_MM_PARENT_DATA_SET_GRANDMASTERSEQUENCENUMBER_OFFSET, 2, FALSE);
-                                               break;
-                                       }
-                                       case PTP_MM_PORT_DATA_SET:{
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_port_data_set_returnedportnumber, tvb,
-                                                               PTP_MM_PORT_DATA_SET_RETURNEDPORTNUMBER_OFFSET, 2, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_parent_data_set_grandmastersequencenumber, tvb,
+                                PTP_MM_PARENT_DATA_SET_GRANDMASTERSEQUENCENUMBER_OFFSET, 2, FALSE);
+                        break;
+                    }
+                    case PTP_MM_PORT_DATA_SET:{
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_port_data_set_returnedportnumber, tvb,
+                                PTP_MM_PORT_DATA_SET_RETURNEDPORTNUMBER_OFFSET, 2, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_port_data_set_portstate, tvb,
-                                                               PTP_MM_PORT_DATA_SET_PORTSTATE_OFFSET, 1, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_port_data_set_portstate, tvb,
+                                PTP_MM_PORT_DATA_SET_PORTSTATE_OFFSET, 1, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_port_data_set_lastsynceventsequencenumber, tvb,
-                                                               PTP_MM_PORT_DATA_SET_LASTSYNCEVENTSEQUENCENUMBER_OFFSET, 2, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_port_data_set_lastsynceventsequencenumber, tvb,
+                                PTP_MM_PORT_DATA_SET_LASTSYNCEVENTSEQUENCENUMBER_OFFSET, 2, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_port_data_set_lastgeneraleventsequencenumber,
-                                                               tvb, PTP_MM_PORT_DATA_SET_LASTGENERALEVENTSEQUENCENUMBER_OFFSET,
-                                                               2, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_port_data_set_lastgeneraleventsequencenumber,
+                                tvb, PTP_MM_PORT_DATA_SET_LASTGENERALEVENTSEQUENCENUMBER_OFFSET,
+                                2, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_port_data_set_portcommunicationtechnology, tvb,
-                                                               PTP_MM_PORT_DATA_SET_PORTCOMMUNICATIONTECHNOLOGY_OFFSET, 1, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_port_data_set_portcommunicationtechnology, tvb,
+                                PTP_MM_PORT_DATA_SET_PORTCOMMUNICATIONTECHNOLOGY_OFFSET, 1, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_port_data_set_portuuidfield, tvb,
-                                                               PTP_MM_PORT_DATA_SET_PORTUUIDFIELD_OFFSET, 6, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_port_data_set_portuuidfield, tvb,
+                                PTP_MM_PORT_DATA_SET_PORTUUIDFIELD_OFFSET, 6, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_port_data_set_portidfield, tvb,
-                                                               PTP_MM_PORT_DATA_SET_PORTIDFIELD_OFFSET, 2, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_port_data_set_portidfield, tvb,
+                                PTP_MM_PORT_DATA_SET_PORTIDFIELD_OFFSET, 2, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_port_data_set_burstenabled, tvb,
-                                                               PTP_MM_PORT_DATA_SET_BURSTENABLED_OFFSET, 1, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_port_data_set_burstenabled, tvb,
+                                PTP_MM_PORT_DATA_SET_BURSTENABLED_OFFSET, 1, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_port_data_set_subdomainaddressoctets, tvb,
-                                                               PTP_MM_PORT_DATA_SET_SUBDOMAINADDRESSOCTETS_OFFSET, 1, FALSE);
-
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_port_data_set_eventportaddressoctets, tvb,
-                                                               PTP_MM_PORT_DATA_SET_EVENTPORTADDRESSOCTETS_OFFSET, 1, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_port_data_set_subdomainaddressoctets, tvb,
+                                PTP_MM_PORT_DATA_SET_SUBDOMAINADDRESSOCTETS_OFFSET, 1, FALSE);
+
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_port_data_set_eventportaddressoctets, tvb,
+                                PTP_MM_PORT_DATA_SET_EVENTPORTADDRESSOCTETS_OFFSET, 1, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_port_data_set_generalportaddressoctets, tvb,
-                                                               PTP_MM_PORT_DATA_SET_GENERALPORTADDRESSOCTETS_OFFSET, 1, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_port_data_set_generalportaddressoctets, tvb,
+                                PTP_MM_PORT_DATA_SET_GENERALPORTADDRESSOCTETS_OFFSET, 1, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_port_data_set_subdomainaddress, tvb,
-                                                               PTP_MM_PORT_DATA_SET_SUBDOMAINADDRESS_OFFSET, 4, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_port_data_set_subdomainaddress, tvb,
+                                PTP_MM_PORT_DATA_SET_SUBDOMAINADDRESS_OFFSET, 4, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_port_data_set_eventportaddress, tvb,
-                                                               PTP_MM_PORT_DATA_SET_EVENTPORTADDRESS_OFFSET, 2, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_port_data_set_eventportaddress, tvb,
+                                PTP_MM_PORT_DATA_SET_EVENTPORTADDRESS_OFFSET, 2, FALSE);
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_port_data_set_generalportaddress, tvb,
-                                                               PTP_MM_PORT_DATA_SET_GENERALPORTADDRESS_OFFSET, 2, FALSE);
-                                               break;
-                                       }
-                                       case PTP_MM_GLOBAL_TIME_DATA_SET:{
-                                               /* Subtree for local time*/
-                                               ts.secs = tvb_get_ntohl(tvb, PTP_MM_GLOBAL_TIME_DATA_SET_LOCALTIMESECONDS_OFFSET);
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_port_data_set_generalportaddress, tvb,
+                                PTP_MM_PORT_DATA_SET_GENERALPORTADDRESS_OFFSET, 2, FALSE);
+                        break;
+                    }
+                    case PTP_MM_GLOBAL_TIME_DATA_SET:{
+                        /* Subtree for local time*/
+                        ts.secs = tvb_get_ntohl(tvb, PTP_MM_GLOBAL_TIME_DATA_SET_LOCALTIMESECONDS_OFFSET);
 
-                                               ts.nsecs = tvb_get_ntohl(tvb,
-                                                               PTP_MM_GLOBAL_TIME_DATA_SET_LOCALTIMENANOSECONDS_OFFSET);
+                        ts.nsecs = tvb_get_ntohl(tvb,
+                                PTP_MM_GLOBAL_TIME_DATA_SET_LOCALTIMENANOSECONDS_OFFSET);
 
-                                               if(tree){
-                                                       time_ti = proto_tree_add_time(ptp_tree,
-                                                                       hf_ptp_mm_global_time_data_set_localtime, tvb,
-                                                                       PTP_MM_GLOBAL_TIME_DATA_SET_LOCALTIME_OFFSET, 8, &ts);
-
-                                                       ptp_time_tree = proto_item_add_subtree(time_ti, ett_ptp_time);
-
-                                                       proto_tree_add_item(ptp_time_tree,
-                                                                       hf_ptp_mm_global_time_data_set_localtimeseconds, tvb,
-                                                                       PTP_MM_GLOBAL_TIME_DATA_SET_LOCALTIMESECONDS_OFFSET, 4, FALSE);
-
-                                                       proto_tree_add_item(ptp_time_tree,
-                                                                       hf_ptp_mm_global_time_data_set_localtimenanoseconds,
-                                                                       tvb, PTP_MM_GLOBAL_TIME_DATA_SET_LOCALTIMENANOSECONDS_OFFSET, 4, FALSE);
-                                               }
-
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_global_time_data_set_currentutcoffset, tvb,
-                                                               PTP_MM_GLOBAL_TIME_DATA_SET_CURRENTUTCOFFSET_OFFSET, 2, FALSE);
-
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_global_time_data_set_leap59, tvb,
-                                                               PTP_MM_GLOBAL_TIME_DATA_SET_LEAP59_OFFSET, 1, FALSE);
-
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_global_time_data_set_leap61, tvb,
-                                                               PTP_MM_GLOBAL_TIME_DATA_SET_LEAP61_OFFSET, 1, FALSE);
-
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_global_time_data_set_epochnumber, tvb,
-                                                               PTP_MM_GLOBAL_TIME_DATA_SET_EPOCHNUMBER_OFFSET, 2, FALSE);
-                                               break;
-                                       }
-                                       case PTP_MM_UPDATE_GLOBAL_TIME_PROPERTIES:{
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_update_global_time_properties_currentutcoffset,
-                                                               tvb, PTP_MM_UPDATE_GLOBAL_TIME_PROPERTIES_CURRENTUTCOFFSET_OFFSET,
-                                                               2, FALSE);
-
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_update_global_time_properties_leap59, tvb,
-                                                               PTP_MM_UPDATE_GLOBAL_TIME_PROPERTIES_LEAP59_OFFSET, 1, FALSE);
-
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_update_global_time_properties_leap61, tvb,
-                                                               PTP_MM_UPDATE_GLOBAL_TIME_PROPERTIES_LEAP61_OFFSET, 1, FALSE);
-
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_get_foreign_data_set_recordkey, tvb,
-                                                               PTP_MM_UPDATE_GLOBAL_TIME_PROPERTIES_EPOCHNUMBER_OFFSET, 2, FALSE);
-                                               break;
-                                       }
-                                       case PTP_MM_GET_FOREIGN_DATA_SET:{
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_get_foreign_data_set_recordkey, tvb,
-                                                               PTP_MM_GET_FOREIGN_DATA_SET_RECORDKEY_OFFSET, 2, FALSE);
-                                               break;
-                                       }
-                                       case PTP_MM_FOREIGN_DATA_SET:{
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_foreign_data_set_returnedportnumber, tvb,
-                                                               PTP_MM_FOREIGN_DATA_SET_RETURNEDPORTNUMBER_OFFSET, 2, FALSE);
-
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_foreign_data_set_returnedrecordnumber, tvb,
-                                                               PTP_MM_FOREIGN_DATA_SET_RETURNEDRECORDNUMBER_OFFSET, 2, FALSE);
-
-                                               proto_tree_add_item(ptp_tree,
-                                                               hf_ptp_mm_foreign_data_set_foreignmastercommunicationtechnology,
-                                                               tvb, PTP_MM_FOREIGN_DATA_SET_FOREIGNMASTERCOMMUNICATIONTECHNOLOGY_OFFSET, 1,
-                                                               FALSE);
-
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_foreign_data_set_foreignmasteruuidfield, tvb,
-                                                               PTP_MM_FOREIGN_DATA_SET_FOREIGNMASTERUUIDFIELD_OFFSET, 6, FALSE);
-
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_foreign_data_set_foreignmasterportidfield, tvb,
-                                                               PTP_MM_FOREIGN_DATA_SET_FOREIGNMASTERPORTIDFIELD_OFFSET, 2, FALSE);
-
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_foreign_data_set_foreignmastersyncs, tvb,
-                                                               PTP_MM_FOREIGN_DATA_SET_FOREIGNMASTERSYNCS_OFFSET, 2, FALSE);
-                                               break;
-                                       }
-                                       case PTP_MM_SET_SYNC_INTERVAL:{
-                                               proto_tree_add_item(ptp_tree, hf_ptp_mm_set_sync_interval_syncinterval, tvb,
-                                                               PTP_MM_SET_SYNC_INTERVAL_SYNCINTERVAL_OFFSET, 2, FALSE);
-                                               break;
-                                       }
-                                       case PTP_MM_SET_TIME:{
-                                               /* Subtree for local time*/
-                                               ts.secs = tvb_get_ntohl(tvb, PTP_MM_SET_TIME_LOCALTIMESECONDS_OFFSET);
-
-                                               ts.nsecs = tvb_get_ntohl(tvb, PTP_MM_SET_TIME_LOCALTIMENANOSECONDS_OFFSET);
-
-                                               if(tree){
-                                                       time_ti = proto_tree_add_time(ptp_tree, hf_ptp_mm_set_time_localtime, tvb,
-                                                                       PTP_MM_SET_TIME_LOCALTIME_OFFSET, 8, &ts);
-
-                                                       ptp_time_tree = proto_item_add_subtree(time_ti, ett_ptp_time);
-
-                                                       proto_tree_add_item(ptp_time_tree, hf_ptp_mm_set_time_localtimeseconds, tvb,
-                                                                       PTP_MM_SET_TIME_LOCALTIMESECONDS_OFFSET, 4, FALSE);
-
-                                                       proto_tree_add_item(ptp_time_tree, hf_ptp_mm_set_time_localtimenanoseconds,
-                                                                       tvb, PTP_MM_SET_TIME_LOCALTIMENANOSECONDS_OFFSET, 4, FALSE);
-                                               }
-                                               break;
-                                       }
-                                       default :{
-                                               /*- don't dissect any further. */
-                                               break;
-                                       }
-                               }
-                               break;
-                       }
-                       default :{
-                               /* Not a valid MessageType - can't dissect. */
-                               break;
-                       }
-               }
-       }
+                        if(tree){
+                            time_ti = proto_tree_add_time(ptp_tree,
+                                    hf_ptp_mm_global_time_data_set_localtime, tvb,
+                                    PTP_MM_GLOBAL_TIME_DATA_SET_LOCALTIME_OFFSET, 8, &ts);
+
+                            ptp_time_tree = proto_item_add_subtree(time_ti, ett_ptp_time);
+
+                            proto_tree_add_item(ptp_time_tree,
+                                    hf_ptp_mm_global_time_data_set_localtimeseconds, tvb,
+                                    PTP_MM_GLOBAL_TIME_DATA_SET_LOCALTIMESECONDS_OFFSET, 4, FALSE);
+
+                            proto_tree_add_item(ptp_time_tree,
+                                    hf_ptp_mm_global_time_data_set_localtimenanoseconds,
+                                    tvb, PTP_MM_GLOBAL_TIME_DATA_SET_LOCALTIMENANOSECONDS_OFFSET, 4, FALSE);
+                        }
+
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_global_time_data_set_currentutcoffset, tvb,
+                                PTP_MM_GLOBAL_TIME_DATA_SET_CURRENTUTCOFFSET_OFFSET, 2, FALSE);
+
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_global_time_data_set_leap59, tvb,
+                                PTP_MM_GLOBAL_TIME_DATA_SET_LEAP59_OFFSET, 1, FALSE);
+
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_global_time_data_set_leap61, tvb,
+                                PTP_MM_GLOBAL_TIME_DATA_SET_LEAP61_OFFSET, 1, FALSE);
+
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_global_time_data_set_epochnumber, tvb,
+                                PTP_MM_GLOBAL_TIME_DATA_SET_EPOCHNUMBER_OFFSET, 2, FALSE);
+                        break;
+                    }
+                    case PTP_MM_UPDATE_GLOBAL_TIME_PROPERTIES:{
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_update_global_time_properties_currentutcoffset,
+                                tvb, PTP_MM_UPDATE_GLOBAL_TIME_PROPERTIES_CURRENTUTCOFFSET_OFFSET,
+                                2, FALSE);
+
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_update_global_time_properties_leap59, tvb,
+                                PTP_MM_UPDATE_GLOBAL_TIME_PROPERTIES_LEAP59_OFFSET, 1, FALSE);
+
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_update_global_time_properties_leap61, tvb,
+                                PTP_MM_UPDATE_GLOBAL_TIME_PROPERTIES_LEAP61_OFFSET, 1, FALSE);
+
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_get_foreign_data_set_recordkey, tvb,
+                                PTP_MM_UPDATE_GLOBAL_TIME_PROPERTIES_EPOCHNUMBER_OFFSET, 2, FALSE);
+                        break;
+                    }
+                    case PTP_MM_GET_FOREIGN_DATA_SET:{
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_get_foreign_data_set_recordkey, tvb,
+                                PTP_MM_GET_FOREIGN_DATA_SET_RECORDKEY_OFFSET, 2, FALSE);
+                        break;
+                    }
+                    case PTP_MM_FOREIGN_DATA_SET:{
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_foreign_data_set_returnedportnumber, tvb,
+                                PTP_MM_FOREIGN_DATA_SET_RETURNEDPORTNUMBER_OFFSET, 2, FALSE);
+
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_foreign_data_set_returnedrecordnumber, tvb,
+                                PTP_MM_FOREIGN_DATA_SET_RETURNEDRECORDNUMBER_OFFSET, 2, FALSE);
+
+                        proto_tree_add_item(ptp_tree,
+                                hf_ptp_mm_foreign_data_set_foreignmastercommunicationtechnology,
+                                tvb, PTP_MM_FOREIGN_DATA_SET_FOREIGNMASTERCOMMUNICATIONTECHNOLOGY_OFFSET, 1,
+                                FALSE);
+
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_foreign_data_set_foreignmasteruuidfield, tvb,
+                                PTP_MM_FOREIGN_DATA_SET_FOREIGNMASTERUUIDFIELD_OFFSET, 6, FALSE);
+
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_foreign_data_set_foreignmasterportidfield, tvb,
+                                PTP_MM_FOREIGN_DATA_SET_FOREIGNMASTERPORTIDFIELD_OFFSET, 2, FALSE);
+
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_foreign_data_set_foreignmastersyncs, tvb,
+                                PTP_MM_FOREIGN_DATA_SET_FOREIGNMASTERSYNCS_OFFSET, 2, FALSE);
+                        break;
+                    }
+                    case PTP_MM_SET_SYNC_INTERVAL:{
+                        proto_tree_add_item(ptp_tree, hf_ptp_mm_set_sync_interval_syncinterval, tvb,
+                                PTP_MM_SET_SYNC_INTERVAL_SYNCINTERVAL_OFFSET, 2, FALSE);
+                        break;
+                    }
+                    case PTP_MM_SET_TIME:{
+                        /* Subtree for local time*/
+                        ts.secs = tvb_get_ntohl(tvb, PTP_MM_SET_TIME_LOCALTIMESECONDS_OFFSET);
+
+                        ts.nsecs = tvb_get_ntohl(tvb, PTP_MM_SET_TIME_LOCALTIMENANOSECONDS_OFFSET);
+
+                        if(tree){
+                            time_ti = proto_tree_add_time(ptp_tree, hf_ptp_mm_set_time_localtime, tvb,
+                                    PTP_MM_SET_TIME_LOCALTIME_OFFSET, 8, &ts);
+
+                            ptp_time_tree = proto_item_add_subtree(time_ti, ett_ptp_time);
+
+                            proto_tree_add_item(ptp_time_tree, hf_ptp_mm_set_time_localtimeseconds, tvb,
+                                    PTP_MM_SET_TIME_LOCALTIMESECONDS_OFFSET, 4, FALSE);
+
+                            proto_tree_add_item(ptp_time_tree, hf_ptp_mm_set_time_localtimenanoseconds,
+                                    tvb, PTP_MM_SET_TIME_LOCALTIMENANOSECONDS_OFFSET, 4, FALSE);
+                        }
+                        break;
+                    }
+                    default :{
+                        /*- don't dissect any further. */
+                        break;
+                    }
+                }
+                break;
+            }
+            default :{
+                /* Not a valid MessageType - can't dissect. */
+                break;
+            }
+        }
+    }
 }
 
 
@@ -2140,56 +2143,56 @@ dissect_ptp_v1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 static void
 dissect_ptp_v2_text(tvbuff_t *tvb, guint16 *cur_offset, proto_tree *tree, int hf_ptp_v2_mm_ptptext, int hf_ptp_v2_mm_ptptext_length)
 {
-       guint8  length = 0;
-       proto_item      *ptptext_ti;
-       proto_tree      *ptptext_subtree;
-
-       length = tvb_get_guint8 (tvb, *cur_offset);
-
-       if (tree)
-       {
-               ptptext_ti = proto_tree_add_item(tree, hf_ptp_v2_mm_ptptext, tvb,
-                       *cur_offset+1, length, FALSE);
-
-               ptptext_subtree = proto_item_add_subtree(ptptext_ti, ett_ptp_v2_ptptext);
-                       /* subtree */
-                       proto_tree_add_item(ptptext_subtree, hf_ptp_v2_mm_ptptext_length, tvb,
-                               *cur_offset, 1, FALSE);
-                       proto_tree_add_item(ptptext_subtree, hf_ptp_v2_mm_ptptext, tvb,
-                               *cur_offset+1, length, FALSE);
-
-               *cur_offset = *cur_offset + length + 1;
-       }
+    guint8  length = 0;
+    proto_item  *ptptext_ti;
+    proto_tree  *ptptext_subtree;
+
+    length = tvb_get_guint8 (tvb, *cur_offset);
+
+    if (tree)
+    {
+        ptptext_ti = proto_tree_add_item(tree, hf_ptp_v2_mm_ptptext, tvb,
+            *cur_offset+1, length, FALSE);
+
+        ptptext_subtree = proto_item_add_subtree(ptptext_ti, ett_ptp_v2_ptptext);
+            /* subtree */
+            proto_tree_add_item(ptptext_subtree, hf_ptp_v2_mm_ptptext_length, tvb,
+                *cur_offset, 1, FALSE);
+            proto_tree_add_item(ptptext_subtree, hf_ptp_v2_mm_ptptext, tvb,
+                *cur_offset+1, length, FALSE);
+
+        *cur_offset = *cur_offset + length + 1;
+    }
 }
 
 static void
 dissect_ptp_v2_timeInterval(tvbuff_t *tvb, guint16 *cur_offset, proto_tree *tree, char* name, int hf_ptp_v2_timeInterval_ns, int hf_ptp_v2_timeInterval_subns)
 {
 
-       double time_double;
-       gint64 time_ns;
-       guint16 time_subns;
-       proto_item      *ptptimeInterval_ti;
-       proto_tree      *ptptimeInterval_subtree;
+    double time_double;
+    gint64 time_ns;
+    guint16 time_subns;
+    proto_item  *ptptimeInterval_ti;
+    proto_tree  *ptptimeInterval_subtree;
 
-       time_ns = tvb_get_ntoh64(tvb, *cur_offset);
-       time_double = (1.0*time_ns) / 65536.0;
-       time_ns = time_ns >> 16;
-       time_subns = tvb_get_ntohs(tvb, *cur_offset+6);
+    time_ns = tvb_get_ntoh64(tvb, *cur_offset);
+    time_double = (1.0*time_ns) / 65536.0;
+    time_ns = time_ns >> 16;
+    time_subns = tvb_get_ntohs(tvb, *cur_offset+6);
 
-       ptptimeInterval_ti = proto_tree_add_text(tree, tvb, *cur_offset, 8,
-               "%s: %f nanoseconds", name, time_double);
+    ptptimeInterval_ti = proto_tree_add_text(tree, tvb, *cur_offset, 8,
+        "%s: %f nanoseconds", name, time_double);
 
-       ptptimeInterval_subtree = proto_item_add_subtree(ptptimeInterval_ti, ett_ptp_v2_timeInterval);
+    ptptimeInterval_subtree = proto_item_add_subtree(ptptimeInterval_ti, ett_ptp_v2_timeInterval);
 
-       proto_tree_add_uint64_format_value(ptptimeInterval_subtree,
-               hf_ptp_v2_timeInterval_ns, tvb, *cur_offset, 6, time_ns, "Ns: %" G_GINT64_MODIFIER "d nanoseconds", time_ns);
+    proto_tree_add_uint64_format_value(ptptimeInterval_subtree,
+        hf_ptp_v2_timeInterval_ns, tvb, *cur_offset, 6, time_ns, "Ns: %" G_GINT64_MODIFIER "d nanoseconds", time_ns);
 
-       proto_tree_add_double_format(ptptimeInterval_subtree,
-               hf_ptp_v2_timeInterval_subns, tvb, *cur_offset+6, 2, (time_subns/65536.0),
-               "SubNs: %f nanoseconds", (time_subns/65536.0));
+    proto_tree_add_double_format(ptptimeInterval_subtree,
+        hf_ptp_v2_timeInterval_subns, tvb, *cur_offset+6, 2, (time_subns/65536.0),
+        "SubNs: %f nanoseconds", (time_subns/65536.0));
 
-       *cur_offset = *cur_offset + 8;
+    *cur_offset = *cur_offset + 8;
 }
 
 /* Code to actually dissect the PTPv2 packets */
@@ -2198,16 +2201,16 @@ static void
 dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 {
     guint8 ptp_v2_messageid = 0;
-       guint16 ptp_v2_mm_managementId = 0;
-       guint8 ptp_v2_management_action = 0;
+    guint16 ptp_v2_mm_managementId = 0;
+    guint8 ptp_v2_management_action = 0;
     guint64 timeStamp;
     guint16 temp;
 
 
     /* Set up structures needed to add the protocol subtree and manage it */
-    proto_item         *ti, *transportspecific_ti, *flags_ti, *managementData_ti, *clockType_ti, *protocolAddress_ti;
-    proto_tree         *ptp_tree, *ptp_transportspecific_tree, *ptp_flags_tree, *ptp_managementData_tree,
-                               *ptp_clockType_tree, *ptp_protocolAddress_tree;
+    proto_item  *ti, *transportspecific_ti, *flags_ti, *managementData_ti, *clockType_ti, *protocolAddress_ti;
+    proto_tree  *ptp_tree, *ptp_transportspecific_tree, *ptp_flags_tree, *ptp_managementData_tree,
+                *ptp_clockType_tree, *ptp_protocolAddress_tree;
 
     /* Make entries in Protocol column and Info column on summary display */
     col_set_str(pinfo->cinfo, COL_PROTOCOL, "PTPv2");
@@ -2216,42 +2219,42 @@ dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
     ptp_v2_messageid = 0x0F & tvb_get_guint8 (tvb, PTP_V2_TRANSPORT_SPECIFIC_MESSAGE_ID_OFFSET);
 
-       /* Extend  Info column with managementId */
-       if (check_col(pinfo->cinfo, COL_INFO))
-       {
-               /* Create and set the string for "Info" column */
-               if ( ptp_v2_messageid == PTP_V2_MANAGEMENT_MESSAGE )
-               {
-                       guint16 tlv_type;
-                       /* Get TLV Type */
-                       tlv_type = tvb_get_ntohs (tvb, PTP_V2_MM_TLV_TYPE_OFFSET);
-                       /* For management there are PTP_V2_TLV_TYPE_MANAGEMENT and PTP_V2_TLV_TYPE_MANAGEMENT_ERROR_STATUS TLVs */
-                       switch(tlv_type)
-                       {
-                               case PTP_V2_TLV_TYPE_MANAGEMENT:
-                                       /* Get the managementId */
-                                       ptp_v2_mm_managementId = tvb_get_ntohs(tvb, PTP_V2_MM_TLV_MANAGEMENTID_OFFSET);
-                                       ptp_v2_management_action = 0x0F & tvb_get_guint8(tvb, PTP_V2_MM_ACTION_OFFSET);
-                                       col_add_fstr(pinfo->cinfo, COL_INFO, "Management (%s) %s", 
-                                               val_to_str(ptp_v2_mm_managementId, ptp_v2_managementID_infocolumn_vals, "Unknown management Id %u"),
-                                               val_to_str(ptp_v2_management_action, ptp_v2_mm_action_vals, "Unknown Action %u"));
-                                       break;
-                               case PTP_V2_TLV_TYPE_MANAGEMENT_ERROR_STATUS:
-                                       /* Get the managementErrorId */
-                                       ptp_v2_mm_managementId = tvb_get_ntohs(tvb, PTP_V2_MM_TLV_MANAGEMENTERRORID_OFFSET);
-                                       col_add_fstr(pinfo->cinfo, COL_INFO, "Management Error Message (%s)", val_to_str(ptp_v2_mm_managementId,
-                                                ptp2_managementErrorId_vals, "Unknown Error Id %u"));
-                                       break;
-                               default:
-                                       col_add_str(pinfo->cinfo, COL_INFO, val_to_str(ptp_v2_messageid, ptp_v2_messageid_vals, "Unknown PTP Message (%u)"));
-                                       break;
-                       }
-               }
-               else
-               {
-                   col_add_str(pinfo->cinfo, COL_INFO, val_to_str(ptp_v2_messageid, ptp_v2_messageid_vals, "Unknown PTP Message (%u)"));
-               }
-       }
+    /* Extend  Info column with managementId */
+    if (check_col(pinfo->cinfo, COL_INFO))
+    {
+        /* Create and set the string for "Info" column */
+        if ( ptp_v2_messageid == PTP_V2_MANAGEMENT_MESSAGE )
+        {
+            guint16 tlv_type;
+            /* Get TLV Type */
+            tlv_type = tvb_get_ntohs (tvb, PTP_V2_MM_TLV_TYPE_OFFSET);
+            /* For management there are PTP_V2_TLV_TYPE_MANAGEMENT and PTP_V2_TLV_TYPE_MANAGEMENT_ERROR_STATUS TLVs */
+            switch(tlv_type)
+            {
+                case PTP_V2_TLV_TYPE_MANAGEMENT:
+                    /* Get the managementId */
+                    ptp_v2_mm_managementId = tvb_get_ntohs(tvb, PTP_V2_MM_TLV_MANAGEMENTID_OFFSET);
+                    ptp_v2_management_action = 0x0F & tvb_get_guint8(tvb, PTP_V2_MM_ACTION_OFFSET);
+                    col_add_fstr(pinfo->cinfo, COL_INFO, "Management (%s) %s", 
+                        val_to_str(ptp_v2_mm_managementId, ptp_v2_managementID_infocolumn_vals, "Unknown management Id %u"),
+                        val_to_str(ptp_v2_management_action, ptp_v2_mm_action_vals, "Unknown Action %u"));
+                    break;
+                case PTP_V2_TLV_TYPE_MANAGEMENT_ERROR_STATUS:
+                    /* Get the managementErrorId */
+                    ptp_v2_mm_managementId = tvb_get_ntohs(tvb, PTP_V2_MM_TLV_MANAGEMENTERRORID_OFFSET);
+                    col_add_fstr(pinfo->cinfo, COL_INFO, "Management Error Message (%s)", val_to_str(ptp_v2_mm_managementId,
+                         ptp2_managementErrorId_vals, "Unknown Error Id %u"));
+                    break;
+                default:
+                    col_add_str(pinfo->cinfo, COL_INFO, val_to_str(ptp_v2_messageid, ptp_v2_messageid_vals, "Unknown PTP Message (%u)"));
+                    break;
+            }
+        }
+        else
+        {
+            col_add_str(pinfo->cinfo, COL_INFO, val_to_str(ptp_v2_messageid, ptp_v2_messageid_vals, "Unknown PTP Message (%u)"));
+        }
+    }
 
    if (tree) {
 
@@ -2363,14 +2366,14 @@ dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
                 proto_tree_add_item(ptp_tree, hf_ptp_v2_an_origintimestamp_seconds, tvb,
                             PTP_V2_AN_ORIGINTIMESTAMPSECONDS_OFFSET, 6, FALSE);
-                                       
+                    
                 proto_tree_add_item(ptp_tree, hf_ptp_v2_an_origintimestamp_nanoseconds, tvb,
                             PTP_V2_AN_ORIGINTIMESTAMPNANOSECONDS_OFFSET, 4, FALSE);
 
                 proto_tree_add_item(ptp_tree, hf_ptp_v2_an_origincurrentutcoffset, tvb,
                     PTP_V2_AN_ORIGINCURRENTUTCOFFSET_OFFSET, 2, FALSE);
 
-                               proto_tree_add_item(ptp_tree, hf_ptp_v2_an_priority1, tvb,
+                proto_tree_add_item(ptp_tree, hf_ptp_v2_an_priority1, tvb,
                     PTP_V2_AN_PRIORITY_1_OFFSET, 1, FALSE);
 
                 proto_tree_add_item(ptp_tree, hf_ptp_v2_an_grandmasterclockclass, tvb,
@@ -2385,103 +2388,103 @@ dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                 proto_tree_add_item(ptp_tree, hf_ptp_v2_an_priority2, tvb,
                     PTP_V2_AN_PRIORITY_2_OFFSET, 1, FALSE);
 
-                               proto_tree_add_item(ptp_tree, hf_ptp_v2_an_grandmasterclockidentity, tvb,
+                proto_tree_add_item(ptp_tree, hf_ptp_v2_an_grandmasterclockidentity, tvb,
                     PTP_V2_AN_GRANDMASTERCLOCKIDENTITY_OFFSET, 8, FALSE);
 
-                               proto_tree_add_item(ptp_tree, hf_ptp_v2_an_localstepsremoved, tvb,
+                proto_tree_add_item(ptp_tree, hf_ptp_v2_an_localstepsremoved, tvb,
                         PTP_V2_AN_LOCALSTEPSREMOVED_OFFSET, 2, FALSE);
 
-                               proto_tree_add_item(ptp_tree,
+                proto_tree_add_item(ptp_tree,
                     hf_ptp_v2_an_timesource, tvb, PTP_V2_AN_TIMESOURCE_OFFSET, 1, FALSE);
 
-                               tlv_total_length = 0;
-                               while (tvb_reported_length_remaining(tvb, PTP_V2_AN_TLV_OFFSET + tlv_total_length) >= 2)
-                               {
-                                       /* There are TLV's to be processed */
-                                       tlv_type = tvb_get_ntohs (tvb, PTP_V2_AN_TLV_OFFSET+tlv_total_length+PTP_V2_AN_TLV_TYPE_OFFSET);
-                                       tlv_length = tvb_get_ntohs (tvb, PTP_V2_AN_TLV_OFFSET+tlv_total_length+PTP_V2_AN_TLV_LENGTHFIELD_OFFSET);
-
-                                       tlv_ti = proto_tree_add_text(
-                                               ptp_tree,
-                                               tvb,
-                                               PTP_V2_AN_TLV_OFFSET + tlv_total_length,
-                                               tlv_length + PTP_V2_AN_TLV_DATA_OFFSET,
-                                               "%s TLV",
-                                               val_to_str(tlv_type,
-                                                                  ptp_v2_TLV_type_vals,
-                                                                  "Unknown (%u)"));
-
-                                       ptp_tlv_tree = proto_item_add_subtree(tlv_ti, ett_ptp_v2_tlv);
-
-                                       proto_tree_add_item(ptp_tlv_tree,
-                                                                               hf_ptp_v2_an_tlv_tlvtype,
-                                                                               tvb,
-                                                                               PTP_V2_AN_TLV_OFFSET + tlv_total_length + PTP_V2_AN_TLV_TYPE_OFFSET,
-                                                                               2,
-                                                                               FALSE);
-
-                                       proto_tree_add_item(ptp_tlv_tree,
-                                                                               hf_ptp_v2_an_tlv_lengthfield,
-                                                                               tvb,
-                                                                               PTP_V2_AN_TLV_OFFSET + tlv_total_length + PTP_V2_AN_TLV_LENGTHFIELD_OFFSET,
-                                                                               2,
-                                                                               FALSE);
-
-                                       switch (tlv_type)
-                                       {
-                                               case PTP_V2_TLV_TYPE_ALTERNATE_TIME_OFFSET_INDICATOR:
-                                               {
-                                                       proto_tree_add_item(ptp_tlv_tree,
-                                                                                               hf_ptp_v2_atoi_tlv_keyfield,
-                                                                                               tvb,
-                                                                                               PTP_V2_AN_TLV_OFFSET + tlv_total_length + PTP_V2_AN_TLV_ATOI_KEYFIELD_OFFSET,
-                                                                                               1,
-                                                                                               FALSE);
-
-                                                       proto_tree_add_item(ptp_tlv_tree,
-                                                                                               hf_ptp_v2_atoi_tlv_currentoffset,
-                                                                                               tvb,
-                                                                                               PTP_V2_AN_TLV_OFFSET + tlv_total_length + PTP_V2_AN_TLV_ATOI_CURRENTOFFSET_OFFSET,
-                                                                                               4,
-                                                                                               FALSE);
-
-                                                       proto_tree_add_item(ptp_tlv_tree,
-                                                                                               hf_ptp_v2_atoi_tlv_jumpseconds,
-                                                                                               tvb,
-                                                                                               PTP_V2_AN_TLV_OFFSET + tlv_total_length + PTP_V2_AN_TLV_ATOI_JUMPSECONDS_OFFSET,
-                                                                                               4,
-                                                                                               FALSE);
-
-                                                       proto_tree_add_item(ptp_tlv_tree,
-                                                                                               hf_ptp_v2_atoi_tlv_timeofnextjump,
-                                                                                               tvb,
-                                                                                               PTP_V2_AN_TLV_OFFSET + tlv_total_length + PTP_V2_AN_TLV_ATOI_TIMEOFNEXTJUMP_OFFSET,
-                                                                                               6,
-                                                                                               FALSE);
-
-                                                       Offset = PTP_V2_AN_TLV_OFFSET + tlv_total_length + PTP_V2_AN_TLV_ATOI_DISPLAYNAME_OFFSET;
-                                                       dissect_ptp_v2_text(tvb,
-                                                                                           &Offset,
-                                                                                           ptp_tlv_tree,
-                                                                                           hf_ptp_v2_atoi_tlv_displayname,
-                                                                                           hf_ptp_v2_atoi_tlv_displayname_length);
-
-                                                       break;
-                                               }
-                                               default:
-                                               {
-                                                       proto_tree_add_item(ptp_tlv_tree,
-                                                                                               hf_ptp_v2_an_tlv_data,
-                                                                                               tvb,
-                                                                                               PTP_V2_AN_TLV_OFFSET + tlv_total_length + PTP_V2_AN_TLV_DATA_OFFSET,
-                                                                                               tlv_length,
-                                                                                               FALSE);
-                                                       break;
-                                               }
-                                       }
-
-                                       tlv_total_length += (tlv_length + PTP_V2_AN_TLV_DATA_OFFSET);
-                               }
+                tlv_total_length = 0;
+                while (tvb_reported_length_remaining(tvb, PTP_V2_AN_TLV_OFFSET + tlv_total_length) >= 2)
+                {
+                    /* There are TLV's to be processed */
+                    tlv_type = tvb_get_ntohs (tvb, PTP_V2_AN_TLV_OFFSET+tlv_total_length+PTP_V2_AN_TLV_TYPE_OFFSET);
+                    tlv_length = tvb_get_ntohs (tvb, PTP_V2_AN_TLV_OFFSET+tlv_total_length+PTP_V2_AN_TLV_LENGTHFIELD_OFFSET);
+
+                    tlv_ti = proto_tree_add_text(
+                        ptp_tree,
+                        tvb,
+                        PTP_V2_AN_TLV_OFFSET + tlv_total_length,
+                        tlv_length + PTP_V2_AN_TLV_DATA_OFFSET,
+                        "%s TLV",
+                        val_to_str(tlv_type,
+                                   ptp_v2_TLV_type_vals,
+                                   "Unknown (%u)"));
+
+                    ptp_tlv_tree = proto_item_add_subtree(tlv_ti, ett_ptp_v2_tlv);
+
+                    proto_tree_add_item(ptp_tlv_tree,
+                                        hf_ptp_v2_an_tlv_tlvtype,
+                                        tvb,
+                                        PTP_V2_AN_TLV_OFFSET + tlv_total_length + PTP_V2_AN_TLV_TYPE_OFFSET,
+                                        2,
+                                        FALSE);
+
+                    proto_tree_add_item(ptp_tlv_tree,
+                                        hf_ptp_v2_an_tlv_lengthfield,
+                                        tvb,
+                                        PTP_V2_AN_TLV_OFFSET + tlv_total_length + PTP_V2_AN_TLV_LENGTHFIELD_OFFSET,
+                                        2,
+                                        FALSE);
+
+                    switch (tlv_type)
+                    {
+                        case PTP_V2_TLV_TYPE_ALTERNATE_TIME_OFFSET_INDICATOR:
+                        {
+                            proto_tree_add_item(ptp_tlv_tree,
+                                                hf_ptp_v2_atoi_tlv_keyfield,
+                                                tvb,
+                                                PTP_V2_AN_TLV_OFFSET + tlv_total_length + PTP_V2_AN_TLV_ATOI_KEYFIELD_OFFSET,
+                                                1,
+                                                FALSE);
+
+                            proto_tree_add_item(ptp_tlv_tree,
+                                                hf_ptp_v2_atoi_tlv_currentoffset,
+                                                tvb,
+                                                PTP_V2_AN_TLV_OFFSET + tlv_total_length + PTP_V2_AN_TLV_ATOI_CURRENTOFFSET_OFFSET,
+                                                4,
+                                                FALSE);
+
+                            proto_tree_add_item(ptp_tlv_tree,
+                                                hf_ptp_v2_atoi_tlv_jumpseconds,
+                                                tvb,
+                                                PTP_V2_AN_TLV_OFFSET + tlv_total_length + PTP_V2_AN_TLV_ATOI_JUMPSECONDS_OFFSET,
+                                                4,
+                                                FALSE);
+
+                            proto_tree_add_item(ptp_tlv_tree,
+                                                hf_ptp_v2_atoi_tlv_timeofnextjump,
+                                                tvb,
+                                                PTP_V2_AN_TLV_OFFSET + tlv_total_length + PTP_V2_AN_TLV_ATOI_TIMEOFNEXTJUMP_OFFSET,
+                                                6,
+                                                FALSE);
+
+                            Offset = PTP_V2_AN_TLV_OFFSET + tlv_total_length + PTP_V2_AN_TLV_ATOI_DISPLAYNAME_OFFSET;
+                            dissect_ptp_v2_text(tvb,
+                                                &Offset,
+                                                ptp_tlv_tree,
+                                                hf_ptp_v2_atoi_tlv_displayname,
+                                                hf_ptp_v2_atoi_tlv_displayname_length);
+
+                            break;
+                        }
+                        default:
+                        {
+                            proto_tree_add_item(ptp_tlv_tree,
+                                                hf_ptp_v2_an_tlv_data,
+                                                tvb,
+                                                PTP_V2_AN_TLV_OFFSET + tlv_total_length + PTP_V2_AN_TLV_DATA_OFFSET,
+                                                tlv_length,
+                                                FALSE);
+                            break;
+                        }
+                    }
+
+                    tlv_total_length += (tlv_length + PTP_V2_AN_TLV_DATA_OFFSET);
+                }
 
                 break;
             }
@@ -2492,9 +2495,9 @@ dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                 timeStamp = timeStamp << 16;
                 timeStamp = timeStamp | tvb_get_ntohs(tvb, PTP_V2_SDR_ORIGINTIMESTAMPSECONDS_OFFSET+4);
 
-                               proto_tree_add_item(ptp_tree, hf_ptp_v2_sdr_origintimestamp_seconds, tvb,
+                proto_tree_add_item(ptp_tree, hf_ptp_v2_sdr_origintimestamp_seconds, tvb,
                     PTP_V2_SDR_ORIGINTIMESTAMPSECONDS_OFFSET, 6, FALSE);
-                   
+            
                 proto_tree_add_item(ptp_tree, hf_ptp_v2_sdr_origintimestamp_nanoseconds, tvb,
                     PTP_V2_SDR_ORIGINTIMESTAMPNANOSECONDS_OFFSET, 4, FALSE);
 
@@ -2505,7 +2508,7 @@ dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                 timeStamp = tvb_get_ntohl(tvb, PTP_V2_FU_PRECISEORIGINTIMESTAMPSECONDS_OFFSET);
                 timeStamp = timeStamp << 16;
                 timeStamp = timeStamp | tvb_get_ntohs(tvb, PTP_V2_FU_PRECISEORIGINTIMESTAMPSECONDS_OFFSET+4);
-               
+        
                 proto_tree_add_item(ptp_tree, hf_ptp_v2_fu_preciseorigintimestamp_seconds, tvb,
                     PTP_V2_FU_PRECISEORIGINTIMESTAMPSECONDS_OFFSET, 6, FALSE);
 
@@ -2522,7 +2525,7 @@ dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
                 proto_tree_add_item(ptp_tree, hf_ptp_v2_dr_receivetimestamp_seconds, tvb,
                     PTP_V2_DR_RECEIVETIMESTAMPSECONDS_OFFSET, 6, FALSE);
-                                       
+                    
                 proto_tree_add_item(ptp_tree, hf_ptp_v2_dr_receivetimestamp_nanoseconds, tvb,
                     PTP_V2_DR_RECEIVETIMESTAMPNANOSECONDS_OFFSET, 4, FALSE);
 
@@ -2592,844 +2595,844 @@ dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
             case PTP_V2_SIGNALLING_MESSAGE:{
 
-                               guint16 tlv_type, tlv_length;
+                guint16 tlv_type, tlv_length;
 
-                               proto_tree_add_item(ptp_tree, hf_ptp_v2_sig_targetportidentity, tvb,
+                proto_tree_add_item(ptp_tree, hf_ptp_v2_sig_targetportidentity, tvb,
                     PTP_V2_SIG_TARGETPORTIDENTITY_OFFSET, 8, FALSE);
 
                 proto_tree_add_item(ptp_tree, hf_ptp_v2_sig_targetportid, tvb,
                     PTP_V2_SIG_TARGETPORTID_OFFSET, 2, FALSE);
 
-                               proto_tree_add_item(ptp_tree, hf_ptp_v2_mm_tlvType, tvb,
-                               PTP_V2_SIG_TARGETPORTID_OFFSET+2, 2, FALSE);
+                proto_tree_add_item(ptp_tree, hf_ptp_v2_mm_tlvType, tvb,
+                    PTP_V2_SIG_TARGETPORTID_OFFSET+2, 2, FALSE);
 
-                               proto_tree_add_item(ptp_tree, hf_ptp_v2_mm_lengthField, tvb,
-                               PTP_V2_SIG_TARGETPORTID_OFFSET+4, 2, FALSE);
+                proto_tree_add_item(ptp_tree, hf_ptp_v2_mm_lengthField, tvb,
+                    PTP_V2_SIG_TARGETPORTID_OFFSET+4, 2, FALSE);
 
-                               tlv_type = tvb_get_ntohs (tvb, PTP_V2_MM_TLV_TYPE_OFFSET);
-                               tlv_length = tvb_get_ntohs (tvb, PTP_V2_MM_TLV_LENGTHFIELD_OFFSET);
+                tlv_type = tvb_get_ntohs (tvb, PTP_V2_MM_TLV_TYPE_OFFSET);
+                tlv_length = tvb_get_ntohs (tvb, PTP_V2_MM_TLV_LENGTHFIELD_OFFSET);
 
-                               if (tlv_length <= 2)
-                               {
-                                       /* no data */
-                                       break;
-                               }
-                               /* ToDO: Add dissector for TLVs and allow multiple TLVs */
-                               proto_tree_add_text(ptp_tree, tvb, PTP_V2_SIG_TARGETPORTID_OFFSET+6, tlv_length, "Data");
-                               break;
+                if (tlv_length <= 2)
+                {
+                    /* no data */
+                    break;
+                }
+                /* ToDO: Add dissector for TLVs and allow multiple TLVs */
+                proto_tree_add_text(ptp_tree, tvb, PTP_V2_SIG_TARGETPORTID_OFFSET+6, tlv_length, "Data");
+                break;
             }
 
             case PTP_V2_MANAGEMENT_MESSAGE:
-                       {
-                               guint16 tlv_type, tlv_length;
+            {
+                guint16 tlv_type, tlv_length;
 
-                               proto_tree_add_item(ptp_tree, hf_ptp_v2_mm_targetportidentity, tvb,
-                               PTP_V2_MM_TARGETPORTIDENTITY_OFFSET, 8, FALSE);
+                proto_tree_add_item(ptp_tree, hf_ptp_v2_mm_targetportidentity, tvb,
+                    PTP_V2_MM_TARGETPORTIDENTITY_OFFSET, 8, FALSE);
 
-                           proto_tree_add_item(ptp_tree, hf_ptp_v2_mm_targetportid, tvb,
-                               PTP_V2_MM_TARGETPORTID_OFFSET, 2, FALSE);
+                proto_tree_add_item(ptp_tree, hf_ptp_v2_mm_targetportid, tvb,
+                    PTP_V2_MM_TARGETPORTID_OFFSET, 2, FALSE);
 
-                           proto_tree_add_item(ptp_tree, hf_ptp_v2_mm_startingboundaryhops, tvb,
-                               PTP_V2_MM_STARTINGBOUNDARYHOPS_OFFSET, 1, FALSE);
+                proto_tree_add_item(ptp_tree, hf_ptp_v2_mm_startingboundaryhops, tvb,
+                    PTP_V2_MM_STARTINGBOUNDARYHOPS_OFFSET, 1, FALSE);
 
-                           proto_tree_add_item(ptp_tree, hf_ptp_v2_mm_boundaryhops, tvb,
-                               PTP_V2_MM_BOUNDARYHOPS_OFFSET, 1, FALSE);
+                proto_tree_add_item(ptp_tree, hf_ptp_v2_mm_boundaryhops, tvb,
+                    PTP_V2_MM_BOUNDARYHOPS_OFFSET, 1, FALSE);
 
-                           proto_tree_add_item(ptp_tree, hf_ptp_v2_mm_action, tvb,
-                               PTP_V2_MM_ACTION_OFFSET, 1, FALSE);
+                proto_tree_add_item(ptp_tree, hf_ptp_v2_mm_action, tvb,
+                    PTP_V2_MM_ACTION_OFFSET, 1, FALSE);
 
-                               /* management TLV */
-                               proto_tree_add_item(ptp_tree, hf_ptp_v2_mm_tlvType, tvb,
-                               PTP_V2_MM_TLV_TYPE_OFFSET, 2, FALSE);
+                /* management TLV */
+                proto_tree_add_item(ptp_tree, hf_ptp_v2_mm_tlvType, tvb,
+                    PTP_V2_MM_TLV_TYPE_OFFSET, 2, FALSE);
 
-                               proto_tree_add_item(ptp_tree, hf_ptp_v2_mm_lengthField, tvb,
-                               PTP_V2_MM_TLV_LENGTHFIELD_OFFSET, 2, FALSE);
+                proto_tree_add_item(ptp_tree, hf_ptp_v2_mm_lengthField, tvb,
+                    PTP_V2_MM_TLV_LENGTHFIELD_OFFSET, 2, FALSE);
 
-                               tlv_type = tvb_get_ntohs (tvb, PTP_V2_MM_TLV_TYPE_OFFSET);
-                               tlv_length = tvb_get_ntohs (tvb, PTP_V2_MM_TLV_LENGTHFIELD_OFFSET);
+                tlv_type = tvb_get_ntohs (tvb, PTP_V2_MM_TLV_TYPE_OFFSET);
+                tlv_length = tvb_get_ntohs (tvb, PTP_V2_MM_TLV_LENGTHFIELD_OFFSET);
 
-                               /* For management there are PTP_V2_TLV_TYPE_MANAGEMENT and PTP_V2_TLV_TYPE_MANAGEMENT_ERROR_STATUS TLVs */
-                               switch(tlv_type) {
-                                       case PTP_V2_TLV_TYPE_MANAGEMENT:
-                                       {
-                                               guint16 ptp_v2_managementId;
-                                               guint16 Offset = PTP_V2_MM_TLV_DATAFIELD_OFFSET;
+                /* For management there are PTP_V2_TLV_TYPE_MANAGEMENT and PTP_V2_TLV_TYPE_MANAGEMENT_ERROR_STATUS TLVs */
+                switch(tlv_type) {
+                    case PTP_V2_TLV_TYPE_MANAGEMENT:
+                    {
+                        guint16 ptp_v2_managementId;
+                        guint16 Offset = PTP_V2_MM_TLV_DATAFIELD_OFFSET;
 
-                                               proto_tree_add_item(ptp_tree, hf_ptp_v2_mm_managementId, tvb,
-                                               PTP_V2_MM_TLV_MANAGEMENTID_OFFSET, 2, FALSE);
+                        proto_tree_add_item(ptp_tree, hf_ptp_v2_mm_managementId, tvb,
+                            PTP_V2_MM_TLV_MANAGEMENTID_OFFSET, 2, FALSE);
 
-                                               ptp_v2_managementId = tvb_get_ntohs (tvb, PTP_V2_MM_TLV_MANAGEMENTID_OFFSET);
+                        ptp_v2_managementId = tvb_get_ntohs (tvb, PTP_V2_MM_TLV_MANAGEMENTID_OFFSET);
 
-                                               if (tlv_length <= 2)
-                                               {
-                                                       /* no data */
-                                                       break;
-                                               }
+                        if (tlv_length <= 2)
+                        {
+                            /* no data */
+                            break;
+                        }
 
-                                               managementData_ti = proto_tree_add_text(ptp_tree, tvb, Offset, tlv_length, "Data");
+                        managementData_ti = proto_tree_add_text(ptp_tree, tvb, Offset, tlv_length, "Data");
 
-                                               /* data field of the management message (subtree)*/
-                                               ptp_managementData_tree = proto_item_add_subtree(managementData_ti, ett_ptp_v2_managementData);
+                        /* data field of the management message (subtree)*/
+                        ptp_managementData_tree = proto_item_add_subtree(managementData_ti, ett_ptp_v2_managementData);
 
-                                               switch(ptp_v2_managementId) {
-                                                       case PTP_V2_MM_ID_NULL_MANAGEMENT:
-                                                       {
-                                                               /* no data in NULL management */
-                                                               break;
-                                                       }
-                                                       case PTP_V2_MM_ID_CLOCK_DESCRIPTION:
-                                                       {
-                                                               guint16 N = 0, S = 0;
-                                                               clockType_ti = proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_clockType, tvb,
-                                                                       Offset, 2, FALSE);
-
-                                                               ptp_clockType_tree = proto_item_add_subtree(clockType_ti, ett_ptp_v2_clockType);
-                                                                       /* ClockType Subtree */
-                                                                       proto_tree_add_item(ptp_clockType_tree, hf_ptp_v2_mm_clockType_ordinaryClock, tvb,
-                                                                               Offset, 2, FALSE);
-
-                                                                       proto_tree_add_item(ptp_clockType_tree, hf_ptp_v2_mm_clockType_boundaryClock, tvb,
-                                                                               Offset, 2, FALSE);
-
-                                                                       proto_tree_add_item(ptp_clockType_tree, hf_ptp_v2_mm_clockType_p2p_transparentClock, tvb,
-                                                                               Offset, 2, FALSE);
-
-                                                                       proto_tree_add_item(ptp_clockType_tree, hf_ptp_v2_mm_clockType_e2e_transparentClock, tvb,
-                                                                               Offset, 2, FALSE);
-
-                                                                       proto_tree_add_item(ptp_clockType_tree, hf_ptp_v2_mm_clockType_managementNode, tvb,
-                                                                               Offset, 2, FALSE);
-
-                                                                       proto_tree_add_item(ptp_clockType_tree, hf_ptp_v2_mm_clockType_reserved, tvb,
-                                                                               Offset, 2, FALSE);
-                                                               Offset +=2;
-
-                                                               dissect_ptp_v2_text     (tvb, &Offset, ptp_managementData_tree,
-                                                                                                        hf_ptp_v2_mm_physicalLayerProtocol, hf_ptp_v2_mm_physicalLayerProtocol_length);
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_physicalAddressLength, tvb,
-                                                                       Offset, 2, FALSE);
-
-                                                               S = tvb_get_ntohs (tvb, Offset);
-                                                               Offset +=2;
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_physicalAddress, tvb,
-                                                                       Offset, S, FALSE);
-                                                               Offset += S;
-
-                                                               N = tvb_get_ntohs (tvb, Offset+2);
-
-                                                               protocolAddress_ti = proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_protocolAddress, tvb,
-                                                                       Offset+4, N, FALSE);
-
-                                                               ptp_protocolAddress_tree = proto_item_add_subtree(protocolAddress_ti, ett_ptp_v2_protocolAddress);
-                                                                       /* physicalLayerProtocol subtree */
-                                                                       proto_tree_add_item(ptp_protocolAddress_tree, hf_ptp_v2_mm_protocolAddress_networkProtocol, tvb,
-                                                                               Offset, 2, FALSE);
-
-                                                                       proto_tree_add_item(ptp_protocolAddress_tree, hf_ptp_v2_mm_protocolAddress_length, tvb,
-                                                                               Offset+2, 2, FALSE);
-
-                                                                       proto_tree_add_item(ptp_protocolAddress_tree, hf_ptp_v2_mm_protocolAddress, tvb,
-                                                                               Offset+4, N, FALSE);
-                                                               N = N + 4;
-                                                               Offset += N;
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_manufacturerIdentity, tvb,
-                                                                       Offset, 3, FALSE);
-
-                                                               Offset += 3;
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               Offset += 1;
-
-                                                               dissect_ptp_v2_text     (tvb, &Offset, ptp_managementData_tree,
-                                                                                                        hf_ptp_v2_mm_productDescription, hf_ptp_v2_mm_productDescription_length);
-                                                               dissect_ptp_v2_text     (tvb, &Offset, ptp_managementData_tree,
-                                                                                                        hf_ptp_v2_mm_revisionData, hf_ptp_v2_mm_revisionData_length);
-                                                               dissect_ptp_v2_text     (tvb, &Offset, ptp_managementData_tree,
-                                                                                                        hf_ptp_v2_mm_userDescription, hf_ptp_v2_mm_userDescription_length);
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_profileIdentity, tvb,
-                                                                       Offset, 6, FALSE);
-                                                               Offset += 6;
-
-                                                               /* Wenn Offset nicht gerade folgt noch ein pad Bit */
-                                                               if ( (Offset - PTP_V2_MM_TLV_DATAFIELD_OFFSET) % 2 )
-                                                               {
-                                                                       proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_pad, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               }
-                                                               break;
-                                                       }
-                                                       case PTP_V2_MM_ID_USER_DESCRIPTION:
-                                                       {
-
-                                                               dissect_ptp_v2_text     (tvb, &Offset, ptp_managementData_tree,
-                                                                                                        hf_ptp_v2_mm_userDescription, hf_ptp_v2_mm_userDescription_length);
-
-                                                               /* Wenn Offset nicht gerade folgt noch ein pad Bit */
-                                                               if ( (Offset - PTP_V2_MM_TLV_DATAFIELD_OFFSET) % 2 )
-                                                               {
-                                                                       proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_pad, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               }
-                                                               break;
-                                                       }
-                                                       case PTP_V2_MM_ID_SAVE_IN_NON_VOLATILE_STORAGE:
-                                                       {
-                                                               /* no data */
-                                                               break;
-                                                       }
-                                                       case PTP_V2_MM_ID_RESET_NON_VOLATILE_STORAGE:
-                                                       {
-                                                               /* no data */
-                                                               break;
-                                                       }
-                                                       case PTP_V2_MM_ID_INITIALIZE:
-                                                       {
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_initializationKey, tvb,
-                                                                       Offset, 2, FALSE);
-                                                               break;
-                                                       }
-                                                       case PTP_V2_MM_ID_FAULT_LOG:
-                                                       {
-                                                               guint16 i, num = 0;
-                                                               proto_item      *ptpError_ti;
-                                                               proto_tree      *ptpError_subtree;
-
-                                                               num = tvb_get_ntohs (tvb, Offset);
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_numberOfFaultRecords, tvb,
-                                                                       Offset, 2, FALSE);
-                                                               Offset +=2;
-
-                                                               for (i = 1; i <= num; i++)
-                                                               {
-                                                                       ptpError_ti = proto_tree_add_text(ptp_managementData_tree, tvb, Offset, tvb_get_ntohs (tvb, Offset), "Fault record");
-
-                                                                       /*  (subtree)*/
-                                                                       ptpError_subtree = proto_item_add_subtree(ptpError_ti, ett_ptp_v2_faultRecord);
-
-                                                                       proto_tree_add_item(ptpError_subtree, hf_ptp_v2_mm_faultRecordLength, tvb,
-                                                                               Offset, 2, FALSE);
-                                                                       Offset +=2;
-
-                                                                       timeStamp = tvb_get_ntohl(tvb, Offset);
-                                                       timeStamp = timeStamp << 16;
-                                                       timeStamp = timeStamp | tvb_get_ntohs(tvb, Offset+4);
-
-                                                                       proto_tree_add_item(ptpError_subtree, hf_ptp_v2_mm_faultTime_s, tvb,
-                                                                   Offset, 6, FALSE);
-
-                                                                       Offset +=6;
-                                                       proto_tree_add_item(ptpError_subtree, hf_ptp_v2_mm_faultTime_ns, tvb,
-                                                                   Offset, 4, FALSE);
-                                                                       Offset +=4;
-                                                                       proto_tree_add_item(ptpError_subtree, hf_ptp_v2_mm_severityCode, tvb,
-                                                                   Offset, 1, FALSE);
-                                                                       Offset +=1;
-
-                                                                       dissect_ptp_v2_text     (tvb, &Offset, ptpError_subtree,
-                                                                                                                hf_ptp_v2_mm_faultName, hf_ptp_v2_mm_faultName_length);
-
-                                                                       dissect_ptp_v2_text     (tvb, &Offset, ptpError_subtree,
-                                                                                                                hf_ptp_v2_mm_faultValue, hf_ptp_v2_mm_faultValue_length);
-
-                                                                       dissect_ptp_v2_text     (tvb, &Offset, ptpError_subtree,
-                                                                                                                hf_ptp_v2_mm_faultDescription, hf_ptp_v2_mm_faultDescription_length);
-                                                               }
-
-                                                               /* Wenn Offset nicht gerade folgt noch ein pad Bit */
-                                                               if ( (Offset - PTP_V2_MM_TLV_DATAFIELD_OFFSET) % 2 )
-                                                               {
-                                                                       proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_pad, tvb,
-                                                                               Offset, 1, FALSE);
-                                                               }
-                                                               break;
-                                                       }
-                                                       case PTP_V2_MM_ID_FAULT_LOG_RESET:
-                                                       {
-                                                               /* no data */
-                                                               break;
-                                                       }
-                                                       case PTP_V2_MM_ID_DEFAULT_DATA_SET:
-                                                       {
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_TSC, tvb,
-                                                                       PTP_V2_MM_TLV_DATAFIELD_OFFSET, 1, FALSE);
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_dds_SO, tvb,
-                                                                       PTP_V2_MM_TLV_DATAFIELD_OFFSET, 1, FALSE);
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
-                                                                       PTP_V2_MM_RESERVED1, 1, FALSE);
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_numberPorts, tvb,
-                                                                       PTP_V2_MM_NUMBERPORTS, 2, FALSE);
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_priority1, tvb,
-                                                                       PTP_V2_MM_PRIORITY1, 1, FALSE);
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_clockclass, tvb,
-                                                                       PTP_V2_MM_CLOCKQUALITY, 1, FALSE);
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_clockaccuracy, tvb,
-                                                                       PTP_V2_MM_CLOCKQUALITY+1, 1, FALSE);
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_clockvariance, tvb,
-                                                                       PTP_V2_MM_CLOCKQUALITY+2, 2, FALSE);
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_priority2, tvb,
-                                                                       PTP_V2_MM_PRIORITY2, 1, FALSE);
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_clockidentity, tvb,
-                                                                       PTP_V2_MM_CLOCKIDENTITY, 8, FALSE);
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_domainNumber, tvb,
-                                                                       PTP_V2_MM_DOMAINNUMBER, 1, FALSE);
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
-                                                                       PTP_V2_MM_RESERVED2, 1, FALSE);
-                                                               break;
-                                                       }
-                                                       case PTP_V2_MM_ID_CURRENT_DATA_SET:
-                                                       {
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_stepsRemoved, tvb,
-                                                                       Offset, 2, FALSE);
-                                                               Offset +=2;
-
-                                                               dissect_ptp_v2_timeInterval(tvb, &Offset, ptp_managementData_tree,
-                                                                       "Offset from Master", hf_ptp_v2_mm_offset_ns, hf_ptp_v2_mm_offset_subns);
-                                                               dissect_ptp_v2_timeInterval(tvb, &Offset, ptp_managementData_tree,
-                                                                       "Mean path delay", hf_ptp_v2_mm_pathDelay_ns, hf_ptp_v2_mm_pathDelay_subns);
-                                                               break;
-                                                       }
-                                                       case PTP_V2_MM_ID_PARENT_DATA_SET:
-                                                       {
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_parentIdentity, tvb,
-                                                                       Offset, 8, FALSE);
-
-                                                       proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_parentPort, tvb,
-                                                                       Offset+8, 2, FALSE);
-                                                               Offset +=10;
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_parentStats, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               Offset +=1;
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               Offset +=1;
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_observedParentOffsetScaledLogVariance, tvb,
-                                                                       Offset, 2, FALSE);
-                                                               Offset +=2;
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_observedParentClockPhaseChangeRate, tvb,
-                                                                       Offset, 4, FALSE);
-                                                               Offset +=4;
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_grandmasterPriority1, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               Offset +=1;
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_grandmasterclockclass, tvb,
-                                                                       Offset, 1, FALSE);
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_grandmasterclockaccuracy, tvb,
-                                                                       Offset+1, 1, FALSE);
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_grandmasterclockvariance, tvb,
-                                                                       Offset+2, 2, FALSE);
-                                                               Offset += 4;
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_grandmasterPriority2, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               Offset +=1;
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_grandmasterIdentity, tvb,
-                                                                       Offset, 8, FALSE);
-
-                                                               break;
-                                                       }
-                                                       case PTP_V2_MM_ID_TIME_PROPERTIES_DATA_SET:
-                                                       {
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_currentUtcOffset, tvb,
-                                                                       Offset, 2, FALSE);
-                                                               Offset +=2;
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_LI_61, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_LI_59, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_UTCV, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_PTP, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_TTRA, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_FTRA, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               Offset +=1;
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_timesource, tvb,
-                                                                       Offset, 1, FALSE);
-
-                                                               break;
-                                                       }
-                                                       case PTP_V2_MM_ID_PORT_DATA_SET:
-                                                       {
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_clockidentity, tvb,
-                                                                       Offset, 8, FALSE);
-                                                               Offset +=8;
-
-                                                       proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_PortNumber, tvb,
-                                                                       Offset, 2, FALSE);
-                                                               Offset +=2;
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_portState, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               Offset +=1;
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_logMinDelayReqInterval, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               Offset +=1;
-
-                                                               dissect_ptp_v2_timeInterval(tvb, &Offset, ptp_managementData_tree,
-                                                                       "Peer mean path delay", hf_ptp_v2_mm_peerMeanPathDelay_ns, hf_ptp_v2_mm_peerMeanPathDelay_subns);
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_logAnnounceInterval, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               Offset +=1;
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_announceReceiptTimeout, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               Offset +=1;
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_logSyncInterval, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               Offset +=1;
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_delayMechanism, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               Offset +=1;
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_logMinPdelayReqInterval, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               Offset +=1;
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_versionNumber, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               Offset +=1;
-
-                                                               break;
-                                                       }
-                                                       case PTP_V2_MM_ID_PRIORITY1:
-                                                       {
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_priority1, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
-                                                                       Offset+1, 1, FALSE);
-                                                               break;
-                                                       }
-                                                       case PTP_V2_MM_ID_PRIORITY2:
-                                                       {
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_priority2, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
-                                                                       Offset+1, 1, FALSE);
-                                                               break;
-                                                       }
-                                                       case PTP_V2_MM_ID_DOMAIN:
-                                                       {
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_domainNumber, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
-                                                                       Offset+1, 1, FALSE);
-                                                               break;
-                                                       }
-                                                       case PTP_V2_MM_ID_SLAVE_ONLY:
-                                                       {
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_SO, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
-                                                                       Offset+1, 1, FALSE);
-                                                               break;
-                                                       }
-                                                       case PTP_V2_MM_ID_LOG_ANNOUNCE_INTERVAL:
-                                                       {
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_logAnnounceInterval, tvb,
-                                                                       Offset, 1, FALSE);
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
-                                                                       Offset+1, 1, FALSE);
-                                                               break;
-                                                       }
-                                                       case PTP_V2_MM_ID_ANNOUNCE_RECEIPT_TIMEOUT:
-                                                       {
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_announceReceiptTimeout, tvb,
-                                                                       Offset, 1, FALSE);
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
-                                                                       Offset+1, 1, FALSE);
-                                                               break;
-                                                       }
-                                                       case PTP_V2_MM_ID_LOG_SYNC_INTERVAL:
-                                                       {
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_logSyncInterval, tvb,
-                                                                       Offset, 1, FALSE);
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
-                                                                       Offset+1, 1, FALSE);
-                                                               break;
-                                                       }
-                                                       case PTP_V2_MM_ID_VERSION_NUMBER:
-                                                       {
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_versionNumber, tvb,
-                                                                       Offset, 1, FALSE);
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
-                                                                       Offset+1, 1, FALSE);
-                                                               break;
-                                                       }
-                                                       case PTP_V2_MM_ID_ENABLE_PORT:
-                                                       {
-                                                               /* no data */
-                                                               break;
-                                                       }
-                                                       case PTP_V2_MM_ID_DISABLE_PORT:
-                                                       {
-                                                               /* no data */
-                                                               break;
-                                                       }
-                                                       case PTP_V2_MM_ID_TIME:
-                                                       {
-                                                               timeStamp = tvb_get_ntohl(tvb, Offset);
-                                                               timeStamp = timeStamp << 16;
-                                                               timeStamp = timeStamp | tvb_get_ntohs(tvb, Offset+4);
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_currentTime_s, tvb,
-                                                                                       Offset, 6, FALSE);
-                                                               
-                                                               Offset +=6;
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_currentTime_ns, tvb,
-                                                                                       Offset, 4, FALSE);
-                                                               break;
-                                                       }
-                                                       case PTP_V2_MM_ID_CLOCK_ACCURACY:
-                                                       {
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_clockAccuracy, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
-                                                                       Offset+1, 1, FALSE);
-                                                               break;
-                                                       }
-                                                       case PTP_V2_MM_ID_UTC_PROPERTIES:
-                                                       {
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_currentUtcOffset, tvb,
-                                                                       Offset, 2, FALSE);
-                                                               Offset +=2;
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_LI_61, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_LI_59, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_UTCV, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               Offset +=1;
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               break;
-                                                       }
-                                                       case PTP_V2_MM_ID_TRACEABILITY_PROPERTIES:
-                                                       {
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_TTRA, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_FTRA, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               Offset +=1;
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
-                                                                       Offset, 1, FALSE);
-
-                                                               break;
-                                                       }
-                                                       case PTP_V2_MM_ID_TIMESCALE_PROPERTIES:
-                                                       {
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_PTP, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               Offset +=1;
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_timesource, tvb,
-                                                                       Offset, 1, FALSE);
-
-                                                               break;
-                                                       }
-                                                       case PTP_V2_MM_ID_UNICAST_NEGOTIATION_ENABLE:
-                                                       {
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_ucEN, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               Offset +=1;
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               break;
-                                                       }
-                                                       case PTP_V2_MM_ID_PATH_TRACE_LIST:
-                                                       {
-                                                               guint16 i = 0;
-                                                               /* one or more ClockIdentity */
-                                                               for (i = 1; i <= (tlv_length / 8); i++)
-                                                               {
-                                                                       proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_clockidentity, tvb,
-                                                                               Offset, 8, FALSE);
-                                                               }
-
-                                                               break;
-                                                       }
-                                                       case PTP_V2_MM_ID_PATH_TRACE_ENABLE:
-                                                       {
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_ptEN, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               Offset +=1;
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
-                                                                       Offset, 1, FALSE);
-
-                                                               break;
-                                                       }
-                                                       case PTP_V2_MM_ID_GRANDMASTER_CLUSTER_TABLE:
-                                                               {
-                                                               /* ToDo */
-                                                               break;
-                                                               }
-                                                       case PTP_V2_MM_ID_UNICAST_MASTER_TABLE:
-                                                               {
-                                                               /* ToDo */
-                                                               break;
-                                                               }
-                                                       case PTP_V2_MM_ID_UNICAST_MASTER_MAX_TABLE_SIZE:
-                                                               {
-                                                               /* ToDo */
-                                                               break;
-                                                               }
-                                                       case PTP_V2_MM_ID_ACCEPTABLE_MASTER_TABLE:
-                                                               {
-                                                               /* ToDo */
-                                                               break;
-                                                               }
-                                                       case PTP_V2_MM_ID_ACCEPTABLE_MASTER_TABLE_ENABLED:
-                                                               {
-                                                               /* ToDo */
-                                                               break;
-                                                               }
-                                                       case PTP_V2_MM_ID_ACCEPTABLE_MASTER_MAX_TABLE_SIZE:
-                                                               {
-                                                               /* ToDo */
-                                                               break;
-                                                               }
-                                                       case PTP_V2_MM_ID_ALTERNATE_TIME_OFFSET_ENABLE:
-                                                       {
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_keyField, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               Offset +=1;
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_atEN, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               Offset +=1;
-
-                                                               break;
-                                                       }
-                                                       case PTP_V2_MM_ID_ALTERNATE_TIME_OFFSET_NAME:
-                                                       {
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_keyField, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               Offset +=1;
-
-                                                               dissect_ptp_v2_text     (tvb, &Offset, ptp_managementData_tree,
-                                                                       hf_ptp_v2_mm_displayName, hf_ptp_v2_mm_displayName_length);
-
-                                                               /* Wenn Offset nicht gerade folgt noch ein pad Bit */
-                                                               if ( (Offset - PTP_V2_MM_TLV_DATAFIELD_OFFSET) % 2 )
-                                                               {
-                                                                       proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_pad, tvb,
-                                                                               Offset, 1, FALSE);
-                                                               }
-                                                               break;
-                                                       }
-                                                       case PTP_V2_MM_ID_ALTERNATE_TIME_OFFSET_MAX_KEY:
-                                                       {
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_maxKey, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               Offset +=1;
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
-                                                                       Offset, 1, FALSE);
-
-                                                               break;
-                                                       }
-                                                       case PTP_V2_MM_ID_ALTERNATE_MASTER:
-                                                       {
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_transmitAlternateMulticastSync, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               Offset +=1;
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_numberOfAlternateMasters, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               Offset +=1;
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_logAlternateMulticastSyncInterval, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               Offset +=1;
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               break;
-                                                       }
-                                                       case PTP_V2_MM_ID_ALTERNATE_TIME_OFFSET_PROPERTIES:
-                                                       {
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_keyField, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               Offset +=1;
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_currentOffset, tvb,
-                                                                       Offset, 4, FALSE);
-                                                               Offset +=4;
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_jumpSeconds, tvb,
-                                                                       Offset, 4, FALSE);
-                                                               Offset +=4;
-
-                                                               timeStamp = tvb_get_ntohl(tvb, Offset);
-                                                               timeStamp = timeStamp << 16;
-                                                               timeStamp = timeStamp | tvb_get_ntohs(tvb, Offset+4);
-
-                                                               proto_tree_add_text(ptp_managementData_tree, tvb, Offset, 6,
-                                                                       "Time of next jump (seconds): %" G_GINT64_MODIFIER "u", timeStamp);
-                                                               Offset +=6;
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               break;
-                                                       }
-                                                       case PTP_V2_MM_ID_TC_DEFAULT_DATA_SET:
-                                                       {
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_clockidentity, tvb,
-                                                                       Offset, 8, FALSE);
-                                                               Offset +=8;
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_numberPorts, tvb,
-                                                                       Offset, 2, FALSE);
-                                                               Offset +=2;
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_delayMechanism, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               Offset +=1;
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_primaryDomain, tvb,
-                                                                       Offset, 1, FALSE);
-
-                                                               break;
-                                                       }
-                                                       case PTP_V2_MM_ID_TC_PORT_DATA_SET:
-                                                       {
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_clockidentity, tvb,
-                                                                       Offset, 8, FALSE);
-                                                               Offset +=8;
-
-                                                       proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_PortNumber, tvb,
-                                                                       Offset, 2, FALSE);
-                                                               Offset +=2;
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_faultyFlag, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               Offset +=1;
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_logMinPdelayReqInterval, tvb,
-                                                                       Offset, 1, FALSE);
-                                                               Offset +=1;
-
-                                                               dissect_ptp_v2_timeInterval(tvb, &Offset, ptp_managementData_tree,
-                                                                       "Peer mean path delay", hf_ptp_v2_mm_peerMeanPathDelay_ns, hf_ptp_v2_mm_peerMeanPathDelay_subns);
-                                                               break;
-                                                       }
-                                                       case PTP_V2_MM_ID_PRIMARY_DOMAIN:
-                                                       {
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_primaryDomain, tvb,
-                                                                       Offset, 1, FALSE);
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
-                                                                       Offset+1, 1, FALSE);
-                                                               break;
-                                                       }
-                                                       case PTP_V2_MM_ID_DELAY_MECHANISM:
-                                                       {
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_delayMechanism, tvb,
-                                                                       Offset, 1, FALSE);
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
-                                                                       Offset+1, 1, FALSE);
-                                                               break;
-                                                       }
-                                                       case PTP_V2_MM_ID_LOG_MIN_PDELAY_REQ_INTERVAL:
-                                                       {
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_logMinPdelayReqInterval, tvb,
-                                                                       Offset, 1, FALSE);
-
-                                                               proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
-                                                                       Offset+1, 1, FALSE);
-                                                               break;
-                                                       }
-                                                       default:
-                                                       {
-                                                               /* no data */
-                                                               break;
-                                                       }
-                                               } /* switch(ptp_v2_managementId) */
-                                               break;
-                                       }
-                                       case PTP_V2_TLV_TYPE_MANAGEMENT_ERROR_STATUS:
-                                       {
-                                               /* there is only one error TLV */
-                                               guint16 Offset = PTP_V2_MM_TLV_MANAGEMENTERRORID_OFFSET;
-
-                                               proto_tree_add_item(ptp_tree, hf_ptp_v2_mm_managementErrorId, tvb,
-                                               Offset, 2, FALSE);
-                                               Offset +=2;
-
-                                               proto_tree_add_item(ptp_tree, hf_ptp_v2_mm_managementId, tvb,
-                                               Offset, 2, FALSE);
-                                               Offset +=2;
-
-                                               proto_tree_add_item(ptp_tree, hf_ptp_v2_mm_reserved, tvb,
-                                                       Offset, 4, FALSE);
-                                               Offset +=4;
-
-                                               /* optional Field! */
-                                               if (Offset - PTP_V2_MM_TLV_MANAGEMENTERRORID_OFFSET + 2 < tlv_length)
-                                               {
-                                                       dissect_ptp_v2_text     (tvb, &Offset, ptp_tree,
-                                                               hf_ptp_v2_mm_displayData, hf_ptp_v2_mm_displayData_length);
-                                               }
-
-                                               /* Wenn Offset nicht gerade folgt noch ein pad Bit */
-                                               if ( (Offset - PTP_V2_MM_TLV_MANAGEMENTERRORID_OFFSET) % 2 )
-                                               {
-                                                       proto_tree_add_item(ptp_tree, hf_ptp_v2_mm_pad, tvb,
-                                                               Offset, 1, FALSE);
-                                               }
-                                               break;
-                                       }
-                                       default:
-                                       {
-                                               break;
-                                       }
-                               } /* switch TLV Type */
-                       } /* case Management Message */
+                        switch(ptp_v2_managementId) {
+                            case PTP_V2_MM_ID_NULL_MANAGEMENT:
+                            {
+                                /* no data in NULL management */
+                                break;
+                            }
+                            case PTP_V2_MM_ID_CLOCK_DESCRIPTION:
+                            {
+                                guint16 N = 0, S = 0;
+                                clockType_ti = proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_clockType, tvb,
+                                    Offset, 2, FALSE);
+
+                                ptp_clockType_tree = proto_item_add_subtree(clockType_ti, ett_ptp_v2_clockType);
+                                    /* ClockType Subtree */
+                                    proto_tree_add_item(ptp_clockType_tree, hf_ptp_v2_mm_clockType_ordinaryClock, tvb,
+                                        Offset, 2, FALSE);
+
+                                    proto_tree_add_item(ptp_clockType_tree, hf_ptp_v2_mm_clockType_boundaryClock, tvb,
+                                        Offset, 2, FALSE);
+
+                                    proto_tree_add_item(ptp_clockType_tree, hf_ptp_v2_mm_clockType_p2p_transparentClock, tvb,
+                                        Offset, 2, FALSE);
+
+                                    proto_tree_add_item(ptp_clockType_tree, hf_ptp_v2_mm_clockType_e2e_transparentClock, tvb,
+                                        Offset, 2, FALSE);
+
+                                    proto_tree_add_item(ptp_clockType_tree, hf_ptp_v2_mm_clockType_managementNode, tvb,
+                                        Offset, 2, FALSE);
+
+                                    proto_tree_add_item(ptp_clockType_tree, hf_ptp_v2_mm_clockType_reserved, tvb,
+                                        Offset, 2, FALSE);
+                                Offset +=2;
+
+                                dissect_ptp_v2_text (tvb, &Offset, ptp_managementData_tree,
+                                                     hf_ptp_v2_mm_physicalLayerProtocol, hf_ptp_v2_mm_physicalLayerProtocol_length);
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_physicalAddressLength, tvb,
+                                    Offset, 2, FALSE);
+
+                                S = tvb_get_ntohs (tvb, Offset);
+                                Offset +=2;
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_physicalAddress, tvb,
+                                    Offset, S, FALSE);
+                                Offset += S;
+
+                                N = tvb_get_ntohs (tvb, Offset+2);
+
+                                protocolAddress_ti = proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_protocolAddress, tvb,
+                                    Offset+4, N, FALSE);
+
+                                ptp_protocolAddress_tree = proto_item_add_subtree(protocolAddress_ti, ett_ptp_v2_protocolAddress);
+                                    /* physicalLayerProtocol subtree */
+                                    proto_tree_add_item(ptp_protocolAddress_tree, hf_ptp_v2_mm_protocolAddress_networkProtocol, tvb,
+                                        Offset, 2, FALSE);
+
+                                    proto_tree_add_item(ptp_protocolAddress_tree, hf_ptp_v2_mm_protocolAddress_length, tvb,
+                                        Offset+2, 2, FALSE);
+
+                                    proto_tree_add_item(ptp_protocolAddress_tree, hf_ptp_v2_mm_protocolAddress, tvb,
+                                        Offset+4, N, FALSE);
+                                N = N + 4;
+                                Offset += N;
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_manufacturerIdentity, tvb,
+                                    Offset, 3, FALSE);
+
+                                Offset += 3;
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
+                                    Offset, 1, FALSE);
+                                Offset += 1;
+
+                                dissect_ptp_v2_text (tvb, &Offset, ptp_managementData_tree,
+                                                     hf_ptp_v2_mm_productDescription, hf_ptp_v2_mm_productDescription_length);
+                                dissect_ptp_v2_text (tvb, &Offset, ptp_managementData_tree,
+                                                     hf_ptp_v2_mm_revisionData, hf_ptp_v2_mm_revisionData_length);
+                                dissect_ptp_v2_text (tvb, &Offset, ptp_managementData_tree,
+                                                     hf_ptp_v2_mm_userDescription, hf_ptp_v2_mm_userDescription_length);
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_profileIdentity, tvb,
+                                    Offset, 6, FALSE);
+                                Offset += 6;
+
+                                /* Wenn Offset nicht gerade folgt noch ein pad Bit */
+                                if ( (Offset - PTP_V2_MM_TLV_DATAFIELD_OFFSET) % 2 )
+                                {
+                                    proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_pad, tvb,
+                                    Offset, 1, FALSE);
+                                }
+                                break;
+                            }
+                            case PTP_V2_MM_ID_USER_DESCRIPTION:
+                            {
+
+                                dissect_ptp_v2_text (tvb, &Offset, ptp_managementData_tree,
+                                                     hf_ptp_v2_mm_userDescription, hf_ptp_v2_mm_userDescription_length);
+
+                                /* Wenn Offset nicht gerade folgt noch ein pad Bit */
+                                if ( (Offset - PTP_V2_MM_TLV_DATAFIELD_OFFSET) % 2 )
+                                {
+                                    proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_pad, tvb,
+                                    Offset, 1, FALSE);
+                                }
+                                break;
+                            }
+                            case PTP_V2_MM_ID_SAVE_IN_NON_VOLATILE_STORAGE:
+                            {
+                                /* no data */
+                                break;
+                            }
+                            case PTP_V2_MM_ID_RESET_NON_VOLATILE_STORAGE:
+                            {
+                                /* no data */
+                                break;
+                            }
+                            case PTP_V2_MM_ID_INITIALIZE:
+                            {
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_initializationKey, tvb,
+                                    Offset, 2, FALSE);
+                                break;
+                            }
+                            case PTP_V2_MM_ID_FAULT_LOG:
+                            {
+                                guint16 i, num = 0;
+                                proto_item  *ptpError_ti;
+                                proto_tree  *ptpError_subtree;
+
+                                num = tvb_get_ntohs (tvb, Offset);
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_numberOfFaultRecords, tvb,
+                                    Offset, 2, FALSE);
+                                Offset +=2;
+
+                                for (i = 1; i <= num; i++)
+                                {
+                                    ptpError_ti = proto_tree_add_text(ptp_managementData_tree, tvb, Offset, tvb_get_ntohs (tvb, Offset), "Fault record");
+
+                                    /*  (subtree)*/
+                                    ptpError_subtree = proto_item_add_subtree(ptpError_ti, ett_ptp_v2_faultRecord);
+
+                                    proto_tree_add_item(ptpError_subtree, hf_ptp_v2_mm_faultRecordLength, tvb,
+                                        Offset, 2, FALSE);
+                                    Offset +=2;
+
+                                    timeStamp = tvb_get_ntohl(tvb, Offset);
+                                    timeStamp = timeStamp << 16;
+                                    timeStamp = timeStamp | tvb_get_ntohs(tvb, Offset+4);
+
+                                    proto_tree_add_item(ptpError_subtree, hf_ptp_v2_mm_faultTime_s, tvb,
+                                                Offset, 6, FALSE);
+
+                                    Offset +=6;
+                                    proto_tree_add_item(ptpError_subtree, hf_ptp_v2_mm_faultTime_ns, tvb,
+                                                Offset, 4, FALSE);
+                                    Offset +=4;
+                                    proto_tree_add_item(ptpError_subtree, hf_ptp_v2_mm_severityCode, tvb,
+                                                Offset, 1, FALSE);
+                                    Offset +=1;
+
+                                    dissect_ptp_v2_text (tvb, &Offset, ptpError_subtree,
+                                                         hf_ptp_v2_mm_faultName, hf_ptp_v2_mm_faultName_length);
+
+                                    dissect_ptp_v2_text (tvb, &Offset, ptpError_subtree,
+                                                         hf_ptp_v2_mm_faultValue, hf_ptp_v2_mm_faultValue_length);
+
+                                    dissect_ptp_v2_text (tvb, &Offset, ptpError_subtree,
+                                                         hf_ptp_v2_mm_faultDescription, hf_ptp_v2_mm_faultDescription_length);
+                                }
+
+                                /* Wenn Offset nicht gerade folgt noch ein pad Bit */
+                                if ( (Offset - PTP_V2_MM_TLV_DATAFIELD_OFFSET) % 2 )
+                                {
+                                    proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_pad, tvb,
+                                        Offset, 1, FALSE);
+                                }
+                                break;
+                            }
+                            case PTP_V2_MM_ID_FAULT_LOG_RESET:
+                            {
+                                /* no data */
+                                break;
+                            }
+                            case PTP_V2_MM_ID_DEFAULT_DATA_SET:
+                            {
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_TSC, tvb,
+                                    PTP_V2_MM_TLV_DATAFIELD_OFFSET, 1, FALSE);
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_dds_SO, tvb,
+                                    PTP_V2_MM_TLV_DATAFIELD_OFFSET, 1, FALSE);
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
+                                    PTP_V2_MM_RESERVED1, 1, FALSE);
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_numberPorts, tvb,
+                                    PTP_V2_MM_NUMBERPORTS, 2, FALSE);
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_priority1, tvb,
+                                    PTP_V2_MM_PRIORITY1, 1, FALSE);
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_clockclass, tvb,
+                                    PTP_V2_MM_CLOCKQUALITY, 1, FALSE);
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_clockaccuracy, tvb,
+                                    PTP_V2_MM_CLOCKQUALITY+1, 1, FALSE);
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_clockvariance, tvb,
+                                    PTP_V2_MM_CLOCKQUALITY+2, 2, FALSE);
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_priority2, tvb,
+                                    PTP_V2_MM_PRIORITY2, 1, FALSE);
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_clockidentity, tvb,
+                                    PTP_V2_MM_CLOCKIDENTITY, 8, FALSE);
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_domainNumber, tvb,
+                                    PTP_V2_MM_DOMAINNUMBER, 1, FALSE);
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
+                                    PTP_V2_MM_RESERVED2, 1, FALSE);
+                                break;
+                            }
+                            case PTP_V2_MM_ID_CURRENT_DATA_SET:
+                            {
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_stepsRemoved, tvb,
+                                    Offset, 2, FALSE);
+                                Offset +=2;
+
+                                dissect_ptp_v2_timeInterval(tvb, &Offset, ptp_managementData_tree,
+                                    "Offset from Master", hf_ptp_v2_mm_offset_ns, hf_ptp_v2_mm_offset_subns);
+                                dissect_ptp_v2_timeInterval(tvb, &Offset, ptp_managementData_tree,
+                                    "Mean path delay", hf_ptp_v2_mm_pathDelay_ns, hf_ptp_v2_mm_pathDelay_subns);
+                                break;
+                            }
+                            case PTP_V2_MM_ID_PARENT_DATA_SET:
+                            {
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_parentIdentity, tvb,
+                                    Offset, 8, FALSE);
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_parentPort, tvb,
+                                    Offset+8, 2, FALSE);
+                                Offset +=10;
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_parentStats, tvb,
+                                    Offset, 1, FALSE);
+                                Offset +=1;
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
+                                    Offset, 1, FALSE);
+                                Offset +=1;
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_observedParentOffsetScaledLogVariance, tvb,
+                                    Offset, 2, FALSE);
+                                Offset +=2;
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_observedParentClockPhaseChangeRate, tvb,
+                                    Offset, 4, FALSE);
+                                Offset +=4;
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_grandmasterPriority1, tvb,
+                                    Offset, 1, FALSE);
+                                Offset +=1;
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_grandmasterclockclass, tvb,
+                                    Offset, 1, FALSE);
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_grandmasterclockaccuracy, tvb,
+                                    Offset+1, 1, FALSE);
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_grandmasterclockvariance, tvb,
+                                    Offset+2, 2, FALSE);
+                                Offset += 4;
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_grandmasterPriority2, tvb,
+                                    Offset, 1, FALSE);
+                                Offset +=1;
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_grandmasterIdentity, tvb,
+                                    Offset, 8, FALSE);
+
+                                break;
+                            }
+                            case PTP_V2_MM_ID_TIME_PROPERTIES_DATA_SET:
+                            {
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_currentUtcOffset, tvb,
+                                    Offset, 2, FALSE);
+                                Offset +=2;
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_LI_61, tvb,
+                                    Offset, 1, FALSE);
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_LI_59, tvb,
+                                    Offset, 1, FALSE);
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_UTCV, tvb,
+                                    Offset, 1, FALSE);
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_PTP, tvb,
+                                    Offset, 1, FALSE);
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_TTRA, tvb,
+                                    Offset, 1, FALSE);
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_FTRA, tvb,
+                                    Offset, 1, FALSE);
+                                Offset +=1;
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_timesource, tvb,
+                                    Offset, 1, FALSE);
+
+                                break;
+                            }
+                            case PTP_V2_MM_ID_PORT_DATA_SET:
+                            {
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_clockidentity, tvb,
+                                    Offset, 8, FALSE);
+                                Offset +=8;
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_PortNumber, tvb,
+                                    Offset, 2, FALSE);
+                                Offset +=2;
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_portState, tvb,
+                                    Offset, 1, FALSE);
+                                Offset +=1;
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_logMinDelayReqInterval, tvb,
+                                    Offset, 1, FALSE);
+                                Offset +=1;
+
+                                dissect_ptp_v2_timeInterval(tvb, &Offset, ptp_managementData_tree,
+                                    "Peer mean path delay", hf_ptp_v2_mm_peerMeanPathDelay_ns, hf_ptp_v2_mm_peerMeanPathDelay_subns);
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_logAnnounceInterval, tvb,
+                                    Offset, 1, FALSE);
+                                Offset +=1;
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_announceReceiptTimeout, tvb,
+                                    Offset, 1, FALSE);
+                                Offset +=1;
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_logSyncInterval, tvb,
+                                    Offset, 1, FALSE);
+                                Offset +=1;
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_delayMechanism, tvb,
+                                    Offset, 1, FALSE);
+                                Offset +=1;
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_logMinPdelayReqInterval, tvb,
+                                    Offset, 1, FALSE);
+                                Offset +=1;
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_versionNumber, tvb,
+                                    Offset, 1, FALSE);
+                                Offset +=1;
+
+                                break;
+                            }
+                            case PTP_V2_MM_ID_PRIORITY1:
+                            {
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_priority1, tvb,
+                                    Offset, 1, FALSE);
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
+                                    Offset+1, 1, FALSE);
+                                break;
+                            }
+                            case PTP_V2_MM_ID_PRIORITY2:
+                            {
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_priority2, tvb,
+                                    Offset, 1, FALSE);
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
+                                    Offset+1, 1, FALSE);
+                                break;
+                            }
+                            case PTP_V2_MM_ID_DOMAIN:
+                            {
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_domainNumber, tvb,
+                                    Offset, 1, FALSE);
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
+                                    Offset+1, 1, FALSE);
+                                break;
+                            }
+                            case PTP_V2_MM_ID_SLAVE_ONLY:
+                            {
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_SO, tvb,
+                                    Offset, 1, FALSE);
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
+                                    Offset+1, 1, FALSE);
+                                break;
+                            }
+                            case PTP_V2_MM_ID_LOG_ANNOUNCE_INTERVAL:
+                            {
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_logAnnounceInterval, tvb,
+                                    Offset, 1, FALSE);
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
+                                    Offset+1, 1, FALSE);
+                                break;
+                            }
+                            case PTP_V2_MM_ID_ANNOUNCE_RECEIPT_TIMEOUT:
+                            {
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_announceReceiptTimeout, tvb,
+                                    Offset, 1, FALSE);
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
+                                    Offset+1, 1, FALSE);
+                                break;
+                            }
+                            case PTP_V2_MM_ID_LOG_SYNC_INTERVAL:
+                            {
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_logSyncInterval, tvb,
+                                    Offset, 1, FALSE);
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
+                                    Offset+1, 1, FALSE);
+                                break;
+                            }
+                            case PTP_V2_MM_ID_VERSION_NUMBER:
+                            {
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_versionNumber, tvb,
+                                    Offset, 1, FALSE);
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
+                                    Offset+1, 1, FALSE);
+                                break;
+                            }
+                            case PTP_V2_MM_ID_ENABLE_PORT:
+                            {
+                                /* no data */
+                                break;
+                            }
+                            case PTP_V2_MM_ID_DISABLE_PORT:
+                            {
+                                /* no data */
+                                break;
+                            }
+                            case PTP_V2_MM_ID_TIME:
+                            {
+                                timeStamp = tvb_get_ntohl(tvb, Offset);
+                                timeStamp = timeStamp << 16;
+                                timeStamp = timeStamp | tvb_get_ntohs(tvb, Offset+4);
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_currentTime_s, tvb,
+                                            Offset, 6, FALSE);
+                                
+                                Offset +=6;
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_currentTime_ns, tvb,
+                                            Offset, 4, FALSE);
+                                break;
+                            }
+                            case PTP_V2_MM_ID_CLOCK_ACCURACY:
+                            {
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_clockAccuracy, tvb,
+                                    Offset, 1, FALSE);
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
+                                    Offset+1, 1, FALSE);
+                                break;
+                            }
+                            case PTP_V2_MM_ID_UTC_PROPERTIES:
+                            {
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_currentUtcOffset, tvb,
+                                    Offset, 2, FALSE);
+                                Offset +=2;
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_LI_61, tvb,
+                                    Offset, 1, FALSE);
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_LI_59, tvb,
+                                    Offset, 1, FALSE);
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_UTCV, tvb,
+                                    Offset, 1, FALSE);
+                                Offset +=1;
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
+                                    Offset, 1, FALSE);
+                                break;
+                            }
+                            case PTP_V2_MM_ID_TRACEABILITY_PROPERTIES:
+                            {
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_TTRA, tvb,
+                                    Offset, 1, FALSE);
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_FTRA, tvb,
+                                    Offset, 1, FALSE);
+                                Offset +=1;
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
+                                    Offset, 1, FALSE);
+
+                                break;
+                            }
+                            case PTP_V2_MM_ID_TIMESCALE_PROPERTIES:
+                            {
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_PTP, tvb,
+                                    Offset, 1, FALSE);
+                                Offset +=1;
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_timesource, tvb,
+                                    Offset, 1, FALSE);
+
+                                break;
+                            }
+                            case PTP_V2_MM_ID_UNICAST_NEGOTIATION_ENABLE:
+                            {
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_ucEN, tvb,
+                                    Offset, 1, FALSE);
+                                Offset +=1;
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
+                                    Offset, 1, FALSE);
+                                break;
+                            }
+                            case PTP_V2_MM_ID_PATH_TRACE_LIST:
+                            {
+                                guint16 i = 0;
+                                /* one or more ClockIdentity */
+                                for (i = 1; i <= (tlv_length / 8); i++)
+                                {
+                                    proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_clockidentity, tvb,
+                                        Offset, 8, FALSE);
+                                }
+
+                                break;
+                            }
+                            case PTP_V2_MM_ID_PATH_TRACE_ENABLE:
+                            {
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_ptEN, tvb,
+                                    Offset, 1, FALSE);
+                                Offset +=1;
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
+                                    Offset, 1, FALSE);
+
+                                break;
+                            }
+                            case PTP_V2_MM_ID_GRANDMASTER_CLUSTER_TABLE:
+                                {
+                                /* ToDo */
+                                break;
+                                }
+                            case PTP_V2_MM_ID_UNICAST_MASTER_TABLE:
+                                {
+                                /* ToDo */
+                                break;
+                                }
+                            case PTP_V2_MM_ID_UNICAST_MASTER_MAX_TABLE_SIZE:
+                                {
+                                /* ToDo */
+                                break;
+                                }
+                            case PTP_V2_MM_ID_ACCEPTABLE_MASTER_TABLE:
+                                {
+                                /* ToDo */
+                                break;
+                                }
+                            case PTP_V2_MM_ID_ACCEPTABLE_MASTER_TABLE_ENABLED:
+                                {
+                                /* ToDo */
+                                break;
+                                }
+                            case PTP_V2_MM_ID_ACCEPTABLE_MASTER_MAX_TABLE_SIZE:
+                                {
+                                /* ToDo */
+                                break;
+                                }
+                            case PTP_V2_MM_ID_ALTERNATE_TIME_OFFSET_ENABLE:
+                            {
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_keyField, tvb,
+                                    Offset, 1, FALSE);
+                                Offset +=1;
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_atEN, tvb,
+                                    Offset, 1, FALSE);
+                                Offset +=1;
+
+                                break;
+                            }
+                            case PTP_V2_MM_ID_ALTERNATE_TIME_OFFSET_NAME:
+                            {
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_keyField, tvb,
+                                    Offset, 1, FALSE);
+                                Offset +=1;
+
+                                dissect_ptp_v2_text (tvb, &Offset, ptp_managementData_tree,
+                                    hf_ptp_v2_mm_displayName, hf_ptp_v2_mm_displayName_length);
+
+                                /* Wenn Offset nicht gerade folgt noch ein pad Bit */
+                                if ( (Offset - PTP_V2_MM_TLV_DATAFIELD_OFFSET) % 2 )
+                                {
+                                    proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_pad, tvb,
+                                        Offset, 1, FALSE);
+                                }
+                                break;
+                            }
+                            case PTP_V2_MM_ID_ALTERNATE_TIME_OFFSET_MAX_KEY:
+                            {
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_maxKey, tvb,
+                                    Offset, 1, FALSE);
+                                Offset +=1;
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
+                                    Offset, 1, FALSE);
+
+                                break;
+                            }
+                            case PTP_V2_MM_ID_ALTERNATE_MASTER:
+                            {
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_transmitAlternateMulticastSync, tvb,
+                                    Offset, 1, FALSE);
+                                Offset +=1;
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_numberOfAlternateMasters, tvb,
+                                    Offset, 1, FALSE);
+                                Offset +=1;
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_logAlternateMulticastSyncInterval, tvb,
+                                    Offset, 1, FALSE);
+                                Offset +=1;
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
+                                    Offset, 1, FALSE);
+                                break;
+                            }
+                            case PTP_V2_MM_ID_ALTERNATE_TIME_OFFSET_PROPERTIES:
+                            {
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_keyField, tvb,
+                                    Offset, 1, FALSE);
+                                Offset +=1;
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_currentOffset, tvb,
+                                    Offset, 4, FALSE);
+                                Offset +=4;
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_jumpSeconds, tvb,
+                                    Offset, 4, FALSE);
+                                Offset +=4;
+
+                                timeStamp = tvb_get_ntohl(tvb, Offset);
+                                timeStamp = timeStamp << 16;
+                                timeStamp = timeStamp | tvb_get_ntohs(tvb, Offset+4);
+
+                                proto_tree_add_text(ptp_managementData_tree, tvb, Offset, 6,
+                                    "Time of next jump (seconds): %" G_GINT64_MODIFIER "u", timeStamp);
+                                Offset +=6;
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
+                                    Offset, 1, FALSE);
+                                break;
+                            }
+                            case PTP_V2_MM_ID_TC_DEFAULT_DATA_SET:
+                            {
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_clockidentity, tvb,
+                                    Offset, 8, FALSE);
+                                Offset +=8;
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_numberPorts, tvb,
+                                    Offset, 2, FALSE);
+                                Offset +=2;
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_delayMechanism, tvb,
+                                    Offset, 1, FALSE);
+                                Offset +=1;
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_primaryDomain, tvb,
+                                    Offset, 1, FALSE);
+
+                                break;
+                            }
+                            case PTP_V2_MM_ID_TC_PORT_DATA_SET:
+                            {
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_clockidentity, tvb,
+                                    Offset, 8, FALSE);
+                                Offset +=8;
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_PortNumber, tvb,
+                                    Offset, 2, FALSE);
+                                Offset +=2;
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_faultyFlag, tvb,
+                                    Offset, 1, FALSE);
+                                Offset +=1;
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_logMinPdelayReqInterval, tvb,
+                                    Offset, 1, FALSE);
+                                Offset +=1;
+
+                                dissect_ptp_v2_timeInterval(tvb, &Offset, ptp_managementData_tree,
+                                    "Peer mean path delay", hf_ptp_v2_mm_peerMeanPathDelay_ns, hf_ptp_v2_mm_peerMeanPathDelay_subns);
+                                break;
+                            }
+                            case PTP_V2_MM_ID_PRIMARY_DOMAIN:
+                            {
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_primaryDomain, tvb,
+                                    Offset, 1, FALSE);
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
+                                    Offset+1, 1, FALSE);
+                                break;
+                            }
+                            case PTP_V2_MM_ID_DELAY_MECHANISM:
+                            {
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_delayMechanism, tvb,
+                                    Offset, 1, FALSE);
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
+                                    Offset+1, 1, FALSE);
+                                break;
+                            }
+                            case PTP_V2_MM_ID_LOG_MIN_PDELAY_REQ_INTERVAL:
+                            {
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_logMinPdelayReqInterval, tvb,
+                                    Offset, 1, FALSE);
+
+                                proto_tree_add_item(ptp_managementData_tree, hf_ptp_v2_mm_reserved, tvb,
+                                    Offset+1, 1, FALSE);
+                                break;
+                            }
+                            default:
+                            {
+                                /* no data */
+                                break;
+                            }
+                        } /* switch(ptp_v2_managementId) */
+                        break;
+                    }
+                    case PTP_V2_TLV_TYPE_MANAGEMENT_ERROR_STATUS:
+                    {
+                        /* there is only one error TLV */
+                        guint16 Offset = PTP_V2_MM_TLV_MANAGEMENTERRORID_OFFSET;
+
+                        proto_tree_add_item(ptp_tree, hf_ptp_v2_mm_managementErrorId, tvb,
+                            Offset, 2, FALSE);
+                        Offset +=2;
+
+                        proto_tree_add_item(ptp_tree, hf_ptp_v2_mm_managementId, tvb,
+                            Offset, 2, FALSE);
+                        Offset +=2;
+
+                        proto_tree_add_item(ptp_tree, hf_ptp_v2_mm_reserved, tvb,
+                            Offset, 4, FALSE);
+                        Offset +=4;
+
+                        /* optional Field! */
+                        if (Offset - PTP_V2_MM_TLV_MANAGEMENTERRORID_OFFSET + 2 < tlv_length)
+                        {
+                            dissect_ptp_v2_text (tvb, &Offset, ptp_tree,
+                                hf_ptp_v2_mm_displayData, hf_ptp_v2_mm_displayData_length);
+                        }
+
+                        /* Wenn Offset nicht gerade folgt noch ein pad Bit */
+                        if ( (Offset - PTP_V2_MM_TLV_MANAGEMENTERRORID_OFFSET) % 2 )
+                        {
+                            proto_tree_add_item(ptp_tree, hf_ptp_v2_mm_pad, tvb,
+                                Offset, 1, FALSE);
+                        }
+                        break;
+                    }
+                    default:
+                    {
+                        break;
+                    }
+                } /* switch TLV Type */
+            } /* case Management Message */
         } /* switch message ID*/
-   } /* tree */
+    } /* tree */
 }
 
 
@@ -3438,92 +3441,92 @@ dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 void
 proto_register_ptp(void)
 {
-       static hf_register_info hf[] = {
+    static hf_register_info hf[] = {
         /* PTPv1 fields **********************************************************/
         /*Common fields for all frames*/
         { &hf_ptp_versionptp,
-            { "versionPTP",           "ptp.versionptp",
+          { "versionPTP",           "ptp.versionptp",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_versionnetwork,
-            { "versionNetwork",           "ptp.versionnetwork",
+          { "versionNetwork",           "ptp.versionnetwork",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_subdomain,
-            { "subdomain",           "ptp.subdomain",
+          { "subdomain",           "ptp.subdomain",
             FT_STRING, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_messagetype,
-            { "messageType",           "ptp.messagetype",
+          { "messageType",           "ptp.messagetype",
             FT_UINT8, BASE_DEC, VALS(ptp_messagetype_vals), 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_sourcecommunicationtechnology,
-            { "sourceCommunicationTechnology",           "ptp.sourcecommunicationtechnology",
+          { "sourceCommunicationTechnology",           "ptp.sourcecommunicationtechnology",
             FT_UINT8, BASE_DEC, VALS(ptp_communicationid_vals), 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_sourceuuid,
-            { "sourceUuid",           "ptp.sourceuuid",
+          { "sourceUuid",           "ptp.sourceuuid",
             FT_ETHER, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_sourceportid,
-            { "sourcePortId",           "ptp.sourceportid",
+          { "sourcePortId",           "ptp.sourceportid",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_sequenceid,
-            { "sequenceId",           "ptp.sequenceid",
+          { "sequenceId",           "ptp.sequenceid",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_control,
-            { "control",           "ptp.control",
+          { "control",           "ptp.control",
             FT_UINT8, BASE_DEC, VALS(ptp_control_vals), 0x00,
             NULL, HFILL }
         },
         /*THE FLAGS-FIELD*/
         { &hf_ptp_flags,
-            { "flags",           "ptp.flags",
+          { "flags",           "ptp.flags",
             FT_UINT16, BASE_HEX, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_flags_li61,
-            { "PTP_LI61",           "ptp.flags.li61",
+          { "PTP_LI61",           "ptp.flags.li61",
             FT_UINT16, BASE_DEC, VALS(ptp_bool_vals), PTP_FLAGS_LI61_BITMASK,
             NULL, HFILL }
         },
         { &hf_ptp_flags_li59,
-            { "PTP_LI59",           "ptp.flags.li59",
+          { "PTP_LI59",           "ptp.flags.li59",
             FT_UINT16, BASE_DEC, VALS(ptp_bool_vals), PTP_FLAGS_LI59_BITMASK,
             NULL, HFILL }
         },
         { &hf_ptp_flags_boundary_clock,
-            { "PTP_BOUNDARY_CLOCK",           "ptp.flags.boundary_clock",
+          { "PTP_BOUNDARY_CLOCK",           "ptp.flags.boundary_clock",
             FT_UINT16, BASE_DEC, VALS(ptp_bool_vals), PTP_FLAGS_BOUNDARY_CLOCK_BITMASK,
             NULL, HFILL }
         },
         { &hf_ptp_flags_assist,
-            { "PTP_ASSIST",           "ptp.flags.assist",
+          { "PTP_ASSIST",           "ptp.flags.assist",
             FT_UINT16, BASE_DEC, VALS(ptp_bool_vals), PTP_FLAGS_ASSIST_BITMASK,
             NULL, HFILL }
         },
         { &hf_ptp_flags_ext_sync,
-            { "PTP_EXT_SYNC",           "ptp.flags.ext_sync",
+          { "PTP_EXT_SYNC",           "ptp.flags.ext_sync",
             FT_UINT16, BASE_DEC, VALS(ptp_bool_vals), PTP_FLAGS_EXT_SYNC_BITMASK,
             NULL, HFILL }
         },
         { &hf_ptp_flags_parent,
-            { "PTP_PARENT_STATS",           "ptp.flags.parent_stats",
+          { "PTP_PARENT_STATS",           "ptp.flags.parent_stats",
             FT_UINT16, BASE_DEC, VALS(ptp_bool_vals), PTP_FLAGS_PARENT_STATS_BITMASK,
             NULL, HFILL }
         },
         { &hf_ptp_flags_sync_burst,
-            { "PTP_SYNC_BURST",           "ptp.flags.sync_burst",
+          { "PTP_SYNC_BURST",           "ptp.flags.sync_burst",
             FT_UINT16, BASE_DEC, VALS(ptp_bool_vals), PTP_FLAGS_SYNC_BURST_BITMASK,
             NULL, HFILL }
         },
@@ -3531,692 +3534,692 @@ proto_register_ptp(void)
 
         /*offsets for ptp_sync and delay_req (=sdr) messages*/
         { &hf_ptp_sdr_origintimestamp,
-            { "originTimestamp",           "ptp.sdr.origintimestamp",
+          { "originTimestamp",           "ptp.sdr.origintimestamp",
             FT_RELATIVE_TIME, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_sdr_origintimestamp_seconds,
-            { "originTimestamp (seconds)",           "ptp.sdr.origintimestamp_seconds",
+          { "originTimestamp (seconds)",           "ptp.sdr.origintimestamp_seconds",
             FT_UINT32, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_sdr_origintimestamp_nanoseconds,
-            { "originTimestamp (nanoseconds)",           "ptp.sdr.origintimestamp_nanoseconds",
+          { "originTimestamp (nanoseconds)",           "ptp.sdr.origintimestamp_nanoseconds",
             FT_INT32, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_sdr_epochnumber,
-            { "epochNumber",           "ptp.sdr.epochnumber",
+          { "epochNumber",           "ptp.sdr.epochnumber",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_sdr_currentutcoffset,
-            { "currentUTCOffset",           "ptp.sdr.currentutcoffset",
+          { "currentUTCOffset",           "ptp.sdr.currentutcoffset",
             FT_INT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_sdr_grandmastercommunicationtechnology,
-            { "grandmasterCommunicationTechnology",           "ptp.sdr.grandmastercommunicationtechnology",
+          { "grandmasterCommunicationTechnology",           "ptp.sdr.grandmastercommunicationtechnology",
             FT_UINT8, BASE_DEC, VALS(ptp_communicationid_vals), 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_sdr_grandmasterclockuuid,
-            { "grandMasterClockUuid",           "ptp.sdr.grandmasterclockuuid",
+          { "grandMasterClockUuid",           "ptp.sdr.grandmasterclockuuid",
             FT_ETHER, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_sdr_grandmasterportid,
-            { "grandmasterPortId",           "ptp.sdr.grandmasterportid",
+          { "grandmasterPortId",           "ptp.sdr.grandmasterportid",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_sdr_grandmastersequenceid,
-            { "grandmasterSequenceId",           "ptp.sdr.grandmastersequenceid",
+          { "grandmasterSequenceId",           "ptp.sdr.grandmastersequenceid",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_sdr_grandmasterclockstratum,
-            { "grandmasterClockStratum",           "ptp.sdr.grandmasterclockstratum",
+          { "grandmasterClockStratum",           "ptp.sdr.grandmasterclockstratum",
             FT_UINT8, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_sdr_grandmasterclockidentifier,
-            { "grandmasterClockIdentifier",           "ptp.sdr.grandmasterclockidentifier",
+          { "grandmasterClockIdentifier",           "ptp.sdr.grandmasterclockidentifier",
             FT_STRING, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_sdr_grandmasterclockvariance,
-            { "grandmasterClockVariance",           "ptp.sdr.grandmasterclockvariance",
+          { "grandmasterClockVariance",           "ptp.sdr.grandmasterclockvariance",
             FT_INT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_sdr_grandmasterpreferred,
-            { "grandmasterPreferred",           "ptp.sdr.grandmasterpreferred",
+          { "grandmasterPreferred",           "ptp.sdr.grandmasterpreferred",
             FT_UINT8, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_sdr_grandmasterisboundaryclock,
-            { "grandmasterIsBoundaryClock",           "ptp.sdr.grandmasterisboundaryclock",
+          { "grandmasterIsBoundaryClock",           "ptp.sdr.grandmasterisboundaryclock",
             FT_UINT8, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_sdr_syncinterval,
-            { "syncInterval",           "ptp.sdr.syncinterval",
+          { "syncInterval",           "ptp.sdr.syncinterval",
             FT_INT8, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_sdr_localclockvariance,
-            { "localClockVariance",           "ptp.sdr.localclockvariance",
+          { "localClockVariance",           "ptp.sdr.localclockvariance",
             FT_INT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_sdr_localstepsremoved,
-            { "localStepsRemoved",           "ptp.sdr.localstepsremoved",
+          { "localStepsRemoved",           "ptp.sdr.localstepsremoved",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_sdr_localclockstratum,
-            { "localClockStratum",           "ptp.sdr.localclockstratum",
+          { "localClockStratum",           "ptp.sdr.localclockstratum",
             FT_UINT8, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_sdr_localclockidentifier,
-            { "localClockIdentifier",           "ptp.sdr.localclockidentifier",
+          { "localClockIdentifier",           "ptp.sdr.localclockidentifier",
             FT_STRING, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_sdr_parentcommunicationtechnology,
-            { "parentCommunicationTechnology",           "ptp.sdr.parentcommunicationtechnology",
+          { "parentCommunicationTechnology",           "ptp.sdr.parentcommunicationtechnology",
             FT_UINT8, BASE_DEC, VALS(ptp_communicationid_vals), 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_sdr_parentuuid,
-            { "parentUuid",           "ptp.sdr.parentuuid",
+          { "parentUuid",           "ptp.sdr.parentuuid",
             FT_ETHER, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_sdr_parentportfield,
-            { "parentPortField",           "ptp.sdr.parentportfield",
+          { "parentPortField",           "ptp.sdr.parentportfield",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_sdr_estimatedmastervariance,
-            { "estimatedMasterVariance",           "ptp.sdr.estimatedmastervariance",
+          { "estimatedMasterVariance",           "ptp.sdr.estimatedmastervariance",
             FT_INT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_sdr_estimatedmasterdrift,
-            { "estimatedMasterDrift",           "ptp.sdr.estimatedmasterdrift",
+          { "estimatedMasterDrift",           "ptp.sdr.estimatedmasterdrift",
             FT_INT32, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_sdr_utcreasonable,
-            { "utcReasonable",           "ptp.sdr.utcreasonable",
+          { "utcReasonable",           "ptp.sdr.utcreasonable",
             FT_BOOLEAN, BASE_NONE, NULL, 0x0,
             NULL, HFILL }
         },
         /*offsets for follow_up (=fu) messages*/
         { &hf_ptp_fu_associatedsequenceid,
-            { "associatedSequenceId",           "ptp.fu.associatedsequenceid",
+          { "associatedSequenceId",           "ptp.fu.associatedsequenceid",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_fu_preciseorigintimestamp,
-            { "preciseOriginTimestamp",    "ptp.fu.hf_ptp_fu_preciseorigintimestamp",
+          { "preciseOriginTimestamp",    "ptp.fu.hf_ptp_fu_preciseorigintimestamp",
             FT_RELATIVE_TIME, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_fu_preciseorigintimestamp_seconds,
-            { "preciseOriginTimestamp (seconds)",    "ptp.fu.hf_ptp_fu_preciseorigintimestamp_seconds",
+          { "preciseOriginTimestamp (seconds)",    "ptp.fu.hf_ptp_fu_preciseorigintimestamp_seconds",
             FT_UINT32, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_fu_preciseorigintimestamp_nanoseconds,
-            { "preciseOriginTimestamp (nanoseconds)",           "ptp.fu.preciseorigintimestamp_nanoseconds",
+          { "preciseOriginTimestamp (nanoseconds)",           "ptp.fu.preciseorigintimestamp_nanoseconds",
             FT_INT32, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         /*offsets for delay_resp (=dr) messages*/
         { &hf_ptp_dr_delayreceipttimestamp,
-            { "delayReceiptTimestamp",           "ptp.dr.delayreceipttimestamp",
+          { "delayReceiptTimestamp",           "ptp.dr.delayreceipttimestamp",
             FT_RELATIVE_TIME, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_dr_delayreceipttimestamp_seconds,
-            { "delayReceiptTimestamp (Seconds)",           "ptp.dr.delayreceipttimestamp_seconds",
+          { "delayReceiptTimestamp (Seconds)",           "ptp.dr.delayreceipttimestamp_seconds",
             FT_UINT32, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_dr_delayreceipttimestamp_nanoseconds,
-            { "delayReceiptTimestamp (nanoseconds)",           "ptp.dr.delayreceipttimestamp_nanoseconds",
+          { "delayReceiptTimestamp (nanoseconds)",           "ptp.dr.delayreceipttimestamp_nanoseconds",
             FT_INT32, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_dr_requestingsourcecommunicationtechnology,
-            { "requestingSourceCommunicationTechnology",    "ptp.dr.requestingsourcecommunicationtechnology",
+          { "requestingSourceCommunicationTechnology",    "ptp.dr.requestingsourcecommunicationtechnology",
             FT_UINT8, BASE_DEC, VALS(ptp_communicationid_vals), 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_dr_requestingsourceuuid,
-            { "requestingSourceUuid",           "ptp.dr.requestingsourceuuid",
+          { "requestingSourceUuid",           "ptp.dr.requestingsourceuuid",
             FT_ETHER, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_dr_requestingsourceportid,
-            { "requestingSourcePortId",           "ptp.dr.requestingsourceportid",
+          { "requestingSourcePortId",           "ptp.dr.requestingsourceportid",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_dr_requestingsourcesequenceid,
-            { "requestingSourceSequenceId",           "ptp.dr.requestingsourcesequenceid",
+          { "requestingSourceSequenceId",           "ptp.dr.requestingsourcesequenceid",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         /*offsets for management (=mm) messages*/
         { &hf_ptp_mm_targetcommunicationtechnology,
-            { "targetCommunicationTechnology",           "ptp.mm.targetcommunicationtechnology",
+          { "targetCommunicationTechnology",           "ptp.mm.targetcommunicationtechnology",
             FT_UINT8, BASE_DEC, VALS(ptp_communicationid_vals), 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_targetuuid,
-            { "targetUuid",           "ptp.mm.targetuuid",
+          { "targetUuid",           "ptp.mm.targetuuid",
             FT_ETHER, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_targetportid,
-            { "targetPortId",           "ptp.mm.targetportid",
+          { "targetPortId",           "ptp.mm.targetportid",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_startingboundaryhops,
-            { "startingBoundaryHops",           "ptp.mm.startingboundaryhops",
+          { "startingBoundaryHops",           "ptp.mm.startingboundaryhops",
             FT_INT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_boundaryhops,
-            { "boundaryHops",           "ptp.mm.boundaryhops",
+          { "boundaryHops",           "ptp.mm.boundaryhops",
             FT_INT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_managementmessagekey,
-            { "managementMessageKey",           "ptp.mm.managementmessagekey",
+          { "managementMessageKey",           "ptp.mm.managementmessagekey",
             FT_UINT8, BASE_DEC, VALS(ptp_managementMessageKey_vals), 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_parameterlength,
-            { "parameterLength",           "ptp.mm.parameterlength",
+          { "parameterLength",           "ptp.mm.parameterlength",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         /*parameterlength > 0*/
         { &hf_ptp_mm_messageparameters,
-            { "messageParameters",           "ptp.mm.messageparameters",
+          { "messageParameters",           "ptp.mm.messageparameters",
             FT_BYTES, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         /*ptp_mm_clock_identity (parameterlength = 64)*/
         { &hf_ptp_mm_clock_identity_clockcommunicationtechnology,
-            { "clockCommunicationTechnology",           "ptp.mm.clock.identity.clockcommunicationtechnology",
+          { "clockCommunicationTechnology",           "ptp.mm.clock.identity.clockcommunicationtechnology",
             FT_UINT8, BASE_DEC, VALS(ptp_communicationid_vals), 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_clock_identity_clockuuidfield,
-            { "clockUuidField",           "ptp.mm.clock.identity.clockuuidfield",
+          { "clockUuidField",           "ptp.mm.clock.identity.clockuuidfield",
             FT_ETHER, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_clock_identity_clockportfield,
-            { "clockPortField",           "ptp.mm.clock.identity.clockportfield",
+          { "clockPortField",           "ptp.mm.clock.identity.clockportfield",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_clock_identity_manufactureridentity,
-            { "manufacturerIdentity",           "ptp.mm.clock.identity.manufactureridentity",
+          { "manufacturerIdentity",           "ptp.mm.clock.identity.manufactureridentity",
             FT_BYTES, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
 
         /*ptp_mm_initialize_clock (parameterlength = 4)*/
         { &hf_ptp_mm_initialize_clock_initialisationkey,
-            { "initialisationKey",           "ptp.mm.initialize.clock.initialisationkey",
+          { "initialisationKey",           "ptp.mm.initialize.clock.initialisationkey",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         /*ptp_mm_set_subdomain (parameterlength = 16)*/
         { &hf_ptp_mm_set_subdomain_subdomainname,
-            { "subdomainName",           "ptp.mm.set.subdomain.subdomainname",
+          { "subdomainName",           "ptp.mm.set.subdomain.subdomainname",
             FT_STRING, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         /*ptp_mm_default_data_set (parameterlength = 76)*/
         { &hf_ptp_mm_default_data_set_clockcommunicationtechnology,
-            { "clockCommunicationTechnology",           "ptp.mm.default.data.set.clockcommunicationtechnology",
+          { "clockCommunicationTechnology",           "ptp.mm.default.data.set.clockcommunicationtechnology",
             FT_UINT8, BASE_DEC, VALS(ptp_communicationid_vals), 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_default_data_set_clockuuidfield,
-            { "clockUuidField",           "ptp.mm.default.data.set.clockuuidfield",
+          { "clockUuidField",           "ptp.mm.default.data.set.clockuuidfield",
             FT_ETHER, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_default_data_set_clockportfield,
-            { "clockPortField",           "ptp.mm.default.data.set.clockportfield",
+          { "clockPortField",           "ptp.mm.default.data.set.clockportfield",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_default_data_set_clockstratum,
-            { "clockStratum",           "ptp.mm.default.data.set.clockstratum",
+          { "clockStratum",           "ptp.mm.default.data.set.clockstratum",
             FT_UINT8, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_default_data_set_clockidentifier,
-            { "clockIdentifier",           "ptp.mm.default.data.set.clockidentifier",
+          { "clockIdentifier",           "ptp.mm.default.data.set.clockidentifier",
             FT_BYTES, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_default_data_set_clockvariance,
-            { "clockVariance",           "ptp.mm.default.data.set.clockvariance",
+          { "clockVariance",           "ptp.mm.default.data.set.clockvariance",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_default_data_set_clockfollowupcapable,
-            { "clockFollowupCapable",           "ptp.mm.default.data.set.clockfollowupcapable",
+          { "clockFollowupCapable",           "ptp.mm.default.data.set.clockfollowupcapable",
             FT_BOOLEAN, BASE_NONE, NULL, 0x0,
             NULL, HFILL }
         },
         { &hf_ptp_mm_default_data_set_preferred,
-            { "preferred",           "ptp.mm.default.data.set.preferred",
+          { "preferred",           "ptp.mm.default.data.set.preferred",
             FT_BOOLEAN, BASE_NONE, NULL, 0x0,
             NULL, HFILL }
         },
         { &hf_ptp_mm_default_data_set_initializable,
-            { "initializable",           "ptp.mm.default.data.set.initializable",
+          { "initializable",           "ptp.mm.default.data.set.initializable",
             FT_BOOLEAN, BASE_NONE, NULL, 0x0,
             NULL, HFILL }
         },
         { &hf_ptp_mm_default_data_set_externaltiming,
-            { "externalTiming",           "ptp.mm.default.data.set.externaltiming",
+          { "externalTiming",           "ptp.mm.default.data.set.externaltiming",
             FT_BOOLEAN, BASE_NONE, NULL, 0x0,
             NULL, HFILL }
         },
         { &hf_ptp_mm_default_data_set_isboundaryclock,
-            { "isBoundaryClock",           "ptp.mm.default.data.set.isboundaryclock",
+          { "isBoundaryClock",           "ptp.mm.default.data.set.isboundaryclock",
             FT_BOOLEAN, BASE_NONE, NULL, 0x0,
             NULL, HFILL }
         },
         { &hf_ptp_mm_default_data_set_syncinterval,
-            { "syncInterval",           "ptp.mm.default.data.set.syncinterval",
+          { "syncInterval",           "ptp.mm.default.data.set.syncinterval",
             FT_INT8, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_default_data_set_subdomainname,
-            { "subDomainName",           "ptp.mm.default.data.set.subdomainname",
+          { "subDomainName",           "ptp.mm.default.data.set.subdomainname",
             FT_STRING, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_default_data_set_numberports,
-            { "numberPorts",           "ptp.mm.default.data.set.numberports",
+          { "numberPorts",           "ptp.mm.default.data.set.numberports",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_default_data_set_numberforeignrecords,
-            { "numberForeignRecords",           "ptp.mm.default.data.set.numberforeignrecords",
+          { "numberForeignRecords",           "ptp.mm.default.data.set.numberforeignrecords",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         /*ptp_mm_update_default_data_set (parameterlength = 36)*/
         { &hf_ptp_mm_update_default_data_set_clockstratum,
-            { "clockStratum",           "ptp.mm.update.default.data.set.clockstratum",
+          { "clockStratum",           "ptp.mm.update.default.data.set.clockstratum",
             FT_UINT8, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_update_default_data_set_clockidentifier,
-            { "clockIdentifier",           "ptp.mm.update.default.data.set.clockidentifier",
+          { "clockIdentifier",           "ptp.mm.update.default.data.set.clockidentifier",
             FT_BYTES, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_update_default_data_set_clockvariance,
-            { "clockVariance",           "ptp.mm.update.default.data.set.clockvariance",
+          { "clockVariance",           "ptp.mm.update.default.data.set.clockvariance",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_update_default_data_set_preferred,
-            { "preferred",           "ptp.mm.update.default.data.set.preferred",
+          { "preferred",           "ptp.mm.update.default.data.set.preferred",
             FT_BOOLEAN, BASE_NONE, NULL, 0x0,
             NULL, HFILL }
         },
         { &hf_ptp_mm_update_default_data_set_syncinterval,
-            { "syncInterval",           "ptp.mm.update.default.data.set.syncinterval",
+          { "syncInterval",           "ptp.mm.update.default.data.set.syncinterval",
             FT_INT8, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_update_default_data_set_subdomainname,
-            { "subdomainName",           "ptp.mm.update.default.data.set.subdomainname",
+          { "subdomainName",           "ptp.mm.update.default.data.set.subdomainname",
             FT_STRING, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         /*ptp_mm_current_data_set (parameterlength = 20)*/
         { &hf_ptp_mm_current_data_set_stepsremoved,
-            { "stepsRemoved",           "ptp.mm.current.data.set.stepsremoved",
+          { "stepsRemoved",           "ptp.mm.current.data.set.stepsremoved",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_current_data_set_offsetfrommaster,
-            { "offsetFromMaster",           "ptp.mm.current.data.set.offsetfrommaster",
+          { "offsetFromMaster",           "ptp.mm.current.data.set.offsetfrommaster",
             FT_RELATIVE_TIME, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_current_data_set_offsetfrommasterseconds,
-            { "offsetFromMasterSeconds",           "ptp.mm.current.data.set.offsetfrommasterseconds",
+          { "offsetFromMasterSeconds",           "ptp.mm.current.data.set.offsetfrommasterseconds",
             FT_UINT32, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_current_data_set_offsetfrommasternanoseconds,
-            { "offsetFromMasterNanoseconds",           "ptp.mm.current.data.set.offsetfrommasternanoseconds",
+          { "offsetFromMasterNanoseconds",           "ptp.mm.current.data.set.offsetfrommasternanoseconds",
             FT_INT32, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_current_data_set_onewaydelay,
-            { "oneWayDelay",           "ptp.mm.current.data.set.onewaydelay",
+          { "oneWayDelay",           "ptp.mm.current.data.set.onewaydelay",
             FT_RELATIVE_TIME, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_current_data_set_onewaydelayseconds,
-            { "oneWayDelaySeconds",           "ptp.mm.current.data.set.onewaydelayseconds",
+          { "oneWayDelaySeconds",           "ptp.mm.current.data.set.onewaydelayseconds",
             FT_UINT32, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_current_data_set_onewaydelaynanoseconds,
-            { "oneWayDelayNanoseconds",           "ptp.mm.current.data.set.onewaydelaynanoseconds",
+          { "oneWayDelayNanoseconds",           "ptp.mm.current.data.set.onewaydelaynanoseconds",
             FT_INT32, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         /*ptp_mm_parent_data_set (parameterlength = 90)*/
         { &hf_ptp_mm_parent_data_set_parentcommunicationtechnology,
-            { "parentCommunicationTechnology",           "ptp.mm.parent.data.set.parentcommunicationtechnology",
+          { "parentCommunicationTechnology",           "ptp.mm.parent.data.set.parentcommunicationtechnology",
             FT_UINT8, BASE_DEC, VALS(ptp_communicationid_vals), 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_parent_data_set_parentuuid,
-            { "parentUuid",           "ptp.mm.parent.data.set.parentuuid",
+          { "parentUuid",           "ptp.mm.parent.data.set.parentuuid",
             FT_ETHER, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_parent_data_set_parentportid,
-            { "parentPortId",           "ptp.mm.parent.data.set.parentportid",
+          { "parentPortId",           "ptp.mm.parent.data.set.parentportid",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_parent_data_set_parentlastsyncsequencenumber,
-            { "parentLastSyncSequenceNumber",           "ptp.mm.parent.data.set.parentlastsyncsequencenumber",
+          { "parentLastSyncSequenceNumber",           "ptp.mm.parent.data.set.parentlastsyncsequencenumber",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_parent_data_set_parentfollowupcapable,
-            { "parentFollowupCapable",           "ptp.mm.parent.data.set.parentfollowupcapable",
+          { "parentFollowupCapable",           "ptp.mm.parent.data.set.parentfollowupcapable",
             FT_BOOLEAN, BASE_NONE, NULL, 0x0,
             NULL, HFILL }
         },
         { &hf_ptp_mm_parent_data_set_parentexternaltiming,
-            { "parentExternalTiming",           "ptp.mm.parent.data.set.parentexternaltiming",
+          { "parentExternalTiming",           "ptp.mm.parent.data.set.parentexternaltiming",
             FT_BOOLEAN, BASE_NONE, NULL, 0x0,
             NULL, HFILL }
         },
         { &hf_ptp_mm_parent_data_set_parentvariance,
-            { "parentVariance",           "ptp.mm.parent.data.set.parentvariance",
+          { "parentVariance",           "ptp.mm.parent.data.set.parentvariance",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_parent_data_set_parentstats,
-            { "parentStats",           "ptp.mm.parent.data.set.parentstats",
+          { "parentStats",           "ptp.mm.parent.data.set.parentstats",
             FT_BOOLEAN, BASE_NONE, NULL, 0x0,
             NULL, HFILL }
         },
         { &hf_ptp_mm_parent_data_set_observedvariance,
-            { "observedVariance",           "ptp.mm.parent.data.set.observedvariance",
+          { "observedVariance",           "ptp.mm.parent.data.set.observedvariance",
             FT_INT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_parent_data_set_observeddrift,
-            { "observedDrift",           "ptp.mm.parent.data.set.observeddrift",
+          { "observedDrift",           "ptp.mm.parent.data.set.observeddrift",
             FT_INT32, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_parent_data_set_utcreasonable,
-            { "utcReasonable",           "ptp.mm.parent.data.set.utcreasonable",
+          { "utcReasonable",           "ptp.mm.parent.data.set.utcreasonable",
             FT_BOOLEAN, BASE_NONE, NULL, 0x0,
             NULL, HFILL }
         },
         { &hf_ptp_mm_parent_data_set_grandmastercommunicationtechnology,
-            { "grandmasterCommunicationTechnology",    "ptp.mm.parent.data.set.grandmastercommunicationtechnology",
+          { "grandmasterCommunicationTechnology",    "ptp.mm.parent.data.set.grandmastercommunicationtechnology",
             FT_UINT8, BASE_DEC, VALS(ptp_communicationid_vals), 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_parent_data_set_grandmasteruuidfield,
-            { "grandmasterUuidField",           "ptp.mm.parent.data.set.grandmasteruuidfield",
+          { "grandmasterUuidField",           "ptp.mm.parent.data.set.grandmasteruuidfield",
             FT_ETHER, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_parent_data_set_grandmasterportidfield,
-            { "grandmasterPortIdField",           "ptp.mm.parent.data.set.grandmasterportidfield",
+          { "grandmasterPortIdField",           "ptp.mm.parent.data.set.grandmasterportidfield",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_parent_data_set_grandmasterstratum,
-            { "grandmasterStratum",           "ptp.mm.parent.data.set.grandmasterstratum",
+          { "grandmasterStratum",           "ptp.mm.parent.data.set.grandmasterstratum",
             FT_UINT8, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_parent_data_set_grandmasteridentifier,
-            { "grandmasterIdentifier",           "ptp.mm.parent.data.set.grandmasteridentifier",
+          { "grandmasterIdentifier",           "ptp.mm.parent.data.set.grandmasteridentifier",
             FT_BYTES, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_parent_data_set_grandmastervariance,
-            { "grandmasterVariance",           "ptp.mm.parent.data.set.grandmastervariance",
+          { "grandmasterVariance",           "ptp.mm.parent.data.set.grandmastervariance",
             FT_INT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_parent_data_set_grandmasterpreferred,
-            { "grandmasterPreferred",           "ptp.mm.parent.data.set.grandmasterpreferred",
+          { "grandmasterPreferred",           "ptp.mm.parent.data.set.grandmasterpreferred",
             FT_BOOLEAN, BASE_NONE, NULL, 0x0,
             NULL, HFILL }
         },
         { &hf_ptp_mm_parent_data_set_grandmasterisboundaryclock,
-            { "grandmasterIsBoundaryClock",           "ptp.mm.parent.data.set.grandmasterisboundaryclock",
+          { "grandmasterIsBoundaryClock",           "ptp.mm.parent.data.set.grandmasterisboundaryclock",
             FT_BOOLEAN, BASE_NONE, NULL, 0x0,
             NULL, HFILL }
         },
         { &hf_ptp_mm_parent_data_set_grandmastersequencenumber,
-            { "grandmasterSequenceNumber",           "ptp.mm.parent.data.set.grandmastersequencenumber",
+          { "grandmasterSequenceNumber",           "ptp.mm.parent.data.set.grandmastersequencenumber",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         /*ptp_mm_port_data_set (parameterlength = 52)*/
         { &hf_ptp_mm_port_data_set_returnedportnumber,
-            { "returnedPortNumber",           "ptp.mm.port.data.set.returnedportnumber",
+          { "returnedPortNumber",           "ptp.mm.port.data.set.returnedportnumber",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_port_data_set_portstate,
-            { "portState",           "ptp.mm.port.data.set.portstate",
+          { "portState",           "ptp.mm.port.data.set.portstate",
             FT_UINT8, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_port_data_set_lastsynceventsequencenumber,
-            { "lastSyncEventSequenceNumber",           "ptp.mm.port.data.set.lastsynceventsequencenumber",
+          { "lastSyncEventSequenceNumber",           "ptp.mm.port.data.set.lastsynceventsequencenumber",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_port_data_set_lastgeneraleventsequencenumber,
-            { "lastGeneralEventSequenceNumber",           "ptp.mm.port.data.set.lastgeneraleventsequencenumber",
+          { "lastGeneralEventSequenceNumber",           "ptp.mm.port.data.set.lastgeneraleventsequencenumber",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_port_data_set_portcommunicationtechnology,
-            { "portCommunicationTechnology",           "ptp.mm.port.data.set.portcommunicationtechnology",
+          { "portCommunicationTechnology",           "ptp.mm.port.data.set.portcommunicationtechnology",
             FT_UINT8, BASE_DEC, VALS(ptp_communicationid_vals), 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_port_data_set_portuuidfield,
-            { "portUuidField",           "ptp.mm.port.data.set.portuuidfield",
+          { "portUuidField",           "ptp.mm.port.data.set.portuuidfield",
             FT_ETHER, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_port_data_set_portidfield,
-            { "portIdField",           "ptp.mm.port.data.set.portidfield",
+          { "portIdField",           "ptp.mm.port.data.set.portidfield",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_port_data_set_burstenabled,
-            { "burstEnabled",           "ptp.mm.port.data.set.burstenabled",
+          { "burstEnabled",           "ptp.mm.port.data.set.burstenabled",
             FT_BOOLEAN, BASE_NONE, NULL, 0x0,
             NULL, HFILL }
         },
         { &hf_ptp_mm_port_data_set_subdomainaddressoctets,
-            { "subdomainAddressOctets",           "ptp.mm.port.data.set.subdomainaddressoctets",
+          { "subdomainAddressOctets",           "ptp.mm.port.data.set.subdomainaddressoctets",
             FT_UINT8, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_port_data_set_eventportaddressoctets,
-            { "eventPortAddressOctets",           "ptp.mm.port.data.set.eventportaddressoctets",
+          { "eventPortAddressOctets",           "ptp.mm.port.data.set.eventportaddressoctets",
             FT_UINT8, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_port_data_set_generalportaddressoctets,
-            { "generalPortAddressOctets",           "ptp.mm.port.data.set.generalportaddressoctets",
+          { "generalPortAddressOctets",           "ptp.mm.port.data.set.generalportaddressoctets",
             FT_UINT8, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_port_data_set_subdomainaddress,
-            { "subdomainAddress",           "ptp.mm.port.data.set.subdomainaddress",
+          { "subdomainAddress",           "ptp.mm.port.data.set.subdomainaddress",
             FT_BYTES, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_port_data_set_eventportaddress,
-            { "eventPortAddress",           "ptp.mm.port.data.set.eventportaddress",
+          { "eventPortAddress",           "ptp.mm.port.data.set.eventportaddress",
             FT_BYTES, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_port_data_set_generalportaddress,
-            { "generalPortAddress",           "ptp.mm.port.data.set.generalportaddress",
+          { "generalPortAddress",           "ptp.mm.port.data.set.generalportaddress",
             FT_BYTES, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         /*ptp_mm_global_time_data_set (parameterlength = 24)*/
         { &hf_ptp_mm_global_time_data_set_localtime,
-            { "localTime",           "ptp.mm.global.time.data.set.localtime",
+          { "localTime",           "ptp.mm.global.time.data.set.localtime",
             FT_RELATIVE_TIME, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_global_time_data_set_localtimeseconds,
-            { "localTimeSeconds",           "ptp.mm.global.time.data.set.localtimeseconds",
+          { "localTimeSeconds",           "ptp.mm.global.time.data.set.localtimeseconds",
             FT_UINT32, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_global_time_data_set_localtimenanoseconds,
-            { "localTimeNanoseconds",           "ptp.mm.global.time.data.set.localtimenanoseconds",
+          { "localTimeNanoseconds",           "ptp.mm.global.time.data.set.localtimenanoseconds",
             FT_INT32, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_global_time_data_set_currentutcoffset,
-            { "currentUtcOffset",           "ptp.mm.global.time.data.set.currentutcoffset",
+          { "currentUtcOffset",           "ptp.mm.global.time.data.set.currentutcoffset",
             FT_INT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_global_time_data_set_leap59,
-            { "leap59",           "ptp.mm.global.time.data.set.leap59",
+          { "leap59",           "ptp.mm.global.time.data.set.leap59",
             FT_BOOLEAN, BASE_NONE, NULL, 0x0,
             NULL, HFILL }
         },
         { &hf_ptp_mm_global_time_data_set_leap61,
-            { "leap61",           "ptp.mm.global.time.data.set.leap61",
+          { "leap61",           "ptp.mm.global.time.data.set.leap61",
             FT_BOOLEAN, BASE_NONE, NULL, 0x0,
             NULL, HFILL }
         },
         { &hf_ptp_mm_global_time_data_set_epochnumber,
-            { "epochNumber",           "ptp.mm.global.time.data.set.epochnumber",
+          { "epochNumber",           "ptp.mm.global.time.data.set.epochnumber",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         /*ptp_mm_update_global_time_properties (parameterlength = 16)*/
         { &hf_ptp_mm_update_global_time_properties_currentutcoffset,
-            { "currentUtcOffset",           "ptp.mm.update.global.time.properties.currentutcoffset",
+          { "currentUtcOffset",           "ptp.mm.update.global.time.properties.currentutcoffset",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_update_global_time_properties_leap59,
-            { "leap59",           "ptp.mm.update.global.time.properties.leap59",
+          { "leap59",           "ptp.mm.update.global.time.properties.leap59",
             FT_BOOLEAN, BASE_NONE, NULL, 0x0,
             NULL, HFILL }
         },
         { &hf_ptp_mm_update_global_time_properties_leap61,
-            { "leap61",           "ptp.mm.update.global.time.properties.leap61",
+          { "leap61",           "ptp.mm.update.global.time.properties.leap61",
             FT_BOOLEAN, BASE_NONE, NULL, 0x0,
             NULL, HFILL }
         },
         { &hf_ptp_mm_update_global_time_properties_epochnumber,
-            { "epochNumber",           "ptp.mm.update.global.time.properties.epochnumber",
+          { "epochNumber",           "ptp.mm.update.global.time.properties.epochnumber",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         /*ptp_mm_get_foreign_data_set (parameterlength = 4)*/
         { &hf_ptp_mm_get_foreign_data_set_recordkey,
-            { "recordKey",           "ptp.mm.get.foreign.data.set.recordkey",
+          { "recordKey",           "ptp.mm.get.foreign.data.set.recordkey",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         /*ptp_mm_foreign_data_set (parameterlength = 28)*/
         { &hf_ptp_mm_foreign_data_set_returnedportnumber,
-            { "returnedPortNumber",           "ptp.mm.foreign.data.set.returnedportnumber",
+          { "returnedPortNumber",           "ptp.mm.foreign.data.set.returnedportnumber",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_foreign_data_set_returnedrecordnumber,
-            { "returnedRecordNumber",           "ptp.mm.foreign.data.set.returnedrecordnumber",
+          { "returnedRecordNumber",           "ptp.mm.foreign.data.set.returnedrecordnumber",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_foreign_data_set_foreignmastercommunicationtechnology,
-            { "foreignMasterCommunicationTechnology",
-              "ptp.mm.foreign.data.set.foreignmastercommunicationtechnology",
+          { "foreignMasterCommunicationTechnology",
+            "ptp.mm.foreign.data.set.foreignmastercommunicationtechnology",
             FT_UINT8, BASE_DEC, VALS(ptp_communicationid_vals), 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_foreign_data_set_foreignmasteruuidfield,
-            { "foreignMasterUuidField",           "ptp.mm.foreign.data.set.foreignmasteruuidfield",
+          { "foreignMasterUuidField",           "ptp.mm.foreign.data.set.foreignmasteruuidfield",
             FT_ETHER, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_foreign_data_set_foreignmasterportidfield,
-            { "foreignMasterPortIdField",           "ptp.mm.foreign.data.set.foreignmasterportidfield",
+          { "foreignMasterPortIdField",           "ptp.mm.foreign.data.set.foreignmasterportidfield",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_foreign_data_set_foreignmastersyncs,
-            { "foreignMasterSyncs",           "ptp.mm.foreign.data.set.foreignmastersyncs",
+          { "foreignMasterSyncs",           "ptp.mm.foreign.data.set.foreignmastersyncs",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         /*ptp_mm_set_sync_interval (parameterlength = 4)*/
         { &hf_ptp_mm_set_sync_interval_syncinterval,
-            { "syncInterval",           "ptp.mm.set.sync.interval.syncinterval",
+          { "syncInterval",           "ptp.mm.set.sync.interval.syncinterval",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         /*ptp_mm_set_time (parameterlength = 8)*/
         { &hf_ptp_mm_set_time_localtime,
-            { "localtime",           "ptp.mm.set.time.localtime",
+          { "localtime",           "ptp.mm.set.time.localtime",
             FT_RELATIVE_TIME, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_set_time_localtimeseconds,
-            { "localtimeSeconds",           "ptp.mm.set.time.localtimeseconds",
+          { "localtimeSeconds",           "ptp.mm.set.time.localtimeseconds",
             FT_UINT32, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_mm_set_time_localtimenanoseconds,
-            { "localTimeNanoseconds",           "ptp.mm.set.time.localtimenanoseconds",
+          { "localTimeNanoseconds",           "ptp.mm.set.time.localtimenanoseconds",
             FT_INT32, BASE_DEC, NULL, 0x0,
             NULL, HFILL }
         },
@@ -4227,965 +4230,965 @@ proto_register_ptp(void)
         /* PTPv2 fields **********************************************************/
         /*Common fields for all frames*/
         { &hf_ptp_v2_transportspecific,
-            { "transportSpecific",           "ptp.v2.transportspecific",
+          { "transportSpecific",           "ptp.v2.transportspecific",
             FT_UINT8, BASE_HEX, NULL, 0xF0,
             NULL, HFILL }
         },
         { &hf_ptp_v2_transportspecific_v1_compatibility,
-            { "V1 Compatibility",           "ptp.v2.transportspecific.v1compatibility",
+          { "V1 Compatibility",           "ptp.v2.transportspecific.v1compatibility",
             FT_BOOLEAN, 8, NULL, PTP_V2_TRANSPORTSPECIFIC_V1COMPATIBILITY_BITMASK,
             NULL, HFILL }
         },
         { &hf_ptp_v2_transportspecific_802as_conform,
-            { "802.1as conform",           "ptp.v2.transportspecific.802.1asconform",
+          { "802.1as conform",           "ptp.v2.transportspecific.802.1asconform",
             FT_BOOLEAN, 8, NULL, PTP_V2_TRANSPORTSPECIFIC_V1COMPATIBILITY_BITMASK,
             NULL, HFILL }
         },
         { &hf_ptp_v2_messageid,
-            { "messageId",           "ptp.v2.messageid",
+          { "messageId",           "ptp.v2.messageid",
             FT_UINT8, BASE_HEX, VALS(ptp_v2_messageid_vals), 0x0F,
             NULL, HFILL }
         },
         { &hf_ptp_v2_versionptp,
-            { "versionPTP",           "ptp.v2.versionptp",
+          { "versionPTP",           "ptp.v2.versionptp",
             FT_UINT8, BASE_DEC, NULL, 0x0F,
             NULL, HFILL }
         },
         { &hf_ptp_v2_messagelength,
-            { "messageLength",           "ptp.v2.messagelength",
+          { "messageLength",           "ptp.v2.messagelength",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_domainnumber,
-            { "subdomainNumber",           "ptp.v2.subdomainnumber",
+          { "subdomainNumber",           "ptp.v2.subdomainnumber",
             FT_UINT8, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_flags,
-            { "flags",           "ptp.v2.flags",
+          { "flags",           "ptp.v2.flags",
             FT_UINT16, BASE_HEX, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_flags_alternatemaster,
-            { "PTP_ALTERNATE_MASTER",     "ptp.v2.flags.alternatemaster",
+          { "PTP_ALTERNATE_MASTER",     "ptp.v2.flags.alternatemaster",
             FT_BOOLEAN, 16, NULL, PTP_V2_FLAGS_ALTERNATE_BITMASK,
             NULL, HFILL }
         },
         { &hf_ptp_v2_flags_twostep,
-            { "PTP_TWO_STEP",           "ptp.v2.flags.twostep",
+          { "PTP_TWO_STEP",           "ptp.v2.flags.twostep",
             FT_BOOLEAN, 16, NULL, PTP_V2_FLAGS_TWO_STEP_BITMASK,
             NULL, HFILL }
         },
         { &hf_ptp_v2_flags_unicast,
-            { "PTP_UNICAST",           "ptp.v2.flags.unicast",
+          { "PTP_UNICAST",           "ptp.v2.flags.unicast",
             FT_BOOLEAN, 16, NULL, PTP_V2_FLAGS_UNICAST_BITMASK,
             NULL, HFILL }
         },
         { &hf_ptp_v2_flags_specific1,
-            { "PTP profile Specific 1",           "ptp.v2.flags.specific1",
+          { "PTP profile Specific 1",           "ptp.v2.flags.specific1",
             FT_BOOLEAN, 16, NULL, PTP_V2_FLAGS_SPECIFIC1_BITMASK,
             NULL, HFILL }
         },
         { &hf_ptp_v2_flags_specific2,
-            { "PTP profile Specific 2",           "ptp.v2.flags.specific2",
+          { "PTP profile Specific 2",           "ptp.v2.flags.specific2",
             FT_BOOLEAN, 16, NULL, PTP_V2_FLAGS_SPECIFIC2_BITMASK,
             NULL, HFILL }
         },
         { &hf_ptp_v2_flags_security,
-            { "PTP_SECURITY",           "ptp.v2.flags.security",
+          { "PTP_SECURITY",           "ptp.v2.flags.security",
             FT_BOOLEAN, 16, NULL, PTP_V2_FLAGS_SECURITY_BITMASK,
             NULL, HFILL }
         },
         { &hf_ptp_v2_flags_li61,
-            { "PTP_LI_61",           "ptp.v2.flags.li61",
+          { "PTP_LI_61",           "ptp.v2.flags.li61",
             FT_BOOLEAN, 16, NULL, PTP_V2_FLAGS_LI61_BITMASK,
             NULL, HFILL }
         },
         { &hf_ptp_v2_flags_li59,
-            { "PTP_LI_59",           "ptp.v2.flags.li59",
+          { "PTP_LI_59",           "ptp.v2.flags.li59",
             FT_BOOLEAN, 16, NULL, PTP_V2_FLAGS_LI59_BITMASK,
             NULL, HFILL }
         },
         { &hf_ptp_v2_flags_utcoffsetvalid,
-            { "PTP_UTC_REASONABLE",           "ptp.v2.flags.utcreasonable",
+          { "PTP_UTC_REASONABLE",           "ptp.v2.flags.utcreasonable",
             FT_BOOLEAN, 16, NULL, PTP_V2_FLAGS_UTC_OFFSET_VALID_BITMASK,
             NULL, HFILL }
         },
         { &hf_ptp_v2_flags_ptptimescale,
-            { "PTP_TIMESCALE",           "ptp.v2.flags.timescale",
+          { "PTP_TIMESCALE",           "ptp.v2.flags.timescale",
             FT_BOOLEAN, 16, NULL, PTP_V2_FLAGS_PTP_TIMESCALE_BITMASK,
             NULL, HFILL }
         },
         { &hf_ptp_v2_flags_timetraceable,
-            { "TIME_TRACEABLE",           "ptp.v2.flags.timetraceable",
+          { "TIME_TRACEABLE",           "ptp.v2.flags.timetraceable",
             FT_BOOLEAN, 16, NULL, PTP_V2_FLAGS_TIME_TRACEABLE_BITMASK,
             NULL, HFILL }
         },
         { &hf_ptp_v2_flags_frequencytraceable,
-            { "FREQUENCY_TRACEABLE",           "ptp.v2.flags.frequencytraceable",
+          { "FREQUENCY_TRACEABLE",           "ptp.v2.flags.frequencytraceable",
             FT_BOOLEAN, 16, NULL, PTP_V2_FLAGS_FREQUENCY_TRACEABLE_BITMASK,
             NULL, HFILL }
         },
         { &hf_ptp_v2_correction,
-            { "correction",           "ptp.v2.correction.ns",
+          { "correction",           "ptp.v2.correction.ns",
             FT_UINT64, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_correctionsubns,
-            { "correctionSubNs",           "ptp.v2.correction.subns",
+          { "correctionSubNs",           "ptp.v2.correction.subns",
             FT_DOUBLE, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_clockidentity,
-            { "ClockIdentity",           "ptp.v2.clockidentity",
+          { "ClockIdentity",           "ptp.v2.clockidentity",
             FT_UINT64, BASE_HEX, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_sourceportid,
-            { "SourcePortID",           "ptp.v2.sourceportid",
+          { "SourcePortID",           "ptp.v2.sourceportid",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_sequenceid,
-            { "sequenceId",           "ptp.v2.sequenceid",
+          { "sequenceId",           "ptp.v2.sequenceid",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_control,
-            { "control",           "ptp.v2.control",
+          { "control",           "ptp.v2.control",
             FT_UINT8, BASE_DEC, VALS(ptp_control_vals), 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_logmessageperiod,
-            { "logMessagePeriod",           "ptp.v2.logmessageperiod",
+          { "logMessagePeriod",           "ptp.v2.logmessageperiod",
             FT_INT8, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
 
         /*Fields for PTP_Announce (=an) messages*/
         { &hf_ptp_v2_an_origintimestamp,
-            { "originTimestamp",           "ptp.v2.an.origintimestamp",
+          { "originTimestamp",           "ptp.v2.an.origintimestamp",
             FT_RELATIVE_TIME, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_an_origintimestamp_seconds,
-            { "originTimestamp (seconds)",           "ptp.v2.an.origintimestamp.seconds",
+          { "originTimestamp (seconds)",           "ptp.v2.an.origintimestamp.seconds",
             FT_UINT64, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_an_origintimestamp_nanoseconds,
-            { "originTimestamp (nanoseconds)",           "ptp.v2.an.origintimestamp.nanoseconds",
+          { "originTimestamp (nanoseconds)",           "ptp.v2.an.origintimestamp.nanoseconds",
             FT_INT32, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_an_origincurrentutcoffset,
-            { "originCurrentUTCOffset",           "ptp.v2.an.origincurrentutcoffset",
+          { "originCurrentUTCOffset",           "ptp.v2.an.origincurrentutcoffset",
             FT_INT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_an_timesource,
-            { "TimeSource",           "ptp.v2.timesource",
+          { "TimeSource",           "ptp.v2.timesource",
             FT_UINT8, BASE_HEX, VALS(ptp_v2_timesource_vals), 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_an_localstepsremoved,
-            { "localStepsRemoved",           "ptp.v2.an.localstepsremoved",
+          { "localStepsRemoved",           "ptp.v2.an.localstepsremoved",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_an_grandmasterclockidentity,
-            { "grandmasterClockIdentity",           "ptp.v2.an.grandmasterclockidentity",
+          { "grandmasterClockIdentity",           "ptp.v2.an.grandmasterclockidentity",
             FT_UINT64, BASE_HEX, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_an_grandmasterclockclass,
-            { "grandmasterClockClass",           "ptp.v2.an.grandmasterclockclass",
+          { "grandmasterClockClass",           "ptp.v2.an.grandmasterclockclass",
             FT_UINT8, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_an_grandmasterclockaccuracy,
-            { "grandmasterClockAccuracy",           "ptp.v2.an.grandmasterclockaccuracy",
+          { "grandmasterClockAccuracy",           "ptp.v2.an.grandmasterclockaccuracy",
             FT_UINT8, BASE_HEX, VALS(ptp_v2_clockaccuracy_vals), 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_an_grandmasterclockvariance,
-            { "grandmasterClockVariance",           "ptp.v2.an.grandmasterclockvariance",
+          { "grandmasterClockVariance",           "ptp.v2.an.grandmasterclockvariance",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_an_priority1,
-            { "priority1",           "ptp.v2.an.priority1",
+          { "priority1",           "ptp.v2.an.priority1",
             FT_UINT8, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_an_priority2,
-            { "priority2",           "ptp.v2.an.priority2",
+          { "priority2",           "ptp.v2.an.priority2",
             FT_UINT8, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
 
         /*Fields for PTP_Announce TLVs */
         { &hf_ptp_v2_an_tlv_tlvtype,
-            { "tlvType", "ptp.v2.an.tlvType",
+          { "tlvType", "ptp.v2.an.tlvType",
             FT_UINT16, BASE_DEC, VALS(ptp_v2_TLV_type_vals), 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_an_tlv_lengthfield,
-            { "lengthField", "ptp.v2.an.lengthField",
+          { "lengthField", "ptp.v2.an.lengthField",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         /*Fields for ALTERNATE_TIME_OFFSET_INDICATOR TLV */
         { &hf_ptp_v2_atoi_tlv_keyfield,
-            { "keyField", "ptp.v2.an.atoi.keyField",
+          { "keyField", "ptp.v2.an.atoi.keyField",
             FT_UINT8, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_atoi_tlv_currentoffset,
-            { "currentOffset", "ptp.v2.an.atoi.currentOffset",
+          { "currentOffset", "ptp.v2.an.atoi.currentOffset",
             FT_INT32, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_atoi_tlv_jumpseconds,
-            { "jumpSeconds", "ptp.v2.an.atoi.jumpSeconds",
+          { "jumpSeconds", "ptp.v2.an.atoi.jumpSeconds",
             FT_INT32, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_atoi_tlv_timeofnextjump,
-            { "timeOfNextJump", "ptp.v2.an.atoi.timeOfNextJump",
+          { "timeOfNextJump", "ptp.v2.an.atoi.timeOfNextJump",
             FT_BYTES, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_atoi_tlv_displayname,
-            { "displayName", "ptp.v2.an.atoi.dislpayName",
+          { "displayName", "ptp.v2.an.atoi.dislpayName",
             FT_STRING, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_atoi_tlv_displayname_length,
-            { "length",           "ptp.v2.an.atoi.dislpayName.length",
+          { "length",           "ptp.v2.an.atoi.dislpayName.length",
             FT_UINT8, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
 
         /* Fields for undissected TLV */
         { &hf_ptp_v2_an_tlv_data,
-            { "data",           "ptp.v2.an.tlv.data",
+          { "data",           "ptp.v2.an.tlv.data",
             FT_BYTES, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
 
         /*Fields for PTP_Sync AND PTP_DelayRequest (=sdr) messages*/
         { &hf_ptp_v2_sdr_origintimestamp,
-            { "originTimestamp",           "ptp.v2.sdr.origintimestamp",
+          { "originTimestamp",           "ptp.v2.sdr.origintimestamp",
             FT_RELATIVE_TIME, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_sdr_origintimestamp_seconds,
-            { "originTimestamp (seconds)",           "ptp.v2.sdr.origintimestamp.seconds",
+          { "originTimestamp (seconds)",           "ptp.v2.sdr.origintimestamp.seconds",
             FT_UINT64, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_sdr_origintimestamp_nanoseconds,
-            { "originTimestamp (nanoseconds)",           "ptp.v2.sdr.origintimestamp.nanoseconds",
+          { "originTimestamp (nanoseconds)",           "ptp.v2.sdr.origintimestamp.nanoseconds",
             FT_INT32, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
 
         /*Fields for PTP_Follow_Up (=fu) messages*/
         { &hf_ptp_v2_fu_preciseorigintimestamp,
-            { "preciseOriginTimestamp",           "ptp.v2.fu.preciseorigintimestamp",
+          { "preciseOriginTimestamp",           "ptp.v2.fu.preciseorigintimestamp",
             FT_RELATIVE_TIME, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_fu_preciseorigintimestamp_seconds,
-            { "preciseOriginTimestamp (seconds)",           "ptp.v2.fu.preciseorigintimestamp.seconds",
+          { "preciseOriginTimestamp (seconds)",           "ptp.v2.fu.preciseorigintimestamp.seconds",
             FT_UINT64, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_fu_preciseorigintimestamp_nanoseconds,
-            { "preciseOriginTimestamp (nanoseconds)",           "ptp.v2.fu.preciseorigintimestamp.nanoseconds",
+          { "preciseOriginTimestamp (nanoseconds)",           "ptp.v2.fu.preciseorigintimestamp.nanoseconds",
             FT_INT32, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
 
         /*Fields for PTP_DelayResponse (=dr) messages*/
         { &hf_ptp_v2_dr_receivetimestamp,
-            { "receiveTimestamp",           "ptp.v2.dr.receivetimestamp",
+          { "receiveTimestamp",           "ptp.v2.dr.receivetimestamp",
             FT_RELATIVE_TIME, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_dr_receivetimestamp_seconds,
-            { "receiveTimestamp (seconds)",           "ptp.v2.dr.receivetimestamp.seconds",
+          { "receiveTimestamp (seconds)",           "ptp.v2.dr.receivetimestamp.seconds",
             FT_UINT64, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_dr_receivetimestamp_nanoseconds,
-            { "receiveTimestamp (nanoseconds)",           "ptp.v2.dr.receivetimestamp.nanoseconds",
+          { "receiveTimestamp (nanoseconds)",           "ptp.v2.dr.receivetimestamp.nanoseconds",
             FT_INT32, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_dr_requestingportidentity,
-            { "requestingSourcePortIdentity",           "ptp.v2.dr.requestingsourceportidentity",
+          { "requestingSourcePortIdentity",           "ptp.v2.dr.requestingsourceportidentity",
             FT_UINT64, BASE_HEX, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_dr_requestingsourceportid,
-            { "requestingSourcePortId",           "ptp.v2.dr.requestingsourceportid",
+          { "requestingSourcePortId",           "ptp.v2.dr.requestingsourceportid",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
 
         /*Fields for PTP_PDelayRequest (=pdrq) messages*/
         { &hf_ptp_v2_pdrq_origintimestamp,
-            { "originTimestamp",           "ptp.v2.pdrq.origintimestamp",
+          { "originTimestamp",           "ptp.v2.pdrq.origintimestamp",
             FT_RELATIVE_TIME, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_pdrq_origintimestamp_seconds,
-            { "originTimestamp (seconds)",           "ptp.v2.pdrq.origintimestamp.seconds",
+          { "originTimestamp (seconds)",           "ptp.v2.pdrq.origintimestamp.seconds",
             FT_UINT64, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_pdrq_origintimestamp_nanoseconds,
-            { "originTimestamp (nanoseconds)",           "ptp.v2.pdrq.origintimestamp.nanoseconds",
+          { "originTimestamp (nanoseconds)",           "ptp.v2.pdrq.origintimestamp.nanoseconds",
             FT_INT32, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
 
         /*Fields for PTP_PDelayResponse (=pdrs) messages*/
         { &hf_ptp_v2_pdrs_requestreceipttimestamp,
-            { "requestreceiptTimestamp",           "ptp.v2.pdrs.requestreceipttimestamp",
+          { "requestreceiptTimestamp",           "ptp.v2.pdrs.requestreceipttimestamp",
             FT_RELATIVE_TIME, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_pdrs_requestreceipttimestamp_seconds,
-            { "requestreceiptTimestamp (seconds)",           "ptp.v2.pdrs.requestreceipttimestamp.seconds",
+          { "requestreceiptTimestamp (seconds)",           "ptp.v2.pdrs.requestreceipttimestamp.seconds",
             FT_UINT64, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_pdrs_requestreceipttimestamp_nanoseconds,
-            { "requestreceiptTimestamp (nanoseconds)",           "ptp.v2.pdrs.requestreceipttimestamp.nanoseconds",
+          { "requestreceiptTimestamp (nanoseconds)",           "ptp.v2.pdrs.requestreceipttimestamp.nanoseconds",
             FT_INT32, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_pdrs_requestingportidentity,
-            { "requestingSourcePortIdentity",           "ptp.v2.pdrs.requestingportidentity",
+          { "requestingSourcePortIdentity",           "ptp.v2.pdrs.requestingportidentity",
             FT_UINT64, BASE_HEX, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_pdrs_requestingsourceportid,
-            { "requestingSourcePortId",           "ptp.v2.pdrs.requestingsourceportid",
+          { "requestingSourcePortId",           "ptp.v2.pdrs.requestingsourceportid",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
 
         /*Fields for PTP_PDelayResponseFollowUp (=pdfu) messages*/
         { &hf_ptp_v2_pdfu_responseorigintimestamp,
-            { "responseOriginTimestamp",           "ptp.v2.pdfu.responseorigintimestamp",
+          { "responseOriginTimestamp",           "ptp.v2.pdfu.responseorigintimestamp",
             FT_RELATIVE_TIME, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_pdfu_responseorigintimestamp_seconds,
-            { "responseOriginTimestamp (seconds)",           "ptp.v2.pdfu.responseorigintimestamp.seconds",
+          { "responseOriginTimestamp (seconds)",           "ptp.v2.pdfu.responseorigintimestamp.seconds",
             FT_UINT64, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_pdfu_responseorigintimestamp_nanoseconds,
-            { "responseOriginTimestamp (nanoseconds)",           "ptp.v2.pdfu.responseorigintimestamp.nanoseconds",
+          { "responseOriginTimestamp (nanoseconds)",           "ptp.v2.pdfu.responseorigintimestamp.nanoseconds",
             FT_INT32, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_pdfu_requestingportidentity,
-            { "requestingSourcePortIdentity",           "ptp.v2.pdfu.requestingportidentity",
+          { "requestingSourcePortIdentity",           "ptp.v2.pdfu.requestingportidentity",
             FT_UINT64, BASE_HEX, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_pdfu_requestingsourceportid,
-            { "requestingSourcePortId",           "ptp.v2.pdfu.requestingsourceportid",
+          { "requestingSourcePortId",           "ptp.v2.pdfu.requestingsourceportid",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
 
         /*Fields for PTP_Signalling (=sig) messages*/
         { &hf_ptp_v2_sig_targetportidentity,
-            { "targetPortIdentity",           "ptp.v2.sig.targetportidentity",
+          { "targetPortIdentity",           "ptp.v2.sig.targetportidentity",
             FT_UINT64, BASE_HEX, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_sig_targetportid,
-            { "targetPortId",           "ptp.v2.sig.targetportid",
+          { "targetPortId",           "ptp.v2.sig.targetportid",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
 
         /*Fields for PTP_Management (=mm) messages*/
         { &hf_ptp_v2_mm_targetportidentity,
-            { "targetPortIdentity",           "ptp.v2.mm.targetportidentity",
+          { "targetPortIdentity",           "ptp.v2.mm.targetportidentity",
             FT_UINT64, BASE_HEX, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_targetportid,
-            { "targetPortId",           "ptp.v2.mm.targetportid",
+          { "targetPortId",           "ptp.v2.mm.targetportid",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_startingboundaryhops,
-            { "startingBoundaryHops",           "ptp.v2.mm.startingboundaryhops",
+          { "startingBoundaryHops",           "ptp.v2.mm.startingboundaryhops",
             FT_UINT8, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_boundaryhops,
-            { "boundaryHops",           "ptp.v2.mm.boundaryhops",
+          { "boundaryHops",           "ptp.v2.mm.boundaryhops",
             FT_UINT8, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_action,
-            { "action",           "ptp.v2.mm.action",
+          { "action",           "ptp.v2.mm.action",
             FT_UINT8, BASE_DEC, VALS(ptp_v2_mm_action_vals), 0x0F,
             NULL, HFILL }
         },
         /* Management TLV */
         { &hf_ptp_v2_mm_tlvType,
-            { "tlvType",           "ptp.v2.mm.tlvType",
+          { "tlvType",           "ptp.v2.mm.tlvType",
             FT_UINT16, BASE_DEC, VALS(ptp_v2_TLV_type_vals), 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_lengthField,
-            { "lengthField",           "ptp.v2.mm.lengthField",
+          { "lengthField",           "ptp.v2.mm.lengthField",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_managementId,
-            { "managementId",           "ptp.v2.mm.managementId",
+          { "managementId",           "ptp.v2.mm.managementId",
             FT_UINT16, BASE_DEC, VALS(ptp_v2_managementID_vals), 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_data,
-            { "data",           "ptp.v2.mm.data",
+          { "data",           "ptp.v2.mm.data",
             FT_BYTES, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         /* Management TLV dataField */
         /* CLOCK_DESCRIPTION */
         { &hf_ptp_v2_mm_clockType,
-            { "clockType",           "ptp.v2.mm.clockType",
+          { "clockType",           "ptp.v2.mm.clockType",
             FT_UINT16, BASE_HEX, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_clockType_ordinaryClock,
-            { "The node implements an ordinary clock", "ptp.v2.mm.clockType.OC",
+          { "The node implements an ordinary clock", "ptp.v2.mm.clockType.OC",
             FT_BOOLEAN, 16, NULL, CLOCKTYPE_ORDINARY_CLOCK,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_clockType_boundaryClock,
-            { "The node implements a boundary clock", "ptp.v2.mm.clockType.BC",
+          { "The node implements a boundary clock", "ptp.v2.mm.clockType.BC",
             FT_BOOLEAN, 16, NULL, CLOCKTYPE_BOUNDARY_CLOCK,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_clockType_p2p_transparentClock,
-            { "The node implements a peer-to-peer transparent clock", "ptp.v2.mm.clockType.p2p_TC",
+          { "The node implements a peer-to-peer transparent clock", "ptp.v2.mm.clockType.p2p_TC",
             FT_BOOLEAN, 16, NULL, CLOCKTYPE_P2P_TC,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_clockType_e2e_transparentClock,
-            { "The node implements an end-to-end transparent clock", "ptp.v2.mm.clockType.e2e_TC",
+          { "The node implements an end-to-end transparent clock", "ptp.v2.mm.clockType.e2e_TC",
             FT_BOOLEAN, 16, NULL, CLOCKTYPE_E2E_TC,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_clockType_managementNode,
-            { "The node implements a management node", "ptp.v2.mm.clockType.MM",
+          { "The node implements a management node", "ptp.v2.mm.clockType.MM",
             FT_BOOLEAN, 16, NULL, CLOCKTYPE_MANAGEMENT_NODE,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_clockType_reserved,
-            { "Reserved", "ptp.v2.mm.clockType.reserved",
+          { "Reserved", "ptp.v2.mm.clockType.reserved",
             FT_BOOLEAN, 16, NULL, CLOCKTYPE_RESERVED,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_physicalLayerProtocol,
-            { "physicalLayerProtocol",           "ptp.v2.mm.physicalLayerProtocol",
+          { "physicalLayerProtocol",           "ptp.v2.mm.physicalLayerProtocol",
             FT_STRING, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_physicalLayerProtocol_length,
-            { "length",           "ptp.v2.mm.physicalLayerProtocol.length",
+          { "length",           "ptp.v2.mm.physicalLayerProtocol.length",
             FT_UINT8, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_physicalAddressLength,
-            { "physical address length",  "ptp.v2.mm.physicalAddressLength",
+          { "physical address length",  "ptp.v2.mm.physicalAddressLength",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_physicalAddress,
-            { "physical address",  "ptp.v2.mm.physicalAddress",
+          { "physical address",  "ptp.v2.mm.physicalAddress",
             FT_BYTES, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_protocolAddress,
-            { "protocol address",  "ptp.v2.mm.protocolAddress",
+          { "protocol address",  "ptp.v2.mm.protocolAddress",
             FT_BYTES, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_protocolAddress_networkProtocol,
-            { "network protocol",           "ptp.v2.mm.networkProtocol",
+          { "network protocol",           "ptp.v2.mm.networkProtocol",
             FT_UINT16, BASE_DEC, VALS(ptp2_networkProtocol_vals), 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_protocolAddress_length,
-            { "length",  "ptp.v2.mm.protocolAddress.length",
+          { "length",  "ptp.v2.mm.protocolAddress.length",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_manufacturerIdentity,
-            { "manufacturer identity",  "ptp.v2.mm.manufacturerIdentity",
+          { "manufacturer identity",  "ptp.v2.mm.manufacturerIdentity",
             FT_BYTES, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_reserved,
-            { "reserved",  "ptp.v2.mm.reserved",
+          { "reserved",  "ptp.v2.mm.reserved",
             FT_BYTES, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_productDescription,
-            { "product description",  "ptp.v2.mm.productDescription",
+          { "product description",  "ptp.v2.mm.productDescription",
             FT_STRING, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_productDescription_length,
-            { "length",           "ptp.v2.mm.productDescription.length",
+          { "length",           "ptp.v2.mm.productDescription.length",
             FT_UINT8, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_revisionData,
-            { "revision data",  "ptp.v2.mm.revisionData",
+          { "revision data",  "ptp.v2.mm.revisionData",
             FT_STRING, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_revisionData_length,
-            { "length",           "ptp.v2.mm.revisionData.length",
+          { "length",           "ptp.v2.mm.revisionData.length",
             FT_UINT8, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_userDescription,
-            { "user description",  "ptp.v2.mm.userDescription",
+          { "user description",  "ptp.v2.mm.userDescription",
             FT_STRING, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_userDescription_length,
-            { "length",           "ptp.v2.mm.userDescription.length",
+          { "length",           "ptp.v2.mm.userDescription.length",
             FT_UINT8, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_profileIdentity,
-            { "profileIdentity",           "ptp.v2.mm.profileIdentity",
+          { "profileIdentity",           "ptp.v2.mm.profileIdentity",
             FT_BYTES, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_pad,
-            { "Pad",           "ptp.v2.mm.pad",
+          { "Pad",           "ptp.v2.mm.pad",
             FT_BYTES, BASE_NONE, NULL, 0x0,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_initializationKey,
-            { "initialization key",           "ptp.v2.mm.initializationKey",
+          { "initialization key",           "ptp.v2.mm.initializationKey",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_numberOfFaultRecords,
-            { "number of fault records",  "ptp.v2.mm.numberOfFaultRecords",
+          { "number of fault records",  "ptp.v2.mm.numberOfFaultRecords",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_faultRecord,
-            { "fault record",  "ptp.v2.mm.faultRecord",
+          { "fault record",  "ptp.v2.mm.faultRecord",
             FT_BYTES, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_faultRecordLength,
-            { "fault record length",           "ptp.v2.mm.faultRecordLength",
+          { "fault record length",           "ptp.v2.mm.faultRecordLength",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_severityCode,
-            { "severity code",           "ptp.v2.mm.severityCode",
+          { "severity code",           "ptp.v2.mm.severityCode",
             FT_UINT8, BASE_DEC, VALS(ptp2_severityCode_vals), 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_faultName,
-            { "faultName",  "ptp.v2.mm.faultName",
+          { "faultName",  "ptp.v2.mm.faultName",
             FT_STRING, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_faultName_length,
-            { "length",           "ptp.v2.mm.faultName.length",
+          { "length",           "ptp.v2.mm.faultName.length",
             FT_UINT8, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_faultValue,
-            { "faultValue",  "ptp.v2.mm.faultValue",
+          { "faultValue",  "ptp.v2.mm.faultValue",
             FT_STRING, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_faultValue_length,
-            { "length",           "ptp.v2.mm.faultValue.length",
+          { "length",           "ptp.v2.mm.faultValue.length",
             FT_UINT8, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_faultDescription,
-            { "faultDescription",  "ptp.v2.mm.faultDescription",
+          { "faultDescription",  "ptp.v2.mm.faultDescription",
             FT_STRING, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_faultDescription_length,
-            { "length",           "ptp.v2.mm.faultDescription.length",
+          { "length",           "ptp.v2.mm.faultDescription.length",
             FT_UINT8, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_faultTime,
-            { "Fault time", "ptp.v2.mm.faultTime",
+          { "Fault time", "ptp.v2.mm.faultTime",
             FT_RELATIVE_TIME, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_faultTime_s,
-            { "Fault time (seconds)", "ptp.v2.mm.faultTime.seconds",
+          { "Fault time (seconds)", "ptp.v2.mm.faultTime.seconds",
             FT_UINT64, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_faultTime_ns,
-            { "Fault time (nanoseconds)", "ptp.v2.mm.faultTime.nanoseconds",
+          { "Fault time (nanoseconds)", "ptp.v2.mm.faultTime.nanoseconds",
             FT_INT32, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_currentTime_s,
-            { "current time (seconds)", "ptp.v2.mm.currentTime.seconds",
+          { "current time (seconds)", "ptp.v2.mm.currentTime.seconds",
             FT_UINT64, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_currentTime_ns,
-            { "current time (nanoseconds)", "ptp.v2.mm.currentTime.nanoseconds",
+          { "current time (nanoseconds)", "ptp.v2.mm.currentTime.nanoseconds",
             FT_INT32, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_clockAccuracy,
-            { "Clock accuracy",           "ptp.v2.mm.clockaccuracy",
+          { "Clock accuracy",           "ptp.v2.mm.clockaccuracy",
             FT_UINT8, BASE_HEX, VALS(ptp_v2_clockaccuracy_vals), 0x00,
             NULL, HFILL }
         },
 
         { &hf_ptp_v2_mm_priority1,
-            { "priority1",           "ptp.v2.mm.priority1",
+          { "priority1",           "ptp.v2.mm.priority1",
             FT_UINT8, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_priority2,
-            { "priority2",           "ptp.v2.mm.priority2",
+          { "priority2",           "ptp.v2.mm.priority2",
             FT_UINT8, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_dds_SO,
-            { "Slave only",           "ptp.v2.mm.SlavOnly",
+          { "Slave only",           "ptp.v2.mm.SlavOnly",
             FT_BOOLEAN, 8, NULL, 0x02,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_TSC,
-            { "Two step",           "ptp.v2.mm.twoStep",
+          { "Two step",           "ptp.v2.mm.twoStep",
             FT_BOOLEAN, 8, NULL, 0x01,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_numberPorts,
-            { "number of ports",  "ptp.v2.mm.numberPorts",
+          { "number of ports",  "ptp.v2.mm.numberPorts",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_clockclass,
-            { "Clock class",           "ptp.v2.mm.clockclass",
+          { "Clock class",           "ptp.v2.mm.clockclass",
             FT_UINT8, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_clockaccuracy,
-            { "Clock accuracy",           "ptp.v2.mm.clockaccuracy",
+          { "Clock accuracy",           "ptp.v2.mm.clockaccuracy",
             FT_UINT8, BASE_HEX, VALS(ptp_v2_clockaccuracy_vals), 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_clockvariance,
-            { "Clock variance",           "ptp.v2.mm.clockvariance",
+          { "Clock variance",           "ptp.v2.mm.clockvariance",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_clockidentity,
-            { "Clock identity",           "ptp.v2.mm.clockidentity",
+          { "Clock identity",           "ptp.v2.mm.clockidentity",
             FT_UINT64, BASE_HEX, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_domainNumber,
-            { "domain number",           "ptp.v2.mm.domainNumber",
+          { "domain number",           "ptp.v2.mm.domainNumber",
             FT_UINT8, BASE_DEC, NULL , 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_SO,
-            { "Slave only",           "ptp.v2.mm.SlavOnly",
+          { "Slave only",           "ptp.v2.mm.SlavOnly",
             FT_BOOLEAN, 8, NULL, 0x01,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_stepsRemoved,
-            { "steps removed",           "ptp.v2.mm.stepsRemoved",
+          { "steps removed",           "ptp.v2.mm.stepsRemoved",
             FT_INT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_parentIdentity,
-            { "parent ClockIdentity",           "ptp.v2.mm.parentclockidentity",
+          { "parent ClockIdentity",           "ptp.v2.mm.parentclockidentity",
             FT_UINT64, BASE_HEX, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_parentPort,
-            { "parent SourcePortID",           "ptp.v2.mm.parentsourceportid",
+          { "parent SourcePortID",           "ptp.v2.mm.parentsourceportid",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_parentStats,
-            { "parent stats",           "ptp.v2.mm.parentstats",
+          { "parent stats",           "ptp.v2.mm.parentstats",
             FT_BOOLEAN, 8, NULL, 0x01,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_observedParentOffsetScaledLogVariance,
-            { "observedParentOffsetScaledLogVariance", "ptp.v2.mm.observedParentOffsetScaledLogVariance",
+          { "observedParentOffsetScaledLogVariance", "ptp.v2.mm.observedParentOffsetScaledLogVariance",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_observedParentClockPhaseChangeRate,
-            { "observedParentClockPhaseChangeRate", "ptp.v2.mm.observedParentClockPhaseChangeRate",
+          { "observedParentClockPhaseChangeRate", "ptp.v2.mm.observedParentClockPhaseChangeRate",
             FT_INT32, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_grandmasterPriority1,
-            { "Grandmaster priority1", "ptp.v2.mm.grandmasterPriority1",
+          { "Grandmaster priority1", "ptp.v2.mm.grandmasterPriority1",
             FT_UINT8, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_grandmasterPriority2,
-            { "Grandmaster priority2", "ptp.v2.mm.grandmasterPriority2",
+          { "Grandmaster priority2", "ptp.v2.mm.grandmasterPriority2",
             FT_UINT8, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_grandmasterclockclass,
-            { "Grandmaster clock class", "ptp.v2.mm.grandmasterclockclass",
+          { "Grandmaster clock class", "ptp.v2.mm.grandmasterclockclass",
             FT_UINT8, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_grandmasterclockaccuracy,
-            { "Grandmaster clock accuracy", "ptp.v2.mm.grandmasterclockaccuracy",
+          { "Grandmaster clock accuracy", "ptp.v2.mm.grandmasterclockaccuracy",
             FT_UINT8, BASE_HEX, VALS(ptp_v2_clockaccuracy_vals), 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_grandmasterclockvariance,
-            { "Grandmaster clock variance", "ptp.v2.mm.grandmasterclockvariance",
+          { "Grandmaster clock variance", "ptp.v2.mm.grandmasterclockvariance",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_grandmasterIdentity,
-            { "Grandmaster clock identity", "ptp.v2.mm.grandmasterclockidentity",
+          { "Grandmaster clock identity", "ptp.v2.mm.grandmasterclockidentity",
             FT_UINT64, BASE_HEX, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_currentUtcOffset,
-            { "CurrentUTCOffset", "ptp.v2.mm.currentutcoffset",
+          { "CurrentUTCOffset", "ptp.v2.mm.currentutcoffset",
             FT_INT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_LI_61,
-            { "leap 61", "ptp.v2.mm.li61",
+          { "leap 61", "ptp.v2.mm.li61",
             FT_BOOLEAN, 8, NULL, 0x01,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_LI_59,
-            { "leap 59", "ptp.v2.mm.li59",
+          { "leap 59", "ptp.v2.mm.li59",
             FT_BOOLEAN, 8, NULL, 0x02,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_UTCV,
-            { "CurrentUTCOffset valid", "ptp.v2.mm.CurrentUTCOffsetValid",
+          { "CurrentUTCOffset valid", "ptp.v2.mm.CurrentUTCOffsetValid",
             FT_BOOLEAN, 8, NULL, 0x04,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_PTP,
-            { "PTP timescale", "ptp.v2.mm.ptptimescale",
+          { "PTP timescale", "ptp.v2.mm.ptptimescale",
             FT_BOOLEAN, 8, NULL, 0x08,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_TTRA,
-            { "Time traceable", "ptp.v2.mm.timeTraceable",
+          { "Time traceable", "ptp.v2.mm.timeTraceable",
             FT_BOOLEAN, 8, NULL, 0x10,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_FTRA,
-            { "Frequency traceable", "ptp.v2.mm.frequencyTraceable",
+          { "Frequency traceable", "ptp.v2.mm.frequencyTraceable",
             FT_BOOLEAN, 8, NULL, 0x20,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_timesource,
-            { "TimeSource",           "ptp.v2.mm.timesource",
+          { "TimeSource",           "ptp.v2.mm.timesource",
             FT_UINT8, BASE_HEX, VALS(ptp_v2_timesource_vals), 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_offset_ns,
-            { "correction",           "ptp.v2.mm.offset.ns",
+          { "correction",           "ptp.v2.mm.offset.ns",
             FT_UINT64, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_offset_subns,
-            { "SubNs",           "ptp.v2.mm.offset.subns",
+          { "SubNs",           "ptp.v2.mm.offset.subns",
             FT_DOUBLE, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_pathDelay_ns,
-            { "ns",           "ptp.v2.mm.pathDelay.ns",
+          { "ns",           "ptp.v2.mm.pathDelay.ns",
             FT_UINT64, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_pathDelay_subns,
-            { "SubNs",           "ptp.v2.mm.pathDelay.subns",
+          { "SubNs",           "ptp.v2.mm.pathDelay.subns",
             FT_DOUBLE, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_PortNumber,
-            { "PortNumber",           "ptp.v2.mm.PortNumber",
+          { "PortNumber",           "ptp.v2.mm.PortNumber",
             FT_UINT16, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_portState,
-            { "Port state",           "ptp.v2.mm.portState",
+          { "Port state",           "ptp.v2.mm.portState",
             FT_UINT8, BASE_DEC, VALS(ptp2_portState_vals), 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_logMinDelayReqInterval,
-                { "logMinDelayReqInterval",           "ptp.v2.mm.logMinDelayReqInterval",
-                FT_INT8, BASE_DEC, NULL, 0x00,
-                NULL, HFILL }
+          { "logMinDelayReqInterval",           "ptp.v2.mm.logMinDelayReqInterval",
+            FT_INT8, BASE_DEC, NULL, 0x00,
+            NULL, HFILL }
         },
         { &hf_ptp_v2_mm_peerMeanPathDelay_ns,
-                { "ns",           "ptp.v2.mm.peerMeanPathDelay.ns",
-                FT_UINT64, BASE_DEC, NULL, 0x00,
-                NULL, HFILL }
+          { "ns",           "ptp.v2.mm.peerMeanPathDelay.ns",
+            FT_UINT64, BASE_DEC, NULL, 0x00,
+            NULL, HFILL }
         },
         { &hf_ptp_v2_mm_peerMeanPathDelay_subns,
-                { "SubNs",           "ptp.v2.mm.peerMeanPathDelay.subns",
-                FT_DOUBLE, BASE_NONE, NULL, 0x00,
-                NULL, HFILL }
+          { "SubNs",           "ptp.v2.mm.peerMeanPathDelay.subns",
+            FT_DOUBLE, BASE_NONE, NULL, 0x00,
+            NULL, HFILL }
         },
         { &hf_ptp_v2_mm_logAnnounceInterval,
-                { "logAnnounceInterval",           "ptp.v2.mm.logAnnounceInterval",
-                FT_INT8, BASE_DEC, NULL, 0x00,
-                NULL, HFILL }
+          { "logAnnounceInterval",           "ptp.v2.mm.logAnnounceInterval",
+            FT_INT8, BASE_DEC, NULL, 0x00,
+            NULL, HFILL }
         },
         { &hf_ptp_v2_mm_announceReceiptTimeout,
-                { "announceReceiptTimeout",           "ptp.v2.mm.announceReceiptTimeout",
-                FT_UINT8, BASE_DEC, NULL, 0x00,
-                NULL, HFILL }
+          { "announceReceiptTimeout",           "ptp.v2.mm.announceReceiptTimeout",
+            FT_UINT8, BASE_DEC, NULL, 0x00,
+            NULL, HFILL }
         },
         { &hf_ptp_v2_mm_logSyncInterval,
-                { "logSyncInterval",           "ptp.v2.mm.logSyncInterval",
-                FT_INT8, BASE_DEC, NULL, 0x00,
-                NULL, HFILL }
+          { "logSyncInterval",           "ptp.v2.mm.logSyncInterval",
+            FT_INT8, BASE_DEC, NULL, 0x00,
+            NULL, HFILL }
         },
         { &hf_ptp_v2_mm_delayMechanism,
-                { "Delay mechanism",           "ptp.v2.mm.delayMechanism",
-                FT_UINT8, BASE_DEC, VALS(ptp2_delayMechanism_vals), 0x00,
-                NULL, HFILL }
+          { "Delay mechanism",           "ptp.v2.mm.delayMechanism",
+            FT_UINT8, BASE_DEC, VALS(ptp2_delayMechanism_vals), 0x00,
+            NULL, HFILL }
         },
         { &hf_ptp_v2_mm_logMinPdelayReqInterval,
-                { "logMinPdelayReqInterval",           "ptp.v2.mm.logMinPdelayReqInterval",
-                FT_INT8, BASE_DEC, NULL, 0x00,
-                NULL, HFILL }
+          { "logMinPdelayReqInterval",           "ptp.v2.mm.logMinPdelayReqInterval",
+            FT_INT8, BASE_DEC, NULL, 0x00,
+            NULL, HFILL }
         },
         { &hf_ptp_v2_mm_versionNumber,
-                { "versionNumber",           "ptp.v2.mm.versionNumber",
-                FT_UINT8, BASE_DEC, NULL, 0x0F,
-                NULL, HFILL }
+          { "versionNumber",           "ptp.v2.mm.versionNumber",
+            FT_UINT8, BASE_DEC, NULL, 0x0F,
+            NULL, HFILL }
         },
         { &hf_ptp_v2_mm_primaryDomain,
-                { "Primary domain number",  "ptp.v2.mm.primaryDomain",
-                FT_UINT8, BASE_DEC, NULL, 0x00,
-                NULL, HFILL }
+          { "Primary domain number",  "ptp.v2.mm.primaryDomain",
+            FT_UINT8, BASE_DEC, NULL, 0x00,
+            NULL, HFILL }
         },
         { &hf_ptp_v2_mm_faultyFlag,
-                { "Faulty flag", "ptp.v2.mm.faultyFlag",
-                FT_BOOLEAN, 8, NULL, 0x01,
-                NULL, HFILL }
+          { "Faulty flag", "ptp.v2.mm.faultyFlag",
+            FT_BOOLEAN, 8, NULL, 0x01,
+            NULL, HFILL }
         },
 
         { &hf_ptp_v2_mm_managementErrorId,
-                { "managementErrorId",  "ptp.v2.mm.managementErrorId",
-                FT_UINT16, BASE_DEC, VALS(ptp2_managementErrorId_vals), 0x00,
-                NULL, HFILL }
+          { "managementErrorId",  "ptp.v2.mm.managementErrorId",
+            FT_UINT16, BASE_DEC, VALS(ptp2_managementErrorId_vals), 0x00,
+            NULL, HFILL }
         },
         { &hf_ptp_v2_mm_displayData,
-                { "Display data",           "ptp.v2.mm.displayData",
-                FT_STRING, BASE_NONE, NULL, 0x00,
-                NULL, HFILL }
+          { "Display data",           "ptp.v2.mm.displayData",
+            FT_STRING, BASE_NONE, NULL, 0x00,
+            NULL, HFILL }
         },
         { &hf_ptp_v2_mm_displayData_length,
-                { "length",           "ptp.v2.mm.displayData.length",
-                FT_UINT8, BASE_DEC, NULL, 0x00,
-                NULL, HFILL }
+          { "length",           "ptp.v2.mm.displayData.length",
+            FT_UINT8, BASE_DEC, NULL, 0x00,
+            NULL, HFILL }
         },
         { &hf_ptp_v2_mm_ucEN,
-            { "Enable unicast", "ptp.v2.mm.unicastEnable",
+          { "Enable unicast", "ptp.v2.mm.unicastEnable",
             FT_BOOLEAN, 8, NULL, 0x01,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_ptEN,
-            { "Path trace unicast", "ptp.v2.mm.pathTraceEnable",
+          { "Path trace unicast", "ptp.v2.mm.pathTraceEnable",
             FT_BOOLEAN, 8, NULL, 0x01,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_atEN,
-            { "Path trace unicast", "ptp.v2.mm.pathTraceEnable",
+          { "Path trace unicast", "ptp.v2.mm.pathTraceEnable",
             FT_BOOLEAN, 8, NULL, 0x01,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_keyField,
-            { "Key field", "ptp.v2.mm.keyField",
+          { "Key field", "ptp.v2.mm.keyField",
             FT_UINT8, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_displayName,
-            { "Display name",           "ptp.v2.mm.displayName",
+          { "Display name",           "ptp.v2.mm.displayName",
             FT_STRING, BASE_NONE, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_displayName_length,
-            { "length",           "ptp.v2.mm.displayName.length",
+          { "length",           "ptp.v2.mm.displayName.length",
             FT_UINT8, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_maxKey,
-            { "Max key", "ptp.v2.mm.maxKey",
+          { "Max key", "ptp.v2.mm.maxKey",
             FT_UINT8, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_currentOffset,
-            { "Current offset", "ptp.v2.mm.currentOffset",
+          { "Current offset", "ptp.v2.mm.currentOffset",
             FT_INT32, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_jumpSeconds,
-            { "Jump seconds", "ptp.v2.mm.jumpSeconds",
+          { "Jump seconds", "ptp.v2.mm.jumpSeconds",
             FT_INT32, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_numberOfAlternateMasters,
-            { "Number of alternate masters", "ptp.v2.mm.numberOfAlternateMasters",
+          { "Number of alternate masters", "ptp.v2.mm.numberOfAlternateMasters",
             FT_UINT8, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_logAlternateMulticastSyncInterval,
-            { "Alternate multicast sync interval", "ptp.v2.mm.AlternateMulticastSyncInterval",
+          { "Alternate multicast sync interval", "ptp.v2.mm.AlternateMulticastSyncInterval",
             FT_INT8, BASE_DEC, NULL, 0x00,
             NULL, HFILL }
         },
         { &hf_ptp_v2_mm_transmitAlternateMulticastSync,
-            { "Transmit alternate multicast sync", "ptp.v2.mm.transmitAlternateMulticastSync",
+          { "Transmit alternate multicast sync", "ptp.v2.mm.transmitAlternateMulticastSync",
             FT_BOOLEAN, 8, NULL, 0x01,
             NULL, HFILL }
         },
@@ -5216,7 +5219,7 @@ proto_register_ptp(void)
 
 /* Register the protocol name and description */
     proto_ptp = proto_register_protocol("Precision Time Protocol (IEEE1588)",
-        "PTP", "ptp");
+                                        "PTP", "ptp");
 
 /* Required function calls to register the header fields and subtrees used */
     proto_register_field_array(proto_ptp, hf, array_length(hf));
index df0723c381dfec4597b2cc60753dc2d1ce681424..56f42f7b28eb7f28c065e1cbae3f58b65592e3d1 100644 (file)
  * (FF) <francesco.fondelli[AT]gmail.com>
  *
  * Feb 12, 2010: add support for generalized label interpretation: SUKLM
- * format for SONET/SDH label (RFC 4606), t3t2t1 format for G.709 ODUk label 
+ * format for SONET/SDH label (RFC 4606), t3t2t1 format for G.709 ODUk label
  * (RFC 4328), G.694 format for lambda label (draft-ietf-ccamp-gmpls-g-694-lamb
- * da-labels-05).  Add related user preference option. 
- * (FF) <francesco.fondelli[AT]gmail.com> 
+ * da-labels-05).  Add related user preference option.
+ * (FF) <francesco.fondelli[AT]gmail.com>
  */
 
 
@@ -787,10 +787,10 @@ static const value_string adspec_params[] = {
     { 0, NULL }
 };
 
-/* 
- * FF: please keep this list in sync with 
+/*
+ * FF: please keep this list in sync with
  * http://www.iana.org/assignments/gmpls-sig-parameters
- * Registry Name: 'LSP Encoding Types' 
+ * Registry Name: 'LSP Encoding Types'
  */
 const range_string gmpls_lsp_enc_rvals[] = {
     {   1,   1, "Packet" },
@@ -811,8 +811,8 @@ const range_string gmpls_lsp_enc_rvals[] = {
     {   0,   0, NULL }
 };
 
-/* 
- * FF: please keep this list in sync with 
+/*
+ * FF: please keep this list in sync with
  * http://www.iana.org/assignments/gmpls-sig-parameters
  * Registry Name: 'Switching Types'
  */
@@ -833,8 +833,8 @@ const range_string gmpls_switching_type_rvals[] = {
     {   0,   0, NULL }
 };
 
-/* 
- * FF: please keep this list in sync with 
+/*
+ * FF: please keep this list in sync with
  * http://www.iana.org/assignments/gmpls-sig-parameters
  * Registry Name: 'Generalized PID (G-PID)'
  */
@@ -1766,9 +1766,9 @@ dissect_rsvp_ifid_tlv (proto_tree *ti, proto_tree *rsvp_object_tree,
 
         case 516:
             /* FF: ERROR_STRING TLV, RFC 4783 */
-            ti2 = 
-              proto_tree_add_text(rsvp_object_tree, 
-                                  tvb, offset + tlv_off, 
+            ti2 =
+              proto_tree_add_text(rsvp_object_tree,
+                                  tvb, offset + tlv_off,
                                   tlv_len,
                                   "ERROR_STRING TLV - %s",
                                   tvb_format_text(tvb, offset + tlv_off + 4,
@@ -1776,11 +1776,11 @@ dissect_rsvp_ifid_tlv (proto_tree *ti, proto_tree *rsvp_object_tree,
             rsvp_ifid_subtree = proto_item_add_subtree(ti2, subtree_type);
             proto_tree_add_text(rsvp_ifid_subtree, tvb, offset + tlv_off, 2,
                                 "Type: 516 (ERROR_STRING)");
-            proto_tree_add_text(rsvp_ifid_subtree, 
+            proto_tree_add_text(rsvp_ifid_subtree,
                                 tvb, offset + tlv_off + 2, 2,
                                 "Length: %u",
                                 tvb_get_ntohs(tvb, offset + tlv_off + 2));
-            proto_tree_add_text(rsvp_ifid_subtree, tvb, offset + tlv_off + 4, 
+            proto_tree_add_text(rsvp_ifid_subtree, tvb, offset + tlv_off + 4,
                                 tlv_len - 4,
                                 "Error String: %s",
                                 tvb_format_text(tvb, offset + tlv_off + 4,
@@ -1789,18 +1789,18 @@ dissect_rsvp_ifid_tlv (proto_tree *ti, proto_tree *rsvp_object_tree,
 
         default:
             /* FF: not yet known TLVs are displayed as raw data */
-            ti2 = proto_tree_add_text(rsvp_object_tree, 
-                                      tvb, offset + tlv_off, 
+            ti2 = proto_tree_add_text(rsvp_object_tree,
+                                      tvb, offset + tlv_off,
                                       tlv_len,
                                       "Unknown TLV (%u)", tlv_type);
             rsvp_ifid_subtree = proto_item_add_subtree(ti2, subtree_type);
             proto_tree_add_text(rsvp_ifid_subtree, tvb, offset + tlv_off, 2,
                                 "Type: %u (Unknown)", tlv_type);
-            proto_tree_add_text(rsvp_ifid_subtree, 
+            proto_tree_add_text(rsvp_ifid_subtree,
                                 tvb, offset + tlv_off + 2, 2,
                                 "Length: %u",
                                 tvb_get_ntohs(tvb, offset + tlv_off + 2));
-            proto_tree_add_text(rsvp_ifid_subtree, tvb, offset + tlv_off + 4, 
+            proto_tree_add_text(rsvp_ifid_subtree, tvb, offset + tlv_off + 4,
                                 tlv_len - 4,
                                 "Data (%d bytes)", tlv_len - 4);
             break;
@@ -2016,7 +2016,7 @@ dissect_rsvp_error (proto_item *ti, proto_tree *rsvp_object_tree,
     ti2 = proto_tree_add_text(rsvp_object_tree, tvb, offset3, 1,
                              "Flags: 0x%02x", error_flags);
     rsvp_error_subtree = proto_item_add_subtree(ti2, TREE(TT_ERROR_FLAGS));
-    proto_tree_add_text(rsvp_error_subtree, tvb, offset3, 1, "%s", 
+    proto_tree_add_text(rsvp_error_subtree, tvb, offset3, 1, "%s",
                    decode_boolean_bitfield(error_flags, 0x04, 8,
                                            "Path State Removed",
                                            ""));
@@ -2300,7 +2300,7 @@ dissect_rsvp_eth_tspec_tlv(proto_item *ti, proto_tree *rsvp_object_tree,
            proto_tree_add_text(rsvp_ethspec_subtree, tvb, offset+tlv_off+2, 2,
                                "Length: %u", tlv_len);
            break;
-           
+
        case 129:
            ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
                                      offset+tlv_off, tlv_len,
@@ -2350,7 +2350,7 @@ dissect_rsvp_eth_tspec_tlv(proto_item *ti, proto_tree *rsvp_object_tree,
                                   tvb_get_ntohieee_float(tvb, offset+tlv_off+16),
                                   tvb_get_ntohieee_float(tvb, offset+tlv_off+20));
            break;
-           
+
        default:
            proto_tree_add_text(rsvp_object_tree, tvb, offset+tlv_off, 2,
                                "Unknown TLV: %u", tlv_type);
@@ -2647,24 +2647,24 @@ dissect_rsvp_tspec (proto_item *ti, proto_tree *rsvp_object_tree,
         proto_tree_add_text(rsvp_object_tree, tvb, offset2, 1,
                             "Signal Type: %d - %s", signal_type,
                             rval_to_str(signal_type,
-                                        gmpls_g709_signal_type_rvals, 
+                                        gmpls_g709_signal_type_rvals,
                                         "Unknown"));
         proto_tree_add_text(rsvp_object_tree, tvb, offset2 + 2, 2,
-                            "Number of Multiplexed Components (NMC): %d", 
+                            "Number of Multiplexed Components (NMC): %d",
                             tvb_get_ntohs(tvb, offset2 + 2));
         proto_tree_add_text(rsvp_object_tree, tvb, offset2 + 4, 2,
-                            "Number of Virtual Components (NVC): %d", 
+                            "Number of Virtual Components (NVC): %d",
                             tvb_get_ntohs(tvb, offset2 + 4));
 
         proto_tree_add_text(rsvp_object_tree, tvb, offset2 + 6, 2,
-                            "Multiplier (MT): %d", 
+                            "Multiplier (MT): %d",
                             tvb_get_ntohs(tvb, offset2 + 6));
         proto_item_append_text(ti, "Signal [%s], NMC %d, NVC %d, MT %d",
-                               rval_to_str(signal_type, 
-                                           gmpls_g709_signal_type_rvals, 
+                               rval_to_str(signal_type,
+                                           gmpls_g709_signal_type_rvals,
                                            "Unknown"),
                                tvb_get_ntohs(tvb, offset2 + 2),
-                               tvb_get_ntohs(tvb, offset2 + 4), 
+                               tvb_get_ntohs(tvb, offset2 + 4),
                                tvb_get_ntohs(tvb, offset2 + 6));
         break;
 
@@ -3008,24 +3008,24 @@ dissect_rsvp_flowspec (proto_item *ti, proto_tree *rsvp_object_tree,
         proto_tree_add_text(rsvp_object_tree, tvb, offset2, 1,
                             "Signal Type: %d - %s", signal_type,
                             rval_to_str(signal_type,
-                                        gmpls_g709_signal_type_rvals, 
+                                        gmpls_g709_signal_type_rvals,
                                         "Unknown"));
         proto_tree_add_text(rsvp_object_tree, tvb, offset2 + 2, 2,
-                            "Number of Multiplexed Components (NMC): %d", 
+                            "Number of Multiplexed Components (NMC): %d",
                             tvb_get_ntohs(tvb, offset2 + 2));
         proto_tree_add_text(rsvp_object_tree, tvb, offset2 + 4, 2,
-                            "Number of Virtual Components (NVC): %d", 
+                            "Number of Virtual Components (NVC): %d",
                             tvb_get_ntohs(tvb, offset2 + 4));
 
         proto_tree_add_text(rsvp_object_tree, tvb, offset2 + 6, 2,
-                            "Multiplier (MT): %d", 
+                            "Multiplier (MT): %d",
                             tvb_get_ntohs(tvb, offset2 + 6));
         proto_item_append_text(ti, "Signal [%s], NMC %d, NVC %d, MT %d",
-                               rval_to_str(signal_type, 
-                                           gmpls_g709_signal_type_rvals, 
+                               rval_to_str(signal_type,
+                                           gmpls_g709_signal_type_rvals,
                                            "Unknown"),
                                tvb_get_ntohs(tvb, offset2 + 2),
-                               tvb_get_ntohs(tvb, offset2 + 4), 
+                               tvb_get_ntohs(tvb, offset2 + 4),
                                tvb_get_ntohs(tvb, offset2 + 6));
         break;
 
@@ -3353,7 +3353,7 @@ dissect_rsvp_label_request (proto_item *ti, proto_tree *rsvp_object_tree,
  * LABEL
  *---------------------------------------------------------------------------*/
 
-/* 
+/*
    FF: G.694 lambda label, see draft-ietf-ccamp-gmpls-g-694-lambda-labels-05
 
     0                   1                   2                   3
@@ -3377,11 +3377,11 @@ dissect_glabel_lambda(proto_tree *ti _U_, proto_tree *rsvp_object_tree,
 
     if (grid == 1) {
       /* DWDM grid: Frequency (THz) = 193.1 THz + n * channel spacing (THz) */
-      cs_thz = 
-        cs == 1 ? 0.1f : 
+      cs_thz =
+        cs == 1 ? 0.1f :
         cs == 2 ? 0.05f :
         cs == 3 ? 0.025f :
-        cs == 4 ? 0.0125f : 
+        cs == 4 ? 0.0125f :
         0.0f;
       freq = 193.1f + (n * cs_thz);
       proto_tree_add_text(rsvp_object_tree, tvb, offset, 4,
@@ -3391,14 +3391,14 @@ dissect_glabel_lambda(proto_tree *ti _U_, proto_tree *rsvp_object_tree,
                           "n=%d, "
                           "freq=%.2fTHz",
                           /* grid */
-                          grid == 1 ? "DWDM" : 
-                          grid == 2 ? "CWDM" : 
+                          grid == 1 ? "DWDM" :
+                          grid == 2 ? "CWDM" :
                           "unknown",
                           /* channel spacing */
-                          cs == 1 ? "100GHz" : 
+                          cs == 1 ? "100GHz" :
                           cs == 2 ? "50GHz" :
                           cs == 3 ? "25GHz" :
-                          cs == 4 ? "12.5GHz" : 
+                          cs == 4 ? "12.5GHz" :
                           "unknown",
                           /* n */
                           n,
@@ -3414,11 +3414,11 @@ dissect_glabel_lambda(proto_tree *ti _U_, proto_tree *rsvp_object_tree,
                           "n=%d, "
                           "wavelength=%unm",
                           /* grid */
-                          grid == 1 ? "DWDM" : 
-                          grid == 2 ? "CWDM" : 
+                          grid == 1 ? "DWDM" :
+                          grid == 2 ? "CWDM" :
                           "unknown",
                           /* channel spacing */
-                          cs == 1 ? "20nm" : 
+                          cs == 1 ? "20nm" :
                           "unknown",
                           /* n */
                           n,
@@ -3436,7 +3436,7 @@ dissect_glabel_lambda(proto_tree *ti _U_, proto_tree *rsvp_object_tree,
     return;
 }
 
-/* 
+/*
    FF: SONET/SDH label, see RFC 4606
 
     0                   1                   2                   3
@@ -3466,14 +3466,14 @@ dissect_glabel_sdh(proto_tree *ti _U_, proto_tree *rsvp_object_tree,
                         s, u, k, l, m);
 }
 
-/* 
+/*
     FF: G.709 label (aka ODUk label), see RFC 4328
 
      0                   1                   2                   3
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                   Reserved                |     t3    | t2  |t1
-    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+     
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 */
 static void
 dissect_glabel_g709(proto_tree *ti _U_, proto_tree *rsvp_object_tree,
@@ -4455,7 +4455,7 @@ dissect_rsvp_lsp_tunnel_if_id_tlv(proto_tree *rsvp_object_tree,
                                "Component link identifier: %u",
                                tvb_get_ntohl(tvb, offset+tlv_off+4));
            break;
-           
+
        case 2:
            ti = proto_tree_add_text(rsvp_object_tree, tvb,
                                     offset+tlv_off, tlv_len,
@@ -4470,7 +4470,7 @@ dissect_rsvp_lsp_tunnel_if_id_tlv(proto_tree *rsvp_object_tree,
                                "Component link identifier: %s",
                                ip_to_str(tvb_get_ptr(tvb, offset+tlv_off+4, 4)));
            break;
-           
+
        case 32769:  /* oif-p0040.002.09 demo spec */
            ti = proto_tree_add_text(rsvp_object_tree, tvb,
                                     offset+tlv_off, tlv_len,
@@ -5769,8 +5769,8 @@ dissect_rsvp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     struct rsvp_request_key request_key, *new_request_key;
     struct rsvp_request_val *request_val = NULL;
 
-       col_set_str(pinfo->cinfo, COL_PROTOCOL,
-                   (pinfo->ipproto == IP_PROTO_RSVPE2EI) ? "RSVP-E2EI" : "RSVP");
+    col_set_str(pinfo->cinfo, COL_PROTOCOL,
+                (pinfo->ipproto == IP_PROTO_RSVPE2EI) ? "RSVP-E2EI" : "RSVP");
     col_clear(pinfo->cinfo, COL_INFO);
 
     ver_flags = tvb_get_guint8(tvb, 0);
@@ -5784,13 +5784,13 @@ dissect_rsvp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     SET_ADDRESS(&rsvph->destination, pinfo->dst.type, pinfo->dst.len, pinfo->dst.data);
 
     col_add_str(pinfo->cinfo, COL_INFO,
-          val_to_str(message_type, message_type_vals, "Unknown (%u). "));
+                val_to_str(message_type, message_type_vals, "Unknown (%u). "));
        find_rsvp_session_tempfilt(tvb, 0, &session_off, &tempfilt_off);
        if (session_off)
            col_append_str(pinfo->cinfo, COL_INFO, summary_session(tvb, session_off));
        if (tempfilt_off)
            col_append_str(pinfo->cinfo, COL_INFO, summary_template(tvb, tempfilt_off));
-    
+
 
        col_add_str(pinfo->cinfo, COL_INFO,
                    val_to_str(message_type, message_type_vals, "Unknown (%u). "));
@@ -5808,7 +5808,7 @@ dissect_rsvp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        }
 
     if (tree) {
-               dissect_rsvp_msg_tree(tvb, pinfo, tree, TREE(TT_RSVP), rsvph);
+        dissect_rsvp_msg_tree(tvb, pinfo, tree, TREE(TT_RSVP), rsvph);
     }
 
     /* Find out what conversation this packet is part of. */
@@ -5890,12 +5890,12 @@ dissect_rsvp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
     /* If not, insert the new request key into the hash table */
     if (!request_val) {
-               new_request_key = se_memdup(&request_key, sizeof(struct rsvp_request_key));
+        new_request_key = se_memdup(&request_key, sizeof(struct rsvp_request_key));
 
-               request_val = se_alloc(sizeof(struct rsvp_request_val));
-               request_val->value = conversation->index;
+        request_val = se_alloc(sizeof(struct rsvp_request_val));
+        request_val->value = conversation->index;
 
-               g_hash_table_insert(rsvp_request_hash, new_request_key, request_val);
+        g_hash_table_insert(rsvp_request_hash, new_request_key, request_val);
     }
 
     tap_queue_packet(rsvp_tap, pinfo, rsvph);
@@ -5926,330 +5926,330 @@ proto_register_rsvp(void)
 {
     gint i;
 
-       static hf_register_info rsvpf_info[] = {
+    static hf_register_info rsvpf_info[] = {
 
-               /* Message type number */
-               {&hf_rsvp_filter[RSVPF_MSG],
-                { "Message Type", "rsvp.msg", FT_UINT8, BASE_DEC, VALS(message_type_vals), 0x0,
-                       NULL, HFILL }},
+        /* Message type number */
+        {&hf_rsvp_filter[RSVPF_MSG],
+         { "Message Type", "rsvp.msg", FT_UINT8, BASE_DEC, VALS(message_type_vals), 0x0,
+           NULL, HFILL }},
 
-               /* Message type shorthands */
-               {&hf_rsvp_filter[RSVPF_PATH],
-                { "Path Message", "rsvp.path", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
+        /* Message type shorthands */
+        {&hf_rsvp_filter[RSVPF_PATH],
+         { "Path Message", "rsvp.path", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
 
-               {&hf_rsvp_filter[RSVPF_RESV],
-                { "Resv Message", "rsvp.resv", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
+        {&hf_rsvp_filter[RSVPF_RESV],
+         { "Resv Message", "rsvp.resv", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
 
-               {&hf_rsvp_filter[RSVPF_PATHERR],
-                { "Path Error Message", "rsvp.perr", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
+        {&hf_rsvp_filter[RSVPF_PATHERR],
+         { "Path Error Message", "rsvp.perr", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
 
-               {&hf_rsvp_filter[RSVPF_RESVERR],
-                { "Resv Error Message", "rsvp.rerr", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
+        {&hf_rsvp_filter[RSVPF_RESVERR],
+         { "Resv Error Message", "rsvp.rerr", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
 
-               {&hf_rsvp_filter[RSVPF_PATHTEAR],
-                { "Path Tear Message", "rsvp.ptear", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
+        {&hf_rsvp_filter[RSVPF_PATHTEAR],
+         { "Path Tear Message", "rsvp.ptear", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
 
-               {&hf_rsvp_filter[RSVPF_RESVTEAR],
-                { "Resv Tear Message", "rsvp.rtear", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
+        {&hf_rsvp_filter[RSVPF_RESVTEAR],
+         { "Resv Tear Message", "rsvp.rtear", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
 
-               {&hf_rsvp_filter[RSVPF_RCONFIRM],
-                { "Resv Confirm Message", "rsvp.resvconf", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
+        {&hf_rsvp_filter[RSVPF_RCONFIRM],
+         { "Resv Confirm Message", "rsvp.resvconf", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
 
-               {&hf_rsvp_filter[RSVPF_RTEARCONFIRM],
-                { "Resv Tear Confirm Message", "rsvp.rtearconf", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
+        {&hf_rsvp_filter[RSVPF_RTEARCONFIRM],
+         { "Resv Tear Confirm Message", "rsvp.rtearconf", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
 
-               {&hf_rsvp_filter[RSVPF_BUNDLE],
-                { "Bundle Message", "rsvp.bundle", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
+        {&hf_rsvp_filter[RSVPF_BUNDLE],
+         { "Bundle Message", "rsvp.bundle", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
 
-               {&hf_rsvp_filter[RSVPF_ACK],
-                { "Ack Message", "rsvp.ack", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
+        {&hf_rsvp_filter[RSVPF_ACK],
+         { "Ack Message", "rsvp.ack", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
 
-               {&hf_rsvp_filter[RSVPF_SREFRESH],
-                { "Srefresh Message", "rsvp.srefresh", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
+        {&hf_rsvp_filter[RSVPF_SREFRESH],
+         { "Srefresh Message", "rsvp.srefresh", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
 
-               {&hf_rsvp_filter[RSVPF_HELLO],
-                { "HELLO Message", "rsvp.hello", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
+        {&hf_rsvp_filter[RSVPF_HELLO],
+         { "HELLO Message", "rsvp.hello", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
 
-               /* Object class */
-               {&hf_rsvp_filter[RSVPF_OBJECT],
-                { "Object class", "rsvp.object", FT_UINT8, BASE_DEC, VALS(rsvp_class_vals), 0x0,
-                       NULL, HFILL }},
+        /* Object class */
+        {&hf_rsvp_filter[RSVPF_OBJECT],
+         { "Object class", "rsvp.object", FT_UINT8, BASE_DEC, VALS(rsvp_class_vals), 0x0,
+           NULL, HFILL }},
 
-               {&hf_rsvp_filter[RSVPF_NOTIFY],
-                { "Notify Message", "rsvp.notify", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
-                  NULL, HFILL }},
+        {&hf_rsvp_filter[RSVPF_NOTIFY],
+         { "Notify Message", "rsvp.notify", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
 
-               /* Object present shorthands */
-               {&hf_rsvp_filter[RSVPF_SESSION],
-                { "SESSION", "rsvp.session", FT_NONE, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
+        /* Object present shorthands */
+        {&hf_rsvp_filter[RSVPF_SESSION],
+         { "SESSION", "rsvp.session", FT_NONE, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
 
-               {&hf_rsvp_filter[RSVPF_HOP],
-                { "HOP", "rsvp.hop", FT_NONE, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
+        {&hf_rsvp_filter[RSVPF_HOP],
+         { "HOP", "rsvp.hop", FT_NONE, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
 
-               {&hf_rsvp_filter[RSVPF_HELLO_OBJ],
-                { "HELLO Request/Ack", "rsvp.hello_obj", FT_NONE, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
+        {&hf_rsvp_filter[RSVPF_HELLO_OBJ],
+         { "HELLO Request/Ack", "rsvp.hello_obj", FT_NONE, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
 
-               {&hf_rsvp_filter[RSVPF_INTEGRITY],
-                { "INTEGRITY", "rsvp.integrity", FT_NONE, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
+        {&hf_rsvp_filter[RSVPF_INTEGRITY],
+         { "INTEGRITY", "rsvp.integrity", FT_NONE, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
 
-               {&hf_rsvp_filter[RSVPF_TIME_VALUES],
-                { "TIME VALUES", "rsvp.time", FT_NONE, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
+        {&hf_rsvp_filter[RSVPF_TIME_VALUES],
+         { "TIME VALUES", "rsvp.time", FT_NONE, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
 
-               {&hf_rsvp_filter[RSVPF_ERROR],
-                { "ERROR", "rsvp.error", FT_NONE, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
+        {&hf_rsvp_filter[RSVPF_ERROR],
+         { "ERROR", "rsvp.error", FT_NONE, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
 
-               {&hf_rsvp_filter[RSVPF_SCOPE],
-                { "SCOPE", "rsvp.scope", FT_NONE, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
+        {&hf_rsvp_filter[RSVPF_SCOPE],
+         { "SCOPE", "rsvp.scope", FT_NONE, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
 
-               {&hf_rsvp_filter[RSVPF_STYLE],
-                { "STYLE", "rsvp.style", FT_NONE, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
+        {&hf_rsvp_filter[RSVPF_STYLE],
+         { "STYLE", "rsvp.style", FT_NONE, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
 
-               {&hf_rsvp_filter[RSVPF_FLOWSPEC],
-                { "FLOWSPEC", "rsvp.flowspec", FT_NONE, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
+        {&hf_rsvp_filter[RSVPF_FLOWSPEC],
+         { "FLOWSPEC", "rsvp.flowspec", FT_NONE, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
 
-               {&hf_rsvp_filter[RSVPF_FILTER_SPEC],
-                { "FILTERSPEC", "rsvp.filter", FT_NONE, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
+        {&hf_rsvp_filter[RSVPF_FILTER_SPEC],
+         { "FILTERSPEC", "rsvp.filter", FT_NONE, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
 
-               {&hf_rsvp_filter[RSVPF_SENDER],
-                { "SENDER TEMPLATE", "rsvp.sender", FT_NONE, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
+        {&hf_rsvp_filter[RSVPF_SENDER],
+         { "SENDER TEMPLATE", "rsvp.sender", FT_NONE, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
 
-               {&hf_rsvp_filter[RSVPF_TSPEC],
-                { "SENDER TSPEC", "rsvp.tspec", FT_NONE, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
+        {&hf_rsvp_filter[RSVPF_TSPEC],
+         { "SENDER TSPEC", "rsvp.tspec", FT_NONE, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
 
-               {&hf_rsvp_filter[RSVPF_ADSPEC],
-                { "ADSPEC", "rsvp.adspec", FT_NONE, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
+        {&hf_rsvp_filter[RSVPF_ADSPEC],
+         { "ADSPEC", "rsvp.adspec", FT_NONE, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
 
-               {&hf_rsvp_filter[RSVPF_POLICY],
-                { "POLICY", "rsvp.policy", FT_NONE, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
+        {&hf_rsvp_filter[RSVPF_POLICY],
+         { "POLICY", "rsvp.policy", FT_NONE, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
 
-               {&hf_rsvp_filter[RSVPF_CONFIRM],
-                { "CONFIRM", "rsvp.confirm", FT_NONE, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
+        {&hf_rsvp_filter[RSVPF_CONFIRM],
+         { "CONFIRM", "rsvp.confirm", FT_NONE, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
 
-               {&hf_rsvp_filter[RSVPF_LABEL],
-                { "LABEL", "rsvp.label", FT_NONE, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
-
-               {&hf_rsvp_filter[RSVPF_RECOVERY_LABEL],
-                { "RECOVERY LABEL", "rsvp.recovery_label", FT_NONE, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
-
-               {&hf_rsvp_filter[RSVPF_UPSTREAM_LABEL],
-                { "UPSTREAM LABEL", "rsvp.upstream_label", FT_NONE, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
-
-               {&hf_rsvp_filter[RSVPF_SUGGESTED_LABEL],
-                { "SUGGESTED LABEL", "rsvp.suggested_label", FT_NONE, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
-
-               {&hf_rsvp_filter[RSVPF_LABEL_SET],
-                { "LABEL SET", "rsvp.label_set", FT_NONE, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
-
-               {&hf_rsvp_filter[RSVPF_ACCEPTABLE_LABEL_SET],
-                { "ACCEPTABLE LABEL SET", "rsvp.acceptable_label_set", FT_NONE, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
-
-               {&hf_rsvp_filter[RSVPF_PROTECTION],
-                { "PROTECTION", "rsvp.protection", FT_NONE, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
-
-               {&hf_rsvp_filter[RSVPF_DIFFSERV],
-                { "DIFFSERV", "rsvp.diffserv", FT_NONE, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
-
-               {&hf_rsvp_filter[RSVPF_DSTE],
-                { "CLASSTYPE", "rsvp.dste", FT_NONE, BASE_NONE, NULL, 0x0,
-                  NULL, HFILL }},
-
-               {&hf_rsvp_filter[RSVPF_RESTART_CAP],
-                { "RESTART CAPABILITY", "rsvp.restart", FT_NONE, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
-
-               {&hf_rsvp_filter[RSVPF_LABEL_REQUEST],
-                { "LABEL REQUEST", "rsvp.label_request", FT_NONE, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
+        {&hf_rsvp_filter[RSVPF_LABEL],
+         { "LABEL", "rsvp.label", FT_NONE, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
+
+        {&hf_rsvp_filter[RSVPF_RECOVERY_LABEL],
+         { "RECOVERY LABEL", "rsvp.recovery_label", FT_NONE, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
+
+        {&hf_rsvp_filter[RSVPF_UPSTREAM_LABEL],
+         { "UPSTREAM LABEL", "rsvp.upstream_label", FT_NONE, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
+
+        {&hf_rsvp_filter[RSVPF_SUGGESTED_LABEL],
+         { "SUGGESTED LABEL", "rsvp.suggested_label", FT_NONE, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
+
+        {&hf_rsvp_filter[RSVPF_LABEL_SET],
+         { "LABEL SET", "rsvp.label_set", FT_NONE, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
+
+        {&hf_rsvp_filter[RSVPF_ACCEPTABLE_LABEL_SET],
+         { "ACCEPTABLE LABEL SET", "rsvp.acceptable_label_set", FT_NONE, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
+
+        {&hf_rsvp_filter[RSVPF_PROTECTION],
+         { "PROTECTION", "rsvp.protection", FT_NONE, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
+
+        {&hf_rsvp_filter[RSVPF_DIFFSERV],
+         { "DIFFSERV", "rsvp.diffserv", FT_NONE, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
+
+        {&hf_rsvp_filter[RSVPF_DSTE],
+         { "CLASSTYPE", "rsvp.dste", FT_NONE, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
+
+        {&hf_rsvp_filter[RSVPF_RESTART_CAP],
+         { "RESTART CAPABILITY", "rsvp.restart", FT_NONE, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
+
+        {&hf_rsvp_filter[RSVPF_LABEL_REQUEST],
+         { "LABEL REQUEST", "rsvp.label_request", FT_NONE, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
 
-               {&hf_rsvp_filter[RSVPF_SESSION_ATTRIBUTE],
-                { "SESSION ATTRIBUTE", "rsvp.session_attribute", FT_NONE, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
+        {&hf_rsvp_filter[RSVPF_SESSION_ATTRIBUTE],
+         { "SESSION ATTRIBUTE", "rsvp.session_attribute", FT_NONE, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
 
-               {&hf_rsvp_filter[RSVPF_EXPLICIT_ROUTE],
-                { "EXPLICIT ROUTE", "rsvp.explicit_route", FT_NONE, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
+        {&hf_rsvp_filter[RSVPF_EXPLICIT_ROUTE],
+         { "EXPLICIT ROUTE", "rsvp.explicit_route", FT_NONE, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
 
-               {&hf_rsvp_filter[RSVPF_RECORD_ROUTE],
-                { "RECORD ROUTE", "rsvp.record_route", FT_NONE, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
+        {&hf_rsvp_filter[RSVPF_RECORD_ROUTE],
+         { "RECORD ROUTE", "rsvp.record_route", FT_NONE, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
 
-               {&hf_rsvp_filter[RSVPF_MESSAGE_ID],
-                { "MESSAGE-ID", "rsvp.msgid", FT_NONE, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
+        {&hf_rsvp_filter[RSVPF_MESSAGE_ID],
+         { "MESSAGE-ID", "rsvp.msgid", FT_NONE, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
 
-               {&hf_rsvp_filter[RSVPF_MESSAGE_ID_ACK],
-                { "MESSAGE-ID ACK", "rsvp.msgid_ack", FT_NONE, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
+        {&hf_rsvp_filter[RSVPF_MESSAGE_ID_ACK],
+         { "MESSAGE-ID ACK", "rsvp.msgid_ack", FT_NONE, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
 
-               {&hf_rsvp_filter[RSVPF_MESSAGE_ID_LIST],
-                { "MESSAGE-ID LIST", "rsvp.msgid_list", FT_NONE, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
+        {&hf_rsvp_filter[RSVPF_MESSAGE_ID_LIST],
+         { "MESSAGE-ID LIST", "rsvp.msgid_list", FT_NONE, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
 
-               {&hf_rsvp_filter[RSVPF_DCLASS],
-                { "DCLASS", "rsvp.dclass", FT_NONE, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
+        {&hf_rsvp_filter[RSVPF_DCLASS],
+         { "DCLASS", "rsvp.dclass", FT_NONE, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
 
-               {&hf_rsvp_filter[RSVPF_LSP_TUNNEL_IF_ID],
-                { "LSP INTERFACE-ID", "rsvp.lsp_tunnel_if_id", FT_NONE, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
-
-               {&hf_rsvp_filter[RSVPF_ADMIN_STATUS],
-                { "ADMIN STATUS", "rsvp.admin_status", FT_NONE, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
-
-               {&hf_rsvp_filter[RSVPF_ASSOCIATION],
-                { "ASSOCIATION", "rsvp.association", FT_NONE, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
-
-               {&hf_rsvp_filter[RSVPF_NOTIFY_REQUEST],
-                { "NOTIFY REQUEST", "rsvp.notify_request", FT_NONE, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
-
-               {&hf_rsvp_filter[RSVPF_GENERALIZED_UNI],
-                { "GENERALIZED UNI", "rsvp.generalized_uni", FT_NONE, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
-
-               {&hf_rsvp_filter[RSVPF_CALL_ID],
-                { "CALL ID", "rsvp.call_id", FT_NONE, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
-
-               {&hf_rsvp_filter[RSVPF_UNKNOWN_OBJ],
-                { "Unknown object", "rsvp.obj_unknown", FT_NONE, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
-
-               /* Session fields */
-               {&hf_rsvp_filter[RSVPF_SESSION_IP],
-                { "Destination address", "rsvp.session.ip", FT_IPv4, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
-
-               {&hf_rsvp_filter[RSVPF_SESSION_PORT],
-                { "Port number", "rsvp.session.port", FT_UINT16, BASE_DEC, NULL, 0x0,
-                       NULL, HFILL }},
-
-               {&hf_rsvp_filter[RSVPF_SESSION_PROTO],
-                { "Protocol", "rsvp.session.proto", FT_UINT8, BASE_DEC, VALS(proto_vals), 0x0,
-                       NULL, HFILL }},
-
-               {&hf_rsvp_filter[RSVPF_SESSION_TUNNEL_ID],
-                { "Tunnel ID", "rsvp.session.tunnel_id", FT_UINT16, BASE_DEC, NULL, 0x0,
-                       NULL, HFILL }},
-
-               {&hf_rsvp_filter[RSVPF_SESSION_EXT_TUNNEL_ID],
-                { "Extended tunnel ID", "rsvp.session.ext_tunnel_id", FT_UINT32, BASE_DEC, NULL, 0x0,
-                       NULL, HFILL }},
-
-               /* Sender template/Filterspec fields */
-               {&hf_rsvp_filter[RSVPF_SENDER_IP],
-                { "Sender IPv4 address", "rsvp.sender.ip", FT_IPv4, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
-
-               {&hf_rsvp_filter[RSVPF_SENDER_PORT],
-                { "Sender port number", "rsvp.sender.port", FT_UINT16, BASE_DEC, NULL, 0x0,
-                  NULL, HFILL }},
-
-               {&hf_rsvp_filter[RSVPF_SENDER_LSP_ID],
-                { "Sender LSP ID", "rsvp.sender.lsp_id", FT_UINT16, BASE_DEC, NULL, 0x0,
-                       NULL, HFILL }},
-
-               /* Diffserv object fields */
-               {&hf_rsvp_filter[RSVPF_DIFFSERV_MAPNB],
-                { "MAPnb", "rsvp.diffserv.mapnb", FT_UINT8, BASE_DEC, NULL, 0x0,
-                  MAPNB_DESCRIPTION, HFILL }},
-
-               {&hf_rsvp_filter[RSVPF_DIFFSERV_MAP],
-                { "MAP", "rsvp.diffserv.map", FT_NONE, BASE_NONE, NULL, 0x0,
-                  MAP_DESCRIPTION, HFILL }},
-
-               {&hf_rsvp_filter[RSVPF_DIFFSERV_MAP_EXP],
-                { "EXP", "rsvp.diffserv.map.exp", FT_UINT8, BASE_DEC, NULL, 0x0,
-                  EXP_DESCRIPTION, HFILL }},
-
-               {&hf_rsvp_filter[RSVPF_DIFFSERV_PHBID],
-                { PHBID_DESCRIPTION, "rsvp.diffserv.phbid", FT_NONE, BASE_NONE, NULL, 0x0,
-                  NULL, HFILL }},
-
-               {&hf_rsvp_filter[RSVPF_DIFFSERV_PHBID_DSCP],
-                { PHBID_DSCP_DESCRIPTION, "rsvp.diffserv.phbid.dscp", FT_UINT16,
-                  BASE_DEC, NULL, PHBID_DSCP_MASK, NULL, HFILL }},
-
-               {&hf_rsvp_filter[RSVPF_DIFFSERV_PHBID_CODE],
-                { PHBID_CODE_DESCRIPTION, "rsvp.diffserv.phbid.code", FT_UINT16,
-                  BASE_DEC, NULL, PHBID_CODE_MASK, NULL, HFILL }},
-
-               {&hf_rsvp_filter[RSVPF_DIFFSERV_PHBID_BIT14],
-                { PHBID_BIT14_DESCRIPTION, "rsvp.diffserv.phbid.bit14", FT_UINT16,
-                  BASE_DEC, VALS(phbid_bit14_vals), PHBID_BIT14_MASK, NULL, HFILL }},
-
-               {&hf_rsvp_filter[RSVPF_DIFFSERV_PHBID_BIT15],
-                { PHBID_BIT15_DESCRIPTION, "rsvp.diffserv.phbid.bit15", FT_UINT16,
-                  BASE_DEC, VALS(phbid_bit15_vals), PHBID_BIT15_MASK, NULL, HFILL }},
-
-               /* Diffserv-aware TE object field */
-               {&hf_rsvp_filter[RSVPF_DSTE_CLASSTYPE],
-                { "CT", "rsvp.dste.classtype", FT_UINT8, BASE_DEC, NULL, 0x0,
-                  NULL, HFILL }},
-
-               /* Generalized UNI object field */
-               {&hf_rsvp_filter[RSVPF_GUNI_SRC_IPV4],
-                { "Source TNA", "rsvp.guni.srctna.ipv4", FT_IPv4, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
-
-               {&hf_rsvp_filter[RSVPF_GUNI_DST_IPV4],
-                { "Destination TNA", "rsvp.guni.dsttna.ipv4", FT_IPv4, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
-
-               {&hf_rsvp_filter[RSVPF_GUNI_SRC_IPV6],
-                { "Source TNA", "rsvp.guni.srctna.ipv6", FT_IPv6, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
-
-               {&hf_rsvp_filter[RSVPF_GUNI_DST_IPV6],
-                { "Destination TNA", "rsvp.guni.dsttna.ipv6", FT_IPv6, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }},
-
-               /* Generalized UNI object field */
-               {&hf_rsvp_filter[RSVPF_CALL_ID_SRC_ADDR_IPV4],
-                { "Source Transport Network Address", "rsvp.callid.srcaddr.ipv4", FT_IPv4,
-                       BASE_NONE, NULL, 0x0, NULL, HFILL }},
-
-               {&hf_rsvp_filter[RSVPF_CALL_ID_SRC_ADDR_IPV6],
-                { "Source Transport Network Address", "rsvp.callid.srcaddr.ipv6", FT_IPv6,
-                       BASE_NONE, NULL, 0x0, NULL, HFILL }}
-       };
+        {&hf_rsvp_filter[RSVPF_LSP_TUNNEL_IF_ID],
+         { "LSP INTERFACE-ID", "rsvp.lsp_tunnel_if_id", FT_NONE, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
+
+        {&hf_rsvp_filter[RSVPF_ADMIN_STATUS],
+         { "ADMIN STATUS", "rsvp.admin_status", FT_NONE, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
+
+        {&hf_rsvp_filter[RSVPF_ASSOCIATION],
+         { "ASSOCIATION", "rsvp.association", FT_NONE, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
+
+        {&hf_rsvp_filter[RSVPF_NOTIFY_REQUEST],
+         { "NOTIFY REQUEST", "rsvp.notify_request", FT_NONE, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
+
+        {&hf_rsvp_filter[RSVPF_GENERALIZED_UNI],
+         { "GENERALIZED UNI", "rsvp.generalized_uni", FT_NONE, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
+
+        {&hf_rsvp_filter[RSVPF_CALL_ID],
+         { "CALL ID", "rsvp.call_id", FT_NONE, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
+
+        {&hf_rsvp_filter[RSVPF_UNKNOWN_OBJ],
+         { "Unknown object", "rsvp.obj_unknown", FT_NONE, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
+
+        /* Session fields */
+        {&hf_rsvp_filter[RSVPF_SESSION_IP],
+         { "Destination address", "rsvp.session.ip", FT_IPv4, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
+
+        {&hf_rsvp_filter[RSVPF_SESSION_PORT],
+         { "Port number", "rsvp.session.port", FT_UINT16, BASE_DEC, NULL, 0x0,
+           NULL, HFILL }},
+
+        {&hf_rsvp_filter[RSVPF_SESSION_PROTO],
+         { "Protocol", "rsvp.session.proto", FT_UINT8, BASE_DEC, VALS(proto_vals), 0x0,
+           NULL, HFILL }},
+
+        {&hf_rsvp_filter[RSVPF_SESSION_TUNNEL_ID],
+         { "Tunnel ID", "rsvp.session.tunnel_id", FT_UINT16, BASE_DEC, NULL, 0x0,
+           NULL, HFILL }},
+
+        {&hf_rsvp_filter[RSVPF_SESSION_EXT_TUNNEL_ID],
+         { "Extended tunnel ID", "rsvp.session.ext_tunnel_id", FT_UINT32, BASE_DEC, NULL, 0x0,
+           NULL, HFILL }},
+
+        /* Sender template/Filterspec fields */
+        {&hf_rsvp_filter[RSVPF_SENDER_IP],
+         { "Sender IPv4 address", "rsvp.sender.ip", FT_IPv4, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
+
+        {&hf_rsvp_filter[RSVPF_SENDER_PORT],
+         { "Sender port number", "rsvp.sender.port", FT_UINT16, BASE_DEC, NULL, 0x0,
+           NULL, HFILL }},
+
+        {&hf_rsvp_filter[RSVPF_SENDER_LSP_ID],
+         { "Sender LSP ID", "rsvp.sender.lsp_id", FT_UINT16, BASE_DEC, NULL, 0x0,
+           NULL, HFILL }},
+
+        /* Diffserv object fields */
+        {&hf_rsvp_filter[RSVPF_DIFFSERV_MAPNB],
+         { "MAPnb", "rsvp.diffserv.mapnb", FT_UINT8, BASE_DEC, NULL, 0x0,
+           MAPNB_DESCRIPTION, HFILL }},
+
+        {&hf_rsvp_filter[RSVPF_DIFFSERV_MAP],
+         { "MAP", "rsvp.diffserv.map", FT_NONE, BASE_NONE, NULL, 0x0,
+           MAP_DESCRIPTION, HFILL }},
+
+        {&hf_rsvp_filter[RSVPF_DIFFSERV_MAP_EXP],
+         { "EXP", "rsvp.diffserv.map.exp", FT_UINT8, BASE_DEC, NULL, 0x0,
+           EXP_DESCRIPTION, HFILL }},
+
+        {&hf_rsvp_filter[RSVPF_DIFFSERV_PHBID],
+         { PHBID_DESCRIPTION, "rsvp.diffserv.phbid", FT_NONE, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
+
+        {&hf_rsvp_filter[RSVPF_DIFFSERV_PHBID_DSCP],
+         { PHBID_DSCP_DESCRIPTION, "rsvp.diffserv.phbid.dscp", FT_UINT16,
+           BASE_DEC, NULL, PHBID_DSCP_MASK, NULL, HFILL }},
+
+        {&hf_rsvp_filter[RSVPF_DIFFSERV_PHBID_CODE],
+         { PHBID_CODE_DESCRIPTION, "rsvp.diffserv.phbid.code", FT_UINT16,
+           BASE_DEC, NULL, PHBID_CODE_MASK, NULL, HFILL }},
+
+        {&hf_rsvp_filter[RSVPF_DIFFSERV_PHBID_BIT14],
+         { PHBID_BIT14_DESCRIPTION, "rsvp.diffserv.phbid.bit14", FT_UINT16,
+           BASE_DEC, VALS(phbid_bit14_vals), PHBID_BIT14_MASK, NULL, HFILL }},
+
+        {&hf_rsvp_filter[RSVPF_DIFFSERV_PHBID_BIT15],
+         { PHBID_BIT15_DESCRIPTION, "rsvp.diffserv.phbid.bit15", FT_UINT16,
+           BASE_DEC, VALS(phbid_bit15_vals), PHBID_BIT15_MASK, NULL, HFILL }},
+
+        /* Diffserv-aware TE object field */
+        {&hf_rsvp_filter[RSVPF_DSTE_CLASSTYPE],
+         { "CT", "rsvp.dste.classtype", FT_UINT8, BASE_DEC, NULL, 0x0,
+           NULL, HFILL }},
+
+        /* Generalized UNI object field */
+        {&hf_rsvp_filter[RSVPF_GUNI_SRC_IPV4],
+         { "Source TNA", "rsvp.guni.srctna.ipv4", FT_IPv4, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
+
+        {&hf_rsvp_filter[RSVPF_GUNI_DST_IPV4],
+         { "Destination TNA", "rsvp.guni.dsttna.ipv4", FT_IPv4, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
+
+        {&hf_rsvp_filter[RSVPF_GUNI_SRC_IPV6],
+         { "Source TNA", "rsvp.guni.srctna.ipv6", FT_IPv6, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
+
+        {&hf_rsvp_filter[RSVPF_GUNI_DST_IPV6],
+         { "Destination TNA", "rsvp.guni.dsttna.ipv6", FT_IPv6, BASE_NONE, NULL, 0x0,
+           NULL, HFILL }},
+
+        /* Generalized UNI object field */
+        {&hf_rsvp_filter[RSVPF_CALL_ID_SRC_ADDR_IPV4],
+         { "Source Transport Network Address", "rsvp.callid.srcaddr.ipv4", FT_IPv4,
+           BASE_NONE, NULL, 0x0, NULL, HFILL }},
+
+        {&hf_rsvp_filter[RSVPF_CALL_ID_SRC_ADDR_IPV6],
+         { "Source Transport Network Address", "rsvp.callid.srcaddr.ipv6", FT_IPv6,
+           BASE_NONE, NULL, 0x0, NULL, HFILL }}
+    };
 
     gint *ett_tree[TT_MAX];
 
index f09616c80a01b93d87e6573c7bd7a964b9667f14..cc8d69f8f718387afa3bddcf0816a80a9c68f865 100644 (file)
@@ -321,7 +321,7 @@ static const value_string chunk_type_values[] = {
   { SCTP_IETF_EXT,                   "IETF_EXTENSION" },
   { 0,                               NULL } };
 
-/* 
+/*
  * Based on http://www.iana.org/assignments/sctp-parameters
  * as of August 23rd, 2009
  */
@@ -430,40 +430,40 @@ static struct _sctp_info sctp_info;
 static unsigned int
 sctp_adler32(const unsigned char* buf, unsigned int len)
 {
-    unsigned int s1 = 1L;
-    unsigned int s2 = 0L;
-    int k;
-
-    /* handle the first 8 bytes of the datagram */
-    DO8(buf,0);
-    buf += SOURCE_PORT_LENGTH +
-           DESTINATION_PORT_LENGTH +
-           VERIFICATION_TAG_LENGTH;
-
-    /* handle four 0 bytes as checksum */
-    s2  += CHECKSUM_LENGTH * s1;
-    buf += CHECKSUM_LENGTH;
-
-    /* now we have 12 bytes handled */
-    len -= COMMON_HEADER_LENGTH;
-
-    /* handle the rest of the datagram */
-    while (len > 0) {
-        k = len < NMAX ? len : NMAX;
-        len -= k;
-        while (k >= 16) {
-            DO16(buf);
-            buf += 16;
-            k -= 16;
-        }
-        if (k != 0) do {
-            s1 += *buf++;
-            s2 += s1;
-        } while (--k);
-        s1 %= BASE;
-        s2 %= BASE;
+  unsigned int s1 = 1L;
+  unsigned int s2 = 0L;
+  int k;
+
+  /* handle the first 8 bytes of the datagram */
+  DO8(buf,0);
+  buf += SOURCE_PORT_LENGTH +
+    DESTINATION_PORT_LENGTH +
+    VERIFICATION_TAG_LENGTH;
+
+  /* handle four 0 bytes as checksum */
+  s2  += CHECKSUM_LENGTH * s1;
+  buf += CHECKSUM_LENGTH;
+
+  /* now we have 12 bytes handled */
+  len -= COMMON_HEADER_LENGTH;
+
+  /* handle the rest of the datagram */
+  while (len > 0) {
+    k = len < NMAX ? len : NMAX;
+    len -= k;
+    while (k >= 16) {
+      DO16(buf);
+      buf += 16;
+      k -= 16;
     }
-    return (s2 << 16) | s1;
+    if (k != 0) do {
+        s1 += *buf++;
+        s2 += s1;
+      } while (--k);
+    s1 %= BASE;
+    s2 %= BASE;
+  }
+  return (s2 << 16) | s1;
 }
 
 
@@ -519,72 +519,72 @@ static void dissect_sctp_packet(tvbuff_t *, packet_info *, proto_tree *, gboolea
 /* TSN ANALYSIS CODE */
 
 struct _sctp_half_assoc_t {
-       guint32 spt;
-       guint32 dpt;
-       guint32 vtag;
+  guint32 spt;
+  guint32 dpt;
+  guint32 vtag;
 
-       gboolean started;
+  gboolean started;
 
-       guint32 first_tsn; /* start */
-       guint32 cumm_ack; /* rel */
-       emem_tree_t *tsns; /* sctp_tsn_t* by rel_tsn */
-       emem_tree_t *tsn_acks; /* sctp_tsn_t* by ctsn_frame */
+  guint32 first_tsn; /* start */
+  guint32 cumm_ack; /* rel */
+  emem_tree_t *tsns; /* sctp_tsn_t* by rel_tsn */
+  emem_tree_t *tsn_acks; /* sctp_tsn_t* by ctsn_frame */
 
-       struct _sctp_half_assoc_t *peer;
+  struct _sctp_half_assoc_t *peer;
 };
 
 
 
 typedef struct _sctp_tsn_t {
-       guint32 tsn;
-       struct {
-               guint32 framenum;
-               nstime_t ts;
-       } first_transmit;
-       struct {
-               guint32 framenum;
-               nstime_t ts;
-       } ack;
-       struct _retransmit_t {
-               guint32 framenum;
-               nstime_t ts;
-               struct _retransmit_t *next;
-       } *retransmit;
-       guint32 retransmit_count;
-       struct _sctp_tsn_t *next;
+  guint32 tsn;
+  struct {
+    guint32 framenum;
+    nstime_t ts;
+  } first_transmit;
+  struct {
+    guint32 framenum;
+    nstime_t ts;
+  } ack;
+  struct _retransmit_t {
+    guint32 framenum;
+    nstime_t ts;
+    struct _retransmit_t *next;
+  } *retransmit;
+  guint32 retransmit_count;
+  struct _sctp_tsn_t *next;
 } sctp_tsn_t;
 
 
 static emem_tree_key_t*
 make_address_key(guint32 spt, guint32 dpt, address *addr)
 {
-       emem_tree_key_t *k = ep_alloc(sizeof(emem_tree_key_t)*6);
+  emem_tree_key_t *k = ep_alloc(sizeof(emem_tree_key_t)*6);
 
-       k[0].length = 1;    k[0].key = ep_memdup(&spt,sizeof(spt));
-       k[1].length = 1;    k[1].key = ep_memdup(&dpt,sizeof(dpt));
-       k[2].length = 1;    k[2].key = (guint32*)(void *)&(addr->type);
-       k[3].length = 1;    k[3].key = (guint32*)(void *)&(addr->len);
+  k[0].length = 1;    k[0].key = ep_memdup(&spt,sizeof(spt));
+  k[1].length = 1;    k[1].key = ep_memdup(&dpt,sizeof(dpt));
+  k[2].length = 1;    k[2].key = (guint32*)(void *)&(addr->type);
+  k[3].length = 1;    k[3].key = (guint32*)(void *)&(addr->len);
 
-       k[4].length = ((addr->len/4)+1);
-       k[4].key = ep_alloc0(((addr->len/4)+1)*4);
-       if (addr->len) memcpy(k[4].key, addr->data, addr->len);
+  k[4].length = ((addr->len/4)+1);
+  k[4].key = ep_alloc0(((addr->len/4)+1)*4);
+  if (addr->len) memcpy(k[4].key, addr->data, addr->len);
 
-       k[5].length = 0;    k[5].key = NULL;
+  k[5].length = 0;    k[5].key = NULL;
 
-       return k;
+  return k;
 }
 
 static emem_tree_key_t *
 make_dir_key(guint32 spt, guint32 dpt, guint32 vtag)
 {
-       emem_tree_key_t *k =  ep_alloc(sizeof(emem_tree_key_t)*4);
+  emem_tree_key_t *k =  ep_alloc(sizeof(emem_tree_key_t)*4);
 
-       k[0].length = 1;    k[0].key = ep_memdup(&spt,sizeof(spt));
-       k[1].length = 1;    k[1].key = ep_memdup(&dpt,sizeof(dpt));
-       k[2].length = 1;    k[2].key = ep_memdup(&vtag,sizeof(vtag));
-       k[3].length = 0;    k[3].key = NULL;
+  k[0].length = 1;    k[0].key = ep_memdup(&spt,sizeof(spt));
+  k[1].length = 1;    k[1].key = ep_memdup(&dpt,sizeof(dpt));
+  k[2].length = 1;    k[2].key = ep_memdup(&vtag,sizeof(vtag));
+  k[3].length = 0;    k[3].key = NULL;
 
-       return k;
+  return k;
 }
 
 
@@ -595,56 +595,56 @@ static emem_tree_t *dirs_by_ptaddr; /* sctp_half_assoc_t**, it may contain a nul
 static sctp_half_assoc_t *
 get_half_assoc(packet_info *pinfo, guint32 spt, guint32 dpt, guint32 vtag)
 {
-       sctp_half_assoc_t *ha;
-       sctp_half_assoc_t **hb;
-       emem_tree_key_t *k;
-
-       if (!enable_tsn_analysis || !vtag) return NULL;
-
-       /* look for the current half_assoc by spt, dpt and vtag */
-
-       k = make_dir_key(spt, dpt, vtag);
-       if (( ha = emem_tree_lookup32_array(dirs_by_ptvtag, k)  )) {
-               /* found, if it has been already matched we're done */
-               if (ha->peer) return ha;
-       } else {
-               /* not found, make a new one and add it to the table */
-               ha = se_alloc0(sizeof(sctp_half_assoc_t));
-               ha->spt = spt;
-               ha->dpt = dpt;
-               ha->vtag = vtag;
-               ha->tsns = se_tree_create_non_persistent(EMEM_TREE_TYPE_RED_BLACK,"");
-               ha->tsn_acks = se_tree_create_non_persistent(EMEM_TREE_TYPE_RED_BLACK,"");
-               ha->started = FALSE;
-               ha->first_tsn= 0;
-               ha->cumm_ack= 0;
-
-               /* add this half to the table indexed by ports and vtag */
-               emem_tree_insert32_array(dirs_by_ptvtag, k, ha);
-       }
-
-       /* at this point we have an unmatched half, look for its other half using the ports and IP address */
-       k = make_address_key(dpt, spt, &(pinfo->dst));
-
-       if (( hb = emem_tree_lookup32_array(dirs_by_ptaddr, k) )) {
-               /*the table contains a pointer to a pointer to a half */
-               if (! *hb) {
-                       /* if there is no half pointed by this, add the current half to the table */
-                       *hb = ha;
-               } else {
-                       /* there's a half pointed by this, assume it's our peer and clear the table's pointer */
-                       ha->peer = *hb;
-                       (*hb)->peer = ha;
-                       *hb = NULL;
-               }
-       } else {
-               /* we found no entry in the table: add one (using reversed ports and src addresss) so that it can be matched later */
-               *(hb = se_alloc(sizeof(void*))) = ha;
-               k = make_address_key(spt, dpt, &(pinfo->src));
-               emem_tree_insert32_array(dirs_by_ptaddr, k, hb);
-       }
-
-       return ha;
+  sctp_half_assoc_t *ha;
+  sctp_half_assoc_t **hb;
+  emem_tree_key_t *k;
+
+  if (!enable_tsn_analysis || !vtag) return NULL;
+
+  /* look for the current half_assoc by spt, dpt and vtag */
+
+  k = make_dir_key(spt, dpt, vtag);
+  if (( ha = emem_tree_lookup32_array(dirs_by_ptvtag, k)  )) {
+    /* found, if it has been already matched we're done */
+    if (ha->peer) return ha;
+  } else {
+    /* not found, make a new one and add it to the table */
+    ha = se_alloc0(sizeof(sctp_half_assoc_t));
+    ha->spt = spt;
+    ha->dpt = dpt;
+    ha->vtag = vtag;
+    ha->tsns = se_tree_create_non_persistent(EMEM_TREE_TYPE_RED_BLACK,"");
+    ha->tsn_acks = se_tree_create_non_persistent(EMEM_TREE_TYPE_RED_BLACK,"");
+    ha->started = FALSE;
+    ha->first_tsn= 0;
+    ha->cumm_ack= 0;
+
+    /* add this half to the table indexed by ports and vtag */
+    emem_tree_insert32_array(dirs_by_ptvtag, k, ha);
+  }
+
+  /* at this point we have an unmatched half, look for its other half using the ports and IP address */
+  k = make_address_key(dpt, spt, &(pinfo->dst));
+
+  if (( hb = emem_tree_lookup32_array(dirs_by_ptaddr, k) )) {
+    /*the table contains a pointer to a pointer to a half */
+    if (! *hb) {
+      /* if there is no half pointed by this, add the current half to the table */
+      *hb = ha;
+    } else {
+      /* there's a half pointed by this, assume it's our peer and clear the table's pointer */
+      ha->peer = *hb;
+      (*hb)->peer = ha;
+      *hb = NULL;
+    }
+  } else {
+    /* we found no entry in the table: add one (using reversed ports and src addresss) so that it can be matched later */
+    *(hb = se_alloc(sizeof(void*))) = ha;
+    k = make_address_key(spt, dpt, &(pinfo->src));
+    emem_tree_insert32_array(dirs_by_ptaddr, k, hb);
+  }
+
+  return ha;
 }
 
 /*  Limit the number of retransmissions we track (to limit memory usage--and
@@ -654,295 +654,295 @@ get_half_assoc(packet_info *pinfo, guint32 spt, guint32 dpt, guint32 vtag)
 
 static void
 tsn_tree(sctp_tsn_t *t, proto_item *tsn_item, packet_info *pinfo,
-        tvbuff_t *tvb, guint32 framenum)
+         tvbuff_t *tvb, guint32 framenum)
 {
-       proto_item *pi;
-       proto_tree *pt;
-       proto_tree *tsn_tree_pt = proto_item_add_subtree(tsn_item, ett_sctp_tsn);
-
-       if (t->first_transmit.framenum != framenum) {
-               nstime_t rto;
-
-               pi = proto_tree_add_uint(tsn_tree_pt, hf_sctp_retransmission, tvb, 0, 0, t->first_transmit.framenum);
-               pt = proto_item_add_subtree(pi, ett_sctp_tsn_retransmission);
-               PROTO_ITEM_SET_GENERATED(pi);
-               expert_add_info_format(pinfo, pi, PI_SEQUENCE, PI_NOTE, "Retransmitted TSN");
-
-               nstime_delta( &rto, &pinfo->fd->abs_ts, &(t->first_transmit.ts) );
-               pi = proto_tree_add_time(pt, hf_sctp_rto, tvb, 0, 0, &rto);
-               PROTO_ITEM_SET_GENERATED(pi);
-
-               /* Detect reneged acks */
-               /* XXX what if the frames aren't sorted by time? */
-               if (t->ack.framenum && t->ack.framenum < framenum)
-               {
-                       pi = proto_tree_add_uint_format(pt, hf_sctp_retransmitted_after_ack, tvb, 0, 0, t->ack.framenum,
-                                                          "This TSN was acked (in frame %u) prior to this retransmission (reneged ack?)",
-                                                          t->ack.framenum);
-                       PROTO_ITEM_SET_GENERATED(pi);
-                       expert_add_info_format(pinfo, pi, PI_SEQUENCE, PI_WARN,
-                                              "This TSN was acked prior to this retransmission (reneged ack?)");
-               }
-       } else if (t->retransmit) {
-               struct _retransmit_t **r;
-               nstime_t rto;
-               char ds[64];
-
-               if (t->retransmit_count > MAX_RETRANS_TRACKED_PER_TSN)
-                       g_snprintf(ds, sizeof(ds), " (only %d displayed)", MAX_RETRANS_TRACKED_PER_TSN);
-               else
-                       ds[0] = 0;
-
-               pi = proto_tree_add_uint_format(tsn_tree_pt,
-                                               hf_sctp_retransmitted_count,
-                                               tvb, 0, 0, t->retransmit_count,
-                                               "This TSN was retransmitted %u time%s%s",
-                                               t->retransmit_count,
-                                               plurality(t->retransmit_count, "", "s"),
-                                               ds);
-               PROTO_ITEM_SET_GENERATED(pi);
-
-               if (t->retransmit_count > 2)
-                       expert_add_info_format(pinfo, pi, PI_SEQUENCE, PI_WARN,
-                                              "This TSN was retransmitted more than 2 times");
-
-               pt = proto_item_add_subtree(pi, ett_sctp_tsn_retransmitted_count);
-
-               r = &t->retransmit;
-               while (*r) {
-                       nstime_delta(&rto, &((*r)->ts), &pinfo->fd->abs_ts);
-                       pi = proto_tree_add_uint_format(pt,
-                                                       hf_sctp_retransmitted,
-                                                       tvb, 0, 0,
-                                                       (*r)->framenum,
-                                                       "This TSN was retransmitted in frame %u (%s seconds after this frame)",
-                                                       (*r)->framenum,
-                                                       rel_time_to_secs_str(&rto));
-                       PROTO_ITEM_SET_GENERATED(pi);
-                       r = &(*r)->next;
-               }
-       }
-
-       if (t->ack.framenum) {
-               nstime_t rtt;
-
-               pi = proto_tree_add_uint(tsn_tree_pt, hf_sctp_acked, tvb, 0 , 0, t->ack.framenum);
-               PROTO_ITEM_SET_GENERATED(pi);
-               pt = proto_item_add_subtree(pi, ett_sctp_ack);
-
-               nstime_delta( &rtt, &(t->ack.ts), &(t->first_transmit.ts) );
-               pi = proto_tree_add_time(pt, hf_sctp_rtt, tvb, 0, 0, &rtt);
-               PROTO_ITEM_SET_GENERATED(pi);
-       }
+  proto_item *pi;
+  proto_tree *pt;
+  proto_tree *tsn_tree_pt = proto_item_add_subtree(tsn_item, ett_sctp_tsn);
+
+  if (t->first_transmit.framenum != framenum) {
+    nstime_t rto;
+
+    pi = proto_tree_add_uint(tsn_tree_pt, hf_sctp_retransmission, tvb, 0, 0, t->first_transmit.framenum);
+    pt = proto_item_add_subtree(pi, ett_sctp_tsn_retransmission);
+    PROTO_ITEM_SET_GENERATED(pi);
+    expert_add_info_format(pinfo, pi, PI_SEQUENCE, PI_NOTE, "Retransmitted TSN");
+
+    nstime_delta( &rto, &pinfo->fd->abs_ts, &(t->first_transmit.ts) );
+    pi = proto_tree_add_time(pt, hf_sctp_rto, tvb, 0, 0, &rto);
+    PROTO_ITEM_SET_GENERATED(pi);
+
+    /* Detect reneged acks */
+    /* XXX what if the frames aren't sorted by time? */
+    if (t->ack.framenum && t->ack.framenum < framenum)
+    {
+      pi = proto_tree_add_uint_format(pt, hf_sctp_retransmitted_after_ack, tvb, 0, 0, t->ack.framenum,
+                                      "This TSN was acked (in frame %u) prior to this retransmission (reneged ack?)",
+                                      t->ack.framenum);
+      PROTO_ITEM_SET_GENERATED(pi);
+      expert_add_info_format(pinfo, pi, PI_SEQUENCE, PI_WARN,
+                             "This TSN was acked prior to this retransmission (reneged ack?)");
+    }
+  } else if (t->retransmit) {
+    struct _retransmit_t **r;
+    nstime_t rto;
+    char ds[64];
+
+    if (t->retransmit_count > MAX_RETRANS_TRACKED_PER_TSN)
+      g_snprintf(ds, sizeof(ds), " (only %d displayed)", MAX_RETRANS_TRACKED_PER_TSN);
+    else
+      ds[0] = 0;
+
+    pi = proto_tree_add_uint_format(tsn_tree_pt,
+                                    hf_sctp_retransmitted_count,
+                                    tvb, 0, 0, t->retransmit_count,
+                                    "This TSN was retransmitted %u time%s%s",
+                                    t->retransmit_count,
+                                    plurality(t->retransmit_count, "", "s"),
+                                    ds);
+    PROTO_ITEM_SET_GENERATED(pi);
+
+    if (t->retransmit_count > 2)
+      expert_add_info_format(pinfo, pi, PI_SEQUENCE, PI_WARN,
+                             "This TSN was retransmitted more than 2 times");
+
+    pt = proto_item_add_subtree(pi, ett_sctp_tsn_retransmitted_count);
+
+    r = &t->retransmit;
+    while (*r) {
+      nstime_delta(&rto, &((*r)->ts), &pinfo->fd->abs_ts);
+      pi = proto_tree_add_uint_format(pt,
+                                      hf_sctp_retransmitted,
+                                      tvb, 0, 0,
+                                      (*r)->framenum,
+                                      "This TSN was retransmitted in frame %u (%s seconds after this frame)",
+                                      (*r)->framenum,
+                                      rel_time_to_secs_str(&rto));
+      PROTO_ITEM_SET_GENERATED(pi);
+      r = &(*r)->next;
+    }
+  }
+
+  if (t->ack.framenum) {
+    nstime_t rtt;
+
+    pi = proto_tree_add_uint(tsn_tree_pt, hf_sctp_acked, tvb, 0 , 0, t->ack.framenum);
+    PROTO_ITEM_SET_GENERATED(pi);
+    pt = proto_item_add_subtree(pi, ett_sctp_ack);
+
+    nstime_delta( &rtt, &(t->ack.ts), &(t->first_transmit.ts) );
+    pi = proto_tree_add_time(pt, hf_sctp_rtt, tvb, 0, 0, &rtt);
+    PROTO_ITEM_SET_GENERATED(pi);
+  }
 }
 
 #define RELTSN(tsn) (((tsn) < h->first_tsn) ? (tsn + (0xffffffff - (h->first_tsn)) + 1) : (tsn - h->first_tsn))
 
 static void
 sctp_tsn(packet_info *pinfo,  tvbuff_t *tvb, proto_item *tsn_item,
-        sctp_half_assoc_t *h, guint32 tsn)
+         sctp_half_assoc_t *h, guint32 tsn)
 {
-       sctp_tsn_t *t;
-       guint32 framenum;
-       guint32 reltsn;
-
-       /* no half assoc? nothing to do!*/
-       if (!h)
-               return;
-
-
-       framenum = pinfo->fd->num;
-
-       /*  If we're dissecting for a read filter in the GUI [tshark assigns
-        *  frame numbers before running the read filter], don't do the TSN
-        *  analysis.  (We can't anyway because we don't have a valid frame
-        *  number...)
-        *
-        *  Without this check if you load a capture file in the
-        *  GUI while using a read filter, every SCTP TSN is marked as a
-        *  retransmission of that in frame 0.
-        */
-       if (framenum == 0)
-               return;
-
-       /* we have not seen any tsn yet in this half assoc set the ground */
-       if (! h->started) {
-               h->first_tsn = tsn;
-               h->started = TRUE;
-       }
-
-
-       reltsn = RELTSN(tsn);
-
-       /* printf("%.3d REL TSN: %p->%p [%u] %u \n",framenum,h,h->peer,tsn,reltsn); */
-
-       /* look for this tsn in this half's tsn table */
-       if (! (t = emem_tree_lookup32(h->tsns,reltsn) )) {
-               /* no tsn found, create a new one */
-               t = se_alloc0(sizeof(sctp_tsn_t));
-               t->tsn = tsn;
-
-               t->first_transmit.framenum = framenum;
-               t->first_transmit.ts.secs = pinfo->fd->abs_ts.secs;
-               t->first_transmit.ts.nsecs = pinfo->fd->abs_ts.nsecs;
-
-               emem_tree_insert32(h->tsns,reltsn,t);
-       }
-
-       if ( (! pinfo->fd->flags.visited ) && t->first_transmit.framenum != framenum  ) {
-               struct _retransmit_t **r;
-               int i;
-
-               t->retransmit_count++;
-               r = &t->retransmit;
-               i = 0;
-               while (*r && i < MAX_RETRANS_TRACKED_PER_TSN) {
-                       r = &(*r)->next;
-                       i++;
-               }
-
-               if (i <= MAX_RETRANS_TRACKED_PER_TSN) {
-                       /*  TODO: we're allocating 16 bytes here.  The se_
-                        *  allocator adds 8 bytes of canary to that at each
-                        *  allocation.  Should these allocations be batched
-                        *  or does it not matter for the rare cases when there's
-                        *  more than 1 or 2 retransmissions of a TSN?
-                        *  For now, go with simplicity (of code here).
-                        */
-                       *r = se_alloc0(sizeof(struct _retransmit_t));
-                       (*r)->framenum = framenum;
-                       (*r)->ts.secs = pinfo->fd->abs_ts.secs;
-                       (*r)->ts.nsecs = pinfo->fd->abs_ts.nsecs;
-               }
-       }
-
-       tsn_tree(t, tsn_item, pinfo, tvb, framenum);
+  sctp_tsn_t *t;
+  guint32 framenum;
+  guint32 reltsn;
+
+  /* no half assoc? nothing to do!*/
+  if (!h)
+    return;
+
+
+  framenum = pinfo->fd->num;
+
+  /*  If we're dissecting for a read filter in the GUI [tshark assigns
+   *  frame numbers before running the read filter], don't do the TSN
+   *  analysis.  (We can't anyway because we don't have a valid frame
+   *  number...)
+   *
+   *  Without this check if you load a capture file in the
+   *  GUI while using a read filter, every SCTP TSN is marked as a
+   *  retransmission of that in frame 0.
+   */
+  if (framenum == 0)
+    return;
+
+  /* we have not seen any tsn yet in this half assoc set the ground */
+  if (! h->started) {
+    h->first_tsn = tsn;
+    h->started = TRUE;
+  }
+
+
+  reltsn = RELTSN(tsn);
+
+  /* printf("%.3d REL TSN: %p->%p [%u] %u \n",framenum,h,h->peer,tsn,reltsn); */
+
+  /* look for this tsn in this half's tsn table */
+  if (! (t = emem_tree_lookup32(h->tsns,reltsn) )) {
+    /* no tsn found, create a new one */
+    t = se_alloc0(sizeof(sctp_tsn_t));
+    t->tsn = tsn;
+
+    t->first_transmit.framenum = framenum;
+    t->first_transmit.ts.secs = pinfo->fd->abs_ts.secs;
+    t->first_transmit.ts.nsecs = pinfo->fd->abs_ts.nsecs;
+
+    emem_tree_insert32(h->tsns,reltsn,t);
+  }
+
+  if ( (! pinfo->fd->flags.visited ) && t->first_transmit.framenum != framenum  ) {
+    struct _retransmit_t **r;
+    int i;
+
+    t->retransmit_count++;
+    r = &t->retransmit;
+    i = 0;
+    while (*r && i < MAX_RETRANS_TRACKED_PER_TSN) {
+      r = &(*r)->next;
+      i++;
+    }
+
+    if (i <= MAX_RETRANS_TRACKED_PER_TSN) {
+      /*  TODO: we're allocating 16 bytes here.  The se_
+       *  allocator adds 8 bytes of canary to that at each
+       *  allocation.  Should these allocations be batched
+       *  or does it not matter for the rare cases when there's
+       *  more than 1 or 2 retransmissions of a TSN?
+       *  For now, go with simplicity (of code here).
+       */
+      *r = se_alloc0(sizeof(struct _retransmit_t));
+      (*r)->framenum = framenum;
+      (*r)->ts.secs = pinfo->fd->abs_ts.secs;
+      (*r)->ts.nsecs = pinfo->fd->abs_ts.nsecs;
+    }
+  }
+
+  tsn_tree(t, tsn_item, pinfo, tvb, framenum);
 }
 
 static void
 ack_tree(sctp_tsn_t *t, proto_tree *acks_tree,
-        tvbuff_t *tvb, packet_info *pinfo)
+         tvbuff_t *tvb, packet_info *pinfo)
 {
-       proto_item *pi;
-       proto_tree *pt;
-       nstime_t rtt;
-       guint framenum =  pinfo->fd->num;
+  proto_item *pi;
+  proto_tree *pt;
+  nstime_t rtt;
+  guint framenum =  pinfo->fd->num;
 
-       if ( t->ack.framenum == framenum ) {
-               nstime_delta( &rtt, &(t->ack.ts), &(t->first_transmit.ts) );
+  if ( t->ack.framenum == framenum ) {
+    nstime_delta( &rtt, &(t->ack.ts), &(t->first_transmit.ts) );
 
-               pi = proto_tree_add_uint(acks_tree, hf_sctp_ack_tsn, tvb, 0 , 0, t->tsn);
-               PROTO_ITEM_SET_GENERATED(pi);
+    pi = proto_tree_add_uint(acks_tree, hf_sctp_ack_tsn, tvb, 0 , 0, t->tsn);
+    PROTO_ITEM_SET_GENERATED(pi);
 
-               pt = proto_item_add_subtree(pi, ett_sctp_acked);
+    pt = proto_item_add_subtree(pi, ett_sctp_acked);
 
-               pi = proto_tree_add_uint(pt, hf_sctp_ack_frame, tvb, 0 , 0, t->first_transmit.framenum);
-               PROTO_ITEM_SET_GENERATED(pi);
+    pi = proto_tree_add_uint(pt, hf_sctp_ack_frame, tvb, 0 , 0, t->first_transmit.framenum);
+    PROTO_ITEM_SET_GENERATED(pi);
 
-               pi = proto_tree_add_time(pt, hf_sctp_rtt, tvb, 0, 0, &rtt);
-               PROTO_ITEM_SET_GENERATED(pi);
-       }
+    pi = proto_tree_add_time(pt, hf_sctp_rtt, tvb, 0, 0, &rtt);
+    PROTO_ITEM_SET_GENERATED(pi);
+  }
 }
 
 static void
 sctp_ack(packet_info *pinfo, tvbuff_t *tvb,  proto_tree *acks_tree,
-        sctp_half_assoc_t *h, guint32 reltsn)
+         sctp_half_assoc_t *h, guint32 reltsn)
 {
-       sctp_tsn_t *t;
-       guint32 framenum;
+  sctp_tsn_t *t;
+  guint32 framenum;
 
 
-       if (!h || !h->peer)
-               return;
+  if (!h || !h->peer)
+    return;
 
-       framenum =  pinfo->fd->num;
+  framenum =  pinfo->fd->num;
 
-       /* printf("%.6d ACK: %p->%p [%u] \n",framenum,h,h->peer,reltsn); */
+  /* printf("%.6d ACK: %p->%p [%u] \n",framenum,h,h->peer,reltsn); */
 
-       t = se_tree_lookup32(h->peer->tsns,reltsn);
+  t = se_tree_lookup32(h->peer->tsns,reltsn);
 
-       if (t) {
-               if (! t->ack.framenum) {
-                       sctp_tsn_t *t2;
+  if (t) {
+    if (! t->ack.framenum) {
+      sctp_tsn_t *t2;
 
-                       t->ack.framenum = framenum;
-                       t->ack.ts.secs = pinfo->fd->abs_ts.secs;
-                       t->ack.ts.nsecs = pinfo->fd->abs_ts.nsecs;
+      t->ack.framenum = framenum;
+      t->ack.ts.secs = pinfo->fd->abs_ts.secs;
+      t->ack.ts.nsecs = pinfo->fd->abs_ts.nsecs;
 
-                       if (( t2 = emem_tree_lookup32(h->peer->tsn_acks, framenum) )) {
-                               for(;t2->next;t2 = t2->next)
-                                       ;
+      if (( t2 = emem_tree_lookup32(h->peer->tsn_acks, framenum) )) {
+        for(;t2->next;t2 = t2->next)
+          ;
 
-                               t2->next = t;
-                       } else {
-                               emem_tree_insert32(h->peer->tsn_acks, framenum,t);
-                       }
-               }
+        t2->next = t;
+      } else {
+        emem_tree_insert32(h->peer->tsn_acks, framenum,t);
+      }
+    }
 
-               if ( t->ack.framenum == framenum)
-                       ack_tree(t, acks_tree, tvb, pinfo);
+    if ( t->ack.framenum == framenum)
+      ack_tree(t, acks_tree, tvb, pinfo);
 
-       } /* else {
-               proto_tree_add_text(acks_tree, tvb, 0 , 0, "Assoc: %p vs %p ?? %ld",h,h->peer,tsn);
-       } */
+  } /* else {
+       proto_tree_add_text(acks_tree, tvb, 0 , 0, "Assoc: %p vs %p ?? %ld",h,h->peer,tsn);
+       } */
 }
 
 #define RELTSNACK(tsn) (((tsn) < h->peer->first_tsn) ? ((tsn) + (0xffffffff - (h->peer->first_tsn)) + 1) : ((tsn) - h->peer->first_tsn))
 static void
 sctp_ack_block(packet_info *pinfo, sctp_half_assoc_t *h, tvbuff_t *tvb,
-              proto_item *acks_tree, const guint32 *tsn_start_ptr,
-              guint32 tsn_end)
+               proto_item *acks_tree, const guint32 *tsn_start_ptr,
+               guint32 tsn_end)
 {
-       sctp_tsn_t *t;
-       guint32 framenum;
-       guint32 rel_start;
-       guint32 rel_end;
+  sctp_tsn_t *t;
+  guint32 framenum;
+  guint32 rel_start;
+  guint32 rel_end;
 
 
-       if ( !h || !h->peer || ! h->peer->started )
-               return;
+  if ( !h || !h->peer || ! h->peer->started )
+    return;
 
-       framenum =  pinfo->fd->num;
-       rel_end = RELTSNACK(tsn_end);
+  framenum =  pinfo->fd->num;
+  rel_end = RELTSNACK(tsn_end);
 
-       if (tsn_start_ptr) {
-               rel_start = RELTSNACK(*tsn_start_ptr);
-               /* printf("%.3d BACK: %p->%p [%u-%u]\n",framenum,h,h->peer,rel_start,rel_end); */
-       }  else {
-               rel_start = h->peer->cumm_ack;
-               /* printf("%.3d CACK: %p->%p  [%u-%u]\n",framenum,h,h->peer,rel_start,rel_end); */
-       }
+  if (tsn_start_ptr) {
+    rel_start = RELTSNACK(*tsn_start_ptr);
+    /* printf("%.3d BACK: %p->%p [%u-%u]\n",framenum,h,h->peer,rel_start,rel_end); */
+  }  else {
+    rel_start = h->peer->cumm_ack;
+    /* printf("%.3d CACK: %p->%p  [%u-%u]\n",framenum,h,h->peer,rel_start,rel_end); */
+  }
 
 
-       if ((t = emem_tree_lookup32(h->peer->tsn_acks, framenum))) {
-               for(;t;t = t->next) {
-                       guint32 tsn = t->tsn;
+  if ((t = emem_tree_lookup32(h->peer->tsn_acks, framenum))) {
+    for(;t;t = t->next) {
+      guint32 tsn = t->tsn;
 
-                       if ( tsn  < h->peer->first_tsn ) {
-                               tsn += (0xffffffff - (h->peer->first_tsn)) + 1;
-                       } else {
-                               tsn -= h->peer->first_tsn;
-                       }
+      if ( tsn  < h->peer->first_tsn ) {
+        tsn += (0xffffffff - (h->peer->first_tsn)) + 1;
+      } else {
+        tsn -= h->peer->first_tsn;
+      }
 
-                       if (t->ack.framenum == framenum && ( (!tsn_start_ptr) || rel_start <= tsn) && tsn <= rel_end)
-                               ack_tree(t, acks_tree, tvb, pinfo);
-               }
+      if (t->ack.framenum == framenum && ( (!tsn_start_ptr) || rel_start <= tsn) && tsn <= rel_end)
+        ack_tree(t, acks_tree, tvb, pinfo);
+    }
 
-               return;
-       }
+    return;
+  }
 
-       if (pinfo->fd->flags.visited || rel_end < rel_start || rel_end - rel_start > 0xffff0000 ) return;
+  if (pinfo->fd->flags.visited || rel_end < rel_start || rel_end - rel_start > 0xffff0000 ) return;
 
-       if (! tsn_start_ptr )
-               h->peer->cumm_ack = rel_end + 1;
+  if (! tsn_start_ptr )
+    h->peer->cumm_ack = rel_end + 1;
 
-       if (rel_start <= rel_end && rel_end - rel_start < 5000 ) {
-               guint32 rel_tsn, i;
-               for (i=0; i <= rel_end-rel_start; i++) {
-                       rel_tsn = (guint32) (i+rel_start);
-                       sctp_ack(pinfo, tvb,  acks_tree, h, rel_tsn);
-               }
-       }
+  if (rel_start <= rel_end && rel_end - rel_start < 5000 ) {
+    guint32 rel_tsn, i;
+    for (i=0; i <= rel_end-rel_start; i++) {
+      rel_tsn = (guint32) (i+rel_start);
+      sctp_ack(pinfo, tvb,  acks_tree, h, rel_tsn);
+    }
+  }
 }
 
 /* END TSN ANALYSIS CODE */
@@ -1074,17 +1074,17 @@ dissect_supported_address_types_parameter(tvbuff_t *parameter_tvb, proto_tree *p
     proto_tree_add_item(parameter_tree, hf_supported_address_type, parameter_tvb, offset, SUPPORTED_ADDRESS_TYPE_PARAMETER_ADDRESS_TYPE_LENGTH, NETWORK_BYTE_ORDER);
     addr_type = tvb_get_ntohs(parameter_tvb, offset);
     switch (addr_type) {
-      case IPv4_ADDRESS_TYPE:
-        proto_item_append_text(parameter_item, "IPv4");
-        break;
-      case IPv6_ADDRESS_TYPE:
-        proto_item_append_text(parameter_item, "IPv6");
-        break;
-      case HOSTNAME_ADDRESS_TYPE:
-        proto_item_append_text(parameter_item, "hostname");
-        break;
-      default:
-        proto_item_append_text(parameter_item, "%u", addr_type);
+    case IPv4_ADDRESS_TYPE:
+      proto_item_append_text(parameter_item, "IPv4");
+      break;
+    case IPv6_ADDRESS_TYPE:
+      proto_item_append_text(parameter_item, "IPv6");
+      break;
+    case HOSTNAME_ADDRESS_TYPE:
+      proto_item_append_text(parameter_item, "hostname");
+      break;
+    default:
+      proto_item_append_text(parameter_item, "%u", addr_type);
     }
     if (addr_type_number < number_of_addr_types)
       proto_item_append_text(parameter_item, ", ");
@@ -1639,11 +1639,11 @@ dissect_unresolvable_address_cause(tvbuff_t *cause_tvb, packet_info *pinfo, prot
 
 static gboolean
 dissect_sctp_chunk(tvbuff_t *chunk_tvb,
-                                  packet_info *pinfo,
-                                  proto_tree *tree,
-                                  proto_tree *sctp_tree,
-                                  sctp_half_assoc_t* assoc,
-                                  gboolean useinfo);
+                   packet_info *pinfo,
+                   proto_tree *tree,
+                   proto_tree *sctp_tree,
+                   sctp_half_assoc_t* assoc,
+                   gboolean useinfo);
 
 static void
 dissect_unrecognized_chunk_type_cause(tvbuff_t *cause_tvb,  packet_info *pinfo, proto_tree *cause_tree, proto_item *cause_item)
@@ -2652,13 +2652,13 @@ static const true_false_string sctp_data_chunk_i_bit_value = {
 
 static gboolean
 dissect_data_chunk(tvbuff_t *chunk_tvb,
-                                  guint16 chunk_length,
-                                  packet_info *pinfo,
-                                  proto_tree *tree,
-                                  proto_tree *chunk_tree,
-                                  proto_item *chunk_item,
-                                  proto_item *flags_item,
-                                  sctp_half_assoc_t* ha)
+                   guint16 chunk_length,
+                   packet_info *pinfo,
+                   proto_tree *tree,
+                   proto_tree *chunk_tree,
+                   proto_item *chunk_item,
+                   proto_item *flags_item,
+                   sctp_half_assoc_t* ha)
 {
   guint number_of_ppid;
   guint32 payload_proto_id;
@@ -2746,28 +2746,28 @@ dissect_data_chunk(tvbuff_t *chunk_tvb,
        */
       if (b_bit)
       {
-       volatile gboolean retval = FALSE;
-
-       /*
-        * If this particular fragment happens to get a ReportedBoundsError
-        * exception (which in fact we expect it to since it's a fragment),
-        * don't stop dissecting chunks within this frame.
-        *
-        * If it gets a BoundsError, we can stop, as there's nothing more to
-        * see, so we just re-throw it.
-        */
-       TRY {
-         retval = dissect_payload(payload_tvb, pinfo, tree, payload_proto_id);
-       }
-       CATCH(BoundsError) {
-         RETHROW;
-       }
-       CATCH(ReportedBoundsError) {
-         show_reported_bounds_error(payload_tvb, pinfo, tree);
-       }
-       ENDTRY;
-
-       return retval;
+        volatile gboolean retval = FALSE;
+
+        /*
+         * If this particular fragment happens to get a ReportedBoundsError
+         * exception (which in fact we expect it to since it's a fragment),
+         * don't stop dissecting chunks within this frame.
+         *
+         * If it gets a BoundsError, we can stop, as there's nothing more to
+         * see, so we just re-throw it.
+         */
+        TRY {
+          retval = dissect_payload(payload_tvb, pinfo, tree, payload_proto_id);
+        }
+        CATCH(BoundsError) {
+          RETHROW;
+        }
+        CATCH(ReportedBoundsError) {
+          show_reported_bounds_error(payload_tvb, pinfo, tree);
+        }
+        ENDTRY;
+
+        return retval;
       }
 
       /* else */
@@ -2823,7 +2823,7 @@ dissect_init_chunk(tvbuff_t *chunk_tvb, guint16 chunk_length, packet_info *pinfo
     /* handle fixed parameters */
     proto_tree_add_item(chunk_tree, hf_init_chunk_initiate_tag,               chunk_tvb, INIT_CHUNK_INITIATE_TAG_OFFSET,               INIT_CHUNK_INITIATE_TAG_LENGTH,               NETWORK_BYTE_ORDER);
     hidden_item = proto_tree_add_item(chunk_tree, hf_initiate_tag,                   chunk_tvb, INIT_CHUNK_INITIATE_TAG_OFFSET,               INIT_CHUNK_INITIATE_TAG_LENGTH,               NETWORK_BYTE_ORDER);
-       PROTO_ITEM_SET_HIDDEN(hidden_item);
+    PROTO_ITEM_SET_HIDDEN(hidden_item);
     proto_tree_add_item(chunk_tree, hf_init_chunk_adv_rec_window_credit,      chunk_tvb, INIT_CHUNK_ADV_REC_WINDOW_CREDIT_OFFSET,      INIT_CHUNK_ADV_REC_WINDOW_CREDIT_LENGTH,      NETWORK_BYTE_ORDER);
     proto_tree_add_item(chunk_tree, hf_init_chunk_number_of_outbound_streams, chunk_tvb, INIT_CHUNK_NUMBER_OF_OUTBOUND_STREAMS_OFFSET, INIT_CHUNK_NUMBER_OF_OUTBOUND_STREAMS_LENGTH, NETWORK_BYTE_ORDER);
     proto_tree_add_item(chunk_tree, hf_init_chunk_number_of_inbound_streams,  chunk_tvb, INIT_CHUNK_NUMBER_OF_INBOUND_STREAMS_OFFSET,  INIT_CHUNK_NUMBER_OF_INBOUND_STREAMS_LENGTH,  NETWORK_BYTE_ORDER);
@@ -2855,7 +2855,7 @@ dissect_init_ack_chunk(tvbuff_t *chunk_tvb, guint16 chunk_length, packet_info *p
     /* handle fixed parameters */
     proto_tree_add_item(chunk_tree, hf_initack_chunk_initiate_tag,               chunk_tvb, INIT_CHUNK_INITIATE_TAG_OFFSET,               INIT_CHUNK_INITIATE_TAG_LENGTH,               NETWORK_BYTE_ORDER);
     hidden_item = proto_tree_add_item(chunk_tree, hf_initiate_tag,                      chunk_tvb, INIT_CHUNK_INITIATE_TAG_OFFSET,               INIT_CHUNK_INITIATE_TAG_LENGTH,               NETWORK_BYTE_ORDER);
-       PROTO_ITEM_SET_HIDDEN(hidden_item);
+    PROTO_ITEM_SET_HIDDEN(hidden_item);
     proto_tree_add_item(chunk_tree, hf_initack_chunk_adv_rec_window_credit,      chunk_tvb, INIT_CHUNK_ADV_REC_WINDOW_CREDIT_OFFSET,      INIT_CHUNK_ADV_REC_WINDOW_CREDIT_LENGTH,      NETWORK_BYTE_ORDER);
     proto_tree_add_item(chunk_tree, hf_initack_chunk_number_of_outbound_streams, chunk_tvb, INIT_CHUNK_NUMBER_OF_OUTBOUND_STREAMS_OFFSET, INIT_CHUNK_NUMBER_OF_OUTBOUND_STREAMS_LENGTH, NETWORK_BYTE_ORDER);
     proto_tree_add_item(chunk_tree, hf_initack_chunk_number_of_inbound_streams,  chunk_tvb, INIT_CHUNK_NUMBER_OF_INBOUND_STREAMS_OFFSET,  INIT_CHUNK_NUMBER_OF_INBOUND_STREAMS_LENGTH,  NETWORK_BYTE_ORDER);
@@ -2943,13 +2943,13 @@ dissect_sack_chunk(packet_info* pinfo, tvbuff_t *chunk_tvb, proto_tree *chunk_tr
     pi = proto_tree_add_item(block_tree, hf_sack_chunk_gap_block_start, chunk_tvb, gap_block_offset, SACK_CHUNK_GAP_BLOCK_START_LENGTH, NETWORK_BYTE_ORDER);
     pt = proto_item_add_subtree(pi, ett_sctp_sack_chunk_gap_block_start);
     pi = proto_tree_add_uint(pt, hf_sack_chunk_gap_block_start_tsn,
-                            chunk_tvb, gap_block_offset,SACK_CHUNK_GAP_BLOCK_START_LENGTH, cum_tsn_ack + start);
+                             chunk_tvb, gap_block_offset,SACK_CHUNK_GAP_BLOCK_START_LENGTH, cum_tsn_ack + start);
     PROTO_ITEM_SET_GENERATED(pi);
 
     pi = proto_tree_add_item(block_tree, hf_sack_chunk_gap_block_end, chunk_tvb, gap_block_offset + SACK_CHUNK_GAP_BLOCK_START_LENGTH, SACK_CHUNK_GAP_BLOCK_END_LENGTH,   NETWORK_BYTE_ORDER);
     pt = proto_item_add_subtree(pi, ett_sctp_sack_chunk_gap_block_end);
     pi = proto_tree_add_uint(pt, hf_sack_chunk_gap_block_end_tsn, chunk_tvb,
-                            gap_block_offset + SACK_CHUNK_GAP_BLOCK_START_LENGTH, SACK_CHUNK_GAP_BLOCK_END_LENGTH, cum_tsn_ack + end);
+                             gap_block_offset + SACK_CHUNK_GAP_BLOCK_START_LENGTH, SACK_CHUNK_GAP_BLOCK_END_LENGTH, cum_tsn_ack + end);
     PROTO_ITEM_SET_GENERATED(pi);
 
     sctp_ack_block(pinfo, ha, chunk_tvb, block_tree, &tsn_start, cum_tsn_ack + end);
@@ -2982,9 +2982,9 @@ dissect_sack_chunk(packet_info* pinfo, tvbuff_t *chunk_tvb, proto_tree *chunk_tr
   }
 
   proto_item_append_text(chunk_item, " (Cumulative TSN: %u, a_rwnd: %u, gaps: %u, duplicate TSNs: %u)",
-                        tvb_get_ntohl(chunk_tvb, SACK_CHUNK_CUMULATIVE_TSN_ACK_OFFSET),
-                        a_rwnd,
-                        number_of_gap_blocks, number_of_dup_tsns);
+                         tvb_get_ntohl(chunk_tvb, SACK_CHUNK_CUMULATIVE_TSN_ACK_OFFSET),
+                         a_rwnd,
+                         number_of_gap_blocks, number_of_dup_tsns);
 }
 
 /* NE: Dissect nr-sack chunk */
@@ -3013,7 +3013,7 @@ dissect_sack_chunk(packet_info* pinfo, tvbuff_t *chunk_tvb, proto_tree *chunk_tr
 #define NR_SACK_CHUNK_NUMBER_OF_DUP_TSNS_OFFSET        (NR_SACK_CHUNK_NUMBER_OF_NR_GAP_BLOCKS_OFFSET + \
                                                         NR_SACK_CHUNK_NUMBER_OF_NR_GAP_BLOCKS_LENGTH)
 #define NR_SACK_CHUNK_RESERVED_OFFSET                  (NR_SACK_CHUNK_NUMBER_OF_DUP_TSNS_OFFSET + \
-                                                        NR_SACK_CHUNK_NUMBER_OF_DUP_TSNS_LENGTH)  
+                                                        NR_SACK_CHUNK_NUMBER_OF_DUP_TSNS_LENGTH)
 #define NR_SACK_CHUNK_GAP_BLOCK_OFFSET                 (NR_SACK_CHUNK_RESERVED_OFFSET + \
                                                         NR_SACK_CHUNK_RESERVED_LENGTH)
 
@@ -3039,9 +3039,9 @@ dissect_nr_sack_chunk(packet_info* pinfo, tvbuff_t *chunk_tvb, proto_tree *chunk
 
   ctsa_item = proto_tree_add_item(chunk_tree, hf_nr_sack_chunk_cumulative_tsn_ack, chunk_tvb, NR_SACK_CHUNK_CUMULATIVE_TSN_ACK_OFFSET, NR_SACK_CHUNK_CUMULATIVE_TSN_ACK_LENGTH, NETWORK_BYTE_ORDER);
   proto_tree_add_item(chunk_tree, hf_nr_sack_chunk_adv_rec_window_credit, chunk_tvb, NR_SACK_CHUNK_ADV_REC_WINDOW_CREDIT_OFFSET, NR_SACK_CHUNK_ADV_REC_WINDOW_CREDIT_LENGTH, NETWORK_BYTE_ORDER);
-  
+
   num_of_gap_blocks = proto_tree_add_item(chunk_tree, hf_nr_sack_chunk_number_of_gap_blocks, chunk_tvb, NR_SACK_CHUNK_NUMBER_OF_GAP_BLOCKS_OFFSET,  NR_SACK_CHUNK_NUMBER_OF_GAP_BLOCKS_LENGTH, NETWORK_BYTE_ORDER);
-  
+
   proto_tree_add_item(chunk_tree, hf_nr_sack_chunk_number_of_nr_gap_blocks,  chunk_tvb, NR_SACK_CHUNK_NUMBER_OF_NR_GAP_BLOCKS_OFFSET, NR_SACK_CHUNK_NUMBER_OF_NR_GAP_BLOCKS_LENGTH, NETWORK_BYTE_ORDER);
   proto_tree_add_item(chunk_tree, hf_nr_sack_chunk_number_of_dup_tsns, chunk_tvb, NR_SACK_CHUNK_NUMBER_OF_DUP_TSNS_OFFSET, NR_SACK_CHUNK_NUMBER_OF_DUP_TSNS_LENGTH, NETWORK_BYTE_ORDER);
   proto_tree_add_item(chunk_tree, hf_nr_sack_chunk_reserved, chunk_tvb, NR_SACK_CHUNK_RESERVED_OFFSET, NR_SACK_CHUNK_RESERVED_LENGTH, NETWORK_BYTE_ORDER);
@@ -3053,31 +3053,31 @@ dissect_nr_sack_chunk(packet_info* pinfo, tvbuff_t *chunk_tvb, proto_tree *chunk
 
   acks_tree = proto_item_add_subtree(ctsa_item,ett_sctp_ack);
   sctp_ack_block(pinfo, ha, chunk_tvb, acks_tree, NULL, cum_tsn_ack);
-  
+
   for(gap_block_number = 1; gap_block_number <= number_of_gap_blocks; gap_block_number++) {
     proto_item *pi;
     proto_tree *pt;
     guint32 tsn_start;
-    
+
     start = tvb_get_ntohs(chunk_tvb, gap_block_offset);
     end   = tvb_get_ntohs(chunk_tvb, gap_block_offset + NR_SACK_CHUNK_GAP_BLOCK_START_LENGTH);
     tsn_start = cum_tsn_ack + start;
-    
+
     block_item = proto_tree_add_text(chunk_tree, chunk_tvb, gap_block_offset, NR_SACK_CHUNK_GAP_BLOCK_LENGTH, "Gap Acknowledgement for TSN %u to %u", cum_tsn_ack + start, cum_tsn_ack + end);
     block_tree = proto_item_add_subtree(block_item, ett_sctp_nr_sack_chunk_gap_block);
-      
+
     pi = proto_tree_add_item(block_tree, hf_nr_sack_chunk_gap_block_start, chunk_tvb, gap_block_offset, NR_SACK_CHUNK_GAP_BLOCK_START_LENGTH, NETWORK_BYTE_ORDER);
     pt = proto_item_add_subtree(pi, ett_sctp_nr_sack_chunk_gap_block_start);
     pi = proto_tree_add_uint(pt, hf_nr_sack_chunk_gap_block_start_tsn,
-                            chunk_tvb, gap_block_offset,NR_SACK_CHUNK_GAP_BLOCK_START_LENGTH, cum_tsn_ack + start);
+                             chunk_tvb, gap_block_offset,NR_SACK_CHUNK_GAP_BLOCK_START_LENGTH, cum_tsn_ack + start);
     PROTO_ITEM_SET_GENERATED(pi);
 
     pi = proto_tree_add_item(block_tree, hf_nr_sack_chunk_gap_block_end, chunk_tvb, gap_block_offset + NR_SACK_CHUNK_GAP_BLOCK_START_LENGTH, NR_SACK_CHUNK_GAP_BLOCK_END_LENGTH,   NETWORK_BYTE_ORDER);
     pt = proto_item_add_subtree(pi, ett_sctp_nr_sack_chunk_gap_block_end);
     pi = proto_tree_add_uint(pt, hf_nr_sack_chunk_gap_block_end_tsn, chunk_tvb,
-                              gap_block_offset + NR_SACK_CHUNK_GAP_BLOCK_START_LENGTH, NR_SACK_CHUNK_GAP_BLOCK_END_LENGTH, cum_tsn_ack + end);
+                               gap_block_offset + NR_SACK_CHUNK_GAP_BLOCK_START_LENGTH, NR_SACK_CHUNK_GAP_BLOCK_END_LENGTH, cum_tsn_ack + end);
     PROTO_ITEM_SET_GENERATED(pi);
-      
+
     sctp_ack_block(pinfo, ha, chunk_tvb, block_tree, &tsn_start, cum_tsn_ack + end);
     gap_block_offset += NR_SACK_CHUNK_GAP_BLOCK_LENGTH;
     tsns_gap_acked += (end - start) + 1;
@@ -3085,7 +3085,7 @@ dissect_nr_sack_chunk(packet_info* pinfo, tvbuff_t *chunk_tvb, proto_tree *chunk
 
   if (tsns_gap_acked) {
     proto_item *pi;
-      
+
     pi = proto_tree_add_uint(chunk_tree, hf_nr_sack_chunk_number_tsns_gap_acked, chunk_tvb, 0, 0, tsns_gap_acked);
     PROTO_ITEM_SET_GENERATED(pi);
 
@@ -3094,7 +3094,7 @@ dissect_nr_sack_chunk(packet_info* pinfo, tvbuff_t *chunk_tvb, proto_tree *chunk
      */
     if (tsns_gap_acked > 100)
       expert_add_info_format(pinfo, pi, PI_SEQUENCE, PI_WARN, "More than 100 TSNs were gap-acknowledged in this NR-SACK");
-    
+
   }
 
   /* NE: handle the nr-sack chunk's nr-gap blocks */
@@ -3116,18 +3116,18 @@ dissect_nr_sack_chunk(packet_info* pinfo, tvbuff_t *chunk_tvb, proto_tree *chunk
     pi = proto_tree_add_item(block_tree, hf_nr_sack_chunk_nr_gap_block_start, chunk_tvb, nr_gap_block_offset, NR_SACK_CHUNK_NR_GAP_BLOCK_START_LENGTH, NETWORK_BYTE_ORDER);
     pt = proto_item_add_subtree(pi, ett_sctp_nr_sack_chunk_nr_gap_block_start);
     pi = proto_tree_add_uint(pt, hf_nr_sack_chunk_nr_gap_block_start_tsn,
-                            chunk_tvb, nr_gap_block_offset, NR_SACK_CHUNK_NR_GAP_BLOCK_START_LENGTH, cum_tsn_ack + start);
+                             chunk_tvb, nr_gap_block_offset, NR_SACK_CHUNK_NR_GAP_BLOCK_START_LENGTH, cum_tsn_ack + start);
     PROTO_ITEM_SET_GENERATED(pi);
 
     pi = proto_tree_add_item(block_tree, hf_nr_sack_chunk_nr_gap_block_end, chunk_tvb, nr_gap_block_offset + NR_SACK_CHUNK_NR_GAP_BLOCK_START_LENGTH, NR_SACK_CHUNK_NR_GAP_BLOCK_END_LENGTH,   NETWORK_BYTE_ORDER);
     pt = proto_item_add_subtree(pi, ett_sctp_nr_sack_chunk_nr_gap_block_end);
     pi = proto_tree_add_uint(pt, hf_nr_sack_chunk_nr_gap_block_end_tsn, chunk_tvb,
-                            nr_gap_block_offset + NR_SACK_CHUNK_NR_GAP_BLOCK_START_LENGTH, NR_SACK_CHUNK_NR_GAP_BLOCK_END_LENGTH, cum_tsn_ack + end);
+                             nr_gap_block_offset + NR_SACK_CHUNK_NR_GAP_BLOCK_START_LENGTH, NR_SACK_CHUNK_NR_GAP_BLOCK_END_LENGTH, cum_tsn_ack + end);
     PROTO_ITEM_SET_GENERATED(pi);
 
     /* sctp_ack_block(pinfo, ha, chunk_tvb, block_tree, &tsn_start, cum_tsn_ack + end); */
     nr_gap_block_offset += NR_SACK_CHUNK_NR_GAP_BLOCK_LENGTH;
-    tsns_nr_gap_acked += (end - start) + 1; 
+    tsns_nr_gap_acked += (end - start) + 1;
   }
 
   if (tsns_nr_gap_acked) {
@@ -3145,19 +3145,19 @@ dissect_nr_sack_chunk(packet_info* pinfo, tvbuff_t *chunk_tvb, proto_tree *chunk
 
   /* handle the duplicate TSNs */
   number_of_dup_tsns = tvb_get_ntohs(chunk_tvb, NR_SACK_CHUNK_NUMBER_OF_DUP_TSNS_OFFSET);
-  dup_tsn_offset     = NR_SACK_CHUNK_GAP_BLOCK_OFFSET + number_of_gap_blocks * NR_SACK_CHUNK_GAP_BLOCK_LENGTH 
+  dup_tsn_offset     = NR_SACK_CHUNK_GAP_BLOCK_OFFSET + number_of_gap_blocks * NR_SACK_CHUNK_GAP_BLOCK_LENGTH
     + number_of_nr_gap_blocks * NR_SACK_CHUNK_NR_GAP_BLOCK_LENGTH;
 
-  
+
   for(dup_tsn_number = 1; dup_tsn_number <= number_of_dup_tsns; dup_tsn_number++) {
     proto_tree_add_item(chunk_tree, hf_sack_chunk_duplicate_tsn, chunk_tvb, dup_tsn_offset, NR_SACK_CHUNK_DUP_TSN_LENGTH, NETWORK_BYTE_ORDER);
     dup_tsn_offset += NR_SACK_CHUNK_DUP_TSN_LENGTH;
   }
-  
+
   proto_item_append_text(chunk_item, " (Cumulative TSN: %u, a_rwnd: %u, gaps: %u, nr-gaps: %u, duplicate TSNs: %u)",
-                          tvb_get_ntohl(chunk_tvb, NR_SACK_CHUNK_CUMULATIVE_TSN_ACK_OFFSET),
-                          tvb_get_ntohl(chunk_tvb, NR_SACK_CHUNK_ADV_REC_WINDOW_CREDIT_OFFSET),
-                          number_of_gap_blocks, number_of_nr_gap_blocks, number_of_dup_tsns);
+                         tvb_get_ntohl(chunk_tvb, NR_SACK_CHUNK_CUMULATIVE_TSN_ACK_OFFSET),
+                         tvb_get_ntohl(chunk_tvb, NR_SACK_CHUNK_ADV_REC_WINDOW_CREDIT_OFFSET),
+                         number_of_gap_blocks, number_of_nr_gap_blocks, number_of_dup_tsns);
 }
 
 #define HEARTBEAT_CHUNK_INFO_OFFSET CHUNK_VALUE_OFFSET
@@ -3506,11 +3506,11 @@ static const true_false_string sctp_chunk_bit_2_value = {
 
 static gboolean
 dissect_sctp_chunk(tvbuff_t *chunk_tvb,
-                                  packet_info *pinfo,
-                                  proto_tree *tree,
-                                  proto_tree *sctp_tree,
-                                  sctp_half_assoc_t* ha,
-                                  gboolean useinfo)
+                   packet_info *pinfo,
+                   proto_tree *tree,
+                   proto_tree *sctp_tree,
+                   sctp_half_assoc_t* ha,
+                   gboolean useinfo)
 {
   guint8 type, flags;
   guint16 length, padding_length;
@@ -3655,12 +3655,12 @@ dissect_sctp_chunk(tvbuff_t *chunk_tvb,
 
 static void
 dissect_sctp_chunks(tvbuff_t *tvb,
-                                       packet_info *pinfo,
-                                       proto_tree *tree,
-                                       proto_item *sctp_item,
-                                       proto_tree *sctp_tree,
-                                       sctp_half_assoc_t* ha,
-                                       gboolean encapsulated)
+                    packet_info *pinfo,
+                    proto_tree *tree,
+                    proto_item *sctp_item,
+                    proto_tree *sctp_tree,
+                    sctp_half_assoc_t* ha,
+                    gboolean encapsulated)
 {
   tvbuff_t *chunk_tvb;
   guint16 length, total_length, remaining_length;
@@ -3783,59 +3783,59 @@ dissect_sctp_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolea
     proto_tree_add_item(sctp_tree, hf_destination_port, tvb, DESTINATION_PORT_OFFSET, DESTINATION_PORT_LENGTH, NETWORK_BYTE_ORDER);
     proto_tree_add_item(sctp_tree, hf_verification_tag, tvb, VERIFICATION_TAG_OFFSET, VERIFICATION_TAG_LENGTH, NETWORK_BYTE_ORDER);
     hidden_item = proto_tree_add_item(sctp_tree, hf_port, tvb, SOURCE_PORT_OFFSET,      SOURCE_PORT_LENGTH,      NETWORK_BYTE_ORDER);
-       PROTO_ITEM_SET_HIDDEN(hidden_item);
+    PROTO_ITEM_SET_HIDDEN(hidden_item);
     hidden_item = proto_tree_add_item(sctp_tree, hf_port, tvb, DESTINATION_PORT_OFFSET, DESTINATION_PORT_LENGTH, NETWORK_BYTE_ORDER);
-       PROTO_ITEM_SET_HIDDEN(hidden_item);
+    PROTO_ITEM_SET_HIDDEN(hidden_item);
 
     if (tvb_bytes_exist(tvb, 0, reported_length)) {
       /* We have the whole packet */
 
       switch(sctp_checksum) {
       case SCTP_CHECKSUM_NONE:
-       proto_tree_add_uint_format(sctp_tree, hf_checksum, tvb, CHECKSUM_OFFSET, CHECKSUM_LENGTH, checksum, "Checksum: 0x%08x (not verified)", checksum);
-       break;
+        proto_tree_add_uint_format(sctp_tree, hf_checksum, tvb, CHECKSUM_OFFSET, CHECKSUM_LENGTH, checksum, "Checksum: 0x%08x (not verified)", checksum);
+        break;
       case SCTP_CHECKSUM_ADLER32:
-       if (adler32_correct)
-         proto_tree_add_uint_format(sctp_tree, hf_checksum, tvb, CHECKSUM_OFFSET, CHECKSUM_LENGTH,
-                                    checksum, "Checksum: 0x%08x [correct Adler32]", checksum);
-       else
-         proto_tree_add_uint_format(sctp_tree, hf_checksum, tvb, CHECKSUM_OFFSET, CHECKSUM_LENGTH,
-                                    checksum, "Checksum: 0x%08x [incorrect Adler32, should be 0x%08x]", checksum, calculated_adler32);
-       hidden_item = proto_tree_add_boolean(sctp_tree, hf_checksum_bad, tvb, CHECKSUM_OFFSET, CHECKSUM_LENGTH, !(adler32_correct));
-       PROTO_ITEM_SET_HIDDEN(hidden_item);
-       break;
+        if (adler32_correct)
+          proto_tree_add_uint_format(sctp_tree, hf_checksum, tvb, CHECKSUM_OFFSET, CHECKSUM_LENGTH,
+                                     checksum, "Checksum: 0x%08x [correct Adler32]", checksum);
+        else
+          proto_tree_add_uint_format(sctp_tree, hf_checksum, tvb, CHECKSUM_OFFSET, CHECKSUM_LENGTH,
+                                     checksum, "Checksum: 0x%08x [incorrect Adler32, should be 0x%08x]", checksum, calculated_adler32);
+        hidden_item = proto_tree_add_boolean(sctp_tree, hf_checksum_bad, tvb, CHECKSUM_OFFSET, CHECKSUM_LENGTH, !(adler32_correct));
+        PROTO_ITEM_SET_HIDDEN(hidden_item);
+        break;
       case SCTP_CHECKSUM_CRC32C:
-       if (crc32c_correct)
-         proto_tree_add_uint_format(sctp_tree, hf_checksum, tvb, CHECKSUM_OFFSET, CHECKSUM_LENGTH,
-                                    checksum, "Checksum: 0x%08x [correct CRC32C]", checksum);
-       else
-         proto_tree_add_uint_format(sctp_tree, hf_checksum, tvb, CHECKSUM_OFFSET, CHECKSUM_LENGTH,
-                                    checksum, "Checksum: 0x%08x [incorrect CRC32C, should be 0x%08x]", checksum, calculated_crc32c);
-       hidden_item = proto_tree_add_boolean(sctp_tree, hf_checksum_bad, tvb, CHECKSUM_OFFSET, CHECKSUM_LENGTH, !(crc32c_correct));
-       PROTO_ITEM_SET_HIDDEN(hidden_item);
-       break;
+        if (crc32c_correct)
+          proto_tree_add_uint_format(sctp_tree, hf_checksum, tvb, CHECKSUM_OFFSET, CHECKSUM_LENGTH,
+                                     checksum, "Checksum: 0x%08x [correct CRC32C]", checksum);
+        else
+          proto_tree_add_uint_format(sctp_tree, hf_checksum, tvb, CHECKSUM_OFFSET, CHECKSUM_LENGTH,
+                                     checksum, "Checksum: 0x%08x [incorrect CRC32C, should be 0x%08x]", checksum, calculated_crc32c);
+        hidden_item = proto_tree_add_boolean(sctp_tree, hf_checksum_bad, tvb, CHECKSUM_OFFSET, CHECKSUM_LENGTH, !(crc32c_correct));
+        PROTO_ITEM_SET_HIDDEN(hidden_item);
+        break;
       case SCTP_CHECKSUM_AUTOMATIC:
-       if ((adler32_correct) && !(crc32c_correct))
-         proto_tree_add_uint_format(sctp_tree, hf_checksum, tvb, CHECKSUM_OFFSET, CHECKSUM_LENGTH,
-                                    checksum, "Checksum: 0x%08x [correct Adler32]", checksum);
-       else if ((!adler32_correct) && (crc32c_correct))
-         proto_tree_add_uint_format(sctp_tree, hf_checksum, tvb, CHECKSUM_OFFSET, CHECKSUM_LENGTH,
-                                    checksum, "Checksum: 0x%08x [correct CRC32C]", checksum);
-       else if ((adler32_correct) && (crc32c_correct))
-         proto_tree_add_uint_format(sctp_tree, hf_checksum, tvb, CHECKSUM_OFFSET, CHECKSUM_LENGTH,
-                                    checksum, "Checksum: 0x%08x [correct Adler32 and CRC32C]", checksum);
-       else
-         proto_tree_add_uint_format(sctp_tree, hf_checksum, tvb, CHECKSUM_OFFSET, CHECKSUM_LENGTH,
-                                    checksum, "Checksum: 0x%08x [incorrect, should be 0x%08x (Adler32) or 0x%08x (CRC32C)]",
-                                    checksum, calculated_adler32, calculated_crc32c);
-       hidden_item = proto_tree_add_boolean(sctp_tree, hf_checksum_bad, tvb, CHECKSUM_OFFSET, CHECKSUM_LENGTH, !(crc32c_correct || adler32_correct));
-       PROTO_ITEM_SET_HIDDEN(hidden_item);
-       break;
+        if ((adler32_correct) && !(crc32c_correct))
+          proto_tree_add_uint_format(sctp_tree, hf_checksum, tvb, CHECKSUM_OFFSET, CHECKSUM_LENGTH,
+                                     checksum, "Checksum: 0x%08x [correct Adler32]", checksum);
+        else if ((!adler32_correct) && (crc32c_correct))
+          proto_tree_add_uint_format(sctp_tree, hf_checksum, tvb, CHECKSUM_OFFSET, CHECKSUM_LENGTH,
+                                     checksum, "Checksum: 0x%08x [correct CRC32C]", checksum);
+        else if ((adler32_correct) && (crc32c_correct))
+          proto_tree_add_uint_format(sctp_tree, hf_checksum, tvb, CHECKSUM_OFFSET, CHECKSUM_LENGTH,
+                                     checksum, "Checksum: 0x%08x [correct Adler32 and CRC32C]", checksum);
+        else
+          proto_tree_add_uint_format(sctp_tree, hf_checksum, tvb, CHECKSUM_OFFSET, CHECKSUM_LENGTH,
+                                     checksum, "Checksum: 0x%08x [incorrect, should be 0x%08x (Adler32) or 0x%08x (CRC32C)]",
+                                     checksum, calculated_adler32, calculated_crc32c);
+        hidden_item = proto_tree_add_boolean(sctp_tree, hf_checksum_bad, tvb, CHECKSUM_OFFSET, CHECKSUM_LENGTH, !(crc32c_correct || adler32_correct));
+        PROTO_ITEM_SET_HIDDEN(hidden_item);
+        break;
       }
     } else {
       /* We don't have the whole packet so we can't verify the checksum */
       proto_tree_add_uint_format(sctp_tree, hf_checksum, tvb, CHECKSUM_OFFSET, CHECKSUM_LENGTH,
-                                checksum, "Checksum: 0x%08x [unchecked, not all data available]", checksum);
+                                 checksum, "Checksum: 0x%08x [unchecked, not all data available]", checksum);
     }
   } else {
     sctp_tree = NULL;
@@ -4057,7 +4057,7 @@ proto_register_sctp(void)
     &ett_sctp_nr_sack_chunk_gap_block,
     &ett_sctp_nr_sack_chunk_gap_block_start,
     &ett_sctp_nr_sack_chunk_gap_block_end,
-    &ett_sctp_nr_sack_chunk_nr_gap_block,    
+    &ett_sctp_nr_sack_chunk_nr_gap_block,
     &ett_sctp_nr_sack_chunk_nr_gap_block_start,
     &ett_sctp_nr_sack_chunk_nr_gap_block_end,
     &ett_sctp_unrecognized_parameter_parameter,
index e1798538403a66a66ffe9cb031ce80d9e3cec4ee..877c867fc1ab391c45df5cfcedddb18d7e2e54a3 100644 (file)
@@ -46,7 +46,7 @@
 #endif
 
 #ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>          /* needed to define AF_ values on Windows */
+#include <winsock2.h>           /* needed to define AF_ values on Windows */
 #endif
 
 #ifdef NEED_INET_V6DEFS_H
 #include "packet-h264.h"
 #include "packet-mp4ves.h"
 
-static dissector_handle_t rtp_handle=NULL;
-static dissector_handle_t rtcp_handle=NULL;
-static dissector_handle_t t38_handle=NULL;
-static dissector_handle_t msrp_handle=NULL;
-static dissector_handle_t h264_handle = NULL;
+static dissector_handle_t rtp_handle    = NULL;
+static dissector_handle_t rtcp_handle   = NULL;
+static dissector_handle_t t38_handle    = NULL;
+static dissector_handle_t msrp_handle   = NULL;
+static dissector_handle_t h264_handle   = NULL;
 static dissector_handle_t mp4ves_handle = NULL;
 
 static int sdp_tap = -1;
@@ -306,7 +306,7 @@ dissect_sdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   transport_info.media_type=NULL;
   for (n=0; n < SDP_NO_OF_PT; n++){
     transport_info.encoding_name[n]=unknown_encoding;
-       transport_info.sample_rate[n] = 0;
+    transport_info.sample_rate[n] = 0;
   }
   for (n=0; n < SDP_MAX_RTP_CHANNELS; n++)
   {
@@ -955,9 +955,9 @@ static void dissect_key_mgmt(tvbuff_t *tvb, packet_info * pinfo, proto_item * ti
 
   if ( prtcl_id != NULL && key_mgmt_dissector_table != NULL ) {
     found_match = dissector_try_string(key_mgmt_dissector_table,
-                                      prtcl_id,
-                                      keymgmt_tvb, pinfo,
-                                      key_tree);
+                                       prtcl_id,
+                                       keymgmt_tvb, pinfo,
+                                       key_tree);
   }
 
   if (found_match) {
@@ -1294,8 +1294,8 @@ decode_sdp_fmtp(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint offset
 
   /*
   proto_tree_add_text(tree, tvb, offset, tokenlen, "Debug; Analysed string: '%s'",
-         tvb_get_ephemeral_string(tvb, offset, tokenlen));
-         */
+  tvb_get_ephemeral_string(tvb, offset, tokenlen));
+  */
 
   /* Look for an '=' within this value - this may indicate that there is a
      profile-level-id parameter to find if the MPEG4 media type is in use */
@@ -1343,7 +1343,7 @@ decode_sdp_fmtp(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint offset
       item = proto_tree_add_uint(tree, hf_sdp_fmtp_h263_profile, tvb, offset, tokenlen,
                                  atol((char*)format_specific_parameter));
       PROTO_ITEM_SET_GENERATED(item);
-       }else if(strcmp((char*)field_name, "level") == 0) {
+    else if(strcmp((char*)field_name, "level") == 0) {
       offset++;
       tokenlen = end_offset - offset;
       format_specific_parameter = tvb_get_ephemeral_string(tvb, offset, tokenlen);
@@ -1443,17 +1443,17 @@ typedef struct {
         const char *name;
 } sdp_names_t;
 
-#define SDP_RTPMAP             1
-#define SDP_FMTP               2
-#define SDP_PATH               3
-#define SDP_H248_ITEM  4
+#define SDP_RTPMAP              1
+#define SDP_FMTP                2
+#define SDP_PATH                3
+#define SDP_H248_ITEM   4
 
 static const sdp_names_t sdp_media_attribute_names[] = {
-  { "Unknown-name"},   /* 0 Pad so that the real headers start at index 1 */
-  { "rtpmap"},         /* 1 */
-  { "fmtp"},           /* 2 */
-  { "path"},           /* 3 */
-  { "h248item"},       /* 4 */
+  { "Unknown-name"},    /* 0 Pad so that the real headers start at index 1 */
+  { "rtpmap"},          /* 1 */
+  { "fmtp"},            /* 2 */
+  { "path"},            /* 3 */
+  { "h248item"},        /* 4 */
 };
 
 static gint find_sdp_media_attribute_names(tvbuff_t *tvb, int offset, guint len)
@@ -1480,7 +1480,7 @@ static void dissect_sdp_media_attribute(tvbuff_t *tvb, packet_info *pinfo, proto
   guint8 *attribute_value;
   gint   *key;
   guint8 pt;
-  gint sdp_media_attrbute_code;
+  gint  sdp_media_attrbute_code;
   const char *msrp_res = "msrp://";
   const char *h324ext_h223lcparm = "h324ext/h223lcparm";
   gboolean has_more_pars = TRUE;
@@ -1546,7 +1546,7 @@ static void dissect_sdp_media_attribute(tvbuff_t *tvb, packet_info *pinfo, proto
 
     tokenlen = next_offset - offset;
 
-       start_offset = offset;
+    start_offset = offset;
     proto_tree_add_item(sdp_media_attribute_tree, hf_media_encoding_name, tvb,
                         offset, tokenlen, FALSE);
 
@@ -1560,15 +1560,15 @@ static void dissect_sdp_media_attribute(tvbuff_t *tvb, packet_info *pinfo, proto
 
     next_offset =  next_offset + 1;
     offset = next_offset;
-       while (length-1 >= next_offset){
-               if(!isdigit(tvb_get_guint8(tvb, next_offset)))
-                       break;
-               next_offset++;
-       }
+    while (length-1 >= next_offset){
+      if(!isdigit(tvb_get_guint8(tvb, next_offset)))
+        break;
+      next_offset++;
+    }
     tokenlen = next_offset - offset;
     proto_tree_add_item(sdp_media_attribute_tree, hf_media_sample_rate, tvb,
                         offset, tokenlen, FALSE);
-       transport_info->sample_rate[pt] = atoi(tvb_get_ephemeral_string(tvb, offset, tokenlen));
+    transport_info->sample_rate[pt] = atoi(tvb_get_ephemeral_string(tvb, offset, tokenlen));
     /* As per RFC2327 it is possible to have multiple Media Descriptions ("m=").
        For example:
 
@@ -1589,12 +1589,12 @@ static void dissect_sdp_media_attribute(tvbuff_t *tvb, packet_info *pinfo, proto
     if (transport_info->media_count == 0) {
       for (n=0; n < SDP_MAX_RTP_CHANNELS; n++) {
         encoding_name_and_rate = g_malloc( sizeof(encoding_name_and_rate_t));
-               encoding_name_and_rate->encoding_name = g_strdup(transport_info->encoding_name[pt]);
-               encoding_name_and_rate->sample_rate = transport_info->sample_rate[pt];
-           if (n==0){
+        encoding_name_and_rate->encoding_name = g_strdup(transport_info->encoding_name[pt]);
+        encoding_name_and_rate->sample_rate = transport_info->sample_rate[pt];
+        if (n==0){
           g_hash_table_insert(transport_info->media[n].rtp_dyn_payload,
                               key, encoding_name_and_rate);
-                 }
+        }
         else {    /* we create a new key and encoding_name to assign to the other hash tables */
           gint *key2;
           key2=g_malloc( sizeof(gint) );
@@ -1608,13 +1608,14 @@ static void dissect_sdp_media_attribute(tvbuff_t *tvb, packet_info *pinfo, proto
     }else
       /* in case there is an overflow in SDP_MAX_RTP_CHANNELS, we keep always the last "m=" */
       encoding_name_and_rate = g_malloc( sizeof(encoding_name_and_rate_t));
-         encoding_name_and_rate->encoding_name = g_strdup(transport_info->encoding_name[pt]);
-         encoding_name_and_rate->sample_rate = transport_info->sample_rate[pt];
-      if (transport_info->media_count == SDP_MAX_RTP_CHANNELS-1)
-        g_hash_table_insert(transport_info->media[ transport_info->media_count ].rtp_dyn_payload,
-                            key, encoding_name_and_rate);
-      else
-        g_hash_table_insert(transport_info->media[ transport_info->media_count-1 ].rtp_dyn_payload,
+
+    encoding_name_and_rate->encoding_name = g_strdup(transport_info->encoding_name[pt]);
+    encoding_name_and_rate->sample_rate = transport_info->sample_rate[pt];
+    if (transport_info->media_count == SDP_MAX_RTP_CHANNELS-1)
+      g_hash_table_insert(transport_info->media[ transport_info->media_count ].rtp_dyn_payload,
+                          key, encoding_name_and_rate);
+    else
+      g_hash_table_insert(transport_info->media[ transport_info->media_count-1 ].rtp_dyn_payload,
                             key, encoding_name_and_rate);
     break;
   case SDP_FMTP:
@@ -1938,7 +1939,7 @@ proto_register_sdp(void)
       { "MIME Type",
         "sdp.mime.type",FT_STRING, BASE_NONE, NULL, 0x0,
         "SDP MIME Type", HFILL }},
-       { &hf_media_sample_rate,
+    { &hf_media_sample_rate,
       { "Sample Rate",
         "sdp.sample_rate",FT_STRING, BASE_NONE, NULL, 0x0,
         NULL, HFILL }},
@@ -1954,23 +1955,23 @@ proto_register_sdp(void)
       { "IPBCP Command Type",
         "ipbcp.command",FT_STRING, BASE_NONE, NULL, 0x0,
         NULL, HFILL }},
-       {&hf_sdp_fmtp_mpeg4_profile_level_id,
+    {&hf_sdp_fmtp_mpeg4_profile_level_id,
       { "Level Code",
         "sdp.fmtp.profile_level_id",FT_UINT32, BASE_DEC,VALS(mp4ves_level_indication_vals), 0x0,
         NULL, HFILL }},
-       { &hf_sdp_fmtp_h263_profile,
+    { &hf_sdp_fmtp_h263_profile,
       { "Profile",
         "sdp.fmtp.h263profile",FT_UINT32, BASE_DEC,VALS(h263_profile_vals), 0x0,
         NULL, HFILL }},
-       { &hf_sdp_fmtp_h263_level,
+    { &hf_sdp_fmtp_h263_level,
       { "Level",
         "sdp.fmtp.h263level",FT_UINT32, BASE_DEC,VALS(h263_level_vals), 0x0,
         NULL, HFILL }},
-       { &hf_sdp_h264_packetization_mode,
+    { &hf_sdp_h264_packetization_mode,
       { "Packetization mode",
         "sdp.fmtp.h264_packetization_mode",FT_UINT32, BASE_DEC,VALS(h264_packetization_mode_vals), 0x0,
         NULL, HFILL }},
-       { &hf_sdp_h264_sprop_parameter_sets,
+    { &hf_sdp_h264_sprop_parameter_sets,
       { "Sprop_parameter_sets",
         "sdp.h264.sprop_parameter_sets", FT_BYTES, BASE_NONE, NULL, 0x0,
         NULL, HFILL }},
@@ -2015,7 +2016,7 @@ proto_register_sdp(void)
   proto_register_subtree_array(ett, array_length(ett));
 
   key_mgmt_dissector_table = register_dissector_table("key_mgmt",
-           "Key Management", FT_STRING, BASE_NONE);
+                                                      "Key Management", FT_STRING, BASE_NONE);
 
   /*
    * Preferences registration
index 8fee43b1cafd52cdfa6785a6bae40f6474b0c671..c3cbc456e57c56cbe353bd9ccb2cfcb37b684c70 100644 (file)
@@ -8,17 +8,17 @@
  * $Id$
  *
  * Wireshark - Network traffic analyzer
- * 
+ *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
  * as published by the Free Software Foundation; either version 2
  * of the License, or (at your option) any later version.
- * 
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #include <epan/packet.h>
 #include "packet-sqloracle.h"
 
-#define SWAP_UI16(ui16)        (((ui16)>>8 & 0xff) | ((ui16)<<8 & 0xff00))
+#define SWAP_UI16(ui16) (((ui16)>>8 & 0xff) | ((ui16)<<8 & 0xff00))
 
 /* option flag 1 */
-#define OPTION_CANCEL 0x80
-#define OPTION_FETCH  0x40
-#define OPTION_EXCUTE  0x20
-#define OPTION_DEFINE  0x10
-#define OPTION_BIND  0x08
+#define OPTION_CANCEL     0x80
+#define OPTION_FETCH      0x40
+#define OPTION_EXCUTE     0x20
+#define OPTION_DEFINE     0x10
+#define OPTION_BIND       0x08
 #define OPTION_DESC_BIND  0x04
-#define OPTION_PARSE  0x02
+#define OPTION_PARSE      0x02
 
 /* option flag 2 */
-#define OPTION_PLSQL 0x80
-#define OPTION_PARSE2  0x40
-#define OPTION_VECTOR  0x04
-#define OPTION_FETCH2  0x02
-#define OPTION_COMMIT  0x01
+#define OPTION_PLSQL      0x80
+#define OPTION_PARSE2     0x40
+#define OPTION_VECTOR     0x04
+#define OPTION_FETCH2     0x02
+#define OPTION_COMMIT     0x01
 
 
 
@@ -62,7 +62,8 @@ static int hf_sqloracle_operation = -1;
 static int hf_sqloracle_func_type = -1;
 /* static int hf_sqloracle_stmt_length = -1; */
 static int hf_sqloracle_stmt = -1;
-/* static int hf_sqloracle_v8ttluds_tname = -1;
+#if 0
+static int hf_sqloracle_v8ttluds_tname = -1;
 static int hf_sqloracle_v8ttluds_sname = -1;
 static int hf_sqloracle_v8ttluds_columnname = -1;
 static int hf_sqloracle_v8ttluds_scrlength = -1;
@@ -81,7 +82,7 @@ static int hf_sqloracle_ttloac_prefix = -1;
 static int hf_sqloracle_ttloac_flag1 = -1;
 static int hf_sqloracle_ttloac_type = -1;
 static int hf_sqloracle_ttloac_header = -1;
-*/
+#endif
 static int hf_sqloracle_flag = -1;
 static int hf_sqloracle_num_column = -1;
 /* static int hf_sqloracle_v8ttloac_vsn = -1; */
@@ -103,170 +104,165 @@ static int m_numOfCommit = 0;
 static int m_numOfOtherStatement = 0;
 static int m_numOfTransaction = 0;
 /* static int m_bReAssembling = 0; */
-/* SQLORACLE flags */
-/*static const true_false_string tfs_set_notset =
-{
-  " ",
-  "No "
-}; */
+
 static const value_string sqloracle_operation_type[] = {
-       {NET8_TYPE_SETPROP,   "Set protocol" },
-       {NET8_TYPE_SETDATAREP,    "Set data representations" },
-       {NET8_TYPE_USERTOSERVER,       "User request" },
-       {NET8_TYPE_ERRORSTATUS,    "Error: No data found" },
-       {NET8_TYPE_AUAS,  "Access user address space" },
-       {NET8_TYPE_ROWTRANSFER,      "Row transfer header" },
-       {NET8_TYPE_ROWDATA,      "Row transfer data follows" },
-       {NET8_TYPE_OPIPARAM,     "Return OPI parameter" },
-       {NET8_TYPE_FUNCCOMPLETE,    "Oracle function complete"},
-       {NET8_TYPE_TTINOER,    "N Error return definitions follow"},
-       {NET8_TYPE_TTIIOV, "Sending I/O Vec only for fast UPI"},
-       {NET8_TYPE_TTISLG,   "Send long for fast UPI"},
-       {NET8_TYPE_TTIICA,   "Invoke user callback"},
-       {NET8_TYPE_TTILOBD,   "LOB/FILE data follows"},
-       {NET8_TYPE_TTIWRN,   "Warning messages - may be a set of them"},
-       {NET8_TYPE_DESCINFO,   "Describe information"},
-       {NET8_TYPE_PIGGYBACKFUNC,   "Piggyback function follows"},
-       {NET8_TYPE_TTI3GL,   "signals special action for untrusted callout support"},
-       {NET8_TYPE_TTIFOB,   "Flush Out Bind data in DML/w RETURN when error"},
-       {NET8_TYPE_SECURENEG,   "Secure Network Services Negotiation"},
-       {0,     "Unknown"},
-       {0, NULL}
+    {NET8_TYPE_SETPROP,          "Set protocol" },
+    {NET8_TYPE_SETDATAREP,       "Set data representations" },
+    {NET8_TYPE_USERTOSERVER,     "User request" },
+    {NET8_TYPE_ERRORSTATUS,      "Error: No data found" },
+    {NET8_TYPE_AUAS,             "Access user address space" },
+    {NET8_TYPE_ROWTRANSFER,      "Row transfer header" },
+    {NET8_TYPE_ROWDATA,          "Row transfer data follows" },
+    {NET8_TYPE_OPIPARAM,         "Return OPI parameter" },
+    {NET8_TYPE_FUNCCOMPLETE,     "Oracle function complete"},
+    {NET8_TYPE_TTINOER,          "N Error return definitions follow"},
+    {NET8_TYPE_TTIIOV,           "Sending I/O Vec only for fast UPI"},
+    {NET8_TYPE_TTISLG,           "Send long for fast UPI"},
+    {NET8_TYPE_TTIICA,           "Invoke user callback"},
+    {NET8_TYPE_TTILOBD,          "LOB/FILE data follows"},
+    {NET8_TYPE_TTIWRN,           "Warning messages - may be a set of them"},
+    {NET8_TYPE_DESCINFO,         "Describe information"},
+    {NET8_TYPE_PIGGYBACKFUNC,    "Piggyback function follows"},
+    {NET8_TYPE_TTI3GL,           "signals special action for untrusted callout support"},
+    {NET8_TYPE_TTIFOB,           "Flush Out Bind data in DML/w RETURN when error"},
+    {NET8_TYPE_SECURENEG,        "Secure Network Services Negotiation"},
+    {0,                          "Unknown"},
+    {0, NULL}
 };
 static const value_string sql_func_type[] = {
-    {NET8_USER_FUNC_OLOGON,   " Logon to Oracle"},
-    {NET8_USER_FUNC_OPENCURSOR,    "Open cursor" },              
-    {NET8_USER_FUNC_PARSE,     "Parse statement" },                
-    {NET8_USER_FUNC_EXECUTE,    "Execute statement" },               
-    {NET8_USER_FUNC_OFETCH,   " Fetch row" },              
-    {NET8_USER_FUNC_CLOSECURSOR,   "Close cursor" },              
-    {NET8_USER_FUNC_OLOGOFF,  "Logoff" },             
-    {NET8_USER_FUNC_ODSCRIBE, "Describe select list column" },            
-    {NET8_USER_FUNC_ODEFIN,   "Define where column goes" },              
-    {NET8_USER_FUNC_OCOMON,   "Autocommit On" },              
-    {NET8_USER_FUNC_OCOMOFF,  "Autocommit Off" },             
-    {NET8_USER_FUNC_OCOMMIT,  "Commit" },             
-    {NET8_USER_FUNC_OROLLBACK,    "Rollback" },               
-    {NET8_USER_FUNC_OSFE,     "Set fatal error options" },                
-    {NET8_USER_FUNC_ORESUME,  "Resume current operation" },             
-    {NET8_USER_FUNC_OVERSN,   "Get version-date string" },              
-    {NET8_USER_FUNC_OTEMP,    "(Obsolete)" },               
-    {NET8_USER_FUNC_CANCEL,  "Cancel Operation" },             
-    {NET8_USER_FUNC_OGEM,     "Get error message" },                
-    {NET8_USER_FUNC_OSPECIAL, "Special function" },            
-    {NET8_USER_FUNC_OABORT,   "Abort" },              
-    {NET8_USER_FUNC_ODQRID,   "Dequeue by rowid" },              
-    {NET8_USER_FUNC_OLNGF6,   "Fetch long value" },              
-    {NET8_USER_FUNC_OHOWMANY, "How Many Items?" },            
-    {NET8_USER_FUNC_OINIT,    "Initialize Database" },               
-    {NET8_USER_FUNC_OCHANGEU, "Change user_id" },            
-    {NET8_USER_FUNC_OBINDRP,  "Bind by reference positional" },             
-    {NET8_USER_FUNC_OGETBV,   "Get n'th Bind Variable" },              
-    {NET8_USER_FUNC_OGETIV,   "Get n'th Into Variable" },              
-    {NET8_USER_FUNC_OBINDRV,  "Bind by reference" },             
-    {NET8_USER_FUNC_OBINDRN,  "Bind by reference numeric" },             
-    {NET8_USER_FUNC_OPARSEX,  "Parse And Execute" },             
-    {NET8_USER_FUNC_OPARSYN,  "Parse for Syntax only" },             
-    {NET8_USER_FUNC_OPARSDI,  "Parse for Syntax & SQL Dictionary lookup" },
-    {NET8_USER_FUNC_OCONTINUE, "Continue serving after eof" },            
-    {NET8_USER_FUNC_ODSCRARR, "Describe Columns" },            
-    {NET8_USER_FUNC_OLCCINI,  "Init sys pars command table" },             
-    {NET8_USER_FUNC_OLCCFIN,  "Finalize sys pars command table" },             
-    {NET8_USER_FUNC_OLCCPUT,  "Put sys par in command table" },             
-    {NET8_USER_FUNC_OV6STRT,  "Start Oracle (V6)" },             
-    {NET8_USER_FUNC_OV6STOP,  "Poll for shut down Oracle (V6)" },             
-    {NET8_USER_FUNC_ORIP,     "Run independent process (V6)" },                
-    {NET8_USER_FUNC_OARCHIVE, "Archive op (V6)" },            
-    {NET8_USER_FUNC_OMRSTART, "Media recovery - start (V6)" },            
-    {NET8_USER_FUNC_OMRRECTS, "Media recovery - record tablespace to recover (V6)"},          
-    {NET8_USER_FUNC_OMRGSLSQ, "Media recovery - get starting log seq # (V6)" },
-    {NET8_USER_FUNC_OMRREC,   "Media recovery - recover using offline log (V6)" },
-    {NET8_USER_FUNC_OMRCAN,   "Media recovery - cancel media recovery (V6)" },
-    {NET8_USER_FUNC_O2LOGON,  "Logon to ORACLE" },             
-    {NET8_USER_FUNC_OVERSION, "Get Version/Date String" },
-    {NET8_USER_FUNC_OINIT2,   "New init call (supersedes OINIT)" },              
-    {NET8_USER_FUNC_OCLOALL,  "Reserved for MAC; close all cursors" },             
-    {NET8_USER_FUNC_OALL,     "Bundled execution call" },                
-    {NET8_USER_FUNC_OTEX,     "Transaction execute call (OS/2)" },                
-    {NET8_USER_FUNC_OSDAUTH,  "Set DBA authorization call (OS/2)" },             
-    {NET8_USER_FUNC_OUDLFUN,  "Direct loader: functions" },             
-    {NET8_USER_FUNC_OUDLBUF,  "Direct loader: buffer transfer" },             
-    {NET8_USER_FUNC_OK2RPC,   "Distrib. trans. mgr. RPC" },              
-    {NET8_USER_FUNC_ODSCIDX,  "Describe indexes for distributed query" },
-    {NET8_USER_FUNC_OSESOPN,  "Session operations" },             
-    {NET8_USER_FUNC_OEXECSCN, "Execute using synchronized system commit numbers" },
-    {NET8_USER_FUNC_OALL7,    "New V8 Bundle call" },               
-    {NET8_USER_FUNC_OLONGF,   "Long fetch version 7" },              
-    {NET8_USER_FUNC_OEXECA,   "Call opiexe from opiall" },             
-    {NET8_USER_FUNC_OSQL7,    "Parse call" },               
-    {NET8_USER_FUNC_OOBS,     "(Obsolete)" },
-    {NET8_USER_FUNC_ORPC,     "RPC Call from pl" },                
-    {NET8_USER_FUNC_OEXFEN,   "OEXFEN" },
-    {NET8_USER_FUNC_OXAOPN,   "XA operation" },              
-    {NET8_USER_FUNC_OKGL,     "KGL call" },
-    {NET8_USER_FUNC_03LOGON,  "LogonB"},
-    {NET8_USER_FUNC_03LOGA,   "LogonA"},
-    {NET8_USER_FUNC_OFNSTM,   "Do Streaming Operation"},
-    {NET8_USER_FUNC_OPENSESS, "Open Session"},  
-    {NET8_USER_FUNC_O71XAOPN,  "X/Open XA operations"},
-    {NET8_USER_FUNC_ODEBUG,   "Debug"},
-    {NET8_USER_FUNC_ODEBUGS,  "Special Debug"},
-    {NET8_USER_FUNC_OXAST,    "XA Start"},
-    {NET8_USER_FUNC_OXACM,    "XA Commit"},
-    {NET8_USER_FUNC_OXAPR,    "XA Prepare"},
-    {NET8_USER_FUNC_OXDP,     "XA Import"},
-    {NET8_USER_FUNC_OKOD,     "Get Object Value From Reference"},
-    {NET8_USER_FUNC_OCONNECT, "Connect"},
-       {NET8_USER_FUNC_OCBK,           "call (kernel side only)"},
-       {NET8_USER_FUNC_OALL8,     "OALL8"},
-       {NET8_USER_FUNC_OFNSTM2,   "OFNSTM without the begintxn"},
-       {NET8_USER_FUNC_OLOBOPS,   "LOB Operation"},
-       {NET8_USER_FUNC_OFILECRT,  "FILE create call"},
-       {NET8_USER_FUNC_ODNY,      "New Describe"},
-       {NET8_USER_FUNC_OCONNECT,  "code for non blocking attach host"},
-       {NET8_USER_FUNC_OOPENRCS,  "Open a recursive cursor"},
-       {NET8_USER_FUNC_OKPRALL,   "Bundled KPR execution"},
-       {NET8_USER_FUNC_OPLS,      "Bundled PL/SQL execution"},
-       {NET8_USER_FUNC_OTXSE,      "transaction start, attach, detach"},
-       {NET8_USER_FUNC_OTXEN,      "transaction commit, rollback, recover"},
-       {NET8_USER_FUNC_OCCA,      "Cursor Close All"},
-       {NET8_USER_FUNC_OFOI,      "Failover info piggyback"},
-       {NET8_USER_FUNC_O80SES,    "V8 session switching piggyback"},
-       {NET8_USER_FUNC_ODDF,      "Do Dummy Defines"},
-       {NET8_USER_FUNC_OLRMINI,   "init sys pars"},
-       {NET8_USER_FUNC_OLRMFIN,   "finalize sys pars"},
-       {NET8_USER_FUNC_OLRMPUT,   "put sys par in par space"},
-       {NET8_USER_FUNC_OLRMTRM,   "terminate sys pars"},
-       {NET8_USER_FUNC_OEXFENA,   "execute but don't unmap (used from opiall0)"},
-       {NET8_USER_FUNC_OINIUCB,   "OINIT for Untrusted CallBacks"},
-       {NET8_USER_FUNC_AUTH,     "Authentication Call"},
-       {NET8_USER_FUNC_OFGI,      "FailOver Get Instance Info"},
-       {NET8_USER_FUNC_OOTCO,      "Oracle Transaction service COmmit remote sites"},
-       {NET8_USER_FUNC_GETSESSKEY,  "Get the session key"},
-       {NET8_USER_FUNC_ODSY,      "V8 Describe Any"},
-       {NET8_USER_FUNC_OCANA,     "Cancel All"},
-       {NET8_USER_FUNC_OAQEQ,      "AQ EnQueue"},
-       {NET8_USER_FUNC_OAQDQ,      "AQ Dequeue"},
-       {NET8_USER_FUNC_ORFS,       "RFS call"},
-       {NET8_USER_FUNC_OKPN,      "Kernel Programmatic Notification"},
-    {0,       "Unknown type"},
-       {0, NULL}
+    {NET8_USER_FUNC_OLOGON,      " Logon to Oracle"},
+    {NET8_USER_FUNC_OPENCURSOR,  "Open cursor" },
+    {NET8_USER_FUNC_PARSE,       "Parse statement" },
+    {NET8_USER_FUNC_EXECUTE,     "Execute statement" },
+    {NET8_USER_FUNC_OFETCH,      " Fetch row" },
+    {NET8_USER_FUNC_CLOSECURSOR, "Close cursor" },
+    {NET8_USER_FUNC_OLOGOFF,     "Logoff" },
+    {NET8_USER_FUNC_ODSCRIBE,    "Describe select list column" },
+    {NET8_USER_FUNC_ODEFIN,      "Define where column goes" },
+    {NET8_USER_FUNC_OCOMON,      "Autocommit On" },
+    {NET8_USER_FUNC_OCOMOFF,     "Autocommit Off" },
+    {NET8_USER_FUNC_OCOMMIT,     "Commit" },
+    {NET8_USER_FUNC_OROLLBACK,   "Rollback" },
+    {NET8_USER_FUNC_OSFE,        "Set fatal error options" },
+    {NET8_USER_FUNC_ORESUME,     "Resume current operation" },
+    {NET8_USER_FUNC_OVERSN,      "Get version-date string" },
+    {NET8_USER_FUNC_OTEMP,       "(Obsolete)" },
+    {NET8_USER_FUNC_CANCEL,      "Cancel Operation" },
+    {NET8_USER_FUNC_OGEM,        "Get error message" },
+    {NET8_USER_FUNC_OSPECIAL,    "Special function" },
+    {NET8_USER_FUNC_OABORT,      "Abort" },
+    {NET8_USER_FUNC_ODQRID,      "Dequeue by rowid" },
+    {NET8_USER_FUNC_OLNGF6,      "Fetch long value" },
+    {NET8_USER_FUNC_OHOWMANY,    "How Many Items?" },
+    {NET8_USER_FUNC_OINIT,       "Initialize Database" },
+    {NET8_USER_FUNC_OCHANGEU,    "Change user_id" },
+    {NET8_USER_FUNC_OBINDRP,     "Bind by reference positional" },
+    {NET8_USER_FUNC_OGETBV,      "Get n'th Bind Variable" },
+    {NET8_USER_FUNC_OGETIV,      "Get n'th Into Variable" },
+    {NET8_USER_FUNC_OBINDRV,     "Bind by reference" },
+    {NET8_USER_FUNC_OBINDRN,     "Bind by reference numeric" },
+    {NET8_USER_FUNC_OPARSEX,     "Parse And Execute" },
+    {NET8_USER_FUNC_OPARSYN,     "Parse for Syntax only" },
+    {NET8_USER_FUNC_OPARSDI,     "Parse for Syntax & SQL Dictionary lookup" },
+    {NET8_USER_FUNC_OCONTINUE,   "Continue serving after eof" },
+    {NET8_USER_FUNC_ODSCRARR,    "Describe Columns" },
+    {NET8_USER_FUNC_OLCCINI,     "Init sys pars command table" },
+    {NET8_USER_FUNC_OLCCFIN,     "Finalize sys pars command table" },
+    {NET8_USER_FUNC_OLCCPUT,     "Put sys par in command table" },
+    {NET8_USER_FUNC_OV6STRT,     "Start Oracle (V6)" },
+    {NET8_USER_FUNC_OV6STOP,     "Poll for shut down Oracle (V6)" },
+    {NET8_USER_FUNC_ORIP,        "Run independent process (V6)" },
+    {NET8_USER_FUNC_OARCHIVE,    "Archive op (V6)" },
+    {NET8_USER_FUNC_OMRSTART,    "Media recovery - start (V6)" },
+    {NET8_USER_FUNC_OMRRECTS,    "Media recovery - record tablespace to recover (V6)"},
+    {NET8_USER_FUNC_OMRGSLSQ,    "Media recovery - get starting log seq # (V6)" },
+    {NET8_USER_FUNC_OMRREC,      "Media recovery - recover using offline log (V6)" },
+    {NET8_USER_FUNC_OMRCAN,      "Media recovery - cancel media recovery (V6)" },
+    {NET8_USER_FUNC_O2LOGON,     "Logon to ORACLE" },
+    {NET8_USER_FUNC_OVERSION,    "Get Version/Date String" },
+    {NET8_USER_FUNC_OINIT2,      "New init call (supersedes OINIT)" },
+    {NET8_USER_FUNC_OCLOALL,     "Reserved for MAC; close all cursors" },
+    {NET8_USER_FUNC_OALL,        "Bundled execution call" },
+    {NET8_USER_FUNC_OTEX,        "Transaction execute call (OS/2)" },
+    {NET8_USER_FUNC_OSDAUTH,     "Set DBA authorization call (OS/2)" },
+    {NET8_USER_FUNC_OUDLFUN,     "Direct loader: functions" },
+    {NET8_USER_FUNC_OUDLBUF,     "Direct loader: buffer transfer" },
+    {NET8_USER_FUNC_OK2RPC,      "Distrib. trans. mgr. RPC" },
+    {NET8_USER_FUNC_ODSCIDX,     "Describe indexes for distributed query" },
+    {NET8_USER_FUNC_OSESOPN,     "Session operations" },
+    {NET8_USER_FUNC_OEXECSCN,    "Execute using synchronized system commit numbers" },
+    {NET8_USER_FUNC_OALL7,       "New V8 Bundle call" },
+    {NET8_USER_FUNC_OLONGF,      "Long fetch version 7" },
+    {NET8_USER_FUNC_OEXECA,      "Call opiexe from opiall" },
+    {NET8_USER_FUNC_OSQL7,       "Parse call" },
+    {NET8_USER_FUNC_OOBS,        "(Obsolete)" },
+    {NET8_USER_FUNC_ORPC,        "RPC Call from pl" },
+    {NET8_USER_FUNC_OEXFEN,      "OEXFEN" },
+    {NET8_USER_FUNC_OXAOPN,      "XA operation" },
+    {NET8_USER_FUNC_OKGL,        "KGL call" },
+    {NET8_USER_FUNC_03LOGON,     "LogonB"},
+    {NET8_USER_FUNC_03LOGA,      "LogonA"},
+    {NET8_USER_FUNC_OFNSTM,      "Do Streaming Operation"},
+    {NET8_USER_FUNC_OPENSESS,    "Open Session"},
+    {NET8_USER_FUNC_O71XAOPN,    "X/Open XA operations"},
+    {NET8_USER_FUNC_ODEBUG,      "Debug"},
+    {NET8_USER_FUNC_ODEBUGS,     "Special Debug"},
+    {NET8_USER_FUNC_OXAST,       "XA Start"},
+    {NET8_USER_FUNC_OXACM,       "XA Commit"},
+    {NET8_USER_FUNC_OXAPR,       "XA Prepare"},
+    {NET8_USER_FUNC_OXDP,        "XA Import"},
+    {NET8_USER_FUNC_OKOD,        "Get Object Value From Reference"},
+    {NET8_USER_FUNC_OCONNECT,    "Connect"},
+    {NET8_USER_FUNC_OCBK,        "call (kernel side only)"},
+    {NET8_USER_FUNC_OALL8,       "OALL8"},
+    {NET8_USER_FUNC_OFNSTM2,     "OFNSTM without the begintxn"},
+    {NET8_USER_FUNC_OLOBOPS,     "LOB Operation"},
+    {NET8_USER_FUNC_OFILECRT,    "FILE create call"},
+    {NET8_USER_FUNC_ODNY,        "New Describe"},
+    {NET8_USER_FUNC_OCONNECT,    "code for non blocking attach host"},
+    {NET8_USER_FUNC_OOPENRCS,    "Open a recursive cursor"},
+    {NET8_USER_FUNC_OKPRALL,     "Bundled KPR execution"},
+    {NET8_USER_FUNC_OPLS,        "Bundled PL/SQL execution"},
+    {NET8_USER_FUNC_OTXSE,       "transaction start, attach, detach"},
+    {NET8_USER_FUNC_OTXEN,       "transaction commit, rollback, recover"},
+    {NET8_USER_FUNC_OCCA,        "Cursor Close All"},
+    {NET8_USER_FUNC_OFOI,        "Failover info piggyback"},
+    {NET8_USER_FUNC_O80SES,      "V8 session switching piggyback"},
+    {NET8_USER_FUNC_ODDF,        "Do Dummy Defines"},
+    {NET8_USER_FUNC_OLRMINI,     "init sys pars"},
+    {NET8_USER_FUNC_OLRMFIN,     "finalize sys pars"},
+    {NET8_USER_FUNC_OLRMPUT,     "put sys par in par space"},
+    {NET8_USER_FUNC_OLRMTRM,     "terminate sys pars"},
+    {NET8_USER_FUNC_OEXFENA,     "execute but don't unmap (used from opiall0)"},
+    {NET8_USER_FUNC_OINIUCB,     "OINIT for Untrusted CallBacks"},
+    {NET8_USER_FUNC_AUTH,        "Authentication Call"},
+    {NET8_USER_FUNC_OFGI,        "FailOver Get Instance Info"},
+    {NET8_USER_FUNC_OOTCO,       "Oracle Transaction service COmmit remote sites"},
+    {NET8_USER_FUNC_GETSESSKEY,  "Get the session key"},
+    {NET8_USER_FUNC_ODSY,        "V8 Describe Any"},
+    {NET8_USER_FUNC_OCANA,       "Cancel All"},
+    {NET8_USER_FUNC_OAQEQ,       "AQ EnQueue"},
+    {NET8_USER_FUNC_OAQDQ,       "AQ Dequeue"},
+    {NET8_USER_FUNC_ORFS,        "RFS call"},
+    {NET8_USER_FUNC_OKPN,        "Kernel Programmatic Notification"},
+    {0,                          "Unknown type"},
+    {0, NULL}
 };
 
 
 #if 0
 /* jtse */
 /*+------------------------------------------------------
- * 
+ *
  * Convert hex data to character string
  *--------------------------------------------------------
--*/
+ */
 char * convertHexToString(BYTE *pSrc, UI16_T length)
 {
     char buf[150];
-       char * hexString;
-       char hex[17] = "0123456789ABCDEF";
-       int i;
+    char * hexString;
+    char hex[17] = "0123456789ABCDEF";
+    int i;
     int limit = 2*length;
     if (limit >= sizeof(buf) - 3)
         limit = sizeof(buf) - 3;
@@ -276,276 +272,276 @@ char * convertHexToString(BYTE *pSrc, UI16_T length)
     {
         buf[i] = hex[*pSrc>>4];
         buf[i+1] = hex[*pSrc&0x0F];
-               pSrc++;
+        pSrc++;
     }
-       buf[i] = '\0';
+    buf[i] = '\0';
 
     /*
-       for(int i=0; i<length*2; i++)
-       {
-               buf[i]   = hex[*pSrc>>4];
-               buf[++i] = hex[*pSrc&0x0F];
-               pSrc++;
-       }
-       buf[length*2] = '\0';
+      for(int i=0; i<length*2; i++)
+      {
+      buf[i]   = hex[*pSrc>>4];
+      buf[++i] = hex[*pSrc&0x0F];
+      pSrc++;
+      }
+      buf[length*2] = '\0';
     */
 
     /* hexString = buf; */
-/*     strcpy (hexString, buf); */
-       return hexString;
+/*      strcpy (hexString, buf); */
+    return hexString;
 }
 #endif
 
 static void ParseSqlStatement(/*char  *appMsg,*/ UI8_P pSqlData, UI16_T dataLen)
 {
-       char  *pSqlModifyData = (I8_P)m_pCurQuery;
-       int   i = 0;
-
-       while (*pSqlData != '\1' && *pSqlData != '\0' && i < dataLen)
-       {
-               if (*pSqlData < ' ')
-               {
-                       *pSqlModifyData = ' ';
-               }
-               else
-               {
-                       *pSqlModifyData = *pSqlData;
-               }
-
-               pSqlModifyData++;
-               pSqlData++;
-               i++;
-       }
-
-       *pSqlModifyData = '\0';
+    char  *pSqlModifyData = (I8_P)m_pCurQuery;
+    int   i = 0;
+
+    while (*pSqlData != '\1' && *pSqlData != '\0' && i < dataLen)
+    {
+        if (*pSqlData < ' ')
+        {
+            *pSqlModifyData = ' ';
+        }
+        else
+        {
+            *pSqlModifyData = *pSqlData;
+        }
+
+        pSqlModifyData++;
+        pSqlData++;
+        i++;
+    }
+
+    *pSqlModifyData = '\0';
 
 #if 0
-       appMsg = (I8_P)m_pCurQuery;
+    appMsg = (I8_P)m_pCurQuery;
 #endif
 
-       if (g_ascii_strncasecmp((I8_P)m_pCurQuery, "update", 6) == 0)
-       {
-               m_numOfUpdate++;
+    if (g_ascii_strncasecmp((I8_P)m_pCurQuery, "update", 6) == 0)
+    {
+        m_numOfUpdate++;
 #if 0
-               pSummaryStat->m_numOfUpdate++;
-               if (m_pServerNode != NULL)
-                   m_pServerNode->m_numOfUpdate++;
+        pSummaryStat->m_numOfUpdate++;
+        if (m_pServerNode != NULL)
+            m_pServerNode->m_numOfUpdate++;
 #endif
-       }
-       else if (g_ascii_strncasecmp((I8_P)m_pCurQuery, "select", 6) == 0)
-       {
-               m_numOfSelect++;
+    }
+    else if (g_ascii_strncasecmp((I8_P)m_pCurQuery, "select", 6) == 0)
+    {
+        m_numOfSelect++;
 #if 0
-               pSummaryStat->m_numOfSelect++;
-               if (m_pServerNode != NULL)
-                   m_pServerNode->m_numOfSelect++;
+        pSummaryStat->m_numOfSelect++;
+        if (m_pServerNode != NULL)
+            m_pServerNode->m_numOfSelect++;
 #endif
-       }
-       else if (g_ascii_strncasecmp((I8_P)m_pCurQuery, "insert", 6) == 0)
-       {
-               m_numOfInsert++;
+    }
+    else if (g_ascii_strncasecmp((I8_P)m_pCurQuery, "insert", 6) == 0)
+    {
+        m_numOfInsert++;
 #if 0
-               pSummaryStat->m_numOfInsert++;
-               if (m_pServerNode != NULL)
-                       m_pServerNode->m_numOfInsert++;
+        pSummaryStat->m_numOfInsert++;
+        if (m_pServerNode != NULL)
+            m_pServerNode->m_numOfInsert++;
 #endif
-       }
-       else if (g_ascii_strncasecmp((I8_P)m_pCurQuery, "delete", 6) == 0)
-       {
-               m_numOfDelete++;
+    }
+    else if (g_ascii_strncasecmp((I8_P)m_pCurQuery, "delete", 6) == 0)
+    {
+        m_numOfDelete++;
 #if 0
-               pSummaryStat->m_numOfDelete++;
-               if (m_pServerNode != NULL)
-                       m_pServerNode->m_numOfDelete++;
+        pSummaryStat->m_numOfDelete++;
+        if (m_pServerNode != NULL)
+            m_pServerNode->m_numOfDelete++;
 #endif
-       }
-       else if (g_ascii_strncasecmp((I8_P)m_pCurQuery, "rollback", 8) == 0)
-       {
-               m_numOfRollback++;
+    }
+    else if (g_ascii_strncasecmp((I8_P)m_pCurQuery, "rollback", 8) == 0)
+    {
+        m_numOfRollback++;
 #if 0
-               pSummaryStat->m_numOfRollback++;
-               if (m_pServerNode != NULL)
-                       m_pServerNode->m_numOfRollback++;
+        pSummaryStat->m_numOfRollback++;
+        if (m_pServerNode != NULL)
+            m_pServerNode->m_numOfRollback++;
 #endif
-       }
-       else if (g_ascii_strncasecmp((I8_P)m_pCurQuery, "set", 3) == 0)
-       {
-               m_numOfSet++;
+    }
+    else if (g_ascii_strncasecmp((I8_P)m_pCurQuery, "set", 3) == 0)
+    {
+        m_numOfSet++;
 #if 0
-               pSummaryStat->m_numOfSet++;
-               if (m_pServerNode != NULL)
-                       m_pServerNode->m_numOfSet++;
+        pSummaryStat->m_numOfSet++;
+        if (m_pServerNode != NULL)
+            m_pServerNode->m_numOfSet++;
 #endif
-       }
-       else if (g_ascii_strncasecmp((I8_P)m_pCurQuery, "start", 5) == 0)
-       {
-               m_numOfStart++;
+    }
+    else if (g_ascii_strncasecmp((I8_P)m_pCurQuery, "start", 5) == 0)
+    {
+        m_numOfStart++;
 #if 0
-               pSummaryStat->m_numOfStart++;
-               if (m_pServerNode != NULL)
-                       m_pServerNode->m_numOfStart++;
+        pSummaryStat->m_numOfStart++;
+        if (m_pServerNode != NULL)
+            m_pServerNode->m_numOfStart++;
 #endif
-       }
-       else if (g_ascii_strncasecmp((I8_P)m_pCurQuery, "commit", 6) == 0)
-       {
-               m_numOfCommit++;
+    }
+    else if (g_ascii_strncasecmp((I8_P)m_pCurQuery, "commit", 6) == 0)
+    {
+        m_numOfCommit++;
 #if 0
-               pSummaryStat->m_numOfCommit++;
-               if (m_pServerNode != NULL)
-                       m_pServerNode->m_numOfCommit++;
+        pSummaryStat->m_numOfCommit++;
+        if (m_pServerNode != NULL)
+            m_pServerNode->m_numOfCommit++;
 #endif
-       }
-       else 
-       {
-               m_numOfOtherStatement++;
+    }
+    else
+    {
+        m_numOfOtherStatement++;
 #if 0
-               pSummaryStat->m_numOfOtherStatement++;
-               if (m_pServerNode != NULL)
-                       m_pServerNode->m_numOfOtherStatement++;
+        pSummaryStat->m_numOfOtherStatement++;
+        if (m_pServerNode != NULL)
+            m_pServerNode->m_numOfOtherStatement++;
 #endif
-       }
+    }
 
-       m_numOfTransaction++;
+    m_numOfTransaction++;
 #if 0
-       m_pSummaryStat->m_numOfTransaction++;
-        if (m_pServerNode != NULL)
-               m_pServerNode->m_numOfTransaction++;
+    m_pSummaryStat->m_numOfTransaction++;
+    if (m_pServerNode != NULL)
+        m_pServerNode->m_numOfTransaction++;
 #endif
 }
 
 
 static gboolean FindBeginningSQLString(UI8_P *pBuf, UI16_T *pDataLen, int lookSize)
 {
-       /* the position could still be off by x bytes, check if it happened to be landing on an address */
-/*     int i = 31;     /+ allow upto 8 bad bytes */
-       UI8_P pString = *pBuf;
-       gboolean bAlpha1 = isalpha(pString[0]) != 0;
-       gboolean bAlpha2 = isalpha(pString[1]) != 0;
-       gboolean bAlpha3 = isalpha(pString[2]) != 0;
-       gboolean bAlpha4 = isalpha(pString[3]) != 0;
-       gboolean bComment = FALSE;
-       UI16_T dataLen = *pDataLen;
-       while ( (dataLen > 2) && (lookSize > 0) && ((bAlpha1 == FALSE) || (bAlpha2 == FALSE) || (bAlpha3 == FALSE) || (bAlpha4 == FALSE)))
-       {
-               /* check if we need to find the ending comment */
-               if (bComment)
-               {
-                       if (*((UI16_P)pString) == 0x2F2A)       /* ending comment */
-                       {
-                               bComment = FALSE;
-                               pString ++;     /* skip the comment */
-                               dataLen --;
-                       }
-                       pString ++;
-                       dataLen --;
-               }
-               else
-               {
-                       /* check if there is a comment string prepended to the statement */
-                       if (*((UI16_P)pString) == 0x2A2F)       /* beginning of comment */
-                       {
-                               bComment = TRUE;
-                               dataLen -= 2;
-                               pString += 2;
-                               bAlpha2 = isalpha(pString[1]) != 0;
-                               bAlpha3 = isalpha(pString[2]) != 0;
-                               bAlpha4 = isalpha(pString[3]) != 0;
-                               continue;
-                       }
-                       pString++;
-                       bAlpha1 = bAlpha2;
-                       bAlpha2 = isalpha(pString[1]) != 0;
-                       bAlpha3 = isalpha(pString[2]) != 0;
-                       bAlpha4 = isalpha(pString[3]) != 0;
-                       dataLen --;
+    /* the position could still be off by x bytes, check if it happened to be landing on an address */
+/*      int i = 31;     /+ allow upto 8 bad bytes */
+    UI8_P pString = *pBuf;
+    gboolean bAlpha1 = isalpha(pString[0]) != 0;
+    gboolean bAlpha2 = isalpha(pString[1]) != 0;
+    gboolean bAlpha3 = isalpha(pString[2]) != 0;
+    gboolean bAlpha4 = isalpha(pString[3]) != 0;
+    gboolean bComment = FALSE;
+    UI16_T dataLen = *pDataLen;
+    while ( (dataLen > 2) && (lookSize > 0) && ((bAlpha1 == FALSE) || (bAlpha2 == FALSE) || (bAlpha3 == FALSE) || (bAlpha4 == FALSE)))
+    {
+        /* check if we need to find the ending comment */
+        if (bComment)
+        {
+            if (*((UI16_P)pString) == 0x2F2A)   /* ending comment */
+            {
+                bComment = FALSE;
+                pString ++;     /* skip the comment */
+                dataLen --;
+            }
+            pString ++;
+            dataLen --;
+        }
+        else
+        {
+            /* check if there is a comment string prepended to the statement */
+            if (*((UI16_P)pString) == 0x2A2F)   /* beginning of comment */
+            {
+                bComment = TRUE;
+                dataLen -= 2;
+                pString += 2;
+                bAlpha2 = isalpha(pString[1]) != 0;
+                bAlpha3 = isalpha(pString[2]) != 0;
+                bAlpha4 = isalpha(pString[3]) != 0;
+                continue;
+            }
+            pString++;
+            bAlpha1 = bAlpha2;
+            bAlpha2 = isalpha(pString[1]) != 0;
+            bAlpha3 = isalpha(pString[2]) != 0;
+            bAlpha4 = isalpha(pString[3]) != 0;
+            dataLen --;
             /* don't count the zeros */
             if (*((UI8_P)pString) != 0x0)
-                           lookSize--;
-               }
-       }
-       if (bAlpha1 && bAlpha2 && bAlpha3 && bAlpha4)
-       {
-               *pBuf = pString;
-               *pDataLen = dataLen;
-               return TRUE;
-       }
-       else
-               return FALSE;
+                lookSize--;
+        }
+    }
+    if (bAlpha1 && bAlpha2 && bAlpha3 && bAlpha4)
+    {
+        *pBuf = pString;
+        *pDataLen = dataLen;
+        return TRUE;
+    }
+    else
+        return FALSE;
 }
 
 static gboolean ParseCommand(proto_tree *tree,tvbuff_t *tvb, int offset, packet_info *pinfo,UI16_T dataLen)
 {
-       UI8_T pAddress[1024];
-       UI16_T SQLDataLen = dataLen;
-       int i;
-       UI8_P pAddr;
-       for (i=0; i<1024;i++)
-       {
-               pAddress[i] = '\0';
-       }
-       tvb_memcpy (tvb, pAddress,offset, dataLen);
-       pAddr = (UI8_P)pAddress;
-       /* see if SQL statement is there */
-       if (FindBeginningSQLString((UI8_P*)&pAddr, &SQLDataLen, 0x30) == TRUE)
-       {
-               ParseSqlStatement( pAddr, dataLen);
-               if (tree)
-                       proto_tree_add_text(tree, tvb, offset+dataLen-SQLDataLen, SQLDataLen,
-                           "SQL statement = %s",m_pCurQuery);
-    col_clear(pinfo->cinfo, COL_INFO);
-           if (check_col(pinfo->cinfo, COL_INFO))
-                  col_add_str(pinfo->cinfo, COL_INFO, m_pCurQuery );
-               return TRUE;
-       }
-       return FALSE;
+    UI8_T pAddress[1024];
+    UI16_T SQLDataLen = dataLen;
+    int i;
+    UI8_P pAddr;
+    for (i=0; i<1024;i++)
+    {
+        pAddress[i] = '\0';
+    }
+    tvb_memcpy (tvb, pAddress,offset, dataLen);
+    pAddr = (UI8_P)pAddress;
+    /* see if SQL statement is there */
+    if (FindBeginningSQLString((UI8_P*)&pAddr, &SQLDataLen, 0x30) == TRUE)
+    {
+        ParseSqlStatement( pAddr, dataLen);
+        if (tree)
+            proto_tree_add_text(tree, tvb, offset+dataLen-SQLDataLen, SQLDataLen,
+                                "SQL statement = %s",m_pCurQuery);
+        col_clear(pinfo->cinfo, COL_INFO);
+        if (check_col(pinfo->cinfo, COL_INFO))
+            col_add_str(pinfo->cinfo, COL_INFO, m_pCurQuery );
+        return TRUE;
+    }
+    return FALSE;
 }
 
 #if 0
 static gboolean ParseNewCommand( proto_tree *tree,tvbuff_t *tvb, int offset, packet_info *pinfo, UI16_T dataLen)
 {
-       UI8_T pAddress[1024];
-       /* find the first sequence of zeros */
-       int amount = dataLen - 12;
-       int i = 0, sqlamount;
-       UI8_P pAddr;
-       tvb_memcpy (tvb, pAddress,offset, dataLen);
-       pAddr = (UI8_P)&pAddress;
-       for (; i < amount; i++)
-       {
-               if (*((UI32_P)((UI8_P)pAddr++)) == 0x0000)
-                       break;
-       }
-       /* was there a sequence of 4 zeros */
-       if (i >= amount)
-       {
-       /*      free(pAddr); */
-               return FALSE;           /* went past, can not be a sql command */
-       }
-       /* look for the end of the zeros */
-       amount = dataLen - i - 4;       /* rest of the data */
-       pAddr += 3;
-       for (i = 0; *pAddr++ == 0 && i < amount; i++);
-       if (i >= amount)
-       {
-               /* free (pAddr); */
-               return FALSE;   /* no values after zeros */
-       }
-
-       amount -= i + 1;        /* rest of the data */
-
-       /* see if SQL statement is there */
-       sqlamount = amount;
-       if (FindBeginningSQLString((UI8_P*)&pAddr, (UI16_P)&sqlamount, 13) == TRUE)
-       {
-               ParseSqlStatement( pAddr, amount);
-    col_clear(pinfo->cinfo, COL_INFO);
-           if (check_col(pinfo->cinfo, COL_INFO))
-                  col_add_str(pinfo->cinfo, COL_INFO, m_pCurQuery );
-               proto_tree_add_text(tree, tvb, offset+amount-sqlamount, sqlamount,
-                           "SQL statement = %s",m_pCurQuery);
-               return TRUE;
-       }
-       return FALSE;
+    UI8_T pAddress[1024];
+    /* find the first sequence of zeros */
+    int amount = dataLen - 12;
+    int i = 0, sqlamount;
+    UI8_P pAddr;
+    tvb_memcpy (tvb, pAddress,offset, dataLen);
+    pAddr = (UI8_P)&pAddress;
+    for (; i < amount; i++)
+    {
+        if (*((UI32_P)((UI8_P)pAddr++)) == 0x0000)
+            break;
+    }
+    /* was there a sequence of 4 zeros */
+    if (i >= amount)
+    {
+        /*      free(pAddr); */
+        return FALSE;           /* went past, can not be a sql command */
+    }
+    /* look for the end of the zeros */
+    amount = dataLen - i - 4;   /* rest of the data */
+    pAddr += 3;
+    for (i = 0; *pAddr++ == 0 && i < amount; i++);
+    if (i >= amount)
+    {
+        /* free (pAddr); */
+        return FALSE;   /* no values after zeros */
+    }
+
+    amount -= i + 1;    /* rest of the data */
+
+    /* see if SQL statement is there */
+    sqlamount = amount;
+    if (FindBeginningSQLString((UI8_P*)&pAddr, (UI16_P)&sqlamount, 13) == TRUE)
+    {
+        ParseSqlStatement( pAddr, amount);
+        col_clear(pinfo->cinfo, COL_INFO);
+        if (check_col(pinfo->cinfo, COL_INFO))
+            col_add_str(pinfo->cinfo, COL_INFO, m_pCurQuery );
+        proto_tree_add_text(tree, tvb, offset+amount-sqlamount, sqlamount,
+                            "SQL statement = %s",m_pCurQuery);
+        return TRUE;
+    }
+    return FALSE;
 }
 #endif
 
@@ -553,228 +549,228 @@ static gboolean ParseNewCommand( proto_tree *tree,tvbuff_t *tvb, int offset, pac
 
 
 static void
-dissect_sqloracle(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) 
+dissect_sqloracle(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 {
-       proto_item      *ti = NULL;
-       proto_tree      *sqloracle_tree = NULL;
-       int offset = 0,dataLen,nocol,numItersThisTime,flag,iterNum,uacBufLength;
-       guint8  header_operation,func_type=0;
-       m_pCurQuery[0] = '0';
+    proto_item  *ti = NULL;
+    proto_tree  *sqloracle_tree = NULL;
+    int offset = 0,dataLen,nocol,numItersThisTime,flag,iterNum,uacBufLength;
+    guint8      header_operation,func_type=0;
+    m_pCurQuery[0] = '0';
 
 
-       pinfo->current_proto = "SQLORACLE";
-       col_set_str(pinfo->cinfo, COL_PROTOCOL, "SQL");
+    pinfo->current_proto = "SQLORACLE";
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, "SQL");
     col_clear(pinfo->cinfo, COL_INFO);
 
-       header_operation = tvb_get_guint8(tvb, offset);
-       dataLen = tvb_reported_length_remaining(tvb, offset);
-       if (header_operation != NET8_TYPE_FUNCCOMPLETE)
-               func_type = tvb_get_guint8(tvb, offset+1);
-
-       if ( check_col(pinfo->cinfo, COL_INFO))
-       {
-          col_add_fstr(pinfo->cinfo, COL_INFO, "%s ", val_to_str(header_operation, sqloracle_operation_type, ""));
-       }
-
-       if ( tree ) 
-       { 
-               ti = proto_tree_add_item(tree, proto_sqloracle, tvb, 0, -1, FALSE);
-               sqloracle_tree = proto_item_add_subtree(ti, ett_sqloracle);
-           proto_tree_add_uint(sqloracle_tree, hf_sqloracle_operation, tvb, offset, 1,header_operation);
-               if (func_type && header_operation !=NET8_TYPE_ROWTRANSFER)
-                       proto_tree_add_uint(sqloracle_tree, hf_sqloracle_func_type, tvb, offset+1, 1,func_type);
-       }
-
-       switch (header_operation)
-       {
-               case NET8_TYPE_USERTOSERVER: /* 0x3 */
-                       if ( check_col(pinfo->cinfo, COL_INFO))
-                       {
+    header_operation = tvb_get_guint8(tvb, offset);
+    dataLen = tvb_reported_length_remaining(tvb, offset);
+    if (header_operation != NET8_TYPE_FUNCCOMPLETE)
+        func_type = tvb_get_guint8(tvb, offset+1);
+
+    if ( check_col(pinfo->cinfo, COL_INFO))
+    {
+        col_add_fstr(pinfo->cinfo, COL_INFO, "%s ", val_to_str(header_operation, sqloracle_operation_type, ""));
+    }
+
+    if ( tree )
+    {
+        ti = proto_tree_add_item(tree, proto_sqloracle, tvb, 0, -1, FALSE);
+        sqloracle_tree = proto_item_add_subtree(ti, ett_sqloracle);
+        proto_tree_add_uint(sqloracle_tree, hf_sqloracle_operation, tvb, offset, 1,header_operation);
+        if (func_type && header_operation !=NET8_TYPE_ROWTRANSFER)
+            proto_tree_add_uint(sqloracle_tree, hf_sqloracle_func_type, tvb, offset+1, 1,func_type);
+    }
+
+    switch (header_operation)
+    {
+        case NET8_TYPE_USERTOSERVER: /* 0x3 */
+            if ( check_col(pinfo->cinfo, COL_INFO))
+            {
                 col_append_fstr(pinfo->cinfo, COL_INFO, ":%s ", val_to_str(func_type, sql_func_type, ""));
-                       }
-                       switch (func_type)
-                       {
-                               case NET8_USER_FUNC_PARSE:
-                                       ParseCommand(sqloracle_tree,tvb,offset+0x0B,pinfo,dataLen-0x0B);
-                                       break;
-                               case NET8_USER_FUNC_OALL:
-                               case NET8_USER_FUNC_OALL8:
-                                       /* command could be embedded in this packet
-                                        * filtered_for_hh02_and_hh05.enc has commands that are not 0x2f offset
-                                        * try to detect the difference by looking at the offset 0x12 for 6 zeros
-                                        */
-                                       if (dataLen > (0x19 + 8))       /* assume minimum of 8 chars for the command */
-                                       {
-                                               /* piggybacked functions will recursive call this routine to process the command */
-                                               if (ParseCommand(sqloracle_tree,tvb, offset+0x12, pinfo,dataLen - 0x12) == TRUE)
-                                                       break;
-                                       }
-                                       break;
-                               case NET8_USER_FUNC_OSQL7:                      /* 0x4A */
-                                       /* command could be embedded in this packet */
-                                       /* aig oracle.enc has smaller data */
-                                       if (dataLen > (0x2A /*0x30/0x14*/ + 8)) /* minimum of 8 chars */
-                                       {
-                                               if (ParseCommand(sqloracle_tree,tvb, offset + 0x2A /*0x30/0x14*/, pinfo,dataLen - 0x2A /*0x30/0x14*/) == TRUE)
-                                                               break;
-                                       }
-                                       break;
-
-                               case NET8_USER_FUNC_OALL7:                      /* 0x47 */
-                                       /* command could be embedded in this packet */
-                                       if (dataLen > (0x2A /*0x30/0x14*/ + 8)) /* minimum of 8 chars */
-                                       {
-                                               if (ParseCommand(sqloracle_tree,tvb, offset + 0x14, pinfo,dataLen - 0x14) == TRUE)
-                                               {
-                                                       if (check_col(pinfo->cinfo, COL_INFO))
-                                                               col_add_str(pinfo->cinfo, COL_INFO, m_pCurQuery );
-                                                       break;
-                                               }
-                                               else
-                                                       /* appdncr.enc has this smaller command */
-                                               if (ParseCommand(sqloracle_tree,tvb, offset + 0x30, pinfo,dataLen - 0x30) == TRUE)
-                                                       break;
-                                       }
-                                       break;
-                       }
-                       break;
-               case NET8_TYPE_ROWTRANSFER:             /* 0x06 */
-                       flag = func_type;
-                       proto_tree_add_uint(sqloracle_tree, hf_sqloracle_flag, tvb, offset+1, 1,flag);
-                       nocol = tvb_get_guint8(tvb, offset+2);
-                       iterNum = tvb_get_guint8(tvb, offset+3);
-                       numItersThisTime = tvb_get_ntohs(tvb, offset+5);
-                       uacBufLength = tvb_get_ntohs(tvb, offset+7);
-                       proto_tree_add_uint(sqloracle_tree, hf_sqloracle_num_column, tvb, offset+2, 1,nocol);
-                       proto_tree_add_uint(sqloracle_tree, hf_sqloracle_itemNum, tvb, offset+3, 1,iterNum);
-                       proto_tree_add_uint(sqloracle_tree, hf_sqloracle_numItersThisTime, tvb, offset+5, 2,numItersThisTime);
-                       proto_tree_add_uint(sqloracle_tree, hf_sqloracle_uacBufLength, tvb, offset+7, 2,uacBufLength);
-
-                       break;
-               default:
-                       return;
-                       break;
-       }
+            }
+            switch (func_type)
+            {
+                case NET8_USER_FUNC_PARSE:
+                    ParseCommand(sqloracle_tree,tvb,offset+0x0B,pinfo,dataLen-0x0B);
+                    break;
+                case NET8_USER_FUNC_OALL:
+                case NET8_USER_FUNC_OALL8:
+                    /* command could be embedded in this packet
+                     * filtered_for_hh02_and_hh05.enc has commands that are not 0x2f offset
+                     * try to detect the difference by looking at the offset 0x12 for 6 zeros
+                     */
+                    if (dataLen > (0x19 + 8))   /* assume minimum of 8 chars for the command */
+                    {
+                        /* piggybacked functions will recursive call this routine to process the command */
+                        if (ParseCommand(sqloracle_tree,tvb, offset+0x12, pinfo,dataLen - 0x12) == TRUE)
+                            break;
+                    }
+                    break;
+                case NET8_USER_FUNC_OSQL7:                      /* 0x4A */
+                    /* command could be embedded in this packet */
+                    /* aig oracle.enc has smaller data */
+                    if (dataLen > (0x2A /*0x30/0x14*/ + 8))     /* minimum of 8 chars */
+                    {
+                        if (ParseCommand(sqloracle_tree,tvb, offset + 0x2A /*0x30/0x14*/, pinfo,dataLen - 0x2A /*0x30/0x14*/) == TRUE)
+                            break;
+                    }
+                    break;
+
+                case NET8_USER_FUNC_OALL7:                      /* 0x47 */
+                    /* command could be embedded in this packet */
+                    if (dataLen > (0x2A /*0x30/0x14*/ + 8))     /* minimum of 8 chars */
+                    {
+                        if (ParseCommand(sqloracle_tree,tvb, offset + 0x14, pinfo,dataLen - 0x14) == TRUE)
+                        {
+                            if (check_col(pinfo->cinfo, COL_INFO))
+                                col_add_str(pinfo->cinfo, COL_INFO, m_pCurQuery );
+                            break;
+                        }
+                        else
+                            /* appdncr.enc has this smaller command */
+                            if (ParseCommand(sqloracle_tree,tvb, offset + 0x30, pinfo,dataLen - 0x30) == TRUE)
+                                break;
+                    }
+                    break;
+            }
+            break;
+        case NET8_TYPE_ROWTRANSFER:             /* 0x06 */
+            flag = func_type;
+            proto_tree_add_uint(sqloracle_tree, hf_sqloracle_flag, tvb, offset+1, 1,flag);
+            nocol = tvb_get_guint8(tvb, offset+2);
+            iterNum = tvb_get_guint8(tvb, offset+3);
+            numItersThisTime = tvb_get_ntohs(tvb, offset+5);
+            uacBufLength = tvb_get_ntohs(tvb, offset+7);
+            proto_tree_add_uint(sqloracle_tree, hf_sqloracle_num_column, tvb, offset+2, 1,nocol);
+            proto_tree_add_uint(sqloracle_tree, hf_sqloracle_itemNum, tvb, offset+3, 1,iterNum);
+            proto_tree_add_uint(sqloracle_tree, hf_sqloracle_numItersThisTime, tvb, offset+5, 2,numItersThisTime);
+            proto_tree_add_uint(sqloracle_tree, hf_sqloracle_uacBufLength, tvb, offset+7, 2,uacBufLength);
+
+            break;
+        default:
+            return;
+            break;
+    }
 
 } /* dissect_sqloracle */
 
 void
 proto_register_sqloracle(void)
 {
-       static hf_register_info hf[] =
-       {
-               { &hf_sqloracle_operation,
-                 { "Basic Operation", "sqloracle.operation", FT_UINT8, BASE_DEC, VALS(sqloracle_operation_type), 0x0, NULL, HFILL }
-               },
-               { &hf_sqloracle_func_type,
-                 { "Function Type", "sqloracle.type", FT_UINT8, BASE_DEC, VALS(sql_func_type), 0x0, NULL, HFILL }
-               },
-               { &hf_sqloracle_flag,
-                 { "flag", "sqloracle.flag", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
-               },
-               { &hf_sqloracle_num_column,
-                       { "Number of Columns", "sqloracle.nocolumn", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
-               },
-               { &hf_sqloracle_itemNum,
-                 { "Iteration Number", "sqloracle.itemNum", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }
-               },
-               { &hf_sqloracle_numItersThisTime,
-                 { "# of iterations this time", "sqloracle.numItersThisTime", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }
-               },
-               { &hf_sqloracle_uacBufLength,
-                 { "user access buffer length", "sqloracle.uacBufLength", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }
-               },
-/*             { &hf_sqloracle_ttloac_header,
-                       { "TTLOAC Header", "sqloracle.ttloac_header", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }
-               },
-
-               { &hf_sqloracle_ttloac_type,
-                       { "type", "sqloracle.ttloac_type", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }
-               },
-               { &hf_sqloracle_ttloac_flag1,
-                 { "flag1", "sqloracle.ttloac_flag1", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }
-               },
-               { &hf_sqloracle_ttloac_prefix,
-               { "prefix",             "sqloracle.ttloac_prefix", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }
-               },
-               { &hf_sqloracle_ttloac_scalesize,
-               { "scale size",         "sqloracle.ttloac_scalesize", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }
-               },
-               { &hf_sqloracle_ttloac_dummy,
-               { "dummy",              "sqloracle.ottloac_dummy", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }
-               },
-               { &hf_sqloracle_ttloac_varcharlen,
-               { "varcharlen",         "sqloracle.ttloac_varcharlen", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }
-               },
-               { &hf_sqloracle_ttloac_mal,
-               { "mal",                "sqloracle.ttloac_mal", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }
-               },
-               { &hf_sqloracle_ttloac_flag2,
-               { "flag2",              "sqloracle.ttloac_flag2", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }
-               },
-               { &hf_sqloracle_v8ttloac_header,
-                       { "V8TTLOAC Header", "sqloracle.v8ttloac_header", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }
-               },
-
-               { &hf_sqloracle_v8ttloac_oid,
-                       { "oid", "sqloracle.v8ttloac_oid", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }
-               },
-               { &hf_sqloracle_v8ttloac_vsn,
-                 { "vsn", "sqloracle.v8ttloac_vsn", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }
-               },
-               { &hf_sqloracle_v8ttloac_ncs,
-               { "ncs",                "sqloracle.v8ttloac_ncs", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }
-               },
-               { &hf_sqloracle_v8ttloac_formuse,
-               { "FormUse",            "sqloracle.v8ttloac_formuse", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }
-               },
-               { &hf_sqloracle_v8ttluds_header,
-                       { "V8TTLUDS Header", "sqloracle.v8ttluds_header", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }
-               },
-
-               { &hf_sqloracle_v8ttluds_nullallow,
-                       { "null allowed", "sqloracle.v8ttluds_nullallow", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }
-               },
-               { &hf_sqloracle_v8ttluds_scrlength,
-                 { "screen length", "sqloracle.v8ttluds_scrlength", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }
-               },
-               { &hf_sqloracle_v8ttluds_columnname,
-                 { "column name", "sqloracle.v8ttluds_columnname", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }
-               },
-               { &hf_sqloracle_v8ttluds_sname,
-                 { "sName", "sqloracle.v8ttluds_snname", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }
-               },
-               { &hf_sqloracle_v8ttluds_tname,
-                 { "tName", "sqloracle.v8ttluds_tname", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }
-               },
-               { &hf_sqloracle_stmt_length,
-               { "SQL Statement Length",       "sqloracle.stmtlength", FT_UINT8, BASE_DEC, NULL, 0x0,
-                       "", HFILL }},
-*/             { &hf_sqloracle_stmt,
-                       { "SQL statement", "sqloracle.stmt", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
-               },
-               };
-
-       static gint *ett[] =
-       {
-               &ett_sqloracle,
-               &ett_sqloracle_operation,
-       };
-
-       proto_sqloracle = proto_register_protocol("SQL -Net8 Data", "SQL", "sqloracle");
-       proto_register_field_array(proto_sqloracle, hf, array_length(hf));
-       proto_register_subtree_array(ett, array_length(ett));
-
-       
-       register_dissector("sqloracle", dissect_sqloracle, proto_sqloracle);
+    static hf_register_info hf[] =
+        {
+            { &hf_sqloracle_operation,
+              { "Basic Operation", "sqloracle.operation", FT_UINT8, BASE_DEC, VALS(sqloracle_operation_type), 0x0, NULL, HFILL }
+            },
+            { &hf_sqloracle_func_type,
+              { "Function Type", "sqloracle.type", FT_UINT8, BASE_DEC, VALS(sql_func_type), 0x0, NULL, HFILL }
+            },
+            { &hf_sqloracle_flag,
+              { "flag", "sqloracle.flag", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
+            },
+            { &hf_sqloracle_num_column,
+              { "Number of Columns", "sqloracle.nocolumn", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
+            },
+            { &hf_sqloracle_itemNum,
+              { "Iteration Number", "sqloracle.itemNum", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }
+            },
+            { &hf_sqloracle_numItersThisTime,
+              { "# of iterations this time", "sqloracle.numItersThisTime", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }
+            },
+            { &hf_sqloracle_uacBufLength,
+              { "user access buffer length", "sqloracle.uacBufLength", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }
+            },
+/*              { &hf_sqloracle_ttloac_header,
+                { "TTLOAC Header", "sqloracle.ttloac_header", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }
+                },
+
+                { &hf_sqloracle_ttloac_type,
+                { "type", "sqloracle.ttloac_type", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }
+                },
+                { &hf_sqloracle_ttloac_flag1,
+                { "flag1", "sqloracle.ttloac_flag1", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }
+                },
+                { &hf_sqloracle_ttloac_prefix,
+                { "prefix",             "sqloracle.ttloac_prefix", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }
+                },
+                { &hf_sqloracle_ttloac_scalesize,
+                { "scale size",         "sqloracle.ttloac_scalesize", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }
+                },
+                { &hf_sqloracle_ttloac_dummy,
+                { "dummy",              "sqloracle.ottloac_dummy", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }
+                },
+                { &hf_sqloracle_ttloac_varcharlen,
+                { "varcharlen",         "sqloracle.ttloac_varcharlen", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }
+                },
+                { &hf_sqloracle_ttloac_mal,
+                { "mal",                "sqloracle.ttloac_mal", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }
+                },
+                { &hf_sqloracle_ttloac_flag2,
+                { "flag2",              "sqloracle.ttloac_flag2", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }
+                },
+                { &hf_sqloracle_v8ttloac_header,
+                { "V8TTLOAC Header", "sqloracle.v8ttloac_header", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }
+                },
+
+                { &hf_sqloracle_v8ttloac_oid,
+                { "oid", "sqloracle.v8ttloac_oid", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }
+                },
+                { &hf_sqloracle_v8ttloac_vsn,
+                { "vsn", "sqloracle.v8ttloac_vsn", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }
+                },
+                { &hf_sqloracle_v8ttloac_ncs,
+                { "ncs",                "sqloracle.v8ttloac_ncs", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }
+                },
+                { &hf_sqloracle_v8ttloac_formuse,
+                { "FormUse",            "sqloracle.v8ttloac_formuse", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }
+                },
+                { &hf_sqloracle_v8ttluds_header,
+                { "V8TTLUDS Header", "sqloracle.v8ttluds_header", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }
+                },
+
+                { &hf_sqloracle_v8ttluds_nullallow,
+                { "null allowed", "sqloracle.v8ttluds_nullallow", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }
+                },
+                { &hf_sqloracle_v8ttluds_scrlength,
+                { "screen length", "sqloracle.v8ttluds_scrlength", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }
+                },
+                { &hf_sqloracle_v8ttluds_columnname,
+                { "column name", "sqloracle.v8ttluds_columnname", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }
+                },
+                { &hf_sqloracle_v8ttluds_sname,
+                { "sName", "sqloracle.v8ttluds_snname", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }
+                },
+                { &hf_sqloracle_v8ttluds_tname,
+                { "tName", "sqloracle.v8ttluds_tname", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL }
+                },
+                { &hf_sqloracle_stmt_length,
+                { "SQL Statement Length",       "sqloracle.stmtlength", FT_UINT8, BASE_DEC, NULL, 0x0,
+                "", HFILL }},
+*/              { &hf_sqloracle_stmt,
+                  { "SQL statement", "sqloracle.stmt", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
+            },
+        };
+
+    static gint *ett[] =
+        {
+            &ett_sqloracle,
+            &ett_sqloracle_operation,
+        };
+
+    proto_sqloracle = proto_register_protocol("SQL -Net8 Data", "SQL", "sqloracle");
+    proto_register_field_array(proto_sqloracle, hf, array_length(hf));
+    proto_register_subtree_array(ett, array_length(ett));
+
+
+    register_dissector("sqloracle", dissect_sqloracle, proto_sqloracle);
 }
 
 void
 proto_reg_handoff_sqloracle(void)
 {
-       dissector_handle_t sqloracle_handle;
+    dissector_handle_t sqloracle_handle;
 
-       sqloracle_handle = find_dissector("sqloracle");
-       dissector_add("tns.port", TCP_PORT_TNS, sqloracle_handle);
+    sqloracle_handle = find_dissector("sqloracle");
+    dissector_add("tns.port", TCP_PORT_TNS, sqloracle_handle);
 }
 
index 1a5a6fffeb175d649758a1af040380fa7e83252b..b784d80b0b2099018e0e6a8185c6eb3bae334ad5 100644 (file)
  * to be placed within different transports (TCP, DECNet, IPX/SPX).  A
  * NETLIB packet starts with an eight byte header containing:
  *
- *     a one-byte packet type field;
+ *      a one-byte packet type field;
  *
- *     a one-byte status field;
+ *      a one-byte status field;
  *
- *     a two-byte big-endian size field giving the size of the packet,
- *     including the header;
+ *      a two-byte big-endian size field giving the size of the packet,
+ *      including the header;
  *
- *     a two-byte big-endian channel number, used when multiple sessions
- *     are being multiplexed on a single connection;
+ *      a two-byte big-endian channel number, used when multiple sessions
+ *      are being multiplexed on a single connection;
  *
- *     a one-byte packet number, giving "the frame number of a multiplexed
- *     message, modulo 256";
+ *      a one-byte packet number, giving "the frame number of a multiplexed
+ *      message, modulo 256";
  *
- *     a one-byte window, which is the number of frames to be sent
- *     before an acknowledgment message is received.
+ *      a one-byte window, which is the number of frames to be sent
+ *      before an acknowledgment message is received.
  *
  * followed by payload whose size is the value in the size field minus
  * 8.
 #define TDS_LOG_CHN_ACK_PKT 11
 #define TDS_ECHO_PKT        12
 #define TDS_LOGOUT_CHN_PKT  13
-#define TDS_QUERY5_PKT      15 /* or "Normal tokenized request or response */
-#define TDS_LOGIN7_PKT      16 /* or "Urgent tokenized request or response */
+#define TDS_QUERY5_PKT      15  /* or "Normal tokenized request or response */
+#define TDS_LOGIN7_PKT      16  /* or "Urgent tokenized request or response */
 #define TDS_NTLMAUTH_PKT    17
-#define TDS_XXX7_PKT        18 /* seen in one capture */
+#define TDS_XXX7_PKT        18  /* seen in one capture */
 
 #define is_valid_tds_type(x) ((x) >= TDS_QUERY_PKT && (x) <= TDS_XXX7_PKT)
 
 #define TDS_COL_INFO_TOKEN        161  /* 0xA1    TDS 4.2 only - TDS_COLFMT */
 #define TDS5_DYNAMIC2_TOKEN       163  /* 0xA3    TDS 5.0 only              */
 #if 0 /* XX: Why commented out ? These are 'live' in FreeTDS tds.h */
- #define TDS_TABNAME               164  /* 0xA4                              */
- #define TDS_COL_INFO              165  /* 0xA5                              */
+#define TDS_TABNAME               164  /* 0xA4                              */
+#define TDS_COL_INFO              165  /* 0xA5                              */
 #endif
 #define TDS_OPTIONCMD_TOKEN       166  /* 0xA6 */
 #define TDS_COMPUTE_NAMES_TOKEN   167  /* 0xA7 */
 #define SYBUNIQUE      36  /* 0x24 */
 #define SYBVARIANT     98  /* 0x62 */
 
-#define is_fixed_coltype(x) (x==SYBINT1    || \
-                        x==SYBINT2      || \
-                        x==SYBINT4      || \
-                        x==SYBINT8      || \
-                        x==SYBREAL       || \
-                        x==SYBFLT8      || \
-                        x==SYBDATETIME  || \
-                        x==SYBDATETIME4 || \
-                        x==SYBBIT       || \
-                        x==SYBMONEY     || \
-                        x==SYBMONEY4    || \
-                        x==SYBUNIQUE)
+#define is_fixed_coltype(x) (x==SYBINT1    ||           \
+                             x==SYBINT2      ||         \
+                             x==SYBINT4      ||         \
+                             x==SYBINT8      ||         \
+                             x==SYBREAL       ||        \
+                             x==SYBFLT8      ||         \
+                             x==SYBDATETIME  ||         \
+                             x==SYBDATETIME4 ||         \
+                             x==SYBBIT       ||         \
+                             x==SYBMONEY     ||         \
+                             x==SYBMONEY4    ||         \
+                             x==SYBUNIQUE)
 
 /* Initialize the protocol and registered fields */
 static int proto_tds = -1;
@@ -352,18 +352,18 @@ static gint ett_tds7_hdr = -1;
 static gboolean tds_desegment = TRUE;
 
 static const fragment_items tds_frag_items = {
-       &ett_tds_fragment,
-       &ett_tds_fragments,
-       &hf_tds_fragments,
-       &hf_tds_fragment,
-       &hf_tds_fragment_overlap,
-       &hf_tds_fragment_overlap_conflict,
-       &hf_tds_fragment_multiple_tails,
-       &hf_tds_fragment_too_long_fragment,
-       &hf_tds_fragment_error,
-       &hf_tds_reassembled_in,
-       &hf_tds_reassembled_length,
-       "fragments"
+    &ett_tds_fragment,
+    &ett_tds_fragments,
+    &hf_tds_fragments,
+    &hf_tds_fragment,
+    &hf_tds_fragment_overlap,
+    &hf_tds_fragment_overlap_conflict,
+    &hf_tds_fragment_multiple_tails,
+    &hf_tds_fragment_too_long_fragment,
+    &hf_tds_fragment_error,
+    &hf_tds_reassembled_in,
+    &hf_tds_reassembled_length,
+    "fragments"
 };
 
 /* Tables for reassembly of fragments. */
@@ -393,12 +393,12 @@ static dissector_handle_t data_handle;
 static gint tds_protocol_type = TDS_PROTOCOL_NOT_SPECIFIED;
 
 const enum_val_t tds_protocol_type_options[] = {
-  {"not_specified", "Not Specified", TDS_PROTOCOL_NOT_SPECIFIED},
-  {"tds4", "TDS 4", TDS_PROTOCOL_4},  /* TDS 4.2 and TDS 4.6 */
-  {"tds5", "TDS 5", TDS_PROTOCOL_5},
-  {"tds7", "TDS 7", TDS_PROTOCOL_7},
-  {"tds8", "TDS 8", TDS_PROTOCOL_8},
-  {NULL, NULL, -1}
+    {"not_specified", "Not Specified", TDS_PROTOCOL_NOT_SPECIFIED},
+    {"tds4", "TDS 4", TDS_PROTOCOL_4},  /* TDS 4.2 and TDS 4.6 */
+    {"tds5", "TDS 5", TDS_PROTOCOL_5},
+    {"tds7", "TDS 7", TDS_PROTOCOL_7},
+    {"tds8", "TDS 8", TDS_PROTOCOL_8},
+    {NULL, NULL, -1}
 };
 
 #define TDS_PROTO_PREF_NOT_SPECIFIED (tds_protocol_type == TDS_NOT_SPECIFIED)
@@ -429,75 +429,75 @@ static range_t *tds_tcp_ports = NULL;
 
 /* These correspond to the netlib packet type field */
 static const value_string packet_type_names[] = {
-       {TDS_QUERY_PKT,  "Query Packet"},
-       {TDS_LOGIN_PKT,  "Login Packet"},
-       {TDS_RPC_PKT,    "Remote Procedure Call Packet"},
-       {TDS_RESP_PKT,   "Response Packet"},
-       {TDS_CANCEL_PKT, "Cancel Packet"},
-       {TDS_QUERY5_PKT, "TDS5 Query Packet"},
-       {TDS_LOGIN7_PKT, "TDS7/8 Login Packet"},
-       {TDS_XXX7_PKT, "TDS7/8 0x12 Packet"},
-       {TDS_NTLMAUTH_PKT, "NT Authentication Packet"},
-       {0, NULL},
+    {TDS_QUERY_PKT,    "Query Packet"},
+    {TDS_LOGIN_PKT,    "Login Packet"},
+    {TDS_RPC_PKT,      "Remote Procedure Call Packet"},
+    {TDS_RESP_PKT,     "Response Packet"},
+    {TDS_CANCEL_PKT,   "Cancel Packet"},
+    {TDS_QUERY5_PKT,   "TDS5 Query Packet"},
+    {TDS_LOGIN7_PKT,   "TDS7/8 Login Packet"},
+    {TDS_XXX7_PKT,     "TDS7/8 0x12 Packet"},
+    {TDS_NTLMAUTH_PKT, "NT Authentication Packet"},
+    {0, NULL},
 };
 
 /* The status field */
 
 #define is_valid_tds_status(x) ((x) <= STATUS_EVENT_NOTIFICATION)
 
-#define STATUS_NOT_LAST_BUFFER         0x00
-#define STATUS_LAST_BUFFER             0x01
-#define STATUS_ATTN_REQUEST_ACK                0x02
-#define STATUS_ATTN_REQUEST            0x03
-#define STATUS_EVENT_NOTIFICATION      0x04
+#define STATUS_NOT_LAST_BUFFER          0x00
+#define STATUS_LAST_BUFFER              0x01
+#define STATUS_ATTN_REQUEST_ACK         0x02
+#define STATUS_ATTN_REQUEST             0x03
+#define STATUS_EVENT_NOTIFICATION       0x04
 
 static const value_string status_names[] = {
-       {STATUS_NOT_LAST_BUFFER,    "Not last buffer"},
-       {STATUS_LAST_BUFFER,        "Last buffer in request or response"},
-       {STATUS_ATTN_REQUEST_ACK,   "Acknowledgment of last attention request"},
-       {STATUS_ATTN_REQUEST,       "Attention request"},
-       {STATUS_EVENT_NOTIFICATION, "Event notification"},
-       {0, NULL},
+    {STATUS_NOT_LAST_BUFFER,    "Not last buffer"},
+    {STATUS_LAST_BUFFER,        "Last buffer in request or response"},
+    {STATUS_ATTN_REQUEST_ACK,   "Acknowledgment of last attention request"},
+    {STATUS_ATTN_REQUEST,       "Attention request"},
+    {STATUS_EVENT_NOTIFICATION, "Event notification"},
+    {0, NULL},
 };
 
 /* The one byte token at the start of each TDS PDU */
 static const value_string token_names[] = {
-       {TDS5_DYNAMIC_TOKEN, "TDS5 Dynamic SQL"},
-       {TDS5_PARAMFMT_TOKEN, "TDS5 Parameter Format"},
-       {TDS5_PARAMFMT2_TOKEN, "TDS5 Parameter2 Format"},
-       {TDS5_PARAMS_TOKEN, "TDS5 Parameters"},
-       {TDS_LANG_TOKEN, "Language"},
-       {TDS_LOGOUT_TOKEN, "Logout"},
-       {TDS_RET_STAT_TOKEN, "Return Status"},
-       {TDS_PROCID_TOKEN, "Proc ID"},
-       {TDS7_RESULT_TOKEN, "TDS7+ Results"},
-       {TDS_COL_NAME_TOKEN, "Column Names"},
-       {TDS_COL_INFO_TOKEN, "Column Info"},
-       {TDS_COMPUTE_NAMES_TOKEN, "Compute Names"},
-       {TDS_COMPUTE_RESULT_TOKEN, "Compute Results"},
-       {TDS_ORDER_BY_TOKEN, "Order By"},
-       {TDS_ERR_TOKEN, "Error Message"},
-       {TDS_MSG_TOKEN, "Info Message"},
-       {TDS_PARAM_TOKEN, "Parameter"},
-       {TDS_LOGIN_ACK_TOKEN, "Login Acknowledgement"},
-       {TDS_CONTROL_TOKEN, "TDS Control"},
-       {TDS_KEY_TOKEN, "TDS Key"},
-       {TDS_ROW_TOKEN, "Row"},
-       {TDS_CMP_ROW_TOKEN, "Compute Row"},
-       {TDS_CAP_TOKEN, "Capabilities"},
-       {TDS_ENV_CHG_TOKEN, "Environment Change"},
-       {TDS_EED_TOKEN, "Extended Error"},
-       {TDS_AUTH_TOKEN, "Authentication"},
-       {TDS_RESULT_TOKEN, "Results"},
-       {TDS_DONE_TOKEN, "Done"},
-       {TDS_DONEPROC_TOKEN, "Done Proc"},
-       {TDS_DONEINPROC_TOKEN, "Done In Proc"},
-       {TDS5_DYNAMIC2_TOKEN, "TDS5 Dynamic2"},
-       {TDS5_ORDERBY2_TOKEN, "TDS5 OrderBy2"},
-       {TDS5_CURDECLARE2_TOKEN, "TDS5 CurDeclare2"},
-       {TDS5_ROWFMT2_TOKEN, "TDS5 RowFmt2"},
-       {TDS5_MSG_TOKEN, "TDS5 Msg"},
-       {0, NULL},
+    {TDS5_DYNAMIC_TOKEN,        "TDS5 Dynamic SQL"},
+    {TDS5_PARAMFMT_TOKEN,       "TDS5 Parameter Format"},
+    {TDS5_PARAMFMT2_TOKEN,      "TDS5 Parameter2 Format"},
+    {TDS5_PARAMS_TOKEN,         "TDS5 Parameters"},
+    {TDS_LANG_TOKEN,            "Language"},
+    {TDS_LOGOUT_TOKEN,          "Logout"},
+    {TDS_RET_STAT_TOKEN,        "Return Status"},
+    {TDS_PROCID_TOKEN,          "Proc ID"},
+    {TDS7_RESULT_TOKEN,         "TDS7+ Results"},
+    {TDS_COL_NAME_TOKEN,        "Column Names"},
+    {TDS_COL_INFO_TOKEN,        "Column Info"},
+    {TDS_COMPUTE_NAMES_TOKEN,   "Compute Names"},
+    {TDS_COMPUTE_RESULT_TOKEN,  "Compute Results"},
+    {TDS_ORDER_BY_TOKEN,        "Order By"},
+    {TDS_ERR_TOKEN,             "Error Message"},
+    {TDS_MSG_TOKEN,             "Info Message"},
+    {TDS_PARAM_TOKEN,           "Parameter"},
+    {TDS_LOGIN_ACK_TOKEN,       "Login Acknowledgement"},
+    {TDS_CONTROL_TOKEN,         "TDS Control"},
+    {TDS_KEY_TOKEN,             "TDS Key"},
+    {TDS_ROW_TOKEN,             "Row"},
+    {TDS_CMP_ROW_TOKEN,         "Compute Row"},
+    {TDS_CAP_TOKEN,             "Capabilities"},
+    {TDS_ENV_CHG_TOKEN,         "Environment Change"},
+    {TDS_EED_TOKEN,             "Extended Error"},
+    {TDS_AUTH_TOKEN,            "Authentication"},
+    {TDS_RESULT_TOKEN,          "Results"},
+    {TDS_DONE_TOKEN,            "Done"},
+    {TDS_DONEPROC_TOKEN,        "Done Proc"},
+    {TDS_DONEINPROC_TOKEN,      "Done In Proc"},
+    {TDS5_DYNAMIC2_TOKEN,       "TDS5 Dynamic2"},
+    {TDS5_ORDERBY2_TOKEN,       "TDS5 OrderBy2"},
+    {TDS5_CURDECLARE2_TOKEN,    "TDS5 CurDeclare2"},
+    {TDS5_ROWFMT2_TOKEN,        "TDS5 RowFmt2"},
+    {TDS5_MSG_TOKEN,            "TDS5 Msg"},
+    {0, NULL},
 };
 
 
@@ -517,31 +517,31 @@ static const value_string internal_stored_proc_id_names[] = {
     {TDS_SP_PREPEXEC,        "sp_prepexec"       },
     {TDS_SP_PREPEXECRPC,     "sp_prepexecrpc"    },
     {TDS_SP_UNPREPARE,       "sp_unprepare"      },
-       {0,                      NULL                },
+    {0,                      NULL                },
 };
 
 static const value_string env_chg_names[] = {
-        {1, "Database"},
-        {2, "Language"},
-        {3, "Sort Order"},
-        {4, "Blocksize"},
-        {5, "Unicode Locale ID"},
-        {6, "Unicode Comparison Style"},
-        {7, "Collation Info"},
-        {0, NULL},
+    {1, "Database"},
+    {2, "Language"},
+    {3, "Sort Order"},
+    {4, "Blocksize"},
+    {5, "Unicode Locale ID"},
+    {6, "Unicode Comparison Style"},
+    {7, "Collation Info"},
+    {0, NULL},
 };
 
 static const value_string login_field_names[] = {
-        {0, "Client Name"},
-        {1, "Username"},
-        {2, "Password"},
-        {3, "App Name"},
-        {4, "Server Name"},
-        {5, "Unknown1"},
-        {6, "Library Name"},
-        {7, "Locale"},
-        {8, "Database Name"},
-        {0, NULL},
+    {0, "Client Name"},
+    {1, "Username"},
+    {2, "Password"},
+    {3, "App Name"},
+    {4, "Server Name"},
+    {5, "Unknown1"},
+    {6, "Library Name"},
+    {7, "Locale"},
+    {8, "Database Name"},
+    {0, NULL},
 };
 
 
@@ -552,45 +552,45 @@ static const value_string login_field_names[] = {
  * TDS_ROW_TOKEN tokens.
  */
 struct _tds_col {
-     gchar name[256];
-     guint16 utype;
-     guint8 ctype;
-     guint csize;
+    gchar name[256];
+    guint16 utype;
+    guint8 ctype;
+    guint csize;
 };
 
 struct _netlib_data {
-       guint num_cols;
-       struct _tds_col *columns[MAX_COLUMNS];
+    guint num_cols;
+    struct _tds_col *columns[MAX_COLUMNS];
 };
 
 struct tds7_login_packet_hdr {
-       guint32 total_packet_size;
-       guint32 tds_version;
-       guint32 packet_size;
-       guint32 client_version;
-       guint32 client_pid;
-       guint32 connection_id;
-       guint8  option_flags1;
-       guint8  option_flags2;
-       guint8  sql_type_flags;
-       guint8  reserved_flags;
-       guint32 time_zone;
-       guint32 collation;
+    guint32 total_packet_size;
+    guint32 tds_version;
+    guint32 packet_size;
+    guint32 client_version;
+    guint32 client_pid;
+    guint32 connection_id;
+    guint8  option_flags1;
+    guint8  option_flags2;
+    guint8  sql_type_flags;
+    guint8  reserved_flags;
+    guint32 time_zone;
+    guint32 collation;
 };
 
 /* support routines */
 
 static void
 dissect_tds_nt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
-    guint offset, guint length)
+               guint offset, guint length)
 {
-       tvbuff_t *nt_tvb;
+    tvbuff_t *nt_tvb;
 
-       nt_tvb = tvb_new_subset(tvb, offset, -1, length);
-       if(tvb_strneql(tvb, offset, "NTLMSSP", 7) == 0)
-               call_dissector(ntlmssp_handle, nt_tvb, pinfo, tree);
-       else
-               call_dissector(gssapi_handle, nt_tvb, pinfo, tree);
+    nt_tvb = tvb_new_subset(tvb, offset, -1, length);
+    if(tvb_strneql(tvb, offset, "NTLMSSP", 7) == 0)
+        call_dissector(ntlmssp_handle, nt_tvb, pinfo, tree);
+    else
+        call_dissector(gssapi_handle, nt_tvb, pinfo, tree);
 }
 
 /*  */
@@ -614,37 +614,37 @@ tds_tvb_get_xxtohl(tvbuff_t *tvb, gint offset, gboolean tds_little_endian_flag)
 
 static int tds_token_is_fixed_size(guint8 token)
 {
-     switch (token) {
-          case TDS_DONE_TOKEN:
-          case TDS_DONEPROC_TOKEN:
-          case TDS_DONEINPROC_TOKEN:
-          case TDS_RET_STAT_TOKEN:
-          case TDS7_RESULT_TOKEN:
-          case TDS_PROCID_TOKEN:
-          case TDS_LOGOUT_TOKEN:
-               return 1;
-          default:
-               return 0;
-     }
+    switch (token) {
+        case TDS_DONE_TOKEN:
+        case TDS_DONEPROC_TOKEN:
+        case TDS_DONEINPROC_TOKEN:
+        case TDS_RET_STAT_TOKEN:
+        case TDS7_RESULT_TOKEN:
+        case TDS_PROCID_TOKEN:
+        case TDS_LOGOUT_TOKEN:
+            return 1;
+        default:
+            return 0;
+    }
 }
 
 
 static int tds_get_fixed_token_size(guint8 token)
 {
-     switch(token) {
-          case TDS_DONE_TOKEN:
-          case TDS_DONEPROC_TOKEN:
-          case TDS_DONEINPROC_TOKEN:
-          case TDS_PROCID_TOKEN:
-               return 8;
-          case TDS_RET_STAT_TOKEN:
-               return 4;
-          case TDS_LOGOUT_TOKEN:
-               return 1;
-          case TDS7_RESULT_TOKEN:
-          default:
-               return 0;
-     }
+    switch(token) {
+        case TDS_DONE_TOKEN:
+        case TDS_DONEPROC_TOKEN:
+        case TDS_DONEINPROC_TOKEN:
+        case TDS_PROCID_TOKEN:
+            return 8;
+        case TDS_RET_STAT_TOKEN:
+            return 4;
+        case TDS_LOGOUT_TOKEN:
+            return 1;
+        case TDS7_RESULT_TOKEN:
+        default:
+            return 0;
+    }
 }
 
 static guint
@@ -662,12 +662,12 @@ tds_get_variable_token_size(tvbuff_t *tvb, gint offset, guint8 token,
             *len_field_size_p = 4;
             *len_field_val_p = tds_tvb_get_xxtohl(tvb, offset, tds_little_endian);
             break;
-        /* some have a 1 byte length field */
+            /* some have a 1 byte length field */
         case TDS5_MSG_TOKEN:
             *len_field_size_p = 1;
             *len_field_val_p = tvb_get_guint8(tvb, offset);
             break;
-        /* and most have a 2 byte length field */
+            /* and most have a 2 byte length field */
         default:
             *len_field_size_p = 2;
             *len_field_val_p = tds_tvb_get_xxtohs(tvb, offset, tds_little_endian);
@@ -680,30 +680,30 @@ tds_get_variable_token_size(tvbuff_t *tvb, gint offset, guint8 token,
 static void
 dissect_tds_query_packet(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
 {
-       guint offset, len;
-       gboolean is_unicode = TRUE;
-       char *msg;
-
-       proto_item *query_hdr;
-       proto_tree *query_tree;
-
-       offset = 0;
-       query_hdr = proto_tree_add_text(tree, tvb, offset, -1, "TDS Query Packet");
-       query_tree = proto_item_add_subtree(query_hdr, ett_tds7_query);
-       len = tvb_reported_length_remaining(tvb, offset);
-
-       if (TDS_PROTO_PREF_TDS4 ||
-           (!TDS_PROTO_PREF_TDS7_TDS8 &&
-            ((len < 2) || tvb_get_guint8(tvb, offset+1) != 0)))
-               is_unicode = FALSE;
-
-       if (is_unicode)
-               msg = tvb_get_ephemeral_faked_unicode(tvb, offset, len/2, TRUE);
-       else
-               msg = (gchar*)tvb_get_ephemeral_string(tvb, offset, len);
-
-       proto_tree_add_text(query_tree, tvb, offset, len, "Query: %s", msg);
-       offset += len;
+    guint offset, len;
+    gboolean is_unicode = TRUE;
+    char *msg;
+
+    proto_item *query_hdr;
+    proto_tree *query_tree;
+
+    offset = 0;
+    query_hdr = proto_tree_add_text(tree, tvb, offset, -1, "TDS Query Packet");
+    query_tree = proto_item_add_subtree(query_hdr, ett_tds7_query);
+    len = tvb_reported_length_remaining(tvb, offset);
+
+    if (TDS_PROTO_PREF_TDS4 ||
+        (!TDS_PROTO_PREF_TDS7_TDS8 &&
+         ((len < 2) || tvb_get_guint8(tvb, offset+1) != 0)))
+        is_unicode = FALSE;
+
+    if (is_unicode)
+        msg = tvb_get_ephemeral_faked_unicode(tvb, offset, len/2, TRUE);
+    else
+        msg = (gchar*)tvb_get_ephemeral_string(tvb, offset, len);
+
+    proto_tree_add_text(query_tree, tvb, offset, len, "Query: %s", msg);
+    offset += len;
 }
 
 
@@ -756,17 +756,17 @@ dissect_tds_query5_packet(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre
             token_sz = tds_get_variable_token_size(tvb, pos+1, token, &token_len_field_size,
                                                    &token_len_field_val);
 
-       /* XXX - Should this check be done in tds_get_variable_token_size()
-        * instead? */
-       if ((int) token_sz < 0) {
-           proto_tree_add_text(tree, tvb, 0, 0, "Bogus token size: %u",
-               token_sz);
-           break;
-       }
+        /* XXX - Should this check be done in tds_get_variable_token_size()
+         * instead? */
+        if ((int) token_sz < 0) {
+            proto_tree_add_text(tree, tvb, 0, 0, "Bogus token size: %u",
+                                token_sz);
+            break;
+        }
 
         token_item = proto_tree_add_text(tree, tvb, pos, token_sz,
-                    "Token 0x%02x %s", token,
-                    val_to_str(token, token_names, "Unknown Token Type"));
+                                         "Token 0x%02x %s", token,
+                                         val_to_str(token, token_names, "Unknown Token Type"));
         token_tree = proto_item_add_subtree(token_item, ett_tds_token);
 
         /*
@@ -793,153 +793,153 @@ dissect_tds_query5_packet(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre
 static void
 dissect_tds7_login(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 {
-       guint offset, i, j, k, offset2, len;
-       char *val, *val2;
-
-       proto_item *login_hdr;
-       proto_tree *login_tree;
-       proto_item *header_hdr;
-       proto_tree *header_tree;
-       proto_item *length_hdr;
-       proto_tree *length_tree;
-
-       struct tds7_login_packet_hdr td7hdr;
-       gint length_remaining;
-
-
-       /* create display subtree for the protocol */
-       offset = 0;
-       login_hdr = proto_tree_add_text(tree, tvb, offset, -1, "TDS7 Login Packet");
-       login_tree = proto_item_add_subtree(login_hdr, ett_tds7_login);
-       header_hdr = proto_tree_add_text(login_tree, tvb, offset, 36, "Login Packet Header");
-       header_tree = proto_item_add_subtree(header_hdr, ett_tds7_hdr);
-
-       td7hdr.total_packet_size = tvb_get_letohl(tvb, offset);
-       proto_tree_add_uint(header_tree, hf_tds7_login_total_size, tvb, offset,
-        sizeof(td7hdr.total_packet_size), td7hdr.total_packet_size);
-       offset += sizeof(td7hdr.total_packet_size);
-
-       td7hdr.tds_version = tvb_get_ntohl(tvb, offset);
-       proto_tree_add_uint(header_tree, hf_tds7_version, tvb, offset, sizeof(td7hdr.tds_version), td7hdr.tds_version);
-       offset += sizeof(td7hdr.tds_version);
-
-       td7hdr.packet_size = tvb_get_ntohl(tvb, offset);
-       proto_tree_add_uint(header_tree, hf_tds7_packet_size, tvb, offset, sizeof(td7hdr.packet_size), td7hdr.packet_size);
-       offset += sizeof(td7hdr.packet_size);
-
-       td7hdr.client_version = tvb_get_ntohl(tvb, offset);
-       proto_tree_add_uint(header_tree, hf_tds7_client_version, tvb, offset, sizeof(td7hdr.client_version), td7hdr.client_version);
-        offset += sizeof(td7hdr.client_version);
-
-       td7hdr.client_pid = tvb_get_letohl(tvb, offset);
-       proto_tree_add_uint(header_tree, hf_tds7_client_pid, tvb, offset, sizeof(td7hdr.client_pid), td7hdr.client_pid);
-        offset += sizeof(td7hdr.client_pid);
-
-       td7hdr.connection_id= tvb_get_letohl(tvb, offset);
-        proto_tree_add_uint(header_tree, hf_tds7_connection_id, tvb, offset, sizeof(td7hdr.connection_id), td7hdr.connection_id);
-        offset += sizeof(td7hdr.connection_id);
-
-       td7hdr.option_flags1 = tvb_get_guint8(tvb, offset);
-       proto_tree_add_uint(header_tree, hf_tds7_option_flags1, tvb, offset, sizeof(td7hdr.option_flags1), td7hdr.option_flags1);
-       offset += sizeof(td7hdr.option_flags1);
-
-       td7hdr.option_flags2 = tvb_get_guint8(tvb, offset);
-        proto_tree_add_uint(header_tree, hf_tds7_option_flags2, tvb, offset, sizeof(td7hdr.option_flags2), td7hdr.option_flags2);
-        offset += sizeof(td7hdr.option_flags2);
-
-       td7hdr.sql_type_flags = tvb_get_guint8(tvb, offset);
-       proto_tree_add_uint(header_tree, hf_tds7_sql_type_flags, tvb, offset, sizeof(td7hdr.sql_type_flags), td7hdr.sql_type_flags);
-       offset += sizeof(td7hdr.sql_type_flags);
-
-       td7hdr.reserved_flags = tvb_get_guint8(tvb, offset);
-        proto_tree_add_uint(header_tree, hf_tds7_reserved_flags, tvb, offset, sizeof(td7hdr.reserved_flags), td7hdr.reserved_flags);
-       offset += sizeof(td7hdr.reserved_flags);
-
-       td7hdr.time_zone = tvb_get_ntohl(tvb, offset);
-       proto_tree_add_uint(header_tree, hf_tds7_time_zone, tvb, offset, sizeof(td7hdr.time_zone), td7hdr.time_zone);
-       offset += sizeof(td7hdr.time_zone);
-
-       td7hdr.collation = tvb_get_ntohl(tvb, offset);
-       proto_tree_add_uint(header_tree, hf_tds7_collation, tvb, offset, sizeof(td7hdr.collation), td7hdr.collation);
-       offset += sizeof(td7hdr.collation);
-
-       length_hdr = proto_tree_add_text(login_tree, tvb, offset, 50, "Lengths and offsets");
-        length_tree = proto_item_add_subtree(length_hdr, ett_tds7_hdr);
-
-       for (i = 0; i < 9; i++) {
-               offset2 = tvb_get_letohs(tvb, offset + i*4);
-               len = tvb_get_letohs(tvb, offset + i*4 + 2);
-               proto_tree_add_text(length_tree, tvb, offset + i*4, 2,
-                   "%s offset: %u",
-                   val_to_str(i, login_field_names, "Unknown"),
-                   offset2);
-               proto_tree_add_text(length_tree, tvb, offset + i*4 + 2, 2,
-                       "%s length: %u",
-                       val_to_str(i, login_field_names, "Unknown"),
-                       len);
-               if (len != 0) {
-                       if( i != 2) {
-                               /* tds 7 is always unicode */
-                               val = tvb_get_ephemeral_faked_unicode(tvb, offset2, len, TRUE);
-                               len *= 2;
-                               proto_tree_add_text(login_tree, tvb, offset2, len, "%s: %s", val_to_str(i, login_field_names, "Unknown"), val);
-                       } else {
-                               /* This field is the password.  We retrieve it from the packet
-                                * as a non-unicode string and then perform two operations on it
-                                * to "decrypt" it.  Finally, we create a new string that consists
-                                * of ASCII characters instead of unicode by skipping every other
-                                * byte in the original string.
-                                */
-
-                               len *= 2;
-                               val = (gchar*)tvb_get_ephemeral_string(tvb, offset2, len);
-                               val2 = g_malloc((len/2)+1);
-
-                               for(j = 0, k = 0; j < len; j += 2, k++) {
-                                       val[j] ^= 0xA5;
-
-                                       /* Swap the most and least significant bits */
-                                       val[j] = ((val[j] & 0x0F) << 4) | ((val[j] & 0xF0) >> 4);
-
-                                       val2[k] = val[j];
-                               }
-                               val2[k] = '\0'; /* Null terminate our new string */
-
-                               proto_tree_add_text(login_tree, tvb, offset2, len, "%s: %s", val_to_str(i, login_field_names, "Unknown"), val2);
-                               g_free(val2);
-                       }
-               }
-       }
-
-       /*
-        * XXX - what about the client MAC address, etc.?
-        */
-       length_remaining = tvb_reported_length_remaining(tvb, offset2 + len);
-       if (length_remaining > 0) {
-               dissect_tds_nt(tvb, pinfo, login_tree, offset2 + len,
-                   length_remaining);
-       }
+    guint offset, i, j, k, offset2, len;
+    char *val, *val2;
+
+    proto_item *login_hdr;
+    proto_tree *login_tree;
+    proto_item *header_hdr;
+    proto_tree *header_tree;
+    proto_item *length_hdr;
+    proto_tree *length_tree;
+
+    struct tds7_login_packet_hdr td7hdr;
+    gint length_remaining;
+
+
+    /* create display subtree for the protocol */
+    offset = 0;
+    login_hdr = proto_tree_add_text(tree, tvb, offset, -1, "TDS7 Login Packet");
+    login_tree = proto_item_add_subtree(login_hdr, ett_tds7_login);
+    header_hdr = proto_tree_add_text(login_tree, tvb, offset, 36, "Login Packet Header");
+    header_tree = proto_item_add_subtree(header_hdr, ett_tds7_hdr);
+
+    td7hdr.total_packet_size = tvb_get_letohl(tvb, offset);
+    proto_tree_add_uint(header_tree, hf_tds7_login_total_size, tvb, offset,
+                        sizeof(td7hdr.total_packet_size), td7hdr.total_packet_size);
+    offset += sizeof(td7hdr.total_packet_size);
+
+    td7hdr.tds_version = tvb_get_ntohl(tvb, offset);
+    proto_tree_add_uint(header_tree, hf_tds7_version, tvb, offset, sizeof(td7hdr.tds_version), td7hdr.tds_version);
+    offset += sizeof(td7hdr.tds_version);
+
+    td7hdr.packet_size = tvb_get_ntohl(tvb, offset);
+    proto_tree_add_uint(header_tree, hf_tds7_packet_size, tvb, offset, sizeof(td7hdr.packet_size), td7hdr.packet_size);
+    offset += sizeof(td7hdr.packet_size);
+
+    td7hdr.client_version = tvb_get_ntohl(tvb, offset);
+    proto_tree_add_uint(header_tree, hf_tds7_client_version, tvb, offset, sizeof(td7hdr.client_version), td7hdr.client_version);
+    offset += sizeof(td7hdr.client_version);
+
+    td7hdr.client_pid = tvb_get_letohl(tvb, offset);
+    proto_tree_add_uint(header_tree, hf_tds7_client_pid, tvb, offset, sizeof(td7hdr.client_pid), td7hdr.client_pid);
+    offset += sizeof(td7hdr.client_pid);
+
+    td7hdr.connection_id= tvb_get_letohl(tvb, offset);
+    proto_tree_add_uint(header_tree, hf_tds7_connection_id, tvb, offset, sizeof(td7hdr.connection_id), td7hdr.connection_id);
+    offset += sizeof(td7hdr.connection_id);
+
+    td7hdr.option_flags1 = tvb_get_guint8(tvb, offset);
+    proto_tree_add_uint(header_tree, hf_tds7_option_flags1, tvb, offset, sizeof(td7hdr.option_flags1), td7hdr.option_flags1);
+    offset += sizeof(td7hdr.option_flags1);
+
+    td7hdr.option_flags2 = tvb_get_guint8(tvb, offset);
+    proto_tree_add_uint(header_tree, hf_tds7_option_flags2, tvb, offset, sizeof(td7hdr.option_flags2), td7hdr.option_flags2);
+    offset += sizeof(td7hdr.option_flags2);
+
+    td7hdr.sql_type_flags = tvb_get_guint8(tvb, offset);
+    proto_tree_add_uint(header_tree, hf_tds7_sql_type_flags, tvb, offset, sizeof(td7hdr.sql_type_flags), td7hdr.sql_type_flags);
+    offset += sizeof(td7hdr.sql_type_flags);
+
+    td7hdr.reserved_flags = tvb_get_guint8(tvb, offset);
+    proto_tree_add_uint(header_tree, hf_tds7_reserved_flags, tvb, offset, sizeof(td7hdr.reserved_flags), td7hdr.reserved_flags);
+    offset += sizeof(td7hdr.reserved_flags);
+
+    td7hdr.time_zone = tvb_get_ntohl(tvb, offset);
+    proto_tree_add_uint(header_tree, hf_tds7_time_zone, tvb, offset, sizeof(td7hdr.time_zone), td7hdr.time_zone);
+    offset += sizeof(td7hdr.time_zone);
+
+    td7hdr.collation = tvb_get_ntohl(tvb, offset);
+    proto_tree_add_uint(header_tree, hf_tds7_collation, tvb, offset, sizeof(td7hdr.collation), td7hdr.collation);
+    offset += sizeof(td7hdr.collation);
+
+    length_hdr = proto_tree_add_text(login_tree, tvb, offset, 50, "Lengths and offsets");
+    length_tree = proto_item_add_subtree(length_hdr, ett_tds7_hdr);
+
+    for (i = 0; i < 9; i++) {
+        offset2 = tvb_get_letohs(tvb, offset + i*4);
+        len = tvb_get_letohs(tvb, offset + i*4 + 2);
+        proto_tree_add_text(length_tree, tvb, offset + i*4, 2,
+                            "%s offset: %u",
+                            val_to_str(i, login_field_names, "Unknown"),
+                            offset2);
+        proto_tree_add_text(length_tree, tvb, offset + i*4 + 2, 2,
+                            "%s length: %u",
+                            val_to_str(i, login_field_names, "Unknown"),
+                            len);
+        if (len != 0) {
+            if( i != 2) {
+                /* tds 7 is always unicode */
+                val = tvb_get_ephemeral_faked_unicode(tvb, offset2, len, TRUE);
+                len *= 2;
+                proto_tree_add_text(login_tree, tvb, offset2, len, "%s: %s", val_to_str(i, login_field_names, "Unknown"), val);
+            } else {
+                /* This field is the password.  We retrieve it from the packet
+                 * as a non-unicode string and then perform two operations on it
+                 * to "decrypt" it.  Finally, we create a new string that consists
+                 * of ASCII characters instead of unicode by skipping every other
+                 * byte in the original string.
+                 */
+
+                len *= 2;
+                val = (gchar*)tvb_get_ephemeral_string(tvb, offset2, len);
+                val2 = g_malloc((len/2)+1);
+
+                for(j = 0, k = 0; j < len; j += 2, k++) {
+                    val[j] ^= 0xA5;
+
+                    /* Swap the most and least significant bits */
+                    val[j] = ((val[j] & 0x0F) << 4) | ((val[j] & 0xF0) >> 4);
+
+                    val2[k] = val[j];
+                }
+                val2[k] = '\0'; /* Null terminate our new string */
+
+                proto_tree_add_text(login_tree, tvb, offset2, len, "%s: %s", val_to_str(i, login_field_names, "Unknown"), val2);
+                g_free(val2);
+            }
+        }
+    }
+
+    /*
+     * XXX - what about the client MAC address, etc.?
+     */
+    length_remaining = tvb_reported_length_remaining(tvb, offset2 + len);
+    if (length_remaining > 0) {
+        dissect_tds_nt(tvb, pinfo, login_tree, offset2 + len,
+                       length_remaining);
+    }
 }
 
 static int get_size_by_coltype(int servertype)
 {
-   switch(servertype)
-   {
-      case SYBINT1:        return 1;
-      case SYBINT2:        return 2;
-      case SYBINT4:        return 4;
-      case SYBINT8:        return 8;
-      case SYBREAL:        return 4;
-      case SYBFLT8:        return 8;
-      case SYBDATETIME:    return 8;
-      case SYBDATETIME4:   return 4;
-      case SYBBIT:         return 1;
-      case SYBBITN:        return 1;
-      case SYBMONEY:       return 8;
-      case SYBMONEY4:      return 4;
-      case SYBUNIQUE:      return 16;
-      default:             return -1;
-   }
+    switch(servertype)
+    {
+        case SYBINT1:        return 1;
+        case SYBINT2:        return 2;
+        case SYBINT4:        return 4;
+        case SYBINT8:        return 8;
+        case SYBREAL:        return 4;
+        case SYBFLT8:        return 8;
+        case SYBDATETIME:    return 8;
+        case SYBDATETIME4:   return 4;
+        case SYBBIT:         return 1;
+        case SYBBITN:        return 1;
+        case SYBMONEY:       return 8;
+        case SYBMONEY4:      return 4;
+        case SYBUNIQUE:      return 16;
+        default:             return -1;
+    }
 }
 # if 0
 /*
@@ -948,29 +948,29 @@ static int get_size_by_coltype(int servertype)
  */
 static char *data_to_string(void *data, guint col_type, guint col_size)
 {
-   char *result;
-   guint i;
-
-   result=ep_alloc(256);
-   switch(col_type) {
-      case SYBVARCHAR:
-         /* strncpy(result, (char *)data, col_size); */
-        for (i=0;i<col_size && i<(256-1);i++)
-               if (!isprint(((char *)data)[i])) result[i]='.';
-               else result[i]=((char *)data)[i];
-         result[i] = '\0';
-         break;
-      case SYBINT2:
-         g_snprintf(result, 256, "%d", *(short *)data);
-         break;
-      case SYBINT4:
-         g_snprintf(result, 256, "%d", *(int *)data);
-         break;
-      default:
-         g_snprintf(result, 256, "Unexpected column_type %d", col_type);
-         break;
-   }
-   return result;
+    char *result;
+    guint i;
+
+    result=ep_alloc(256);
+    switch(col_type) {
+        case SYBVARCHAR:
+            /* strncpy(result, (char *)data, col_size); */
+            for (i=0;i<col_size && i<(256-1);i++)
+                if (!isprint(((char *)data)[i])) result[i]='.';
+                else result[i]=((char *)data)[i];
+            result[i] = '\0';
+            break;
+        case SYBINT2:
+            g_snprintf(result, 256, "%d", *(short *)data);
+            break;
+        case SYBINT4:
+            g_snprintf(result, 256, "%d", *(int *)data);
+            break;
+        default:
+            g_snprintf(result, 256, "Unexpected column_type %d", col_type);
+            break;
+    }
+    return result;
 }
 #endif
 
@@ -982,19 +982,19 @@ static char *data_to_string(void *data, guint col_type, guint col_size)
 static guint
 tds_get_row_size(tvbuff_t *tvb, struct _netlib_data *nl_data, guint offset)
 {
-       guint cur, i, csize;
-
-       cur = offset;
-       for (i = 0; i < nl_data->num_cols; i++) {
-               if (!is_fixed_coltype(nl_data->columns[i]->ctype)) {
-                       csize = tvb_get_guint8(tvb, cur);
-                       cur++;
-               } else
-                       csize = get_size_by_coltype(nl_data->columns[i]->ctype);
-               cur += csize;
-       }
-
-       return (cur - offset + 1);
+    guint cur, i, csize;
+
+    cur = offset;
+    for (i = 0; i < nl_data->num_cols; i++) {
+        if (!is_fixed_coltype(nl_data->columns[i]->ctype)) {
+            csize = tvb_get_guint8(tvb, cur);
+            cur++;
+        } else
+            csize = get_size_by_coltype(nl_data->columns[i]->ctype);
+        cur += csize;
+    }
+
+    return (cur - offset + 1);
 }
 
 /*
@@ -1059,51 +1059,51 @@ dissect_tds_col_info_token(tvbuff_t *tvb, struct _netlib_data *nl_data, guint of
 static gboolean
 read_results_tds5(tvbuff_t *tvb, struct _netlib_data *nl_data, guint offset, guint len _U_)
 {
-       guint name_len;
-       guint cur;
-       guint i;
-
-       cur = offset;
-
-       /*
-        * This would be the logical place to check for little/big endianess
-        * if we didn't see the login packet.
-        * XXX: We'll take a hint
-        */
-       nl_data->num_cols = tds_tvb_get_xxtohs(tvb, cur, tds_little_endian);
-       if (nl_data->num_cols > MAX_COLUMNS) {
-               nl_data->num_cols = 0;
-               return FALSE;
-       }
-
-       cur += 2;
-
-       for (i = 0; i < nl_data->num_cols; i++) {
-               nl_data->columns[i] = ep_alloc(sizeof(struct _tds_col));
-               name_len = tvb_get_guint8(tvb,cur);
-               cur ++;
-               cur += name_len;
-
-               cur++; /* unknown */
-
-               nl_data->columns[i]->utype = tds_tvb_get_xxtohs(tvb, cur, tds_little_endian);
-               cur += 2;
-
-               cur += 2; /* unknown */
-
-               nl_data->columns[i]->ctype = tvb_get_guint8(tvb,cur);
-               cur++;
-
-               if (!is_fixed_coltype(nl_data->columns[i]->ctype)) {
-                       nl_data->columns[i]->csize = tvb_get_guint8(tvb,cur);
-                       cur ++;
-               } else {
-                       nl_data->columns[i]->csize =
-                           get_size_by_coltype(nl_data->columns[i]->ctype);
-               }
-               cur++; /* unknown */
-       }
-       return TRUE;
+    guint name_len;
+    guint cur;
+    guint i;
+
+    cur = offset;
+
+    /*
+     * This would be the logical place to check for little/big endianess
+     * if we didn't see the login packet.
+     * XXX: We'll take a hint
+     */
+    nl_data->num_cols = tds_tvb_get_xxtohs(tvb, cur, tds_little_endian);
+    if (nl_data->num_cols > MAX_COLUMNS) {
+        nl_data->num_cols = 0;
+        return FALSE;
+    }
+
+    cur += 2;
+
+    for (i = 0; i < nl_data->num_cols; i++) {
+        nl_data->columns[i] = ep_alloc(sizeof(struct _tds_col));
+        name_len = tvb_get_guint8(tvb,cur);
+        cur ++;
+        cur += name_len;
+
+        cur++; /* unknown */
+
+        nl_data->columns[i]->utype = tds_tvb_get_xxtohs(tvb, cur, tds_little_endian);
+        cur += 2;
+
+        cur += 2; /* unknown */
+
+        nl_data->columns[i]->ctype = tvb_get_guint8(tvb,cur);
+        cur++;
+
+        if (!is_fixed_coltype(nl_data->columns[i]->ctype)) {
+            nl_data->columns[i]->csize = tvb_get_guint8(tvb,cur);
+            cur ++;
+        } else {
+            nl_data->columns[i]->csize =
+                get_size_by_coltype(nl_data->columns[i]->ctype);
+        }
+        cur++; /* unknown */
+    }
+    return TRUE;
 }
 
 /*
@@ -1114,862 +1114,862 @@ read_results_tds5(tvbuff_t *tvb, struct _netlib_data *nl_data, guint offset, gui
 static gboolean
 netlib_check_login_pkt(tvbuff_t *tvb, guint offset, packet_info *pinfo, guint8 type)
 {
-       guint tds_major, bytes_avail;
-
-       bytes_avail = tvb_length(tvb) - offset;
-       /*
-        * we have two login packet styles, one for TDS 4.2 and 5.0
-        */
-       if (type==TDS_LOGIN_PKT) {
-               /* Use major version number to validate TDS 4/5 login
-                * packet */
-
-               /* Login packet is first in stream and should not be fragmented...
-                * if it is we are screwed */
-               if (bytes_avail < 467) return FALSE;
-               tds_major = tvb_get_guint8(tvb, 466);
-               if (tds_major != 4 && tds_major != 5) {
-                       return FALSE;
-               }
-       /*
-        * and one added by Microsoft in SQL Server 7
-        */
-       } else if (type==TDS_LOGIN7_PKT) {
-               if (bytes_avail < 16) return FALSE;
-               tds_major = tvb_get_guint8(tvb, 15);
-               if (tds_major != 0x70 && tds_major != 0x80) {
-                       return FALSE;
-               }
-       } else if (type==TDS_QUERY5_PKT) {
-               if (bytes_avail < 9) return FALSE;
-               /* if this is a TDS 5.0 query check the token */
-               if (tvb_get_guint8(tvb, 8) != TDS_LANG_TOKEN) {
-                       return FALSE;
-               }
-       }
-       /*
-        * See if either tcp.destport or tcp.srcport is specified
-        * in the preferences as being a TDS port.
-        */
-       else if (!value_is_in_range(tds_tcp_ports, pinfo->srcport) &&
-                !value_is_in_range(tds_tcp_ports, pinfo->destport)) {
-               return FALSE;
-       }
-
-       return TRUE;
+    guint tds_major, bytes_avail;
+
+    bytes_avail = tvb_length(tvb) - offset;
+    /*
+     * we have two login packet styles, one for TDS 4.2 and 5.0
+     */
+    if (type==TDS_LOGIN_PKT) {
+        /* Use major version number to validate TDS 4/5 login
+         * packet */
+
+        /* Login packet is first in stream and should not be fragmented...
+         * if it is we are screwed */
+        if (bytes_avail < 467) return FALSE;
+        tds_major = tvb_get_guint8(tvb, 466);
+        if (tds_major != 4 && tds_major != 5) {
+            return FALSE;
+        }
+        /*
+         * and one added by Microsoft in SQL Server 7
+         */
+    } else if (type==TDS_LOGIN7_PKT) {
+        if (bytes_avail < 16) return FALSE;
+        tds_major = tvb_get_guint8(tvb, 15);
+        if (tds_major != 0x70 && tds_major != 0x80) {
+            return FALSE;
+        }
+    } else if (type==TDS_QUERY5_PKT) {
+        if (bytes_avail < 9) return FALSE;
+        /* if this is a TDS 5.0 query check the token */
+        if (tvb_get_guint8(tvb, 8) != TDS_LANG_TOKEN) {
+            return FALSE;
+        }
+    }
+    /*
+     * See if either tcp.destport or tcp.srcport is specified
+     * in the preferences as being a TDS port.
+     */
+    else if (!value_is_in_range(tds_tcp_ports, pinfo->srcport) &&
+             !value_is_in_range(tds_tcp_ports, pinfo->destport)) {
+        return FALSE;
+    }
+
+    return TRUE;
 }
 
 static void
 dissect_tds_env_chg(tvbuff_t *tvb, guint offset, guint token_sz,
-    proto_tree *tree)
+                    proto_tree *tree)
 {
-       guint8 env_type;
-       guint old_len, new_len, old_len_offset;
-       char *new_val = NULL, *old_val = NULL;
-       guint32 string_offset;
-       gboolean is_unicode = FALSE;
-       guint16 collate_codepage, collate_flags;
-       guint8 collate_charset_id;
-
-       env_type = tvb_get_guint8(tvb, offset);
-       proto_tree_add_text(tree, tvb, offset, 1, "Type: %u (%s)", env_type,
-               val_to_str(env_type, env_chg_names, "Unknown"));
-
-       new_len = tvb_get_guint8(tvb, offset+1);
-       old_len_offset = offset + new_len + 2;
-       old_len = tvb_get_guint8(tvb, old_len_offset);
-
-       /*
-        * If our lengths plus the lengths of the type and the lengths
-        * don't add up to the token size, it must be UCS2.
-        */
-       if (old_len + new_len + 3 != token_sz) {
-               is_unicode = TRUE;
-               old_len_offset = offset + (new_len * 2) + 2;
-               old_len = tvb_get_guint8(tvb, old_len_offset);
-       }
-
-       proto_tree_add_text(tree, tvb, offset + 1, 1, "New Value Length: %u",
-           new_len);
-       if (new_len) {
-               if (env_type != 7) { /* if it's not 'Collation Info - which is not textual! */
-                       string_offset = offset + 2;
-                       if (is_unicode == TRUE) {
-                               new_val = tvb_get_ephemeral_faked_unicode(tvb, string_offset,
-                                       new_len, TRUE);
-                               new_len *= 2;
-                       } else
-                               new_val = (gchar*)tvb_get_ephemeral_string(tvb, string_offset, new_len);
-                       proto_tree_add_text(tree, tvb, string_offset, new_len,
-                               "New Value: %s", new_val);
-               }
-               else { /* parse collation info structure. From http://www.freetds.org/tds.html#collate */
-                       offset +=2;
-                       collate_codepage = tvb_get_letohs(tvb, offset);
-                       proto_tree_add_text(tree, tvb, offset, 2, "Codepage: %u" , collate_codepage);
-                       offset += 2;
-                       collate_flags = tvb_get_letohs(tvb, offset);
-                       proto_tree_add_text(tree, tvb, offset, 2, "Flags: 0x%x", collate_flags);
-                       offset += 2;
-                       collate_charset_id = tvb_get_guint8(tvb, offset);
-                       proto_tree_add_text(tree, tvb, offset, 1, "Charset ID: %u", collate_charset_id);
-                       offset +=1;
-               }
-       }
-
-       proto_tree_add_text(tree, tvb, old_len_offset, 1, "Old Value Length: %u",
-           old_len);
-       if (old_len) {
-               string_offset = old_len_offset + 1;
-               if (is_unicode == TRUE) {
-                       old_val = tvb_get_ephemeral_faked_unicode(tvb, string_offset,
-                           old_len, TRUE);
-                       old_len *= 2;
-               } else
-                       old_val = (gchar*)tvb_get_ephemeral_string(tvb, string_offset, old_len);
-               proto_tree_add_text(tree, tvb, string_offset, old_len,
-                   "Old Value: %s", old_val);
-        }
+    guint8 env_type;
+    guint old_len, new_len, old_len_offset;
+    char *new_val = NULL, *old_val = NULL;
+    guint32 string_offset;
+    gboolean is_unicode = FALSE;
+    guint16 collate_codepage, collate_flags;
+    guint8 collate_charset_id;
+
+    env_type = tvb_get_guint8(tvb, offset);
+    proto_tree_add_text(tree, tvb, offset, 1, "Type: %u (%s)", env_type,
+                        val_to_str(env_type, env_chg_names, "Unknown"));
+
+    new_len = tvb_get_guint8(tvb, offset+1);
+    old_len_offset = offset + new_len + 2;
+    old_len = tvb_get_guint8(tvb, old_len_offset);
+
+    /*
+     * If our lengths plus the lengths of the type and the lengths
+     * don't add up to the token size, it must be UCS2.
+     */
+    if (old_len + new_len + 3 != token_sz) {
+        is_unicode = TRUE;
+        old_len_offset = offset + (new_len * 2) + 2;
+        old_len = tvb_get_guint8(tvb, old_len_offset);
+    }
+
+    proto_tree_add_text(tree, tvb, offset + 1, 1, "New Value Length: %u",
+                        new_len);
+    if (new_len) {
+        if (env_type != 7) { /* if it's not 'Collation Info - which is not textual! */
+            string_offset = offset + 2;
+            if (is_unicode == TRUE) {
+                new_val = tvb_get_ephemeral_faked_unicode(tvb, string_offset,
+                                                          new_len, TRUE);
+                new_len *= 2;
+            } else
+                new_val = (gchar*)tvb_get_ephemeral_string(tvb, string_offset, new_len);
+            proto_tree_add_text(tree, tvb, string_offset, new_len,
+                                "New Value: %s", new_val);
+        }
+        else { /* parse collation info structure. From http://www.freetds.org/tds.html#collate */
+            offset +=2;
+            collate_codepage = tvb_get_letohs(tvb, offset);
+            proto_tree_add_text(tree, tvb, offset, 2, "Codepage: %u" , collate_codepage);
+            offset += 2;
+            collate_flags = tvb_get_letohs(tvb, offset);
+            proto_tree_add_text(tree, tvb, offset, 2, "Flags: 0x%x", collate_flags);
+            offset += 2;
+            collate_charset_id = tvb_get_guint8(tvb, offset);
+            proto_tree_add_text(tree, tvb, offset, 1, "Charset ID: %u", collate_charset_id);
+            offset +=1;
+        }
+    }
+
+    proto_tree_add_text(tree, tvb, old_len_offset, 1, "Old Value Length: %u",
+                        old_len);
+    if (old_len) {
+        string_offset = old_len_offset + 1;
+        if (is_unicode == TRUE) {
+            old_val = tvb_get_ephemeral_faked_unicode(tvb, string_offset,
+                                                      old_len, TRUE);
+            old_len *= 2;
+        } else
+            old_val = (gchar*)tvb_get_ephemeral_string(tvb, string_offset, old_len);
+        proto_tree_add_text(tree, tvb, string_offset, old_len,
+                            "Old Value: %s", old_val);
+    }
 }
 
 static void
 dissect_tds_err_token(tvbuff_t *tvb, guint offset, guint token_sz _U_, proto_tree *tree)
 {
-       guint16 msg_len;
-       guint8 srvr_len, proc_len;
-       char *msg;
-       gboolean is_unicode = FALSE;
-
-       proto_tree_add_text(tree, tvb, offset, 4, "SQL Error Number: %d", tds_tvb_get_xxtohl(tvb, offset, tds_little_endian));
-       offset += 4;
-       proto_tree_add_text(tree, tvb, offset, 1, "State: %u", tvb_get_guint8(tvb, offset));
-       offset +=1;
-       proto_tree_add_text(tree, tvb, offset, 1, "Severity Level: %u", tvb_get_guint8(tvb, offset));
-       offset +=1;
-
-       msg_len = tds_tvb_get_xxtohs(tvb, offset, tds_little_endian);
-       proto_tree_add_text(tree, tvb, offset, 1, "Error message length: %u characters", msg_len);
-       offset +=2;
-
-       if(tvb_get_guint8(tvb, offset+1) == 0) /* FIXME: It's probably unicode, if the 2nd byte of the message is zero. It's not a good detection method, but it works */
-               is_unicode = TRUE;
-
-       if(is_unicode) {
-               msg = tvb_get_ephemeral_faked_unicode(tvb, offset, msg_len, TRUE);
-               msg_len *= 2;
-       } else {
-               msg = (gchar*)tvb_get_ephemeral_string(tvb, offset, msg_len);
-       }
-       proto_tree_add_text(tree, tvb, offset, msg_len, "Error: %s", format_text((guchar*)msg, strlen(msg)));
-       offset += msg_len;
-
-       srvr_len = tvb_get_guint8(tvb, offset);
-
-       proto_tree_add_text(tree, tvb, offset, 1, "Server name length: %u characters", srvr_len);
-       offset +=1;
-       if(srvr_len) {
-               if (is_unicode) {
-                       msg = tvb_get_ephemeral_faked_unicode(tvb, offset, srvr_len, TRUE);
-                       srvr_len *=2;
-               } else {
-                       msg = (gchar*)tvb_get_ephemeral_string(tvb, offset, srvr_len);
-               }
-               proto_tree_add_text(tree, tvb, offset, srvr_len, "Server name: %s", msg);
-               offset += srvr_len;
-       }
-
-       proc_len = tvb_get_guint8(tvb, offset);
-
-       proto_tree_add_text(tree, tvb, offset, 1, "Process name length: %u characters", proc_len);
-       offset +=1;
-       if(proc_len) {
-               if (is_unicode) {
-                       msg = tvb_get_ephemeral_faked_unicode(tvb, offset, proc_len, TRUE);
-                       proc_len *=2;
-               } else {
-                       msg = (gchar*)tvb_get_ephemeral_string(tvb, offset, proc_len);
-               }
-               proto_tree_add_text(tree, tvb, offset, proc_len, "Process name: %s", msg);
-               offset += proc_len;
-       }
-
-       proto_tree_add_text(tree, tvb, offset, 2, "line number: %d", tds_tvb_get_xxtohs(tvb, offset, tds_little_endian));
+    guint16 msg_len;
+    guint8 srvr_len, proc_len;
+    char *msg;
+    gboolean is_unicode = FALSE;
+
+    proto_tree_add_text(tree, tvb, offset, 4, "SQL Error Number: %d", tds_tvb_get_xxtohl(tvb, offset, tds_little_endian));
+    offset += 4;
+    proto_tree_add_text(tree, tvb, offset, 1, "State: %u", tvb_get_guint8(tvb, offset));
+    offset +=1;
+    proto_tree_add_text(tree, tvb, offset, 1, "Severity Level: %u", tvb_get_guint8(tvb, offset));
+    offset +=1;
+
+    msg_len = tds_tvb_get_xxtohs(tvb, offset, tds_little_endian);
+    proto_tree_add_text(tree, tvb, offset, 1, "Error message length: %u characters", msg_len);
+    offset +=2;
+
+    if(tvb_get_guint8(tvb, offset+1) == 0) /* FIXME: It's probably unicode, if the 2nd byte of the message is zero. It's not a good detection method, but it works */
+        is_unicode = TRUE;
+
+    if(is_unicode) {
+        msg = tvb_get_ephemeral_faked_unicode(tvb, offset, msg_len, TRUE);
+        msg_len *= 2;
+    } else {
+        msg = (gchar*)tvb_get_ephemeral_string(tvb, offset, msg_len);
+    }
+    proto_tree_add_text(tree, tvb, offset, msg_len, "Error: %s", format_text((guchar*)msg, strlen(msg)));
+    offset += msg_len;
+
+    srvr_len = tvb_get_guint8(tvb, offset);
+
+    proto_tree_add_text(tree, tvb, offset, 1, "Server name length: %u characters", srvr_len);
+    offset +=1;
+    if(srvr_len) {
+        if (is_unicode) {
+            msg = tvb_get_ephemeral_faked_unicode(tvb, offset, srvr_len, TRUE);
+            srvr_len *=2;
+        } else {
+            msg = (gchar*)tvb_get_ephemeral_string(tvb, offset, srvr_len);
+        }
+        proto_tree_add_text(tree, tvb, offset, srvr_len, "Server name: %s", msg);
+        offset += srvr_len;
+    }
+
+    proc_len = tvb_get_guint8(tvb, offset);
+
+    proto_tree_add_text(tree, tvb, offset, 1, "Process name length: %u characters", proc_len);
+    offset +=1;
+    if(proc_len) {
+        if (is_unicode) {
+            msg = tvb_get_ephemeral_faked_unicode(tvb, offset, proc_len, TRUE);
+            proc_len *=2;
+        } else {
+            msg = (gchar*)tvb_get_ephemeral_string(tvb, offset, proc_len);
+        }
+        proto_tree_add_text(tree, tvb, offset, proc_len, "Process name: %s", msg);
+        offset += proc_len;
+    }
+
+    proto_tree_add_text(tree, tvb, offset, 2, "line number: %d", tds_tvb_get_xxtohs(tvb, offset, tds_little_endian));
 }
 
 static void
 dissect_tds_login_ack_token(tvbuff_t *tvb, guint offset, guint token_sz, proto_tree *tree)
 {
-       guint8 msg_len;
-       char *msg;
-       gboolean is_unicode = FALSE;
-
-       proto_tree_add_text(tree, tvb, offset, 1, "Ack: %u", tvb_get_guint8(tvb, offset));
-       offset +=1;
-       proto_tree_add_text(tree, tvb, offset, 1, "Major version (may be incorrect): %d", tvb_get_guint8(tvb, offset));
-       offset +=1;
-       proto_tree_add_text(tree, tvb, offset, 1, "Minor version (may be incorrect): %d", tvb_get_guint8(tvb, offset));
-       offset +=1;
-       proto_tree_add_text(tree, tvb, offset, 2, "zero usually");
-       offset +=2;
-
-       msg_len = tvb_get_guint8(tvb, offset);
-       proto_tree_add_text(tree, tvb, offset, 1, "Text length: %u characters", msg_len);
-       offset +=1;
-
-       if(msg_len + 6U + 3U != token_sz - 1) /* 6 is the length of ack(1), version (4), text length (1) fields */
-               is_unicode = TRUE;
-       proto_tree_add_text(tree, tvb, offset, 0, "msg_len: %d, token_sz: %d, total: %d",msg_len, token_sz, msg_len + 6U + 3U);
-       if(is_unicode) {
-               msg = tvb_get_ephemeral_faked_unicode(tvb, offset, msg_len, TRUE);
-               msg_len *= 2;
-       } else {
-               msg = (gchar*)tvb_get_ephemeral_string(tvb, offset, msg_len);
-       }
-       proto_tree_add_text(tree, tvb, offset, msg_len, "Text: %s", format_text((guchar*)msg, strlen(msg)));
-       offset += msg_len;
-
-       proto_tree_add_text(tree, tvb, offset, 4, "Server Version");
-       offset += 4;
+    guint8 msg_len;
+    char *msg;
+    gboolean is_unicode = FALSE;
+
+    proto_tree_add_text(tree, tvb, offset, 1, "Ack: %u", tvb_get_guint8(tvb, offset));
+    offset +=1;
+    proto_tree_add_text(tree, tvb, offset, 1, "Major version (may be incorrect): %d", tvb_get_guint8(tvb, offset));
+    offset +=1;
+    proto_tree_add_text(tree, tvb, offset, 1, "Minor version (may be incorrect): %d", tvb_get_guint8(tvb, offset));
+    offset +=1;
+    proto_tree_add_text(tree, tvb, offset, 2, "zero usually");
+    offset +=2;
+
+    msg_len = tvb_get_guint8(tvb, offset);
+    proto_tree_add_text(tree, tvb, offset, 1, "Text length: %u characters", msg_len);
+    offset +=1;
+
+    if(msg_len + 6U + 3U != token_sz - 1) /* 6 is the length of ack(1), version (4), text length (1) fields */
+        is_unicode = TRUE;
+    proto_tree_add_text(tree, tvb, offset, 0, "msg_len: %d, token_sz: %d, total: %d",msg_len, token_sz, msg_len + 6U + 3U);
+    if(is_unicode) {
+        msg = tvb_get_ephemeral_faked_unicode(tvb, offset, msg_len, TRUE);
+        msg_len *= 2;
+    } else {
+        msg = (gchar*)tvb_get_ephemeral_string(tvb, offset, msg_len);
+    }
+    proto_tree_add_text(tree, tvb, offset, msg_len, "Text: %s", format_text((guchar*)msg, strlen(msg)));
+    offset += msg_len;
+
+    proto_tree_add_text(tree, tvb, offset, 4, "Server Version");
+    offset += 4;
 }
 
 static int
 dissect_tds7_results_token(tvbuff_t *tvb, guint offset, proto_tree *tree)
 {
-       guint16 num_columns, table_len;
-       guint8 type, msg_len;
-       int i;
-       char *msg;
-       guint16 collate_codepage, collate_flags;
-       guint8 collate_charset_id;
-
-       num_columns = tvb_get_letohs(tvb, offset);
-       proto_tree_add_text(tree, tvb, offset, 2, "Columns: %u", tvb_get_letohs(tvb, offset));
-       offset +=2;
-       for(i=0; i != num_columns; i++) {
-               proto_tree_add_text(tree, tvb, offset, 0, "Column %d", i + 1);
-               proto_tree_add_text(tree, tvb, offset, 2, "usertype: %d", tvb_get_letohs(tvb, offset));
-               offset +=2;
-               proto_tree_add_text(tree, tvb, offset, 2, "flags: %d", tvb_get_letohs(tvb, offset));
-               offset +=2;
-               type  = tvb_get_guint8(tvb, offset);
-               proto_tree_add_text(tree, tvb, offset, 1, "Type: %d", type);
-               offset +=1;
-               if(type == 38 || type == 104 || type == 109 || type == 111) { /* ugly, ugly hack. Wish I knew what it really means!*/
-                       proto_tree_add_text(tree, tvb, offset, 1, "unknown 1 byte (%x)", tvb_get_guint8(tvb, offset));
-                       offset +=1;
-               }
-               else if (type == 35) {
-                       proto_tree_add_text(tree, tvb, offset, 4, "unknown 4 bytes (%x)", tvb_get_letohl(tvb, offset));
-                       offset += 4;
-                       collate_codepage = tvb_get_letohs(tvb, offset);
-                       proto_tree_add_text(tree, tvb, offset, 2, "Codepage: %u" , collate_codepage);
-                       offset += 2;
-                       collate_flags = tvb_get_letohs(tvb, offset);
-                       proto_tree_add_text(tree, tvb, offset, 2, "Flags: 0x%x", collate_flags);
-                       offset += 2;
-                       collate_charset_id = tvb_get_guint8(tvb, offset);
-                       proto_tree_add_text(tree, tvb, offset, 1, "Charset ID: %u", collate_charset_id);
-                       offset +=1;
-                       table_len = tvb_get_letohs(tvb, offset);
-                       offset +=2;
-                       if(table_len != 0) {
-                               msg = tvb_get_ephemeral_faked_unicode(tvb, offset, table_len, TRUE);
-                               proto_tree_add_text(tree, tvb, offset, table_len*2, "Table name: %s", msg);
-                               offset += table_len*2;
-                       }
-               }
-               else if (type == 106 || type == 108) {
-                       proto_tree_add_text(tree, tvb, offset, 3, "unknown 3 bytes");
-                       offset +=3;
-               }
-               else if(type > 128) {
-                       proto_tree_add_text(tree, tvb, offset, 2, "Large type size: 0x%x", tvb_get_letohs(tvb, offset));
-                       offset += 2;
-                       if (type != 165) {
-                               collate_codepage = tvb_get_letohs(tvb, offset);
-                               proto_tree_add_text(tree, tvb, offset, 2, "Codepage: %u" , collate_codepage);
-                               offset += 2;
-                               collate_flags = tvb_get_letohs(tvb, offset);
-                               proto_tree_add_text(tree, tvb, offset, 2, "Flags: 0x%x", collate_flags);
-                               offset += 2;
-                               collate_charset_id = tvb_get_guint8(tvb, offset);
-                               proto_tree_add_text(tree, tvb, offset, 1, "Charset ID: %u", collate_charset_id);
-                               offset +=1;
-                       }
-               }
-               msg_len = tvb_get_guint8(tvb, offset);
-               proto_tree_add_text(tree, tvb, offset, 1, "message length: %d",msg_len);
-               offset += 1;
-               if(msg_len != 0) {
-                       msg = tvb_get_ephemeral_faked_unicode(tvb, offset, msg_len, TRUE);
-                       proto_tree_add_text(tree, tvb, offset, msg_len*2, "Text: %s", msg);
-                       offset += msg_len*2;
-               }
-       }
-       return offset;
+    guint16 num_columns, table_len;
+    guint8 type, msg_len;
+    int i;
+    char *msg;
+    guint16 collate_codepage, collate_flags;
+    guint8 collate_charset_id;
+
+    num_columns = tvb_get_letohs(tvb, offset);
+    proto_tree_add_text(tree, tvb, offset, 2, "Columns: %u", tvb_get_letohs(tvb, offset));
+    offset +=2;
+    for(i=0; i != num_columns; i++) {
+        proto_tree_add_text(tree, tvb, offset, 0, "Column %d", i + 1);
+        proto_tree_add_text(tree, tvb, offset, 2, "usertype: %d", tvb_get_letohs(tvb, offset));
+        offset +=2;
+        proto_tree_add_text(tree, tvb, offset, 2, "flags: %d", tvb_get_letohs(tvb, offset));
+        offset +=2;
+        type  = tvb_get_guint8(tvb, offset);
+        proto_tree_add_text(tree, tvb, offset, 1, "Type: %d", type);
+        offset +=1;
+        if(type == 38 || type == 104 || type == 109 || type == 111) { /* ugly, ugly hack. Wish I knew what it really means!*/
+            proto_tree_add_text(tree, tvb, offset, 1, "unknown 1 byte (%x)", tvb_get_guint8(tvb, offset));
+            offset +=1;
+        }
+        else if (type == 35) {
+            proto_tree_add_text(tree, tvb, offset, 4, "unknown 4 bytes (%x)", tvb_get_letohl(tvb, offset));
+            offset += 4;
+            collate_codepage = tvb_get_letohs(tvb, offset);
+            proto_tree_add_text(tree, tvb, offset, 2, "Codepage: %u" , collate_codepage);
+            offset += 2;
+            collate_flags = tvb_get_letohs(tvb, offset);
+            proto_tree_add_text(tree, tvb, offset, 2, "Flags: 0x%x", collate_flags);
+            offset += 2;
+            collate_charset_id = tvb_get_guint8(tvb, offset);
+            proto_tree_add_text(tree, tvb, offset, 1, "Charset ID: %u", collate_charset_id);
+            offset +=1;
+            table_len = tvb_get_letohs(tvb, offset);
+            offset +=2;
+            if(table_len != 0) {
+                msg = tvb_get_ephemeral_faked_unicode(tvb, offset, table_len, TRUE);
+                proto_tree_add_text(tree, tvb, offset, table_len*2, "Table name: %s", msg);
+                offset += table_len*2;
+            }
+        }
+        else if (type == 106 || type == 108) {
+            proto_tree_add_text(tree, tvb, offset, 3, "unknown 3 bytes");
+            offset +=3;
+        }
+        else if(type > 128) {
+            proto_tree_add_text(tree, tvb, offset, 2, "Large type size: 0x%x", tvb_get_letohs(tvb, offset));
+            offset += 2;
+            if (type != 165) {
+                collate_codepage = tvb_get_letohs(tvb, offset);
+                proto_tree_add_text(tree, tvb, offset, 2, "Codepage: %u" , collate_codepage);
+                offset += 2;
+                collate_flags = tvb_get_letohs(tvb, offset);
+                proto_tree_add_text(tree, tvb, offset, 2, "Flags: 0x%x", collate_flags);
+                offset += 2;
+                collate_charset_id = tvb_get_guint8(tvb, offset);
+                proto_tree_add_text(tree, tvb, offset, 1, "Charset ID: %u", collate_charset_id);
+                offset +=1;
+            }
+        }
+        msg_len = tvb_get_guint8(tvb, offset);
+        proto_tree_add_text(tree, tvb, offset, 1, "message length: %d",msg_len);
+        offset += 1;
+        if(msg_len != 0) {
+            msg = tvb_get_ephemeral_faked_unicode(tvb, offset, msg_len, TRUE);
+            proto_tree_add_text(tree, tvb, offset, msg_len*2, "Text: %s", msg);
+            offset += msg_len*2;
+        }
+    }
+    return offset;
 }
 
 static void
 dissect_tds_done_token(tvbuff_t *tvb, guint offset, proto_tree *tree)
 {
-       proto_tree_add_text(tree, tvb, offset, 2, "Status flags");
-       offset += 2;
-       proto_tree_add_text(tree, tvb, offset, 2, "Operation");
-       offset += 2;
-       proto_tree_add_text(tree, tvb, offset, 4, "row count: %u", tds_tvb_get_xxtohl(tvb, offset, tds_little_endian));
-       offset += 2;
+    proto_tree_add_text(tree, tvb, offset, 2, "Status flags");
+    offset += 2;
+    proto_tree_add_text(tree, tvb, offset, 2, "Operation");
+    offset += 2;
+    proto_tree_add_text(tree, tvb, offset, 4, "row count: %u", tds_tvb_get_xxtohl(tvb, offset, tds_little_endian));
+    offset += 2;
 }
 
 static void
 dissect_tds_rpc(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
 {
-       int offset = 0;
-       guint len;
-       guint16 sp_id;
-       char *val;
-
-       /*
-        * RPC name.
-        */
-       switch(tds_protocol_type) {
-               case TDS_PROTOCOL_4:
-                       len = tvb_get_guint8(tvb, offset);
-                       proto_tree_add_text(tree, tvb, offset, 1, "RPC Name Length: %u", len);
-                       offset += 1;
-                       val = (gchar*)tvb_get_ephemeral_string(tvb, offset, len);
-                       proto_tree_add_text(tree, tvb, offset, len, "RPC Name: %s", val);
-                       offset += len;
-                       break;
-
-               case TDS_PROTOCOL_7:
-               case TDS_PROTOCOL_8:
-               default:          /* unspecified: try as if TDS7/TDS8 */
-                       len = tvb_get_letohs(tvb, offset);
-                       proto_tree_add_text(tree, tvb, offset, 2, "RPC Name Length: %u", len);
-                       offset += 2;
-                       if (len == 0xFFFF) {
-                               sp_id = tvb_get_letohs(tvb, offset);
-                               proto_tree_add_text(tree, tvb, offset, 2, "RPC Stored Proc ID: %u (%s)",
-                                   sp_id,
-                                   val_to_str(sp_id, internal_stored_proc_id_names, "Unknown"));
-                               offset += 2;
-                       }
-                       else if (len != 0) {
-                               val = tvb_get_ephemeral_faked_unicode(tvb, offset, len, TRUE);
-                               len *= 2;
-                               proto_tree_add_text(tree, tvb, offset, len, "RPC Name: %s", val);
-                               offset += len;
-                       }
-                       break;
-       }
-       proto_tree_add_text(tree, tvb, offset, -1, "Params (not dissected)");
+    int offset = 0;
+    guint len;
+    guint16 sp_id;
+    char *val;
+
+    /*
+     * RPC name.
+     */
+    switch(tds_protocol_type) {
+        case TDS_PROTOCOL_4:
+            len = tvb_get_guint8(tvb, offset);
+            proto_tree_add_text(tree, tvb, offset, 1, "RPC Name Length: %u", len);
+            offset += 1;
+            val = (gchar*)tvb_get_ephemeral_string(tvb, offset, len);
+            proto_tree_add_text(tree, tvb, offset, len, "RPC Name: %s", val);
+            offset += len;
+            break;
+
+        case TDS_PROTOCOL_7:
+        case TDS_PROTOCOL_8:
+        default:        /* unspecified: try as if TDS7/TDS8 */
+            len = tvb_get_letohs(tvb, offset);
+            proto_tree_add_text(tree, tvb, offset, 2, "RPC Name Length: %u", len);
+            offset += 2;
+            if (len == 0xFFFF) {
+                sp_id = tvb_get_letohs(tvb, offset);
+                proto_tree_add_text(tree, tvb, offset, 2, "RPC Stored Proc ID: %u (%s)",
+                                    sp_id,
+                                    val_to_str(sp_id, internal_stored_proc_id_names, "Unknown"));
+                offset += 2;
+            }
+            else if (len != 0) {
+                val = tvb_get_ephemeral_faked_unicode(tvb, offset, len, TRUE);
+                len *= 2;
+                proto_tree_add_text(tree, tvb, offset, len, "RPC Name: %s", val);
+                offset += len;
+            }
+            break;
+    }
+    proto_tree_add_text(tree, tvb, offset, -1, "Params (not dissected)");
 }
 
 static void
 dissect_tds_resp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 {
-       int offset = 0;
-       proto_item *token_item;
-       proto_tree *token_tree;
-       guint pos, token_sz = 0;
-       guint token_len_field_size = 2;
-       guint token_len_field_val = 0;
-       guint8 token;
-       struct _netlib_data nl_data;
-       gint length_remaining;
-
-       memset(&nl_data, '\0', sizeof nl_data);
-
-       /*
-        * Until we reach the end of the packet, read tokens.
-        */
-       pos = offset;
-       while (tvb_reported_length_remaining(tvb, pos) > 0) {
-               /* our token */
-               token = tvb_get_guint8(tvb, pos);
-
-               /* TODO Handle TDS_PARAMFMT, TDS_PARAMS [similar to TDS_RESULTS, TDS_ROW] */
-               if (tds_token_is_fixed_size(token)) {
-                       token_sz = tds_get_fixed_token_size(token) + 1;
-               } else if (token == TDS_ROW_TOKEN) {
-                       /*
-                        * Rows are special; they have no size field and
-                        * aren't fixed length.
-                        */
-                       token_sz = tds_get_row_size(tvb, &nl_data, pos + 1);
-               } else
-                       token_sz = tds_get_variable_token_size(tvb, pos + 1,
-                           token, &token_len_field_size, &token_len_field_val);
-
-               length_remaining = tvb_ensure_length_remaining(tvb, pos);
-
-               if ((int) token_sz < 0) {
-                   proto_tree_add_text(tree, tvb, pos, 0, "Bogus token size: %u",
-                       token_sz);
-                   break;
-               }
-               if ((int) token_len_field_size < 0) {
-                   proto_tree_add_text(tree, tvb, pos, 0, "Bogus token length field size: %u",
-                       token_len_field_size);
-                   break;
-               }
-               token_item = proto_tree_add_text(tree, tvb, pos, token_sz,
-                    "Token 0x%02x %s", token,
-                    val_to_str(token, token_names, "Unknown Token Type"));
-               token_tree = proto_item_add_subtree(token_item, ett_tds_token);
-
-               /*
-                * If it's a variable token, put the length field in here
-                * instead of replicating this for each token subdissector.
-                */
-               if (!tds_token_is_fixed_size(token) && token != TDS_ROW_TOKEN) {
-                       proto_tree_add_text(token_tree, tvb, pos + 1,
-                           token_len_field_size, "Length: %u",
-                           token_len_field_val);
-               }
-
-               if (token_sz > (guint)length_remaining)
-                       token_sz = (guint)length_remaining;
-
-               switch (token) {
-
-               case TDS_COL_NAME_TOKEN:
-                       /*
-                        * TDS 4.2
-                        * TODO dissect token to get "column names" to fill in _netlib_data
-                        */
-                       break;
-
-               case TDS_COL_INFO_TOKEN:
-                       /*
-                        * TDS 4.2: get the column info
-                        */
-                       dissect_tds_col_info_token(tvb, &nl_data, pos);
-                       break;
-
-               case TDS_RESULT_TOKEN:
-                       /*
-                        * If it's a result token, we need to stash the
-                        * column info.
-                        */
-                       read_results_tds5(tvb, &nl_data, pos + 3, token_sz - 3);
-                       break;
-
-               case TDS_ENV_CHG_TOKEN:
-                       dissect_tds_env_chg(tvb, pos + 3, token_sz - 3, token_tree);
-                       break;
-
-               case TDS_AUTH_TOKEN:
-                       dissect_tds_nt(tvb, pinfo, token_tree, pos + 3, token_sz - 3);
-                       break;
-               case TDS_ERR_TOKEN:
-               case TDS_MSG_TOKEN:
-                       dissect_tds_err_token(tvb, pos + 3, token_sz - 3, token_tree);
-                       break;
-
-               case TDS_DONE_TOKEN:
-               case TDS_DONEPROC_TOKEN:
-               case TDS_DONEINPROC_TOKEN:
-                       dissect_tds_done_token(tvb, pos + 1, token_tree);
-                       break;
-               case TDS_LOGIN_ACK_TOKEN:
-                       dissect_tds_login_ack_token(tvb, pos + 3, token_sz - 3, token_tree);
-                       break;
-               case TDS7_RESULT_TOKEN:
-                       pos = (dissect_tds7_results_token(tvb, pos + 1, token_tree)-1);
-                       break;
-               }
-
-               /* and step to the end of the token, rinse, lather, repeat */
-               pos += token_sz;
-       }
+    int offset = 0;
+    proto_item *token_item;
+    proto_tree *token_tree;
+    guint pos, token_sz = 0;
+    guint token_len_field_size = 2;
+    guint token_len_field_val = 0;
+    guint8 token;
+    struct _netlib_data nl_data;
+    gint length_remaining;
+
+    memset(&nl_data, '\0', sizeof nl_data);
+
+    /*
+     * Until we reach the end of the packet, read tokens.
+     */
+    pos = offset;
+    while (tvb_reported_length_remaining(tvb, pos) > 0) {
+        /* our token */
+        token = tvb_get_guint8(tvb, pos);
+
+        /* TODO Handle TDS_PARAMFMT, TDS_PARAMS [similar to TDS_RESULTS, TDS_ROW] */
+        if (tds_token_is_fixed_size(token)) {
+            token_sz = tds_get_fixed_token_size(token) + 1;
+        } else if (token == TDS_ROW_TOKEN) {
+            /*
+             * Rows are special; they have no size field and
+             * aren't fixed length.
+             */
+            token_sz = tds_get_row_size(tvb, &nl_data, pos + 1);
+        } else
+            token_sz = tds_get_variable_token_size(tvb, pos + 1,
+                                                   token, &token_len_field_size, &token_len_field_val);
+
+        length_remaining = tvb_ensure_length_remaining(tvb, pos);
+
+        if ((int) token_sz < 0) {
+            proto_tree_add_text(tree, tvb, pos, 0, "Bogus token size: %u",
+                                token_sz);
+            break;
+        }
+        if ((int) token_len_field_size < 0) {
+            proto_tree_add_text(tree, tvb, pos, 0, "Bogus token length field size: %u",
+                                token_len_field_size);
+            break;
+        }
+        token_item = proto_tree_add_text(tree, tvb, pos, token_sz,
+                                         "Token 0x%02x %s", token,
+                                         val_to_str(token, token_names, "Unknown Token Type"));
+        token_tree = proto_item_add_subtree(token_item, ett_tds_token);
+
+        /*
+         * If it's a variable token, put the length field in here
+         * instead of replicating this for each token subdissector.
+         */
+        if (!tds_token_is_fixed_size(token) && token != TDS_ROW_TOKEN) {
+            proto_tree_add_text(token_tree, tvb, pos + 1,
+                                token_len_field_size, "Length: %u",
+                                token_len_field_val);
+        }
+
+        if (token_sz > (guint)length_remaining)
+            token_sz = (guint)length_remaining;
+
+        switch (token) {
+
+            case TDS_COL_NAME_TOKEN:
+                /*
+                 * TDS 4.2
+                 * TODO dissect token to get "column names" to fill in _netlib_data
+                 */
+                break;
+
+            case TDS_COL_INFO_TOKEN:
+                /*
+                 * TDS 4.2: get the column info
+                 */
+                dissect_tds_col_info_token(tvb, &nl_data, pos);
+                break;
+
+            case TDS_RESULT_TOKEN:
+                /*
+                 * If it's a result token, we need to stash the
+                 * column info.
+                 */
+                read_results_tds5(tvb, &nl_data, pos + 3, token_sz - 3);
+                break;
+
+            case TDS_ENV_CHG_TOKEN:
+                dissect_tds_env_chg(tvb, pos + 3, token_sz - 3, token_tree);
+                break;
+
+            case TDS_AUTH_TOKEN:
+                dissect_tds_nt(tvb, pinfo, token_tree, pos + 3, token_sz - 3);
+                break;
+            case TDS_ERR_TOKEN:
+            case TDS_MSG_TOKEN:
+                dissect_tds_err_token(tvb, pos + 3, token_sz - 3, token_tree);
+                break;
+
+            case TDS_DONE_TOKEN:
+            case TDS_DONEPROC_TOKEN:
+            case TDS_DONEINPROC_TOKEN:
+                dissect_tds_done_token(tvb, pos + 1, token_tree);
+                break;
+            case TDS_LOGIN_ACK_TOKEN:
+                dissect_tds_login_ack_token(tvb, pos + 3, token_sz - 3, token_tree);
+                break;
+            case TDS7_RESULT_TOKEN:
+                pos = (dissect_tds7_results_token(tvb, pos + 1, token_tree)-1);
+                break;
+        }
+
+        /* and step to the end of the token, rinse, lather, repeat */
+        pos += token_sz;
+    }
 }
 
 static void
 dissect_netlib_buffer(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 {
-       int offset = 0;
-       proto_item *tds_item = NULL;
-       proto_tree *tds_tree = NULL;
-       guint8 type;
-       guint8 status;
-       guint16 size;
-       guint16 channel;
-       guint8 packet_number;
-       gboolean save_fragmented;
-       int len;
-       fragment_data *fd_head;
-       tvbuff_t *next_tvb;
-
-       if (tree) {
-               /* create display subtree for the protocol */
-               tds_item = proto_tree_add_item(tree, proto_tds, tvb, offset, -1,
-                   FALSE);
-
-               tds_tree = proto_item_add_subtree(tds_item, ett_tds);
-       }
-       type = tvb_get_guint8(tvb, offset);
-       if (tree) {
-               proto_tree_add_uint(tds_tree, hf_tds_type, tvb, offset, 1,
-                   type);
-       }
-       status = tvb_get_guint8(tvb, offset + 1);
-       if (tree) {
-               proto_tree_add_uint(tds_tree, hf_tds_status, tvb, offset + 1, 1,
-                   status);
-       }
-       size = tvb_get_ntohs(tvb, offset + 2);
-       if (tree) {
-               proto_tree_add_uint(tds_tree, hf_tds_size, tvb, offset + 2, 2,
-                       size);
-       }
-       channel = tvb_get_ntohs(tvb, offset + 4);
-       if (tree) {
-               proto_tree_add_uint(tds_tree, hf_tds_channel, tvb, offset + 4, 2,
-                       channel);
-       }
-       packet_number = tvb_get_guint8(tvb, offset + 6);
-       if (tree) {
-               proto_tree_add_uint(tds_tree, hf_tds_packet_number, tvb, offset + 6, 1,
-                       packet_number);
-               proto_tree_add_item(tds_tree, hf_tds_window, tvb, offset + 7, 1,
-                       FALSE);
-       }
-       offset += 8;    /* skip Netlib header */
-
-       /*
-        * Deal with fragmentation.
-        *
-        * TODO: handle case where netlib headers 'packet-number'.is always 0
-        *       use fragment_add_seq_next in this case ?
-        *
-        */
-       save_fragmented = pinfo->fragmented;
-       if (tds_defragment &&
-           (packet_number > 1 || status == STATUS_NOT_LAST_BUFFER)) {
-               if (status == STATUS_NOT_LAST_BUFFER) {
-                       col_append_str(pinfo->cinfo, COL_INFO,
-                                   " (Not last buffer)");
-               }
-               len = tvb_reported_length_remaining(tvb, offset);
-               /*
-                * XXX - I've seen captures that start with a login
-                * packet with a sequence number of 2.
-                */
-               fd_head = fragment_add_seq_check(tvb, offset, pinfo, channel,
-                   tds_fragment_table, tds_reassembled_table,
-                   packet_number - 1, len, status == STATUS_NOT_LAST_BUFFER);
-               next_tvb = process_reassembled_data(tvb, offset, pinfo,
-                   "Reassembled TDS", fd_head, &tds_frag_items, NULL,
-                   tds_tree);
-       } else {
-               /*
-                * If this isn't the last buffer, just show it as a fragment.
-                * (XXX - it'd be nice to dissect it if it's the first
-                * buffer, but we'd need to do reassembly in order to
-                * discover that.)
-                *
-                * If this is the last buffer, dissect it.
-                * (XXX - it'd be nice to show it as a fragment if it's part
-                * of a fragmented message, but we'd need to do reassembly
-                * in order to discover that.)
-                */
-               if (status == STATUS_NOT_LAST_BUFFER)
-                       next_tvb = NULL;
-               else {
-                       next_tvb = tvb_new_subset_remaining(tvb, offset);
-               }
-       }
-
-       if (next_tvb != NULL) {
-
-               switch (type) {
-
-               case TDS_RPC_PKT:
-                       dissect_tds_rpc(next_tvb, pinfo, tds_tree);
-                       break;
-
-               case TDS_RESP_PKT:
-                       dissect_tds_resp(next_tvb, pinfo, tds_tree);
-                       break;
-
-               case TDS_LOGIN7_PKT:
-                       dissect_tds7_login(next_tvb, pinfo, tds_tree);
-                       break;
-               case TDS_QUERY_PKT:
-                       dissect_tds_query_packet(next_tvb, pinfo, tds_tree);
-                       break;
-               case TDS_QUERY5_PKT:
-                       dissect_tds_query5_packet(next_tvb, pinfo, tds_tree);
-                       break;
-               case TDS_NTLMAUTH_PKT:
-                       dissect_tds_nt(next_tvb, pinfo, tds_tree, offset - 8, -1);
-                       break;
-               default:
-                       proto_tree_add_text(tds_tree, next_tvb, 0, -1,
-                           "TDS Packet");
-                       break;
-               }
-       } else {
-               next_tvb = tvb_new_subset_remaining (tvb, offset);
-               call_dissector(data_handle, next_tvb, pinfo, tds_tree);
-       }
+    int offset = 0;
+    proto_item *tds_item = NULL;
+    proto_tree *tds_tree = NULL;
+    guint8 type;
+    guint8 status;
+    guint16 size;
+    guint16 channel;
+    guint8 packet_number;
+    gboolean save_fragmented;
+    int len;
+    fragment_data *fd_head;
+    tvbuff_t *next_tvb;
+
+    if (tree) {
+        /* create display subtree for the protocol */
+        tds_item = proto_tree_add_item(tree, proto_tds, tvb, offset, -1,
+                                       FALSE);
+
+        tds_tree = proto_item_add_subtree(tds_item, ett_tds);
+    }
+    type = tvb_get_guint8(tvb, offset);
+    if (tree) {
+        proto_tree_add_uint(tds_tree, hf_tds_type, tvb, offset, 1,
+                            type);
+    }
+    status = tvb_get_guint8(tvb, offset + 1);
+    if (tree) {
+        proto_tree_add_uint(tds_tree, hf_tds_status, tvb, offset + 1, 1,
+                            status);
+    }
+    size = tvb_get_ntohs(tvb, offset + 2);
+    if (tree) {
+        proto_tree_add_uint(tds_tree, hf_tds_size, tvb, offset + 2, 2,
+                            size);
+    }
+    channel = tvb_get_ntohs(tvb, offset + 4);
+    if (tree) {
+        proto_tree_add_uint(tds_tree, hf_tds_channel, tvb, offset + 4, 2,
+                            channel);
+    }
+    packet_number = tvb_get_guint8(tvb, offset + 6);
+    if (tree) {
+        proto_tree_add_uint(tds_tree, hf_tds_packet_number, tvb, offset + 6, 1,
+                            packet_number);
+        proto_tree_add_item(tds_tree, hf_tds_window, tvb, offset + 7, 1,
+                            FALSE);
+    }
+    offset += 8;        /* skip Netlib header */
+
+    /*
+     * Deal with fragmentation.
+     *
+     * TODO: handle case where netlib headers 'packet-number'.is always 0
+     *       use fragment_add_seq_next in this case ?
+     *
+     */
+    save_fragmented = pinfo->fragmented;
+    if (tds_defragment &&
+        (packet_number > 1 || status == STATUS_NOT_LAST_BUFFER)) {
+        if (status == STATUS_NOT_LAST_BUFFER) {
+            col_append_str(pinfo->cinfo, COL_INFO,
+                           " (Not last buffer)");
+        }
+        len = tvb_reported_length_remaining(tvb, offset);
+        /*
+         * XXX - I've seen captures that start with a login
+         * packet with a sequence number of 2.
+         */
+        fd_head = fragment_add_seq_check(tvb, offset, pinfo, channel,
+                                         tds_fragment_table, tds_reassembled_table,
+                                         packet_number - 1, len, status == STATUS_NOT_LAST_BUFFER);
+        next_tvb = process_reassembled_data(tvb, offset, pinfo,
+                                            "Reassembled TDS", fd_head, &tds_frag_items, NULL,
+                                            tds_tree);
+    } else {
+        /*
+         * If this isn't the last buffer, just show it as a fragment.
+         * (XXX - it'd be nice to dissect it if it's the first
+         * buffer, but we'd need to do reassembly in order to
+         * discover that.)
+         *
+         * If this is the last buffer, dissect it.
+         * (XXX - it'd be nice to show it as a fragment if it's part
+         * of a fragmented message, but we'd need to do reassembly
+         * in order to discover that.)
+         */
+        if (status == STATUS_NOT_LAST_BUFFER)
+            next_tvb = NULL;
+        else {
+            next_tvb = tvb_new_subset_remaining(tvb, offset);
+        }
+    }
+
+    if (next_tvb != NULL) {
+
+        switch (type) {
+
+            case TDS_RPC_PKT:
+                dissect_tds_rpc(next_tvb, pinfo, tds_tree);
+                break;
+
+            case TDS_RESP_PKT:
+                dissect_tds_resp(next_tvb, pinfo, tds_tree);
+                break;
+
+            case TDS_LOGIN7_PKT:
+                dissect_tds7_login(next_tvb, pinfo, tds_tree);
+                break;
+            case TDS_QUERY_PKT:
+                dissect_tds_query_packet(next_tvb, pinfo, tds_tree);
+                break;
+            case TDS_QUERY5_PKT:
+                dissect_tds_query5_packet(next_tvb, pinfo, tds_tree);
+                break;
+            case TDS_NTLMAUTH_PKT:
+                dissect_tds_nt(next_tvb, pinfo, tds_tree, offset - 8, -1);
+                break;
+            default:
+                proto_tree_add_text(tds_tree, next_tvb, 0, -1,
+                                    "TDS Packet");
+                break;
+        }
+    } else {
+        next_tvb = tvb_new_subset_remaining (tvb, offset);
+        call_dissector(data_handle, next_tvb, pinfo, tds_tree);
+    }
 }
 
 static void
 dissect_tds_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 {
-       volatile gboolean first_time = TRUE;
-       volatile int offset = 0;
-       guint length_remaining;
-       guint8 type;
-       guint16 plen;
-       guint length;
-       tvbuff_t *volatile next_tvb;
-       proto_item *tds_item = NULL;
-       proto_tree *tds_tree = NULL;
-
-       while (tvb_reported_length_remaining(tvb, offset) != 0) {
-               length_remaining = tvb_ensure_length_remaining(tvb, offset);
-
-               /*
-                * Can we do reassembly?
-                */
-               if (tds_desegment && pinfo->can_desegment) {
-                       /*
-                        * Yes - is the fixed-length part of the PDU
-                        * split across segment boundaries?
-                        */
-                       if (length_remaining < 8) {
-                               /*
-                                * Yes.  Tell the TCP dissector where the
-                                * data for this message starts in the data
-                                * it handed us, and how many more bytes we
-                                * need, and return.
-                                */
-                               pinfo->desegment_offset = offset;
-                               pinfo->desegment_len = 8 - length_remaining;
-                               return;
-                       }
-               }
-
-               type = tvb_get_guint8(tvb, offset);
-
-               /*
-                * Get the length of the PDU.
-                */
-               plen = tvb_get_ntohs(tvb, offset + 2);
-               if (plen < 8) {
-                       /*
-                        * The length is less than the header length.
-                        * Put in the type, status, and length, and
-                        * report the length as bogus.
-                        */
-                       if (tree) {
-                               /* create display subtree for the protocol */
-                               tds_item = proto_tree_add_item(tree, proto_tds,
-                                   tvb, offset, -1, FALSE);
-
-                               tds_tree = proto_item_add_subtree(tds_item,
-                                   ett_tds);
-                               proto_tree_add_uint(tds_tree, hf_tds_type, tvb,
-                                   offset, 1, type);
-                               proto_tree_add_item(tds_tree, hf_tds_status,
-                                   tvb, offset + 1, 1, FALSE);
-                               proto_tree_add_uint_format(tds_tree,
-                                   hf_tds_size, tvb, offset + 2, 2, plen,
-                                   "Size: %u (bogus, should be >= 8)", plen);
-                       }
-
-                       /*
-                        * Give up - we can't dissect any more of this
-                        * data.
-                        */
-                       break;
-               }
-
-               /*
-                * Can we do reassembly?
-                */
-               if (tds_desegment && pinfo->can_desegment) {
-                       /*
-                        * Yes - is the PDU split across segment boundaries?
-                        */
-                       if (length_remaining < plen) {
-                               /*
-                                * Yes.  Tell the TCP dissector where the
-                                * data for this message starts in the data
-                                * it handed us, and how many more bytes we
-                                * need, and return.
-                                */
-                               pinfo->desegment_offset = offset;
-                               pinfo->desegment_len = plen - length_remaining;
-                               return;
-                       }
-               }
-
-               if (first_time) {
-                       col_set_str(pinfo->cinfo, COL_PROTOCOL, "TDS");
-
-                       /*
-                        * Set the packet description based on its TDS packet
-                        * type.
-                        */
-                       if (check_col(pinfo->cinfo, COL_INFO)) {
-                               col_add_str(pinfo->cinfo, COL_INFO,
-                                   val_to_str(type, packet_type_names,
-                                     "Unknown Packet Type: %u"));
-                       }
-                       first_time = FALSE;
-               }
-
-               /*
-                * Construct a tvbuff containing the amount of the payload
-                * we have available.  Make its reported length the amount
-                * of data in the PDU.
-                *
-                * XXX - if reassembly isn't enabled. the subdissector will
-                * throw a BoundsError exception, rather than a
-                * ReportedBoundsError exception.  We really want a tvbuff
-                * where the length is "length", the reported length is
-                * "plen", and the "if the snapshot length were infinite"
-                * length is the minimum of the reported length of the tvbuff
-                * handed to us and "plen", with a new type of exception
-                * thrown if the offset is within the reported length but
-                * beyond that third length, with that exception getting the
-                * "Unreassembled Packet" error.
-                */
-               length = length_remaining;
-               if (length > plen)
-                       length = plen;
-               next_tvb = tvb_new_subset(tvb, offset, length, plen);
-
-               /*
-                * Dissect the Netlib buffer.
-                *
-                * Catch the ReportedBoundsError exception; if this
-                * particular Netlib buffer happens to get a
-                * ReportedBoundsError exception, that doesn't mean
-                * that we should stop dissecting PDUs within this frame
-                * or chunk of reassembled data.
-                *
-                * If it gets a BoundsError, we can stop, as there's nothing
-                * more to see, so we just re-throw it.
-                */
-               TRY {
-                       dissect_netlib_buffer(next_tvb, pinfo, tree);
-               }
-               CATCH(BoundsError) {
-                       RETHROW;
-               }
-               CATCH(ReportedBoundsError) {
-                       show_reported_bounds_error(tvb, pinfo, tree);
-               }
-               ENDTRY;
-
-               /*
-                * Step to the next Netlib buffer.
-                */
-               offset += plen;
-       }
+    volatile gboolean first_time = TRUE;
+    volatile int offset = 0;
+    guint length_remaining;
+    guint8 type;
+    guint16 plen;
+    guint length;
+    tvbuff_t *volatile next_tvb;
+    proto_item *tds_item = NULL;
+    proto_tree *tds_tree = NULL;
+
+    while (tvb_reported_length_remaining(tvb, offset) != 0) {
+        length_remaining = tvb_ensure_length_remaining(tvb, offset);
+
+        /*
+         * Can we do reassembly?
+         */
+        if (tds_desegment && pinfo->can_desegment) {
+            /*
+             * Yes - is the fixed-length part of the PDU
+             * split across segment boundaries?
+             */
+            if (length_remaining < 8) {
+                /*
+                 * Yes.  Tell the TCP dissector where the
+                 * data for this message starts in the data
+                 * it handed us, and how many more bytes we
+                 * need, and return.
+                 */
+                pinfo->desegment_offset = offset;
+                pinfo->desegment_len = 8 - length_remaining;
+                return;
+            }
+        }
+
+        type = tvb_get_guint8(tvb, offset);
+
+        /*
+         * Get the length of the PDU.
+         */
+        plen = tvb_get_ntohs(tvb, offset + 2);
+        if (plen < 8) {
+            /*
+             * The length is less than the header length.
+             * Put in the type, status, and length, and
+             * report the length as bogus.
+             */
+            if (tree) {
+                /* create display subtree for the protocol */
+                tds_item = proto_tree_add_item(tree, proto_tds,
+                                               tvb, offset, -1, FALSE);
+
+                tds_tree = proto_item_add_subtree(tds_item,
+                                                  ett_tds);
+                proto_tree_add_uint(tds_tree, hf_tds_type, tvb,
+                                    offset, 1, type);
+                proto_tree_add_item(tds_tree, hf_tds_status,
+                                    tvb, offset + 1, 1, FALSE);
+                proto_tree_add_uint_format(tds_tree,
+                                           hf_tds_size, tvb, offset + 2, 2, plen,
+                                           "Size: %u (bogus, should be >= 8)", plen);
+            }
+
+            /*
+             * Give up - we can't dissect any more of this
+             * data.
+             */
+            break;
+        }
+
+        /*
+         * Can we do reassembly?
+         */
+        if (tds_desegment && pinfo->can_desegment) {
+            /*
+             * Yes - is the PDU split across segment boundaries?
+             */
+            if (length_remaining < plen) {
+                /*
+                 * Yes.  Tell the TCP dissector where the
+                 * data for this message starts in the data
+                 * it handed us, and how many more bytes we
+                 * need, and return.
+                 */
+                pinfo->desegment_offset = offset;
+                pinfo->desegment_len = plen - length_remaining;
+                return;
+            }
+        }
+
+        if (first_time) {
+            col_set_str(pinfo->cinfo, COL_PROTOCOL, "TDS");
+
+            /*
+             * Set the packet description based on its TDS packet
+             * type.
+             */
+            if (check_col(pinfo->cinfo, COL_INFO)) {
+                col_add_str(pinfo->cinfo, COL_INFO,
+                            val_to_str(type, packet_type_names,
+                                       "Unknown Packet Type: %u"));
+            }
+            first_time = FALSE;
+        }
+
+        /*
+         * Construct a tvbuff containing the amount of the payload
+         * we have available.  Make its reported length the amount
+         * of data in the PDU.
+         *
+         * XXX - if reassembly isn't enabled. the subdissector will
+         * throw a BoundsError exception, rather than a
+         * ReportedBoundsError exception.  We really want a tvbuff
+         * where the length is "length", the reported length is
+         * "plen", and the "if the snapshot length were infinite"
+         * length is the minimum of the reported length of the tvbuff
+         * handed to us and "plen", with a new type of exception
+         * thrown if the offset is within the reported length but
+         * beyond that third length, with that exception getting the
+         * "Unreassembled Packet" error.
+         */
+        length = length_remaining;
+        if (length > plen)
+            length = plen;
+        next_tvb = tvb_new_subset(tvb, offset, length, plen);
+
+        /*
+         * Dissect the Netlib buffer.
+         *
+         * Catch the ReportedBoundsError exception; if this
+         * particular Netlib buffer happens to get a
+         * ReportedBoundsError exception, that doesn't mean
+         * that we should stop dissecting PDUs within this frame
+         * or chunk of reassembled data.
+         *
+         * If it gets a BoundsError, we can stop, as there's nothing
+         * more to see, so we just re-throw it.
+         */
+        TRY {
+            dissect_netlib_buffer(next_tvb, pinfo, tree);
+        }
+        CATCH(BoundsError) {
+            RETHROW;
+        }
+        CATCH(ReportedBoundsError) {
+            show_reported_bounds_error(tvb, pinfo, tree);
+        }
+        ENDTRY;
+
+        /*
+         * Step to the next Netlib buffer.
+         */
+        offset += plen;
+    }
 }
 
 static gboolean
 dissect_tds_tcp_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 {
-       int offset = 0;
-       guint8 type;
-       guint8 status;
-       guint16 plen;
-       conversation_t *conv;
-
-       /*
-        * If we don't have even enough data for a Netlib header,
-        * just say it's not TDS.
-        */
-       if (tvb_length(tvb) < 8)
-               return FALSE;
-
-       /*
-        * Quickly scan all the data we have in order to see if
-        * everything in it looks like Netlib traffic.
-        */
-       while (tvb_bytes_exist(tvb, offset, 1)) {
-               /*
-                * Check the type field.
-                */
-               type = tvb_get_guint8(tvb, offset);
-               if (!is_valid_tds_type(type))
-                       return FALSE;
-
-               /*
-                * Check the status field, if it's present.
-                */
-               if (!tvb_bytes_exist(tvb, offset + 1, 1))
-                       break;
-               status = tvb_get_guint8(tvb, offset + 1);
-               if (!is_valid_tds_status(status))
-                       return FALSE;
-
-               /*
-                * Get the length of the PDU.
-                */
-               if (!tvb_bytes_exist(tvb, offset + 2, 2))
-                       break;
-               plen = tvb_get_ntohs(tvb, offset + 2);
-               if (plen < 8) {
-                       /*
-                        * The length is less than the header length.
-                        * That's bogus.
-                        */
-                       return FALSE;
-               }
-
-               /*
-                * If we're at the beginning of the segment, check the
-                * payload if it's a login packet.
-                */
-               if (offset == 0) {
-                       if (!netlib_check_login_pkt(tvb, offset, pinfo, type))
-                               return FALSE;
-               }
-
-               /*
-                * Step to the next Netlib buffer.
-                */
-               offset += plen;
-       }
-
-       /*
-        * OK, it passes the test; assume the rest of this conversation
-        * is TDS.
-        */
-       conv = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst, pinfo->ptype,
-            pinfo->srcport, pinfo->destport, 0);
-        if (conv == NULL) {
-               /*
-                * No conversation exists yet - create one.
-                */
-               conv = conversation_new(pinfo->fd->num, &pinfo->src, &pinfo->dst,
-                   pinfo->ptype, pinfo->srcport, pinfo->destport, 0);
-       }
-       conversation_set_dissector(conv, tds_tcp_handle);
-
-       /*
-        * Now dissect it as TDS.
-        */
-       dissect_tds_tcp(tvb, pinfo, tree);
-       return TRUE;
+    int offset = 0;
+    guint8 type;
+    guint8 status;
+    guint16 plen;
+    conversation_t *conv;
+
+    /*
+     * If we don't have even enough data for a Netlib header,
+     * just say it's not TDS.
+     */
+    if (tvb_length(tvb) < 8)
+        return FALSE;
+
+    /*
+     * Quickly scan all the data we have in order to see if
+     * everything in it looks like Netlib traffic.
+     */
+    while (tvb_bytes_exist(tvb, offset, 1)) {
+        /*
+         * Check the type field.
+         */
+        type = tvb_get_guint8(tvb, offset);
+        if (!is_valid_tds_type(type))
+            return FALSE;
+
+        /*
+         * Check the status field, if it's present.
+         */
+        if (!tvb_bytes_exist(tvb, offset + 1, 1))
+            break;
+        status = tvb_get_guint8(tvb, offset + 1);
+        if (!is_valid_tds_status(status))
+            return FALSE;
+
+        /*
+         * Get the length of the PDU.
+         */
+        if (!tvb_bytes_exist(tvb, offset + 2, 2))
+            break;
+        plen = tvb_get_ntohs(tvb, offset + 2);
+        if (plen < 8) {
+            /*
+             * The length is less than the header length.
+             * That's bogus.
+             */
+            return FALSE;
+        }
+
+        /*
+         * If we're at the beginning of the segment, check the
+         * payload if it's a login packet.
+         */
+        if (offset == 0) {
+            if (!netlib_check_login_pkt(tvb, offset, pinfo, type))
+                return FALSE;
+        }
+
+        /*
+         * Step to the next Netlib buffer.
+         */
+        offset += plen;
+    }
+
+    /*
+     * OK, it passes the test; assume the rest of this conversation
+     * is TDS.
+     */
+    conv = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst, pinfo->ptype,
+                             pinfo->srcport, pinfo->destport, 0);
+    if (conv == NULL) {
+        /*
+         * No conversation exists yet - create one.
+         */
+        conv = conversation_new(pinfo->fd->num, &pinfo->src, &pinfo->dst,
+                                pinfo->ptype, pinfo->srcport, pinfo->destport, 0);
+    }
+    conversation_set_dissector(conv, tds_tcp_handle);
+
+    /*
+     * Now dissect it as TDS.
+     */
+    dissect_tds_tcp(tvb, pinfo, tree);
+    return TRUE;
 }
 
 static void
 tds_init(void)
 {
-       /*
-        * Initialize the fragment and reassembly tables.
-        */
-       fragment_table_init(&tds_fragment_table);
-       reassembled_table_init(&tds_reassembled_table);
+    /*
+     * Initialize the fragment and reassembly tables.
+     */
+    fragment_table_init(&tds_fragment_table);
+    reassembled_table_init(&tds_reassembled_table);
 
 }
 
@@ -1982,194 +1982,194 @@ tds_init(void)
 void
 proto_register_tds(void)
 {
-       static hf_register_info hf[] = {
-               { &hf_tds_type,
-                       { "Type",           "tds.type",
-                       FT_UINT8, BASE_HEX, VALS(packet_type_names), 0x0,
-                       "Packet Type", HFILL }
-               },
-               { &hf_tds_status,
-                       { "Status",         "tds.status",
-                       FT_UINT8, BASE_DEC, VALS(status_names), 0x0,
-                       "Frame status", HFILL }
-               },
-               { &hf_tds_size,
-                       { "Size",           "tds.size",
-                       FT_UINT16, BASE_DEC, NULL, 0x0,
-                       "Packet Size", HFILL }
-               },
-               { &hf_tds_channel,
-                       { "Channel",        "tds.channel",
-                       FT_UINT16, BASE_DEC, NULL, 0x0,
-                       "Channel Number", HFILL }
-               },
-               { &hf_tds_packet_number,
-                       { "Packet Number",  "tds.packet_number",
-                       FT_UINT8, BASE_DEC, NULL, 0x0,
-                       NULL, HFILL }
-               },
-               { &hf_tds_window,
-                       { "Window",         "tds.window",
-                       FT_UINT8, BASE_DEC, NULL, 0x0,
-                       NULL, HFILL }
-               },
-               { &hf_tds_fragment_overlap,
-                       { "Segment overlap",    "tds.fragment.overlap",
-                       FT_BOOLEAN, BASE_NONE, NULL, 0x0,
-                       "Fragment overlaps with other fragments", HFILL }
-               },
-               { &hf_tds_fragment_overlap_conflict,
-                       { "Conflicting data in fragment overlap", "tds.fragment.overlap.conflict",
-                       FT_BOOLEAN, BASE_NONE, NULL, 0x0,
-                       "Overlapping fragments contained conflicting data", HFILL }
-               },
-               { &hf_tds_fragment_multiple_tails,
-                       { "Multiple tail fragments found", "tds.fragment.multipletails",
-                       FT_BOOLEAN, BASE_NONE, NULL, 0x0,
-                       "Several tails were found when defragmenting the packet", HFILL }
-               },
-               { &hf_tds_fragment_too_long_fragment,
-                       { "Segment too long",   "tds.fragment.toolongfragment",
-                       FT_BOOLEAN, BASE_NONE, NULL, 0x0,
-                       "Segment contained data past end of packet", HFILL }
-               },
-               { &hf_tds_fragment_error,
-                       { "Defragmentation error",      "tds.fragment.error",
-                       FT_FRAMENUM, BASE_NONE, NULL, 0x0,
-                       "Defragmentation error due to illegal fragments", HFILL }
-               },
-               { &hf_tds_fragment,
-                       { "TDS Fragment",       "tds.fragment",
-                       FT_FRAMENUM, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }
-               },
-               { &hf_tds_fragments,
-                       { "TDS Fragments",      "tds.fragments",
-                       FT_NONE, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }
-               },
-               { &hf_tds_reassembled_in,
-                       { "Reassembled TDS in frame", "tds.reassembled_in",
-                       FT_FRAMENUM, BASE_NONE, NULL, 0x0,
-                       "This TDS packet is reassembled in this frame", HFILL }
-               },
-               { &hf_tds_reassembled_length,
-                       { "Reassembled TDS length", "tds.reassembled.length",
-                       FT_UINT32, BASE_DEC, NULL, 0x0,
-                       "The total length of the reassembled payload", HFILL }
-               },
-               { &hf_tds7_login_total_size,
-                       { "Total Packet Length", "tds7login.total_len",
-                       FT_UINT32, BASE_DEC, NULL, 0x0,
-                       "TDS7 Login Packet total packet length", HFILL }
-               },
-               { &hf_tds7_version,
-                        { "TDS version", "tds7login.version",
-                        FT_UINT32, BASE_HEX, NULL, 0x0,
-                        NULL, HFILL }
-                },
-               { &hf_tds7_packet_size,
-                        { "Packet Size", "tds7login.packet_size",
-                        FT_UINT32, BASE_DEC, NULL, 0x0,
-                        "Packet size", HFILL }
-                },
-               { &hf_tds7_client_version,
-                        { "Client version", "tds7login.client_version",
-                        FT_UINT32, BASE_DEC, NULL, 0x0,
-                        NULL, HFILL }
-                },
-               { &hf_tds7_client_pid,
-                        { "Client PID", "tds7login.client_pid",
-                        FT_UINT32, BASE_DEC, NULL, 0x0,
-                        NULL, HFILL }
-                },
-               { &hf_tds7_connection_id,
-                        { "Connection ID", "tds7login.connection_id",
-                        FT_UINT32, BASE_DEC, NULL, 0x0,
-                        NULL, HFILL }
-                },
-               { &hf_tds7_option_flags1,
-                        { "Option Flags 1", "tds7login.option_flags1",
-                        FT_UINT8, BASE_HEX, NULL, 0x0,
-                        NULL, HFILL }
-                },
-               { &hf_tds7_option_flags2,
-                        { "Option Flags 2", "tds7login.option_flags2",
-                        FT_UINT8, BASE_HEX, NULL, 0x0,
-                        NULL, HFILL }
-                },
-               { &hf_tds7_sql_type_flags,
-                        { "SQL Type Flags", "tds7login.sql_type_flags",
-                        FT_UINT8, BASE_HEX, NULL, 0x0,
-                        NULL, HFILL }
-                },
-               { &hf_tds7_reserved_flags,
-                        { "Reserved Flags", "tds7login.reserved_flags",
-                        FT_UINT8, BASE_HEX, NULL, 0x0,
-                        "reserved flags", HFILL }
-                },
-               { &hf_tds7_time_zone,
-                        { "Time Zone", "tds7login.time_zone",
-                        FT_UINT32, BASE_HEX, NULL, 0x0,
-                        NULL, HFILL }
-                },
-               { &hf_tds7_collation,
-                        { "Collation", "tds7login.collation",
-                        FT_UINT32, BASE_HEX, NULL, 0x0,
-                        NULL, HFILL }
-                },
-               { &hf_tds7_message,
-                       { "Message", "tds7.message",
-                       FT_STRING, BASE_NONE, NULL, 0x0,
-                       NULL, HFILL }
-               },
-       };
-
-       static gint *ett[] = {
-               &ett_tds,
-               &ett_tds_fragments,
-               &ett_tds_fragment,
-               &ett_tds_token,
-               &ett_tds7_login,
-               &ett_tds7_hdr,
-       };
-       module_t *tds_module;
+    static hf_register_info hf[] = {
+        { &hf_tds_type,
+          { "Type",             "tds.type",
+            FT_UINT8, BASE_HEX, VALS(packet_type_names), 0x0,
+            "Packet Type", HFILL }
+        },
+        { &hf_tds_status,
+          { "Status",           "tds.status",
+            FT_UINT8, BASE_DEC, VALS(status_names), 0x0,
+            "Frame status", HFILL }
+        },
+        { &hf_tds_size,
+          { "Size",             "tds.size",
+            FT_UINT16, BASE_DEC, NULL, 0x0,
+            "Packet Size", HFILL }
+        },
+        { &hf_tds_channel,
+          { "Channel",          "tds.channel",
+            FT_UINT16, BASE_DEC, NULL, 0x0,
+            "Channel Number", HFILL }
+        },
+        { &hf_tds_packet_number,
+          { "Packet Number",    "tds.packet_number",
+            FT_UINT8, BASE_DEC, NULL, 0x0,
+            NULL, HFILL }
+        },
+        { &hf_tds_window,
+          { "Window",           "tds.window",
+            FT_UINT8, BASE_DEC, NULL, 0x0,
+            NULL, HFILL }
+        },
+        { &hf_tds_fragment_overlap,
+          { "Segment overlap",  "tds.fragment.overlap",
+            FT_BOOLEAN, BASE_NONE, NULL, 0x0,
+            "Fragment overlaps with other fragments", HFILL }
+        },
+        { &hf_tds_fragment_overlap_conflict,
+          { "Conflicting data in fragment overlap", "tds.fragment.overlap.conflict",
+            FT_BOOLEAN, BASE_NONE, NULL, 0x0,
+            "Overlapping fragments contained conflicting data", HFILL }
+        },
+        { &hf_tds_fragment_multiple_tails,
+          { "Multiple tail fragments found", "tds.fragment.multipletails",
+            FT_BOOLEAN, BASE_NONE, NULL, 0x0,
+            "Several tails were found when defragmenting the packet", HFILL }
+        },
+        { &hf_tds_fragment_too_long_fragment,
+          { "Segment too long", "tds.fragment.toolongfragment",
+            FT_BOOLEAN, BASE_NONE, NULL, 0x0,
+            "Segment contained data past end of packet", HFILL }
+        },
+        { &hf_tds_fragment_error,
+          { "Defragmentation error",    "tds.fragment.error",
+            FT_FRAMENUM, BASE_NONE, NULL, 0x0,
+            "Defragmentation error due to illegal fragments", HFILL }
+        },
+        { &hf_tds_fragment,
+          { "TDS Fragment",     "tds.fragment",
+            FT_FRAMENUM, BASE_NONE, NULL, 0x0,
+            NULL, HFILL }
+        },
+        { &hf_tds_fragments,
+          { "TDS Fragments",    "tds.fragments",
+            FT_NONE, BASE_NONE, NULL, 0x0,
+            NULL, HFILL }
+        },
+        { &hf_tds_reassembled_in,
+          { "Reassembled TDS in frame", "tds.reassembled_in",
+            FT_FRAMENUM, BASE_NONE, NULL, 0x0,
+            "This TDS packet is reassembled in this frame", HFILL }
+        },
+        { &hf_tds_reassembled_length,
+          { "Reassembled TDS length", "tds.reassembled.length",
+            FT_UINT32, BASE_DEC, NULL, 0x0,
+            "The total length of the reassembled payload", HFILL }
+        },
+        { &hf_tds7_login_total_size,
+          { "Total Packet Length", "tds7login.total_len",
+            FT_UINT32, BASE_DEC, NULL, 0x0,
+            "TDS7 Login Packet total packet length", HFILL }
+        },
+        { &hf_tds7_version,
+          { "TDS version", "tds7login.version",
+            FT_UINT32, BASE_HEX, NULL, 0x0,
+            NULL, HFILL }
+        },
+        { &hf_tds7_packet_size,
+          { "Packet Size", "tds7login.packet_size",
+            FT_UINT32, BASE_DEC, NULL, 0x0,
+            "Packet size", HFILL }
+        },
+        { &hf_tds7_client_version,
+          { "Client version", "tds7login.client_version",
+            FT_UINT32, BASE_DEC, NULL, 0x0,
+            NULL, HFILL }
+        },
+        { &hf_tds7_client_pid,
+          { "Client PID", "tds7login.client_pid",
+            FT_UINT32, BASE_DEC, NULL, 0x0,
+            NULL, HFILL }
+        },
+        { &hf_tds7_connection_id,
+          { "Connection ID", "tds7login.connection_id",
+            FT_UINT32, BASE_DEC, NULL, 0x0,
+            NULL, HFILL }
+        },
+        { &hf_tds7_option_flags1,
+          { "Option Flags 1", "tds7login.option_flags1",
+            FT_UINT8, BASE_HEX, NULL, 0x0,
+            NULL, HFILL }
+        },
+        { &hf_tds7_option_flags2,
+          { "Option Flags 2", "tds7login.option_flags2",
+            FT_UINT8, BASE_HEX, NULL, 0x0,
+            NULL, HFILL }
+        },
+        { &hf_tds7_sql_type_flags,
+          { "SQL Type Flags", "tds7login.sql_type_flags",
+            FT_UINT8, BASE_HEX, NULL, 0x0,
+            NULL, HFILL }
+        },
+        { &hf_tds7_reserved_flags,
+          { "Reserved Flags", "tds7login.reserved_flags",
+            FT_UINT8, BASE_HEX, NULL, 0x0,
+            "reserved flags", HFILL }
+        },
+        { &hf_tds7_time_zone,
+          { "Time Zone", "tds7login.time_zone",
+            FT_UINT32, BASE_HEX, NULL, 0x0,
+            NULL, HFILL }
+        },
+        { &hf_tds7_collation,
+          { "Collation", "tds7login.collation",
+            FT_UINT32, BASE_HEX, NULL, 0x0,
+            NULL, HFILL }
+        },
+        { &hf_tds7_message,
+          { "Message", "tds7.message",
+            FT_STRING, BASE_NONE, NULL, 0x0,
+            NULL, HFILL }
+        },
+    };
+
+    static gint *ett[] = {
+        &ett_tds,
+        &ett_tds_fragments,
+        &ett_tds_fragment,
+        &ett_tds_token,
+        &ett_tds7_login,
+        &ett_tds7_hdr,
+    };
+    module_t *tds_module;
 
 /* Register the protocol name and description */
-       proto_tds = proto_register_protocol("Tabular Data Stream",
-           "TDS", "tds");
+    proto_tds = proto_register_protocol("Tabular Data Stream",
+                                        "TDS", "tds");
 
 /* Required function calls to register the header fields and subtrees used */
-       proto_register_field_array(proto_tds, hf, array_length(hf));
-       proto_register_subtree_array(ett, array_length(ett));
+    proto_register_field_array(proto_tds, hf, array_length(hf));
+    proto_register_subtree_array(ett, array_length(ett));
 
 /* Allow dissector to be found by name. */
-       register_dissector("tds", dissect_tds_tcp, proto_tds);
-
-       tds_module = prefs_register_protocol(proto_tds, NULL);
-       prefs_register_bool_preference(tds_module, "desegment_buffers",
-           "Reassemble TDS buffers spanning multiple TCP segments",
-           "Whether the TDS dissector should reassemble TDS buffers spanning multiple TCP segments. "
-           "To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.",
-           &tds_desegment);
-       prefs_register_bool_preference(tds_module, "defragment",
-           "Reassemble fragmented TDS messages with multiple buffers",
-           "Whether the TDS dissector should defragment messages spanning multiple Netlib buffers",
-           &tds_defragment);
-       prefs_register_enum_preference(tds_module, "protocol_type",
-           "TDS Protocol Type",
-           "Hint as to version of TDS protocol being decoded",
-           &tds_protocol_type, tds_protocol_type_options, FALSE);
-       prefs_register_enum_preference(tds_module, "endian_type",
-           "TDS decode as",
-           "Hint as to whether to decode TDS protocol as little-endian or big-endian. (TDS7/8 always decoded as little-endian)",
-           &tds_little_endian, tds_endian_type_options, FALSE);
-       prefs_register_range_preference(tds_module, "tcp_ports",
-           "TDS TCP ports",
-           "Additional TCP ports to decode as TDS",
-           &tds_tcp_ports, 0xFFFF);
-
-       register_init_routine(tds_init);
+    register_dissector("tds", dissect_tds_tcp, proto_tds);
+
+    tds_module = prefs_register_protocol(proto_tds, NULL);
+    prefs_register_bool_preference(tds_module, "desegment_buffers",
+                                   "Reassemble TDS buffers spanning multiple TCP segments",
+                                   "Whether the TDS dissector should reassemble TDS buffers spanning multiple TCP segments. "
+                                   "To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.",
+                                   &tds_desegment);
+    prefs_register_bool_preference(tds_module, "defragment",
+                                   "Reassemble fragmented TDS messages with multiple buffers",
+                                   "Whether the TDS dissector should defragment messages spanning multiple Netlib buffers",
+                                   &tds_defragment);
+    prefs_register_enum_preference(tds_module, "protocol_type",
+                                   "TDS Protocol Type",
+                                   "Hint as to version of TDS protocol being decoded",
+                                   &tds_protocol_type, tds_protocol_type_options, FALSE);
+    prefs_register_enum_preference(tds_module, "endian_type",
+                                   "TDS decode as",
+                                   "Hint as to whether to decode TDS protocol as little-endian or big-endian. (TDS7/8 always decoded as little-endian)",
+                                   &tds_little_endian, tds_endian_type_options, FALSE);
+    prefs_register_range_preference(tds_module, "tcp_ports",
+                                    "TDS TCP ports",
+                                    "Additional TCP ports to decode as TDS",
+                                    &tds_tcp_ports, 0xFFFF);
+
+    register_init_routine(tds_init);
 }
 
 /* If this dissector uses sub-dissector registration add a registration routine.
@@ -2179,15 +2179,15 @@ proto_register_tds(void)
 void
 proto_reg_handoff_tds(void)
 {
-       tds_tcp_handle = create_dissector_handle(dissect_tds_tcp, proto_tds);
+    tds_tcp_handle = create_dissector_handle(dissect_tds_tcp, proto_tds);
 
-       /* Initial TDS ports: MS SQL default ports */
-       dissector_add("tcp.port", 1433, tds_tcp_handle);
-       dissector_add("tcp.port", 2433, tds_tcp_handle);
+    /* Initial TDS ports: MS SQL default ports */
+    dissector_add("tcp.port", 1433, tds_tcp_handle);
+    dissector_add("tcp.port", 2433, tds_tcp_handle);
 
-       heur_dissector_add("tcp", dissect_tds_tcp_heur, proto_tds);
+    heur_dissector_add("tcp", dissect_tds_tcp_heur, proto_tds);
 
-       ntlmssp_handle = find_dissector("ntlmssp");
-       gssapi_handle = find_dissector("gssapi");
-       data_handle = find_dissector("data");
+    ntlmssp_handle = find_dissector("ntlmssp");
+    gssapi_handle = find_dissector("gssapi");
+    data_handle = find_dissector("data");
 }
index 9a1b2c1388e410253562d5d9b73e18516314f756..f45ef54d75fddd11fa9e3384d1b0d451ab37c916 100644 (file)
@@ -6,7 +6,7 @@
  * By Paolo Abeni <paolo.abeni@email.it>
  * Ronnie Sahlberg 2006
  * Chris Maynard 2010 <chris[dot]maynard[at]gtech[dot]com>
- * 
+ *
  * http://www.usb.org/developers/docs/usb_20_122909-2.zip
  *
  * This program is free software; you can redistribute it and/or
@@ -292,24 +292,24 @@ static const value_string usb_langid_vals[] = {
 };
 
 static const value_string usb_interfaceclass_vals[] = {
-    {IF_CLASS_FROM_INTERFACE_DESC,     "Use class info in Interface Descriptor"},
-    {IF_CLASS_AUDIO,                   "AUDIO"},
-    {IF_CLASS_COMMUNICATIONS,          "COMMUNICATIONS"},
-    {IF_CLASS_HID,                     "HID"},
-    {IF_CLASS_PHYSICAL,                        "PHYSICAL"},
-    {IF_CLASS_IMAGE,                   "IMAGE"},
-    {IF_CLASS_PRINTER,                 "PRINTER"},
-    {IF_CLASS_MASSTORAGE,              "MASSTORAGE"},
-    {IF_CLASS_HUB,                     "HUB"},
-    {IF_CLASS_CDC_DATA,                        "CDC_DATA"},
-    {IF_CLASS_SMART_CARD,              "SMART_CARD"},
-    {IF_CLASS_CONTENT_SECURITY,                "CONTENT_SECURITY"},
-    {IF_CLASS_VIDEO,                   "VIDEO"},
-    {IF_CLASS_DIAGNOSTIC_DEVICE,       "DIAGNOSTIC_DEVICE"},
-    {IF_CLASS_WIRELESS_CONTROLLER,     "WIRELESS_CONTROLLER"},
-    {IF_CLASS_MISCELLANEOUS,           "MISCELLANEOUS"},
-    {IF_CLASS_APPLICATION_SPECIFIC,    "APPLICATION_SPECIFIC"},
-    {IF_CLASS_VENDOR_SPECIFIC,         "VENDOR_SPECIFIC"},
+    {IF_CLASS_FROM_INTERFACE_DESC,      "Use class info in Interface Descriptor"},
+    {IF_CLASS_AUDIO,                    "AUDIO"},
+    {IF_CLASS_COMMUNICATIONS,           "COMMUNICATIONS"},
+    {IF_CLASS_HID,                      "HID"},
+    {IF_CLASS_PHYSICAL,                 "PHYSICAL"},
+    {IF_CLASS_IMAGE,                    "IMAGE"},
+    {IF_CLASS_PRINTER,                  "PRINTER"},
+    {IF_CLASS_MASSTORAGE,               "MASSTORAGE"},
+    {IF_CLASS_HUB,                      "HUB"},
+    {IF_CLASS_CDC_DATA,                 "CDC_DATA"},
+    {IF_CLASS_SMART_CARD,               "SMART_CARD"},
+    {IF_CLASS_CONTENT_SECURITY,         "CONTENT_SECURITY"},
+    {IF_CLASS_VIDEO,                    "VIDEO"},
+    {IF_CLASS_DIAGNOSTIC_DEVICE,        "DIAGNOSTIC_DEVICE"},
+    {IF_CLASS_WIRELESS_CONTROLLER,      "WIRELESS_CONTROLLER"},
+    {IF_CLASS_MISCELLANEOUS,            "MISCELLANEOUS"},
+    {IF_CLASS_APPLICATION_SPECIFIC,     "APPLICATION_SPECIFIC"},
+    {IF_CLASS_VENDOR_SPECIFIC,          "VENDOR_SPECIFIC"},
     {0, NULL}
 };
 
@@ -355,210 +355,210 @@ static const value_string usb_urb_type_vals[] = {
 #define USB_DT_BOS                      15
 #define USB_DT_DEVICE_CAPABILITY        16
 #define USB_DT_WIRELESS_ENDPOINT_COMP   17
-#define USB_DT_HID                     33
+#define USB_DT_HID                      33
 #define USB_DT_RPIPE                    34
 
 static const value_string descriptor_type_vals[] = {
-    {USB_DT_DEVICE,                    "DEVICE"},
-    {USB_DT_CONFIG,                    "CONFIGURATION"},
-    {USB_DT_STRING,                    "STRING"},
-    {USB_DT_INTERFACE,                 "INTERFACE"},
-    {USB_DT_ENDPOINT,                  "ENDPOINT"},
-    {USB_DT_DEVICE_QUALIFIER,          "DEVICE QUALIFIER"},
-    {USB_DT_OTHER_SPEED_CONFIG,                "OTHER_SPEED CONFIG"},
-    {USB_DT_INTERFACE_POWER,           "INTERFACE POWER"},
-    {USB_DT_OTG,                       "OTG"},
-    {USB_DT_DEBUG,                     "DEBUG"},
-    {USB_DT_INTERFACE_ASSOCIATION,     "INTERFACE ASSOCIATION"},
-    {USB_DT_SECURITY,                  "SECURITY"},
-    {USB_DT_KEY,                       "KEY"},
-    {USB_DT_ENCRYPTION_TYPE,           "ENCRYPTION TYPE"},
-    {USB_DT_BOS,                       "BOS"},
-    {USB_DT_DEVICE_CAPABILITY,         "DEVICE CAPABILITY"},
-    {USB_DT_WIRELESS_ENDPOINT_COMP,    "WIRELESS ENDPOINT COMP"},
-    {USB_DT_HID,                       "HID"},
-    {USB_DT_RPIPE,                     "RPIPE"},
+    {USB_DT_DEVICE,                     "DEVICE"},
+    {USB_DT_CONFIG,                     "CONFIGURATION"},
+    {USB_DT_STRING,                     "STRING"},
+    {USB_DT_INTERFACE,                  "INTERFACE"},
+    {USB_DT_ENDPOINT,                   "ENDPOINT"},
+    {USB_DT_DEVICE_QUALIFIER,           "DEVICE QUALIFIER"},
+    {USB_DT_OTHER_SPEED_CONFIG,         "OTHER_SPEED CONFIG"},
+    {USB_DT_INTERFACE_POWER,            "INTERFACE POWER"},
+    {USB_DT_OTG,                        "OTG"},
+    {USB_DT_DEBUG,                      "DEBUG"},
+    {USB_DT_INTERFACE_ASSOCIATION,      "INTERFACE ASSOCIATION"},
+    {USB_DT_SECURITY,                   "SECURITY"},
+    {USB_DT_KEY,                        "KEY"},
+    {USB_DT_ENCRYPTION_TYPE,            "ENCRYPTION TYPE"},
+    {USB_DT_BOS,                        "BOS"},
+    {USB_DT_DEVICE_CAPABILITY,          "DEVICE CAPABILITY"},
+    {USB_DT_WIRELESS_ENDPOINT_COMP,     "WIRELESS ENDPOINT COMP"},
+    {USB_DT_HID,                        "HID"},
+    {USB_DT_RPIPE,                      "RPIPE"},
     {0,NULL}
 };
 
 /*
  * Feature selectors.
  */
-#define USB_FS_DEVICE_REMOTE_WAKEUP    1
-#define USB_FS_ENDPOINT_HALT           0
-#define USB_FS_TEST_MODE               2
+#define USB_FS_DEVICE_REMOTE_WAKEUP     1
+#define USB_FS_ENDPOINT_HALT            0
+#define USB_FS_TEST_MODE                2
 
 static const value_string usb_feature_selector_vals[] = {
-    {USB_FS_DEVICE_REMOTE_WAKEUP,      "DEVICE REMOTE WAKEUP"},
-    {USB_FS_ENDPOINT_HALT,             "ENDPOINT HALT"},
-    {USB_FS_TEST_MODE,                 "TEST MODE"},
+    {USB_FS_DEVICE_REMOTE_WAKEUP,       "DEVICE REMOTE WAKEUP"},
+    {USB_FS_ENDPOINT_HALT,              "ENDPOINT HALT"},
+    {USB_FS_TEST_MODE,                  "TEST MODE"},
     {0,NULL}
 };
 
 static const value_string usb_bmAttributes_transfer_vals[] = {
-    {0x00,     "Control-Transfer"},
-    {0x01,     "Isochronous-Transfer"},
-    {0x02,     "Bulk-Transfer"},
-    {0x03,     "Interrupt-Transfer"},
+    {0x00,      "Control-Transfer"},
+    {0x01,      "Isochronous-Transfer"},
+    {0x02,      "Bulk-Transfer"},
+    {0x03,      "Interrupt-Transfer"},
     {0,NULL}
 };
 
 static const value_string usb_bmAttributes_sync_vals[] = {
-    {0x00,     "No Sync"},
-    {0x04,     "Asynchronous"},
-    {0x08,     "Adaptive"},
-    {0x0c,     "Synchronous"},
+    {0x00,      "No Sync"},
+    {0x04,      "Asynchronous"},
+    {0x08,      "Adaptive"},
+    {0x0c,      "Synchronous"},
     {0,NULL}
 };
 
 static const value_string usb_bmAttributes_behaviour_vals[] = {
-    {0x00,     "Data-Endpoint"},
-    {0x10,     "Explicit Feedback-Endpoint"},
-    {0x20,     "Implicit Feedback-Data-Endpoint"},
-    {0x30,     "Reserved"},
+    {0x00,      "Data-Endpoint"},
+    {0x10,      "Explicit Feedback-Endpoint"},
+    {0x20,      "Implicit Feedback-Data-Endpoint"},
+    {0x30,      "Reserved"},
     {0,NULL}
 };
 
 /* from linux/include/asm-generic/errno.h */
-#define        EPERM            1      /* Operation not permitted */
-#define        ENOENT           2      /* No such file or directory */
-#define        ESRCH            3      /* No such process */
-#define        EINTR            4      /* Interrupted system call */
-#define        EIO              5      /* I/O error */
-#define        ENXIO            6      /* No such device or address */
-#define        E2BIG            7      /* Argument list too long */
-#define        ENOEXEC          8      /* Exec format error */
-#define        EBADF            9      /* Bad file number */
-#define        ECHILD          10      /* No child processes */
-#define        EAGAIN          11      /* Try again */
-#define        ENOMEM          12      /* Out of memory */
-#define        EACCES          13      /* Permission denied */
-#define        EFAULT          14      /* Bad address */
-#define        ENOTBLK         15      /* Block device required */
-#define        EBUSY           16      /* Device or resource busy */
-#define        EEXIST          17      /* File exists */
-#define        EXDEV           18      /* Cross-device link */
-#define        ENODEV          19      /* No such device */
-#define        ENOTDIR         20      /* Not a directory */
-#define        EISDIR          21      /* Is a directory */
-#define        EINVAL          22      /* Invalid argument */
-#define        ENFILE          23      /* File table overflow */
-#define        EMFILE          24      /* Too many open files */
-#define        ENOTTY          25      /* Not a typewriter */
-#define        ETXTBSY         26      /* Text file busy */
-#define        EFBIG           27      /* File too large */
-#define        ENOSPC          28      /* No space left on device */
-#define        ESPIPE          29      /* Illegal seek */
-#define        EROFS           30      /* Read-only file system */
-#define        EMLINK          31      /* Too many links */
-#define        EPIPE           32      /* Broken pipe */
-#define        EDOM            33      /* Math argument out of domain of func */
-#define        ERANGE          34      /* Math result not representable */
+#define EPERM            1      /* Operation not permitted */
+#define ENOENT           2      /* No such file or directory */
+#define ESRCH            3      /* No such process */
+#define EINTR            4      /* Interrupted system call */
+#define EIO              5      /* I/O error */
+#define ENXIO            6      /* No such device or address */
+#define E2BIG            7      /* Argument list too long */
+#define ENOEXEC          8      /* Exec format error */
+#define EBADF            9      /* Bad file number */
+#define ECHILD          10      /* No child processes */
+#define EAGAIN          11      /* Try again */
+#define ENOMEM          12      /* Out of memory */
+#define EACCES          13      /* Permission denied */
+#define EFAULT          14      /* Bad address */
+#define ENOTBLK         15      /* Block device required */
+#define EBUSY           16      /* Device or resource busy */
+#define EEXIST          17      /* File exists */
+#define EXDEV           18      /* Cross-device link */
+#define ENODEV          19      /* No such device */
+#define ENOTDIR         20      /* Not a directory */
+#define EISDIR          21      /* Is a directory */
+#define EINVAL          22      /* Invalid argument */
+#define ENFILE          23      /* File table overflow */
+#define EMFILE          24      /* Too many open files */
+#define ENOTTY          25      /* Not a typewriter */
+#define ETXTBSY         26      /* Text file busy */
+#define EFBIG           27      /* File too large */
+#define ENOSPC          28      /* No space left on device */
+#define ESPIPE          29      /* Illegal seek */
+#define EROFS           30      /* Read-only file system */
+#define EMLINK          31      /* Too many links */
+#define EPIPE           32      /* Broken pipe */
+#define EDOM            33      /* Math argument out of domain of func */
+#define ERANGE          34      /* Math result not representable */
 
 
 /* from linux/include/asm-generic/errno.h*/
-#define        EDEADLK         35      /* Resource deadlock would occur */
-#define        ENAMETOOLONG    36      /* File name too long */
-#define        ENOLCK          37      /* No record locks available */
-#define        ENOSYS          38      /* Function not implemented */
-#define        ENOTEMPTY       39      /* Directory not empty */
-#define        ELOOP           40      /* Too many symbolic links encountered */
-#define        EWOULDBLOCK     EAGAIN  /* Operation would block */
-#define        ENOMSG          42      /* No message of desired type */
-#define        EIDRM           43      /* Identifier removed */
-#define        ECHRNG          44      /* Channel number out of range */
-#define        EL2NSYNC        45      /* Level 2 not synchronized */
-#define        EL3HLT          46      /* Level 3 halted */
-#define        EL3RST          47      /* Level 3 reset */
-#define        ELNRNG          48      /* Link number out of range */
-#define        EUNATCH         49      /* Protocol driver not attached */
-#define        ENOCSI          50      /* No CSI structure available */
-#define        EL2HLT          51      /* Level 2 halted */
-#define        EBADE           52      /* Invalid exchange */
-#define        EBADR           53      /* Invalid request descriptor */
-#define        EXFULL          54      /* Exchange full */
-#define        ENOANO          55      /* No anode */
-#define        EBADRQC         56      /* Invalid request code */
-#define        EBADSLT         57      /* Invalid slot */
-
-#define        EDEADLOCK       EDEADLK
-
-#define        EBFONT          59      /* Bad font file format */
-#define        ENOSTR          60      /* Device not a stream */
-#define        ENODATA         61      /* No data available */
-#define        ETIME           62      /* Timer expired */
-#define        ENOSR           63      /* Out of streams resources */
-#define        ENONET          64      /* Machine is not on the network */
-#define        ENOPKG          65      /* Package not installed */
-#define        EREMOTE         66      /* Object is remote */
-#define        ENOLINK         67      /* Link has been severed */
-#define        EADV            68      /* Advertise error */
-#define        ESRMNT          69      /* Srmount error */
-#define        ECOMM           70      /* Communication error on send */
-#define        EPROTO          71      /* Protocol error */
-#define        EMULTIHOP       72      /* Multihop attempted */
-#define        EDOTDOT         73      /* RFS specific error */
-#define        EBADMSG         74      /* Not a data message */
-#define        EOVERFLOW       75      /* Value too large for defined data type */
-#define        ENOTUNIQ        76      /* Name not unique on network */
-#define        EBADFD          77      /* File descriptor in bad state */
-#define        EREMCHG         78      /* Remote address changed */
-#define        ELIBACC         79      /* Can not access a needed shared library */
-#define        ELIBBAD         80      /* Accessing a corrupted shared library */
-#define        ELIBSCN         81      /* .lib section in a.out corrupted */
-#define        ELIBMAX         82      /* Attempting to link in too many shared libraries */
-#define        ELIBEXEC        83      /* Cannot exec a shared library directly */
-#define        EILSEQ          84      /* Illegal byte sequence */
-#define        ERESTART        85      /* Interrupted system call should be restarted */
-#define        ESTRPIPE        86      /* Streams pipe error */
-#define        EUSERS          87      /* Too many users */
-#define        ENOTSOCK        88      /* Socket operation on non-socket */
-#define        EDESTADDRREQ    89      /* Destination address required */
-#define        EMSGSIZE        90      /* Message too long */
-#define        EPROTOTYPE      91      /* Protocol wrong type for socket */
-#define        ENOPROTOOPT     92      /* Protocol not available */
-#define        EPROTONOSUPPORT 93      /* Protocol not supported */
-#define        ESOCKTNOSUPPORT 94      /* Socket type not supported */
-#define        EOPNOTSUPP      95      /* Operation not supported on transport endpoint */
-#define        EPFNOSUPPORT    96      /* Protocol family not supported */
-#define        EAFNOSUPPORT    97      /* Address family not supported by protocol */
-#define        EADDRINUSE      98      /* Address already in use */
-#define        EADDRNOTAVAIL   99      /* Cannot assign requested address */
-#define        ENETDOWN        100     /* Network is down */
-#define        ENETUNREACH     101     /* Network is unreachable */
-#define        ENETRESET       102     /* Network dropped connection because of reset */
-#define        ECONNABORTED    103     /* Software caused connection abort */
-#define        ECONNRESET      104     /* Connection reset by peer */
-#define        ENOBUFS         105     /* No buffer space available */
-#define        EISCONN         106     /* Transport endpoint is already connected */
-#define        ENOTCONN        107     /* Transport endpoint is not connected */
-#define        ESHUTDOWN       108     /* Cannot send after transport endpoint shutdown */
-#define        ETOOMANYREFS    109     /* Too many references: cannot splice */
-#define        ETIMEDOUT       110     /* Connection timed out */
-#define        ECONNREFUSED    111     /* Connection refused */
-#define        EHOSTDOWN       112     /* Host is down */
-#define        EHOSTUNREACH    113     /* No route to host */
-#define        EALREADY        114     /* Operation already in progress */
-#define        EINPROGRESS     115     /* Operation now in progress */
-#define        ESTALE          116     /* Stale NFS file handle */
-#define        EUCLEAN         117     /* Structure needs cleaning */
-#define        ENOTNAM         118     /* Not a XENIX named type file */
-#define        ENAVAIL         119     /* No XENIX semaphores available */
-#define        EISNAM          120     /* Is a named type file */
-#define        EREMOTEIO       121     /* Remote I/O error */
-#define        EDQUOT          122     /* Quota exceeded */
-
-#define        ENOMEDIUM       123     /* No medium found */
-#define        EMEDIUMTYPE     124     /* Wrong medium type */
-#define        ECANCELED       125     /* Operation Canceled */
-#define        ENOKEY          126     /* Required key not available */
-#define        EKEYEXPIRED     127     /* Key has expired */
-#define        EKEYREVOKED     128     /* Key has been revoked */
-#define        EKEYREJECTED    129     /* Key was rejected by service */
+#define EDEADLK         35      /* Resource deadlock would occur */
+#define ENAMETOOLONG    36      /* File name too long */
+#define ENOLCK          37      /* No record locks available */
+#define ENOSYS          38      /* Function not implemented */
+#define ENOTEMPTY       39      /* Directory not empty */
+#define ELOOP           40      /* Too many symbolic links encountered */
+#define EWOULDBLOCK     EAGAIN  /* Operation would block */
+#define ENOMSG          42      /* No message of desired type */
+#define EIDRM           43      /* Identifier removed */
+#define ECHRNG          44      /* Channel number out of range */
+#define EL2NSYNC        45      /* Level 2 not synchronized */
+#define EL3HLT          46      /* Level 3 halted */
+#define EL3RST          47      /* Level 3 reset */
+#define ELNRNG          48      /* Link number out of range */
+#define EUNATCH         49      /* Protocol driver not attached */
+#define ENOCSI          50      /* No CSI structure available */
+#define EL2HLT          51      /* Level 2 halted */
+#define EBADE           52      /* Invalid exchange */
+#define EBADR           53      /* Invalid request descriptor */
+#define EXFULL          54      /* Exchange full */
+#define ENOANO          55      /* No anode */
+#define EBADRQC         56      /* Invalid request code */
+#define EBADSLT         57      /* Invalid slot */
+
+#define EDEADLOCK       EDEADLK
+
+#define EBFONT          59      /* Bad font file format */
+#define ENOSTR          60      /* Device not a stream */
+#define ENODATA         61      /* No data available */
+#define ETIME           62      /* Timer expired */
+#define ENOSR           63      /* Out of streams resources */
+#define ENONET          64      /* Machine is not on the network */
+#define ENOPKG          65      /* Package not installed */
+#define EREMOTE         66      /* Object is remote */
+#define ENOLINK         67      /* Link has been severed */
+#define EADV            68      /* Advertise error */
+#define ESRMNT          69      /* Srmount error */
+#define ECOMM           70      /* Communication error on send */
+#define EPROTO          71      /* Protocol error */
+#define EMULTIHOP       72      /* Multihop attempted */
+#define EDOTDOT         73      /* RFS specific error */
+#define EBADMSG         74      /* Not a data message */
+#define EOVERFLOW       75      /* Value too large for defined data type */
+#define ENOTUNIQ        76      /* Name not unique on network */
+#define EBADFD          77      /* File descriptor in bad state */
+#define EREMCHG         78      /* Remote address changed */
+#define ELIBACC         79      /* Can not access a needed shared library */
+#define ELIBBAD         80      /* Accessing a corrupted shared library */
+#define ELIBSCN         81      /* .lib section in a.out corrupted */
+#define ELIBMAX         82      /* Attempting to link in too many shared libraries */
+#define ELIBEXEC        83      /* Cannot exec a shared library directly */
+#define EILSEQ          84      /* Illegal byte sequence */
+#define ERESTART        85      /* Interrupted system call should be restarted */
+#define ESTRPIPE        86      /* Streams pipe error */
+#define EUSERS          87      /* Too many users */
+#define ENOTSOCK        88      /* Socket operation on non-socket */
+#define EDESTADDRREQ    89      /* Destination address required */
+#define EMSGSIZE        90      /* Message too long */
+#define EPROTOTYPE      91      /* Protocol wrong type for socket */
+#define ENOPROTOOPT     92      /* Protocol not available */
+#define EPROTONOSUPPORT 93      /* Protocol not supported */
+#define ESOCKTNOSUPPORT 94      /* Socket type not supported */
+#define EOPNOTSUPP      95      /* Operation not supported on transport endpoint */
+#define EPFNOSUPPORT    96      /* Protocol family not supported */
+#define EAFNOSUPPORT    97      /* Address family not supported by protocol */
+#define EADDRINUSE      98      /* Address already in use */
+#define EADDRNOTAVAIL   99      /* Cannot assign requested address */
+#define ENETDOWN        100     /* Network is down */
+#define ENETUNREACH     101     /* Network is unreachable */
+#define ENETRESET       102     /* Network dropped connection because of reset */
+#define ECONNABORTED    103     /* Software caused connection abort */
+#define ECONNRESET      104     /* Connection reset by peer */
+#define ENOBUFS         105     /* No buffer space available */
+#define EISCONN         106     /* Transport endpoint is already connected */
+#define ENOTCONN        107     /* Transport endpoint is not connected */
+#define ESHUTDOWN       108     /* Cannot send after transport endpoint shutdown */
+#define ETOOMANYREFS    109     /* Too many references: cannot splice */
+#define ETIMEDOUT       110     /* Connection timed out */
+#define ECONNREFUSED    111     /* Connection refused */
+#define EHOSTDOWN       112     /* Host is down */
+#define EHOSTUNREACH    113     /* No route to host */
+#define EALREADY        114     /* Operation already in progress */
+#define EINPROGRESS     115     /* Operation now in progress */
+#define ESTALE          116     /* Stale NFS file handle */
+#define EUCLEAN         117     /* Structure needs cleaning */
+#define ENOTNAM         118     /* Not a XENIX named type file */
+#define ENAVAIL         119     /* No XENIX semaphores available */
+#define EISNAM          120     /* Is a named type file */
+#define EREMOTEIO       121     /* Remote I/O error */
+#define EDQUOT          122     /* Quota exceeded */
+
+#define ENOMEDIUM       123     /* No medium found */
+#define EMEDIUMTYPE     124     /* Wrong medium type */
+#define ECANCELED       125     /* Operation Canceled */
+#define ENOKEY          126     /* Required key not available */
+#define EKEYEXPIRED     127     /* Key has expired */
+#define EKEYREVOKED     128     /* Key has been revoked */
+#define EKEYREJECTED    129     /* Key was rejected by service */
 
 /* for robust mutexes */
-#define        EOWNERDEAD      130     /* Owner died */
-#define        ENOTRECOVERABLE 131     /* State not recoverable */
+#define EOWNERDEAD      130     /* Owner died */
+#define ENOTRECOVERABLE 131     /* State not recoverable */
 
 
 static const value_string usb_urb_status_vals[] = {
@@ -1346,7 +1346,7 @@ static int
 dissect_usb_setup_get_descriptor_response(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset, usb_trans_info_t *usb_trans_info, usb_conv_info_t *usb_conv_info)
 {
     proto_item *item=NULL;
-       guint32 data_len;
+    guint32 data_len;
 
     if (check_col(pinfo->cinfo, COL_INFO)) {
         col_append_fstr(pinfo->cinfo, COL_INFO, " %s",
@@ -1373,16 +1373,16 @@ dissect_usb_setup_get_descriptor_response(packet_info *pinfo, proto_tree *tree,
         break;
     case USB_DT_RPIPE:
         if (usb_conv_info->interfaceClass == IF_CLASS_HID) {
-               offset=dissect_usb_hid_get_report_descriptor(pinfo, tree, tvb, offset, usb_trans_info, usb_conv_info);
-               break;
+                offset=dissect_usb_hid_get_report_descriptor(pinfo, tree, tvb, offset, usb_trans_info, usb_conv_info);
+                break;
         }
         /* else fall through as default/unknown */
     default:
         /* XXX dissect the descriptor coming back from the device */
         item=proto_tree_add_text(tree, tvb, offset, -1, "GET DESCRIPTOR data (unknown descriptor type)");
         tree=proto_item_add_subtree(item, ett_descriptor_device);
-               tvb_memcpy(tvb, (guint8 *)&data_len, offset, 4);
-               proto_tree_add_uint(tree, hf_usb_data, tvb, offset, 4, data_len);
+        tvb_memcpy(tvb, (guint8 *)&data_len, offset, 4);
+        proto_tree_add_uint(tree, hf_usb_data, tvb, offset, 4, data_len);
         offset += data_len;
         break;
     }
@@ -1637,58 +1637,58 @@ typedef struct _usb_setup_dissector_table_t {
     guint8 request;
     usb_setup_dissector dissector;
 } usb_setup_dissector_table_t;
-#define USB_SETUP_GET_STATUS           0
-#define USB_SETUP_CLEAR_FEATURE                1
-#define USB_SETUP_SET_FEATURE          2
-#define USB_SETUP_SET_ADDRESS          5
-#define USB_SETUP_GET_DESCRIPTOR       6
-#define USB_SETUP_SET_DESCRIPTOR       7
-#define USB_SETUP_GET_CONFIGURATION    8
-#define USB_SETUP_SET_CONFIGURATION    9
-#define USB_SETUP_GET_INTERFACE                10
-#define USB_SETUP_SET_INTERFACE                11
-#define USB_SETUP_SYNCH_FRAME          12
+#define USB_SETUP_GET_STATUS            0
+#define USB_SETUP_CLEAR_FEATURE         1
+#define USB_SETUP_SET_FEATURE           2
+#define USB_SETUP_SET_ADDRESS           5
+#define USB_SETUP_GET_DESCRIPTOR        6
+#define USB_SETUP_SET_DESCRIPTOR        7
+#define USB_SETUP_GET_CONFIGURATION     8
+#define USB_SETUP_SET_CONFIGURATION     9
+#define USB_SETUP_GET_INTERFACE         10
+#define USB_SETUP_SET_INTERFACE         11
+#define USB_SETUP_SYNCH_FRAME           12
 
 static const usb_setup_dissector_table_t setup_request_dissectors[] = {
-    {USB_SETUP_GET_STATUS,     dissect_usb_setup_get_status_request},
-    {USB_SETUP_CLEAR_FEATURE,  dissect_usb_setup_clear_feature_request},
-    {USB_SETUP_SET_FEATURE,    dissect_usb_setup_set_feature_request},
-    {USB_SETUP_SET_ADDRESS,    dissect_usb_setup_set_address_request},
-    {USB_SETUP_GET_DESCRIPTOR, dissect_usb_setup_get_descriptor_request},
+    {USB_SETUP_GET_STATUS,      dissect_usb_setup_get_status_request},
+    {USB_SETUP_CLEAR_FEATURE,   dissect_usb_setup_clear_feature_request},
+    {USB_SETUP_SET_FEATURE,     dissect_usb_setup_set_feature_request},
+    {USB_SETUP_SET_ADDRESS,     dissect_usb_setup_set_address_request},
+    {USB_SETUP_GET_DESCRIPTOR,  dissect_usb_setup_get_descriptor_request},
     {USB_SETUP_SET_CONFIGURATION, dissect_usb_setup_set_configuration_request},
-    {USB_SETUP_GET_INTERFACE,  dissect_usb_setup_get_interface_request},
-    {USB_SETUP_SET_INTERFACE,  dissect_usb_setup_set_interface_request},
-    {USB_SETUP_SYNCH_FRAME,    dissect_usb_setup_synch_frame_request},
+    {USB_SETUP_GET_INTERFACE,   dissect_usb_setup_get_interface_request},
+    {USB_SETUP_SET_INTERFACE,   dissect_usb_setup_set_interface_request},
+    {USB_SETUP_SYNCH_FRAME,     dissect_usb_setup_synch_frame_request},
     {0, NULL}
 };
 
 static const usb_setup_dissector_table_t setup_response_dissectors[] = {
-    {USB_SETUP_GET_STATUS,     dissect_usb_setup_get_status_response},
-    {USB_SETUP_CLEAR_FEATURE,  dissect_usb_setup_clear_feature_response},
-    {USB_SETUP_SET_FEATURE,    dissect_usb_setup_set_feature_response},
-    {USB_SETUP_SET_ADDRESS,    dissect_usb_setup_set_address_response},
-    {USB_SETUP_GET_DESCRIPTOR, dissect_usb_setup_get_descriptor_response},
+    {USB_SETUP_GET_STATUS,      dissect_usb_setup_get_status_response},
+    {USB_SETUP_CLEAR_FEATURE,   dissect_usb_setup_clear_feature_response},
+    {USB_SETUP_SET_FEATURE,     dissect_usb_setup_set_feature_response},
+    {USB_SETUP_SET_ADDRESS,     dissect_usb_setup_set_address_response},
+    {USB_SETUP_GET_DESCRIPTOR,  dissect_usb_setup_get_descriptor_response},
     {USB_SETUP_GET_CONFIGURATION, dissect_usb_setup_get_configuration_response},
     {USB_SETUP_SET_CONFIGURATION, dissect_usb_setup_set_configuration_response},
-    {USB_SETUP_GET_INTERFACE,  dissect_usb_setup_get_interface_response},
-    {USB_SETUP_SET_INTERFACE,  dissect_usb_setup_set_interface_response},
-    {USB_SETUP_SYNCH_FRAME,    dissect_usb_setup_synch_frame_response},
+    {USB_SETUP_GET_INTERFACE,   dissect_usb_setup_get_interface_response},
+    {USB_SETUP_SET_INTERFACE,   dissect_usb_setup_set_interface_response},
+    {USB_SETUP_SYNCH_FRAME,     dissect_usb_setup_synch_frame_response},
     {0, NULL}
 };
 
 /* bRequest values but only when bmRequestType.type == 0 (Device) */
 static const value_string setup_request_names_vals[] = {
-    {USB_SETUP_GET_STATUS,             "GET STATUS"},
-    {USB_SETUP_CLEAR_FEATURE,          "CLEAR FEATURE"},
-    {USB_SETUP_SET_FEATURE,            "SET FEATURE"},
-    {USB_SETUP_SET_ADDRESS,            "SET ADDRESS"},
-    {USB_SETUP_GET_DESCRIPTOR,         "GET DESCRIPTOR"},
-    {USB_SETUP_SET_DESCRIPTOR,         "SET DESCRIPTOR"},
-    {USB_SETUP_GET_CONFIGURATION,      "GET CONFIGURATION"},
-    {USB_SETUP_SET_CONFIGURATION,      "SET CONFIGURATION"},
-    {USB_SETUP_GET_INTERFACE,          "GET INTERFACE"},
-    {USB_SETUP_SET_INTERFACE,          "SET INTERFACE"},
-    {USB_SETUP_SYNCH_FRAME,            "SYNCH FRAME"},
+    {USB_SETUP_GET_STATUS,              "GET STATUS"},
+    {USB_SETUP_CLEAR_FEATURE,           "CLEAR FEATURE"},
+    {USB_SETUP_SET_FEATURE,             "SET FEATURE"},
+    {USB_SETUP_SET_ADDRESS,             "SET ADDRESS"},
+    {USB_SETUP_GET_DESCRIPTOR,          "GET DESCRIPTOR"},
+    {USB_SETUP_SET_DESCRIPTOR,          "SET DESCRIPTOR"},
+    {USB_SETUP_GET_CONFIGURATION,       "GET CONFIGURATION"},
+    {USB_SETUP_SET_CONFIGURATION,       "SET CONFIGURATION"},
+    {USB_SETUP_GET_INTERFACE,           "GET INTERFACE"},
+    {USB_SETUP_SET_INTERFACE,           "SET INTERFACE"},
+    {USB_SETUP_SYNCH_FRAME,             "SYNCH FRAME"},
     {0, NULL}
 };
 
@@ -1734,7 +1734,7 @@ dissect_usb_bmrequesttype(proto_tree *parent_tree, tvbuff_t *tvb, int offset,
 }
 
 /* Adds the Linux USB pseudo header fields to the tree.
- * NOTE: The multi-byte fields in this header (and only this header) are in 
+ * NOTE: The multi-byte fields in this header (and only this header) are in
  *       host-endian format so we can't use proto_tree_add_item() nor the
  *       tvb_get_xyz() routines and is the reason for the tvb_memcpy() and
  *       proto_tree_add_uint[64]() pairs below. */
@@ -1743,39 +1743,39 @@ dissect_linux_usb_pseudo_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
 {
     guint8 transfer_type;
     const gchar* val_str;
-       guint8 type, flag;
-       guint16 val16;
-       guint32 val32;
-       guint64 val64;
+    guint8 type, flag;
+    guint16 val16;
+    guint32 val32;
+    guint64 val64;
 
-       tvb_memcpy(tvb, (guint8 *)&val64, 0, 8);
+    tvb_memcpy(tvb, (guint8 *)&val64, 0, 8);
     proto_tree_add_uint64(tree, hf_usb_urb_id, tvb, 0, 8, val64);
 
     /* show the event type of this URB as string and as a character */
-       type = tvb_get_guint8(tvb, 8);
+    type = tvb_get_guint8(tvb, 8);
     val_str = val_to_str(type, usb_urb_type_vals, "Unknown %d");
     proto_tree_add_string_format_value(tree, hf_usb_urb_type, tvb, 8, 1,
         &type, "%s ('%c')", val_str, isprint(type) ? type : '.');
-    
-       proto_tree_add_item(tree, hf_usb_transfer_type, tvb, 9, 1, FALSE);
+
+    proto_tree_add_item(tree, hf_usb_transfer_type, tvb, 9, 1, FALSE);
 
     if (check_col(pinfo->cinfo, COL_INFO)) {
-               transfer_type = tvb_get_guint8(tvb, 9);
+        transfer_type = tvb_get_guint8(tvb, 9);
         col_append_str(pinfo->cinfo, COL_INFO,
-            val_to_str(transfer_type, usb_transfer_type_vals, "Unknown type %x"));
+                       val_to_str(transfer_type, usb_transfer_type_vals, "Unknown type %x"));
     }
 
     proto_tree_add_item(tree, hf_usb_endpoint_number, tvb, 10, 1, FALSE);
     proto_tree_add_item(tree, hf_usb_device_address, tvb, 11, 1, FALSE);
 
-       tvb_memcpy(tvb, (guint8 *)&val16, 12, 2);
+    tvb_memcpy(tvb, (guint8 *)&val16, 12, 2);
     proto_tree_add_uint(tree, hf_usb_bus_id, tvb, 12, 2, val16);
 
     /* Right after the pseudo header we always have
      * sizeof(struct usb_device_setup_hdr) bytes. The content of these
      * bytes only have meaning in case setup_flag == 0.
      */
-       flag = tvb_get_guint8(tvb, 14);
+    flag = tvb_get_guint8(tvb, 14);
     if (flag == 0) {
         proto_tree_add_string(tree, hf_usb_setup_flag, tvb, 14, 1, "relevant (0)");
     } else {
@@ -1783,7 +1783,7 @@ dissect_linux_usb_pseudo_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
             14, 1, &flag, "not relevant ('%c')", isprint(flag) ? flag: '.');
     }
 
-       flag = tvb_get_guint8(tvb, 15);
+    flag = tvb_get_guint8(tvb, 15);
     if (flag == 0) {
         proto_tree_add_string(tree, hf_usb_data_flag, tvb, 15, 1, "present (0)");
     } else {
@@ -1791,19 +1791,19 @@ dissect_linux_usb_pseudo_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
             15, 1, &flag, "not present ('%c')", isprint(flag) ? flag : '.');
     }
 
-       tvb_memcpy(tvb, (guint8 *)&val64, 16, 8);
+    tvb_memcpy(tvb, (guint8 *)&val64, 16, 8);
     proto_tree_add_uint64(tree, hf_usb_urb_ts_sec, tvb, 16, 8, val64);
-       
-       tvb_memcpy(tvb, (guint8 *)&val32, 24, 4);
+
+    tvb_memcpy(tvb, (guint8 *)&val32, 24, 4);
     proto_tree_add_uint(tree, hf_usb_urb_ts_usec, tvb, 24, 4, val32);
 
-       tvb_memcpy(tvb, (guint8 *)&val32, 28, 4);
+    tvb_memcpy(tvb, (guint8 *)&val32, 28, 4);
     proto_tree_add_int(tree, hf_usb_urb_status, tvb, 28, 4, val32);
 
-       tvb_memcpy(tvb, (guint8 *)&val32, 32, 4);
+    tvb_memcpy(tvb, (guint8 *)&val32, 32, 4);
     proto_tree_add_uint(tree, hf_usb_urb_len, tvb, 32, 4, val32);
 
-       tvb_memcpy(tvb, (guint8 *)&val32, 36, 4);
+    tvb_memcpy(tvb, (guint8 *)&val32, 36, 4);
     proto_tree_add_uint(tree, hf_usb_data_len, tvb, 36, 4, val32);
 }
 
@@ -1834,7 +1834,7 @@ dissect_linux_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent,
       tree = proto_item_add_subtree(ti, usb_hdr);
     }
 
-    dissect_linux_usb_pseudo_header(tvb, pinfo, tree);  
+    dissect_linux_usb_pseudo_header(tvb, pinfo, tree);
     is_request = (tvb_get_guint8(tvb, 8) == URB_SUBMIT) ? TRUE : FALSE;
     type = tvb_get_guint8(tvb, 9);
     endpoint = tvb_get_guint8(tvb, 10) & (~URB_TRANSFER_IN);
@@ -2023,7 +2023,7 @@ dissect_linux_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent,
                      * If this is padded (as is the case if the capture
                      * is done in memory-mapped mode), skip the padding;
                      * it's padded to a multiple of 64 bits *after* the
-                     * pseudo-header and setup header.  
+                     * pseudo-header and setup header.
                      */
                     if (padded)
                         offset += (64 - ((sizeof(struct linux_usb_phdr) + sizeof(struct usb_device_setup_hdr)) % 64)) % 64;
@@ -2520,13 +2520,13 @@ proto_register_usb(void)
     };
 
     static gint *usb_subtrees[] = {
-            &usb_hdr,
-            &usb_setup_hdr,
-            &ett_usb_setup_bmrequesttype,
-            &ett_descriptor_device,
-            &ett_configuration_bmAttributes,
-            &ett_configuration_bEndpointAddress,
-            &ett_endpoint_bmAttributes
+        &usb_hdr,
+        &usb_setup_hdr,
+        &ett_usb_setup_bmrequesttype,
+        &ett_descriptor_device,
+        &ett_configuration_bmAttributes,
+        &ett_configuration_bEndpointAddress,
+        &ett_endpoint_bmAttributes
     };