aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-aoe.c
AgeCommit message (Collapse)AuthorFilesLines
2020-05-03Fix some issues seen with a fresh run of PVS StudioMartin Mathieson1-3/+1
/opt/SourceCode/wireshark/epan/dissectors/packet-aoe.c 328 warn V581 The conditional expressions of the 'if' statements situated alongside each other are identical. Check lines: 323, 328. /opt/SourceCode/wireshark/epan/dissectors/packet-aprs.c 1148 warn V1037 Two or more case-branches perform the same actions. Check lines: 1148, 1161 /opt/SourceCode/wireshark/epan/dissectors/packet-lsd.c 127 err V547 Expression 'strlen("cookie") == 0' is always false. /opt/SourceCode/wireshark/epan/dissectors/packet-rpc.c 3385 warn V547 Expression 'conversation == NULL' is always true. /opt/SourceCode/wireshark/epan/dissectors/packet-snort-config.c 465 note V576 Incorrect format. Consider checking the fourth actual argument of the 'g_snprintf' function. Under certain conditions the pointer can be null. /opt/SourceCode/wireshark/epan/dissectors/packet-snort.c 630 warn V768 The variable 'condition' is of enum type. It is odd that it is used as a variable of a Boolean-type. /opt/SourceCode/wireshark/epan/dissectors/packet-snort.c 969 warn V547 Expression '!attempt_match' is always false. Bug: 16335 Change-Id: I93bbc40f0467ebaab74335f6edc7d60e1c600a94 Reviewed-on: https://code.wireshark.org/review/37044 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <gharris@sonic.net>
2020-04-01Check for true_false_string with identical true/false string.Martin Mathieson1-5/+2
Fixed a few instances where fix were obvious, others are less clear. The check in proto.c is protected by ENABLE_CHECK_FILTER. Change-Id: I4edee4e67bd53bbf2eb809d68c87983a7c5a66f3 Reviewed-on: https://code.wireshark.org/review/36645 Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2019-07-26HTTPS (almost) everywhere.Guy Harris1-1/+1
Change all wireshark.org URLs to use https. Fix some broken links while we're at it. Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c Reviewed-on: https://code.wireshark.org/review/34089 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-04-04epan: Convert our PROTO_ITEM_ macros to inline functions.Gerald Combs1-4/+4
Convert our various PROTO_ITEM_ macros to inline functions and document them. Change-Id: I070b15d4f70d2189217a177ee8ba2740be36327c Reviewed-on: https://code.wireshark.org/review/32706 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-12-27Try to squeeze some bytes out of the frame_data structure.Guy Harris1-1/+1
Make the time stamp precision a 4-bit bitfield, so, when combined with the other bitfields, we have 32 bits. That means we put the flags at the same structure level as the time stamp precision, so they can be combined; that gets rid of an extra "flags." for references to the flags. Put the two pointers next to each other, and after a multiple of 8 bytes worth of other fields, so that there's no padding before or between them. It's still not down to 64 bytes, which is the next lower power of 2, so there's more work to do. Change-Id: I6f3e9d9f6f48137bbee8f100c152d2c42adb8fbe Reviewed-on: https://code.wireshark.org/review/31213 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-12dissectors: use SPDX identifiers.Dario Lombardo1-13/+1
Change-Id: I92c94448e6641716d03158a5f332c8b53709423a Reviewed-on: https://code.wireshark.org/review/25756 Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-02-02GHashtable -> wmem_map conversionsMichael Mann1-26/+12
Many of the register_init_routine/register_cleanup_routine functions are for initializing and cleaning up a GHashtable. wmem_map_new_autoreset can do that automatically, so convert many of the simple cases. Change-Id: I93e1f435845fd5a5e5286487e9f0092fae052f3e Reviewed-on: https://code.wireshark.org/review/19912 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Dario Lombardo <lomato@gmail.com> Tested-by: Dario Lombardo <lomato@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-01-25Add URL for the AoE spec.Guy Harris1-0/+5
Change-Id: I6e4fc624e6b4270a1db2b680e4d449c504bd56ee Reviewed-on: https://code.wireshark.org/review/19773 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-24Add the packet number to the packet_info structure, and use it.Guy Harris1-3/+3
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-11-09Convert some "ethertype" subdissectors to "new" style.Michael Mann1-9/+9
Change-Id: I93c001e78f9365300d393bac6714535f454c6515 Reviewed-on: https://code.wireshark.org/review/11647 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-03Call reassembly_table_destroy and move g_hash_table_destroyPeter Wu1-9/+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-15TFS: Mutualize Response/Request TFSAlexis La Goutte1-6/+1
move tfs_response_request to epan/tfs.[ch] and use this Change-Id: I29d5894fade721b5234649a7c2d83dd1d6a19a0d Reviewed-on: https://code.wireshark.org/review/8930 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-4/+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-09-30Add editor modelines; Adjust whitespace as needed.Bill Meier1-14/+27
Change-Id: I434da226c842298f4fb2a4335d06d51e164af2af Reviewed-on: https://code.wireshark.org/review/4394 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-06-22convert to proto_tree_add_subtree[_format]Michael Mann1-11/+8
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-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-11-16Avoid calling find_dissector(), cache result of [new_]register_dissector()Jakub Zawadzki1-5/+4
svn path=/trunk/; revision=53353
2013-09-12Convert a few dissectors from emem to wmem APIPascal Quantin1-2/+2
svn path=/trunk/; revision=51983
2013-03-13- [-Wmissing-prototypes]Anders Broman1-1/+1
- explicit casts. svn path=/trunk/; revision=48282
2013-03-12- [-Wmissing-prototypes]Anders Broman1-6/+9
- explicit casts. svn path=/trunk/; revision=48274
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-01-18Fix some duplicate display filter names.Chris Maynard1-1/+1
svn path=/trunk/; revision=40568
2011-10-21For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.Bill Meier1-1/+1
Also: remove trailing whitespace for a number of files. svn path=/trunk/; revision=39503
2011-09-26Get rid of check_col() and use ENC_BIG_ENDIAN.Anders Broman1-28/+21
svn path=/trunk/; revision=39144
2011-02-17Fix various Visual C++ analysis warnings.Gerald Combs1-1/+1
svn path=/trunk/; revision=35985
2010-12-20Rename the routines that handle dissector tables with unsigned integerGuy Harris1-1/+1
keys to have _uint in their names, to match the routines that handle dissector tables with string keys. (Using _port can confuse people into thinking they're intended solely for use with TCP/UDP/etc. ports when, in fact, they work better for things such as Ethernet types, where the binding of particular values to particular protocols are a lot stronger.) svn path=/trunk/; revision=35224
2010-05-13As suggested in ↵Jeff Morriss1-9/+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-04-06#include <string.h> not needed.Bill Meier1-1/+0
svn path=/trunk/; revision=32410
2010-04-03Remove unneeded #include <stdio.h>Bill Meier1-1/+0
svn path=/trunk/; revision=32367
2009-08-09Don't guard col_clear with col_checkKovarththanan Rajaratnam1-2/+1
svn path=/trunk/; revision=29344
2009-08-09Don't guard col_set_str (COL_PROTOCOL) with col_checkKovarththanan Rajaratnam1-2/+1
svn path=/trunk/; revision=29340
2009-07-07From Kovarththanan Rajaratnam:Stig Bjørlykke1-2/+2
More FT_XXX cleanup. svn path=/trunk/; revision=28971
2009-06-18From Kovarththanan Rajaratnam via bug 3548:Stig Bjørlykke1-3/+3
(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
2006-01-05Bill Meier:Jörg Mayer1-1/+1
Spelling fixes. svn path=/trunk/; revision=16956
2005-10-17In packet-dcerpc-nt.c, make sure we call init_pol_hash() each time we loadGerald Combs1-19/+19
a capture file. This should fix bug #536. Make sure we initialize our hash tables in packet-dcerpc-nt.c and several other files. Fix up whitespace while we're at it. svn path=/trunk/; revision=16255
2005-08-24EVERYTHING IN THE BUILDBOT IS GOING TO BE RED!!! Sorry! Ulf Lamping1-10/+4
I've done more than a day to change the timestamp resolution from microseconds to nanoseconds. As I really don't want to loose those changes, I'm going to check in the changes I've done so far. Hopefully someone else will give me a helping hand with the things left ... What's done: I've changed the timestamp resolution from usec to nsec in almost any place in the sources. I've changed parts of the implementation in nstime.s/.h and a lot of places elsewhere. As I don't understand the editcap source (well, I'm maybe just too tired right now), hopefully someone else might be able to fix this soon. Doing all those changes, we get native nanosecond timestamp resolution in Ethereal. After fixing all the remaining issues, I'll take a look how to display this in a convenient way... As I've also changed the wiretap timestamp resolution from usec to nsec we might want to change the wiretap version number... svn path=/trunk/; revision=15520
2005-08-12gmemchunk -> se_alloc() improvementsRonnie Sahlberg1-11/+2
svn path=/trunk/; revision=15324
2005-08-08various code cleanup:Ulf Lamping1-4/+0
-use g_snprintf instead of sprintf and snprintf -use g_strdup_printf where appropriate -remove #include "snprintf.h" (as only g_snprintf should be used) -replace some more alloc/realloc/calloc/free with their glib pendants svn path=/trunk/; revision=15264
2005-02-02From Jon Ringle:Anders Broman1-2/+2
1) Added a setup_frame parameter to conversation_t 2) Used the conversation_t next to maintain a list of conversations with the same src/dest tuple but different setup_frame number. 3) Changed the signature of find_conversation() and conversation_new() to pass in the frame number. 4) Adjusted packet-sdp to select RTP conversation if both m=audio and m=image are present, and T.38 conversation if only m=image is present. I expect that RTP/T.38 dissecting to be better, but I don't have a way to generate T.38 packets. svn path=/trunk/; revision=13243
2004-12-31Don't assign the const pointers passed to hash routines to non-constGuy Harris1-3/+3
pointers. svn path=/trunk/; revision=12890
2004-12-30Add a "get_addr_name()" routine that takes an "address *" and attemptsGuy Harris1-3/+3
to resolve it to a name. Fix up some const-pointer-to-non-const-pointer, and function-pointer-to-void-*, conversions. Fix some comments. svn path=/trunk/; revision=12863
2004-12-25a lot of warnings removed, most of them about pointer to int casts without ↵Ulf Lamping1-4/+4
using the appropriate GLib macros svn path=/trunk/; revision=12832
2004-12-07aoe updateRonnie Sahlberg1-4/+184
svn path=/trunk/; revision=12685
2004-12-07svn propset svn:keywords Id svn:eol-style native .....Jörg Mayer1-1/+1
Add $Id: $ where missing svn path=/trunk/; revision=12676
2004-12-07update one of the command namesRonnie Sahlberg1-2/+2
svn path=/trunk/; revision=12675
2004-12-07create a proper ETHERTYPE for ATAoverEthernetRonnie Sahlberg1-2/+1
svn path=/trunk/; revision=12674