Commit Graph

252 Commits

Author SHA1 Message Date
Jakub Zawadzki ae59b09443 Add missing includes in order to remove exceptions.h from proto.h (next commit).
svn path=/trunk/; revision=53230
2013-11-10 15:59:37 +00:00
Pascal Quantin ea0a85c230 Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9031 :
SIP contact-param parsing fails in case the last parameter includes a quoted string

svn path=/trunk/; revision=53071
2013-11-03 18:07:46 +00:00
Michael Mann 02a8391535 Require dissector_try_string to pass a data parameter to its subdissectors. There weren't that many calls, so might as well modify the function than create a need for dissector_try_string_new.
svn path=/trunk/; revision=53049
2013-11-02 15:52:25 +00:00
Bill Meier 2ac134b3c5 whitespace fixes; mostly: remove trailing blanks
svn path=/trunk/; revision=52591
2013-10-13 19:56:52 +00:00
Pascal Quantin cf3ac5e781 Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9228 :
Ensure that decompressed tvb exists before trying to add it to the tree

svn path=/trunk/; revision=52354
2013-10-04 10:29:57 +00:00
Pascal Quantin df5848517f From Didier Gautheron via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9210 :
Add 'deflate' to SIP Content-Encoding

svn path=/trunk/; revision=52315
2013-10-01 14:49:01 +00:00
Michael Mann cf80442912 Convert some proto_tree_add_string_format calls to something more appropriate.
There seem to be several cases of proto_tree_add_string_format where a "string" value/filter doesn't really make sense because it's always empty, and is just being used as a "filterable subtree header (placeholder)".  They appear to be more for "presense" than "value" and should probably be FT_NONE, although I'd almost argue for removing the filter in favor of  proto_tree_add_text.

svn path=/trunk/; revision=52296
2013-09-30 15:21:09 +00:00
Pascal Quantin a0c53ffaa1 emem -> wmem conversion:
- ep_tvb_get_bits() -> wmem_packet_tvb_get_bits()
- tvb_g_memdup()/ep_tvb_memdup() -> tvb_memdup()
- tvb_fake_unicode()/tvb_get_ephemeral_faked_unicode() -> tvb_get_faked_unicode()
- tvb_get_g_string()/tvb_get_ephemeral_string()/tvb_get_seasonal_string() -> tvb_get_string()
- tvb_get_g_unicode_string()/tvb_get_ephemeral_unicode_string() -> tvb_get_unicode_string()
- tvb_get_ephemeral_string_enc() -> tvb_get_string_enc()
- update docs accordingly

svn path=/trunk/; revision=52172
2013-09-22 15:50:55 +00:00
Michael Mann 9e3f9b449f expert_add_info_format_text -> expert_add_info_format
svn path=/trunk/; revision=51852
2013-09-09 00:44:09 +00:00
Anders Broman 4a226911da Protect agains infinite loop.
svn path=/trunk/; revision=51738
2013-09-03 18:47:44 +00:00
Pascal Quantin 84bf0acc00 Convert a few dissectors from EMEM to WMEM API
svn path=/trunk/; revision=51597
2013-08-30 14:49:55 +00:00
Anders Broman 7e3922cf43 Use dissector_delete_uint_range/dissector_add_uint_range
svn path=/trunk/; revision=51540
2013-08-27 19:21:20 +00:00
Pascal Quantin 4b641014a2 Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9031 :
SIP contact-param parsing should be stopped when finding a comma separator

svn path=/trunk/; revision=51321
2013-08-12 19:23:08 +00:00
Martin Kaiser f76303cd6c coverity 280403 (logically dead code)
set first to FALSE after the first block was dissected

svn path=/trunk/; revision=51313
2013-08-12 10:15:01 +00:00
Pascal Quantin 2214b3f9d0 Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9022 :
Fix dissection of Feature-Caps header field

svn path=/trunk/; revision=51233
2013-08-09 07:58:27 +00:00
Alexis La Goutte 3220474d52 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50366
2013-07-03 16:45:52 +00:00
Michael Mann 98492c5619 expert_add_info + proto_tree_add_text = proto_tree_add_expert, where applicable
svn path=/trunk/; revision=50337
2013-07-03 02:59:31 +00:00
Michael Mann b0090fd046 Batch of filterable expert infos
svn path=/trunk/; revision=49600
2013-05-27 23:21:11 +00:00
Anders Broman 9d5b23bc76 use key in all p_add_proto_data() p_get_proto_data()
svn path=/trunk/; revision=49568
2013-05-24 22:38:25 +00:00
Anders Broman 631b77e47a Remove #if 0:ed code.
svn path=/trunk/; revision=49449
2013-05-20 18:38:34 +00:00
Anders Broman 6a3a3c228c Make preparation to select which level tap is to be used.
svn path=/trunk/; revision=49446
2013-05-20 17:48:09 +00:00
Anders Broman 653006b4b8 - packet-sip.c adds per-packet data twice only add new packet data if no previous data exists.
- Use the key as SIP can occure more than once in a frame.

svn path=/trunk/; revision=49315
2013-05-15 16:53:19 +00:00
Anders Broman 8e509279b8 Add a tag for original frame number.
svn path=/trunk/; revision=49298
2013-05-14 19:57:19 +00:00
Anders Broman 85a8e304dd Add the posibillity to use a key for per-packet-data.
svn path=/trunk/; revision=49259
2013-05-12 18:11:02 +00:00
Anders Broman 1ab65e7146 Add a helper function to load tags, handle IP and port tags and
copy packet comments.

svn path=/trunk/; revision=49184
2013-05-06 15:59:16 +00:00
Anders Broman a268bb6b94 Add the abillity to export PDU:s to file using a USER_DLT adding meta data before the actual protocol PDU. Some meta tags makes it possible for the dissector of the user DLT to call the correct PDU dissector.
This is prof-of-concept needs a bit of cleanup.

svn path=/trunk/; revision=49177
2013-05-05 19:37:51 +00:00
Martin Mathieson 4ef8ba6324 Add a quick check for a first printable character to avoid a more expensive
check of the whole first line. This gets called a lot as a heuristic
dissector.

svn path=/trunk/; revision=49006
2013-04-23 22:44:23 +00:00
Chris Maynard 8aa0a23246 tvb_reported_length_remaining() can return -1, so be sure to properly handle it if it does.
#BACKPORT(1.6, 1.8)

svn path=/trunk/; revision=48578
2013-03-27 03:13:56 +00:00
Anders Broman ae747e4c4b From beroset:
remove C++ incompatibilities 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48430
2013-03-19 22:03:00 +00:00
Alexis La Goutte e4f9ca4afd Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=48378
2013-03-17 19:24:42 +00:00
Anders Broman 812efccdae Off by one error in name length.
svn path=/trunk/; revision=48234
2013-03-10 18:32:59 +00:00
Anders Broman 4237d33ab8 Add new SIP headers.
svn path=/trunk/; revision=48192
2013-03-08 16:53:14 +00:00
Pascal Quantin 7adefca1bb From Hadriel Kaplan via https://www.wireshark.org/lists/wireshark-dev/201302/msg00216.html :
Fix dissection of method name in case of RAck header

svn path=/trunk/; revision=47936
2013-02-28 08:13:40 +00:00
Bill Meier 96a24cc79f Fix spelling/typos found using a list of commonly misspelled words.
The misspellings were mostly in comments but some were
in text strings visible to the user.


svn path=/trunk/; revision=47899
2013-02-26 04:42:26 +00:00
Bill Meier 1823aa007c it's ==> its & its ==> it's as needed.
svn path=/trunk/; revision=47891
2013-02-26 01:06:19 +00:00
Michael Mann 823493b927 Only allow one packet to act as an SDP response. This should probably be caught at a higher layer (SIP), but the safety net should be there.
Also, cleanup SIP "response error" range.

Fixes crash in bug 8343 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8343)

svn path=/trunk/; revision=47705
2013-02-17 18:25:22 +00:00
Michael Mann ad92b749e8 Fix crash with SDP setup mechanism, bug 8323 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8323)
The issue was that hash tables were being accessed after they were freed from a "rejected answer".  

The code was also too generous in considering many SIP status codes as "rejected answers", so now less SIP status codes are treated as "rejected answers" and are ignored by the transport API.


svn path=/trunk/; revision=47652
2013-02-14 03:30:32 +00:00
Anders Broman c45252a75f SDP in 183 session progress is also SDP_EXCHANGE_ANSWER_ACCEPT.
Without this patch I get a crash on Linux and lots of
STATUS_ACCESS_VIOLATION and a single STATUS_INTEGER_DIVIDE_BY_ZERO on windows.

svn path=/trunk/; revision=47639
2013-02-12 14:58:02 +00:00
Anders Broman ed5045605a SDP in 180 ringing is also SDP_EXCHANGE_ANSWER_ACCEPT.
Without this patch I get a crash on Linux and lots of
STATUS_ACCESS_VIOLATION and a single STATUS_INTEGER_DIVIDE_BY_ZERO on windows.

svn path=/trunk/; revision=47638
2013-02-12 14:27:06 +00:00
Michael Mann c752593698 Handle SIP "resends" within SDP. This is to handle "duplicate" OFFERs so they don't end up being handled by setup_sdp_transport() because the current frame couldn't match a request (due to duplication).
setup_sdp_transport_resend() should be unnecessary once all higher layers use setup_sdp_transport() and the "registration" code within dissect_sdp() is removed.

svn path=/trunk/; revision=47572
2013-02-08 17:52:12 +00:00
Michael Mann faf307e2fc Support SDP context over SIP.
Added setup_sdp_transport() to allow higher layer protocols to call SDP with context to correctly setup an OFFER/ANSWER within SDP (which doesn't have its own transport layer).  I attempted to keep backwards compatibility until all higher layer protocols set up OFFER/ANSWER context.  If OFFER/ANSWER (request/response) can't be found (which would be the case for higher layer protocols without context), Wireshark should resort to the old behavior of applying SDP information as it sees packets.

This patch includes integration with SIP as it appears to have the most bug reports.  Other higher layer protocols will be done later.  Most are mentioned in bug 2368.

Fixes bug 2368 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2368) and all its duplicates
Fixes bug 2992 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2992) and all its duplicates

svn path=/trunk/; revision=47564
2013-02-08 13:47:07 +00:00
Guy Harris 8ed7a73e22 Fix a bunch of warnings.
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
sizeof.

Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
strtol() and strtoul().

Change some data types to avoid those implicit conversion warnings.

When assigning a constant to a float, make sure the constant isn't a
double, by appending "f" to the constant.

Constify a bunch of variables, parameters, and return values to
eliminate warnings due to strings being given const qualifiers.  Cast
away those warnings in some cases where an API we don't control forces
us to do so.

Enable a bunch of additional warnings by default.  Note why at least
some of the other warnings aren't enabled.

randpkt.c and text2pcap.c are used to build programs, so they don't need
to be in EXTRA_DIST.

If the user specifies --enable-warnings-as-errors, add -Werror *even if
the user specified --enable-extra-gcc-flags; assume they know what
they're doing and are willing to have the compile fail due to the extra
GCC warnings being treated as errors.

svn path=/trunk/; revision=46748
2012-12-26 05:57:06 +00:00
Anders Broman 191aaba217 Wrong check for quote_offset.
Fixes  Bug 8042 - SIP infinite loop.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8042

svn path=/trunk/; revision=46340
2012-12-03 09:49:52 +00:00
Anders Broman 9d37b98748 Set fence after finishing writing to the info col in order to show
info from more than one (SIP) message in the frame.

svn path=/trunk/; revision=45429
2012-10-09 15:07:46 +00:00
Jeff Morriss 2552c750e5 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45017
2012-09-20 02:03:38 +00:00
Jakub Zawadzki dee4443809 Add data parameter to dissector_try_heuristic
svn path=/trunk/; revision=44871
2012-09-11 08:26:48 +00:00
Jakub Zawadzki 5a8783f5b1 Initial commit to support yet another method of passing data between dissectors.
Add new parameter 'data' to heur_dissector_t and new_dissector_t, for now it's always NULL

svn path=/trunk/; revision=44860
2012-09-10 21:40:21 +00:00
Jörg Mayer 606cd90224 Fix typo in comment
svn path=/trunk/; revision=44469
2012-08-13 16:20:42 +00:00
Martin Mathieson 18acb1c43e Pass in proper offset to dfilter_sip_status_line(). Was seeing problems
with 180 + 200 responses in same frame (over TCP).

svn path=/trunk/; revision=43841
2012-07-20 00:40:44 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00