aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-afp.c
AgeCommit message (Collapse)AuthorFilesLines
2015-12-09new_register_dissector -> register_dissector for dissector directory.Michael Mann1-3/+3
Change-Id: Ie39ef054a4a942687bd079f3a4d8c2cc55d5f22c Reviewed-on: https://code.wireshark.org/review/12485 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-03Call reassembly_table_destroy and move g_hash_table_destroyPeter Wu1-6/+7
This patch moves g_hash_table_destroy calls from the init routine to the cleanup routine. Besides that, the conditional check for the hash table has been removed, assuming that init is always paired with a cleanup call. If reassembly_table_init is found, a reassembly_table_destroy call is prepended to the cleanup function as well. Comments have been removed from the init function as well as these did not seem to have additional value ("destroy hash table" is clear from the context). The changes were automatically generated using https://git.lekensteyn.nl/peter/wireshark-notes/diff/one-off/cleanup-rewrite.py?id=4d11f07180d9c115eb14bd860e9a47d82d3d1dcd Manually edited files (for assignment auditing): dvbci, ositp, sccp, tcp. Other files that needed special attention due to the use of register_postseq_cleanup_routine: - ipx: keep call, do not add another cleanup routine. - ncp: remove empty mncp_postseq_cleanup. mncp_hash_lookup is used even if a frame is visited before (see dissect_ncp_common), hence the hash table cannot be destroyed here. Do it in cleanup instead. - ndps: add cleanup routine to kill reassembly table, but do not destroy the hash table as it is already done in ndps_postseq_cleanup. Change-Id: I95a72b3df2978b2c13fefff6bd6821442193d0ed Reviewed-on: https://code.wireshark.org/review/9223 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-25afp: replace all calls to THROW() and do proper error handlingMartin Kaiser1-50/+46
Change-Id: Ie471a67a978aeb54727d03f93b98e3e422441a58 Reviewed-on: https://code.wireshark.org/review/9119 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-06-23[afp] improve the error handling for extended attributesMartin Kaiser1-17/+20
distinguish between the length field in the packet and the current item's length make sure that the length field fits into a gint variable add a cast to the return value of tvb_strsize() don't throw an exception manually Change-Id: I2debab778be3e34d68b1be31963d2d9260a30e0e Reviewed-on: https://code.wireshark.org/review/9056 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-06-21Further refactor SRT stats.Michael Mann1-0/+42
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK. SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic. CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone. Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc Reviewed-on: https://code.wireshark.org/review/8894 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Gerald Combs <gerald@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-04-30Fix some cases where we're shifting a signed 1 left.Guy Harris1-111/+111
Shift 1U instead, to make sure it's unsigned; the result of, for example, the result of shifting a signed value left is undefined if the value times 2^{shift count} doesn't fit in the *signed* type of the shifted value. That means, in particular, that the result of shifting 1 left by {number of bits in an int - 1} is undefined. (In *practice*, it'll probably be -2^32, with the bit you want set, but that's not guaranteed, and GCC 5.1 seems not to like it.) Change-Id: I0d27565c382a04ceda9eec65f45a430ceb74cf53 Reviewed-on: https://code.wireshark.org/review/8255 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-04-01AFP: Fix Dead Store (Dead assignement/Dead increment) warning found by ClangAlexis La Goutte1-8/+1
Change-Id: Ib1c2bb355c7757b1aca4b59953ca6ab94aa30593 Reviewed-on: https://code.wireshark.org/review/7873 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-04-01afp: 64-bit values require 64-bit value stringsEvan Huus1-2/+2
Bug: 11099 Change-Id: Id3b465f1835552d25b9877242d4c69a3c03281a6 Reviewed-on: https://code.wireshark.org/review/7871 Petri-Dish: Evan Huus <eapache@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com>
2015-03-30Remove proto_tree_add_text from packet-afp.cMichael Mann1-515/+454
Also do a bunch of proto_tree_add_bitmask conversions and other small cleanup. Change-Id: I0b42098e1db1457f80b839edbc260c0a72e177d6 Reviewed-on: https://code.wireshark.org/review/7853 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-12-22First batch of unincludes. Last attempt...Martin Mathieson1-1/+0
Change-Id: I3681462aeb98ca62ed3ec5eb226b2553317391a9 Reviewed-on: https://code.wireshark.org/review/5997 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-2/+0
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-09-18Fix encoding-arg mostly for FT_UINT_STRING; Also: Do misc as needed.Bill Meier1-9/+22
Misc: (as needed) - Add editor modelines; - Adjust whitespace. Change-Id: I0e5d877a2a6273842ad8e771ac0c0acbfcb83200 Reviewed-on: https://code.wireshark.org/review/4173 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-10Replace deprecated tvb_length callsEvan Huus1-4/+4
And a few other misc. cleanups while in the neighbourhood. Change-Id: Ic0d6836dec9c36d31ea244a6adc74d4713565090 Reviewed-on: https://code.wireshark.org/review/4047 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-22convert to proto_tree_add_subtree[_format]Michael Mann1-109/+85
Change-Id: Ib60ca75b7da8cfa21cfe2999c9b9448a02c332df Reviewed-on: https://code.wireshark.org/review/2560 Tested-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-4/+4
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html This reverts commit 246fe2ca4c67d8c98caa84e2f57694f6322e2f96. Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f Reviewed-on: https://code.wireshark.org/review/2430 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-18Fixup: tvb_* -> tvb_capturedDario Lombardo1-4/+4
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-07tvb_new_subset -> tvb_new_subset_length when length parameters are equal.Michael Mann1-1/+1
tvb_new_subset -> tvb_new_subset_remaining it appears that's what the intention is. Change-Id: I2334bbf3f10475b3c22391392fc8b6864454de2d Reviewed-on: https://code.wireshark.org/review/1999 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-04-06Move the status dissecting code to the AFP dissector.Guy Harris1-4/+502
The ASP and DSI dissectors had almost-identical dissection of the ASP and DSI "status" responses. What's being dissected is defined by the AFP specification (and might be different for protocols *other* than AFP running atop AFP or DSI), so move that dissection to the AFP dissector. Note that, at least for AFP-over-DSI, the spec isn't being followed in at least one capture. Change-Id: Idb1013483f3a3bdf2b7eb0618e48fc178a338642 Reviewed-on: https://code.wireshark.org/review/987 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-04-04Expose dissect_spotlight as its own dissector. Needed for DCE/RPC MDSSVCMichael Mann1-16/+19
Change-Id: I5c9dbd59b18eff5dc9cb9476f1883cb9fa9d9c02 Reviewed-on: https://code.wireshark.org/review/958 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-04-04Clean up some strings - "UTF8" to "UTF-8", etc..Guy Harris1-1/+1
Clean up the display of addresses a bit, and the use of verbs in some field descriptions. Change-Id: I3d2d4fc4cd13503924abecee55adfaa899385ffb Reviewed-on: https://code.wireshark.org/review/954 Reviewed-by: Guy Harris <guy@alum.mit.edu>
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>
2014-01-22Use tvb_get_string_enc() rather than tvb_get_string().Guy Harris1-10/+11
XXX - if we supported various MacXXX character encodings, we could use those; that might require a preference to specify the encoding. svn path=/trunk/; revision=54906
2013-12-22Don't use 'L' as a constant modifier.Bill Meier1-1/+1
svn path=/trunk/; revision=54358
2013-12-20Change G_GINT64_CONSTANT(xxxxU) to G_GUINT64_CONSTANT(xxxx)Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=54314
2013-12-13Rename spotlight_get_utf16_string_encoding() toGuy Harris1-19/+27
spotlight_get_utf16_string_byte_order(), and have it return ENC_BIG_ENDIAN or ENC_LITTLE_ENDIAN if it finds a BOM and 0xFFFFFFFF if it doesn't, to make it a bit clearer what it's doing. Use tvb_get_string_enc() rather than tvb_get_unicode_string(). svn path=/trunk/; revision=54075
2013-12-02Reject the packet if data is NULL.Chris Maynard1-7/+9
svn path=/trunk/; revision=53707
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-10-21Pass struct aspinfo "private data" into subdissectors instead of using ↵Michael Mann1-9/+11
pinfo->private_data. svn path=/trunk/; revision=52728
2013-09-22More emem -> wmem conversion:Pascal Quantin1-2/+2
- 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-22emem -> wmem conversion:Pascal Quantin1-9/+9
- 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-12Convert a few more dissectors to wmem.Evan Huus1-3/+3
svn path=/trunk/; revision=51967
2013-09-09expert_add_info_format_text -> expert_add_info_formatMichael Mann1-4/+4
svn path=/trunk/; revision=51852
2013-07-05Batch of filterable expert infos.Michael Mann1-12/+28
svn path=/trunk/; revision=50384
2013-04-01Typo's. That is all.Jaap Keuter1-1/+1
svn path=/trunk/; revision=48685
2013-03-12- [-Wmissing-prototypes]Anders Broman1-0/+4
- explicit casts. svn path=/trunk/; revision=48265
2012-12-26Squelch a (Y2.038K) warning.Guy Harris1-1/+1
svn path=/trunk/; revision=46756
2012-12-21Make some loop counters unsigned, so that we handle very large loopGuy Harris1-23/+19
counts by trying to iterate all over the items (and, presumably, failing when we go past the end of the packet). When assigning to the loop count, cast the value down, to avoid implicit 64-bit-to-32-bit conversion warnings. Write those loops as for loops - it makes it a bit clearer what's going on. svn path=/trunk/; revision=46657
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-23Comment out all but first value_string array entries with dup values:Bill Meier1-2/+2
kept: first dup since that's the one which would be found with a linear search. svn path=/trunk/; revision=44642
2012-08-10Make the corresponding packet_info available to each tree item. ThisGerald Combs1-8/+8
lets us pass a NULL pinfo to expert_add_info_format() and expert_add_undecoded_item(), which makes it possible to use those routines deep in the bowels of many dissectors. As a proof of concept remove the recent pinfo additions to packet-afp.c. This should also make it easier to fix bug 3884. svn path=/trunk/; revision=44435
2012-08-09Use wording that's more in line with other expert messages.Gerald Combs1-1/+1
svn path=/trunk/; revision=44402
2012-08-07Fix a large loop found by Stefan Cornelius of Red Hat Security ResponseGerald Combs1-7/+13
Team (bug 7603). Display the ACL entry count as decimal instead of hexadecimal. svn path=/trunk/; revision=44317
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-06From Frank Lahm via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7334 :Pascal Quantin1-6/+34
FPSpotlightRPC dates structure can contain multiple dates svn path=/trunk/; revision=43133
2012-06-04Get rid of a couple of warnings.Anders Broman1-3/+3
svn path=/trunk/; revision=43066
2012-05-19Fix some "warning: Value stored to '...' is never read" clang scan-build ↵Bill Meier1-11/+11
warnings. Also; Do some whitespace cleanup in a few cases. svn path=/trunk/; revision=42715
2012-05-15Spaces -> tabspascal1-2/+2
svn path=/trunk/; revision=42637
2012-05-15Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7261 :pascal1-12/+25
Add some sanity checks when dissecting SQ_TYPE_NULL svn path=/trunk/; revision=42636
2012-05-15From Alexander Lüders & Frank Lahm via ↵pascal1-8/+96
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7254 : Enhancements for FPSpotlightRPC AFP function svn path=/trunk/; revision=42633
2012-05-14From Frank Lahm via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7256 :pascal1-4/+9
Fix subquery_count loop variable updating svn path=/trunk/; revision=42624