Check if URI is SIP.
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 5 Mar 2010 15:16:30 +0000 (15:16 +0000)
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 5 Mar 2010 15:16:30 +0000 (15:16 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32122 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-sip.c

index 70a424dd67c314858d07b35f1ecb33c7e1dd1afe..62efd1f50263819b817381e632d4a594ad4477a9 100644 (file)
@@ -1016,6 +1016,12 @@ dissect_sip_uri(tvbuff_t *tvb, packet_info *pinfo _U_, gint start_offset,
 
        /* Start parsing of URI */
        uri_offsets->uri_start = current_offset;
+       /* Check if it's realy a sip uri ( it might be a tel uri, parse that?) */
+       queried_offset = tvb_find_guint8(tvb, current_offset, line_end_offset - current_offset, ':');
+       if (tvb_strneql(tvb, current_offset, "sip", 3) != 0)
+               return -1;
+
+/* END RAB */
        if(uri_without_angle_quotes == TRUE)
        {
                /* look for the first ',' or ';' which will mark the end of this URI
@@ -2396,6 +2402,19 @@ separator_found:
                                                }
                                                break;
 
+                                       case POS_P_CHARGING_FUNCTION_ADDRESSES:
+                                               if(hdr_tree)
+                                               {
+                                                       sip_element_item = proto_tree_add_string_format(hdr_tree,
+                                                                          hf_header_array[hf_index], tvb,
+                                                                          offset, next_offset - offset,
+                                                                          value, "%s",
+                                                                          tvb_format_text(tvb, offset, linelen));
+                                                       sip_element_tree = proto_item_add_subtree( sip_element_item,
+                                                                          ett_sip_element);
+                                               }
+                                               break;
+
                                        case POS_P_PREFERRED_IDENTITY :
                                                if(hdr_tree)
                                                {