Commit Graph

22214 Commits

Author SHA1 Message Date
Alexis La Goutte 2aa451859a Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50619
2013-07-15 18:04:03 +00:00
Alexis La Goutte cde1b3d4bb Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50618
2013-07-15 18:03:54 +00:00
Alexis La Goutte 779c37aa20 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50617
2013-07-15 18:03:43 +00:00
Alexis La Goutte 15a785c757 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50616
2013-07-15 18:03:33 +00:00
Alexis La Goutte 579b937bdf Use "generic" tfs (tfs_set_notset)
svn path=/trunk/; revision=50615
2013-07-15 18:03:13 +00:00
Alexis La Goutte 19fcedc185 Fix error from checkAPI.pl
Error: Found non-ASCII characters on line 871 of packet-scsi-osd.c

svn path=/trunk/; revision=50608
2013-07-15 08:13:28 +00:00
Anders Broman b99a650455 From Javier Godoy:
adds support for the OSD-2 CREATE USER TRACKING COLLECTION service action, following the approach described in bug 8832. It also implements dissection of the CDB continuation segment.

Change in scsi_osd_extra_data_t:
 - Add a continuation_length field (we need that value from the CDB when later dissecting the Data In buffer)

The following fields were added:	
 - hf_scsi_osd2_cdb_continuation_length
 - hf_scsi_osd2_cdb_continuation_format
 - hf_scsi_osd2_continued_service_action
 - hf_scsi_osd2_cdb_continuation_descriptor_type
 - hf_scsi_osd2_cdb_continuation_descriptor_pad_length
 - hf_scsi_osd2_cdb_continuation_descriptor_length
 - hf_scsi_osd2_source_collection_object_id

The following expert_info fields were added:
 - ei_osd2_cdb_continuation_format_unknown (PI_UNDECODED, PI_ERROR)
 - ei_osd2_continued_service_action_mismatch (PI_PROTOCOL, PI_WARN)
 - ei_osd2_cdb_continuation_descriptor_type_unknown (PI_UNDECODED, PI_WARN)
 - ei_osd2_cdb_continuation_descriptor_length_invalid (PI_PROTOCOL, PI_ERROR)
 - ei_osd2_cdb_continuation_length_invalid (PI_PROTOCOL, PI_ERROR)
 
The following value_string arrays were added:
 - scsi_osd2_cdb_continuation_format_val (OSD2r4 Table 69)
 - scsi_osd2_cdb_continuation_descriptor_type_val (OSD2r4 Table 71)
 
The following functions were added:	 
 - dissect_osd2_cdb_continuation_length (dissect the cdb continuation length field in cdb and save continuation_length in extra_data)
 - dissect_osd2_cdb_continuation (dissect the cdb continuation segment from the data out buffer; currently, descriptor-specific fields are not dissected)
 - dissect_osd2_create_user_tracking_collection 
 
Changes in dissect_osd_collection_object_id 
 - add an int hfindex parameter
 - the return type was made void (previously it returned int, but the return type was unused)
 - this function is used for filling collection_id related fields (there are several flavors of them) and may be modified for displaying creation/removal information (à la dissect_osd_partition_id)
 - one call to dissect_osd_requested_collection_object_id was replaced by dissect_osd_collection_object_id(...,hf_scsi_osd_requested_collection_object_id)
 - two calls to dissect_osd_collection_object_id were updated with the new signature

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

svn path=/trunk/; revision=50605
2013-07-15 04:56:01 +00:00
Anders Broman e9872cf077 Update dissection.
svn path=/trunk/; revision=50604
2013-07-15 04:50:42 +00:00
Anders Broman 17c0371414 From Javier Godoy:
fix partitions being inadvertently set as removed.

In dissect_osd_get_attributes and dissect_osd_set_attributes there were calls to dissect_osd_partition_id with the last parameter (is_removed) set to TRUE instead of FALSE. That caused dissect_osd_partition_id reporting the partitions as "removed". 

The only service action where is_removed must be TRUE is dissect_osd_remove_partition.

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

svn path=/trunk/; revision=50603
2013-07-15 04:50:03 +00:00
Jeff Morriss 58b3567ccb From Cal Turney via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8920 :
Changed FATTR4_DISSECT_VALUES arg to FATTR4_BITMAP_ONLY in calls to 
dissect_nfs4_fattrs() in cases NFS4_OP_OPEN and NFS4_OP_CREATE of
dissect_nfs4_response_op().

svn path=/trunk/; revision=50602
2013-07-15 04:00:20 +00:00
Jeff Morriss 16ef3ce2f1 Restore inclusion of report_err.h
svn path=/trunk/; revision=50599
2013-07-15 03:06:00 +00:00
Jeff Morriss 54bb2e7a5c Move report_err.{h,c} from epan into wsutil: there's nothing epan-specific there and moving it avoids having to recompile the file for use in editcap and capinfos (which don't link against libwireshark).
svn path=/trunk/; revision=50598
2013-07-15 02:48:26 +00:00
Jeff Morriss 27059c2804 Fix up some white space.
svn path=/trunk/; revision=50597
2013-07-15 02:05:54 +00:00
Jakub Zawadzki c3c6580d18 Fix assertion failed: ERROR:print.c:823:const guint8 *get_field_data(GSList *, field_info *): code should not be reached
svn path=/trunk/; revision=50593
2013-07-14 23:01:03 +00:00
Guy Harris d296ebc525 All routines taking an offset and length that want to access the data in
the backing tvbuff must add the subset tvbuff's offset to the offset
argument, to skip to the subset.

svn path=/trunk/; revision=50591
2013-07-14 22:38:03 +00:00
Guy Harris b68e6dcc42 A bit more comment updating.
svn path=/trunk/; revision=50590
2013-07-14 20:26:56 +00:00
Guy Harris 221f39988b Fix incorrect use of dlsw.frame_direction for capability exchange
frames; that should be a separate dlsw.capex_type field.

dlsw.error_cause is a numeric field, so it needs a base; the values in
the value_string table are in hex, so show it in hex.

svn path=/trunk/; revision=50589
2013-07-14 19:34:45 +00:00
Guy Harris cc4197b1fe Fix a comment.
svn path=/trunk/; revision=50588
2013-07-14 19:07:09 +00:00
Guy Harris d3be9807c4 Get rid of duplicate "Old message type" field.
svn path=/trunk/; revision=50587
2013-07-14 19:02:19 +00:00
Guy Harris 0e40234217 Make pointers to raw packet data pointers to guint8, not pointers to
char; they're chunks of raw octets, not characters.

svn path=/trunk/; revision=50586
2013-07-14 17:39:36 +00:00
Guy Harris a1ca4be5ef Cast the result of g_malloc(), to avoid warnings about trying to compile
this code as C++.

Make pointers to raw packet data pointers to guint8, not pointers to
char, as they're octets, not characters.

svn path=/trunk/; revision=50583
2013-07-14 17:16:56 +00:00
Jakub Zawadzki 543ba2746b fix: ../../asn1/t38/packet-t38-template.c:346: warning: request for implicit conversion from 'gpointer' to 'char *' not permitted in C++
svn path=/trunk/; revision=50582
2013-07-14 15:51:15 +00:00
Jakub Zawadzki 2671b8a398 fix: packet-mp2t.c:489: warning: implicit declaration of function 'tvb_new_proxy'
svn path=/trunk/; revision=50581
2013-07-14 15:20:09 +00:00
Jakub Zawadzki c766e78cfa Rewrite reassemble API to use TVBs instead of raw data.
(it seems to be working for TCP ^^)

svn path=/trunk/; revision=50580
2013-07-14 14:42:05 +00:00
Guy Harris 1f32615d99 Export tvb_free_chain() so that tvbtest can use it.
As on Windows with MSVC, and as with reassemble_test, link tvbtest with
libwireshark and the libraries it requires.

svn path=/trunk/; revision=50575
2013-07-14 10:30:49 +00:00
Guy Harris f99694bb11 Squelch a "not permitted in C++" warning.
svn path=/trunk/; revision=50574
2013-07-14 10:23:59 +00:00
Guy Harris 0ca2dd85ae Build tvbtest the same way we build reassemble_test; see whether that
fixes the build errors we're seeing, with complaints about

	tvbtest.obj : warning LNK4217: locally defined symbol tvb_XX imported in function test
	tvbtest.obj : error LNK2019: unresolved external symbol __imp_tvb_XXX referenced in function run_tests
	tvbuff.obj : error LNK2019: unresolved external symbol tvb_XXX referenced in function tvb_new_YYY

svn path=/trunk/; revision=50573
2013-07-14 10:19:12 +00:00
Jakub Zawadzki 2131f22508 Rewrite packet-mime-encap to use composite tvbs + cloning
svn path=/trunk/; revision=50571
2013-07-14 08:41:04 +00:00
Jakub Zawadzki b3e0623e5c Fix tvbtest linking, move private structures to tvbuff_subset
svn path=/trunk/; revision=50570
2013-07-14 07:59:42 +00:00
Jakub Zawadzki 0d85b75305 Move tvb real and subset implementations to seperate files.
svn path=/trunk/; revision=50569
2013-07-14 07:42:19 +00:00
Michael Mann a32513416b First real test of convert_proto_tree_add_text.pl.
svn path=/trunk/; revision=50566
2013-07-14 02:01:49 +00:00
Evan Huus b54d5b7d54 Fix the OID registration leaks.
Only 1,625 bytes to go...

svn path=/trunk/; revision=50565
2013-07-14 01:02:44 +00:00
Evan Huus c7909c4195 Fix one small leak in xml dissector registration.
svn path=/trunk/; revision=50564
2013-07-14 00:54:02 +00:00
Evan Huus afa96c3f33 Fix some of the preferences leaks. Don't strdup the defaults, as they will be
strduped again immediately when they are registered. To make this safe, tweak
the flow a bit so that they are guaranteed to be registered immediately after
being set here.

svn path=/trunk/; revision=50563
2013-07-14 00:45:19 +00:00
Jakub Zawadzki ef93945811 Add support for cloning TVBs, move tvb_new() prototype to wtap-int.h
svn path=/trunk/; revision=50558
2013-07-13 17:53:33 +00:00
Jakub Zawadzki af61f188e0 Add new function: validate_offset() which checks if offset is within bounds of tvb.
svn path=/trunk/; revision=50556
2013-07-13 14:51:25 +00:00
Evan Huus 611eaf8069 From Chris Botje via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8917
Minor Enhancement to add further to the Fast Message conversation structure to
provide Data Region Address/Name lookup.

From me: use tree for lookups, not slist.

svn path=/trunk/; revision=50555
2013-07-13 14:37:06 +00:00
Martin Kaiser 19de5ccfa1 From Vaibhav Katkade
Add Netflow Record TrustSec fields
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8928

svn path=/trunk/; revision=50553
2013-07-13 11:33:44 +00:00
Martin Kaiser ed324ee570 PNRP means Peer Name Resolution Protocol
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8929

(fix another typo)

svn path=/trunk/; revision=50552
2013-07-13 11:21:47 +00:00
Jakub Zawadzki d5450ff925 Remove compute_offset_length()
We either want to calculate only offset (compute_offset()), or
offset and remaining length (compute_offset_and_remaining())

Move old generic code to check_offset_length_no_exception())

svn path=/trunk/; revision=50551
2013-07-13 10:28:19 +00:00
Jakub Zawadzki 614e45a25a Call check_offset_length_no_exception() in tvb_bytes_exist(), fix possible integer overflow
svn path=/trunk/; revision=50550
2013-07-13 09:48:55 +00:00
Jakub Zawadzki cae2ce3b05 TVB: rewrite compute_offset_length(), check_offset_length_no_exception() to return exception number instead of FALSE, and 0 instead of TRUE
+ if there's overflow in check_offset_length_no_exception() just set exception, don't clamp end_offset (it could be an issue for 4GB tvbs :>)


svn path=/trunk/; revision=50549
2013-07-13 09:17:32 +00:00
Jakub Zawadzki e26b65f0ec proto_custom_set() cleanup
- Merge _UINT / _INT into one case
- fix possible generation of wrong expression ("some_integer") for unknown value in BASE_NONE field 

svn path=/trunk/; revision=50548
2013-07-13 09:14:25 +00:00
Chris Maynard 7f46a717f1 If the FCS isn't present, don't indicate "FCS Valid: True". Instead, indicate "FCS Valid: Unknown".
Note: Other changes should be made as well regarding the FCS as part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8859.

svn path=/trunk/; revision=50546
2013-07-12 22:53:56 +00:00
Chris Maynard cef679ac98 Add the hidden wpan.frame_length to the IEEE 802.15.4 tree, not the top-level tree.
svn path=/trunk/; revision=50541
2013-07-12 21:32:03 +00:00
Jakub Zawadzki d2b93398f9 fix subset tvb: we want to do operation on backing tvb on position: abs_offset + subset_offset, abs_offset - subset_offset makes no sense.
Right now it doesn't really matter, cause tvb subsets always have real_data.

Without fix, and with small modification in ensure_contigous_no_expcetion() to first check for ->tvb_get_ptr() and later real_data
epan doesn't work and it flood console with warnings like:
** (process): WARNING **: Dissector bug, protocol IPv4, in packet 3823: tvbuff.c:976: failed assertion "exception > 0"


svn path=/trunk/; revision=50537
2013-07-12 17:53:51 +00:00
Alexis La Goutte c44977663a From Matt Texier via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8691 Improvement of previous support of RFC5575 BGP flow spec
From me
* Enhance and fix some display tree stuff
* Add Matt to AUTHORS

svn path=/trunk/; revision=50534
2013-07-12 13:55:29 +00:00
Jeff Morriss 7ad38c4c9c From Dirk De Schepper via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8926 :
The dissector defines some one-byte fields as UFLOAT. Defining them as UINT
fixes the decoding error for CAT48 version 1.21.

svn path=/trunk/; revision=50532
2013-07-12 13:01:17 +00:00
Guy Harris 9997e9f315 ps.h got moved to epan.
svn path=/trunk/; revision=50531
2013-07-12 08:01:52 +00:00
Jakub Zawadzki 7c9c79ca68 Move bitmask array from ipv4_addr_set_netmask_bits() to ip_get_subnet_mask()
Use it in subnet_mask_lookup_init().

svn path=/trunk/; revision=50527
2013-07-12 05:59:56 +00:00
Jeff Morriss 4dcc156cf3 Move the print modules into epan.
svn path=/trunk/; revision=50526
2013-07-12 03:50:50 +00:00
Jeff Morriss 16206348d9 Move disabled_protos.{h,c} into epan.
svn path=/trunk/; revision=50521
2013-07-12 01:40:06 +00:00
Jeff Morriss 45449ce1a8 Move some more modules into epan.
svn path=/trunk/; revision=50517
2013-07-11 23:57:11 +00:00
Guy Harris 0f003babb3 Fix cut-and-pasteo found by a compiler warning.
Mark an unused parameter as unused.

svn path=/trunk/; revision=50515
2013-07-11 21:54:23 +00:00
Guy Harris b125950d9a Fix typo found by a compiler warning.
svn path=/trunk/; revision=50514
2013-07-11 21:53:19 +00:00
Anders Broman 614194e61f The beginning of an openflow dissector.
svn path=/trunk/; revision=50513
2013-07-11 21:13:27 +00:00
Anders Broman 5dec6b5603 From Tommy Wu:
Add 3gpp2_cvse.

svn path=/trunk/; revision=50512
2013-07-11 21:12:31 +00:00
Anders Broman 7fa8bd0f05 From Tommy Wu:
Use terminology from RFC 4303

svn path=/trunk/; revision=50511
2013-07-11 21:11:28 +00:00
Chris Maynard 6c371815d3 Fix an obvious case of incorrectly comparing the return value of tvb_length_remaining() against non-zero instead of greater than zero. There are other questionable uses of tvb_length_remaining() as well ... and maybe these should all be replaced with tvb_reported_length_remaining() as well?
#BACKPORT(1.10,1.8)

svn path=/trunk/; revision=50510
2013-07-11 15:55:52 +00:00
Jeff Morriss b53ced1e6a get_hfi_and_length() hasn't returned the hfi since r50015: rename it
to get_hfi_length().

svn path=/trunk/; revision=50509
2013-07-11 15:03:43 +00:00
Jeff Morriss b0c5fecc62 Don't mark a used parameter _U_.
svn path=/trunk/; revision=50508
2013-07-11 15:00:39 +00:00
Jeff Morriss 160c35c8e9 For consistency:
s/hf_index/hfindex/g
s/hf_info/hfinfo/g

svn path=/trunk/; revision=50507
2013-07-11 14:58:11 +00:00
Jeff Morriss b6ee11e928 Fix the very long loop fuzz failure reported in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8923 :
Apply the fix for https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3290
to proto_tree_add_bits_item().  That is, test that we have offset+length bytes
left in the TVB before trying to fake the item.

svn path=/trunk/; revision=50504
2013-07-11 14:46:30 +00:00
Michael Mann c38a750821 Client subnet optcode value now IANA assigned. Warn if experimental placeholder value is still used. Bug 7552 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7552)
svn path=/trunk/; revision=50503
2013-07-11 11:59:30 +00:00
Jakub Zawadzki 97456cde01 Fix two problems in tvbuff.h
svn path=/trunk/; revision=50499
2013-07-11 06:08:28 +00:00
Jakub Zawadzki 356a4613c7 Restore old composite_memcpy() prototype. Remove it from ops.
svn path=/trunk/; revision=50498
2013-07-11 05:51:19 +00:00
Jakub Zawadzki ce81449ed9 packet dissection now takes pointer to tvb instead of guint8 data
implement frame_tvbuff, right now almost a copy of 'real' tvb.

svn path=/trunk/; revision=50497
2013-07-11 05:47:02 +00:00
Jakub Zawadzki 19d2d0dc76 tvbuff: try to fix compilation problems for C++-like compilers.
svn path=/trunk/; revision=50496
2013-07-11 04:35:12 +00:00
Pascal Quantin ef942ca080 Upgrade NAS disssectors to v11.7.0
svn path=/trunk/; revision=50494
2013-07-10 21:31:22 +00:00
Jakub Zawadzki 338f1c9654 tvbuff: remove ->tvb_init() from ops
->tvb_init() knows nothing about new tvb and can only do some kind of bzero()
it's much better if we initialize object after tvb_new() [which anyway must be done]

+ try to fix OSX build.

svn path=/trunk/; revision=50490
2013-07-10 19:25:49 +00:00
Jakub Zawadzki d7175365ab tvbuff: allow tvb-implementations using their own structure (it's fine as long as first member of struct is tvbuff)
Move some stuff outside tvbuff struct.

svn path=/trunk/; revision=50489
2013-07-10 19:08:02 +00:00
Jakub Zawadzki b4d8a3727f Fix previous commit. Devel env with -w in CFLAGS is not so good idea...
svn path=/trunk/; revision=50487
2013-07-10 18:25:24 +00:00
Jakub Zawadzki f3ed13c22e tvbuff: replace type with operation vtable
It's begin of work to allow adding new tvbuff types (think: wtap_tvbuff, base64_tvbuff).

svn path=/trunk/; revision=50486
2013-07-10 18:14:15 +00:00
Stig Bjørlykke ca9c78088b Document that ProtoField INT64 and UINT64 does not support value string.
svn path=/trunk/; revision=50484
2013-07-10 16:51:54 +00:00
Stig Bjørlykke 5289c9564d Use luaL_optnumber for ProtoField mask, to avoid a signed cast.
This fixes bug 5734.

svn path=/trunk/; revision=50483
2013-07-10 16:33:30 +00:00
Chris Maynard d602662b36 Add strnatcmp by Martin Pool for 'natural order' string comparisons, and make use of it in editcap and mergecap for listing encapsulation types. For example:
Before:
    user0 - USER 0
    user1 - USER 1
    user10 - USER 10
    user11 - USER 11
    user12 - USER 12
    user13 - USER 13
    user14 - USER 14
    user15 - USER 15
    user2 - USER 2
    user3 - USER 3
    user4 - USER 4
    user5 - USER 5
    user6 - USER 6
    user7 - USER 7
    user8 - USER 8
    user9 - USER 9

After:
    user0 - USER 0
    user1 - USER 1
    user2 - USER 2
    user3 - USER 3
    user4 - USER 4
    user5 - USER 5
    user6 - USER 6
    user7 - USER 7
    user8 - USER 8
    user9 - USER 9
    user10 - USER 10
    user11 - USER 11
    user12 - USER 12
    user13 - USER 13
    user14 - USER 14
    user15 - USER 15


svn path=/trunk/; revision=50482
2013-07-10 16:18:37 +00:00
Anders Broman d3e9ec675a From Javier Godoy:
Proper dissection of responses with insufficient allocation length.

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

svn path=/trunk/; revision=50481
2013-07-10 05:08:06 +00:00
Evan Huus e2768d027c The last bits of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8828
Convert the last DISSECTOR_ASSERTs into potential expert infos, and do the right
offset manipulation and verification to avoid long (or infinite) loops when
those conditions are hit. This includes fixing some long loops I accidentally
introduced in r50432.

svn path=/trunk/; revision=50478
2013-07-10 00:32:57 +00:00
Jakub Zawadzki 83322789d1 tvbuff: use ep_strbuf_append_unichar()
svn path=/trunk/; revision=50477
2013-07-09 23:10:04 +00:00
Martin Kaiser 882d0841ae fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8916
reported by Laurent Butti

a TPDU's length field must never be 0
this length field was decremented without prior checking,
allocating length-1 bytes of memory caused a dissector assert

svn path=/trunk/; revision=50474
2013-07-09 20:51:48 +00:00
Pascal Quantin 8c9ab802ce Upgrade LTE RRC dissector to v11.4.0
svn path=/trunk/; revision=50473
2013-07-09 20:39:09 +00:00
Michael Mann 38ce891424 Fix some uninitialized variable warnings reported in bug 8904 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8904) by setting conversation structure (smtp_session_state) to all zeros.
svn path=/trunk/; revision=50472
2013-07-09 20:35:26 +00:00
Jakub Zawadzki 398f94dd24 tvb subset: move setting tvb->ds_tvb to tvb_new_with_subset()
svn path=/trunk/; revision=50464
2013-07-09 16:22:53 +00:00
Alexis La Goutte fd86b76b2b From Javier Godoy via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8905 SCSI OSD: per-attribute subtree
The response of the OSD-2 LIST command may contain attributes in multi-object retrieved attributes format. Currently all proto_items for that attributes are put under the SCSI Payload tree, yielding a large list of items:

	Partition Id
	Object Type
	Attribute Page
	Attribute Number
	Attribute Length
	(optional attribute-specific fields)
	Attribute Page, ...
	Partition Id
	Object Type
	Attribute Page, ...
	...

This patch classifies the OSD-2 LIST attributes (from the Data In buffer) in one tree per object and one sub-tree per attribute
	Partition Id (ett_osd_multi_object tree)
		Object Type
		Attribute (ett_osd_attribute tree)
			Attribute Page
			Attribute Number
			Attribute Length
			(optional attribute-specific fields)
		Attribute, ...
	Partition Id
		Object Type
		Attribute Page, ...
	...

The same approach is applied to attributes in the Get/Set attributes segments.

A function *attribute_page_numbers_t lookup_osd_attribute(page,number) was created, with common code that is called from dissect_osd_attributes_list, dissect_osd_attribute_value and dissect_osd2_attribute_list_entry.

The trees are built in function dissect_osd_attribute_list_entry. That function was modified for avoiding code duplication with case 0x09 of dissect_osd_attributes_list. A missing padding was added in the process.

The function dissect_osd_partition_id now returns proto_item*, so that we can create a subtree rooted at the partition_id (previously it returned an offset, but the return value was unused).

From me:
Fix clang warning duplicate code...
Remove some trailing whitespace

svn path=/trunk/; revision=50462
2013-07-09 13:09:05 +00:00
Anders Broman 06f748c0b5 prefs.c: In function 'capture_column_set_cb':
prefs.c:1745: warning: unused variable 'syntax_error'

svn path=/trunk/; revision=50457
2013-07-09 05:14:33 +00:00
Anders Broman bbf7636e61 From Cal Turney:
Wireshark crashes when switching from a v1.11.0 profile to a v1.4.6 prof and then to a v1.5.1 profile.

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

#BACKPORT 1.10

svn path=/trunk/; revision=50455
2013-07-09 04:22:43 +00:00
Michael Mann 6b3ac2d952 Batch of filterable expert infos.
svn path=/trunk/; revision=50454
2013-07-09 01:18:52 +00:00
Jeff Morriss 5541c28ae6 Fix the very long loop reported in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8911 :
In parseFields() ensure that we have at least one byte so that callers
don't have to protect against it returning an offset which hasn't incremented.

Remove a couple of now-unnecessary length-remaining (aka "will the offset
move?") checks.

In some other checks, use tvb_ensure_length_remaining() rather than calling
tvb_length_remaining() and (potentially) THROWing an exception.  I'm not sure
if these are really necessary now or not...

svn path=/trunk/; revision=50450
2013-07-08 21:12:06 +00:00
Pascal Quantin 3db06ae582 Fix "Could not compile color filter "Checksum Errors" from saved filters: eth.fcs_bad (type=Label) cannot participate in '==' comparison" warning
svn path=/trunk/; revision=50448
2013-07-08 18:49:42 +00:00
Gerald Combs 59644b3899 New Qt feature: Show related packet list items in the frame number
column. Conversation spans (setup frame to last frame) are shown with a
square bracket. Linked frames are shown with a circle.

Use correct column justifications in Qt. Move common
justification-related packet list code to ui/packet_list_utils.[ch].

Add a last_frame element to conversation_t.

svn path=/trunk/; revision=50447
2013-07-08 16:54:18 +00:00
Alexis La Goutte 5b7c3b3105 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50446
2013-07-08 16:37:47 +00:00
Jakub Zawadzki 87646b1126 Fixes for tmp_fld_check_value():
- FT_FRAMENUM can't have strings
- mask hfinfo->display to compare with valid BASE_ value

svn path=/trunk/; revision=50444
2013-07-08 05:59:07 +00:00
Jakub Zawadzki ed4622dc7f ups? first add + 1, then multiply.
svn path=/trunk/; revision=50438
2013-07-07 21:32:12 +00:00
Martin Kaiser bf6b5d74d6 fixed a typo in the expert infos
svn path=/trunk/; revision=50435
2013-07-07 19:03:03 +00:00
Jakub Zawadzki d4f1a2c599 tree_is_expanded: make it bit array.
Right now we have about 36K of ett items, and tree_is_expanded takes: 144K of memory (36K*sizeof(gboolean))
By making tree_is_expanded bit array, it reduce size to 4.5K (36K/8)

svn path=/trunk/; revision=50434
2013-07-07 17:13:17 +00:00
Jakub Zawadzki 792f35a28c Make tree_is_expanded array static, add setter/getter function.
svn path=/trunk/; revision=50433
2013-07-07 16:33:49 +00:00
Evan Huus cd7712fd2f A bit more of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8828
svn path=/trunk/; revision=50432
2013-07-07 16:18:18 +00:00
Evan Huus afa7538f12 Revert part of r50415. As pointed out by Jakub, some of the value_string
functions are called when no dissection is going on, and so can't use
wmem_packet_scope().

svn path=/trunk/; revision=50428
2013-07-06 23:53:09 +00:00
Jakub Zawadzki 5ef777c80b proto.c: add few more cases when oct/hex can show up with signed number
remove invalid comment about HEX/OCT print not supported for signed numbers.

svn path=/trunk/; revision=50427
2013-07-06 23:46:31 +00:00
Evan Huus 5633f7ffd5 From Marko Hrastovec via
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8886

Fix an error in the scaling factor of field I062/380 subfield #28 in the Asterix
dissector.

svn path=/trunk/; revision=50424
2013-07-06 22:03:52 +00:00
Pascal Quantin 67e4c15d4e Add UE Id to UDP framing protocol
svn path=/trunk/; revision=50422
2013-07-06 21:43:44 +00:00
Pascal Quantin 218608f1a2 Count SDUs even when dumping only the MAC header
svn path=/trunk/; revision=50420
2013-07-06 21:07:42 +00:00
Guy Harris b2475c1c29 Squelch some warnings that show up with, for example, the GCC 4.2.1 that
comes with Xcode 3.2.6 (it's not a real problem, but that requires more
flow analysis than that version of the compiler does, apparently).

svn path=/trunk/; revision=50419
2013-07-06 19:34:21 +00:00
Evan Huus bd52515b06 Use epan-scoped memory for 6lowpan preference names. Another ~300 bytes gone.
svn path=/trunk/; revision=50417
2013-07-06 18:40:56 +00:00
Evan Huus 2626f96901 Use epan-scoped memory for XML field strings. Another ~35KB leaks fixed.
Running `tshark -v` (which has the happy effect of doing
  epan_init();
  epan_cleanup();
with no practical work in-between), now leaks a hair less than 2KB of memory on
my machine. It was over 500KB earlier today :)

svn path=/trunk/; revision=50416
2013-07-06 18:31:35 +00:00
Evan Huus bae9597ca7 Wmem-ify value-strings. Another ~10KB gone.
svn path=/trunk/; revision=50415
2013-07-06 18:25:27 +00:00
Evan Huus 74e1b830a9 Use epan-scoped memory for h248 packages. Fixes another ~24KB of leaks.
svn path=/trunk/; revision=50414
2013-07-06 18:14:04 +00:00
Evan Huus 32088c9e6e Regenerate p1 dissector.
svn path=/trunk/; revision=50413
2013-07-06 18:06:56 +00:00
Evan Huus b4df55d204 Build dynamic diameter value_string arrays with wmem arrays not garrays.
Fixes another ~60KB of leaks.

svn path=/trunk/; revision=50412
2013-07-06 18:01:57 +00:00
Evan Huus e1268955c7 Add wmem_array_sort() which just hands off to the standard library's qsort().
svn path=/trunk/; revision=50411
2013-07-06 17:47:32 +00:00
Evan Huus 5a744f4afa Remove unused data structures from new expert code. Cleans up another ~17KB
of leaks, and I suspect they won't be necessary (we can always add them back
using wmem if they do turn out to be needed).

svn path=/trunk/; revision=50409
2013-07-06 16:11:36 +00:00
Evan Huus 42ce3fe364 Convert xml's dynamic hf array from a garray to a wmem_array. Cleans up another
~200KB of leaks in epan library.

svn path=/trunk/; revision=50408
2013-07-06 16:08:12 +00:00
Evan Huus 0bc2afcd06 Allocate expert protocol structs with wmem, cleans up a few KB of leaks in
epan_cleanup().

svn path=/trunk/; revision=50406
2013-07-06 12:54:13 +00:00
Evan Huus 260369a45d Build diameter's hf array in a wmem array instead of a garray. Fixes ~270KB of
leak when running epan_cleanup().

svn path=/trunk/; revision=50405
2013-07-06 12:45:33 +00:00
Guy Harris 24142c4ee4 In some versions of some OSes, even <string.h> declares index() under
some circumstances.  Use array_index as a variable name instead, to
avoid warnings.

svn path=/trunk/; revision=50404
2013-07-06 08:33:07 +00:00
Evan Huus 777f060f01 Trivial code style: use wmem_new in a few places, and remove extraneous
whitespace.

svn path=/trunk/; revision=50401
2013-07-06 04:08:07 +00:00
Evan Huus c574f7d1ea Simple growable array implementation for wmem.
svn path=/trunk/; revision=50400
2013-07-06 04:02:08 +00:00
Michael Mann 225698ef0b Fix display filter errors caught by checkfiltername.pl
svn path=/trunk/; revision=50399
2013-07-06 02:53:45 +00:00
Michael Mann eec311ef39 Fix duplicate diplay filter names found by checkfiltername.pl
svn path=/trunk/; revision=50396
2013-07-06 01:20:38 +00:00
Evan Huus 6de3257a6c From Fabio Tarabelloni via
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8718

Zigbee messaging cluster dissector.

svn path=/trunk/; revision=50395
2013-07-06 00:44:10 +00:00
Evan Huus 599d994938 From Chris Bontje via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8860
Numerous changes and fixes to the selfm dissector. Too many to bother listing
here, see the bug for full details.

svn path=/trunk/; revision=50394
2013-07-06 00:01:59 +00:00
Evan Huus 34cd52a8e5 Fix the use of va_args in the new expert code. Passing a va_list to a ... is
valid, but doesn't do what you actually want most of the time.

svn path=/trunk/; revision=50392
2013-07-05 23:53:25 +00:00
Evan Huus a4e5839f1f Fix compile errors: remove unused parameters, fix format string.
svn path=/trunk/; revision=50388
2013-07-05 22:54:51 +00:00
Michael Mann 0823711a66 Major cleanup to ICQ dissector. Still needs a bunch of proto_tree_add_text -> proto_tree_add_xxx conversion (although the conversion seems simple but tedious).
The big problem appears to be that this dissector doesn't support an ICQ version in use today.  Maybe having it look less scary will encourage someone to submit a patch that supports a more recent version.

svn path=/trunk/; revision=50387
2013-07-05 20:47:24 +00:00
Martin Kaiser e4e67b1517 fix compiler warning
packet-mpls-echo.c: In function 'dissect_mpls_echo_tlv':
packet-mpls-echo.c:1136:38: error: 'ddsti' may be used uninitialized in
this function [-Werror=maybe-uninitialized]
packet-mpls-echo.c:1065:17: note: 'ddsti' was declared here


svn path=/trunk/; revision=50386
2013-07-05 18:37:36 +00:00
Michael Mann 28bb3a5591 Batch of filterable expert infos.
svn path=/trunk/; revision=50384
2013-07-05 03:10:36 +00:00
Pascal Quantin df562fe9f5 Add channel id to UDP framing protocol and allow to dissect only the header of a signalling PDU (as we do for data PDUs)
svn path=/trunk/; revision=50381
2013-07-04 12:11:54 +00:00
Guy Harris 88c1661af4 Global variables considered harmful.
svn path=/trunk/; revision=50378
2013-07-04 00:12:27 +00:00
Michael Mann 7878e93cad expert_add_info_format_text + proto_tree_add_text = proto_tree_add_expert_format, where applicable.
svn path=/trunk/; revision=50377
2013-07-03 23:43:26 +00:00
Jakub Zawadzki 242e18dace PROTO_REGISTRAR_GET_NTH() not needed after TRY_TO_FAKE_THIS_ITEM
svn path=/trunk/; revision=50376
2013-07-03 22:57:53 +00:00
Pascal Quantin 784c7d680b Fix a null pointer dereference in downlink direction
svn path=/trunk/; revision=50374
2013-07-03 21:26:12 +00:00
Pascal Quantin 956fa2acdb Clear info column when using UDP framing
svn path=/trunk/; revision=50373
2013-07-03 20:03:52 +00:00
Jakub Zawadzki 99e03acfd8 Optimize proto_item_prepend_text: if there's no fi->rep avoid one strlcpy().
svn path=/trunk/; revision=50372
2013-07-03 17:44:46 +00:00
Stephen Fisher e930250384 Change grammar (obsoleted -> obsolete) in RIP preferences.
svn path=/trunk/; revision=50371
2013-07-03 17:07:23 +00:00
Alexis La Goutte 5cdc82ab69 From Oliver Gasser via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8863 Add CAA support to DNS dissector
Add informationa about Certificate Authority Authorization (CAA) data to the DNS dissector. See the RFC [1] for more information. Suggestions and improvements are welcome.

[1] http://tools.ietf.org/html/rfc6844

svn path=/trunk/; revision=50370
2013-07-03 16:46:29 +00:00
Alexis La Goutte 361b800eae Remove trailing whitespace
svn path=/trunk/; revision=50369
2013-07-03 16:46:20 +00:00
Alexis La Goutte f937828fff Fix some warnings from fix-encoding-args tools.
svn path=/trunk/; revision=50368
2013-07-03 16:46:11 +00:00
Alexis La Goutte 0a8f75a63f Fix some warnings from fix-encoding-args tools.
svn path=/trunk/; revision=50367
2013-07-03 16:46:01 +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
Alexis La Goutte 4f2a033098 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50365
2013-07-03 16:45:42 +00:00
Alexis La Goutte 16bd4e733d Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50364
2013-07-03 16:45:33 +00:00
Alexis La Goutte 647bad86fd Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50363
2013-07-03 16:45:24 +00:00
Alexis La Goutte d8a21fe1db Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50362
2013-07-03 16:45:14 +00:00
Alexis La Goutte 4da8927735 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50361
2013-07-03 16:45:05 +00:00
Alexis La Goutte 3a1c338213 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50360
2013-07-03 16:44:55 +00:00
Alexis La Goutte 915a81155a Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50359
2013-07-03 16:44:45 +00:00
Alexis La Goutte a7a2017b62 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50358
2013-07-03 16:44:36 +00:00
Alexis La Goutte 97ba22acff Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50357
2013-07-03 16:44:26 +00:00
Alexis La Goutte bfd7c94851 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50356
2013-07-03 16:44:17 +00:00
Alexis La Goutte dc00c8fc94 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50355
2013-07-03 16:44:08 +00:00
Alexis La Goutte 890da55c94 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50354
2013-07-03 16:43:58 +00:00
Alexis La Goutte 327ca65ae2 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50353
2013-07-03 16:43:49 +00:00
Alexis La Goutte a06cccbe25 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50352
2013-07-03 16:43:40 +00:00
Alexis La Goutte d58b0bf1a1 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50351
2013-07-03 16:43:31 +00:00
Alexis La Goutte 82bef2abe7 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50350
2013-07-03 16:43:21 +00:00
Alexis La Goutte 172b0237a3 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50349
2013-07-03 16:43:12 +00:00
Alexis La Goutte 88211d30ae Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50348
2013-07-03 16:43:02 +00:00
Alexis La Goutte d34f4c3b53 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50347
2013-07-03 16:42:53 +00:00
Alexis La Goutte 58c328100d Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50346
2013-07-03 16:42:44 +00:00
Alexis La Goutte fb9d8134c6 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50345
2013-07-03 16:42:35 +00:00
Alexis La Goutte bfa7acca05 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50344
2013-07-03 16:42:25 +00:00
Alexis La Goutte 3dac733fb0 There dissectors is not ASN1 dissectors.... !
svn path=/trunk/; revision=50343
2013-07-03 16:42:15 +00:00
Alexis La Goutte d9b440a07a Fix typo (Missing CR)
svn path=/trunk/; revision=50342
2013-07-03 16:42:00 +00:00
Michael Mann 0bad33df96 Fix infinite loop in VTP dissector. Bug 8887 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8887)
svn path=/trunk/; revision=50340
2013-07-03 12:42:17 +00:00
Pascal Quantin b00abd1c43 Check actx->private_data validity before using it
svn path=/trunk/; revision=50339
2013-07-03 12:01:12 +00:00
Pascal Quantin b91b990a77 Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8880 :
Check actx->private_data validity before using it

svn path=/trunk/; revision=50338
2013-07-03 08:53:47 +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
Guy Harris 5d87a8c461 WS_DLL_PUBLIC is now always WS_DLL_PUBLIC_NOEXTERN with "extern" added;
just define WS_DLL_PUBLIC_NOEXTERN inside the ifdefs, and define
WS_DLL_PUBLIC as WS_DLL_PUBLIC_NOEXTERN followed by "extern".

Then rename WS_DLL_PUBLIC_NOEXTERN to WS_DLL_PUBLIC_DEF, to clarify that
it's what should be used for definitions; at least on Windows, you
*have* to use it when declaring arrays without a size, and, whilst you
might be able to use WS_DLL_PUBLIC for definitions of functions and
perhaps data definitions other than no-size arrays, it might be clearer
to rename WS_DLL_PUBLIC to WS_DLL_PUBLIC_DECL and use it only for
declarations.

svn path=/trunk/; revision=50334
2013-07-03 01:43:39 +00:00
Evan Huus a3543e6050 From Javier Godoy via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8881
Follow-up to r50308: misc bug fixes and tweaks to OSD2 dissection.

svn path=/trunk/; revision=50333
2013-07-03 01:22:54 +00:00
Jakub Zawadzki 9c58621893 - rename and optimize proto_data_add_maybe_interesting_field
- proto_tree_add_node() double checks if tree_type is valid remove second one (first one is more verbose)

svn path=/trunk/; revision=50328
2013-07-02 21:26:14 +00:00
Michael Mann a6acb73611 Make expert items filterable. First use of proto_tree_add_expert.
svn path=/trunk/; revision=50327
2013-07-02 21:16:10 +00:00
Jakub Zawadzki 68c2c57037 Remove tree argument from TRY_TO_FAKE_THIS_REPR macro
PTREE_DATA should be the same for both *tree* and *pi*

svn path=/trunk/; revision=50326
2013-07-02 20:51:58 +00:00
Michael Mann e5cb4d84cc proto_malformed SHOULD NOT be used outside of show_exception.c
svn path=/trunk/; revision=50325
2013-07-02 20:43:21 +00:00
Michael Mann a19eaef617 Remove "global" proto_malformed and update some of the expert_info items that really aren't "malformed".
svn path=/trunk/; revision=50324
2013-07-02 20:25:14 +00:00
Michael Mann 7ae263b9e4 Differentiate "Disabled" from "Unknown" and provide macros for the enumerated values.
svn path=/trunk/; revision=50323
2013-07-02 20:08:49 +00:00
Michael Mann e16933f496 Add proto_tree_add_expert and proto_tree_add_expert_format. This was added to expert.h instead of proto.h because the underlying code to process expert info is static (and should probably remain so). Also, proto_tree_add_expert and proto_tree_add_expert_format follow "expert info" rules in that they should be called regardless of tree status (even though they take a tree as an argument), unlike the functions in proto.h
Also added an enumeration for checksum validation status, as verifying checksums is considered "expert" functionality.

svn path=/trunk/; revision=50322
2013-07-02 19:53:28 +00:00
Jakub Zawadzki b0e04aca73 Rewrite proto_lookup_or_create_interesting_hfids() and rename to proto_data_add_maybe_interesting_field
Now proto_data_add_maybe_interesting_field:
- it actually add field_info to interesting hash_tree
- accept only required parameters
- is called only by proto_tree_add_node

svn path=/trunk/; revision=50321
2013-07-02 19:23:10 +00:00
Jakub Zawadzki 1d2409dd69 Micro-optimize common case for proto_tree_add_pi() assume tree != NULL, pfi != NULL
Fix calles.

svn path=/trunk/; revision=50320
2013-07-02 18:56:48 +00:00
Jakub Zawadzki cce4ad3c66 tree == NULL check is already done by TRY_TO_FAKE_THIS_ITEM() macro.
svn path=/trunk/; revision=50319
2013-07-02 18:45:47 +00:00
Jakub Zawadzki 874f119225 Remove not needed TRY_TO_FAKE_THIS_ITEM() from proto_tree_*_format & proto_tree_*_format_value
Right now for proto_tree_add format & _format_value TRY_TO_FAKE_THIS_ITEM() is called twice
one from 'format' function, second time from 'no format' function.

This reduces size of .text by 10K:
   text    data     bss     dec     hex filename
  76012     112      56   76180   12994 proto-after.o
  86324     112      56   86492   151dc proto-before.o


svn path=/trunk/; revision=50318
2013-07-02 18:36:00 +00:00
Jakub Zawadzki d27f026884 cleanup, put result of decode_bitfield_value directly to fi->rep->representation
svn path=/trunk/; revision=50316
2013-07-02 17:09:38 +00:00
Michael Mann 090ddb6afc Remove dependency on proto_malformed as it should be encapsulated in expert info API (through show exception API)
svn path=/trunk/; revision=50315
2013-07-02 16:51:03 +00:00
Jakub Zawadzki 2ab52de572 Add TRY_TO_FAKE_THIS_REPR into proto_tree_set_representation_value() call.
Remove TRY_TO_FAKE_THIS_REPR from calling functions.

svn path=/trunk/; revision=50314
2013-07-02 16:09:56 +00:00
Michael Mann ecc4e4789e Cache the malformed filter instead of looking it up each time a malformed packet comes in. This drastically speeds up the load time of captures with lots of malformed packets (ie fuzztesting).
svn path=/trunk/; revision=50313
2013-07-02 16:02:31 +00:00
Jeff Morriss 0643b22517 From Roland Knall via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8878 :
The final maintenance patch, after excessive testing of the dissection engine.
The last two bugs were:

- FindSafetyFrame did not recognize the correct CRC, which in itself did not
  lead to wrongly detected packages, but was inconsistent with the rest.

- CRC == 0 - because 0 is a valid result for the CRC value.

svn path=/trunk/; revision=50312
2013-07-02 14:15:40 +00:00
Jakub Zawadzki d0c5a5561d snprintf -> strlcpy.
svn path=/trunk/; revision=50311
2013-07-02 14:14:52 +00:00
Michael Mann 14d105ee4c Make expert items filterable and a little cleanup.
Remove NULL tree check at start of dissection to ensure expert info is populated.

Overall I think the logic could be a little cleaner (length checking and its tie to expert info seems excessive), but I'm not familiar enough to be comfortable making the changes.

This dissector appears to be vulnerable to DOS attacks through its unsigned 16-bit length fields (just from static inspection).  Having the length be a signed 32-bit value even if the length in the protocol field is an unsigned 16-bit value could simplify some of the logic.

svn path=/trunk/; revision=50310
2013-07-01 23:59:05 +00:00
Evan Huus a0d874ae0a From Fabio Tarabelloni via
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8718

Misc. minor improvements to zigbee zcl.

svn path=/trunk/; revision=50309
2013-07-01 23:21:44 +00:00
Evan Huus be688c88f2 From Javier Godoy via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8832
Support for OSD-2/3 in the SCSI dissector.

svn path=/trunk/; revision=50308
2013-07-01 23:17:06 +00:00
Bill Meier 02a6c2b462 Do whitespace cleanup;
Reformat hf[] entries.

svn path=/trunk/; revision=50307
2013-07-01 20:54:15 +00:00
Evan Huus 8dfe279520 Remove unused parameters.
svn path=/trunk/; revision=50304
2013-07-01 19:55:39 +00:00
Michael Mann 71e6d4be77 Made an attempt at making all TCP expert info filterable. Many of the expert info "items" are shared with a FT_NONE (hf_ display) filter, so I replaced the FT_NONE filter used with proto_tree_add_none_format() and just went with an expert info "item" with the same display filter name. The text between the "text" item and the "expert info" item varied, so I'd tried to best merge the two.
"tcp.analysis.duplicate_ack" has both an hf_ and ei_ "item" so that the duplicate ack # and frame # can be assembled properly in the tree.  Since hf_tcp_analysis_duplicate_ack is of type FT_NONE, the duplicative display filter name is okay.

svn path=/trunk/; revision=50302
2013-07-01 16:32:52 +00:00
Bill Meier 828d4e89f6 Define certain 'const char *...' arrays as static.
(That is: Don't create the array on the stack each time
  the function is called).

 Reduces code memory usage and execution time.
 (See SVN #50271)


svn path=/trunk/; revision=50300
2013-07-01 15:41:05 +00:00
Jakub Zawadzki 7b5a0e4a15 Cleanup fill_label_[u]int64 to fill_label_number64
svn path=/trunk/; revision=50299
2013-07-01 15:24:42 +00:00
Chris Maynard 17772df943 Fix Coverity CID 1040373 (Dereference before null check). Minor whitespace changes come along for the ride on this one.
svn path=/trunk/; revision=50297
2013-07-01 15:09:56 +00:00
Jeff Morriss ee52f06db9 From Roland Knall via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8877 :
In my last patch (bug #8847), I overlooked a place where I had to check for
the old CRC as well, which led to packages that were not detected anymore.

This 4 lines fix it. As usual, the patch was tested and works.

svn path=/trunk/; revision=50294
2013-07-01 14:20:17 +00:00
Jeff Morriss 97b4bbcab7 Revert r50287: the P1 dissector isn't clean yet ('dissect_p1_T_report_type' defined but not used)
svn path=/trunk/; revision=50293
2013-07-01 14:09:26 +00:00
Bill Meier 8d5bbb4146 Define certain 'const char *...' arrays as static.
Reduces code memory usage and execution time.
(See SVN #50271)


svn path=/trunk/; revision=50292
2013-07-01 13:03:23 +00:00
Michael Mann 59e46d816b Fix typo in retrieving h263 dissector. Bug 7893 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7893)
From Michal Labedzki

svn path=/trunk/; revision=50291
2013-07-01 11:55:48 +00:00
Jakub Zawadzki 7dc10daffe Rewrite hfinfo_numeric_value_format as a special case for _hfinfo_number_value_format
cleanup some functions.

svn path=/trunk/; revision=50290
2013-07-01 09:46:50 +00:00