Commit Graph

56 Commits

Author SHA1 Message Date
Bill Meier a4b4c92a45 Add _U_ to a function parameter to fix a compiler warning
svn path=/trunk/; revision=53105
2013-11-06 16:00:11 +00:00
Michael Mann 22760b2d2a Remove pinfo->private_data from DCERPC dissectors and instead have dcerpc_info* infomation be passed in as a function parameter. Bug 9387 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9387)
All "generated" source was manually modified (with the power of search/replace), but I believe the "source input" files have been adjusted (checked into revs 53098 and 53099) to reflect the necessary changes (with possible whitespace formatting differences).

The Microsoft compiler doesn't flag "unused function parameters", so I apologize in advance if I may have missed a few.  The "dcerpc_info* di" parameter is used in almost every function.

svn path=/trunk/; revision=53100
2013-11-06 14:31:29 +00:00
Evan Huus c6371f0f6d Add cast.
svn path=/trunk/; revision=52312
2013-10-01 13:09:51 +00:00
Michael Mann 55371ca87d Remove check_col for all non-generated DCE/RPC dissectors.
svn path=/trunk/; revision=52310
2013-10-01 13:02:12 +00:00
Pascal Quantin 102c452bcb More emem -> wmem conversion:
- tvb_get_g_stringz()/tvb_get_ephemeral_stringz()/tvb_get_seasonal_stringz() -> tvb_get_stringz()
- tvb_get_g_stringz_enc()/tvb_get_ephemeral_stringz_enc() -> tvb_get_stringz_enc()
- tvb_get_ephemeral_unicode_stringz() -> tvb_get_unicode_stringz()
- tvb_bcd_dig_to_ep_str() -> tvb_bcd_dig_to_wmem_packet_str()
- update docs accordingly

svn path=/trunk/; revision=52180
2013-09-22 20:04:35 +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
Evan Huus 6df83e8078 Add _g_ to the names of functions that allocate glib memory. This is a bit more
explicit, and frees up the "generic" names (like tvb_memdup) for new signatures
that take the appropriate wmem pool.

Majority of the conversion done with sed.

svn path=/trunk/; revision=52164
2013-09-21 17:04:41 +00:00
Pascal Quantin 074349264e Convert some dissectors to wmem (leaving uat-like memory with emem for now)
svn path=/trunk/; revision=52031
2013-09-14 10:53:29 +00:00
Alexis La Goutte 727f37e804 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=49810
2013-06-06 16:24:33 +00:00
Pascal Quantin 0a17799d61 From Ed Beroset via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 :
Remove C++ incompatibilities from most of the dcerpc code

svn path=/trunk/; revision=48023
2013-03-02 22:54:39 +00:00
Chris Maynard 97cc60f8fa Fix Coverity CID 280366: Dead default in switch.
svn path=/trunk/; revision=47930
2013-02-28 02:37:14 +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
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 9b03c418cc Fix bugs: #7532, 7534 dissect_ndr_cvstring returns ep-memory, don't free it.
(Likely to occur cause r44053)

svn path=/trunk/; revision=44063
2012-07-27 08:39:05 +00:00
Pascal Quantin 7deecbf36b Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7479 :
Provide an empty string when data pointer is not NULL (regression introduced in r43703)

svn path=/trunk/; revision=43724
2012-07-15 15:26:57 +00:00
Chris Maynard 472db7609c tvb_length_remaining() can return -1, so be sure to deal with it if it does.
svn path=/trunk/; revision=43703
2012-07-13 21:43:46 +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
Jeff Morriss db64559972 From Martin Kaiser (on -dev): initialize an uninitialized variable. From me: also clean up some indentation.
svn path=/trunk/; revision=41912
2012-04-03 21:38:59 +00:00
Graham Bloice 1894786916 Implement spoolss function GetPrinterDriverDirectory (opnum 12).
Also renamed "Architecture" field to "Environment" as per MS docs.

Fix bug #2279

svn path=/trunk/; revision=41911
2012-04-03 20:05:36 +00:00
Bill Meier ef7f568963 Fix encoding arg for call to tvb_get_unicode_string().
svn path=/trunk/; revision=39565
2011-10-25 15:53:29 +00:00
Guy Harris c34b796445 Add a DREP_LITTLE_ENDIAN for the DCE RPC endianness bit in the data
representation.  Use it rather than a raw 0x10.

Add a DREP_ENC_INTEGER() macro that takes a pointer to the data
representation and returns either ENC_LITTLE_ENDIAN or ENC_BIG_ENDIAN;
use it for the encoding argument to proto_tree_add_item(), rather than
just the AND of drep[0] and DREP_LITTLE_ENDIAN, as it's not a boolean
any more, and for string values we'll be supporting character encodings
as well and thus won't be able to trust that the 0x10 bit will mean
"little endian".

Use ENC_NA for some other encoding values, i.e. for FT_BYTES and the
like.

Fix a couple of places in the DCOM dissector where we were passing the
byte-order bit rather than the field value to
proto_tree_add_uint_format().

Clean up white space.

svn path=/trunk/; revision=38128
2011-07-19 23:02:02 +00:00
Bill Meier b3c8baf2d5 Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings
svn path=/trunk/; revision=37999
2011-07-13 18:42:40 +00:00
Chris Maynard f6a11de61f Delete unused header field entries found by running checkhf.pl.
svn path=/trunk/; revision=37353
2011-05-23 00:32:40 +00:00
Chris Maynard 609c3dd0d4 From Micheal Mann via bug 2794: Fix some display filter field names.
svn path=/trunk/; revision=37351
2011-05-23 00:00:53 +00:00
Stephen Fisher fd1e26d285 Remove the remaining tvb_fake_unicode() calls in the dissector source.
svn path=/trunk/; revision=35692
2011-01-28 20:15:41 +00:00
Bill Meier e65f69766a User value_string_ext fcns to access several value_string arrays;
Minor reformatting and whitespace cleanup.

svn path=/trunk/; revision=34927
2010-11-17 14:59:08 +00:00
Bill Meier 54ed1b0bc7 Define a few global variables as static.
svn path=/trunk/; revision=34411
2010-10-07 21:16:52 +00:00
Jeff Morriss 0ff5638f37 Replace blurbs that match the name (case insensitive) with NULL.
svn path=/trunk/; revision=34227
2010-09-23 21:46:31 +00:00
Bill Meier 10ffd14b8f Indentation & whitespace cleanup (including: "4 space tabs" ==> spaces)
svn path=/trunk/; revision=32735
2010-05-10 15:54:57 +00:00
Guy Harris 8e236e55de For fields of type FT_ABSOLUTE_TIME, have the "display" value be one of
ABSOLUTE_TIME_LOCAL or ABSOLUTE_TIME_UTC, indicating whether to display
the date/time in local time or UTC. (int)ABSOLUTE_TIME_LOCAL ==
(int)BASE_NONE, so there's no source or binary compatiblity issue,
although we might want to eliminate BASE_NONE at some point and have the
BASE_ values used with integral types start at 0, so that you can't
specify BASE_NONE for an integral field.

svn path=/trunk/; revision=31319
2009-12-19 03:17:44 +00:00
Kovarththanan Rajaratnam 00810ff199 * Prefer col_append_str instead of col_append_fstr for constant strings
* Remove check_col guards

svn path=/trunk/; revision=30127
2009-09-24 20:21:23 +00:00
Bill Meier 90e865cc54 Init ett_... variables to -1
svn path=/trunk/; revision=29294
2009-08-04 18:48:45 +00:00
Stig Bjørlykke 4d8dd01e8e Changed flags_set_truth -> tfs_set_notset
svn path=/trunk/; revision=28989
2009-07-07 14:54:15 +00:00
Stig Bjørlykke b228488bc0 From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
    for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
    FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero

svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
Anders Broman c91a384702 Apply some of the patches from:
http://wiki.wireshark.org/Development/Optimization

svn path=/trunk/; revision=28356
2009-05-13 19:46:11 +00:00
Anders Broman caf80bbb74 More size_t casts.
svn path=/trunk/; revision=27888
2009-03-29 21:20:15 +00:00
Stig Bjørlykke d0e33bc3c5 Fix some "format not a string literal and no format arguments" warnings.
svn path=/trunk/; revision=26646
2008-10-31 14:07:23 +00:00
Bill Meier 931cc922a1 Fix some of the Errors/warnings detected by checkapi.
svn path=/trunk/; revision=25305
2008-05-15 01:44:53 +00:00
Stig Bjørlykke 86e9711d4d Added missing array for hf_printer_priority, hf_printer_default_priority,
hf_printer_averageppm and hf_printer_jobs.

svn path=/trunk/; revision=24527
2008-03-02 19:47:04 +00:00
Stig Bjørlykke 86f278dda7 Use the offset and length for the interesting data.
svn path=/trunk/; revision=23607
2007-11-26 18:51:24 +00:00
Stig Bjørlykke a26ea5739a Use correct offset for subtree in dissect_spoolss_relstr.
svn path=/trunk/; revision=23602
2007-11-26 17:03:12 +00:00
Stig Bjørlykke e5461f3307 From Kai Blin:
Dissect the PRINTER_INFO structure in the SpoolssEnumPrinters call.

From me:
Add the level info to COL_INFO.

svn path=/trunk/; revision=23600
2007-11-26 16:38:26 +00:00
Anders Broman 1950ffc214 Apply the small performance enhancment patches for:
- if offset is 0, tvb_length is the same as tvb_length_remaining, just faster.
Replace 
- col_append_fstr() with faster  col_append_str() 
- col_add_str() with col_set_str()
when it's safe

svn path=/trunk/; revision=23252
2007-10-23 05:50:00 +00:00
Ronnie Sahlberg 8fde3b7561 rename dcerpc_smb_store_pol_name to dcerpc_store_polhnd_name
rename dcerpc_smb_fetch_pol  to dcerpc_fetch_polhnd_data and also make 
it take an additional parameter to return the "type" of the policy 
handle, if such a type was stored.

extend the pol_value structure used to track policy handles to also 
store a type to represent what created the policy handle
types could be USER/ALIAS/CONNECT/... etc handles returned from the 
SAMR interface

add a new helper function  dcerpc_store_polhnd_type()

track policy handles between request/responses for dcerpc

update the samr.cnf file to make the samr dissectors for
SetSecurity/QuerySecurity dissect the specific bits for the security 
descriptor correctly based on whether the policy handle refers to a 
CONNECT/DOMAIN/USER/ALIAS or GROUP



svn path=/trunk/; revision=22703
2007-08-28 11:45:08 +00:00
Jaap Keuter 066ce1b938 Fix for bug 1505. Adding getprinterdriver levels 2, 6, and (partially) 101.
svn path=/trunk/; revision=21593
2007-04-26 06:00:48 +00:00
Guy Harris 1bc049906a Add some GCC warnings to the standard set, and add some others to the
--enable-extra-gcc-checks set.

If we turn on -pedantic, try turning on -Wno-long-long as well, so that
it's not *so* pedantic that it rejects the 64-bit integral data types
that we explicitly require.

Constify a bunch of stuff, and make some other changes, to get rid of
warnings.

Clean up some indentation.

svn path=/trunk/; revision=21526
2007-04-23 10:59:26 +00:00
Ronnie Sahlberg ac85c4717c remove any dependencies that dcv->private_data is persistent
svn path=/trunk/; revision=19241
2006-09-16 08:51:03 +00:00
Ronnie Sahlberg feab79e328 change a whole bunch of ethereal into wireshark
svn path=/trunk/; revision=18196
2006-05-21 04:49:01 +00:00
Guy Harris 2a8e47b11a Don't ensure all the bytes of a security descriptor exist before calling
"dissect_nt_sec_desc()".  Add a Boolean argument to
"dissect_nt_sec_desc()" to indicate whether a length was passed to it
(so we don't treat -1 as a special value; we want to stop treating -1 as
a special length value, and, in fact, want to stop treating *any*
negative length values specially, so that we don't have to worry about
passing arbitrary 32-bit values from packets as lengths), and have
"dissect_nt_sec_desc()" initially create the protocol tree item for the
security descriptor with a length of "go to the end of the tvbuff", and
set the length once we're done dissecting it - and, if the length was
specified, check at *that* point, *after* we've dissected the security
descriptor, whether we have the entire security descriptor in the
tvbuff.

That means that we don't have to worry about overflows after
"dissect_nt_sec_desc()" returns - if the length was so large that we
would have gotten an overflow, we'd have thrown an exception in the
"tvb_ensure_bytes_exist()" call at the end of "dissect_nt_sec_desc()".

Do sanity checks on offsets within the security descriptor, so we know
the item referred to by the offset is after the fixed-length portion of
the descriptor.

svn path=/trunk/; revision=16113
2005-10-04 10:23:40 +00:00
Tim Potter 7cc2d21bc7 A first go at importing some pidl generated code into ethereal. This
commit replaces the hand written dcerpc initshutdown and winreg 
interfaces with autogenerated ones.  

The pidl generated code is still a bit rought around the edges but will 
hopefully improve with time.

svn path=/trunk/; revision=15812
2005-09-15 07:34:52 +00:00