aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-rx.c
AgeCommit message (Collapse)AuthorFilesLines
2021-07-21First pass pinfo->pool conversionEvan Huus1-12/+12
Automated find/replace of wmem_packet_scope() with pinfo->pool in all files where it didn't cause a build failure. I also tweaked a few of the docs which got caught up.
2020-11-01rx: simpler check for a known typeMartin Kaiser1-1/+1
Call try_val_to_str to check if the type is listed in our value string of known types.
2020-06-19Fix the type of arrays of pointers to hf_ values for bitfield routines.Guy Harris1-1/+1
The static arrays are supposed to be arrays of const pointers to int, not arrays of non-const pointers to const int. Fixing that means some bugs (scribbling on what's *supposed* to be a const array) will be caught (see packet-ieee80211-radiotap.c for examples, the first of which inspired this change and the second of which was discovered while testing compiles with this change), and removes the need for some annoying casts. Also make some of those arrays static while we're at it. Update documentation and dissector-generator tools. Change-Id: I789da5fc60aadc15797cefecfd9a9fbe9a130ccc Reviewed-on: https://code.wireshark.org/review/37517 Petri-Dish: Guy Harris <gharris@sonic.net> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-03-09rx: decode version packetsMark Vitale1-0/+21
An RX_PACKET_TYPE_VERSION packet may be used to request the AFS version from a server. It may also be issued periodically as a "NAT ping", to assist in keeping UDP port mappings intact over what may otherwise be a long period of network inactivity. Provide some information in the info column for each of these use cases. Change-Id: I73aa7f2cbfd4a3e9538d629086bfa35eda6b6bf7 Reviewed-on: https://code.wireshark.org/review/36294 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-03-06rx: display rx-ack reason stringMark Vitale1-12/+16
There are many reasons for an Rx ack packet; add the reason string to the info column. Change-Id: I7512fcff0a9eda2def20f8194cb5ca804497a4dc Reviewed-on: https://code.wireshark.org/review/36293 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-03-06rx: correct erroneous commentMark Vitale1-1/+1
This /* kvno */ comment was clearly residual from a cut-n-paste. Update it to reflect reality. No functional change is incurred by this commit. Change-Id: I34b65c1f9b6f8e6f11f17f1647303d75df1d2df1 Reviewed-on: https://code.wireshark.org/review/36292 Reviewed-by: Anders Broman <a.broman58@gmail.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>
2018-07-02Use proto_tree_add_item() for a number of time values.Guy Harris1-9/+2
Change-Id: I862a7870d335f8b0b57d13e2981a8bb1a02b2726 Reviewed-on: https://code.wireshark.org/review/28563 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-11-21From looking at the OpenAFS source, the RX abort code is signed.Guy Harris1-1/+1
Change-Id: I79f578ee5fe4e63d5bb6adc9d90f24fac5f82b02 Reviewed-on: https://code.wireshark.org/review/24520 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-11-20OpenAFS always puts out 3 bytes of padding in an ack packet.Guy Harris1-1/+2
Change-Id: Ia956ac7df43c307a8d5adac5c78c894017f7f7ec Reviewed-on: https://code.wireshark.org/review/24513 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-10-13Convert most UDP dissectors to use "auto" preferences.Michael Mann1-10/+2
Similar to the "tcp.port" changes in I99604f95d426ad345f4b494598d94178b886eb67, convert dissectors that use "udp.port". More cleanup done on dissectors that use both TCP and UDP dissector tables, so that less preference callbacks exist. Change-Id: If07be9b9e850c244336a7069599cd554ce312dd3 Reviewed-on: https://code.wireshark.org/review/18120 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-03-20Manually add protocol dependencies derived from find_dissector.Michael Mann1-1/+1
Started by grepping call_dissector_with_data, call_dissector_only and call_dissector and traced the handles passed into them to a find_dissector within the dissector. Then replaced find_dissector with find_dissector_add_dependency and added the protocol id from the dissector. "data" dissector was not considered to be a dependency. Change-Id: I15d0d77301306587ef8e7af5876e74231816890d Reviewed-on: https://code.wireshark.org/review/14509 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-09new_create_dissector_handle -> create_dissector_handle for dissector directory.Michael Mann1-1/+1
Some of the ASN.1 dissectors still generate a new_create_dissector_handle from the tool itself, so leave those for now. Change-Id: Ic6e5803b1444d7ac24070949f5fd557909a5641f Reviewed-on: https://code.wireshark.org/review/12484 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-23Remove more deprecated tvb_lengthEvan Huus1-3/+3
Change-Id: I36603453c2563406f82663683930088dedd5f39c Reviewed-on: https://code.wireshark.org/review/9041 Reviewed-by: Evan Huus <eapache@gmail.com>
2015-01-08ep_<protocol>_port_to_display -> <protocol>_port_to_displayMichael Mann1-10/+10
Adjust any other ep_ related APIs related to the transition. Change-Id: I961b371c2c4bda557e0f1817705c27eef0dae66c Reviewed-on: https://code.wireshark.org/review/6388 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-1/+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-01Use proto_tree_add_bitmask for groups of proto_tree_add_boolean.Michael Mann1-21/+12
Part 3 of many, but this concludes the strict conversion to proto_tree_add_bitmask. Patches to follow with use proto_tree_add_bitmask_xxx (some functions still need to be written) Change-Id: Ic2435667c6a7f1d40602124e5044954d2a296180 Reviewed-on: https://code.wireshark.org/review/5553 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-10-19Remove unnecessary tvb_ensure_bytes_exist calls.Michael Mann1-1/+0
All of the calls removed are followed by proto_tree_add_xxx calls of the same offset/length of the tvb_ensure_bytes_exist call. The proto_tree_add_xxx calls should throw the exception, so we don't need the "double check". There are probably more calls that can be removed, these were just obvious as first glance, spurred mostly by noticing the (ab)use in packet-wsp.c Change-Id: I37cee347c8cf8ab0559e21562c802d3b37f4871e Reviewed-on: https://code.wireshark.org/review/4833 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-09-16Fix spelling: cant-->can't, wont-->won't, etcBill Meier1-6/+6
Change-Id: I4497f1b8b6eab0e576d9dd31b732965f9a6679c6 Reviewed-on: https://code.wireshark.org/review/4124 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-3/+3
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-3/+3
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-19More name changes.Guy Harris1-10/+10
Add ep_ to routines that may return ephemeral strings. Change "get_XXX" to "XXX_to_display" if the routine returns a formatted string if it can't get a name. Change-Id: Ia0e82784349752cf4285bf82788316c9588fdd88 Reviewed-on: https://code.wireshark.org/review/1217 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-02-16Fix indent (use tabs) and add modelines infoAlexis La Goutte1-2/+15
Change-Id: I2a25cc406a8c52b14ed5a0fb3cf906b1a8da5a18 Reviewed-on: https://code.wireshark.org/review/227 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-16Rx ACK packets are displayed with transposed Interface MTU and Max MTU fieldsAlexis La Goutte1-2/+2
Found by David Howells Change-Id: Ic86e44b528069be8e43c1262c68afedcd159de23 Closed-bug: 9762 Reviewed-on: https://code.wireshark.org/review/225 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2013-12-12- Make local functions static.Anders Broman1-0/+2
- Forward declaration of register functions. svn path=/trunk/; revision=53958
2013-10-22Pass struct rxinfo "private data" into AFS dissector instead of using ↵Michael Mann1-5/+2
pinfo->private_data. svn path=/trunk/; revision=52751
2013-06-14Remove check_col() and the occasional tree.Michael Mann1-15/+5
svn path=/trunk/; revision=49921
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-09-10Initial commit to support yet another method of passing data between dissectors.Jakub Zawadzki1-1/+1
Add new parameter 'data' to heur_dissector_t and new_dissector_t, for now it's always NULL svn path=/trunk/; revision=44860
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2011-10-06Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-24/+24
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-10-04Use ENC_NA as encoding for proto_tree_add_item() calls which directly ↵Bill Meier1-6/+6
reference an hf item (in hf[] with types: FT_NONE FT_BYTES FT_IPV6 FT_IPXNET FT_OID Note: Encoding field set to ENC_NA only if the field was previously TRUE|FALSE|ENC_LITTLE_ENDIAN|ENC_BIG_ENDIAN svn path=/trunk/; revision=39260
2010-12-20Rename the routines that handle dissector tables with unsigned integerGuy Harris1-2/+2
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-09-23Replace blurbs that match the name (case insensitive) with NULL.Jeff Morriss1-1/+1
svn path=/trunk/; revision=34227
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-2/+0
svn path=/trunk/; revision=32367
2009-12-19For fields of type FT_ABSOLUTE_TIME, have the "display" value be one ofGuy Harris1-1/+1
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-08-16Switch a bunch of dissectors over to using tvb_new_subset_remaining()Kovarththanan Rajaratnam1-1/+1
svn path=/trunk/; revision=29446
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-06-18From Kovarththanan Rajaratnam via bug 3548:Stig Bjørlykke1-33/+33
(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-05-19From Artem Tamazov (bug 3472):Stig Bjørlykke1-0/+3
Save/Restore pinfo->private_data when used. svn path=/trunk/; revision=28412
2008-03-16Set rxinfo.epoch from the epoch, and then assign it to ts.secs; thatGuy Harris1-10/+6
avoids doing a narrowing case - which, in this case, is safe (rxinfo.epoch is 32 bits, and the value assigned to it is 32 bits, so it's not as if it'd ever be wider than 32 bits even if ts.secs is wider than 32 bits), but you might still have to think about it. svn path=/trunk/; revision=24658
2008-03-16Added a cast to make it compile.Stig Bjørlykke1-1/+1
svn path=/trunk/; revision=24657
2008-03-16From Chaskiel Grundman via ↵Jeff Morriss1-0/+2
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1556: patch to track afs requests by rx connection id svn path=/trunk/; revision=24651
2007-04-02Make RX a new style dissector: return 0 if there isn't at least 28 bytes of ↵Jeff Morriss1-2/+12
message or if it receives an unknown Type. Add a check of tvb length to README.developer's cut-n-paste dissector code. svn path=/trunk/; revision=21300
2006-05-21change a whole bunch of ethereal into wiresharkRonnie Sahlberg1-2/+2
svn path=/trunk/; revision=18196
2005-04-13Add a couple of tvb_ensure_bytes_exist() calls to fix bug 12.Gerald Combs1-0/+1
svn path=/trunk/; revision=14064