Commit graph

174 commits

Author SHA1 Message Date
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
Anders Broman
160fcdfd8b Update SIP headers.
svn path=/trunk/; revision=34758
2010-11-03 13:01:01 +00:00
Jaap Keuter
b4d195f256 Try to decode the unknown multipart subtype anyway.
svn path=/trunk/; revision=34659
2010-10-27 06:49:39 +00:00
Jeff Morriss
cca3ba3ce2 (Refining the regexp...) Replace blurbs that match the name (case insensitive) with NULL.
svn path=/trunk/; revision=34230
2010-09-24 02:51:40 +00:00
Tomas Kukosa
f5e1f23cac Fix wrong length of CSeq Method parameter
svn path=/trunk/; revision=33920
2010-08-25 14:10:58 +00:00
Gerald Combs
27fcf779ae Use the right array bounds.
svn path=/trunk/; revision=33385
2010-06-30 23:07:58 +00:00
Gerald Combs
ccd0726178 From Karl Heinz Wolf via bug 3571 (with minor changes):
Patch for the SIP dissector: the raw SIP message can be shown with our without
the "\r\n". User may want to remove the \r\n for clarity (by selecting a
checkbox).

svn path=/trunk/; revision=33014
2010-05-28 23:00:29 +00:00
Anders Broman
7436d04550 Only try header reassembly for TCP.
svn path=/trunk/; revision=32952
2010-05-25 21:00:55 +00:00
Anders Broman
5198a0b3de Fix a typo.
svn path=/trunk/; revision=32926
2010-05-24 04:03:45 +00:00
Anders Broman
1c8c410e22 - Remove check_col()
- only read method string once.

svn path=/trunk/; revision=32677
2010-05-05 17:22:40 +00:00
Gerald Combs
99005f40ad Un-C++-ify a comment.
svn path=/trunk/; revision=32664
2010-05-04 21:52:41 +00:00
Anders Broman
ec392a4c8e Remove unused variables.
svn path=/trunk/; revision=32659
2010-05-04 15:36:54 +00:00
Anders Broman
e75998789b Refactor the code to parse SIP contact parameters.
svn path=/trunk/; revision=32658
2010-05-04 15:12:44 +00:00
Anders Broman
3f9d9a766e Forgot a //
svn path=/trunk/; revision=32605
2010-04-29 20:41:35 +00:00
Anders Broman
8e38004273 Simplify dissect_sip_authorization_item().
svn path=/trunk/; revision=32604
2010-04-29 20:02:14 +00:00
Anders Broman
2faa2bff69 Do the header matching on lower case.
svn path=/trunk/; revision=32602
2010-04-29 19:11:48 +00:00
Anders Broman
b5fa7b1d28 autentification info gives malformed packet if no space before "="
svn path=/trunk/; revision=32600
2010-04-29 16:08:14 +00:00
Anders Broman
c4fd1f8786 Use proto_add_item() and clean up the code a bit.
svn path=/trunk/; revision=32592
2010-04-28 21:20:57 +00:00
Tomas Kukosa
62ece3e529 SIP headers are case-insensitive, fix case sensitivity introduced probably by mistake
svn path=/trunk/; revision=32463
2010-04-14 12:07:29 +00:00
Bill Meier
09764dd969 Remove unneeded #include <stdio.h>
svn path=/trunk/; revision=32367
2010-04-03 21:55:23 +00:00
Anders Broman
081aa44683 - Make dfilter_sip_request_line() take offset as an argument to get the right offset in case there is more than one SIP message in an tvb.
- Use correct line end offset to dissect_sip_uri().
Fixes bug
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4570

svn path=/trunk/; revision=32309
2010-03-27 18:09:37 +00:00
Anders Broman
b362b47f71 My previous checkin reverted some changes, try to fix that.
svn path=/trunk/; revision=32197
2010-03-15 18:51:37 +00:00
Jeff Morriss
a6ca78fc2b Initialize a variable that otherwise might not be
svn path=/trunk/; revision=32196
2010-03-15 18:31:10 +00:00
Jeff Morriss
3ffbfe347e Declare sip_uri_offset_init() as returning void and remove a couple unused variables
svn path=/trunk/; revision=32195
2010-03-15 17:51:19 +00:00
Anders Broman
e2f2c4c2cf To fill stat_info->tap_to_addr it needs to be outside of if(tree).
svn path=/trunk/; revision=32194
2010-03-15 15:23:37 +00:00
Anders Broman
518ca45156 Use dissect_sip_uri() in dfilter_sip_request_line().
svn path=/trunk/; revision=32191
2010-03-14 19:54:09 +00:00
Anders Broman
d26a6348e7 Use dissect_sip_name_addr_or_addr_spec() or dissect_sip_uri() as needed.
svn path=/trunk/; revision=32178
2010-03-13 08:38:11 +00:00
Gerald Combs
dfff249e12 Initialize a variable.
svn path=/trunk/; revision=32172
2010-03-11 20:21:06 +00:00
Anders Broman
bd77bea4f2 Remove unused variables etc
svn path=/trunk/; revision=32171
2010-03-11 20:14:59 +00:00
Anders Broman
25e7ead105 Start to clean up parsing of SIP URI.
svn path=/trunk/; revision=32170
2010-03-11 17:45:16 +00:00
Anders Broman
25af78517e Make tvb_pbrk_guint8() return the found needle.
svn path=/trunk/; revision=32144
2010-03-08 20:45:13 +00:00
Anders Broman
3e1b6fd0a4 Check if URI is SIP.
svn path=/trunk/; revision=32122
2010-03-05 15:16:30 +00:00
Anders Broman
5d0629d36c Add comments and move some things inside if(tree).
svn path=/trunk/; revision=32121
2010-03-05 09:33:37 +00:00
Gerald Combs
2b619452ae Try to fix build errors.
svn path=/trunk/; revision=32118
2010-03-04 21:48:44 +00:00
Anders Broman
b2c9e92823 Use a hash table to lookup the SIP header.
It reduces the loading time of a file with 220 000 packets by 3s.
(SIP parsing should be optimized, if SIP is dissabled loading time is ~15s with SIP ~30s ).

svn path=/trunk/; revision=32116
2010-03-04 20:35:45 +00:00
Anders Broman
87576533f7 Changed to use g_str_hash ()
sip_hash_func() function seem to not generate unique enough keys
if load generation tools are used with many thousands users.
Loading time ~5 min -> 30s

There is a memory leak in the sip_is_packet_resend area as well.

svn path=/trunk/; revision=32090
2010-03-03 15:29:38 +00:00
Stig Bjørlykke
c198fc6546 From Didier Gautheron via bug 4419:
se_alloc and ep_alloc never return NULL and se_alloc0 already initialized
data with 0.

svn path=/trunk/; revision=31654
2010-01-25 11:47:39 +00:00
Bill Meier
1a4283ccf8 Fixes for gcc -Wshadow warnings; Fix indentation and do other minor cleanup in a few cases.
svn path=/trunk/; revision=31617
2010-01-22 13:56:19 +00:00