Replace ip_to_str((tvb_get_ptr(...)) with tvb_ip_to_str().
authormorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 14 Jan 2011 03:44:58 +0000 (03:44 +0000)
committermorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 14 Jan 2011 03:44:58 +0000 (03:44 +0000)
Replace ip6_to_str((tvb_get_ptr(...)) with tvb_ip6_to_str().

There's no need to pass the result of tvb_get_ptr() as the 'value' in
proto_tree_add_*(): just use proto_tree_add_item().

Replace some tvb_get_ptr()s with tvb_get_ephemeral_string()s.

Replace some memcpy()+tvb_get_ptr() with tvb_memcpy().

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

22 files changed:
epan/dissectors/packet-asap.c
epan/dissectors/packet-bootp.c
epan/dissectors/packet-cdp.c
epan/dissectors/packet-chdlc.c
epan/dissectors/packet-dcerpc-epm.c
epan/dissectors/packet-dhcp-failover.c
epan/dissectors/packet-dns.c
epan/dissectors/packet-enrp.c
epan/dissectors/packet-gtpv2.c
epan/dissectors/packet-iapp.c
epan/dissectors/packet-icmp.c
epan/dissectors/packet-icp.c
epan/dissectors/packet-igmp.c
epan/dissectors/packet-isakmp.c
epan/dissectors/packet-isis-lsp.c
epan/dissectors/packet-ismp.c
epan/dissectors/packet-lmp.c
epan/dissectors/packet-mip.c
epan/dissectors/packet-mpls-echo.c
epan/dissectors/packet-msdp.c
epan/dissectors/packet-nbns.c
epan/dissectors/packet-ospf.c

index daa641e4ca85886d8f37ad4888929fac98f2ae27..5545112425a29eb4338c76808820fd90b00499fb 100644 (file)
@@ -132,8 +132,7 @@ dissect_unknown_cause(tvbuff_t *cause_tvb, proto_tree *cause_tree, proto_item *c
   length            = tvb_get_ntohs(cause_tvb, CAUSE_LENGTH_OFFSET);
   cause_info_length = length - CAUSE_HEADER_LENGTH;
   if (cause_info_length > 0)
-    proto_tree_add_bytes(cause_tree, hf_cause_info, cause_tvb, CAUSE_INFO_OFFSET, cause_info_length,
-                         tvb_get_ptr(cause_tvb, CAUSE_INFO_OFFSET, cause_info_length));
+    proto_tree_add_item(cause_tree, hf_cause_info, cause_tvb, CAUSE_INFO_OFFSET, cause_info_length, ENC_NA);
   proto_item_append_text(cause_item, " (code %u and %u byte%s information)", code, cause_info_length, plurality(cause_info_length, "", "s"));
 }
 
@@ -254,7 +253,7 @@ static void
 dissect_ipv4_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item)
 {
   proto_tree_add_item(parameter_tree, hf_parameter_ipv4_address, parameter_tvb, IPV4_ADDRESS_OFFSET, IPV4_ADDRESS_LENGTH, ENC_BIG_ENDIAN);
-  proto_item_append_text(parameter_item, " (%s)", ip_to_str((const guint8 *)tvb_get_ptr(parameter_tvb, IPV4_ADDRESS_OFFSET, IPV4_ADDRESS_LENGTH)));
+  proto_item_append_text(parameter_item, " (%s)", tvb_ip_to_str(parameter_tvb, IPV4_ADDRESS_OFFSET));
 }
 
 #define IPV6_ADDRESS_LENGTH 16
@@ -264,7 +263,7 @@ static void
 dissect_ipv6_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item)
 {
   proto_tree_add_item(parameter_tree, hf_parameter_ipv6_address, parameter_tvb, IPV6_ADDRESS_OFFSET, IPV6_ADDRESS_LENGTH, ENC_BIG_ENDIAN);
-  proto_item_append_text(parameter_item, " (%s)", ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(parameter_tvb, IPV6_ADDRESS_OFFSET, IPV6_ADDRESS_LENGTH)));
+  proto_item_append_text(parameter_item, " (%s)", tvb_ip6_to_str(parameter_tvb, IPV6_ADDRESS_OFFSET));
 }
 
 #define DCCP_PORT_LENGTH         2
@@ -473,8 +472,7 @@ dissect_pool_member_selection_policy_parameter(tvbuff_t *parameter_tvb, proto_tr
   default:
     length = tvb_length(parameter_tvb) - POLICY_VALUE_OFFSET;
     if (length > 0) {
-      proto_tree_add_bytes(parameter_tree, hf_policy_value, parameter_tvb, POLICY_VALUE_OFFSET, length,
-                           tvb_get_ptr(parameter_tvb, POLICY_VALUE_OFFSET, length));
+      proto_tree_add_item(parameter_tree, hf_policy_value, parameter_tvb, POLICY_VALUE_OFFSET, length, ENC_NA);
     }
     break;
   }
index 99b30a944100d391678c0098984985215dbc05c4..42194b115cd8b67d6cbdb9b7aaed0fde5185c9a3 100644 (file)
@@ -992,8 +992,8 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, int voff,
                if (optlen == 8) {
                        /* one IP address pair */
                        proto_item_append_text(vti, " = %s/%s",
-                               ip_to_str(tvb_get_ptr(tvb, optoff, 4)),
-                               ip_to_str(tvb_get_ptr(tvb, optoff+4, 4)));
+                               tvb_ip_to_str(tvb, optoff),
+                               tvb_ip_to_str(tvb, optoff+4));
                } else {
                        /* > 1 IP address pair. Let's make a sub-tree */
                        for (i = optoff, optleft = optlen;
@@ -1004,8 +1004,8 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, int voff,
                                        break;
                                }
                                proto_tree_add_text(v_tree, tvb, i, 8, "IP Address/Mask: %s/%s",
-                                       ip_to_str(tvb_get_ptr(tvb, i, 4)),
-                                       ip_to_str(tvb_get_ptr(tvb, i+4, 4)));
+                                       tvb_ip_to_str(tvb, i),
+                                       tvb_ip_to_str(tvb, i+4));
                        }
                }
                break;
@@ -1014,8 +1014,8 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, int voff,
                if (optlen == 8) {
                        /* one IP address pair */
                        proto_item_append_text(vti, " = %s/%s",
-                               ip_to_str(tvb_get_ptr(tvb, optoff, 4)),
-                               ip_to_str(tvb_get_ptr(tvb, optoff+4, 4)));
+                               tvb_ip_to_str(tvb, optoff),
+                               tvb_ip_to_str(tvb, optoff+4));
                } else {
                        /* > 1 IP address pair. Let's make a sub-tree */
                        for (i = optoff, optleft = optlen; optleft > 0;
@@ -1027,8 +1027,8 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, int voff,
                                }
                                proto_tree_add_text(v_tree, tvb, i, 8,
                                        "Destination IP Address/Router: %s/%s",
-                                       ip_to_str(tvb_get_ptr(tvb, i, 4)),
-                                       ip_to_str(tvb_get_ptr(tvb, i+4, 4)));
+                                       tvb_ip_to_str(tvb, i),
+                                       tvb_ip_to_str(tvb, i+4));
                        }
                }
                break;
@@ -1371,7 +1371,7 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, int voff,
                                break;
                        }
                        proto_tree_add_text(v_tree, tvb, i, 4, "SLPDA Address: %s",
-                           ip_to_str(tvb_get_ptr(tvb, i, 4)));
+                           tvb_ip_to_str(tvb, i));
                }
                break;
 
@@ -1431,7 +1431,7 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, int voff,
                        if (optlen == 4) {
                                /* one IP address */
                                proto_item_append_text(vti, " = %s",
-                                       ip_to_str(tvb_get_ptr(tvb, optoff, 4)));
+                                       tvb_ip_to_str(tvb, optoff));
                        } else {
                                /* > 1 IP addresses. Let's make a sub-tree */
                                for (i = optoff, optleft = optlen; optleft > 0;
@@ -1442,7 +1442,7 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, int voff,
                                                break;
                                        }
                                        proto_tree_add_text(v_tree, tvb, i, 4, "IP Address: %s",
-                                               ip_to_str(tvb_get_ptr(tvb, i, 4)));
+                                               tvb_ip_to_str(tvb, i));
                                }
                        }
                }
@@ -1661,8 +1661,7 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, int voff,
                                        proto_item_append_text(vti, ".0");
                                proto_item_append_text(vti, "/%d", mask_width);
                        }
-                       proto_item_append_text(vti, "-%s",
-                           ip_to_str(tvb_get_ptr(tvb, optoff, 4)));
+                       proto_item_append_text(vti, "-%s", tvb_ip_to_str(tvb, optoff));
                        optoff += 4;
                }
                break;
@@ -1873,15 +1872,13 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, int voff,
                            " - length isn't 4");
                        break;
                }
-               proto_item_append_text(vti, " = %s",
-                       ip_to_str(tvb_get_ptr(tvb, optoff, 4)));
+               proto_item_append_text(vti, " = %s", tvb_ip_to_str(tvb, optoff));
                break;
 
        case ipv4_list:
                if (optlen == 4) {
                        /* one IP address */
-                       proto_item_append_text(vti, " = %s",
-                               ip_to_str(tvb_get_ptr(tvb, optoff, 4)));
+                       proto_item_append_text(vti, " = %s", tvb_ip_to_str(tvb, optoff));
                } else {
                        /* > 1 IP addresses. Let's make a sub-tree */
                        for (i = optoff, optleft = optlen; optleft > 0;
@@ -1892,7 +1889,7 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, int voff,
                                        break;
                                }
                                proto_tree_add_text(v_tree, tvb, i, 4, "IP Address: %s",
-                                       ip_to_str(tvb_get_ptr(tvb, i, 4)));
+                                       tvb_ip_to_str(tvb, i));
                        }
                }
                break;
@@ -2080,7 +2077,7 @@ bootp_dhcp_decode_agent_info(proto_tree *v_tree, tvbuff_t *tvb, int optoff,
        case 5: /* 5   Link selection Sub-option              [RFC3527] */
                proto_tree_add_text(v_tree, tvb, optoff, subopt_len + 2,
                                    "Link selection: %s",
-                                       ip_to_str(tvb_get_ptr(tvb, suboptoff, subopt_len)));
+                                    tvb_ip_to_str(tvb, suboptoff));
                break;
 
        case 6: /*Subscriber-ID Suboption                [RFC3993] */
@@ -2175,7 +2172,7 @@ bootp_dhcp_decode_agent_info(proto_tree *v_tree, tvbuff_t *tvb, int optoff,
                if (subopt_len == 4) {
                        proto_tree_add_text(v_tree, tvb, optoff, subopt_len + 2,
                                "Server ID Override: %s",
-                               ip_to_str(tvb_get_ptr(tvb, suboptoff, 4)));
+                               tvb_ip_to_str(tvb, suboptoff));
                } else {
                        proto_tree_add_text(v_tree, tvb, optoff, subopt_len + 2,
                                "Server ID Override: Invalid length (%d instead of 4)",
@@ -2283,7 +2280,7 @@ dissect_vendor_pxeclient_suboption(proto_tree *v_tree, tvbuff_t *tvb,
                                proto_tree_add_text(v_tree, tvb, optoff, 6,
                                    "Suboption %d : %s = %s",
                                    subopt, o43pxeclient_opt[subopt].text,
-                                   ip_to_str(tvb_get_ptr(tvb, suboptoff, 4)));
+                                   tvb_ip_to_str(tvb, suboptoff));
                        } else {
                                /* > 1 IP addresses. Let's make a sub-tree */
                                vti = proto_tree_add_text(v_tree, tvb, optoff,
@@ -2300,7 +2297,7 @@ dissect_vendor_pxeclient_suboption(proto_tree *v_tree, tvbuff_t *tvb,
                                        }
                                        proto_tree_add_text(o43pxeclient_v_tree,
                                            tvb, suboptoff, 4, "IP Address: %s",
-                                           ip_to_str(tvb_get_ptr(tvb, suboptoff, 4)));
+                                           tvb_ip_to_str(tvb, suboptoff));
                                }
                        }
                        break;
@@ -2723,7 +2720,7 @@ dissect_vendor_alcatel_suboption(proto_tree *v_tree, tvbuff_t *tvb,
                vti = proto_tree_add_text(v_tree, tvb, optoff, subopt_len+2,
                    "Alcatel-Lucent-Specific Suboption %d: %s = %s",
                    subopt, "Spatial Redundancy TFTP1",
-                   ip_to_str(tvb_get_ptr(tvb, optoff+2, 4)));
+                   tvb_ip_to_str(tvb, optoff+2));
                subtree = proto_item_add_subtree(vti, ett_bootp_option);
                proto_tree_add_ipv4(subtree, hf_bootp_alu_tftp1, tvb, optoff+2, 4,
                        tvb_get_ipv4(tvb, optoff+2));
@@ -2736,7 +2733,7 @@ dissect_vendor_alcatel_suboption(proto_tree *v_tree, tvbuff_t *tvb,
                vti = proto_tree_add_text(v_tree, tvb, optoff, subopt_len+2,
                    "Alcatel-Lucent-Specific Suboption %d: %s = %s",
                    subopt, "Spatial Redundancy TFTP2",
-                   ip_to_str(tvb_get_ptr(tvb, optoff+2, 4)));
+                   tvb_ip_to_str(tvb, optoff+2));
                subtree = proto_item_add_subtree(vti, ett_bootp_option);
                proto_tree_add_ipv4(subtree, hf_bootp_alu_tftp2, tvb, optoff+2, 4,
                        tvb_get_ipv4(tvb, optoff+2));
@@ -2840,7 +2837,7 @@ dissect_netware_ip_suboption(proto_tree *v_tree, tvbuff_t *tvb,
                        proto_tree_add_text(v_tree, tvb, optoff, 6,
                            "Suboption %d: %s = %s" ,
                            subopt, o63_opt[subopt].text,
-                           ip_to_str(tvb_get_ptr(tvb, suboptoff, 4)));
+                           tvb_ip_to_str(tvb, suboptoff));
                        break;
 
                case ipv4_list:
@@ -2849,7 +2846,7 @@ dissect_netware_ip_suboption(proto_tree *v_tree, tvbuff_t *tvb,
                                proto_tree_add_text(v_tree, tvb, optoff, 6,
                                    "Suboption %d : %s = %s",
                                    subopt, o63_opt[subopt].text,
-                                   ip_to_str(tvb_get_ptr(tvb, suboptoff, 4)));
+                                   tvb_ip_to_str(tvb, suboptoff));
                        } else {
                                /* > 1 IP addresses. Let's make a sub-tree */
                                vti = proto_tree_add_text(v_tree, tvb, optoff,
@@ -2865,7 +2862,7 @@ dissect_netware_ip_suboption(proto_tree *v_tree, tvbuff_t *tvb,
                                                break;
                                        }
                                        proto_tree_add_text(o63_v_tree, tvb, suboptoff, 4, "IP Address: %s",
-                                           ip_to_str(tvb_get_ptr(tvb, suboptoff, 4)));
+                                           tvb_ip_to_str(tvb, suboptoff));
                                }
                        }
                        break;
@@ -3071,7 +3068,7 @@ dissect_vendor_cl_suboption(proto_tree *v_tree, tvbuff_t *tvb,
                                subtree = proto_item_add_subtree(ti, ett_bootp_option);
                                for (i = 0; i < subopt_len; i+=4) {
                                                proto_tree_add_text(subtree, tvb, suboptoff+i, 4, "IP Address: %s",
-                                                       ip_to_str(tvb_get_ptr(tvb, (suboptoff+i), 4)));
+                                                       tvb_ip_to_str(tvb, (suboptoff+i)));
                                }
                        }
                        break;
index 407b52c267eb8798671f69e5f0f7f49acb799539..007a3194277806451ec016f3d8728ae0e46c941b 100644 (file)
@@ -83,7 +83,7 @@ dissect_address_tlv(tvbuff_t *tvb, int offset, int length, proto_tree *tree);
 static void
 dissect_capabilities(tvbuff_t *tvb, int offset, int length, proto_tree *tree);
 static void
-dissect_nrgyz_tlv(tvbuff_t *tvb, int offset, guint16 length, guint16 num, 
+dissect_nrgyz_tlv(tvbuff_t *tvb, int offset, guint16 length, guint16 num,
   proto_tree *tree);
 static void
 add_multi_line_string_to_tree(proto_tree *tree, tvbuff_t *tvb, gint start,
@@ -209,7 +209,7 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
     /* Checksum display & verification code */
     packet_checksum = tvb_get_ntohs(tvb, offset);
-    
+
     data_length = tvb_reported_length(tvb);
 
     /* CDP doesn't adhere to RFC 1071 section 2. (B). It incorrectly assumes
@@ -260,7 +260,7 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
         packet_checksum,
         in_cksum_shouldbe(packet_checksum, computed_checksum));
     }
-    
+
     checksum_tree = proto_item_add_subtree(checksum_item, ett_cdp_checksum);
     checksum_item = proto_tree_add_boolean(checksum_tree, hf_cdp_checksum_good,
                                           tvb, offset, 2, checksum_good);
@@ -268,9 +268,9 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     checksum_item = proto_tree_add_boolean(checksum_tree, hf_cdp_checksum_bad,
                                           tvb, offset, 2, checksum_bad);
     PROTO_ITEM_SET_GENERATED(checksum_item);
-    
+
     offset += 2;
-    
+
     while (tvb_reported_length_remaining(tvb, offset) != 0) {
       type = tvb_get_ntohs(tvb, offset + TLV_TYPE);
       length = tvb_get_ntohs(tvb, offset + TLV_LENGTH);
@@ -325,7 +325,7 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                  tvb_format_stringzpad(tvb, offset + 4,
                                        length - 4));
 
-       if (tree) { 
+       if (tree) {
          tlvi = proto_tree_add_text(cdp_tree, tvb, offset,
                                     real_length, "Port ID: %s",
                                     tvb_format_text(tvb, offset + 4, real_length - 4));
@@ -362,12 +362,12 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
            break;
          offset += addr_length;
          length -= addr_length;
-               
+
          naddresses--;
        }
        offset += length;
        break;
-             
+
       case TYPE_CAPABILITIES:
        if (tree) {
          tlvi = proto_tree_add_text(cdp_tree, tvb, offset,
@@ -381,7 +381,7 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        dissect_capabilities(tvb, offset, length, tlv_tree);
        offset += length;
        break;
-             
+
       case TYPE_IOS_VERSION:
        if (tree) {
          tlvi = proto_tree_add_text(cdp_tree, tvb, offset,
@@ -415,16 +415,16 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
          if (tree) {
            tlvi = proto_tree_add_text(cdp_tree, tvb, offset,
                                       length, "ODR Default gateway: %s",
-                                      ip_to_str(tvb_get_ptr(tvb, offset+4, 4)));
+                                      tvb_ip_to_str(tvb, offset+4));
            tlv_tree = proto_item_add_subtree(tlvi, ett_cdp_tlv);
                proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, FALSE);
            proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, FALSE);
            proto_tree_add_text(tlv_tree, tvb, offset+4, 4,
                                "ODR Default gateway = %s",
-                               ip_to_str(tvb_get_ptr(tvb, offset+4, 4)));
+                               tvb_ip_to_str(tvb, offset+4));
          }
          offset += 8;
-       } else {  
+       } else {
          if (tree) {
            tlvi = proto_tree_add_text(cdp_tree, tvb, offset,
                                       length, "IP Prefixes: %d",length/5);
@@ -443,7 +443,7 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
            if (tree) {
              proto_tree_add_text(tlv_tree, tvb, offset, 5,
                                  "IP Prefix = %s/%u",
-                                 ip_to_str(tvb_get_ptr(tvb, offset, 4)),
+                                 tvb_ip_to_str(tvb, offset),
                                  tvb_get_guint8(tvb,offset+4));
            }
            offset += 5;
@@ -566,7 +566,7 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
       case TYPE_VOIP_VLAN_REPLY:
        if (tree) {
          if (length >= 7) {
-           tlvi = proto_tree_add_text(cdp_tree, tvb, offset, length, 
+           tlvi = proto_tree_add_text(cdp_tree, tvb, offset, length,
                                       "VoIP VLAN Reply: %u", tvb_get_ntohs(tvb, offset + 5));
          } else {
            /*
@@ -736,12 +736,12 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
            break;
          offset += addr_length;
          length -= addr_length;
-               
+
          naddresses--;
        }
        offset += length;
        break;
-             
+
       case TYPE_LOCATION:
        if (tree) {
          tlvi = proto_tree_add_text(cdp_tree, tvb,
@@ -759,7 +759,7 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        }
        offset += length;
        break;
-             
+
       case TYPE_POWER_REQUESTED:
        if (tree) {
          tlvi = proto_tree_add_text(cdp_tree, tvb,
@@ -801,7 +801,7 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
          }
        }
        break;
-             
+
       case TYPE_POWER_AVAILABLE:
        if (tree) {
          tlvi = proto_tree_add_text(cdp_tree, tvb,
@@ -1001,7 +1001,7 @@ dissect_address_tlv(tvbuff_t *tvb, int offset, int length, proto_tree *tree)
             if (address_length == 4) {
                 /* The address is an IP address. */
                 address_type_str = "IP address";
-                address_str = ip_to_str(tvb_get_ptr(tvb, offset, 4));
+                address_str = tvb_ip_to_str(tvb, offset);
             }
             break;
         }
@@ -1062,7 +1062,7 @@ dissect_capabilities(tvbuff_t *tvb, int offset, int length, proto_tree *tree)
 
 static void
 dissect_nrgyz_tlv(tvbuff_t *tvb, int offset, guint16 length, guint16 num,
-                 proto_tree *tree) 
+                 proto_tree *tree)
 {
     guint32 tlvt, tlvl, ip_addr;
     proto_item *it = NULL;
@@ -1202,11 +1202,11 @@ proto_register_cdp(void)
        { &hf_cdp_checksum_good,
          { "Good",       "cdp.checksum_good", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
            "True: checksum matches packet content; False: doesn't match content or not checked", HFILL }},
-       
+
        { &hf_cdp_checksum_bad,
          { "Bad",       "cdp.checksum_bad", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
            "True: checksum doesn't match packet content; False: matches content or not checked", HFILL }},
-       
+
        { &hf_cdp_tlvtype,
        { "Type",               "cdp.tlv.type", FT_UINT16, BASE_HEX, VALS(type_vals), 0x0,
          NULL, HFILL }},
@@ -1215,15 +1215,15 @@ proto_register_cdp(void)
        { "Length",             "cdp.tlv.len", FT_UINT16, BASE_DEC, NULL, 0x0,
          NULL, HFILL }},
 
-       { &hf_cdp_deviceid, 
+       { &hf_cdp_deviceid,
        {"Device ID", "cdp.deviceid", FT_STRING, BASE_NONE,
         NULL, 0, NULL, HFILL }},
 
-       { &hf_cdp_platform, 
+       { &hf_cdp_platform,
        {"Platform", "cdp.platform", FT_STRING, BASE_NONE,
         NULL, 0, NULL, HFILL }},
 
-       { &hf_cdp_portid, 
+       { &hf_cdp_portid,
        {"Sent through Interface", "cdp.portid", FT_STRING, BASE_NONE,
                NULL, 0, NULL, HFILL }}
     };
index 61d8a8856a48ab379de2a5f669f30a958dea78fd..f4bccf2c552a2958d7372f728ad87eb6a3234849 100644 (file)
@@ -288,14 +288,13 @@ dissect_slarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        addr = tvb_get_ipv4(tvb, 4);
        col_add_fstr(pinfo->cinfo, COL_INFO, "%s, from %s, mask %s",
                     val_to_str(code, slarp_ptype_vals, "Unknown (%d)"),
-                    get_hostname(addr),
-        ip_to_str(tvb_get_ptr(tvb, 8, 4)));
+                    get_hostname(addr), tvb_ip_to_str(tvb, 8));
     }
     if (tree) {
       proto_tree_add_uint(slarp_tree, hf_slarp_ptype, tvb, 0, 4, code);
       proto_tree_add_item(slarp_tree, hf_slarp_address, tvb, 4, 4, FALSE);
       proto_tree_add_text(slarp_tree, tvb, 8, 4,
-                         "Netmask: %s", ip_to_str(tvb_get_ptr(tvb, 8, 4)));
+                         "Netmask: %s", tvb_ip_to_str(tvb, 8));
     }
     break;
 
index ab3812f27d9cb131a05dd552564a624aaaeedc2c..772a04086a962da2d5205f8b98e9c8cb11a21327 100644 (file)
@@ -420,7 +420,7 @@ epm_dissect_tower_data (tvbuff_t *tvb, int offset,
 
         case PROTO_ID_IP: /* this one is always big endian */
             proto_tree_add_item(tr, hf_epm_proto_ip, tvb, offset, 4, FALSE);
-            proto_item_append_text(tr, "IP:%s", ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+            proto_item_append_text(tr, "IP:%s", tvb_ip_to_str(tvb, offset));
             break;
 
         case PROTO_ID_RPC_CO:
index f7191f6087509109c1a02aa15f26a64ca9160aee..6f155f6ef2086a0f3d694b00f02321b86ed2331c 100644 (file)
@@ -524,8 +524,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                                    "assigned ip address is not 4 bytes long");
                                break;
                        }
-                       assigned_ip_address_str = ip_to_str(
-                           tvb_get_ptr(tvb, offset, 4));
+                       assigned_ip_address_str = tvb_ip_to_str(tvb, offset);
 
                        proto_item_append_text(oi, ", %s ",
                            assigned_ip_address_str);
@@ -542,7 +541,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                                    "sending server ip address is not 4 bytes long");
                                break;
                        }
-                       sending_server_ip_address_str = ip_to_str(tvb_get_ptr(tvb,offset,option_length));
+                       sending_server_ip_address_str = tvb_ip_to_str(tvb, offset);
 
                        proto_item_append_text(oi, ", %s ",
                            sending_server_ip_address_str);
@@ -588,8 +587,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                                break;
                        }
                        htype = tvb_get_guint8(tvb, offset);
-                       chaddr = tvb_get_ptr(tvb, offset+1,
-                           option_length-1);
+                       chaddr = tvb_get_ptr(tvb, offset+1, option_length-1);
                        htype_str = arphrdtype_to_str(htype, "Unknown (0x%02x)");
                        chaddr_str = arphrdaddr_to_str(chaddr, option_length-1,
                            htype);
index 00b71a29dd81d25b5384563dd322320dbcb49582..8df311ee6123e4e01d853033a2bd6b7ebaf1e63b 100644 (file)
@@ -1261,14 +1261,14 @@ dissect_dns_answer(tvbuff_t *tvb, int offsetx, int dns_data_offset,
 
   case T_A:
     {
-      const guint8 *addr;
+      const char *addr;
       guint32 addr_int;
 
-      addr = tvb_get_ptr(tvb, cur_offset, 4);
+      addr = tvb_ip_to_str(tvb, cur_offset);
       if (cinfo != NULL)
-       col_append_fstr(cinfo, COL_INFO, " %s", ip_to_str(addr));
+       col_append_fstr(cinfo, COL_INFO, " %s", addr);
 
-       proto_item_append_text(trr, ", addr %s", ip_to_str(addr));
+       proto_item_append_text(trr, ", addr %s", addr);
        proto_tree_add_item(rr_tree, hf_dns_rr_addr, tvb, cur_offset, 4, FALSE);
 
       if ((class & 0x7f) == C_IN) {
@@ -1388,7 +1388,7 @@ dissect_dns_answer(tvbuff_t *tvb, int offsetx, int dns_data_offset,
   case T_WKS:
     {
       int rr_len = data_len;
-      const guint8 *wks_addr;
+      const char *wks_addr;
       guint8 protocol;
       guint8 bits;
       int mask;
@@ -1401,13 +1401,12 @@ dissect_dns_answer(tvbuff_t *tvb, int offsetx, int dns_data_offset,
          goto bad_rr;
        break;
       }
-      wks_addr = tvb_get_ptr(tvb, cur_offset, 4);
+      wks_addr = tvb_ip_to_str(tvb, cur_offset);
       if (cinfo != NULL)
-       col_append_fstr(cinfo, COL_INFO, " %s", ip_to_str(wks_addr));
+       col_append_fstr(cinfo, COL_INFO, " %s", wks_addr);
 
-       proto_item_append_text(trr, ", addr %s", ip_to_str(wks_addr));
-       proto_tree_add_text(rr_tree, tvb, cur_offset, 4, "Addr: %s",
-                    ip_to_str(wks_addr));
+       proto_item_append_text(trr, ", addr %s", wks_addr);
+       proto_tree_add_text(rr_tree, tvb, cur_offset, 4, "Addr: %s", wks_addr);
        cur_offset += 4;
        rr_len -= 4;
 
@@ -1463,17 +1462,17 @@ dissect_dns_answer(tvbuff_t *tvb, int offsetx, int dns_data_offset,
     {
       int cpu_offset;
       int cpu_len;
-      const guint8 *cpu;
+      const char *cpu;
       int os_offset;
       int os_len;
-      const guint8 *os;
+      const char *os;
 
       cpu_offset = cur_offset;
       cpu_len = tvb_get_guint8(tvb, cpu_offset);
-      cpu = tvb_get_ptr(tvb, cpu_offset + 1, cpu_len);
+      cpu = tvb_get_ephemeral_string(tvb, cpu_offset + 1, cpu_len);
       os_offset = cpu_offset + 1 + cpu_len;
       os_len = tvb_get_guint8(tvb, os_offset);
-      os = tvb_get_ptr(tvb, os_offset + 1, os_len);
+      os = tvb_get_ephemeral_string(tvb, os_offset + 1, os_len);
       if (cinfo != NULL)
        col_append_fstr(cinfo, COL_INFO, " %.*s %.*s", cpu_len, cpu,
            os_len, os);
@@ -1522,7 +1521,7 @@ dissect_dns_answer(tvbuff_t *tvb, int offsetx, int dns_data_offset,
        while (rr_len != 0) {
          txt_len = tvb_get_guint8(tvb, txt_offset);
          proto_tree_add_text(rr_tree, tvb, txt_offset, 1 + txt_len,
-          "Text: %.*s", txt_len, tvb_get_ptr(tvb, txt_offset + 1, txt_len));
+          "Text: %.*s", txt_len, tvb_get_ephemeral_string(tvb, txt_offset + 1, txt_len));
          txt_offset += 1 + txt_len;
          rr_len -= 1 + txt_len;
        }
@@ -1743,7 +1742,6 @@ dissect_dns_answer(tvbuff_t *tvb, int offsetx, int dns_data_offset,
     {
       int rr_len = data_len;
       guint8 gw_type, algo;
-      const guint8 *addr;
       const guchar *gw;
       int gw_name_len;
       static const value_string gw_algo[] = {
@@ -1776,17 +1774,15 @@ dissect_dns_answer(tvbuff_t *tvb, int offsetx, int dns_data_offset,
             proto_tree_add_text(rr_tree, tvb, cur_offset, 0, "Gateway: no gateway");
             break;
           case 1:
-            addr = tvb_get_ptr(tvb, cur_offset, 4);
             proto_tree_add_text(rr_tree, tvb, cur_offset, 4, "Gateway: %s",
-                                ip_to_str(addr) );
+                                tvb_ip_to_str(tvb, cur_offset) );
 
             cur_offset += 4;
             rr_len -= 4;
             break;
           case 2:
-            addr = tvb_get_ptr(tvb, cur_offset, 16);
             proto_tree_add_text(rr_tree, tvb, cur_offset, 16, "Gateway: %s",
-                                ip6_to_str((const struct e_in6_addr *)addr));
+                                tvb_ip6_to_str(tvb, cur_offset));
 
             cur_offset += 16;
             rr_len -= 16;
@@ -1812,22 +1808,19 @@ dissect_dns_answer(tvbuff_t *tvb, int offsetx, int dns_data_offset,
 
   case T_AAAA:
     {
-      const guint8 *addr6;
+      const char *addr6;
       struct e_in6_addr addr_in6;
 
-      addr6 = tvb_get_ptr(tvb, cur_offset, 16);
+      addr6 = tvb_ip6_to_str(tvb, cur_offset);
       if (cinfo != NULL) {
-       col_append_fstr(cinfo, COL_INFO, " %s",
-                       ip6_to_str((const struct e_in6_addr *)addr6));
+       col_append_fstr(cinfo, COL_INFO, " %s", addr6);
       }
 
-       proto_item_append_text(trr, ", addr %s",
-                    ip6_to_str((const struct e_in6_addr *)addr6));
-       proto_tree_add_text(rr_tree, tvb, cur_offset, 16, "Addr: %s",
-                    ip6_to_str((const struct e_in6_addr *)addr6));
+       proto_item_append_text(trr, ", addr %s", addr6);
+       proto_tree_add_text(rr_tree, tvb, cur_offset, 16, "Addr: %s", addr6);
 
       if ((class & 0x7f) == C_IN) {
-       memcpy(&addr_in6, addr6, sizeof(addr_in6));
+       tvb_memcpy(tvb, &addr_in6, cur_offset, sizeof(addr_in6));
        add_ipv6_name(&addr_in6, name);
       }
     }
@@ -2473,7 +2466,7 @@ dissect_dns_answer(tvbuff_t *tvb, int offsetx, int dns_data_offset,
            goto bad_rr;
 
            proto_tree_add_text(rr_tree, tvb, cur_offset, 4, "WINS server address: %s",
-                    ip_to_str(tvb_get_ptr(tvb, cur_offset, 4)));
+                    tvb_ip_to_str(tvb, cur_offset));
 
          cur_offset += 4;
          rr_len -= 4;
@@ -2814,15 +2807,15 @@ dissect_dns_answer(tvbuff_t *tvb, int offsetx, int dns_data_offset,
         if (data_len < 1)
            goto bad_rr;
         long_len = tvb_get_guint8(tvb, cur_offset);
-        proto_tree_add_text(rr_tree, tvb, cur_offset + 1, long_len, "Longitude: %.*s", long_len, tvb_get_ptr(tvb, cur_offset +1 , long_len));
+        proto_tree_add_text(rr_tree, tvb, cur_offset + 1, long_len, "Longitude: %.*s", long_len, tvb_get_ephemeral_string(tvb, cur_offset +1 , long_len));
         cur_offset += 1 + long_len;
 
         lat_len = tvb_get_guint8(tvb, cur_offset);
-        proto_tree_add_text(rr_tree, tvb, cur_offset + 1, lat_len, "Latitude: %.*s", lat_len, tvb_get_ptr(tvb, cur_offset + 1, lat_len));
+        proto_tree_add_text(rr_tree, tvb, cur_offset + 1, lat_len, "Latitude: %.*s", lat_len, tvb_get_ephemeral_string(tvb, cur_offset + 1, lat_len));
         cur_offset += 1 + lat_len;
 
         alt_len = tvb_get_guint8(tvb, cur_offset);
-        proto_tree_add_text(rr_tree, tvb, cur_offset + 1, alt_len, "Altitude: %.*s", alt_len, tvb_get_ptr(tvb, cur_offset + 1, alt_len));
+        proto_tree_add_text(rr_tree, tvb, cur_offset + 1, alt_len, "Altitude: %.*s", alt_len, tvb_get_ephemeral_string(tvb, cur_offset + 1, alt_len));
       }
     break;
 
@@ -2874,7 +2867,7 @@ dissect_dns_answer(tvbuff_t *tvb, int offsetx, int dns_data_offset,
         if (data_len < 1)
            goto bad_rr;
         x25_len = tvb_get_guint8(tvb, cur_offset);
-        proto_tree_add_text(rr_tree, tvb, cur_offset, x25_len + 1, "PSDN-Address: %.*s", x25_len, tvb_get_ptr(tvb, cur_offset +1, x25_len));
+        proto_tree_add_text(rr_tree, tvb, cur_offset, x25_len + 1, "PSDN-Address: %.*s", x25_len, tvb_get_ephemeral_string(tvb, cur_offset +1, x25_len));
       }
     break;
 
@@ -2888,13 +2881,13 @@ dissect_dns_answer(tvbuff_t *tvb, int offsetx, int dns_data_offset,
         if (rr_len < 1)
            goto bad_rr;
         isdn_address_len = tvb_get_guint8(tvb, cur_offset);
-        proto_tree_add_text(rr_tree, tvb, cur_offset, isdn_address_len + 1, "ISDN Address: %.*s", isdn_address_len, tvb_get_ptr(tvb, cur_offset +1, isdn_address_len));
+        proto_tree_add_text(rr_tree, tvb, cur_offset, isdn_address_len + 1, "ISDN Address: %.*s", isdn_address_len, tvb_get_ephemeral_string(tvb, cur_offset +1, isdn_address_len));
         cur_offset += 1 + isdn_address_len;
         rr_len -= 1 + isdn_address_len;
 
         if (rr_len > 1)   /* ISDN SA is optional */ {
            isdn_sa_len = tvb_get_guint8(tvb, cur_offset);
-           proto_tree_add_text(rr_tree, tvb, cur_offset, isdn_sa_len + 1, "Subaddress: %.*s", isdn_sa_len, tvb_get_ptr(tvb, cur_offset +1, isdn_sa_len));
+           proto_tree_add_text(rr_tree, tvb, cur_offset, isdn_sa_len + 1, "Subaddress: %.*s", isdn_sa_len, tvb_get_ephemeral_string(tvb, cur_offset +1, isdn_sa_len));
         }
       }
     break;
index 6db79be9464ea1e62eaa5d488a9ceb937a02bd7d..84c4f175b98de93fa56a8b339e4c0de7de4b2173 100644 (file)
@@ -138,8 +138,7 @@ dissect_unknown_cause(tvbuff_t *cause_tvb, proto_tree *cause_tree, proto_item *c
   length            = tvb_get_ntohs(cause_tvb, CAUSE_LENGTH_OFFSET);
   cause_info_length = length - CAUSE_HEADER_LENGTH;
   if (cause_info_length > 0)
-    proto_tree_add_bytes(cause_tree, hf_cause_info, cause_tvb, CAUSE_INFO_OFFSET, cause_info_length,
-                         tvb_get_ptr(cause_tvb, CAUSE_INFO_OFFSET, cause_info_length));
+    proto_tree_add_item(cause_tree, hf_cause_info, cause_tvb, CAUSE_INFO_OFFSET, cause_info_length, ENC_NA);
   proto_item_append_text(cause_item, " (code %u and %u byte%s information)", code, cause_info_length, plurality(cause_info_length, "", "s"));
 }
 
@@ -259,7 +258,7 @@ static void
 dissect_ipv4_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item)
 {
   proto_tree_add_item(parameter_tree, hf_parameter_ipv4_address, parameter_tvb, IPV4_ADDRESS_OFFSET, IPV4_ADDRESS_LENGTH, ENC_BIG_ENDIAN);
-  proto_item_append_text(parameter_item, " (%s)", ip_to_str((const guint8 *)tvb_get_ptr(parameter_tvb, IPV4_ADDRESS_OFFSET, IPV4_ADDRESS_LENGTH)));
+  proto_item_append_text(parameter_item, " (%s)", tvb_ip_to_str(parameter_tvb, IPV4_ADDRESS_OFFSET));
 }
 
 #define IPV6_ADDRESS_LENGTH 16
@@ -269,7 +268,7 @@ static void
 dissect_ipv6_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item)
 {
   proto_tree_add_item(parameter_tree, hf_parameter_ipv6_address, parameter_tvb, IPV6_ADDRESS_OFFSET, IPV6_ADDRESS_LENGTH, ENC_BIG_ENDIAN);
-  proto_item_append_text(parameter_item, " (%s)", ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(parameter_tvb, IPV6_ADDRESS_OFFSET, IPV6_ADDRESS_LENGTH)));
+  proto_item_append_text(parameter_item, " (%s)", tvb_ip6_to_str(parameter_tvb, IPV6_ADDRESS_OFFSET));
 }
 
 #define DCCP_PORT_LENGTH         2
@@ -478,8 +477,7 @@ dissect_pool_member_selection_policy_parameter(tvbuff_t *parameter_tvb, proto_tr
   default:
     length = tvb_length(parameter_tvb) - POLICY_VALUE_OFFSET;
     if (length > 0) {
-      proto_tree_add_bytes(parameter_tree, hf_policy_value, parameter_tvb, POLICY_VALUE_OFFSET, length,
-                           tvb_get_ptr(parameter_tvb, POLICY_VALUE_OFFSET, length));
+      proto_tree_add_item(parameter_tree, hf_policy_value, parameter_tvb, POLICY_VALUE_OFFSET, length, ENC_NA);
     }
     break;
   }
index c354b45a1c939cac26c2608783aa1ee1fe1d2586..486da067030714ffcab9b8dcee4c28a40847d923 100644 (file)
@@ -861,10 +861,10 @@ dissect_gtpv2_recovery(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
 
 /*
  * 8.6 Access Point Name (APN)
- * The encoding the APN field follows 3GPP TS 23.003 [2] subclause 9.1. 
+ * The encoding the APN field follows 3GPP TS 23.003 [2] subclause 9.1.
  * The content of the APN field shall be the full APN with both the APN Network Identifier
- * and APN Operator Identifier being present as specified in 3GPP TS 23.003 [2] 
- * subclauses 9.1.1 and 9.1.2, 3GPP TS 23.060 [35] Annex A and 3GPP TS 23.401 [3] subclauses 4.3.8.1. 
+ * and APN Operator Identifier being present as specified in 3GPP TS 23.003 [2]
+ * subclauses 9.1.1 and 9.1.2, 3GPP TS 23.060 [35] Annex A and 3GPP TS 23.401 [3] subclauses 4.3.8.1.
  */
 static void
 dissect_gtpv2_apn(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length _U_,guint8 message_type _U_,  guint8 instance _U_)
@@ -939,7 +939,7 @@ dissect_gtpv2_ip_address(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree
     if (length==4)
     {
         proto_tree_add_item(tree, hf_gtpv2_ip_address_ipv4, tvb, offset, length, FALSE);
-               proto_item_append_text(item, "IPv4 %s", ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+               proto_item_append_text(item, "IPv4 %s", tvb_ip_to_str(tvb, offset));
     }
     else if (length==16)
     {
@@ -1091,7 +1091,7 @@ dissect_gtpv2_paa(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto
     case 2:
         /* IPv6*/
                /* If PDN type value indicates IPv6, octet 6 contains the IPv6 Prefix Length.
-                * Octets 7 through 22 contain an IPv6 Prefix and Interface Identifier. 
+                * Octets 7 through 22 contain an IPv6 Prefix and Interface Identifier.
                 * Bit 8 of octet 7 represents the most significant bit of the IPv6 Prefix
                 * and Interface Identifier and bit 1 of octet 22 the least significant bit.
                 */
@@ -1102,12 +1102,12 @@ dissect_gtpv2_paa(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto
         break;
     case 3:
         /* IPv4/IPv6 */
-               /* If PDN type value indicates IPv4v6, octet 6 contains the IPv6 Prefix Length. 
-                * Octets 7 through 22 contain an IPv6 Prefix and Interface Identifier. 
-                * Bit 8 of octet 7 represents the most significant bit of the IPv6 Prefix 
-                * and Interface Identifier and bit 1 of octet 22 the least significant bit. 
-                * Octets 23 through 26 contain an IPv4 address. Bit 8 of octet 23 represents 
-                * the most significant bit of the IPv4 address and bit 1 of octet 26 the least 
+               /* If PDN type value indicates IPv4v6, octet 6 contains the IPv6 Prefix Length.
+                * Octets 7 through 22 contain an IPv6 Prefix and Interface Identifier.
+                * Bit 8 of octet 7 represents the most significant bit of the IPv6 Prefix
+                * and Interface Identifier and bit 1 of octet 22 the least significant bit.
+                * Octets 23 through 26 contain an IPv4 address. Bit 8 of octet 23 represents
+                * the most significant bit of the IPv4 address and bit 1 of octet 26 the least
                 * significant bit.
                 */
         proto_tree_add_item(tree, hf_gtpv2_pdn_ipv6_len, tvb, offset, 1, FALSE);
@@ -1332,7 +1332,7 @@ decode_gtpv2_uli(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_
         octet4 = tvb_get_ntohl(tvb,offset);
         ECGI = octet4 & 0x0FFFFFFF;
         proto_tree_add_uint(part_tree, hf_gtpv2_uli_ecgi_eci_spare, tvb, offset, 1, spare);
-               /* The coding of the E-UTRAN cell identifier is the responsibility of each administration. 
+               /* The coding of the E-UTRAN cell identifier is the responsibility of each administration.
                 * Coding using full hexadecimal representation shall be used.
                 */
         proto_tree_add_uint(part_tree, hf_gtpv2_uli_ecgi_eci, tvb, offset, 4, ECGI);
@@ -1352,14 +1352,14 @@ decode_gtpv2_uli(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_
         offset+=3;
 
                /* The Location Area Code (LAC) consists of 2 octets. Bit 8 of Octet f+3 is the most significant bit
-                * and bit 1 of Octet f+4 the least significant bit. The coding of the location area code is the 
+                * and bit 1 of Octet f+4 the least significant bit. The coding of the location area code is the
                 * responsibility of each administration. Coding using full hexadecimal representation shall be used.
                 */
                proto_tree_add_item(part_tree, hf_gtpv2_uli_lai_lac, tvb, offset, 2, FALSE);
                offset+=2;
 
        }
-       
+
 }
 
 static void
@@ -1503,7 +1503,7 @@ dissect_gtpv2_f_teid(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, pr
     int offset = 0;
     guint8       flags;
 
-       flags = tvb_get_guint8(tvb, offset);
+    flags = tvb_get_guint8(tvb, offset);
     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);
@@ -1517,15 +1517,13 @@ dissect_gtpv2_f_teid(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, pr
     if (flags&0x80)
     {
         proto_tree_add_item(tree, hf_gtpv2_f_teid_ipv4, tvb, offset, 4, FALSE);
-               proto_item_append_text(item, ", IPv4 %s", ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+       proto_item_append_text(item, ", IPv4 %s", tvb_ip_to_str(tvb, offset));
         offset= offset+4;
     }
     if (flags&0x40)
     {
-               struct e_in6_addr ipv6_addr;
-        proto_tree_add_item(tree, hf_gtpv2_f_teid_ipv6, tvb, offset, 16, FALSE);
-               tvb_get_ipv6(tvb, offset, &ipv6_addr);
-               proto_item_append_text(item, ", IPv6 %s", ip6_to_str(&ipv6_addr));
+       proto_tree_add_item(tree, hf_gtpv2_f_teid_ipv6, tvb, offset, 16, FALSE);
+       proto_item_append_text(item, ", IPv6 %s", tvb_ip6_to_str(tvb, offset));
         offset= offset+16;
     }
 }
@@ -2065,7 +2063,7 @@ static void
 dissect_gtpv2_drx_param(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint16 length, guint8 message_type _U_, guint8 instance _U_)
 {
        int     offset = 0;
-       
+
        /* 36.413 : 9.2.1.17    Paging Cause, void */
   proto_tree_add_text(tree, tvb, offset, length, "DRX parameter: %s", tvb_bytes_to_str(tvb, offset, (length )));
 }
index 9e531f9e52e6d597d7fabc2bdacae639b4511eae..ec7b1b0342d910a6b3c7231be1e21d2dbd40d5ef 100644 (file)
@@ -236,8 +236,7 @@ append_authval_str(proto_item *ti, int type, int len, tvbuff_t *tvb, int offset)
                        proto_item_append_text(ti, "%d seconds", val);
                        break;
                case IAPP_AUTH_IPADDR:
-                       proto_item_append_text(ti, "%s",
-                               ip_to_str(tvb_get_ptr(tvb, offset + 3, 4)));
+                       proto_item_append_text(ti, "%s", tvb_ip_to_str(tvb, offset + 3));
                        break;
                case IAPP_AUTH_TRAILER:
                        for (z = 0; z < len; z++)
index cca525b987f377dee002467b9571e01289685565..105550a5b121d3139baf6354877e8c0b27c7db58 100644 (file)
@@ -881,8 +881,7 @@ dissect_icmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
         if (addr_entry_size == 2) {
          for (i = 0; i < num_addrs; i++) {
            proto_tree_add_text(icmp_tree, tvb, 8 + (i*8), 4,
-             "Router address: %s",
-             ip_to_str(tvb_get_ptr(tvb, 8 + (i*8), 4)));
+             "Router address: %s", tvb_ip_to_str(tvb, 8 + (i*8)));
            proto_tree_add_text(icmp_tree, tvb, 12 + (i*8), 4,
              "Preference level: %d", tvb_get_ntohl(tvb, 12 + (i*8)));
          }
@@ -908,7 +907,7 @@ dissect_icmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     case ICMP_MASKREQ:
     case ICMP_MASKREPLY:
        proto_tree_add_text(icmp_tree, tvb, 8, 4, "Address mask: %s (0x%08x)",
-         ip_to_str(tvb_get_ptr(tvb, 8, 4)), tvb_get_ntohl(tvb, 8));
+         tvb_ip_to_str(tvb, 8), tvb_get_ntohl(tvb, 8));
        break;
   }
 }
index fb6c3af06e48448fa4770a533aba49016d0a5fb4..8ee58571d46cdd4fef4df82ea756ff1b2799ae81 100644 (file)
@@ -93,13 +93,13 @@ static void dissect_icp_payload(tvbuff_t *tvb, int offset,
                /* 4 byte requester host address */
                proto_tree_add_text(pload_tree, tvb,offset,4,
                        "Requester Host Address %s",
-                       ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+                       tvb_ip_to_str(tvb, offset));
                offset += 4;
 
                /* null terminated URL */
                stringlength = tvb_strsize(tvb, offset);
                proto_tree_add_text(pload_tree, tvb, offset, stringlength,
-                       "URL: %s", tvb_get_ptr(tvb, offset, stringlength));
+                       "URL: %s", tvb_get_ephemeral_string(tvb, offset, stringlength));
                break;
 
        case CODE_ICP_OP_SECHO:
@@ -111,14 +111,14 @@ static void dissect_icp_payload(tvbuff_t *tvb, int offset,
        case CODE_ICP_OP_DENIED:
                stringlength = tvb_strsize(tvb, offset);
                proto_tree_add_text(pload_tree, tvb, offset, stringlength,
-                       "URL: %s", tvb_get_ptr(tvb, offset, stringlength));
+                       "URL: %s", tvb_get_ephemeral_string(tvb, offset, stringlength));
                break;
 
        case CODE_ICP_OP_HIT_OBJ:
                /* null terminated URL */
                stringlength = tvb_strsize(tvb, offset);
                proto_tree_add_text(pload_tree, tvb, offset, stringlength,
-                       "URL: %s", tvb_get_ptr(tvb, offset, stringlength));
+                       "URL: %s", tvb_get_ephemeral_string(tvb, offset, stringlength));
                offset += stringlength;
 
                /* 2 byte object size */
@@ -200,7 +200,7 @@ static void dissect_icp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
        proto_tree_add_text(icp_tree, tvb, 16, 4,
                        "Sender Host IP address %s",
-                       ip_to_str(tvb_get_ptr(tvb, 16, 4)));
+                       tvb_ip_to_str(tvb, 16));
 
         payloadtf = proto_tree_add_text(icp_tree, tvb,
                         20, message_length - 20,
index 853154a8334d6d44ea2d496125b47f04a4b5d013..10efe311f3194f965396df2cca8222e6d6c27179 100644 (file)
@@ -1,4 +1,4 @@
-/* packet-igmp.c   
+/* packet-igmp.c
  * Routines for IGMP packet disassembly
  * 2001 Ronnie Sahlberg
  * 2007 Thomas Morin
@@ -502,12 +502,12 @@ dissect_v3_group_record(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tr
                case IGMP_V3_MODE_IS_INCLUDE:
                case IGMP_V3_CHANGE_TO_INCLUDE_MODE:
                    col_append_fstr(pinfo->cinfo, COL_INFO, " / Leave group %s",
-                                   ip_to_str((guint8*)&maddr) ); 
+                                   ip_to_str((guint8*)&maddr) );
                    break;
               case IGMP_V3_MODE_IS_EXCLUDE:
                case IGMP_V3_CHANGE_TO_EXCLUDE_MODE:
                    col_append_fstr(pinfo->cinfo, COL_INFO, " / Join group %s for any sources",
-                                   ip_to_str((guint8*)&maddr) ); 
+                                   ip_to_str((guint8*)&maddr) );
                    break;
                case IGMP_V3_ALLOW_NEW_SOURCES:
                    col_append_fstr(pinfo->cinfo, COL_INFO, " / Group %s, ALLOW_NEW_SOURCES but no source specified (?)",
@@ -527,23 +527,23 @@ dissect_v3_group_record(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tr
                case IGMP_V3_CHANGE_TO_INCLUDE_MODE:
                    col_append_fstr(pinfo->cinfo, COL_INFO, " / Join group %s for source%s {",
                                    ip_to_str((guint8*)&maddr),
-                                   (num>1) ? "s in" : "" ); 
+                                   (num>1) ? "s in" : "" );
                    break;
               case IGMP_V3_MODE_IS_EXCLUDE:
                case IGMP_V3_CHANGE_TO_EXCLUDE_MODE:
                    col_append_fstr(pinfo->cinfo, COL_INFO, " / Join group %s, for source%s {",
                                    ip_to_str((guint8*)&maddr),
-                                   (num>1) ? "s not in" : " not" ); 
+                                   (num>1) ? "s not in" : " not" );
                    break;
                case IGMP_V3_ALLOW_NEW_SOURCES:
                    col_append_fstr(pinfo->cinfo, COL_INFO, " / Group %s, new source%s {",
-                                   ip_to_str((guint8*)&maddr), 
-                                   (num>1) ? "s" : "" ); 
+                                   ip_to_str((guint8*)&maddr),
+                                   (num>1) ? "s" : "" );
                    break;
                case IGMP_V3_BLOCK_OLD_SOURCES:
                    col_append_fstr(pinfo->cinfo, COL_INFO, " / Group %s, block source%s {",
                                    ip_to_str((guint8*)&maddr),
-                                   (num>1) ? "s" : "" ); 
+                                   (num>1) ? "s" : "" );
                    break;
                default:
                    col_append_fstr(pinfo->cinfo, COL_INFO, " / Group %s, unknown record type (?), sources {",
@@ -556,7 +556,7 @@ dissect_v3_group_record(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tr
        while(num--){
                 if (check_col(pinfo->cinfo, COL_INFO)) {
                    col_append_fstr(pinfo->cinfo, COL_INFO, "%s%s",
-                                         ip_to_str(tvb_get_ptr(tvb, offset, 4)),
+                                         tvb_ip_to_str(tvb, offset),
                                          (num?", ":"}")
                                   );
                 }
@@ -595,9 +595,9 @@ dissect_igmp_v3_report(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int
 
        /* number of group records */
        num = tvb_get_ntohs(tvb, offset);
-       if (check_col(pinfo->cinfo, COL_INFO)) {                        
+       if (check_col(pinfo->cinfo, COL_INFO)) {
           if (!num) {
-              col_append_fstr(pinfo->cinfo, COL_INFO, " - General query" ); 
+              col_append_fstr(pinfo->cinfo, COL_INFO, " - General query" );
           }
         }
        proto_tree_add_uint(tree, hf_num_grp_recs, tvb, offset, 2, num);
@@ -630,9 +630,9 @@ dissect_igmp_v3_query(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int t
        proto_tree_add_item(tree, hf_maddr, tvb, offset, 4, FALSE);
 
        maddr = tvb_get_ipv4(tvb, offset);
-       if (check_col(pinfo->cinfo, COL_INFO)) {                        
+       if (check_col(pinfo->cinfo, COL_INFO)) {
            if (! maddr) {
-               col_append_fstr(pinfo->cinfo, COL_INFO, ", general" ); 
+               col_append_fstr(pinfo->cinfo, COL_INFO, ", general" );
            } else {
                col_append_fstr(pinfo->cinfo, COL_INFO, ", specific for group %s"
                    , ip_to_str((guint8*)&maddr) );
@@ -658,7 +658,7 @@ dissect_igmp_v3_query(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int t
 
        while(num--){
                if (check_col(pinfo->cinfo, COL_INFO))
-                    col_append_fstr(pinfo->cinfo, COL_INFO, "%s%s", ip_to_str(tvb_get_ptr(tvb, offset, 4)), (num?", ":"}"));
+                    col_append_fstr(pinfo->cinfo, COL_INFO, "%s%s", tvb_ip_to_str(tvb, offset), (num?", ":"}"));
                proto_tree_add_item(tree, hf_saddr, tvb, offset, 4, FALSE);
                offset += 4;
        }
@@ -689,7 +689,7 @@ dissect_igmp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int type, i
        proto_tree_add_item(tree, hf_maddr, tvb, offset, 4, FALSE);
 
        maddr = tvb_get_ipv4(tvb, offset);
-       if (check_col(pinfo->cinfo, COL_INFO)) {                        
+       if (check_col(pinfo->cinfo, COL_INFO)) {
                if (! maddr) {
                    col_append_fstr(pinfo->cinfo, COL_INFO, ", general" );
                } else {
@@ -842,8 +842,8 @@ dissect_igmp_mtrace(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int typ
 
                 bi = proto_tree_add_text(tree, tvb, offset, IGMP_TRACEROUTE_RSP_LEN,
                                          "Response data block: %s -> %s,  Proto: %s,  Forwarding Code: %s",
-                                         ip_to_str(tvb_get_ptr(tvb, offset + 4, 4)),
-                                         ip_to_str(tvb_get_ptr(tvb, offset + 8, 4)),
+                                         tvb_ip_to_str(tvb, offset + 4),
+                                         tvb_ip_to_str(tvb, offset + 8),
                                          val_to_str(tvb_get_guint8(tvb, offset + 28), mtrace_rtg_vals, "Unknown"),
                                          val_to_str(tvb_get_guint8(tvb, offset + 31), mtrace_fwd_code_vals, "Unknown"));
                 block_tree = proto_item_add_subtree(bi, ett_mtrace_block);
index b1e941e6a4cf741b1d3dc5371e2f29bfcbce16c1..b4aca63e6079af2f7b65480bb222d7a2a0a4d2f2 100644 (file)
@@ -795,7 +795,7 @@ static const value_string transform_attr_auth_type[] = {
   { 12, "AES-192-GMAC" },              /* [RFC4543][Errata1821] */
   { 13, "AES-256-GMAC" },              /* [RFC4543][Errata1821] */
 
-/*           
+/*
        Values 11-61439 are reserved to IANA.  Values 61440-65535 are
        for private use.
 */
@@ -3534,7 +3534,7 @@ dissect_id(tvbuff_t *tvb, int offset, int length, proto_tree *tree, int isakmp_v
   switch (id_type) {
     case IKE_ID_IPV4_ADDR:
       proto_tree_add_item(idtree, hf_isakmp_id_data_ipv4_addr, tvb, offset, 4, FALSE);
-      proto_item_append_text(idit, "%s", ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+      proto_item_append_text(idit, "%s", tvb_ip_to_str(tvb, offset));
       break;
     case IKE_ID_FQDN:
       proto_tree_add_item(idtree, hf_isakmp_id_data_fqdn, tvb, offset, length, FALSE);
@@ -3547,26 +3547,26 @@ dissect_id(tvbuff_t *tvb, int offset, int length, proto_tree *tree, int isakmp_v
     case IKE_ID_IPV4_ADDR_SUBNET:
       proto_tree_add_item(idtree, hf_isakmp_id_data_ipv4_addr, tvb, offset, 4, FALSE);
       proto_tree_add_item(idtree, hf_isakmp_id_data_ipv4_subnet, tvb, offset+4, 4, FALSE);
-      proto_item_append_text(idit, "%s/%s", ip_to_str(tvb_get_ptr(tvb, offset, 4)),ip_to_str(tvb_get_ptr(tvb, offset+4, 4)));
+      proto_item_append_text(idit, "%s/%s", tvb_ip_to_str(tvb, offset), tvb_ip_to_str(tvb, offset+4));
       break;
     case IKE_ID_IPV4_ADDR_RANGE:
       proto_tree_add_item(idtree, hf_isakmp_id_data_ipv4_range_start, tvb, offset, 4, FALSE);
       proto_tree_add_item(idtree, hf_isakmp_id_data_ipv4_range_end, tvb, offset+4, 4, FALSE);
-      proto_item_append_text(idit, "%s/%s", ip_to_str(tvb_get_ptr(tvb, offset, 4)),ip_to_str(tvb_get_ptr(tvb, offset+4, 4)));
+      proto_item_append_text(idit, "%s/%s", tvb_ip_to_str(tvb, offset), tvb_ip_to_str(tvb, offset+4));
       break;
     case IKE_ID_IPV6_ADDR:
       proto_tree_add_item(idtree, hf_isakmp_id_data_ipv6_addr, tvb, offset, 16, FALSE);
-      proto_item_append_text(idit, "%s", ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset, 16)));
+      proto_item_append_text(idit, "%s", tvb_ip6_to_str(tvb, offset));
       break;
     case IKE_ID_IPV6_ADDR_SUBNET:
       proto_tree_add_item(idtree, hf_isakmp_id_data_ipv6_addr, tvb, offset, 16, FALSE);
       proto_tree_add_item(idtree, hf_isakmp_id_data_ipv6_subnet, tvb, offset+16, 16, FALSE);
-      proto_item_append_text(idit, "%s/%s", ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset, 16)), ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset+16, 16)));
+      proto_item_append_text(idit, "%s/%s", tvb_ip6_to_str(tvb, offset), tvb_ip6_to_str(tvb, offset+16));
       break;
     case IKE_ID_IPV6_ADDR_RANGE:
       proto_tree_add_item(idtree, hf_isakmp_id_data_ipv6_range_start, tvb, offset, 16, FALSE);
       proto_tree_add_item(idtree, hf_isakmp_id_data_ipv6_range_end, tvb, offset+16, 16, FALSE);
-      proto_item_append_text(idit, "%s/%s", ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset, 16)), ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset+16, 16)));
+      proto_item_append_text(idit, "%s/%s", tvb_ip6_to_str(tvb, offset), tvb_ip6_to_str(tvb, offset+16));
       break;
     case IKE_ID_KEY_ID:
       proto_tree_add_item(idtree, hf_isakmp_id_data_key_id, tvb, offset, length, FALSE);
index abf20839492e1d807400f0f489ebfdce7cb0c17a..579479df4178bef6100e09a5d363a1b882a6b221 100644 (file)
@@ -561,7 +561,7 @@ dissect_lsp_ip_reachability_clv(tvbuff_t *tvb, proto_tree *tree, int offset,
                          ti = proto_tree_add_text ( tree, tvb, offset, 12,
                                "IPv4 prefix: %s mask %s",
                                ip_to_str((guint8*)&src),
-                               ip_to_str(tvb_get_ptr(tvb, offset+8, 4)));
+                               tvb_ip_to_str(tvb, offset+8));
                        };
 
                        ntree = proto_item_add_subtree(ti,
@@ -627,7 +627,7 @@ dissect_ipreach_subclv(tvbuff_t *tvb, proto_tree *tree, int offset, int clv_code
                         proto_tree_add_text(tree, tvb, offset, 4,
                                     "32-Bit Administrative tag: 0x%08x (=%u)",
                                     tvb_get_ntohl(tvb, offset),
-                                    tvb_get_ntohl(tvb, offset));                
+                                    tvb_get_ntohl(tvb, offset));
                         offset+=4;
                         clv_len-=4;
                 }
@@ -740,7 +740,7 @@ dissect_lsp_ext_ip_reachability_clv(tvbuff_t *tvb, proto_tree *tree,
                         while (i < subclvs_len) {
                                clv_code = tvb_get_guint8(tvb, offset+len+1); /* skip the total subtlv len indicator */
                                clv_len  = tvb_get_guint8(tvb, offset+len+2);
-                                
+
                                 /*
                                  * we pass on now the raw data to the ipreach_subtlv dissector
                                  * therefore we need to skip 3 bytes
@@ -933,7 +933,7 @@ static void
 dissect_lsp_hostname_clv(tvbuff_t *tvb, proto_tree *tree, int offset,
        int id_length _U_, int length)
 {
-        isis_dissect_hostname_clv(tvb, tree, offset, length, 
+        isis_dissect_hostname_clv(tvb, tree, offset, length,
                hf_isis_lsp_hostname);
 }
 
@@ -1461,11 +1461,11 @@ dissect_lsp_ext_is_reachability_clv(tvbuff_t *tvb, proto_tree *tree,
                                        break;
                                case 6 :
                                        proto_tree_add_text (ntree, tvb, offset+11+i, 6,
-                                               "IPv4 interface address: %s", ip_to_str (tvb_get_ptr(tvb, offset+13+i, 4)) );
+                                               "IPv4 interface address: %s", tvb_ip_to_str(tvb, offset+13+i));
                                        break;
                                case 8 :
                                        proto_tree_add_text (ntree, tvb, offset+11+i, 6,
-                                               "IPv4 neighbor address: %s", ip_to_str (tvb_get_ptr(tvb, offset+13+i, 4)) );
+                                               "IPv4 neighbor address: %s", tvb_ip_to_str(tvb, offset+13+i));
                                        break;
                                case 9 :
                                        dissect_subclv_max_bw (tvb, ntree, offset+13+i);
@@ -1727,7 +1727,7 @@ dissect_lsp_prefix_neighbors_clv(tvbuff_t *tvb, proto_tree *tree, int offset,
        }
 }
 
-static void isis_lsp_checkum_additional_info(tvbuff_t * tvb, packet_info * pinfo, 
+static void isis_lsp_checkum_additional_info(tvbuff_t * tvb, packet_info * pinfo,
     proto_item * it_cksum, int offset, gboolean is_cksum_correct)
 {
        proto_tree * checksum_tree;
@@ -1790,7 +1790,7 @@ isis_dissect_isis_lsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int o
        offset += 2;
 
        if (tree) {
-               proto_tree_add_item(lsp_tree, hf_isis_lsp_remaining_life, 
+               proto_tree_add_item(lsp_tree, hf_isis_lsp_remaining_life,
                        tvb, offset, 2, FALSE);
        }
        lifetime = tvb_get_ntohs(tvb, offset);
@@ -1798,9 +1798,9 @@ isis_dissect_isis_lsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int o
        offset_checksum = offset;
 
        if (tree) {
-               char* value = print_system_id( tvb_get_ptr(tvb, offset, id_length+2), 
+               char* value = print_system_id( tvb_get_ptr(tvb, offset, id_length+2),
                                    id_length+2);
-               proto_tree_add_string_format(lsp_tree, hf_isis_lsp_lsp_id, 
+               proto_tree_add_string_format(lsp_tree, hf_isis_lsp_lsp_id,
                        tvb, offset, id_length + 2,
                         value, "LSP-ID: %s", value);
        }
@@ -1812,7 +1812,7 @@ isis_dissect_isis_lsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int o
        offset += id_length + 2;
 
        if (tree) {
-               proto_tree_add_item(lsp_tree, hf_isis_lsp_sequence_number, 
+               proto_tree_add_item(lsp_tree, hf_isis_lsp_sequence_number,
                        tvb, offset, 4, FALSE);
        }
        if (check_col(pinfo->cinfo, COL_INFO)) {
@@ -1944,7 +1944,7 @@ isis_register_lsp(int proto_isis) {
                { &hf_isis_lsp_checksum,
                { "Checksum",           "isis.lsp.checksum",FT_UINT16,
                  BASE_HEX, NULL, 0x0, NULL, HFILL }},
-                 
+
                { &hf_isis_lsp_checksum_good,
                { "Good Checksum", "isis.lsp.checksum_good", FT_BOOLEAN, BASE_NONE,
                        NULL, 0x0, "Good IS-IS LSP Checksum", HFILL }},
index 95e83c58d2de126f84e1153fa54f79e536f4a36d..ed2813d09ee3a50461744fcd5f73a6b8dc76a150 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.
@@ -219,10 +219,10 @@ static const true_false_string is_set = {
 static void
 dissect_ismp_edp(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *ismp_tree)
 {
-       /* local variables used for EDP dissection */ 
+       /* local variables used for EDP dissection */
        int neighbors_count = 0;
        int tuples_count = 0;
-       guint16 device_type = 0; 
+       guint16 device_type = 0;
        guint32 options = 0;
        guint16 num_neighbors = 0;
        guint16 num_tuples = 0;
@@ -234,7 +234,7 @@ dissect_ismp_edp(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *ismp
        /* Set up structures needed to add the protocol subtree and manage it */
        proto_item *edp_ti;
        proto_tree *edp_tree;
-       
+
        proto_item *edp_options_ti;
        proto_tree *edp_options_tree;
 
@@ -261,7 +261,7 @@ dissect_ismp_edp(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *ismp
                edp_tree = proto_item_add_subtree(edp_ti, ett_ismp_edp);
 
                col_add_fstr(pinfo->cinfo, COL_INFO, "MIP %s, MMAC %s, ifIdx %d",
-                       ip_to_str(tvb_get_ptr(tvb, offset+2, 4)),
+                       tvb_ip_to_str(tvb, offset+2),
                        ether_to_str(tvb_get_ptr(tvb, offset+6, 6)),
                        tvb_get_ntohl(tvb, offset+12));
 
@@ -352,7 +352,7 @@ dissect_ismp_edp(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *ismp
                                break;
                }
                offset += 4;
-               
+
                /* determine the number of neighbors and create EDP neighbors subtree */
                num_neighbors = tvb_get_ntohs(tvb, offset);
                proto_tree_add_item(edp_tree, hf_ismp_edp_num_neighbors, tvb, offset, 2, FALSE);
@@ -363,13 +363,13 @@ dissect_ismp_edp(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *ismp
                        if (tvb_reported_length_remaining(tvb, offset) >= (num_neighbors *10))
                        {
                                neighbors_ptr = tvb_get_ptr( tvb, offset, (num_neighbors*10) );
-                               edp_neighbors_ti = proto_tree_add_bytes_format(edp_tree, hf_ismp_edp_neighbors, tvb, 
+                               edp_neighbors_ti = proto_tree_add_bytes_format(edp_tree, hf_ismp_edp_neighbors, tvb,
                                        offset, num_neighbors*10, neighbors_ptr, "Neighbors:");
                        }
                        else
                        {
                                neighbors_ptr = tvb_get_ptr( tvb, offset, tvb_reported_length_remaining(tvb, offset) );
-                               edp_neighbors_ti = proto_tree_add_bytes_format(edp_tree, hf_ismp_edp_neighbors, tvb, 
+                               edp_neighbors_ti = proto_tree_add_bytes_format(edp_tree, hf_ismp_edp_neighbors, tvb,
                                        offset, num_neighbors *10, neighbors_ptr, "Neighbors:");
                        }
                        edp_neighbors_tree = proto_item_add_subtree(edp_neighbors_ti, ett_ismp_edp_neighbors);
@@ -393,18 +393,18 @@ dissect_ismp_edp(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *ismp
                                return;
                        }
                }
-               
+
                /* determine data remains, if so, count tuples
                   and create EDP tuples subtree */
-               if (tvb_reported_length_remaining(tvb, offset) != 0 && 
-                       tvb_reported_length_remaining(tvb, offset) >= 2) 
+               if (tvb_reported_length_remaining(tvb, offset) != 0 &&
+                       tvb_reported_length_remaining(tvb, offset) >= 2)
                {
                        num_tuples = tvb_get_ntohs(tvb, offset);
                        proto_tree_add_item(edp_tree, hf_ismp_edp_num_tuples, tvb, offset, 2, FALSE);
                        offset += 2;
                }
                else if (tvb_reported_length_remaining(tvb, offset) > 0) {
-                       proto_tree_add_text(edp_tree, tvb, offset, 
+                       proto_tree_add_text(edp_tree, tvb, offset,
                                tvb_reported_length_remaining(tvb, offset), "MALFORMED PACKET");
                        return;
                }
@@ -437,12 +437,12 @@ dissect_ismp_edp(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *ismp
                                proto_tree_add_text(edp_tuples_leaf_tree, tvb, offset, 2,
                                        "Tuple Length: %d", tuple_length);
                                offset += 2;
-                               
+
                                if (tvb_reported_length_remaining(tvb, offset) >= tuple_length)
                                {
                                        tvb_ensure_bytes_exist(tvb, offset, tuple_length);
                                        switch (tuple_type)
-                                       {                                               
+                                       {
                                                case EDP_TUPLE_HOLD:
                                                        proto_tree_add_text(edp_tuples_leaf_tree, tvb, offset, tuple_length,
                                                                "Hold Time = %d", tvb_get_ntohs(tvb, offset));
@@ -459,8 +459,8 @@ dissect_ismp_edp(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *ismp
                                                        break;
                                                case EDP_TUPLE_IPX_ADDR:
                                                        proto_tree_add_text(edp_tuples_leaf_tree, tvb, offset, tuple_length,
-                                                               "Interface IPX_address = %s", 
-                                                               ipx_addr_to_str(tvb_get_ntohl(tvb, offset), 
+                                                               "Interface IPX_address = %s",
+                                                               ipx_addr_to_str(tvb_get_ntohl(tvb, offset),
                                                                tvb_get_ptr(tvb, offset+4, tuple_length-4)));
                                                        break;
                                                case EDP_TUPLE_UNKNOWN:
@@ -468,17 +468,17 @@ dissect_ismp_edp(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *ismp
                                                        proto_tree_add_text(edp_tuples_leaf_tree, tvb, offset, tuple_length,
                                                                "Unknown Tuple Data %s", tvb_format_text(tvb, offset, tuple_length));
                                                        break;
-                                       }  
+                                       }
                                }
                                offset += tuple_length;
 
                                tuples_count++;
                                tuple_type = 0;
                                tuple_length = 0;
-                       } 
+                       }
                        if (tuples_count != num_tuples)
                        {
-                               proto_tree_add_text(edp_tree, tvb, offset, 
+                               proto_tree_add_text(edp_tree, tvb, offset,
                                        tvb_reported_length_remaining(tvb, offset), "MALFORMED PACKET");
                                return;
                        }
@@ -487,9 +487,9 @@ dissect_ismp_edp(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *ismp
                                return;
                        }
                }
-                       
+
        }
-               
+
 
 }
 
@@ -539,7 +539,7 @@ dissect_ismp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                offset += 1;
                proto_tree_add_item(ismp_tree, hf_ismp_auth_data, tvb, offset, code_length, FALSE);
                offset += code_length;
-               
+
                /* if Enterasys Discover Protocol, dissect it */
                if(message_type == ISMPTYPE_EDP)
                        dissect_ismp_edp(tvb, pinfo, offset, tree);
@@ -551,7 +551,7 @@ dissect_ismp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 /* Register this protocol with Wireshark */
 void
 proto_register_ismp(void)
-{                 
+{
 
 /* Setup list of header fields  See Section 1.6.1 for details*/
        static hf_register_info hf[] = {
@@ -564,7 +564,7 @@ proto_register_ismp(void)
 #endif
                { &hf_ismp_version,
                        { "Version",           "ismp.version",
-                       FT_UINT16, BASE_DEC, NULL, 0x0,          
+                       FT_UINT16, BASE_DEC, NULL, 0x0,
                        NULL, HFILL }
                },
                { &hf_ismp_message_type,
@@ -581,7 +581,7 @@ proto_register_ismp(void)
                        { "Auth Code Length", "ismp.codelen",
                        FT_UINT8, BASE_DEC, NULL, 0x0,
                        NULL, HFILL }
-               }, 
+               },
                { &hf_ismp_auth_data,
                        { "Auth Data", "ismp.authdata",
                        FT_BYTES, BASE_NONE, NULL, 0x0,
index 40416f1c9d6336288658380f8ffcf16a3415970e..b058c427f993db33500b6b43b928722302d77367 100644 (file)
@@ -176,7 +176,7 @@ static const value_string message_type_vals[] = {
 #define        LMP_CLASS_DATA_LINK                     12
 #define        LMP_CLASS_CHANNEL_STATUS                13
 #define        LMP_CLASS_CHANNEL_STATUS_REQUEST        14
-#define LMP_LAST_CONTIGUOUS_CLASS                      LMP_CLASS_CHANNEL_STATUS_REQUEST  
+#define LMP_LAST_CONTIGUOUS_CLASS                      LMP_CLASS_CHANNEL_STATUS_REQUEST
 #define        LMP_CLASS_ERROR                         20
 #define LMP_CLASS_TRACE                         21
 #define LMP_CLASS_TRACE_REQ                     22
@@ -277,7 +277,7 @@ static const value_string lmp_trace_type_str[] = {
     { 0, NULL}
 };
 
-/* 
+/*
  * These values are used by the code that handles the Service Discovery
  * Client Port-Level Service Attributes Object.
  */
@@ -472,7 +472,7 @@ enum hf_lmp_filter_keys {
   LMPF_VAL_SERVICE_CONFIG_NSA_NETWORK_DIVERSITY_FLAGS_NODE,
   LMPF_VAL_SERVICE_CONFIG_NSA_NETWORK_DIVERSITY_FLAGS_LINK,
   LMPF_VAL_SERVICE_CONFIG_NSA_NETWORK_DIVERSITY_FLAGS_SRLG,
-  
+
   LMPF_VAL_LOCAL_DA_DCN_ADDR,
   LMPF_VAL_REMOTE_DA_DCN_ADDR,
 
@@ -502,14 +502,14 @@ static int
 lmp_valid_class(int class)
 {
     /* Contiguous classes */
-    if (class > LMP_CLASS_NULL && class <= LMP_LAST_CONTIGUOUS_CLASS) 
+    if (class > LMP_CLASS_NULL && class <= LMP_LAST_CONTIGUOUS_CLASS)
        return 1;
 
     /* Noncontiguous classes */
-    if (class == LMP_CLASS_ERROR || 
+    if (class == LMP_CLASS_ERROR ||
         class == LMP_CLASS_TRACE ||
         class == LMP_CLASS_TRACE_REQ ||
-       class == LMP_CLASS_SERVICE_CONFIG || 
+       class == LMP_CLASS_SERVICE_CONFIG ||
         class == LMP_CLASS_DA_DCN_ADDRESS ||
         class == LMP_CLASS_LOCAL_LAD_INFO)
        return 1;
@@ -552,13 +552,13 @@ static int
 lmp_class_to_filter_num(int class)
 {
 
-    /* 
+    /*
      * The contiguous values can all be handled in the same way. The ERROR and
      * Service Config objects, whose C-Type values are not contiguously assigned,
      * must be handled separately.
      */
     switch (class) {
-       
+
     case LMP_CLASS_CCID:
     case LMP_CLASS_NODE_ID:
     case LMP_CLASS_LINK_ID:
@@ -577,7 +577,7 @@ lmp_class_to_filter_num(int class)
 
     case LMP_CLASS_ERROR:
        return LMPF_CLASS_ERROR;
-       
+
     case LMP_CLASS_TRACE:
        return LMPF_CLASS_TRACE;
 
@@ -778,11 +778,11 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
          PROTO_ITEM_SET_HIDDEN(hidden_item);
          if (lmp_valid_class(class)) {
 
-             ti = proto_tree_add_item(lmp_tree, 
+             ti = proto_tree_add_item(lmp_tree,
                                       hf_lmp_filter[lmp_class_to_filter_num(class)],
                                       tvb, offset, obj_length, FALSE);
          } else {
-             proto_tree_add_protocol_format(lmp_tree, proto_malformed, tvb, 
+             proto_tree_add_protocol_format(lmp_tree, proto_malformed, tvb,
                                             offset+1, 1,
                                             "Invalid class: %u", class);
              return tvb_length(tvb);
@@ -794,7 +794,7 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                                    class, type, obj_length,
                                    negotiable ? "Negotiable" : "Not Negotiable");
 
-         lmp_object_header_tree = 
+         lmp_object_header_tree =
              proto_item_add_subtree(ti2, lmp_subtree[LMP_TREE_OBJECT_HEADER]);
 
          proto_tree_add_text(lmp_object_header_tree, tvb, offset, 1,
@@ -808,7 +808,7 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                              tvb, offset, 1, type);
          offset2 = offset+4;
          mylen = obj_length - 4;
-         
+
          switch (class) {
 
          case LMP_CLASS_NULL:
@@ -816,18 +816,18 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
          case LMP_CLASS_CCID:
              switch(type) {
-                 
+
              case 1:
                  l = LMPF_VAL_LOCAL_CCID;
                  proto_item_append_text(ti, ": %d", tvb_get_ntohl(tvb, offset2));
-                 proto_tree_add_uint(lmp_object_tree, hf_lmp_filter[l], tvb, 
+                 proto_tree_add_uint(lmp_object_tree, hf_lmp_filter[l], tvb,
                                      offset2, 4, tvb_get_ntohl(tvb, offset2));
                  break;
-                 
+
              case 2:
                  l = LMPF_VAL_REMOTE_CCID;
                  proto_item_append_text(ti, ": %d", tvb_get_ntohl(tvb, offset2));
-                 proto_tree_add_uint(lmp_object_tree, hf_lmp_filter[l], tvb, 
+                 proto_tree_add_uint(lmp_object_tree, hf_lmp_filter[l], tvb,
                                      offset2, 4, tvb_get_ntohl(tvb, offset2));
              default:
                  proto_tree_add_text(lmp_object_tree, tvb, offset2, mylen,
@@ -835,63 +835,59 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                  break;
              }
              break;
-             
+
          case LMP_CLASS_NODE_ID:
              switch(type) {
-                 
+
              case 1:
                  l = LMPF_VAL_LOCAL_NODE_ID;
-                 proto_item_append_text(ti, ": %s",
-                                        ip_to_str(tvb_get_ptr(tvb, offset2, 4)));
-                 proto_tree_add_item(lmp_object_tree, hf_lmp_filter[l], tvb, 
+                 proto_item_append_text(ti, ": %s", tvb_ip_to_str(tvb, offset2));
+                 proto_tree_add_item(lmp_object_tree, hf_lmp_filter[l], tvb,
                                      offset2, 4, FALSE);
                  break;
-                 
+
              case 2:
                  l = LMPF_VAL_REMOTE_NODE_ID;
-                 proto_item_append_text(ti, ": %s",
-                                        ip_to_str(tvb_get_ptr(tvb, offset2, 4)));
-                 proto_tree_add_item(lmp_object_tree, hf_lmp_filter[l], tvb, 
+                 proto_item_append_text(ti, ": %s", tvb_ip_to_str(tvb, offset2));
+                 proto_tree_add_item(lmp_object_tree, hf_lmp_filter[l], tvb,
                                      offset2, 4, FALSE);
                  break;
-                 
+
              default:
                  proto_tree_add_text(lmp_object_tree, tvb, offset2, mylen,
                                      "Data (%d bytes)", mylen);
                  break;
              }
              break;
-             
+
          case LMP_CLASS_LINK_ID:
-             
+
              switch(type) {
-                 
+
              case 1:
              case 2:
                  l = (type == 1)? LMPF_VAL_LOCAL_LINK_ID_IPV4:
                      LMPF_VAL_REMOTE_LINK_ID_IPV4;
-                 proto_item_append_text(ti, ": IPv4 %s",
-                                        ip_to_str(tvb_get_ptr(tvb, offset2, 4)));
-                 proto_tree_add_item(lmp_object_tree, hf_lmp_filter[l], tvb, 
+                 proto_item_append_text(ti, ": IPv4 %s", tvb_ip_to_str(tvb, offset2));
+                 proto_tree_add_item(lmp_object_tree, hf_lmp_filter[l], tvb,
                                      offset2, 4, FALSE);
                  break;
-                 
+
              case 3:
              case 4:
                  l = (type == 3)? LMPF_VAL_LOCAL_LINK_ID_IPV6:
                      LMPF_VAL_REMOTE_LINK_ID_IPV6;
-                 proto_item_append_text(ti, ": IPv6 %s",
-                                        ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset2, 16)));
+                 proto_item_append_text(ti, ": IPv6 %s", tvb_ip6_to_str(tvb, offset2));
                  proto_tree_add_text(lmp_object_tree, tvb, offset2, 16, "IPv6: %s",
-                                     ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset2, 16)));
+                                     tvb_ip6_to_str(tvb, offset2));
                  break;
              case 5:
              case 6:
                  l = (type == 5)? LMPF_VAL_LOCAL_LINK_ID_UNNUM:
                      LMPF_VAL_REMOTE_LINK_ID_UNNUM;
-                 proto_item_append_text(ti, ": Unnumbered %d", 
+                 proto_item_append_text(ti, ": Unnumbered %d",
                                         tvb_get_ntohl(tvb, offset2));
-                 proto_tree_add_item(lmp_object_tree, hf_lmp_filter[l], tvb, 
+                 proto_tree_add_item(lmp_object_tree, hf_lmp_filter[l], tvb,
                                      offset2, 4, FALSE);
                  break;
 
@@ -903,36 +899,34 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
              break;
 
          case LMP_CLASS_INTERFACE_ID:
-             
+
              switch(type) {
-                 
+
              case 1:
              case 2:
                  l = (type == 1)? LMPF_VAL_LOCAL_INTERFACE_ID_IPV4:
                      LMPF_VAL_REMOTE_INTERFACE_ID_IPV4;
-                 proto_item_append_text(ti, ": IPv4 %s",
-                                        ip_to_str(tvb_get_ptr(tvb, offset2, 4)));
-                 proto_tree_add_item(lmp_object_tree, hf_lmp_filter[l], tvb, 
+                 proto_item_append_text(ti, ": IPv4 %s", tvb_ip_to_str(tvb, offset2));
+                 proto_tree_add_item(lmp_object_tree, hf_lmp_filter[l], tvb,
                                      offset2, 4, FALSE);
                  break;
-  
+
              case 3:
              case 4:
                  l = (type == 3)? LMPF_VAL_LOCAL_INTERFACE_ID_IPV6:
                      LMPF_VAL_REMOTE_INTERFACE_ID_IPV6;
-                 proto_item_append_text(ti, ": IPv6 %s",
-                                        ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset2, 16)));
+                 proto_item_append_text(ti, ": IPv6 %s", tvb_ip6_to_str(tvb, offset2));
                  proto_tree_add_text(lmp_object_tree, tvb, offset2, 16, "IPv6: %s",
-                                     ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset2, 16)));
+                                     tvb_ip6_to_str(tvb, offset2));
                  break;
 
              case 5:
              case 6:
                  l = (type == 5)? LMPF_VAL_LOCAL_INTERFACE_ID_UNNUM:
                      LMPF_VAL_REMOTE_INTERFACE_ID_UNNUM;
-                 proto_item_append_text(ti, ": Unnumbered %d", 
+                 proto_item_append_text(ti, ": Unnumbered %d",
                                         tvb_get_ntohl(tvb, offset2));
-                 proto_tree_add_item(lmp_object_tree, hf_lmp_filter[l], tvb, 
+                 proto_tree_add_item(lmp_object_tree, hf_lmp_filter[l], tvb,
                                      offset2, 4, FALSE);
                  break;
 
@@ -944,24 +938,24 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
              break;
 
          case LMP_CLASS_MESSAGE_ID:
-             
+
              switch(type) {
-                 
+
              case 1:
-                 
+
                  l = LMPF_VAL_MESSAGE_ID;
                  proto_item_append_text(ti, ": %d", tvb_get_ntohl(tvb, offset2));
-                 proto_tree_add_uint(lmp_object_tree, hf_lmp_filter[l], tvb, 
+                 proto_tree_add_uint(lmp_object_tree, hf_lmp_filter[l], tvb,
                                      offset2, 4, tvb_get_ntohl(tvb, offset2));
                  break;
-                 
+
              case 2:
                  l = LMPF_VAL_MESSAGE_ID_ACK;
                  proto_item_append_text(ti, ": %d", tvb_get_ntohl(tvb, offset2));
-                 proto_tree_add_uint(lmp_object_tree, hf_lmp_filter[l], tvb, 
+                 proto_tree_add_uint(lmp_object_tree, hf_lmp_filter[l], tvb,
                                      offset2, 4, tvb_get_ntohl(tvb, offset2));
                  break;
-                 
+
              default:
                  proto_tree_add_text(lmp_object_tree, tvb, offset2, mylen,
                                        "Data (%d bytes)", mylen);
@@ -972,42 +966,42 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
          case LMP_CLASS_CONFIG:
 
              switch(type) {
-                 
+
              case 1:
                  proto_item_append_text(ti, ": HelloInterval: %d, HelloDeadInterval: %d",
-                                        tvb_get_ntohs(tvb, offset2), 
+                                        tvb_get_ntohs(tvb, offset2),
                                         tvb_get_ntohs(tvb, offset2+2));
-                 proto_tree_add_uint(lmp_object_tree, 
+                 proto_tree_add_uint(lmp_object_tree,
                                      hf_lmp_filter[LMPF_VAL_CONFIG_HELLO],
                                      tvb, offset2, 2, tvb_get_ntohs(tvb, offset2));
-                 proto_tree_add_uint(lmp_object_tree, 
+                 proto_tree_add_uint(lmp_object_tree,
                                      hf_lmp_filter[LMPF_VAL_CONFIG_HELLO_DEAD],
-                                     tvb, offset2+2, 2, 
+                                     tvb, offset2+2, 2,
                                      tvb_get_ntohs(tvb, offset2+2));
                  break;
-                 
+
              default:
                  proto_tree_add_text(lmp_object_tree, tvb, offset2, mylen,
                                      "Data (%d bytes)", mylen);
                  break;
              }
              break;
-             
+
          case LMP_CLASS_HELLO:
 
              switch(type) {
-                 
+
              case 1:
                  proto_item_append_text(ti, ": TxSeq %d, RxSeq: %d",
                                         tvb_get_ntohl(tvb, offset2),
                                         tvb_get_ntohl(tvb, offset2+4));
-                 proto_tree_add_uint(lmp_object_tree, 
+                 proto_tree_add_uint(lmp_object_tree,
                                      hf_lmp_filter[LMPF_VAL_HELLO_TXSEQ],
-                                     tvb, offset2, 4, 
+                                     tvb, offset2, 4,
                                      tvb_get_ntohl(tvb, offset2));
-                 proto_tree_add_uint(lmp_object_tree, 
+                 proto_tree_add_uint(lmp_object_tree,
                                      hf_lmp_filter[LMPF_VAL_HELLO_RXSEQ],
-                                     tvb, offset2+4, 4, 
+                                     tvb, offset2+4, 4,
                                      tvb_get_ntohl(tvb, offset2+4));
                  break;
 
@@ -1017,42 +1011,42 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                  break;
              }
              break;
-             
+
          case LMP_CLASS_BEGIN_VERIFY:
 
              switch(type) {
 
              case 1:
                  l = tvb_get_ntohs(tvb, offset2);
-                 ti2 = proto_tree_add_item(lmp_object_tree, 
+                 ti2 = proto_tree_add_item(lmp_object_tree,
                                            hf_lmp_filter[LMPF_VAL_BEGIN_VERIFY_FLAGS],
                                            tvb, offset2, 2, FALSE);
-                 
-                 lmp_flags_tree = proto_item_add_subtree(ti2, 
+
+                 lmp_flags_tree = proto_item_add_subtree(ti2,
                                                          lmp_subtree[LMP_TREE_BEGIN_VERIFY_FLAGS]);
-                 proto_tree_add_boolean(lmp_flags_tree, 
+                 proto_tree_add_boolean(lmp_flags_tree,
                                         hf_lmp_filter[LMPF_VAL_BEGIN_VERIFY_FLAGS_ALL_LINKS],
                                         tvb, offset2, 2, l);
-                 proto_tree_add_boolean(lmp_flags_tree, 
+                 proto_tree_add_boolean(lmp_flags_tree,
                                         hf_lmp_filter[LMPF_VAL_BEGIN_VERIFY_FLAGS_LINK_TYPE],
                                         tvb, offset2, 2, l);
                  proto_tree_add_text(lmp_object_tree, tvb, offset2+2, 2,
-                                     "Verify Interval: %d ms", 
+                                     "Verify Interval: %d ms",
                                      tvb_get_ntohs(tvb, offset2+2));
                  proto_tree_add_text(lmp_object_tree, tvb, offset2+4, 4,
-                                     "Number of Data Links: %d", 
+                                     "Number of Data Links: %d",
                                      tvb_get_ntohl(tvb, offset2+4));
-                 proto_tree_add_item(lmp_object_tree, 
+                 proto_tree_add_item(lmp_object_tree,
                                      hf_lmp_filter[LMPF_VAL_BEGIN_VERIFY_ENCTYPE],
                                      tvb, offset2+8, 1, FALSE);
                  proto_tree_add_text(lmp_object_tree, tvb, offset2+10, 2,
-                                     "Verify Transport Mechanism: 0x%0x", 
+                                     "Verify Transport Mechanism: 0x%0x",
                                      tvb_get_ntohs(tvb, offset2+10));
                  proto_tree_add_text(lmp_object_tree, tvb, offset2+12, 4,
-                                     "Transmission Rate: %.3f Mbps", 
+                                     "Transmission Rate: %.3f Mbps",
                                      tvb_get_ntohieee_float(tvb, offset2+12)*8/1000000);
                  proto_tree_add_text(lmp_object_tree, tvb, offset2+16, 4,
-                                     "Wavelength: %d", 
+                                     "Wavelength: %d",
                                      tvb_get_ntohl(tvb, offset2+16));
                  break;
 
@@ -1069,13 +1063,13 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
              case 1:
                  proto_item_append_text(ti, ": VerifyDeadInterval: %d, TransportResponse: 0x%0x",
-                                        tvb_get_ntohs(tvb, offset2), 
+                                        tvb_get_ntohs(tvb, offset2),
                                         tvb_get_ntohs(tvb, offset2+2));
                  proto_tree_add_text(lmp_object_tree, tvb, offset2, 2,
-                                     "VerifyDeadInterval: %d ms", 
+                                     "VerifyDeadInterval: %d ms",
                                      tvb_get_ntohs(tvb, offset2));
                  proto_tree_add_text(lmp_object_tree, tvb, offset2+2, 2,
-                                     "Verify Transport Response: 0x%0x", 
+                                     "Verify Transport Response: 0x%0x",
                                      tvb_get_ntohs(tvb, offset2+2));
                  break;
 
@@ -1085,16 +1079,16 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                  break;
              }
              break;
-             
+
          case LMP_CLASS_VERIFY_ID:
 
              switch(type) {
 
              case 1:
-                 proto_item_append_text(ti, ": %d", 
+                 proto_item_append_text(ti, ": %d",
                                         tvb_get_ntohl(tvb, offset2));
-                 proto_tree_add_uint(lmp_object_tree, 
-                                     hf_lmp_filter[LMPF_VAL_VERIFY_ID], 
+                 proto_tree_add_uint(lmp_object_tree,
+                                     hf_lmp_filter[LMPF_VAL_VERIFY_ID],
                                      tvb, offset2, 4,
                                      tvb_get_ntohl(tvb, offset2));
                  break;
@@ -1107,15 +1101,15 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
          case LMP_CLASS_TE_LINK:
              l = tvb_get_guint8(tvb, offset2);
-             ti2 = proto_tree_add_uint(lmp_object_tree, 
+             ti2 = proto_tree_add_uint(lmp_object_tree,
                                        hf_lmp_filter[LMPF_VAL_TE_LINK_FLAGS],
                                        tvb, offset2, 1, l);
-             
+
              proto_item_append_text(ti2, ": %s%s",
                                     (l&0x01) ? "Fault-Mgmt-Supported " : "",
                                     (l&0x02) ? "Link-Verification-Supported " : "");
-             
-             lmp_flags_tree = proto_item_add_subtree(ti2, 
+
+             lmp_flags_tree = proto_item_add_subtree(ti2,
                                                      lmp_subtree[LMP_TREE_TE_LINK_FLAGS]);
              proto_tree_add_boolean(lmp_flags_tree,
                                     hf_lmp_filter[LMPF_VAL_TE_LINK_FLAGS_FAULT_MGMT],
@@ -1127,38 +1121,38 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
              case 1:
                  proto_item_append_text(ti, ": IPv4: Local %s, Remote %s",
-                                        ip_to_str(tvb_get_ptr(tvb, offset2+4, 4)),
-                                        ip_to_str(tvb_get_ptr(tvb, offset2+8, 4)));
-                 proto_tree_add_item(lmp_object_tree, 
+                                        tvb_ip_to_str(tvb, offset2+4),
+                                        tvb_ip_to_str(tvb, offset2+8));
+                 proto_tree_add_item(lmp_object_tree,
                                      hf_lmp_filter[LMPF_VAL_TE_LINK_LOCAL_IPV4],
                                      tvb, offset2+4, 4, FALSE);
-                 proto_tree_add_item(lmp_object_tree, 
+                 proto_tree_add_item(lmp_object_tree,
                                      hf_lmp_filter[LMPF_VAL_TE_LINK_REMOTE_IPV4],
                                      tvb, offset2+8, 4, FALSE);
                  break;
-                 
+
              case 2:
                  proto_item_append_text(ti, ": IPv6: Local %s, Remote %s",
-                                        ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset2+4, 16)),
-                                        ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset2+8, 16)));
-                 proto_tree_add_text(lmp_object_tree, tvb, offset2+4, 16, 
+                                        tvb_ip6_to_str(tvb, offset2+4),
+                                        tvb_ip6_to_str(tvb, offset2+8));
+                 proto_tree_add_text(lmp_object_tree, tvb, offset2+4, 16,
                                      "TE-Link Local ID - IPv6: %s",
-                                     ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset2, 16)));
-                 proto_tree_add_text(lmp_object_tree, tvb, offset2+20,16, 
+                                     tvb_ip6_to_str(tvb, offset2));
+                 proto_tree_add_text(lmp_object_tree, tvb, offset2+20,16,
                                      "TE-Link Remote ID - IPv6: %s",
-                                     ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset2+4, 16)));
+                                     tvb_ip6_to_str(tvb, offset2+4));
                  break;
 
              case 3:
                  proto_item_append_text(ti, ": Unnumbered: Local %d, Remote %d",
-                                        tvb_get_ntohl(tvb, offset2+4), 
+                                        tvb_get_ntohl(tvb, offset2+4),
                                         tvb_get_ntohl(tvb, offset2+8));
-                 
-                 proto_tree_add_item(lmp_object_tree, 
+
+                 proto_tree_add_item(lmp_object_tree,
                                      hf_lmp_filter[LMPF_VAL_TE_LINK_LOCAL_UNNUM],
                                      tvb, offset2+4, 4, FALSE);
-                 
-                 proto_tree_add_item(lmp_object_tree, 
+
+                 proto_tree_add_item(lmp_object_tree,
                                      hf_lmp_filter[LMPF_VAL_TE_LINK_REMOTE_UNNUM],
                                      tvb, offset2+8, 4, FALSE);
                  break;
@@ -1168,18 +1162,18 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                  break;
              }
              break;
-             
+
          case LMP_CLASS_DATA_LINK:
 
              l = tvb_get_guint8(tvb, offset2);
-             ti2 = proto_tree_add_uint(lmp_object_tree, 
+             ti2 = proto_tree_add_uint(lmp_object_tree,
                                        hf_lmp_filter[LMPF_VAL_DATA_LINK_FLAGS],
                                        tvb, offset2, 1, l);
              proto_item_append_text(ti2, ": %s%s",
                                     (l&0x01) ? "Interface-Type-Port " : "Interface-Type-Component-Link ",
                                     (l&0x02) ? "Allocated " : "Unallocated ");
 
-             lmp_flags_tree = proto_item_add_subtree(ti2, 
+             lmp_flags_tree = proto_item_add_subtree(ti2,
                                                      lmp_subtree[LMP_TREE_DATA_LINK_FLAGS]);
              proto_tree_add_boolean(lmp_flags_tree,
                                     hf_lmp_filter[LMPF_VAL_DATA_LINK_FLAGS_PORT],
@@ -1191,14 +1185,14 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
              case 1:
                  proto_item_append_text(ti, ": IPv4: Local %s, Remote %s",
-                                        ip_to_str(tvb_get_ptr(tvb, offset2+4, 4)),
-                                        ip_to_str(tvb_get_ptr(tvb, offset2+8, 4)));
+                                        tvb_ip_to_str(tvb, offset2+4),
+                                        tvb_ip_to_str(tvb, offset2+8));
 
-                 proto_tree_add_item(lmp_object_tree, 
+                 proto_tree_add_item(lmp_object_tree,
                                      hf_lmp_filter[LMPF_VAL_DATA_LINK_LOCAL_IPV4],
                                      tvb, offset2+4, 4, FALSE);
 
-                 proto_tree_add_item(lmp_object_tree, 
+                 proto_tree_add_item(lmp_object_tree,
                                      hf_lmp_filter[LMPF_VAL_DATA_LINK_REMOTE_IPV4],
                                      tvb, offset2+8, 4, FALSE);
                  l = 12;
@@ -1206,22 +1200,22 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
              case 2:
                  proto_item_append_text(ti, ": IPv6: Local %s, Remote %s",
-                                        ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset2+4, 16)),
-                                        ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset2+8, 16)));
+                                        tvb_ip6_to_str(tvb, offset2+4),
+                                        tvb_ip6_to_str(tvb, offset2+8));
                  proto_tree_add_text(lmp_object_tree, tvb, offset2+4, 16,
                                      "Data-Link Local ID - IPv6: %s",
-                                     ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset2, 16)));
+                                     tvb_ip6_to_str(tvb, offset2));
                  proto_tree_add_text(lmp_object_tree, tvb, offset2+20,16,
                                      "Data-Link Remote ID - IPv6: %s",
-                                     ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset2+4, 16)));
+                                     tvb_ip6_to_str(tvb, offset2+4));
                  l = 36;
                  break;
 
              case 3:
                  proto_item_append_text(ti, ": Unnumbered: Local %d, Remote %d",
-                                        tvb_get_ntohl(tvb, offset2+4), 
+                                        tvb_get_ntohl(tvb, offset2+4),
                                         tvb_get_ntohl(tvb, offset2+8));
-                 proto_tree_add_item(lmp_object_tree, 
+                 proto_tree_add_item(lmp_object_tree,
                                      hf_lmp_filter[LMPF_VAL_DATA_LINK_LOCAL_UNNUM],
                                      tvb, offset2+4, 4, FALSE);
                  proto_tree_add_item(lmp_object_tree, hf_lmp_filter[LMPF_VAL_DATA_LINK_REMOTE_UNNUM],
@@ -1234,16 +1228,16 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                                      "Data (%d bytes)", mylen);
                  break;
              }
-             
+
              while (l < obj_length - 4) {
                  mylen = tvb_get_guint8(tvb, offset2+l+1);
-                 ti2 = proto_tree_add_item(lmp_object_tree, 
+                 ti2 = proto_tree_add_item(lmp_object_tree,
                                            hf_lmp_filter[LMPF_VAL_DATA_LINK_SUBOBJ],
                                            tvb, offset2+l, mylen, FALSE);
-                 lmp_subobj_tree = proto_item_add_subtree(ti2, 
+                 lmp_subobj_tree = proto_item_add_subtree(ti2,
                                                           lmp_subtree[LMP_TREE_DATA_LINK_SUBOBJ]);
                  proto_tree_add_text(lmp_subobj_tree, tvb, offset2+l, 1,
-                                     "Subobject Type: %d", 
+                                     "Subobject Type: %d",
                                      tvb_get_guint8(tvb, offset2+l));
 
                  proto_tree_add_text(lmp_subobj_tree, tvb, offset2+l+1, 1,
@@ -1274,7 +1268,7 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                                          "Maximum Reservable Bandwidth: %.3f Mbps",
                                          tvb_get_ntohieee_float(tvb, offset2+l+8)*8/1000000);
                      break;
-                     
+
                  case 2:
                      proto_item_set_text(ti2, "Wavelength: %d",
                                          tvb_get_ntohl(tvb, offset2+l+2));
@@ -1282,7 +1276,7 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                                          "Wavelength: %d",
                                          tvb_get_ntohl(tvb, offset2+l+4));
                      break;
-                     
+
                  default:
                      proto_tree_add_text(lmp_subobj_tree, tvb, offset2+l,
                                          tvb_get_guint8(tvb, offset2+l+1),
@@ -1293,9 +1287,9 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                      THROW(ReportedBoundsError);
                  l += tvb_get_guint8(tvb, offset2+l+1);
              }
-             
+
              break;
-             
+
          case LMP_CLASS_CHANNEL_STATUS:
 
              k = 0; j = 0;
@@ -1317,38 +1311,36 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
                  ti2 = proto_tree_add_text(lmp_object_tree, tvb, offset2+l, k,
                                            "Interface-Id");
-                 lmp_subobj_tree = proto_item_add_subtree(ti2, 
+                 lmp_subobj_tree = proto_item_add_subtree(ti2,
                                                           lmp_subtree[LMP_TREE_CHANNEL_STATUS_ID]);
                  switch(type) {
 
                  case 1:
                      if (j < 4)
                          proto_item_append_text(ti, ": [IPv4-%s",
-                                                ip_to_str(tvb_get_ptr(tvb, offset2+l, 4)));
+                                                tvb_ip_to_str(tvb, offset2+l));
                      proto_item_append_text(ti2, ": IPv4 %s",
-                                            ip_to_str(tvb_get_ptr(tvb, offset2+l, 4)));
+                                            tvb_ip_to_str(tvb, offset2+l));
                      proto_tree_add_text(lmp_subobj_tree, tvb, offset2+l, 4,
                                          "Interface ID: IPv4: %s",
-                                         ip_to_str(tvb_get_ptr(tvb, offset2+l, 4)));
+                                         tvb_ip_to_str(tvb, offset2+l));
                      l += 4;
                      break;
 
                  case 2:
                      if (j < 4)
-                         proto_item_append_text(ti, ": [IPv6-%s",
-                                                ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset2+l, 16)));
-                     proto_item_append_text(ti2, ": IPv6 %s",
-                                            ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset2+l, 16)));
+                         proto_item_append_text(ti, ": [IPv6-%s", tvb_ip6_to_str(tvb, offset2+l));
+                     proto_item_append_text(ti2, ": IPv6 %s", tvb_ip6_to_str(tvb, offset2+l));
                      proto_tree_add_text(lmp_subobj_tree, tvb, offset2, 16, "Interface ID: IPv6: %s",
-                                         ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset2+l, 16)));
+                                         tvb_ip6_to_str(tvb, offset2+l));
                      l += 16;
                      break;
 
                  case 3:
                      if (j < 4)
-                         proto_item_append_text(ti, ": [Unnum-%d", 
+                         proto_item_append_text(ti, ": [Unnum-%d",
                                                 tvb_get_ntohl(tvb, offset2+l));
-                     proto_item_append_text(ti, ": Unnumbered %d", 
+                     proto_item_append_text(ti, ": Unnumbered %d",
                                             tvb_get_ntohl(tvb, offset2+l));
                      proto_tree_add_text(lmp_subobj_tree, tvb, offset2+l, 4,
                                          "Interface ID: Unnumbered: %d",
@@ -1363,7 +1355,7 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                      break;
                  }
                  if (l == obj_length - 4) break;
-                 
+
                  proto_tree_add_text(lmp_subobj_tree, tvb, offset2+l, 1,
                                      tvb_get_guint8(tvb, offset2+l) & 0x80 ?
                                      "Link Allocated - Active Monitoring" :
@@ -1394,13 +1386,13 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                  case 1:
                      proto_tree_add_text(lmp_object_tree, tvb, offset2+l, 4,
                                          "Interface ID: IPv4: %s",
-                                         ip_to_str(tvb_get_ptr(tvb, offset2+l, 4)));
+                                         tvb_ip_to_str(tvb, offset2+l));
                      l += 4;
                      break;
 
                  case 2:
                      proto_tree_add_text(lmp_object_tree, tvb, offset2+l, 16, "Interface ID: IPv6: %s",
-                                         ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset2+l,16)));
+                                         tvb_ip6_to_str(tvb, offset2+l));
                      l += 16;
                      break;
 
@@ -1412,7 +1404,7 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                      break;
 
                  default:
-                     proto_tree_add_text(lmp_object_tree, tvb, offset2+l, 
+                     proto_tree_add_text(lmp_object_tree, tvb, offset2+l,
                                          obj_length-4-l,
                                          "Data (%d bytes)", obj_length-4-l);
                      l = obj_length - 4;
@@ -1420,7 +1412,7 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                  }
              }
              break;
-             
+
          case LMP_CLASS_ERROR:
              l = tvb_get_ntohl(tvb, offset2);
              ti2 = proto_tree_add_uint(lmp_object_tree, hf_lmp_filter[LMPF_VAL_ERROR],
@@ -1434,7 +1426,7 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                                         (l&0x02) ? "Unwilling" : "",
                                         (l&0x04) ? "Unsupported-Transport" : "",
                                         (l&0x08) ? "TE-Link-ID" : "");
-                 lmp_flags_tree = proto_item_add_subtree(ti2, 
+                 lmp_flags_tree = proto_item_add_subtree(ti2,
                                                          lmp_subtree[LMP_TREE_ERROR_FLAGS]);
                  proto_tree_add_boolean(lmp_flags_tree,
                                         hf_lmp_filter[LMPF_VAL_ERROR_VERIFY_UNSUPPORTED_LINK],
@@ -1458,7 +1450,7 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                                           (l&0x08) ? "Bad-Data-Link" : "",
                                           (l&0x10) ? "Bad-TE-Link-CType" : "",
                                           (l&0x20) ? "Bad-Data-Link-CType" : "");
-                   lmp_flags_tree = proto_item_add_subtree(ti2, 
+                   lmp_flags_tree = proto_item_add_subtree(ti2,
                                                            lmp_subtree[LMP_TREE_ERROR_FLAGS]);
                    proto_tree_add_boolean(lmp_flags_tree,
                                           hf_lmp_filter[LMPF_VAL_ERROR_SUMMARY_BAD_PARAMETERS],
@@ -1479,13 +1471,13 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                                           hf_lmp_filter[LMPF_VAL_ERROR_SUMMARY_UNKNOWN_DL_CTYPE],
                                           tvb, offset, 4, l);
                    break;
-                   
+
              case 3:
                  proto_item_append_text(ti, ": TRACE_ERROR: %s%s%s",
                                         (l&0x01) ? "Unsupported Trace Type " : "",
                                         (l&0x02) ? "Invalid Trace Message" : "",
                                         (l&0x10) ? "Unknown Object C-Type" : "");
-                 lmp_flags_tree = proto_item_add_subtree(ti2, 
+                 lmp_flags_tree = proto_item_add_subtree(ti2,
                                                          lmp_subtree[LMP_TREE_ERROR_FLAGS]);
                  proto_tree_add_boolean(lmp_flags_tree,
                                         hf_lmp_filter[LMPF_VAL_ERROR_TRACE_UNSUPPORTED_TYPE],
@@ -1505,7 +1497,7 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                                         (l&0x04) ? "DA DCN mismatch" : "",
                                         (l&0x08) ? "Capability mismatch" : "",
                                         (l&0x10) ? "Unknown Object C-Type" : "");
-                 lmp_flags_tree = proto_item_add_subtree(ti2, 
+                 lmp_flags_tree = proto_item_add_subtree(ti2,
                                                          lmp_subtree[LMP_TREE_ERROR_FLAGS]);
                  proto_tree_add_boolean(lmp_flags_tree,
                                         hf_lmp_filter[LMPF_VAL_ERROR_LAD_AREA_ID_MISMATCH],
@@ -1531,25 +1523,25 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                  break;
              }
              break;
-             
+
           case LMP_CLASS_TRACE:
              switch (type) {
              case 1:
                  l = tvb_get_ntohs(tvb, offset2);
-                 proto_tree_add_uint(lmp_object_tree, 
+                 proto_tree_add_uint(lmp_object_tree,
                                      hf_lmp_filter[LMPF_VAL_TRACE_LOCAL_TYPE],
                                      tvb, offset2, 2, l);
                  proto_item_append_text(lmp_object_tree, ": %s",
                                         val_to_str(l, lmp_trace_type_str, "Unknown (%d)"));
 
                  l = tvb_get_ntohs(tvb, offset2+2);
-                 proto_tree_add_uint(lmp_object_tree, 
+                 proto_tree_add_uint(lmp_object_tree,
                                      hf_lmp_filter[LMPF_VAL_TRACE_LOCAL_LEN],
                                      tvb, offset2+2, 2, l);
                  if (l && l <= obj_length - 8) {
                    proto_item_append_text(lmp_object_tree, " = %s",
                                           tvb_format_text(tvb, offset2+4, l));
-                   proto_tree_add_string(lmp_object_tree, 
+                   proto_tree_add_string(lmp_object_tree,
                                          hf_lmp_filter[LMPF_VAL_TRACE_LOCAL_MSG],
                                          tvb, offset2+4, l, tvb_format_text(tvb,
                                                                             offset2+4,l));
@@ -1561,19 +1553,19 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
              case 2:
                  l = tvb_get_ntohs(tvb, offset2);
-                 proto_tree_add_uint(lmp_object_tree, 
+                 proto_tree_add_uint(lmp_object_tree,
                                      hf_lmp_filter[LMPF_VAL_TRACE_REMOTE_TYPE],
                                      tvb, offset2, 2, l);
                  proto_item_append_text(lmp_object_tree, ": %s",
                                         val_to_str(l, lmp_trace_type_str, "Unknown (%d)"));
 
                  l = tvb_get_ntohs(tvb, offset2+2);
-                 proto_tree_add_uint(lmp_object_tree, 
+                 proto_tree_add_uint(lmp_object_tree,
                                      hf_lmp_filter[LMPF_VAL_TRACE_REMOTE_LEN],
                                      tvb, offset2+2, 2, l);
                  proto_item_append_text(lmp_object_tree, " = %s",
                                         tvb_format_text(tvb, offset2+4, l));
-                 proto_tree_add_string(lmp_object_tree, 
+                 proto_tree_add_string(lmp_object_tree,
                                        hf_lmp_filter[LMPF_VAL_TRACE_REMOTE_MSG],
                                        tvb, offset2+4, l, tvb_format_text(tvb, offset2+4,l));
                  break;
@@ -1582,7 +1574,7 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                  proto_tree_add_text(lmp_object_tree, tvb, offset2, mylen,
                                      "Data (%d bytes)", mylen);
                  break;
-              
+
              }
              break;
 
@@ -1590,7 +1582,7 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
              switch (type) {
              case 1:
                  l = tvb_get_ntohs(tvb, offset2);
-                 proto_tree_add_uint(lmp_object_tree, 
+                 proto_tree_add_uint(lmp_object_tree,
                                      hf_lmp_filter[LMPF_VAL_TRACE_REQ_TYPE],
                                      tvb, offset2, 2, l);
                  proto_item_append_text(lmp_object_tree, ": %s",
@@ -1601,7 +1593,7 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                  proto_tree_add_text(lmp_object_tree, tvb, offset2, mylen,
                                      "Data (%d bytes)", mylen);
                  break;
-              
+
              }
              break;
 
@@ -1612,49 +1604,49 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
              case 1:
                  /* Supported Signaling Protocols Object */
-                 
+
                  /* Signaling Protocols */
                  l = tvb_get_guint8(tvb, offset2);
-                 
-                 ti2 = proto_tree_add_uint(lmp_object_tree, 
+
+                 ti2 = proto_tree_add_uint(lmp_object_tree,
                                            hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_SP_FLAGS],
                                            tvb, offset2, 1, l);
                  proto_item_append_text(ti2, ": %s %s",
                                         (l & 0x01) ? "RSVP-based UNI signaling supported " : "",
                                         (l & 0x02) ? "LDP-based UNI signaling supported " : "");
-                 
-                 lmp_flags_tree = proto_item_add_subtree(ti2, 
+
+                 lmp_flags_tree = proto_item_add_subtree(ti2,
                                                          lmp_subtree[LMP_TREE_SERVICE_CONFIG_SP_FLAGS]);
-                 
+
                  proto_tree_add_boolean(lmp_flags_tree,
                                         hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_SP_FLAGS_RSVP],
                                         tvb, offset2, 1, l);
-                 
+
                  proto_tree_add_boolean(lmp_flags_tree,
                                         hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_SP_FLAGS_LDP],
                                         tvb, offset2, 1, l);
-                 
+
                  /* UNI version */
-                 proto_tree_add_text(lmp_object_tree, tvb, offset2+1, 1, 
-                                     "UNI Version: %u", 
+                 proto_tree_add_text(lmp_object_tree, tvb, offset2+1, 1,
+                                     "UNI Version: %u",
                                      tvb_get_guint8(tvb, offset2+1));
                  break;
-                 
+
              case 2:
                  /* Client Port-Level Service Attributes Object */
-                 
+
                  /* Link Type */
                  proto_tree_add_text(lmp_object_tree, tvb, offset2, 1,
                                      "Link Type: %s",
                                      val_to_str(tvb_get_guint8(tvb, offset2),
-                                                service_attribute_link_type_str, 
+                                                service_attribute_link_type_str,
                                                 "UNK (%u). "));
-                 
+
                  proto_item_append_text(lmp_object_tree, "%s",
                                         val_to_str(tvb_get_guint8(tvb, offset2),
                                                    service_attribute_link_type_str,
                                                    "Unknown (%u). "));
-                 
+
                  l = tvb_get_guint8(tvb, offset2+1);
                  /* Signal type for SDH */
                  if (l == LMP_CLASS_SERVICE_CONFIG_CPSA_SIGNAL_TYPES_SDH) {
@@ -1664,13 +1656,13 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                                          val_to_str(tvb_get_guint8(tvb, offset2+1),
                                                     service_attribute_signal_types_sdh_str,
                                                     "Unknown (%u).  "));
-                     
+
                      proto_item_append_text(lmp_object_tree, "%s",
                                             val_to_str(tvb_get_guint8(tvb, offset2+1),
                                                        service_attribute_signal_types_sdh_str,
                                                        "Unknown (%u).   "));
                  }
-                 
+
                  if (l == LMP_CLASS_SERVICE_CONFIG_CPSA_SIGNAL_TYPES_SONET) {
                      /* Signal types for a SONET link */
                      proto_tree_add_text(lmp_object_tree, tvb, offset2+1, 1,
@@ -1678,197 +1670,195 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                                          val_to_str(tvb_get_guint8(tvb, offset2+1),
                                                     service_attribute_signal_types_sonet_str,
                                                     "Unknown (%u).  "));
-                     
+
                      proto_item_append_text(lmp_object_tree, "%s",
                                             val_to_str(tvb_get_guint8(tvb, offset2+1),
                                                        service_attribute_signal_types_sonet_str,
                                                        "Unknown (%u).   "));
                  }
-                 
+
                  /* TP Transparency */
                  l = tvb_get_guint8(tvb, offset2+2);
-                 ti2 = proto_tree_add_uint(lmp_object_tree, 
+                 ti2 = proto_tree_add_uint(lmp_object_tree,
                                            hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_TP_FLAGS],
                                            tvb, offset2+2, 1, l);
-                 
+
                  proto_item_append_text(ti2, ": %s%s%s",
                                         (l & 0x01) ? "Path/VC Overhead Transparency " : "",
                                         (l & 0x02) ? "Line/MS Overhead Transparency " : "",
                                         (l & 0x04) ? "Section/RS Overhead Transparency " : "");
-                 
-                 lmp_flags_tree = proto_item_add_subtree(ti2, 
+
+                 lmp_flags_tree = proto_item_add_subtree(ti2,
                                                          lmp_subtree[LMP_TREE_SERVICE_CONFIG_CPSA_TP_FLAGS]);
-                 
+
                  proto_tree_add_boolean(lmp_flags_tree,
                                         hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_TP_FLAGS_PATH_OVERHEAD],
                                         tvb, offset2+2, 1, l);
-                 
+
                  proto_tree_add_boolean(lmp_flags_tree,
                                         hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_TP_FLAGS_LINE_OVERHEAD],
                                         tvb, offset2+2, 1, l);
-                 
+
                  proto_tree_add_boolean(lmp_flags_tree,
                                         hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_TP_FLAGS_SECTION_OVERHEAD],
                                         tvb, offset2+2, 1, l);
-                 
+
                  /* Contiguous Concatentation Types */
                  l = tvb_get_guint8(tvb, offset2+3);
-                 ti2 = proto_tree_add_uint(lmp_object_tree, 
+                 ti2 = proto_tree_add_uint(lmp_object_tree,
                                            hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_CCT_FLAGS],
                                            tvb, offset2+3, 1, l);
-                 
-                 lmp_flags_tree = proto_item_add_subtree(ti2, 
+
+                 lmp_flags_tree = proto_item_add_subtree(ti2,
                                                          lmp_subtree[LMP_TREE_SERVICE_CONFIG_CPSA_CCT_FLAGS]);
-                 
+
                  proto_tree_add_boolean(lmp_flags_tree,
                                         hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_CCT_FLAGS_CC_SUPPORTED],
                                         tvb, offset2+3, 1, l);
-                 
+
                  /* Min and Max NCC */
                  proto_item_append_text(ti, ": Minimum NCC: %d, Maximum NCC: %d",
-                                        tvb_get_ntohs(tvb, offset2+4), 
+                                        tvb_get_ntohs(tvb, offset2+4),
                                         tvb_get_ntohs(tvb, offset2+6));
-                 
-                 proto_tree_add_uint(lmp_object_tree, 
+
+                 proto_tree_add_uint(lmp_object_tree,
                                      hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_MIN_NCC],
-                                     tvb, offset2+4, 2, 
+                                     tvb, offset2+4, 2,
                                      tvb_get_ntohs(tvb, offset2+4));
-                 
-                 proto_tree_add_uint(lmp_object_tree, 
+
+                 proto_tree_add_uint(lmp_object_tree,
                                      hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_MAX_NCC],
-                                     tvb, offset2+6, 2, 
+                                     tvb, offset2+6, 2,
                                      tvb_get_ntohs(tvb, offset2+6));
-                 
+
                  /* Min and Max NVC */
                  proto_item_append_text(ti, ": Minimum NVC: %d, Maximum NVC: %d",
-                                        tvb_get_ntohs(tvb, offset2+8), 
+                                        tvb_get_ntohs(tvb, offset2+8),
                                         tvb_get_ntohs(tvb, offset2+10));
-                 
-                 proto_tree_add_uint(lmp_object_tree, 
+
+                 proto_tree_add_uint(lmp_object_tree,
                                      hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_MIN_NVC],
-                                     tvb, offset2+8, 2, 
+                                     tvb, offset2+8, 2,
                                      tvb_get_ntohs(tvb, offset2+8));
-                 
-                 proto_tree_add_uint(lmp_object_tree, 
+
+                 proto_tree_add_uint(lmp_object_tree,
                                      hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_MAX_NVC],
-                                     tvb, offset2+10, 2, 
+                                     tvb, offset2+10, 2,
                                      tvb_get_ntohs(tvb, offset2+10));
-                 
+
                  /* Local interface ID */
                  proto_item_append_text(ti, ": Local Interface ID %s",
-                                        ip_to_str(tvb_get_ptr(tvb, offset2+12, 4)));
-                 
-                 proto_tree_add_item(lmp_object_tree, 
+                                        tvb_ip_to_str(tvb, offset2+12));
+
+                 proto_tree_add_item(lmp_object_tree,
                                      hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_INTERFACE_ID],
                                      tvb, offset2+12, 4, FALSE);
-                 
+
                  break;
-                 
+
              case 3:
 
                  /* Network Transparency Support and TCM Monitoring Object */
-                 
+
                  /* Transparency */
                  l = tvb_get_ntohl(tvb, offset2);
-                 ti2 = proto_tree_add_uint(lmp_object_tree, 
+                 ti2 = proto_tree_add_uint(lmp_object_tree,
                                            hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_NSA_TRANSPARENCY_FLAGS],
                                            tvb, offset2, 4, l);
-                 
+
                  proto_item_append_text(ti2, ": %s %s",
                                         (l & 0x01) ? "Standard SOH/RSOH transparency supported " : "",
                                         (l & 0x02) ? "Standard LOH/MSOH transparency supported " : "");
-                 
-                 lmp_flags_tree = proto_item_add_subtree(ti2, 
+
+                 lmp_flags_tree = proto_item_add_subtree(ti2,
                                                          lmp_subtree[LMP_TREE_SERVICE_CONFIG_NSA_TRANSPARENCY_FLAGS]);
-                 
+
                  proto_tree_add_boolean(lmp_flags_tree,
                                         hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_NSA_TRANSPARENCY_FLAGS_SOH],
                                         tvb, offset2, 4, l);
-                 
+
                  proto_tree_add_boolean(lmp_flags_tree,
                                         hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_NSA_TRANSPARENCY_FLAGS_LOH],
                                         tvb, offset2, 4, l);
-                 
+
                  /* TCM Monitoring */
                  l = tvb_get_guint8(tvb, offset2+7);
-                 
+
                  ti2 = proto_tree_add_uint(lmp_object_tree,
                                            hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_NSA_TCM_FLAGS],
                                            tvb, offset2+7, 1, l);
-                 
+
                  proto_item_append_text(ti2, ": %s",
                                         (l & 0x01) ? "Transparent Support of TCM available " :  "");
-                 
+
                  proto_tree_add_boolean(lmp_flags_tree,
                                         hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_NSA_TCM_FLAGS_TCM_SUPPORTED],
                                         tvb, offset2+7, 1, l);
-                 
+
                  break;
-                 
+
              case 4:
-                 
+
                  /* Network Diversity Object */
                  l = tvb_get_guint8(tvb,offset2+3);
-                 
-                 ti2 = proto_tree_add_uint(lmp_object_tree, 
+
+                 ti2 = proto_tree_add_uint(lmp_object_tree,
                                            hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_NSA_NETWORK_DIVERSITY_FLAGS],
                                            tvb, offset2+3, 1, l);
-                 
+
                  proto_item_append_text(ti2, ": %s%s%s",
                                         (l & 0x01) ? "Node Diversity is supported " :  "",
                                         (l & 0x02) ? "Link Diversity is supported " : "",
                                         (l & 0x04) ? "SRLG Diversity is supported " : "");
-                 
-                 
-                 lmp_flags_tree = proto_item_add_subtree(ti2, 
+
+
+                 lmp_flags_tree = proto_item_add_subtree(ti2,
                                                          lmp_subtree[LMP_TREE_SERVICE_CONFIG_NSA_NETWORK_DIVERSITY_FLAGS]);
-                 
+
                  proto_tree_add_boolean(lmp_flags_tree,
                                         hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_NSA_NETWORK_DIVERSITY_FLAGS_NODE],
                                         tvb, offset2+3, 1, l);
-                 
+
                  proto_tree_add_boolean(lmp_flags_tree,
                                         hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_NSA_NETWORK_DIVERSITY_FLAGS_LINK],
                                         tvb, offset2+3, 1, l);
-                 
+
                  proto_tree_add_boolean(lmp_flags_tree,
                                         hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_NSA_NETWORK_DIVERSITY_FLAGS_SRLG],
                                         tvb, offset2+3, 1, l);
                  break;
-                 
+
              default:
                  /* Unknown type in Service Config object */
                  proto_tree_add_text(lmp_object_tree, tvb, offset2, mylen,
                                      "Data (%d bytes)", mylen);
                  break;
              }
-             
+
          case LMP_CLASS_DA_DCN_ADDRESS:
              switch(type) {
-                 
+
              case 1:
                  l = LMPF_VAL_LOCAL_DA_DCN_ADDR;
-                 proto_item_append_text(ti, ": %s",
-                                        ip_to_str(tvb_get_ptr(tvb, offset2, 4)));
-                 proto_tree_add_item(lmp_object_tree, hf_lmp_filter[l], tvb, 
+                 proto_item_append_text(ti, ": %s", tvb_ip_to_str(tvb, offset2));
+                 proto_tree_add_item(lmp_object_tree, hf_lmp_filter[l], tvb,
                                      offset2, 4, FALSE);
                  break;
-                 
+
              case 2:
                  l = LMPF_VAL_REMOTE_DA_DCN_ADDR;
-                 proto_item_append_text(ti, ": %s",
-                                        ip_to_str(tvb_get_ptr(tvb, offset2, 4)));
-                 proto_tree_add_item(lmp_object_tree, hf_lmp_filter[l], tvb, 
+                 proto_item_append_text(ti, ": %s", tvb_ip_to_str(tvb, offset2));
+                 proto_tree_add_item(lmp_object_tree, hf_lmp_filter[l], tvb,
                                      offset2, 4, FALSE);
                  break;
-                 
+
              default:
                  proto_tree_add_text(lmp_object_tree, tvb, offset2, mylen,
                                      "Data (%d bytes)", mylen);
                  break;
              }
              break;
-             
+
 
          case LMP_CLASS_LOCAL_LAD_INFO:
              switch(type) {
@@ -1895,10 +1885,10 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                  l = 24;
                  while (l < obj_length - 4) {
                    mylen = tvb_get_guint8(tvb, offset2+l+1);
-                   ti2 = proto_tree_add_item(lmp_object_tree, 
+                   ti2 = proto_tree_add_item(lmp_object_tree,
                                            hf_lmp_filter[LMPF_VAL_LAD_INFO_SUBOBJ],
                                            tvb, offset2+l, mylen, FALSE);
-                   lmp_subobj_tree = proto_item_add_subtree(ti2, 
+                   lmp_subobj_tree = proto_item_add_subtree(ti2,
                                                             lmp_subtree[LMP_TREE_LAD_INFO_SUBOBJ]);
                    proto_tree_add_text(lmp_subobj_tree, tvb, offset2+l, 1,
                                        "Subobject Type: %d", tvb_get_guint8(tvb, offset2+l));
@@ -1918,9 +1908,9 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                        proto_item_set_text(ti2, "Primary Routing Controller: "
                                            "Area ID: %s, RC PC ID: %s, "
                                            "RC PC Addr: %s",
-                                           ip_to_str(tvb_get_ptr(tvb, offset2+l+4, 4)),
-                                           ip_to_str(tvb_get_ptr(tvb, offset2+l+8, 4)),
-                                           ip_to_str(tvb_get_ptr(tvb, offset2+l+12, 4)));
+                                           tvb_ip_to_str(tvb, offset2+l+4),
+                                           tvb_ip_to_str(tvb, offset2+l+8),
+                                           tvb_ip_to_str(tvb, offset2+l+12));
                        proto_tree_add_item(lmp_subobj_tree,
                                            hf_lmp_filter[LMPF_VAL_LAD_INFO_SUBOBJ_PRI_AREA_ID],
                                            tvb, offset2+l+4, 4, FALSE);
@@ -1931,14 +1921,14 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                                            hf_lmp_filter[LMPF_VAL_LAD_INFO_SUBOBJ_PRI_RC_PC_ADDR],
                                            tvb, offset2+l+12, 4, FALSE);
                        break;
-                     
+
                      case 251:
                        proto_item_set_text(ti2, "Secondary Routing Controller: "
                                            "Area ID: %s, RC PC ID: %s, "
                                            "RC PC Addr: %s",
-                                           ip_to_str(tvb_get_ptr(tvb, offset2+l+4, 4)),
-                                           ip_to_str(tvb_get_ptr(tvb, offset2+l+8, 4)),
-                                           ip_to_str(tvb_get_ptr(tvb, offset2+l+12, 4)));
+                                           tvb_ip_to_str(tvb, offset2+l+4),
+                                           tvb_ip_to_str(tvb, offset2+l+8),
+                                           tvb_ip_to_str(tvb, offset2+l+12));
                        proto_tree_add_item(lmp_subobj_tree,
                                            hf_lmp_filter[LMPF_VAL_LAD_INFO_SUBOBJ_SEC_AREA_ID],
                                            tvb, offset2+l+4, 4, FALSE);
@@ -1949,7 +1939,7 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                                            hf_lmp_filter[LMPF_VAL_LAD_INFO_SUBOBJ_SEC_RC_PC_ADDR],
                                            tvb, offset2+l+12, 4, FALSE);
                        break;
-                     
+
                      case 252:
                        proto_item_set_text(ti2, "SONET/SDH Layer Capability: "
                                            "Switching Cap: %s, Encoding Type: %s",
@@ -1985,16 +1975,16 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                      THROW(ReportedBoundsError);
                  l += tvb_get_guint8(tvb, offset2+l+1);
              }
-             
+
                  break;
-                 
+
              default:
                  proto_tree_add_text(lmp_object_tree, tvb, offset2, mylen,
                                      "Data (%d bytes)", mylen);
                  break;
              }
              break;
-             
+
 
 
          default:
@@ -2002,15 +1992,15 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                                  "Data (%d bytes)", mylen);
              break;
          }
-         
+
          if (obj_length < 1)
              THROW(ReportedBoundsError);
          offset += obj_length;
          len += obj_length;
-         
+
        } /* while */
     } /* tree */
-    
+
     return tvb_length(tvb);
 }
 static void
@@ -2045,7 +2035,7 @@ proto_register_lmp(void)
 {
     static gint *ett[NUM_LMP_SUBTREES];
     int i;
-    
+
        static hf_register_info lmpf_info[] = {
 
           /* Message type number */
@@ -2369,7 +2359,7 @@ proto_register_lmp(void)
                { "Data Link Type", "lmp.begin_verify.link_type",
                  FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }},
           {&hf_lmp_filter[LMPF_VAL_BEGIN_VERIFY_ENCTYPE],
-               { "Encoding Type", "lmp.begin_verify.enctype", 
+               { "Encoding Type", "lmp.begin_verify.enctype",
                  FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(&gmpls_lsp_enc_rvals), 0x0,
                        NULL, HFILL }},
           {&hf_lmp_filter[LMPF_VAL_VERIFY_ID],
@@ -2529,67 +2519,67 @@ proto_register_lmp(void)
                  VALS(lmp_trace_type_str), 0x0, NULL, HFILL }},
 
           {&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_SP_FLAGS],
-               { "Service Config - Supported Signalling Protocols", 
+               { "Service Config - Supported Signalling Protocols",
                "lmp.service_config.sp", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}},
 
           {&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_SP_FLAGS_RSVP],
-          { "RSVP is supported", "lmp.service_config.sp.rsvp", 
+          { "RSVP is supported", "lmp.service_config.sp.rsvp",
                 FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL}},
 
           {&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_SP_FLAGS_LDP],
-               { "LDP is supported", "lmp.service_config.sp.ldp", 
+               { "LDP is supported", "lmp.service_config.sp.ldp",
                  FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL}},
 
           {&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_TP_FLAGS],
-               { "Client Port Service Attributes", "lmp.service_config.cpsa", 
+               { "Client Port Service Attributes", "lmp.service_config.cpsa",
                  FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}},
 
           {&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_TP_FLAGS_PATH_OVERHEAD],
-               { "Path/VC Overhead Transparency Supported", 
-                 "lmp.service_config.cpsa.path_overhead", 
+               { "Path/VC Overhead Transparency Supported",
+                 "lmp.service_config.cpsa.path_overhead",
                  FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL}},
 
           {&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_TP_FLAGS_LINE_OVERHEAD],
-               { "Line/MS Overhead Transparency Supported", 
-                 "lmp.service_config.cpsa.line_overhead", 
+               { "Line/MS Overhead Transparency Supported",
+                 "lmp.service_config.cpsa.line_overhead",
                  FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL}},
 
           {&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_TP_FLAGS_SECTION_OVERHEAD],
-               { "Section/RS Overhead Transparency Supported", 
-                 "lmp.service_config.cpsa.section_overhead", 
+               { "Section/RS Overhead Transparency Supported",
+                 "lmp.service_config.cpsa.section_overhead",
                  FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL}},
 
           {&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_CCT_FLAGS],
-               { "Contiguous Concatenation Types", "lmp.service_config.cct", 
+               { "Contiguous Concatenation Types", "lmp.service_config.cct",
                  FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}},
 
           {&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_CCT_FLAGS_CC_SUPPORTED],
-               { "Contiguous Concatenation Types Supported", 
-                 "lmp.service_config.cpsa.line_overhead", 
+               { "Contiguous Concatenation Types Supported",
+                 "lmp.service_config.cpsa.line_overhead",
                  FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL}},
 
-          {&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_MIN_NCC], 
-               { "Minimum Number of Contiguously Concatenated Components", 
+          {&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_MIN_NCC],
+               { "Minimum Number of Contiguously Concatenated Components",
                  "lmp.service_config.cpsa.min_ncc",
-                 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}}, 
+                 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}},
 
-          {&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_MAX_NCC], 
-               { "Maximum Number of Contiguously Concatenated Components", 
+          {&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_MAX_NCC],
+               { "Maximum Number of Contiguously Concatenated Components",
                  "lmp.service_config.cpsa.max_ncc",
-                 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}}, 
+                 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}},
 
-          {&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_MIN_NVC], 
-               { "Maximum Number of Contiguously Concatenated Components", 
+          {&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_MIN_NVC],
+               { "Maximum Number of Contiguously Concatenated Components",
                  "lmp.service_config.cpsa.min_nvc",
-                 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}}, 
+                 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}},
 
-          {&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_MAX_NVC], 
-               { "Minimum Number of Virtually Concatenated Components", 
+          {&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_MAX_NVC],
+               { "Minimum Number of Virtually Concatenated Components",
                  "lmp.service_config.cpsa.max_nvc",
                  FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}},
 
-          {&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_INTERFACE_ID], 
-               { "Local interface id of the client interface referred to", 
+          {&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_INTERFACE_ID],
+               { "Local interface id of the client interface referred to",
                  "lmp.service_config.cpsa.local_ifid",
                  FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL}},
 
@@ -2609,8 +2599,8 @@ proto_register_lmp(void)
                  FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL}},
 
           {&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_NSA_TCM_FLAGS],
-               { "TCM Monitoring", 
-               "lmp.service_config.nsa.tcm", 
+               { "TCM Monitoring",
+               "lmp.service_config.nsa.tcm",
                  FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}},
 
           {&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_NSA_TCM_FLAGS_TCM_SUPPORTED],
@@ -2619,10 +2609,10 @@ proto_register_lmp(void)
                  FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL}},
 
           {&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_NSA_NETWORK_DIVERSITY_FLAGS],
-               { "Network Diversity Flags", 
-               "lmp.service_config.nsa.diversity", 
+               { "Network Diversity Flags",
+               "lmp.service_config.nsa.diversity",
                  FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}},
-          
+
           {&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_NSA_NETWORK_DIVERSITY_FLAGS_NODE],
                { "Node diversity supported",
                  "lmp.service_config.nsa.diversity.node",
@@ -2696,7 +2686,7 @@ proto_register_lmp(void)
        lmp_subtree[i] = -1;
        ett[i] = &lmp_subtree[i];
     }
-    
+
     proto_lmp = proto_register_protocol("Link Management Protocol (LMP)",
                                        "LMP", "lmp");
     proto_register_field_array(proto_lmp, lmpf_info, array_length(lmpf_info));
index ec1a925614dae53fd1b5685634c5bf4adb1c8397..0cc5a0990fa654cabf4d17eaeb2bbd3e04158a1e 100644 (file)
@@ -3,7 +3,7 @@
  * Copyright 2000, Stefan Raab <sraab@cisco.com>
  * Copyright 2007, Ville Nuorvala <Ville.Nuorvala@secgo.com>
  * Copyright 2009, Ohuchi Munenori <ohuchi_at_iij.ad.jp>
- * Copyright 2010, Yi Ren          <yi_ren1@agilent.com> 
+ * Copyright 2010, Yi Ren          <yi_ren1@agilent.com>
  *
  * $Id$
  *
@@ -389,11 +389,11 @@ static const value_string mip_pmipv4skipext_accesstechnology_types[]= {
 };
 
 static const value_string mip_cvse_verizon_cvse_types[]= {
-  {0, "Reserved"},     
+  {0, "Reserved"},
   {1, "MIP Key Request"},
-  {2, "MIP Key Data"}, 
-  {3, "AAA Authenticator"},   
-  {4, "Public Key Invalid"},  
+  {2, "MIP Key Data"},
+  {3, "AAA Authenticator"},
+  {4, "Public Key Invalid"},
   {0, NULL}
 };
 
@@ -419,7 +419,7 @@ dissect_mip_extensions( tvbuff_t *tvb, int offset, proto_tree *tree)
   guint32       cvse_vendor_id;
   guint16       cvse_vendor_type;
   int           cvse_local_offset= 0;
-  
+
   /* None of this really matters if we don't have a tree */
   if (!tree) return;
 
@@ -447,7 +447,7 @@ dissect_mip_extensions( tvbuff_t *tvb, int offset, proto_tree *tree)
           * the length field
          */
          ext_len = tvb_get_ntohs(tvb, offset + 2);
-         hdrLen = 4;     
+         hdrLen = 4;
        }
        else {
          ext_len = tvb_get_guint8(tvb, offset + 1);
@@ -462,7 +462,7 @@ dissect_mip_extensions( tvbuff_t *tvb, int offset, proto_tree *tree)
 
        proto_tree_add_item(ext_tree, hf_mip_ext_type, tvb, offset, 1, ext_type);
        offset++;
-       if (ext_type != GEN_AUTH_EXT && 
+       if (ext_type != GEN_AUTH_EXT &&
                ext_type != PMIPv4_NON_SKIP_EXT &&
                ext_type != CVSE_EXT) {
          /* Another nasty hack since GEN_AUTH_EXT and PMIPv4_NON_SKIP_EXT broke everything */
@@ -506,7 +506,7 @@ dissect_mip_extensions( tvbuff_t *tvb, int offset, proto_tree *tree)
          tf = proto_tree_add_uint(ext_tree, hf_mip_rext_flags, tvb, offset, 2, flags);
          ext_flags_tree = proto_item_add_subtree(tf, ett_mip_flags);
          proto_tree_add_boolean(ext_flags_tree, hf_mip_rext_i, tvb, offset, 2, flags);
-         
+
          /* reserved */
          proto_tree_add_uint(ext_flags_tree, hf_mip_rext_reserved, tvb, offset, 2, flags);
          /* registration revocation timestamp */
@@ -530,7 +530,7 @@ dissect_mip_extensions( tvbuff_t *tvb, int offset, proto_tree *tree)
          proto_tree_add_item(ext_tree, hf_mip_utrqext_stype, tvb, offset, 1, FALSE);
 
          /* reserved 1 */
-         proto_tree_add_item(ext_tree, hf_mip_utrqext_reserved1, tvb, offset + 1, 1, FALSE);     
+         proto_tree_add_item(ext_tree, hf_mip_utrqext_reserved1, tvb, offset + 1, 1, FALSE);
 
          /* flags */
          flags = tvb_get_guint8(tvb, offset + 2);
@@ -540,19 +540,19 @@ dissect_mip_extensions( tvbuff_t *tvb, int offset, proto_tree *tree)
          proto_tree_add_boolean(ext_flags_tree, hf_mip_utrqext_r, tvb, offset + 2, 1, flags);
 
          /* reserved 2 */
-         proto_tree_add_uint(ext_flags_tree, hf_mip_utrqext_reserved2, tvb, offset + 2, 1, flags);       
+         proto_tree_add_uint(ext_flags_tree, hf_mip_utrqext_reserved2, tvb, offset + 2, 1, flags);
          /* encapsulation */
          proto_tree_add_item(ext_tree, hf_mip_utrqext_encap_type, tvb, offset + 3, 1, FALSE);
 
          /* reserved 3 */
-         proto_tree_add_item(ext_tree, hf_mip_utrqext_reserved3, tvb, offset + 4, 2, FALSE);     
+         proto_tree_add_item(ext_tree, hf_mip_utrqext_reserved3, tvb, offset + 4, 2, FALSE);
          break;
        case UDP_TUN_REP_EXT:   /* RFC 3519 */
          /* sub-type */
          proto_tree_add_item(ext_tree, hf_mip_utrpext_stype, tvb, offset, 1, FALSE);
 
          /* code */
-         proto_tree_add_item(ext_tree, hf_mip_utrpext_code, tvb, offset + 1, 1, FALSE);          
+         proto_tree_add_item(ext_tree, hf_mip_utrpext_code, tvb, offset + 1, 1, FALSE);
 
          /* flags */
          flags = tvb_get_ntohs(tvb, offset+2);
@@ -561,7 +561,7 @@ dissect_mip_extensions( tvbuff_t *tvb, int offset, proto_tree *tree)
          proto_tree_add_boolean(ext_flags_tree, hf_mip_utrpext_f, tvb, offset + 2, 2, flags);
 
          /* reserved */
-         proto_tree_add_uint(ext_flags_tree, hf_mip_utrpext_reserved, tvb, offset + 2, 2, flags);        
+         proto_tree_add_uint(ext_flags_tree, hf_mip_utrpext_reserved, tvb, offset + 2, 2, flags);
 
          /* keepalive interval */
          proto_tree_add_item(ext_tree, hf_mip_utrpext_keepalive, tvb, offset + 4, 2, FALSE);
@@ -571,9 +571,9 @@ dissect_mip_extensions( tvbuff_t *tvb, int offset, proto_tree *tree)
          proto_tree_add_item(ext_tree, hf_mip_pmipv4nonskipext_stype, tvb, offset, 1, ext_subtype);
          offset++;
           /* len */
-         proto_tree_add_item(ext_tree, hf_mip_ext_len, tvb, offset, 2, ext_len);         
+         proto_tree_add_item(ext_tree, hf_mip_ext_len, tvb, offset, 2, ext_len);
          offset+=2;
-         if(ext_subtype == 1){     
+         if(ext_subtype == 1){
            /* Sub-type == 1 : PMIPv4 Per-Node Authentication Method */
            proto_tree_add_item(ext_tree, hf_mip_pmipv4nonskipext_pernodeauthmethod, tvb, offset, 1, FALSE);
          }
@@ -581,12 +581,12 @@ dissect_mip_extensions( tvbuff_t *tvb, int offset, proto_tree *tree)
        case PMIPv4_SKIP_EXT:   /* draft-leung-mip4-proxy-mode */
          /* sub-type */
          ext_subtype = tvb_get_guint8(tvb, offset);
-         tp = proto_tree_add_text(ext_tree, tvb, offset, ext_len, 
+         tp = proto_tree_add_text(ext_tree, tvb, offset, ext_len,
                                   "PMIPv4 Sub-Type: %s",
                                   val_to_str(ext_subtype, mip_pmipv4skipext_stypes, "Unknown Sub-Type %u"));
          pmipv4_tree = proto_item_add_subtree(tp, ett_mip_pmipv4_ext);
          proto_tree_add_item(pmipv4_tree, hf_mip_pmipv4skipext_stype, tvb, offset, 1, ext_subtype);
-         
+
          if (ext_subtype == PMIPv4_SKIPEXT_STYPE_INTERFACE_ID) {
            proto_tree_add_item(pmipv4_tree, hf_mip_pmipv4skipext_interfaceid, tvb, offset + 1, ext_len-1, FALSE);
          } else if (ext_subtype == PMIPv4_SKIPEXT_STYPE_DEVICE_ID) {
@@ -594,13 +594,13 @@ dissect_mip_extensions( tvbuff_t *tvb, int offset, proto_tree *tree)
            proto_tree_add_item(pmipv4_tree, hf_mip_pmipv4skipext_deviceid_type, tvb, offset + 1, 1, pmipv4skipext_type);
            proto_tree_add_item(pmipv4_tree, hf_mip_pmipv4skipext_deviceid_id, tvb, offset + 2, ext_len - 2, FALSE);
          } else if (ext_subtype == PMIPv4_SKIPEXT_STYPE_SUBSCRIBER_ID) {
-           pmipv4skipext_type = tvb_get_guint8(tvb, offset + 1);           
+           pmipv4skipext_type = tvb_get_guint8(tvb, offset + 1);
            proto_tree_add_item(pmipv4_tree, hf_mip_pmipv4skipext_subscriberid_type, tvb, offset + 1, 1, pmipv4skipext_type);
-           if (pmipv4skipext_type == 1) {     
+           if (pmipv4skipext_type == 1) {
              proto_tree_add_item(pmipv4_tree, hf_mip_pmipv4skipext_subscriberid_id, tvb, offset + 2, ext_len - 2, FALSE);
            }
          } else if (ext_subtype == PMIPv4_SKIPEXT_STYPE_ACCESS_TECHNOLOGY) {
-           pmipv4skipext_type = tvb_get_guint8(tvb, offset + 1);           
+           pmipv4skipext_type = tvb_get_guint8(tvb, offset + 1);
            proto_tree_add_item(pmipv4_tree, hf_mip_pmipv4skipext_accesstechnology_type, tvb, offset + 1, 1, pmipv4skipext_type);
          }
          break;
@@ -616,26 +616,26 @@ dissect_mip_extensions( tvbuff_t *tvb, int offset, proto_tree *tree)
          offset+=2;
          /* Vendor/Org ID */
          /*Vendor ID & cvse type & cvse value are included in ext_len, so do not increment offset for them here.*/
-         cvse_local_offset = offset; 
-      proto_tree_add_item(ext_tree, hf_mip_cvse_vendor_org_id, tvb, cvse_local_offset, 4, FALSE);        
+         cvse_local_offset = offset;
+      proto_tree_add_item(ext_tree, hf_mip_cvse_vendor_org_id, tvb, cvse_local_offset, 4, FALSE);
          cvse_vendor_id = tvb_get_ntohl(tvb, cvse_local_offset);
          cvse_local_offset+=4;
          /*Vendor CVSE Type*/
          if( cvse_vendor_id == VENDOR_VERIZON ){
-           /*Verizon CVSE type*/       
-           proto_tree_add_item(ext_tree, hf_mip_cvse_verizon_cvse_type, tvb, cvse_local_offset, 2, FALSE);     
+           /*Verizon CVSE type*/
+           proto_tree_add_item(ext_tree, hf_mip_cvse_verizon_cvse_type, tvb, cvse_local_offset, 2, FALSE);
          }
          else{
            /*CVSE Type of Other vendor, just show raw numbers currently*/
            cvse_vendor_type = tvb_get_ntohs(tvb, cvse_local_offset);
-           proto_tree_add_uint(ext_tree, hf_mip_cvse_vendor_cvse_type, tvb, cvse_local_offset, 2, cvse_vendor_type);       
+           proto_tree_add_uint(ext_tree, hf_mip_cvse_vendor_cvse_type, tvb, cvse_local_offset, 2, cvse_vendor_type);
          }
          cvse_local_offset+=2;
          /* Vendor-CVSE-Value */
          /* Vendor CVSE Type+Vendor/Org ID = 6 bytes*/
-         proto_tree_add_item(ext_tree, hf_mip_cvse_vendor_cvse_value, tvb, cvse_local_offset, ext_len - 6, FALSE);             
+         proto_tree_add_item(ext_tree, hf_mip_cvse_vendor_cvse_value, tvb, cvse_local_offset, ext_len - 6, FALSE);
          break;
-         
+
        case OLD_CVSE_EXT:      /* RFC 3115 */
        case OLD_NVSE_EXT:      /* RFC 3115 */
        case NVSE_EXT:          /* RFC 3115 */
@@ -676,9 +676,9 @@ dissect_mip( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   case MIP_REGISTRATION_REQUEST:
        col_add_fstr(pinfo->cinfo, COL_INFO,
                       "Reg Request: HoA=%s HA=%s CoA=%s",
-                      ip_to_str(tvb_get_ptr(tvb,4,4)),
-                      ip_to_str(tvb_get_ptr(tvb,8,4)),
-                      ip_to_str(tvb_get_ptr(tvb,12,4)));
+                      tvb_ip_to_str(tvb, 4),
+                      tvb_ip_to_str(tvb, 8),
+                      tvb_ip_to_str(tvb, 12));
 
        if (tree) {
          ti = proto_tree_add_item(tree, proto_mip, tvb, offset, -1, FALSE);
@@ -731,8 +731,8 @@ dissect_mip( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   case MIP_REGISTRATION_REPLY:
        col_add_fstr(pinfo->cinfo, COL_INFO,
                       "Reg Reply: HoA=%s HA=%s, Code=%u",
-                      ip_to_str(tvb_get_ptr(tvb,4,4)), 
-                      ip_to_str(tvb_get_ptr(tvb,8,4)), 
+                      tvb_ip_to_str(tvb, 4),
+                      tvb_ip_to_str(tvb, 8),
                       tvb_get_guint8(tvb,1));
 
        if (tree) {
@@ -801,9 +801,9 @@ dissect_mip( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   case MIP_REGISTRATION_REVOCATION:
        col_add_fstr(pinfo->cinfo, COL_INFO,
                       "Reg Revocation: HoA=%s HDA=%s FDA=%s",
-                      ip_to_str(tvb_get_ptr(tvb,4,4)),
-                      ip_to_str(tvb_get_ptr(tvb,8,4)),
-                      ip_to_str(tvb_get_ptr(tvb,12,4)));
+                      tvb_ip_to_str(tvb, 4),
+                      tvb_ip_to_str(tvb, 8),
+                      tvb_ip_to_str(tvb, 12));
 
        if (tree) {
          ti = proto_tree_add_item(tree, proto_mip, tvb, offset, -1, FALSE);
@@ -847,7 +847,7 @@ dissect_mip( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        break;
   case MIP_REGISTRATION_REVOCATION_ACK:
          col_add_fstr(pinfo->cinfo, COL_INFO, "Reg Revocation Ack: HoA=%s",
-                      ip_to_str(tvb_get_ptr(tvb,4,4)));
+                      tvb_ip_to_str(tvb, 4));
 
        if (tree) {
          ti = proto_tree_add_item(tree, proto_mip, tvb, offset, -1, FALSE);
@@ -1032,7 +1032,7 @@ void proto_register_mip(void)
                        "Revocation Timestamp of Sending Agent", HFILL }
           },
          { &hf_mip_rev_reserved,
-                { "Reserved",                 "mip.rev.reserved", 
+                { "Reserved",                 "mip.rev.reserved",
                        FT_UINT8, BASE_HEX, NULL, 0x0,
                        NULL, HFILL}
          },
@@ -1047,7 +1047,7 @@ void proto_register_mip(void)
                        "Inform Mobile Node", HFILL }
           },
          { &hf_mip_rev_reserved2,
-                { "Reserved",                 "mip.rev.reserved2", 
+                { "Reserved",                 "mip.rev.reserved2",
                        FT_UINT16, BASE_HEX, NULL, 0x3fff,
                        NULL, HFILL}},
           { &hf_mip_hda,
@@ -1066,7 +1066,7 @@ void proto_register_mip(void)
                        "Revocation Identifier of Initiating Agent", HFILL }
           },
          { &hf_mip_ack_reserved,
-                { "Reserved",                 "mip.ack.reserved", 
+                { "Reserved",                 "mip.ack.reserved",
                        FT_UINT8, BASE_HEX, NULL, 0x0,
                        NULL, HFILL}
          },
@@ -1076,7 +1076,7 @@ void proto_register_mip(void)
                        "Inform Mobile Node", HFILL }
           },
          { &hf_mip_ack_reserved2,
-                { "Reserved",                 "mip.ack.reserved2", 
+                { "Reserved",                 "mip.ack.reserved2",
                        FT_UINT16, BASE_HEX, NULL, 0x7fff,
                        NULL, HFILL}},
          { &hf_mip_dhaext_stype,
@@ -1228,27 +1228,27 @@ void proto_register_mip(void)
                 { "CVSE Reserved",                "mip.ext.cvse.reserved",
                        FT_UINT8, BASE_HEX, NULL, 0x0,
                        NULL, HFILL }
-         },      
+         },
          { &hf_mip_cvse_vendor_org_id,
                 { "CVSE Vendor/org ID",                "mip.ext.cvse.vendor_id",
                         FT_UINT32, BASE_DEC|BASE_EXT_STRING, &sminmpec_values_ext, 0,
                        NULL, HFILL }
-         },      
+         },
          { &hf_mip_cvse_verizon_cvse_type ,
                 { "Verizon CVSE Type",                "mip.ext.cvse.verizon_type",
                        FT_UINT16, BASE_DEC, VALS(mip_cvse_verizon_cvse_types), 0,
                        NULL, HFILL }
-         },      
+         },
          { &hf_mip_cvse_vendor_cvse_type ,
                 { "Vendor CVSE Type",                "mip.ext.cvse.vendor_type",
                        FT_UINT16, BASE_HEX, NULL, 0x0,
                        NULL, HFILL }
-         },          
+         },
          { &hf_mip_cvse_vendor_cvse_value ,
                 { "Vendor CVSE Value",                "mip.ext.cvse.vendor_value",
                        FT_BYTES, BASE_NONE, NULL, 0,
                        NULL, HFILL }
-         }         
+         }
        };
 
        /* Setup protocol subtree array */
index 7026c8df7c5f82c3c1cea9a070a0f64cd48bb252..3129f3457d363dfb6021c1fb0922bcb9f8fd894b 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.
@@ -324,7 +324,7 @@ dissect_mpls_echo_tlv_fec(tvbuff_t *tvb, guint offset, proto_tree *tree, int rem
 
             length = tvb_get_ntohs(tvb, offset + 2);
             ti = proto_tree_add_text(tree, tvb, offset, length + 4, "FEC Element %u: %s",
-                     idx, val_to_str(type, mpls_echo_tlv_fec_names, 
+                     idx, val_to_str(type, mpls_echo_tlv_fec_names,
                      "Unknown FEC type (0x%04X)"));
             tlv_fec_tree = proto_item_add_subtree(ti, ett_mpls_echo_tlv_fec);
             if(tlv_fec_tree == NULL) return;
@@ -347,9 +347,9 @@ dissect_mpls_echo_tlv_fec(tvbuff_t *tvb, guint offset, proto_tree *tree, int rem
             /* FEC sub-TLV Value */
             switch (type) {
             case TLV_FEC_STACK_LDP_IPv4:
-                proto_tree_add_item(tlv_fec_tree, hf_mpls_echo_tlv_fec_ldp_ipv4, 
+                proto_tree_add_item(tlv_fec_tree, hf_mpls_echo_tlv_fec_ldp_ipv4,
                     tvb, offset + 4, 4, FALSE);
-                proto_tree_add_item(tlv_fec_tree, hf_mpls_echo_tlv_fec_ldp_ipv4_mask, 
+                proto_tree_add_item(tlv_fec_tree, hf_mpls_echo_tlv_fec_ldp_ipv4_mask,
                     tvb, offset + 8, 1, FALSE);
                 if (length == 8)
                     proto_tree_add_text(tlv_fec_tree, tvb, offset + 9, 3, "Padding");
@@ -376,7 +376,7 @@ dissect_mpls_echo_tlv_fec(tvbuff_t *tvb, guint offset, proto_tree *tree, int rem
                    tvb, offset + 10, 2, FALSE);
                proto_tree_add_text(tlv_fec_tree, tvb, offset + 12, 4,
                    "Extended Tunnel ID: 0x%08X (%s)", tvb_get_ntohl(tvb, offset + 12),
-                   ip_to_str(tvb_get_ptr(tvb, offset + 12, 4)));
+                   tvb_ip_to_str(tvb, offset + 12));
                hidden_item = proto_tree_add_item(tlv_fec_tree, hf_mpls_echo_tlv_fec_rsvp_ipv4_ext_tunnel_id,
                    tvb, offset + 12, 4, FALSE);
                PROTO_ITEM_SET_HIDDEN(hidden_item);
@@ -402,7 +402,7 @@ dissect_mpls_echo_tlv_fec(tvbuff_t *tvb, guint offset, proto_tree *tree, int rem
                 proto_tree_add_text(tlv_fec_tree, tvb, offset + 24, 16,
                     "Extended Tunnel ID: 0x%s (%s)",
                    tvb_bytes_to_str(tvb, offset + 24, 16),
-                    ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset + 24, 16)));
+                    tvb_ip6_to_str(tvb, offset + 24));
                 hidden_item = proto_tree_add_item(tlv_fec_tree, hf_mpls_echo_tlv_fec_rsvp_ipv6_ext_tunnel_id,
                     tvb, offset + 24, 16, FALSE);
                PROTO_ITEM_SET_HIDDEN(hidden_item);
@@ -849,7 +849,7 @@ dissect_mpls_echo_tlv(tvbuff_t *tvb, guint offset, proto_tree *tree, int rem, gb
                            val_to_str(type, mpls_echo_tlv_type_names, "Unknown TLV type"), saved_type);
                } else {
                        proto_tree_add_uint_format(mpls_echo_tlv_tree, hf_mpls_echo_tlv_type, tvb,
-                           offset, 2, saved_type, "Type: %s (%u)", 
+                           offset, 2, saved_type, "Type: %s (%u)",
                            val_to_str(type, mpls_echo_tlv_type_names, "Unknown TLV type"), saved_type);
                }
                 proto_tree_add_item(mpls_echo_tlv_tree, hf_mpls_echo_tlv_len, tvb, offset + 2, 2, FALSE);
@@ -898,7 +898,7 @@ dissect_mpls_echo_tlv(tvbuff_t *tvb, guint offset, proto_tree *tree, int rem, gb
                                         length);
                                 break;
                         }
-                        proto_tree_add_item(mpls_echo_tlv_tree, hf_mpls_echo_tlv_rto_ipv4, 
+                        proto_tree_add_item(mpls_echo_tlv_tree, hf_mpls_echo_tlv_rto_ipv4,
                             tvb, offset + 4, 4, FALSE);
                        break;
                case TLV_RTO_IPv6:
@@ -908,7 +908,7 @@ dissect_mpls_echo_tlv(tvbuff_t *tvb, guint offset, proto_tree *tree, int rem, gb
                                         length);
                                 break;
                         }
-                        proto_tree_add_item(mpls_echo_tlv_tree, hf_mpls_echo_tlv_rto_ipv6,    
+                        proto_tree_add_item(mpls_echo_tlv_tree, hf_mpls_echo_tlv_rto_ipv6,
                             tvb, offset + 4, 16, FALSE);
                        break;
                case TLV_VENDOR_PRIVATE_START:
@@ -985,7 +985,7 @@ dissect_mpls_echo(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
         }
 
         col_set_str(pinfo->cinfo, COL_PROTOCOL, "MPLS ECHO");
-    
+
         rem = tvb_reported_length_remaining(tvb, offset);
 
         /* Get the message type and fill in the Column info */
@@ -1079,7 +1079,7 @@ dissect_mpls_echo(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
 void
 proto_register_mpls_echo(void)
-{                 
+{
 
         static hf_register_info hf[] = {
                 { &hf_mpls_echo_version,
index c8cb57b87dd29ee101662a19f9463f6c803383d3..1a08423e4b96cbf15c358c6aef5e3887674d9ca9 100644 (file)
@@ -271,9 +271,9 @@ static void dissect_msdp_sa(tvbuff_t *tvb, packet_info *pinfo,
                         return;
                 }
                 ei = proto_tree_add_text(tree, tvb, *offset, 12, "(S,G) block: %s/%u -> %s",
-                                         ip_to_str(tvb_get_ptr(tvb, *offset + 8, 4)),
+                                         tvb_ip_to_str(tvb, *offset + 8),
                                          tvb_get_guint8(tvb, *offset + 3),
-                                         ip_to_str(tvb_get_ptr(tvb, *offset + 4, 4)));
+                                         tvb_ip_to_str(tvb, *offset + 4));
                 entry_tree = proto_item_add_subtree(ei, ett_msdp_sa_entry);
 
                 proto_tree_add_item(entry_tree, hf_msdp_sa_reserved, tvb, *offset, 3, FALSE);
index c54bcca67c1557dd726709be095fff8bbee29759..0c7993f8432074db3cfb038c3220f0ab84e9af42 100644 (file)
@@ -661,7 +661,7 @@ dissect_nbns_answer(tvbuff_t *tvb, int offset, int nbns_data_offset,
                        if (opcode != OPCODE_WACK) {
                                col_append_fstr(cinfo, COL_INFO, " %s %s",
                                    type_name,
-                                   ip_to_str(tvb_get_ptr(tvb, data_offset+2, 4)));
+                                   tvb_ip_to_str(tvb, data_offset+2));
                        }
                }
                if (nbns_tree == NULL)
@@ -709,7 +709,7 @@ dissect_nbns_answer(tvbuff_t *tvb, int offset, int nbns_data_offset,
                                }
                                proto_tree_add_text(rr_tree, tvb, cur_offset, 4,
                                    "Addr: %s",
-                                   ip_to_str(tvb_get_ptr(tvb, cur_offset, 4)));
+                                   tvb_ip_to_str(tvb, cur_offset));
                                cur_offset += 4;
                                data_len -= 4;
                        }
@@ -1564,7 +1564,7 @@ dissect_nbss_packet(tvbuff_t *tvb, int offset, packet_info *pinfo,
          if (tree)
            proto_tree_add_text(nbss_tree, tvb, offset, 4,
                                "Retarget IP address: %s",
-                               ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+                               tvb_ip_to_str(tvb, offset));
 
          offset += 4;
 
index 19873adec464238c62d3a78ed3971fc8efa24dde..5e4db5cf96b0bf0a4b707c5a6af22dbd548a2c83 100644 (file)
@@ -999,7 +999,7 @@ dissect_ospf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                            tvb, 4, 4, FALSE);
        areaid=tvb_get_ntohl(tvb,8);
        proto_tree_add_text(ospf_header_tree, tvb, 8, 4, "Area ID: %s%s",
-                              ip_to_str(tvb_get_ptr(tvb, 8, 4)), areaid == 0 ? " (Backbone)" : "");
+                           tvb_ip_to_str(tvb, 8), areaid == 0 ? " (Backbone)" : "");
 
        /*
         * Quit at this point if it's an unknown OSPF version.
@@ -1327,7 +1327,7 @@ dissect_ospfv3_lls_tlv(tvbuff_t *tvb, int offset, proto_tree *tree)
         while (orig_offset + length >= offset) {
             proto_tree_add_text(ospf_lls_tlv_tree, tvb, offset, 4,
                                 "Dropped Neighbor: %s",
-                                ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+                                tvb_ip_to_str(tvb, offset));
             offset += 4;
         }
         offset = orig_offset;
@@ -1342,7 +1342,7 @@ dissect_ospfv3_lls_tlv(tvbuff_t *tvb, int offset, proto_tree *tree)
         while (orig_offset + length >= offset) {
             ti = proto_tree_add_text(ospf_lls_tlv_tree, tvb, offset, 4,
                                 "Neighbor: %s",
-                                ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+                                tvb_ip_to_str(tvb, offset));
             if (relays_added > 0) {
                 proto_item_append_text(ti, " Added");
             } else {
@@ -1363,7 +1363,7 @@ dissect_ospfv3_lls_tlv(tvbuff_t *tvb, int offset, proto_tree *tree)
         while (orig_offset + length >= offset) {
             proto_tree_add_text(ospf_lls_tlv_tree, tvb, offset, 4,
                                 "Request From: %s",
-                                ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+                                tvb_ip_to_str(tvb, offset));
             offset += 4;
         }
         offset = orig_offset;
@@ -1373,7 +1373,7 @@ dissect_ospfv3_lls_tlv(tvbuff_t *tvb, int offset, proto_tree *tree)
         while (orig_offset + length >= offset) {
             proto_tree_add_text(ospf_lls_tlv_tree, tvb, offset, 4,
                                 "Full State For: %s",
-                                ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+                                tvb_ip_to_str(tvb, offset));
             offset += 4;
         }
         offset = orig_offset;
@@ -1431,7 +1431,7 @@ dissect_ospf_hello(tvbuff_t *tvb, int offset, proto_tree *tree, guint8 version,
     switch (version ) {
         case OSPF_VERSION_2:
             proto_tree_add_text(ospf_hello_tree, tvb, offset, 4, "Network Mask: %s",
-                       ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+                       tvb_ip_to_str(tvb, offset));
             proto_tree_add_text(ospf_hello_tree, tvb, offset + 4, 2,
                        "Hello Interval: %u seconds",
                        tvb_get_ntohs(tvb, offset + 4));
@@ -1442,15 +1442,15 @@ dissect_ospf_hello(tvbuff_t *tvb, int offset, proto_tree *tree, guint8 version,
             proto_tree_add_text(ospf_hello_tree, tvb, offset + 8, 4, "Router Dead Interval: %u seconds",
                        tvb_get_ntohl(tvb, offset + 8));
             proto_tree_add_text(ospf_hello_tree, tvb, offset + 12, 4, "Designated Router: %s",
-                       ip_to_str(tvb_get_ptr(tvb, offset + 12, 4)));
+                       tvb_ip_to_str(tvb, offset + 12));
             proto_tree_add_text(ospf_hello_tree, tvb, offset + 16, 4, "Backup Designated Router: %s",
-                       ip_to_str(tvb_get_ptr(tvb, offset + 16, 4)));
+                       tvb_ip_to_str(tvb, offset + 16));
 
             offset += 20;
             while (orig_offset + length > offset) {
                proto_tree_add_text(ospf_hello_tree, tvb, offset, 4,
                            "Active Neighbor: %s",
-                           ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+                           tvb_ip_to_str(tvb, offset));
                offset += 4;
             }
             break;
@@ -1466,14 +1466,14 @@ dissect_ospf_hello(tvbuff_t *tvb, int offset, proto_tree *tree, guint8 version,
             proto_tree_add_text(ospf_hello_tree, tvb, offset + 10, 2, "Router Dead Interval: %u seconds",
                        tvb_get_ntohs(tvb, offset + 10));
             proto_tree_add_text(ospf_hello_tree, tvb, offset + 12, 4, "Designated Router: %s",
-                       ip_to_str(tvb_get_ptr(tvb, offset + 12, 4)));
+                       tvb_ip_to_str(tvb, offset + 12));
             proto_tree_add_text(ospf_hello_tree, tvb, offset + 16, 4, "Backup Designated Router: %s",
-                       ip_to_str(tvb_get_ptr(tvb, offset + 16, 4)));
+                       tvb_ip_to_str(tvb, offset + 16));
             offset += 20;
             while (orig_offset + length > offset) {
                proto_tree_add_text(ospf_hello_tree, tvb, offset, 4,
                            "Active Neighbor: %s",
-                           ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+                           tvb_ip_to_str(tvb, offset));
                offset += 4;
             }
 
@@ -1582,7 +1582,7 @@ dissect_ospf_ls_req(tvbuff_t *tvb, int offset, proto_tree *tree, guint8 version,
 
 
        proto_tree_add_text(ospf_lsr_tree, tvb, offset + 4, 4, "Link State ID: %s",
-                           ip_to_str(tvb_get_ptr(tvb, offset + 4, 4)));
+                           tvb_ip_to_str(tvb, offset + 4));
        proto_tree_add_item(ospf_lsr_tree, hf_ospf_filter[OSPFF_ADV_ROUTER],
                            tvb, offset + 8, 4, FALSE);
 
@@ -1756,7 +1756,7 @@ dissect_ospf_lsa_mpls(tvbuff_t *tvb, int offset, proto_tree *tree,
        case MPLS_TLV_ROUTER:
            ti = proto_tree_add_text(mpls_tree, tvb, offset, tlv_length+4,
                                     "Router Address: %s",
-                                    ip_to_str(tvb_get_ptr(tvb, offset+4, 4)));
+                                    tvb_ip_to_str(tvb, offset+4));
            tlv_tree = proto_item_add_subtree(ti, ett_ospf_lsa_mpls_router);
            proto_tree_add_text(tlv_tree, tvb, offset, 2, "TLV Type: 1 - Router Address");
            proto_tree_add_text(tlv_tree, tvb, offset+2, 2, "TLV Length: %u",
@@ -1799,7 +1799,7 @@ dissect_ospf_lsa_mpls(tvbuff_t *tvb, int offset, proto_tree *tree,
                case MPLS_LINK_ID:
                    ti = proto_tree_add_text(tlv_tree, tvb, stlv_offset, stlv_len+4,
                                             "%s: %s", stlv_name,
-                                            ip_to_str(tvb_get_ptr(tvb, stlv_offset + 4, 4)));
+                                            tvb_ip_to_str(tvb, stlv_offset + 4));
                    stlv_tree = proto_item_add_subtree(ti, ett_ospf_lsa_mpls_link_stlv);
                    proto_tree_add_text(stlv_tree, tvb, stlv_offset, 2,
                                        "TLV Type: %u: %s", stlv_type, stlv_name);
@@ -2054,7 +2054,7 @@ dissect_ospf_lsa_mpls(tvbuff_t *tvb, int offset, proto_tree *tree,
                case OIF_LOCAL_NODE_ID:
                    ti = proto_tree_add_text(tlv_tree, tvb, stlv_offset, stlv_len+4,
                                             "%s: %s", stlv_name,
-                                            ip_to_str(tvb_get_ptr(tvb, stlv_offset + 4, 4)));
+                                            tvb_ip_to_str(tvb, stlv_offset + 4));
                    stlv_tree = proto_item_add_subtree(ti, ett_ospf_lsa_mpls_link_stlv);
                    proto_tree_add_text(stlv_tree, tvb, stlv_offset, 2,
                                        "TLV Type: %u: %s", stlv_type, stlv_name);
@@ -2068,7 +2068,7 @@ dissect_ospf_lsa_mpls(tvbuff_t *tvb, int offset, proto_tree *tree,
                case OIF_REMOTE_NODE_ID:
                    ti = proto_tree_add_text(tlv_tree, tvb, stlv_offset, stlv_len+4,
                                             "%s: %s", stlv_name,
-                                            ip_to_str(tvb_get_ptr(tvb, stlv_offset + 4, 4)));
+                                            tvb_ip_to_str(tvb, stlv_offset + 4));
                    stlv_tree = proto_item_add_subtree(ti, ett_ospf_lsa_mpls_link_stlv);
                    proto_tree_add_text(stlv_tree, tvb, stlv_offset, 2,
                                        "TLV Type: %u: %s", stlv_type, stlv_name);
@@ -2137,20 +2137,20 @@ dissect_ospf_lsa_mpls(tvbuff_t *tvb, int offset, proto_tree *tree,
                case OIF_NODE_ID:
                    ti = proto_tree_add_text(tlv_tree, tvb, stlv_offset, stlv_len+4,
                                             "%s: %s", stlv_name,
-                                            ip_to_str(tvb_get_ptr(tvb, stlv_offset + 4, 4)));
+                                            tvb_ip_to_str(tvb, stlv_offset + 4));
                    stlv_tree = proto_item_add_subtree(ti, ett_ospf_lsa_oif_tna_stlv);
                    proto_tree_add_text(stlv_tree, tvb, stlv_offset, 2,
                                        "TLV Type: %u: %s", stlv_type, stlv_name);
                    proto_tree_add_text(stlv_tree, tvb, stlv_offset+2, 2, "TLV Length: %u",
                                        stlv_len);
                    proto_tree_add_text(stlv_tree, tvb, stlv_offset+4, 4, "%s: %s", stlv_name,
-                                       ip_to_str(tvb_get_ptr(tvb, stlv_offset + 4, 4)));
+                                       tvb_ip_to_str(tvb, stlv_offset + 4));
                    break;
 
                case OIF_TNA_IPv4_ADDRESS:
                    ti = proto_tree_add_text(tlv_tree, tvb, stlv_offset, stlv_len+4,
                                             "%s (IPv4): %s", stlv_name,
-                                            ip_to_str(tvb_get_ptr(tvb, stlv_offset + 8, 4)));
+                                            tvb_ip_to_str(tvb, stlv_offset + 8));
                    stlv_tree = proto_item_add_subtree(ti, ett_ospf_lsa_oif_tna_stlv);
                    proto_tree_add_text(stlv_tree, tvb, stlv_offset, 2,
                                        "TLV Type: %u: %s (IPv4)", stlv_type, stlv_name);
@@ -2158,14 +2158,13 @@ dissect_ospf_lsa_mpls(tvbuff_t *tvb, int offset, proto_tree *tree,
                    proto_tree_add_text(stlv_tree, tvb, stlv_offset+4, 1, "Addr Length: %u",
                                        tvb_get_guint8 (tvb, stlv_offset+4));
                    proto_tree_add_text(stlv_tree, tvb, stlv_offset+8, stlv_len - 4, "TNA Addr: %s",
-                                       ip_to_str(tvb_get_ptr(tvb, stlv_offset + 8, 4)));
+                                       tvb_ip_to_str(tvb, stlv_offset + 8));
                    break;
 
                case OIF_TNA_IPv6_ADDRESS:
                    ti = proto_tree_add_text(tlv_tree, tvb, stlv_offset, stlv_len+4,
                                             "%s (IPv6): %s", stlv_name,
-                                            ip6_to_str((const struct e_in6_addr *)
-                                                        tvb_get_ptr(tvb, stlv_offset + 8, 16)));
+                                            tvb_ip6_to_str(tvb, stlv_offset + 8));
                    stlv_tree = proto_item_add_subtree(ti, ett_ospf_lsa_oif_tna_stlv);
                    proto_tree_add_text(stlv_tree, tvb, stlv_offset, 2,
                                        "TLV Type: %u: %s (IPv6)", stlv_type, stlv_name);
@@ -2173,8 +2172,7 @@ dissect_ospf_lsa_mpls(tvbuff_t *tvb, int offset, proto_tree *tree,
                    proto_tree_add_text(stlv_tree, tvb, stlv_offset+4, 1, "Addr Length: %u",
                                        tvb_get_guint8 (tvb, stlv_offset+4));
                    proto_tree_add_text(stlv_tree, tvb, stlv_offset+8, stlv_len - 4, "TNA Addr: %s",
-                                       ip6_to_str((const struct e_in6_addr *)
-                                                   tvb_get_ptr(tvb, stlv_offset + 8, 16)));
+                                       tvb_ip6_to_str(tvb, stlv_offset + 8));
                    break;
 
                case OIF_TNA_NSAP_ADDRESS:
@@ -2396,7 +2394,7 @@ dissect_ospf_v2_lsa(tvbuff_t *tvb, int offset, proto_tree *tree,
     } else {
        ls_id_type = 0;
        proto_tree_add_text(ospf_lsa_tree, tvb, offset + 4, 4, "Link State ID: %s",
-                           ip_to_str(tvb_get_ptr(tvb, offset + 4, 4)));
+                           tvb_ip_to_str(tvb, offset + 4));
     }
 
     proto_tree_add_item(ospf_lsa_tree, hf_ospf_filter[OSPFF_ADV_ROUTER],
@@ -2481,18 +2479,18 @@ dissect_ospf_v2_lsa(tvbuff_t *tvb, int offset, proto_tree *tree,
             ti_local = proto_tree_add_text(ospf_lsa_tree, tvb, offset, 12 + 4 * nr_metric,
                                      "Type: %-8s ID: %-15s Data: %-15s Metric: %d",
                                      link_type_short_str,
-                                     ip_to_str(tvb_get_ptr(tvb, offset, 4)),
-                                     ip_to_str(tvb_get_ptr(tvb, offset + 4, 4)),
+                                     tvb_ip_to_str(tvb, offset),
+                                     tvb_ip_to_str(tvb, offset + 4),
                                      tvb_get_ntohs(tvb, offset + 10));
 
             ospf_lsa_router_link_tree = proto_item_add_subtree(ti_local, ett_ospf_lsa_router_link);
 
            proto_tree_add_text(ospf_lsa_router_link_tree, tvb, offset, 4, "%s: %s", link_id,
-                               ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+                               tvb_ip_to_str(tvb, offset));
 
            /* link_data should be specified in detail (e.g. network mask) (depends on link type)*/
            proto_tree_add_text(ospf_lsa_router_link_tree, tvb, offset + 4, 4, "Link Data: %s",
-                               ip_to_str(tvb_get_ptr(tvb, offset + 4, 4)));
+                               tvb_ip_to_str(tvb, offset + 4));
 
            proto_tree_add_text(ospf_lsa_router_link_tree, tvb, offset + 8, 1, "Link Type: %u - %s",
                                link_type, link_type_str);
@@ -2519,12 +2517,12 @@ dissect_ospf_v2_lsa(tvbuff_t *tvb, int offset, proto_tree *tree,
 
     case OSPF_LSTYPE_NETWORK:
        proto_tree_add_text(ospf_lsa_tree, tvb, offset, 4, "Netmask: %s",
-                               ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+                               tvb_ip_to_str(tvb, offset));
        offset += 4;
 
        while (offset < end_offset) {
            proto_tree_add_text(ospf_lsa_tree, tvb, offset, 4, "Attached Router: %s",
-                               ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+                               tvb_ip_to_str(tvb, offset));
            offset += 4;
        }
        break;
@@ -2533,7 +2531,7 @@ dissect_ospf_v2_lsa(tvbuff_t *tvb, int offset, proto_tree *tree,
     /* Type 3 and 4 LSAs have the same format */
     case OSPF_LSTYPE_ASBR:
        proto_tree_add_text(ospf_lsa_tree, tvb, offset, 4, "Netmask: %s",
-                           ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+                           tvb_ip_to_str(tvb, offset));
        offset += 4;
 
        proto_tree_add_text(ospf_lsa_tree, tvb, offset, 4, "Metric: %u",
@@ -2553,7 +2551,7 @@ dissect_ospf_v2_lsa(tvbuff_t *tvb, int offset, proto_tree *tree,
     case OSPF_LSTYPE_ASEXT:
     case OSPF_LSTYPE_ASEXT7:
        proto_tree_add_text(ospf_lsa_tree, tvb, offset, 4, "Netmask: %s",
-                           ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+                           tvb_ip_to_str(tvb, offset));
        offset += 4;
 
        options = tvb_get_guint8(tvb, offset);
@@ -2570,7 +2568,7 @@ dissect_ospf_v2_lsa(tvbuff_t *tvb, int offset, proto_tree *tree,
        offset += 4;
 
        proto_tree_add_text(ospf_lsa_tree, tvb, offset, 4, "Forwarding Address: %s",
-                           ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+                           tvb_ip_to_str(tvb, offset));
        offset += 4;
 
        proto_tree_add_text(ospf_lsa_tree, tvb, offset, 4, "External Route Tag: %u",
@@ -2593,7 +2591,7 @@ dissect_ospf_v2_lsa(tvbuff_t *tvb, int offset, proto_tree *tree,
            offset += 4;
 
            proto_tree_add_text(ospf_lsa_tree, tvb, offset, 4, "Forwarding Address: %s",
-                               ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+                               tvb_ip_to_str(tvb, offset));
            offset += 4;
 
            proto_tree_add_text(ospf_lsa_tree, tvb, offset, 4, "External Route Tag: %u",
@@ -2674,7 +2672,7 @@ dissect_ospf_v3_lsa(tvbuff_t *tvb, int offset, proto_tree *tree,
                        ls_type, val_to_str(ls_type, v3_ls_type_vals,"Unkown"));
 
     proto_tree_add_text(ospf_lsa_tree, tvb, offset + 4, 4, "Link State ID: %s",
-                           ip_to_str(tvb_get_ptr(tvb, offset + 4, 4)));
+                       tvb_ip_to_str(tvb, offset + 4));
 
     proto_tree_add_item(ospf_lsa_tree, hf_ospf_filter[OSPFF_ADV_ROUTER],
                        tvb, offset + 8, 4, FALSE);
@@ -2761,7 +2759,7 @@ dissect_ospf_v3_lsa(tvbuff_t *tvb, int offset, proto_tree *tree,
 
            /* Neighbor Router ID */
             proto_tree_add_text(ospf_lsa_tree, tvb, offset + 12, 4, "Neighbor Router ID: %s",
-               ip_to_str(tvb_get_ptr(tvb, offset + 12, 4)));
+                       tvb_ip_to_str(tvb, offset + 12));
 
             /* skip to the (possible) next entry */
             offset+=16;
@@ -2785,7 +2783,7 @@ dissect_ospf_v3_lsa(tvbuff_t *tvb, int offset, proto_tree *tree,
 
        while (ls_length > 0 ) {
            proto_tree_add_text(ospf_lsa_tree, tvb, offset, 4, "Attached Router: %s",
-                               ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+                               tvb_ip_to_str(tvb, offset));
             ls_length-=4;
            offset += 4;
        }
@@ -2846,7 +2844,7 @@ dissect_ospf_v3_lsa(tvbuff_t *tvb, int offset, proto_tree *tree,
 
        /* Destination Router ID */
         proto_tree_add_text(ospf_lsa_tree, tvb, offset + 8, 4, "Destination Router ID: %s",
-               ip_to_str(tvb_get_ptr(tvb, offset + 8, 4)));
+                           tvb_ip_to_str(tvb, offset + 8));
 
        offset+=12;
        break;
@@ -2886,11 +2884,11 @@ dissect_ospf_v3_lsa(tvbuff_t *tvb, int offset, proto_tree *tree,
         /* Forwarding Address (optional - only if F-flag is on) */
         if ( (offset < end_offset) && (flags & OSPF_V3_AS_EXTERNAL_FLAG_F) ) {
             if (address_family == OSPF_AF_6) {
-           proto_tree_add_text(ospf_lsa_tree, tvb, offset, 16,"Forwarding Address: %s",
-              ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset, 16)));
+               proto_tree_add_text(ospf_lsa_tree, tvb, offset, 16,"Forwarding Address: %s",
+                                   tvb_ip6_to_str(tvb, offset));
             } else {
                 proto_tree_add_text(ospf_lsa_tree, tvb, offset, 16,"Forwarding Address: %s",
-                                    ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+                                    tvb_ip_to_str(tvb, offset));
             }
 
            offset+=16;
@@ -2908,7 +2906,7 @@ dissect_ospf_v3_lsa(tvbuff_t *tvb, int offset, proto_tree *tree,
         /* Referenced Link State ID (optional - only if Referenced LS type is non-zero */
         if ( (offset < end_offset) && (referenced_ls_type != 0) ) {
            proto_tree_add_text(ospf_lsa_tree, tvb, offset, 4, "Referenced Link State ID: %s",
-                           ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+                           tvb_ip_to_str(tvb, offset));
            offset+=4;
         }
 
@@ -2926,10 +2924,10 @@ dissect_ospf_v3_lsa(tvbuff_t *tvb, int offset, proto_tree *tree,
         /* Link-local Interface Address */
         if (address_family == OSPF_AF_6) {
             proto_tree_add_text(ospf_lsa_tree, tvb, offset + 4, 16, "Link-local Interface Address: %s",
-                                ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset + 4, 16)));
+                                tvb_ip6_to_str(tvb, offset + 4));
         } else {
             proto_tree_add_text(ospf_lsa_tree, tvb, offset + 4, 16, "Link-local Interface Address: %s",
-                                ip_to_str(tvb_get_ptr(tvb, offset + 4, 4)));
+                                tvb_ip_to_str(tvb, offset + 4));
         }
         /* Number prefixes */
         number_prefixes=tvb_get_ntohl(tvb, offset + 20);
@@ -2976,11 +2974,11 @@ dissect_ospf_v3_lsa(tvbuff_t *tvb, int offset, proto_tree *tree,
 
         /* Referenced Link State ID */
        proto_tree_add_text(ospf_lsa_tree, tvb, offset + 4, 4, "Referenced Link State ID: %s",
-                           ip_to_str(tvb_get_ptr(tvb, offset + 4, 4)));
+                           tvb_ip_to_str(tvb, offset + 4));
 
         /* Referenced Advertising Router */
        proto_tree_add_text(ospf_lsa_tree, tvb, offset + 8, 4, "Referenced Advertising Router: %s",
-                           ip_to_str(tvb_get_ptr(tvb, offset + 8, 4)));
+                           tvb_ip_to_str(tvb, offset + 8));
 
         offset+=12;
 
@@ -3049,7 +3047,7 @@ static void dissect_ospf_v3_address_prefix(tvbuff_t *tvb, int offset, int prefix
                             "Address Prefix: %s", ip6_to_str(&prefix));
     } else {
         proto_tree_add_text(tree, tvb, offset, bytes_to_process,
-                            "Address Prefix: %s", ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+                            "Address Prefix: %s", tvb_ip_to_str(tvb, offset));
     }
 
 }