aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-packetbb.c
AgeCommit message (Collapse)AuthorFilesLines
2021-07-21First pass pinfo->pool conversionEvan Huus1-1/+1
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.
2021-02-03Make more functions and vars static.Martin Mathieson1-9/+9
No contentious cases in this batch.
2020-06-19Fix the type of arrays of pointers to hf_ values for bitfield routines.Guy Harris1-4/+4
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-04-13Standardise IETF RFC and Draft URLs in dissectors.Martin Mathieson1-2/+2
Prefer: - html (rather than txt) - https Also includes the script check_dissector_urls.py, that can be used to find links in code and test them. Change-Id: Iafd8bb8948674a38ad5232bf5b5432ffb2b1251b Reviewed-on: https://code.wireshark.org/review/36821 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
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-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-10-26Add a ws_in6_addr typedef for struct e_in6_addr.Guy Harris1-1/+1
That allows a parallel typedef of ws_in4_addr for guint32. Change-Id: I03b230247065e0e3840eb87635315a8e523ef562 Reviewed-on: https://code.wireshark.org/review/24073 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-10PacketBB: do not add more bytes to the protocol tree than the real addr ↵Pascal Quantin1-2/+4
array length Bug: 13559 Change-Id: I612a7e2c104603a0aa14a0775bf9b8d247069398 Reviewed-on: https://code.wireshark.org/review/20992 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-02PacketBB: fix hf_packetbb_addr_value[3] field typePascal Quantin1-1/+1
Bug: 13545 Change-Id: Ic2dff0eeb2d312f573696cba9376cc004be17af9 Reviewed-on: https://code.wireshark.org/review/20852 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-03-05packetbb: fix this statement may fall through ↵Alexis La Goutte1-1/+1
[-Werror=implicit-fallthrough=] found by gcc7 Change-Id: Id1fb00f95608e7ad09f9eb48f1d98f5849ae575b Reviewed-on: https://code.wireshark.org/review/20409 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-25packetbb: Add decoding for TLV with single valueFrancois Schneider1-49/+327
Bug: 4118 Change-Id: I282fb8da657701c5b855dafe1568a5f226d3c12b Signed-off-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-on: https://code.wireshark.org/review/13985 Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-10-13Convert most UDP dissectors to use "auto" preferences.Michael Mann1-24/+6
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-07-04packet-packetbb.c cleanupMichael Mann1-49/+37
Change-Id: I2f6ab0bffca5aa4b021b46b930b55455e76b8a9f Reviewed-on: https://code.wireshark.org/review/16284 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-07-02packetbb: Prevent divide by 0.Michael Mann1-6/+8
Bug: 12577 Change-Id: Ibfa605597b786d8dbf1e256ef2ca6dc691498974 Reviewed-on: https://code.wireshark.org/review/16241 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-03Packetbb: Fix Msg sizeUli Heilmeier1-1/+1
Due to RFC5444 <msg-size> is a 16-bit unsigned integer field. Bug was reported by Matthias Tafelmeier Bug: 12227 Change-Id: I6d041015b386be7a8e02a87d0fe29e2670b1ab6e Reviewed-on: https://code.wireshark.org/review/14320 Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
2016-02-13packetbb: Add some descriptions for message and TLV typesFrancois Schneider1-12/+86
Change-Id: I2f1455cf50d9a90a516194ed09d7f6d6932e3afe Reviewed-on: https://code.wireshark.org/review/13912 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> 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-02-12packetbb: Fix the default value for end-indexFrancois Schneider1-1/+1
RFC5444 §5.4.1 specifies that for address block TLVs: end-index := <num-addr>-1 when both thassingleindex and thasmultiindex = 0. It was incorrectly initialized to <num-addr> when <num-addr>!=0 (i.e for address block TLVs). Change-Id: I4a78f263ffb122c0d6c0b54b4e8d1d6d525353e0 Reviewed-on: https://code.wireshark.org/review/13911 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-01-08Fix a lot of typos and misspellingsmoshekaplan1-1/+1
Change-Id: I8512cfa1d424f82a873a0e0e1d22c7b075fdd7f3 Reviewed-on: https://code.wireshark.org/review/13069 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> 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-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-12-05packetbb: fix the display of IPv4 addressesLotte Steenbrink1-1/+2
IPv4 Addresses are currently displayed incorrectly in RFC5444 Addressblocks. For example, what should be `Address: 10.1.3.0` is incorrectly rendered as Address: 0.0.0.10 This commit fixes that. Bug: 11852 Change-Id: Id6dc954e9a06e79375058f6070fe8e0f64167d64 Reviewed-on: https://code.wireshark.org/review/12429 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-11-04packetbb; display Addressblock Tail as TailLotte Steenbrink1-1/+1
when displaying the contents of a RFC5444 message containing an address block with a tail, the tail's value is incorrectly displayed as: Head: <value of tail> while it should say: Tail: <value of tail> This commit fixes that. Bug: 11673 Change-Id: Ibeb921cb712f98c9651970529e5240f871b85c0b Reviewed-on: https://code.wireshark.org/review/11538 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-14Change proto_tree_add_ipv6() to take a struct e_in6_addr pointerJoão Valverde1-1/+1
tvb_get_ipv6() takes a struct e_in6_addr *, use that here too. Change-Id: Id8b368daa05c151a61d4bc01dc88c00da13e9c88 Reviewed-on: https://code.wireshark.org/review/10953 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: Balint Reczey <balint@balintreczey.hu> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-12-23Deleting unnecessary #includes from dissectors.Martin Mathieson1-2/+0
Fourth batch (packet-mac-lte.c -> packet-rtp.c). Will look at cleaning up and committing script afterwards. Change-Id: Id921f07f4b274f0cfb77ce81abe4a285fdb8b644 Reviewed-on: https://code.wireshark.org/review/6023 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/+2
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-13Use ENC_BIG_ENDIAN when fetching FT_U?INT8 fields ...Bill Meier1-1/+1
(for some dissectors which fetch all other integral fields using ENC_BIG_ENDIAN). Change-Id: Ic18e3172aad76af12b12d6732c88497be22aed56 Reviewed-on: https://code.wireshark.org/review/5748 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-29Add editor modelines and adjust indentation as needed.Bill Meier1-0/+13
Change-Id: Id57d264299f2026d703c5b08bace4b24b32f184c Reviewed-on: https://code.wireshark.org/review/4371 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-07-31Convert hf_packetbb_error filter (packetbb.error) to expert info.Michael Mann1-94/+96
Also make dissector "new style" using it's already built in basic heuristics. Change-Id: I8b9b02d1f32cec96a1104c99647795d6fbda4804 Reviewed-on: https://code.wireshark.org/review/3275 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-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-14Fix warningsJakub Zawadzki1-0/+3
svn path=/trunk/; revision=54089
2013-01-22Try to eliminate VS Code Analysis warning: warning C6385: Invalid data: ↵Chris Maynard1-1/+3
accessing 'hf_packetbb_addr_value', the readable size is '16' bytes, but '4004' bytes might be read svn path=/trunk/; revision=47204
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 FSF address - part II.Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=43538
2012-05-08Get rid of remaining Booleans-as-encoding-arguments inGuy Harris1-8/+31
proto_tree_add_item() calls. Fix a field type - FT_UINT_BYTES means "byte array preceded by a length, with the length field included", not "byte array, not including any length field, even if it happens to be preceded by a length field". svn path=/trunk/; revision=42503
2012-01-20Avoid a potential infinite loop by stopping dissection when a message has no ↵Chris Maynard1-0/+4
tlvblock. Patch from Martin Kaiser via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6687 svn path=/trunk/; revision=40616
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-10-10 Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-11/+11
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-14/+14
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-12/+12
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
2011-02-20Capitalize protocol name.Stig Bjørlykke1-1/+1
svn path=/trunk/; revision=36011
2011-02-10Modify proto_tree_add_bytes_format() and proto_tree_add_bytes_format_value()Jeff Morriss1-16/+16
so that if the start_ptr is NULL the bytes are extracted from the given TVB using the given offset and length. Replace a bunch of: proto_tree_add_bytes_format*(tree, hf, tvb, offset, length, tvb_get_ptr(tvb, offset, length), [...]) with: proto_tree_add_bytes_format*(tree, hf, tvb, offset, length, NULL, [...]) svn path=/trunk/; revision=35896
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-10-10#include <epan/tfs.h> not req'd.Bill Meier1-1/+0
svn path=/trunk/; revision=34457
2010-01-19Fix gcc -Wshadow warningsBill Meier1-9/+9
svn path=/trunk/; revision=31561
2009-11-12From Henning Rogge:Jaap Keuter1-0/+1061
This patch adds support for PacketBB (RFC 5444) to Wireshark. PacketBB is a generic message format for mesh networks. Both OLSR version 2 and DYMO will use packetbb. svn path=/trunk/; revision=30942