Commit Graph

108 Commits

Author SHA1 Message Date
Bill Meier c439b805e2 Comment out unused hf[] entries & etc.
(found by checkhf)

svn path=/trunk/; revision=47389
2013-01-31 17:55:31 +00:00
Martin Kaiser 30fdbd6da6 revert r46739
call fragment_add() before fragment_set_tot_len()
(the latter has no effect if no fragments are present, so we don't set
 the total length correctly when it's in the first fragment)

svn path=/trunk/; revision=47000
2013-01-08 22:24:42 +00:00
Martin Kaiser 13a5f0b5da set the dtls record length for reassembly _before_ adding a fragment
this is a workaround for
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8111
it does not fully fix the underlying issue

svn path=/trunk/; revision=46739
2012-12-25 18:44:14 +00:00
Anders Broman ac50d3b316 From Dirk:
print decrypted SSL application data as hexdump in ssl debug file.

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

svn path=/trunk/; revision=46040
2012-11-16 11:35:01 +00:00
Evan Huus 69905db57c Move potential dereference until *after* the null-check.
Caught by cppcheck.

svn path=/trunk/; revision=45081
2012-09-23 21:02:32 +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 9f92dc93c5 Add data parameter to call_dissector_only.
svn path=/trunk/; revision=44872
2012-09-11 08:28:07 +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
Jeff Morriss aa5d9d78dd From Robert Bullen via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7683 :
The reassembled fragments tree in the Packet Details view is awesome, but it
lacks one thing: a field that exposes the reassembled data.

tcp.data already exists for exposing a single TCP segment's payload as a byte
array. It would be handy to have something similar for a single application
layer PDU when TCP segment reassembly is involved. I propose
tcp.reassembled.data, named and placed after the already existing field
tcp.reassembled.length.

My primary use case for this feature is outputting tcp.reassembled.data with
tshark for further processing with a script.

The attached patch implements this very feature. Because the reassembled
fragment tree code is general purpose, i.e. not specific to just TCP, any
dissector that relies upon it can add a similar field very cheaply. In that
vein I've also implemented ip.reassembled.data and ipv6.reassembled.data, which
expose reassembled fragment data as a single byte stream for IPv4 and IPv6,
respectively. All other protocols that use the reassembly code have been left
alone, other than inserting NULL into their initializer lists for the newly
introduced struct field reassemble.h:fragment_items.hf_reassembled_data.

svn path=/trunk/; revision=44802
2012-09-07 02:09:59 +00:00
Michael Tüxen 91f65904c2 Recommit:
http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=44502
http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=44511
and do some whitespace cleanups while there.

svn path=/trunk/; revision=44522
2012-08-15 16:02:01 +00:00
Michael Mann 3082032be6 convert GStrings to more "ephemeral friendly" use.
svn path=/trunk/; revision=44515
2012-08-15 13:56:59 +00:00
Michael Tüxen 54e5d13d4b Move registration to a better place.
svn path=/trunk/; revision=44511
2012-08-15 06:14:10 +00:00
Michael Tüxen 08280810b7 Register DIAMETER/DTLS/SCTP.
svn path=/trunk/; revision=44502
2012-08-14 20:53:39 +00:00
Bill Meier 638d74d43f Use val_to_str_const() where appropriate;
Also (for a few files):
- create/use some extended value strings;
- remove unneeded #include files;
- remove unneeded variable initialization;
- re-order fcns slightly so prefs_reg_handoff...() at end, etc

svn path=/trunk/; revision=44438
2012-08-10 22:55:02 +00:00
Guy Harris 659cf0527a UATs could be put into "categories". The categories were defined only
implicitly by the #define name and string they were defined to; not all
UATs neatly fit into any of the categories, so some of them were put
into categories that weren't obviously correct for them, and one - the
display filter macro UAT - wasn't put into any category at all (which
caused crashes when editing them, as the GUI code that handled UAT
changes from a dialog assumed the category field was non-null).

The category was, in practice, used only to decide, in the
aforementioned GUI code, whether the packet summary pane needed to be
updated or not.  It also offered no option of "don't update the packet
summary pane *and* don't redissect anything", which is what would be
appropriate for the display filter macro UAT.

Replace the category with a set of fields indicating what the UAT
affects; we currently offer "dissection", which applies to most UATs
(any UAT in libwireshark presumably affects dissection at a minimum) and
"the set of named fields that exist".  Changing any UAT that affects
dissection requires a redissection; changing any UAT that affects the
set of named fields that exist requires a redissection *and* rebuilding
the packet summary pane.

Perhaps we also need "filtering", so that if you change a display filter
macro, we re-filter, in case the display is currently filtered with a
display filter that uses a macro that changed.

svn path=/trunk/; revision=43603
2012-07-08 01:00:46 +00:00
Jakub Zawadzki b18e880040 Update FSF address - part II.
svn path=/trunk/; revision=43538
2012-06-28 23:18:38 +00:00
Sake Blok 3bbb0d3bc6 Enhance dissection of the NewSessionTicket handshake message.
svn path=/trunk/; revision=43304
2012-06-17 11:30:25 +00:00
Jeff Morriss 4fdc3c3cc2 Create, and start using, file name preferences.
File name preferences are basically just string preferences except that the
GUI will present a "Browse" button that allows the user to go and find the
file s/he wants (rather than having to blindly type in the full path).

svn path=/trunk/; revision=43228
2012-06-13 01:13:12 +00:00
Chris Maynard 3445d93bf2 Fix Coverity CID 700201: Dereference after null check, by ensuring "decoder" is not NULL before passing it to ssl_decrypt_record().
svn path=/trunk/; revision=42842
2012-05-25 00:54:49 +00:00
pascal 126c94d8c8 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6906 :
Restore dissection without private key when RSA-NULL-MD5 or RSA-NULL-SHA cipher is used 

svn path=/trunk/; revision=42441
2012-05-05 17:35:35 +00:00
pascal 95eb2e7288 From Martin Kaiser:
Fix some 'intermediate pointers must be const qualified' warnings
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7215

svn path=/trunk/; revision=42355
2012-04-30 19:14:14 +00:00
Bill Meier f0c3ee5c4a Whitespace cleanup: Indentation, trailing, ...
svn path=/trunk/; revision=42266
2012-04-26 16:05:05 +00:00
Michael Tüxen 7e112bec91 From Robin Seggelmann:
Support DTLS 1.2
Fix a bug in option handling.


svn path=/trunk/; revision=41816
2012-03-28 09:31:04 +00:00
Michael Tüxen 9765ee1bea From Robin Seggelmann: Add support for the New Session Ticket
message according to RFC 5077.

svn path=/trunk/; revision=41427
2012-03-08 09:25:13 +00:00
Michael Tüxen e929fdfdee From Robin Seggelmann: Add support for RFC 6520.
From me: Some cleanup
Initial work was done by Denis Jaeger and
Lukas Scharlau, but the code got rewritten by Robin.

svn path=/trunk/; revision=41189
2012-02-26 13:50:52 +00:00
Anders Broman 245fb95f47 From Naoyoshi Ueda:
Patch to fix DTLS decryption.

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

svn path=/trunk/; revision=41036
2012-02-16 05:21:09 +00:00
Jeff Morriss d45ad837b2 Fix via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6817 :
r40200 made ssl_parse()/dtls_parse() post-update-callbacks for those
dissector's UATs so that the dissector would be updated when the user changed
the UAT.  (This allows SSL/DTLS keys to be taken into account without requiring
Wireshark to be restarted.)

But, those functions also update the UAT themselves if the old-style keys_list
preference is used, creating an infinite recursion.

Fix this by splitting the *_parse() functions into two: one for the UAT and one
for the old-style keys list.

svn path=/trunk/; revision=40952
2012-02-10 23:08:46 +00:00
Alexis La Goutte d2e40e2d4a Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=40902
2012-02-06 22:14:30 +00:00
Chris Maynard cb8805e543 Fix some duplicate display filter names.
svn path=/trunk/; revision=40590
2012-01-19 20:19:28 +00:00
Bill Meier dddb66178b AFAIKT sys/stat.h, sys/types.h, sys/socket.h, winsock2.h, inet_v6_defs.h #includes aren't needed.
also: Add #include <epan/packet.h>  (altho included by one of the other includes).

svn path=/trunk/; revision=40329
2011-12-29 21:08:53 +00:00
Bill Meier 9beae6eb86 AFAIKT sys/types.h, sys/socket.h, winsock2.h, inet_v6_defs.h #includes aren't needed.
svn path=/trunk/; revision=40328
2011-12-29 20:44:19 +00:00
Bill Meier ab5ead6bb0 Do whitespace cleanup; Reformat long lines;
Move proto_register...() to be near the end of the file.

svn path=/trunk/; revision=40327
2011-12-29 20:23:18 +00:00
Bill Meier 799be66d9f Add (what I think are) missing add_new_data_source() calls;
svn path=/trunk/; revision=40231
2011-12-16 19:15:17 +00:00
Bill Meier 8ea30b478a Fix tvb memory leak; Add missing call to add_new_data_source();
Also: remove unneeded #includes.

svn path=/trunk/; revision=40221
2011-12-16 00:33:03 +00:00
Sake Blok 418863f88d Fix for bug 6032:
After changing the ssl_keys UAT, reparse the list and reload the keys.


svn path=/trunk/; revision=40200
2011-12-14 18:24:41 +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 e98b54c098 Use intended proto_tree_add_uint() instead of proto_tree_add_item() to fix benign bugs (Replaces SVN #39348).
svn path=/trunk/; revision=39359
2011-10-11 14:58:54 +00:00
Bill Meier 29e823dfba Fix benign bugs in some proto_tree_add_item() 'encoding' args;
svn path=/trunk/; revision=39348
2011-10-10 21:53:15 +00:00
Bill Meier 4e57694d4a Convert 'encoding' parameter of certain proto_tree_add_item() calls in non-autogenerated epan/dissectors:
Specifically:  Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as
 the encoding parameter for proto_tree_add_item() calls which directly reference
 an item in hf[] which has a type of:
    FT_UINT8
    FT_UINT16
    FT_UINT24
    FT_UINT32
    FT_UINT64
    FT_INT8
    FT_INT16
    FT_INT24
    FT_INT32
    FT_INT64
    FT_FLOAT
    FT_DOUBLE


svn path=/trunk/; revision=39288
2011-10-06 03:35:44 +00:00
Bill Meier 799578fb29 Use ENC_NA as encoding for proto_tree_add_item() calls which directly reference an hf item with types in hf[] of:
FT_NONE
    FT_BYTES
    FT_IPV6
    FT_IPXNET
    FT_OID

svn path=/trunk/; revision=39261
2011-10-05 00:25:09 +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
Stig Bjørlykke 0554530407 From Dirk via bug 6361:
Use File/Directory Dialog as a field type for UAT preferences.

svn path=/trunk/; revision=39059
2011-09-20 10:15:09 +00:00
Bill Meier d2269ce7d5 Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings.
svn path=/trunk/; revision=37716
2011-06-19 18:47:35 +00:00
Chris Maynard 4541cfe5d8 From Michael Chen via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5983:
Use offset instead of fragment_offset for boundary check. 

svn path=/trunk/; revision=37524
2011-06-02 17:12:13 +00:00
Chris Maynard a02b8fb247 From Michael Chen via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5863, with some additional enhancements by me: Add dtls heuristics.
svn path=/trunk/; revision=37511
2011-06-01 18:34:41 +00:00
Jeff Morriss f3f9f2697f Make TVBs opaque for most users.
Convert TVB_RAW_OFFSET() and TVB_GET_DS_TVB() into functions.

svn path=/trunk/; revision=37422
2011-05-27 03:06:50 +00:00
Jeff Morriss 8058ba646a From Michael Chen via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5863 :
1. Reload framing protocol no longer encapsulates the Reload message, instead
the latter is in its own tree following Reload framing, much like IP, UDP, etc.

2. Similarly, DTLS no longer encapsulates its data payload if the payload can
be dissected. The recognized payload is in its own tree following the DTLS,
much like IP, UDP, etc.

4. DTLS now has its own heuristic table for dissecting its payload, and
reload-framing is added to this DTLS heuristic table.

6. DTLS will try to dissect its payload if the agreed upon cipher is
RSA-NULL-MD5 (0x0001) or RSA-NULL-SHA (0x0002), even when DTLS is not
configured with the client/server private keys.


Still to do: make DTLS a heuristic dissector on top of UDP (item 3 in the bug).

svn path=/trunk/; revision=37110
2011-05-13 02:48:08 +00:00
Guy Harris c97679e264 If HAVE_LIBGNUTLS isn't defined, don't build functions that are used
only if HAVE_LIBGNUTLS is defined.

svn path=/trunk/; revision=36877
2011-04-26 22:56:22 +00:00
Gerald Combs c6fecb57b0 From Ivan Sy via bug 3343:
- Support for DTLS and SSL RSA keys list using User Accessible Table
- Support for IPv6 SSL as posted by bug#3343 comment#1
- 'any' and 'anyipv4' for IPv4 wildcard
- 'anyipv6' for IPv6 wildcard
- UAT fields validation.


From me:

- Update paramaters to match UAT API changes.
- Change the UAT filename.
- Fix buffer overflow for IPv6 addresses.
- Allow the use of hostnames along with numeric addresses.
- Don't convert strings to addresses twice.
- Don't use the same variable name for different data types.
- Make "any" mean "any IPv4 or any IPv6".
- Bend the concept of obsolete preferences slightly so that we can convert
  and old-style key list to a UAT.
- Clean up whitespace.
- Don't point to a User's Guide section for now; it may make more sense to
  keep using the wiki page.
  
SSL dissector changes have been tested. DTLS dissector changes have not.

svn path=/trunk/; revision=36875
2011-04-26 21:59:11 +00:00