Add an expert item to indicate unrecognised SIP headers. Useful for finding:
authormartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 3 Aug 2006 14:51:45 +0000 (14:51 +0000)
committermartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 3 Aug 2006 14:51:45 +0000 (14:51 +0000)
- encoding problems or use of exotic extensions in equipment
- headers missing from the SIP dissector

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

epan/dissectors/packet-sip.c

index a19aaff33e1cf2d8e1a339287833e1266c65bba5..ae287db43f219c3a70d3001f33959eb001e8dda8 100644 (file)
@@ -61,6 +61,7 @@
 #include "packet-sip.h"
 #include <epan/tap.h>
 #include <epan/emem.h>
+#include <epan/expert.h>
 
 #include "packet-tcp.h"
 
@@ -1395,9 +1396,13 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr
 
                        if (hf_index == -1) {
                                if(hdr_tree) {
-                                       proto_tree_add_text(hdr_tree, tvb,
-                                                           offset, next_offset - offset, "%s",
-                                                           tvb_format_text(tvb, offset, linelen));
+                                       proto_item *ti = proto_tree_add_text(hdr_tree, tvb,
+                                                                            offset, next_offset - offset, "%s",
+                                                                            tvb_format_text(tvb, offset, linelen));
+                                       expert_add_info_format(pinfo, ti,
+                                                              PI_UNDECODED, PI_NOTE,
+                                                              "Unrecognised SIP header (%s)",
+                                                              tvb_format_text(tvb, offset, header_len));
                                }
                        } else {
                                /*