Commit Graph

211 Commits

Author SHA1 Message Date
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
Chris Maynard 8fe8287a39 Add sip.to.tag and sip.from.tag filters.
Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5226

svn path=/trunk/; revision=43175
2012-06-09 15:54:15 +00:00
Martin Mathieson eafce30cf0 Another unnecessary assignment removed to fix clang warning.
svn path=/trunk/; revision=42316
2012-04-28 16:40:54 +00:00
Anders Broman bba21ab84f gunzip gzip:ed SIP bodies.
svn path=/trunk/; revision=42043
2012-04-13 12:04:25 +00:00
Jeff Morriss 07e797272e From Michael Mann via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6938 :
Don't limit CSeq to 2**31-1 (2147483647): use stroul() instead of atoi() in
several places.

svn path=/trunk/; revision=41516
2012-03-13 01:40:18 +00:00
Bill Meier 439adbdbcc Remove obsolete comments referring to mem_chunks.
svn path=/trunk/; revision=40507
2012-01-14 20:14:43 +00:00
Anders Broman 42b44648c8 Get rid of Warnings.
svn path=/trunk/; revision=39954
2011-11-20 08:59:19 +00:00
Guy Harris 8f06e3af4b The URI parameter parser always has to advance current_offset in the
loop, otherwise you get stuck in an infinite loop.

(Where in RFC 3261 does it mention the use of commas in URI parameters?)

Should fix bug 6598.

svn path=/trunk/; revision=39952
2011-11-19 22:57:13 +00:00
Guy Harris 00884a10f2 Clean up indentation.
svn path=/trunk/; revision=39950
2011-11-19 20:49:15 +00:00
Anders Broman 4b2aa811e1 Fix Warnings.
svn path=/trunk/; revision=39948
2011-11-19 17:21:35 +00:00
Anders Broman 8921bb17b5 Check the return value of dissect_sip_name_addr_or_addr_spec()
Should fix the recent fuzz failures.
Thanks Chris for isolating the offending packet.

svn path=/trunk/; revision=39867
2011-11-15 20:14:51 +00:00
Guy Harris 519b219ae8 Squelch a warning. (This code probably needs a review; we really need a
better general framework for parsing text-based protocols.)

svn path=/trunk/; revision=39866
2011-11-15 19:44:24 +00:00
Guy Harris 6dd27d049e More indentation cleanup.
svn path=/trunk/; revision=39864
2011-11-15 19:35:13 +00:00
Guy Harris e102876289 Clean up indentation.
svn path=/trunk/; revision=39863
2011-11-15 19:33:14 +00:00
Anders Broman a586241e06 packet-sip.c:1469: warning: unused variable 'contact_param_end_offset'
svn path=/trunk/; revision=39862
2011-11-15 19:25:17 +00:00
Anders Broman f6f12af894 Restore dissection of contact parameters.
svn path=/trunk/; revision=39861
2011-11-15 19:03:39 +00:00
Anders Broman fa5c7f85aa packet-sip.c:1412: warning: 'uri_param_end_offset' may be used uninitialized in this function
svn path=/trunk/; revision=39828
2011-11-14 17:27:18 +00:00
Anders Broman c46bda538d From Johan Wåhl:
- dissect Route and Via header.
- Dissect URI parameters.

svn path=/trunk/; revision=39827
2011-11-14 17:10:49 +00:00
Guy Harris ac507aa5e7 Add some checks for "character not found"; this should fix some
fuzz-testing failures we're seeing.

svn path=/trunk/; revision=39795
2011-11-11 19:07:11 +00:00
Anders Broman e5de258768 packet-sip.c:1442: warning: 'c' may be used uninitialized in this function
svn path=/trunk/; revision=39783
2011-11-10 20:38:07 +00:00
Anders Broman 5d97a01889 -Improve dissection of auth items
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6553)
- Add parameter items to the tree for some  often trunkated lines.

svn path=/trunk/; revision=39782
2011-11-10 20:16:17 +00:00
Chris Maynard 647c5c0b27 packet_info's in_error_pkt is now a bitfield like in_gre_pkt.
svn path=/trunk/; revision=39764
2011-11-08 18:39:11 +00:00
Bill Meier d6ac27ad42 Fix proto_tree_add_item() encoding args;
Also: remove unneeded #include.

svn path=/trunk/; revision=39614
2011-10-26 18:57:02 +00:00
Bill Meier 794757ae8f For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.
Also: remove trailing whitespace for a number of files.

svn path=/trunk/; revision=39503
2011-10-21 02:10:19 +00:00
Bill Meier 126aa85393 Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, FT_STRINGZ, FT_UINT_STRING as follows:
1. If there's no character encoding (ENC_ASCII, ...) specified
    then use ENC_ASCII.
 2. For all but FT_UINT_STRING, always use ENC_NA
    (replacing any existing True/1/FALSE/0
    /ENC_BIG_ENDIAN/ENC_LITTLE_ENDIAN).



svn path=/trunk/; revision=39426
2011-10-15 18:46:26 +00:00
Anders Broman e925a84e7e From Horaci Macias:
Parse User-to-User header 
http://tools.ietf.org/html/draft-ietf-cuss-sip-uui-02

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

svn path=/trunk/; revision=39402
2011-10-13 05:15:50 +00:00
Bill Meier 94f36ca4ff Use ENC_NA as encoding for proto_tree_add_item() calls which directly reference an hf item (in hf[] with types:
FT_NONE
   FT_BYTES
   FT_IPV6
   FT_IPXNET
   FT_OID

Note: Encoding field set to ENC_NA only if the field was previously TRUE|FALSE|ENC_LITTLE_ENDIAN|ENC_BIG_ENDIAN

svn path=/trunk/; revision=39260
2011-10-04 22:44:31 +00:00
Anders Broman ea6df29d7f Move stuff inside if(tree)
svn path=/trunk/; revision=39038
2011-09-19 08:37:59 +00:00
Bill Meier 5db6069274 Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings.
svn path=/trunk/; revision=38085
2011-07-18 15:52:16 +00:00
Bill Meier a2b58f051d Add #include <stdlib.h> to files which reference fcns declared in stdlib.h;
(In many cases I previously incorrectly removed the #include <stdlib.h>).

svn path=/trunk/; revision=37334
2011-05-20 19:00:09 +00:00
Bill Meier 0e95d4dbf5 Don't assign to a proto_item * if the value won't be used: Coverity 1036;
Fix what appears to be a use of an incorrect tree: Coverity 1037;
Also:
- Remove uneeded #includes & re-order #includes;
- Do indentation and whitespace cleanup (e.g., "4 space tabs").

svn path=/trunk/; revision=36558
2011-04-11 15:17:22 +00:00
Anders Broman f5c1fc47af Use tvb_get_ephemeral_string()
prefix hf vars with hf_sip

svn path=/trunk/; revision=36516
2011-04-08 11:58:33 +00:00
Anders Broman 538b62429d Make it possible to have a sub dissector dissect the status line diagnostic string should it contain more than a string.
svn path=/trunk/; revision=36509
2011-04-07 21:39:49 +00:00
Tomas Kukosa 4e8c772d11 RFC5806 Diversion header
svn path=/trunk/; revision=36489
2011-04-06 06:20:50 +00:00
Stephen Fisher 32f6ab2248 Simply this:
#define SIP2_HDR "SIP/2.0"
    #define SIP2_HDR_LEN ((gint)strlen (SIP2_HDR))

To this:

    #define SIP2_HDR "SIP/2.0"
    #define SIP2_HDR_LEN 7


svn path=/trunk/; revision=35588
2011-01-19 21:51:30 +00:00
Guy Harris a8bc4a0d13 Rename the routines that handle dissector tables with unsigned integer
keys to have _uint in their names, to match the routines that handle
dissector tables with string keys.  (Using _port can confuse people into
thinking they're intended solely for use with TCP/UDP/etc. ports when,
in fact, they work better for things such as Ethernet types, where the
binding of particular values to particular protocols are a lot
stronger.)

svn path=/trunk/; revision=35224
2010-12-20 05:35:29 +00:00
Jeff Morriss 050d9379ef Remove a no-longer-used variable.
svn path=/trunk/; revision=35072
2010-11-29 22:11:39 +00:00
Anders Broman 623253b010 Change SIP TCP port preference to a range preference.
svn path=/trunk/; revision=35070
2010-11-29 21:40:49 +00:00
Anders Broman 6224708d6c Remove faulty return, probably forgotten during test.
Fixing dissection on Via header.

svn path=/trunk/; revision=35004
2010-11-22 15:02:06 +00:00
Bill Meier b78ec52693 Use value_string_ext fcns to access certain value_string arrays;
Sort certain value_string arrays so the values are in ascending order;
Use val_to_str_ext() instead of for loops to do value_string array lookups (voip_calls.c).
Minor whitespace cleanup.

svn path=/trunk/; revision=34794
2010-11-05 22:44:03 +00:00
Jaap Keuter 198ecea896 Prevent false related packet information, which may be missing or ignored.
svn path=/trunk/; revision=34779
2010-11-04 20:53:02 +00:00
Bill Meier f329864abf (Trivial): Fix up a comment.
svn path=/trunk/; revision=34764
2010-11-03 18:37:29 +00:00