aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-windows-common.c
AgeCommit message (Collapse)AuthorFilesLines
2016-06-15proto_tree_add_boolean -> proto_tree_add_bitmask_list_valueMichael Mann1-109/+42
Change-Id: Ic644042d238b5f2abcd874bca92c6dea55804ba9 Reviewed-on: https://code.wireshark.org/review/15913 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-12Fix indentation.Guy Harris1-3/+3
Change-Id: Ia9ad8d4f20453c147a96febc90df653c2489ddb5 Reviewed-on: https://code.wireshark.org/review/13207 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-04-20Have a common routine to convert FILETIME to nstime_t.Guy Harris1-37/+1
We had several copies of that code; put it into a filetime_to_nstime() routine in wsutil, and call that common routine instead. Change-Id: I1eb5579c36c129ff8d23f9212285ab3f63be0f43 Reviewed-on: https://code.wireshark.org/review/8142 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-25Deleting unnecessary #includes from dissectors.Martin Mathieson1-2/+0
Fifth batch (packet-rtp.c -> end). Will look at cleaning up and committing script afterwards. Change-Id: I8ed61dc941d98d3f7259a9d1f74e214eb7b4bfa2 Reviewed-on: https://code.wireshark.org/review/6052 Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-3/+1
Specifically: - Set packet.h to be the first wireshark #include after config.h and "system" #includes. packet.h added as an #include in some cases when missing. - Remove some #includes included (directly/indirectly) in packet.h. E.g., glib.h. (Done only for those files including packet.h). - As needed, move "system" #includes to be after config.h and before wireshark #includes. - Rework various #include file specifications for consistency. - Misc. Change-Id: Ifaa1a14b50b69fbad38ea4838a49dfe595c54c95 Reviewed-on: https://code.wireshark.org/review/5923 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-11-25Eliminate proto_tree_add_text from some dissectors.Michael Mann1-136/+126
Change-Id: Iadd80aab291e5de714891a9f3c79edeca19e9b93 Reviewed-on: https://code.wireshark.org/review/5458 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com>
2014-10-12Add support for NTTIME_hyper and NTTIME_1secMatthieu Patou1-6/+15
It's hyper with 8 bytes alignment it can have 1/100000 sec resolution or 1sec resolution Bug: 10541 Change-Id: Iecc4c6d1bd1695a4c02db72e1617134254810cd9 Reviewed-on: https://code.wireshark.org/review/4606 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-06Adjust indentation to match editor modelines; Do other minor whitespace changes.Bill Meier1-926/+926
Change-Id: Ic020b2c92db5d14a2be9dc4d35aef4514b8b0353 Reviewed-on: https://code.wireshark.org/review/4502 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-16Fix spelling: cant-->can't, wont-->won't, etcBill Meier1-1/+1
Change-Id: I4497f1b8b6eab0e576d9dd31b732965f9a6679c6 Reviewed-on: https://code.wireshark.org/review/4124 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-07-06convert to proto_tree_add_subtree[_format]Michael Mann1-30/+19
Change-Id: I3efa2a81ab2685cde6eae0a00b24520478a545ce Reviewed-on: https://code.wireshark.org/review/2900 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-17Add dissect_nt_64bit_time_ex for retrieving the created proto_itemHannes Mezger1-5/+16
Using dissect_nt_64bit_time it is not possible to access the created proto_item afterwards, hence the new function. Change-Id: I39aca92536a53841045c30b601b6ec1a7d8bfb4e Reviewed-on: https://code.wireshark.org/review/2160 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-17Fix gcc "might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]" ↵Bill Meier1-2/+2
introduced by 19a3d046f2 [Apparently (at least) the Ubuntu buildbot gcc (presumably < 4.9) needs two vars to be marked volatile even though gcc.4.9 (Fedora) doesn't. Change-Id: Icf95511d08a31547196874aecb60d85cab975cfb Reviewed-on: https://code.wireshark.org/review/1179 Reviewed-by: Bill Meier <wmeier@newsguy.com> Tested-by: Bill Meier <wmeier@newsguy.com>
2014-04-17Fix "might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]" warning ↵Bill Meier1-68/+83
from gcc 4.9. Change-Id: I99f777b3058e1cef3e1a077ffde259f0d2f51c98 Also: rename some vars to catch any incorrect usage. Reviewed-on: https://code.wireshark.org/review/1178 Reviewed-by: Bill Meier <wmeier@newsguy.com> Tested-by: Bill Meier <wmeier@newsguy.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2013-12-20Change G_GINT64_CONSTANT(xxxxU) to G_GUINT64_CONSTANT(xxxx)Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=54314
2013-11-27- Create/use several extended value_stringsBill Meier1-177/+31
(sort associated value_string arrays as needed); - Use new VALUE_STRING_LIST mechanism/macros to create enums and value_string arrays for: WERR_errors, DOS_errors, SRV_errors, and HRD_errors; - Declare certain global value_string arrays as static (local) and use global extended value_strings to reference same; (e.g., ms_coiuntry_codes value_string_array) - Rename SMBE_... defs used in several different value_string arrays to prevent potential name collisions: ( e.g., for SRV_errors: SMBE_... ==> SMBE_SRV_...) Done for value_string arrays: DOS_errors, SRV_errors, HRD_errors; - WERR_errors value_string array: Note that WERR associated defs no longer exist in the latest samba doserr.h. (The WERR_errors defs were originally generated from the samba doserr.h). For now: WERR_errors kept as is. - ToDo: Fix PIDL-generated dcerpc dissectors to use NT_errors_ext and WERR_errors_ext extended value_strings. - Add editor modelines to a few files. - Make whitespace changes. svn path=/trunk/; revision=53614
2013-11-10Add missing includes in order to remove exceptions.h from proto.h (next commit).Jakub Zawadzki1-0/+1
svn path=/trunk/; revision=53230
2013-11-06Remove pinfo->private_data from DCERPC dissectors and instead have ↵Michael Mann1-3/+3
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-09-30Convert some proto_tree_add_string_format calls to something more appropriate.Michael Mann1-9/+9
There seem to be several cases of proto_tree_add_string_format where a "string" value/filter doesn't really make sense because it's always empty, and is just being used as a "filterable subtree header (placeholder)". They appear to be more for "presense" than "value" and should probably be FT_NONE, although I'd almost argue for removing the filter in favor of proto_tree_add_text. svn path=/trunk/; revision=52296
2013-09-15Convert proto_tree_add_uint_format to proto_tree_add_uint_format_value if ↵Michael Mann1-2/+2
hf_ field name is the first part of the formatted string. This was done with a perl script on the dissectors directory (packet-*.c), followed by manual inspection of the output. The manual inspection yielded a few cases that really should have been proto_tree_add_uint or proto_tree_add_item, so I updated them accordingly. The script didn't catch as many as I would have liked, but it's a start. The most common (ab)use of proto_tree_add_uint_format was for appending strings to CRC/checksum values to note good or bad CRC/checksum. svn path=/trunk/; revision=52045
2013-09-13Replace some emem with wmem.Evan Huus1-53/+53
The windows-common dissector seems to make excessive use of strbufs - I converted them and simplified a bit, but it could probably be simplified more. svn path=/trunk/; revision=52008
2013-02-27Move show_exception() and show_reported_bounds_error() toGuy Harris1-6/+24
epan/show_exception.c, as it's used outside epan/dissectors/packet-frame.c. Update their callers to include <epan/show_exception.h> to get their declaration. Add a CATCH_NONFATAL_ERRORS macro that catches all exceptions that, if there's more stuff in the packet to dissect after the dissector call that threw the exception, doesn't mean you shouldn't go ahead and dissect that stuff. Use it in all those cases, including ones where BoundsError was inappropriately being caught (you want those passed up to the top level, so that the packet is reported as having been cut short in the capture process). Add a CATCH_BOUNDS_ERRORS macro that catches all exceptions that correspond to running past the end of the data for a tvbuff; use it rather than explicitly catching those exceptions individually, and rather than just catching all exceptions (the only place that DissectorError should be caught, for example, is at the top level, so dissector bugs show up in the protocol tree). Don't catch and then immediately rethrow exceptions without doing anything else; just let the exceptions go up to the final catcher. Use show_exception() to report non-fatal errors, rather than doing it yourself. If a dissector is called from Lua, catch all non-fatal errors and use show_exception() to report them rather than catching only ReportedBoundsError and adding a proto_malformed item. Don't catch exceptions when constructing a trailer tvbuff in packet-ieee8023.c - just construct it after the payload has been dissected, and let whatever exceptions that throws be handled at the top level. Avoid some TRY/CATCH/ENDTRY cases by using checks such as tvb_bytes_exist() before even looking in the tvbuff. svn path=/trunk/; revision=47924
2013-02-01Fix some Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-11/+2
svn path=/trunk/; revision=47424
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45017
2012-08-16From Stefan Metzmacher: Updates for the SMB2/3Bill Meier1-0/+1
This patches add some missing things for SMB2/3 and support for decryption of SMB3 traffic https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7645 From me: Change an initializer from C99 to C89 style (since the Microsoft compiler doesn't support C99). svn path=/trunk/; revision=44542
2012-08-10Use val_to_str_const() where appropriate;Bill Meier1-1/+1
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-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-06-21Mark a couple more variables volatile.Jeff Morriss1-3/+3
svn path=/trunk/; revision=43437
2012-06-21From Richard Sharpe via ↵Jeff Morriss1-2/+3
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7387 : Don't break/return out of a TRY/CATCH. svn path=/trunk/; revision=43434
2012-06-19Mark another variable as volatile to pacify the buildbot.Jeff Morriss1-1/+1
svn path=/trunk/; revision=43376
2012-06-19Mark some variables as volatile to avoid compiler warnings.Jeff Morriss1-5/+6
svn path=/trunk/; revision=43357
2012-06-19Try to fix unused variable warnings and "clobbered by 'longjmp' or 'vfork' "Anders Broman1-5/+2
svn path=/trunk/; revision=43355
2012-06-19From Richard Sharpe:Anders Broman1-11/+43
Wireshark is unable to dissect Security Descriptors that span TCP segments where some are not captured or reassembled https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7363 svn path=/trunk/; revision=43352
2012-04-09Mark some function static.Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=41999
2011-10-23Fix a few proto_tree_add_item() encoding args.Bill Meier1-1/+1
svn path=/trunk/; revision=39519
2011-10-10 Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-2/+2
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_BOOLEAN FT_IPv4 FT_EUI64 FT_GUID FT_UINT_STRING Also: For type FT_ITv6 use ENC_NA. (This was missed in SVN #39260) svn path=/trunk/; revision=39328
2011-10-06Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-3/+3
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-06-17From Gregor Beck via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6004Alexis La Goutte1-0/+31
dissect_nt_v2_ace: doesn't support ace type > 8 svn path=/trunk/; revision=37692
2011-05-18Fix some (value) mistakes in value_strings. Found by Martin's patch on the ↵Jeff Morriss1-44/+44
-dev list. svn path=/trunk/; revision=37262
2011-05-13Delete assignment of item as it's not used. Fixes Coverity CID 869.Chris Maynard1-3/+2
svn path=/trunk/; revision=37131
2011-04-18Removed some unneeded assignments.Stig Bjørlykke1-1/+1
Found by clang. svn path=/trunk/; revision=36698
2011-01-25packet-windows-common.c:1492: warning: 'wkwn_sid2_len' may be used ↵Anders Broman1-1/+1
uninitialized in this function svn path=/trunk/; revision=35648
2011-01-25Fix:Anders Broman1-2/+2
Error: the blurb for field "Well-known SID" ("nt.sid.wkwn") matches the field name in packet-windows-common.c svn path=/trunk/; revision=35647
2011-01-25From Cal Turney:Anders Broman1-103/+211
Enhancements to SID dissection. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5613 svn path=/trunk/; revision=35643
2010-12-06From Yaniv Kaul via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5372 :Jeff Morriss1-4/+4
Fix crash in LDAP dissector, in a generic way (for all callers of dissect_nt_sid()). svn path=/trunk/; revision=35127
2010-10-25Remove trailing space in field name.Jeff Morriss1-55/+55
svn path=/trunk/; revision=34639
2010-10-22Corrected check for end of well_known_sids.Stig Bjørlykke1-1/+1
This fixes bug 5328. svn path=/trunk/; revision=34619
2010-10-22Fixed printing guint64 variables.Stig Bjørlykke1-6/+5
Removed unused variables. svn path=/trunk/; revision=34617
2010-10-22C++ style comments in packet-windows-common.cAnders Broman1-2/+2
svn path=/trunk/; revision=34616
2010-10-22From CaL Turney:Anders Broman1-123/+288
Add support for well-known SIDs/RIDs and option to display in hex. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5286 svn path=/trunk/; revision=34613