aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-afs.c
AgeCommit message (Collapse)AuthorFilesLines
2016-06-26conversation: rename shadow variableDario Lombardo1-1/+1
Change-Id: I8f738b2e01d7f448b21cdc1b488b16b7dd581911 Reviewed-on: https://code.wireshark.org/review/16104 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-06afs: eliminate "malformed packet" false alarmsMark Vitale1-1/+2
Many AFS packets have empty payloads, and Wireshark marks these as "Malformed Packet" even though they are normal. Eliminate these false alarms by using tvb_reported_length_remaining when adding items to the tree. Change-Id: I4f134fef36b8bb7f99224f02fea9cf29117fb36a Reviewed-on: https://code.wireshark.org/review/15754 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>
2016-03-28Fix some warnings/errors of typeJoerg Mayer1-1/+1
git/epan/dissectors/packet-a21.c:478:25: error: 'item' was marked unused but was used [-Werror,-Wused-but-marked-unused] proto_item_append_text(item, "%s", val_to_str_const(event_id, a21_event_vals, "Unknown")); ^ Added manual change id because file-jpeg.c forced the use of commit -n Change-Id: Iffff53d6253758c8454d9583f0a11f317c8390cb Fix warnings/errors of type: git/epan/dissectors/packet-ax25-kiss.c:205:52: error: 'pseudo_header' was marked unused but was used [-Werror,-Wused-but-marked-unused] return capture_ax25( pd, l_offset, len, cpinfo, pseudo_header ); Fix checkhf warnings: Unused entry: epan/dissectors/packet-artnet.c, hf_artnet_address_netswitch Unused entry: epan/dissectors/packet-artnet.c, hf_artnet_address_subswitch Unused entry: epan/dissectors/packet-artnet.c, hf_artnet_poll_reply_trailer Unused entry: epan/dissectors/packet-artnet.c, hf_artnet_rdm_universe Unused entry: epan/dissectors/packet-artnet.c, hf_artnet_tod_data_universe Change-Id: Id1fa12afb97a8e9cd4ed0ea25351c3b2639c930e Reviewed-on: https://code.wireshark.org/review/14667 Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2016-01-24Add the packet number to the packet_info structure, and use it.Guy Harris1-2/+2
That removes most of the uses of the frame number field in the frame_data structure. Change-Id: Ie22e4533e87f8360d7c0a61ca6ffb796cc233f22 Reviewed-on: https://code.wireshark.org/review/13509 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-23Add more fields to packet_info structure and use them.Guy Harris1-2/+2
Add fields for the absolute time stamp (and another field for a presence flag for the absolute time stamp) and the packet encapsulation for the packet. This lets us remove the field for the packet encapsulation in the frame_data structure; do so. Change-Id: Ifb910a9a192414e2a53086f3f7b97f39ed36aa39 Reviewed-on: https://code.wireshark.org/review/13499 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-09new_register_dissector -> register_dissector for dissector directory.Michael Mann1-1/+1
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-10-01Treat IPv4 subnet masks as distinct from addressesJeffrey Smith1-1/+1
While IPv4 subnet masks are obviously related and similar to IPv4 addresses, they are distinct enough that they need to be treated seperately in some aspects. For instance, there is no value in attempting to resolve a subnet mask. This change creates a new display type: BASE_NETMASK, which allows distinction from FT_IPv4 (and possible name resolution) where appropriate. Change-Id: I99e19c9a58eb613f8e58d481af84c30e2e5e14d7 Reviewed-on: https://code.wireshark.org/review/10438 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-03Call reassembly_table_destroy and move g_hash_table_destroyPeter Wu1-6/+8
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-01AFS: Fix Mac OS X buildbot (-Wshadow)Alexis La Goutte1-3/+3
Rename index -> idx Change-Id: I22b23535e3d24866bdbe63be8f242a3c3ebcc6ba Reviewed-on: https://code.wireshark.org/review/8726 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-06-01Convert AFS dissector to use ptvcursor API.Michael Mann1-1236/+1058
The dissector was written in all macros, presumably to get just a single lines to display a field. The ptvcursor API is good for that, and using it over macros more than halves the object size. Real code (vs macros) is also much easier to use in a debugger. It also makes it easier for the check* scripts to find possible errors. Also eliminate proto_tree_add_text. Change-Id: Id07e015b5a2d1a98a4b36e40a426442d826d9a09 Reviewed-on: https://code.wireshark.org/review/8723 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: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-12-22First batch of unincludes. Last attempt...Martin Mathieson1-3/+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-3/+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-12-07AFS: Missing break in switch (CID 280434 & 280435)Alexis La Goutte1-0/+2
Change-Id: Ia0a39f7e4670d74325ddc40b34cd56ca018c0bde Reviewed-on: https://code.wireshark.org/review/5655 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-11-29Use proto_tree_add_bitmask for groups of proto_tree_add_boolean.Michael Mann1-43/+30
Part 1 of many Change-Id: I77a5789ac23388e6a5f8098dc398592f39638124 Reviewed-on: https://code.wireshark.org/review/5532 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-39/+39
Change-Id: Ic020b2c92db5d14a2be9dc4d35aef4514b8b0353 Reviewed-on: https://code.wireshark.org/review/4502 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-27Eliminate proto_tree_add_text from some dissectors.Michael Mann1-43/+31
Some other related cleanup. Change-Id: I45f54032aa8318858f4ee784945b6f2ed163b6ea Reviewed-on: https://code.wireshark.org/review/4328 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-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-09-10Replace deprecated tvb_length callsEvan Huus1-6/+6
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-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-6/+6
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-6/+6
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.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-02Reject the packet if data is NULL.Chris Maynard1-0/+3
svn path=/trunk/; revision=53709
2013-10-22Pass struct rxinfo "private data" into AFS dissector instead of using ↵Michael Mann1-5/+7
pinfo->private_data. svn path=/trunk/; revision=52751
2013-09-19From Mark Vitale via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9141Evan Huus1-4/+83
Decode AFS RXAFSCB_GetCapabilities RPC requests with their replies. svn path=/trunk/; revision=52143
2013-09-16From Mark Vitale via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9142Evan Huus1-1/+1
Fix decoding of AFS Volume Name. svn path=/trunk/; revision=52114
2013-09-16From Mark Vitale via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9140Evan Huus1-26/+135
Add reassembly support for AFS. From me: minor tweaks to conform to other reassemblable protocols; indentation fixes; modelines svn path=/trunk/; revision=52113
2013-09-12Convert a few more dissectors to wmem.Evan Huus1-6/+6
svn path=/trunk/; revision=51967
2013-03-12use correct data type in the castMartin Kaiser1-1/+1
this fixes packet-afs.c: In function 'dissect_afs': packet-afs.c:1539:35: error: expected expression before ')' token svn path=/trunk/; revision=48266
2013-03-12- [-Wmissing-prototypes]Anders Broman1-1/+4
- explicit casts. svn path=/trunk/; revision=48265
2013-01-31Comment out unused hf[] entries & etc.Bill Meier1-3/+9
(found by checkhf) svn path=/trunk/; revision=47389
2012-12-06Revert previous change - maybe we shouldn't enable -Wshadow with cruftyGuy Harris1-1/+1
old GCCs that complain about that. svn path=/trunk/; revision=46432
2012-12-06Squelch some -Wshadow warnings (inappropriate warnings - they're justGuy Harris1-1/+1
names in a prototype declaration - but maybe that's what you get with older compilers). svn path=/trunk/; revision=46431
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-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-06-04Get rid of a couple of warnings.Anders Broman1-2/+2
svn path=/trunk/; revision=43066
2012-05-19Fix some "warning: Value stored to '...' is never read" clang scan-build ↵Bill Meier1-3/+3
warnings. Also; Do some whitespace cleanup in a few cases. svn path=/trunk/; revision=42715
2012-05-16all:Bill Meier1-8/+121
Merge .h files into .c files since .h files unused elsewhere; Do whitespace, indentation & formatting cleanup. packet-acn.c: Fix 2 minor bugs wherein subtree not displayed in packet-details because tree variable used in proto_tree_add_text() always NULL. svn path=/trunk/; revision=42647
2012-04-27As suggested in ↵Jeff Morriss1-1/+1
http://www.wireshark.org/lists/wireshark-dev/201204/msg00062.html : Don't use ENC_BIG_ENDIAN or ENC_LITTLE_ENDIAN with ENC_ASCII: ASCII has no endianism, so ENC_NA is more appropriate. svn path=/trunk/; revision=42297
2011-09-22Use ENC_ values in proto_tree_add_item() calls.Guy Harris1-5/+5
In the AgentX dissector, make the "flags" arguments guint8, to match what's passed in. In the AIM dissector, use val_to_str() in col_add_str() calls - it gives the same result if there's a match, and puts a note in the Info column if there isn't, and is less complicated. In the AJP13 dissector: update the URL for the protocol documentation; add #defines for message types, and use them; for "enumerated data type" fields, make the fields numerical rather than strings and give them the value_string tables; get rid of col_check() calls; make a Boolean item an FT_BOOLEAN. svn path=/trunk/; revision=39085
2011-02-17Fix various Visual C++ analysis warnings.Gerald Combs1-1/+1
svn path=/trunk/; revision=35985
2010-11-04Use value_string_ext fcns to access certain value_string arrays;Bill Meier1-117/+124
Sort certain value_string arrays to be in ascending numeric order; Do minor whitespace cleanup and reformatting of long lines. svn path=/trunk/; revision=34780
2010-09-23Replace blurbs that match the name (case insensitive) with NULL.Jeff Morriss1-1/+1
svn path=/trunk/; revision=34227
2010-05-13As suggested in ↵Jeff Morriss1-7/+1
http://www.wireshark.org/lists/wireshark-dev/200809/msg00075.html (as referenced in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2907 ) and https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3411 : Write a new convenience routine for finding a conversation and, if it is not found, create it. The frame number and addresses are taken from pinfo (as is the common case). Use this function in a bunch of dissectors. svn path=/trunk/; revision=32790
2010-05-10Indentation & whitespace cleanup (including: "4 space tabs" ==> spaces)Bill Meier1-9/+9
svn path=/trunk/; revision=32735
2010-03-03remove check_colAnders Broman1-6/+3
svn path=/trunk/; revision=32089
2009-12-19For fields of type FT_ABSOLUTE_TIME, have the "display" value be one ofGuy Harris1-21/+21
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-10-25From Jakub Zawadzki:Anders Broman1-6/+3
Cleanup dissector code - use proper memory functions. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4164 svn path=/trunk/; revision=30691
2009-08-09Don't guard col_clear with col_checkKovarththanan Rajaratnam1-3/+1
svn path=/trunk/; revision=29346
2009-08-09Don't guard col_set_str (COL_INFO/COL_PROTOCOL) with col_checkKovarththanan Rajaratnam1-3/+1
svn path=/trunk/; revision=29345
2009-07-14Remove an unused define.Gerald Combs1-1/+0
svn path=/trunk/; revision=29098