aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-t30.c
AgeCommit message (Collapse)AuthorFilesLines
2023-11-20Remove init of proto variablesStig Bjørlykke1-114/+114
Remove init of proto, header field, expert info and subtree variables. This will reduces the binary size by approximate 1266320 bytes due to using .bss to zero-initialize the fields. The conversion is done using the tools/convert-proto-init.py script.
2023-06-18Get rid of unnecessary casts.Guy Harris1-1/+1
snprintf(), sensibly, takes a size_t argument specifying the size of the buffer. g_snprintf(), bogusly, takes a gulong argument specifying the size of the buffer, so we had to do casts to avoid narrowing complaints, but we're just using snprintf() now (as we require C11 or later), and don't need the casts any more.
2022-11-18T.30: Fix UTF-8 encodingJoão Valverde1-7/+6
Fixes #18649.
2021-12-19Replace g_snprintf() with snprintf() (dissectors)João Valverde1-6/+6
Use macros from inttypes.h with format strings.
2021-07-29Change some `wmem_packet_scope()` to `pinfo->pool`David Perry1-4/+4
As requested [here][1], help with replacing calls to `wmem_packet_scope()` with references to `pinfo->pool`. My principles were: * Plugins chosen semi-randomly. * When a calling function already has a `pinfo` argument, just use that. * Remove `_U_` from its signature if it was there. * Don't go more than 2 or 3 levels deep of changing signatures. * If a function is clearly allocing memory to return, change the function signature to take a `wmem_allocator_t *`. Otherwise, either that or take a `packet_info *` as seems to make sense. * No mention of `wmem_packet_scope()` should remain in the files I've touched. * I didn't always succeed at this, but I made a dent. [1]: https://www.wireshark.org/lists/wireshark-dev/202107/msg00052.html
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-06-08Make the string representation of the frame bitmap cover the frame bitmap.Guy Harris1-1/+3
Make it begin where the frame bitmap begins, and end where the frame bitmap ends, rather than pretending it begins where the frame bitmap *ends* and is as many bytes long as the generated string is. Change-Id: Id62ba067116e3191646af764d3ae846474ac29c8 Reviewed-on: https://code.wireshark.org/review/28160 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-03-01Don't handle various "command to send" values in the default case.Guy Harris1-3/+5
The default case ignores the high-order bit, which is set in all the values for "command to send", so they will never be matched. The values moved out of the default case, if their upper bit is clear, either don't correspond to any command in T.30 or correspond to an initial identification command, which never has the upper bit set, so there's no risk of misidentification by processing all of the "command to send" values outside the default case. Thanks and a tip of the Hatlo hat to Visual Studio Code Analysis for catching this one. Change-Id: I6192b0c5a6dcfd31b9fd757be736a311a9d089e6 Reviewed-on: https://code.wireshark.org/review/26198 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-20Remove unused dissector registration prototypes, fix typoJoão Valverde1-1/+0
Change-Id: Ide5d7f2241db4ac87ed516f91f0bcaca347bb546 Reviewed-on: https://code.wireshark.org/review/24496 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-03-11T30: fix parsing broken since ge063924Martin Vit1-32/+61
Bug: 1918 Change-Id: I276e5ad74caaf509d220f97e111d2aedc7caef17 Reviewed-on: https://code.wireshark.org/review/20423 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-12Remove T.30 FCF mask.Michael Mann1-4/+5
Found by VS Code Analysis, verified with spec that mask isn't needed. Also included link to current spec. Bug: 1918 Change-Id: Ic3e8ee599501c7c12717649579ffd70581622178 Reviewed-on: https://code.wireshark.org/review/16392 Reviewed-by: Michael Mann <mmann78@netscape.net>
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-06-22Remove a bunch of deprecated tvb_length callsEvan Huus1-1/+1
Change-Id: I9362e0fdc4519ba5f3d656152966e7030f478839 Reviewed-on: https://code.wireshark.org/review/9022 Petri-Dish: Evan Huus <eapache@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com>
2014-12-25Deleting unnecessary #includes from dissectors.Martin Mathieson1-2/+0
Fifth batch (packet-rtp.c -> end). Will look at cleaning up and committing script afterwards. Change-Id: I8ed61dc941d98d3f7259a9d1f74e214eb7b4bfa2 Reviewed-on: https://code.wireshark.org/review/6052 Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-4/+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-14/+14
Change-Id: Ie8cb993bb9dd3e8dbfa1876a4e731bca10ee0507 Reviewed-on: https://code.wireshark.org/review/5754 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-08Eliminate proto_tree_add_text from some of the dissectors.Michael Mann1-2/+2
Other minor cleanups while in the area. Change-Id: I623d941e53128f169e55dfc629547b4221fa72fc Reviewed-on: https://code.wireshark.org/review/4021 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: Evan Huus <eapache@gmail.com>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-1/+1
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-1/+1
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-14Create/use several extended value-strings;Bill Meier1-198/+212
(Sort & remove dups from underlying value_string arrays); Reformat a few long lines; Add editor modelines; svn path=/trunk/; revision=54103
2013-12-11- Forward declaration of register functions.Anders Broman1-0/+1
svn path=/trunk/; revision=53930
2013-12-10- Forward declaration of register functions.Anders Broman1-0/+2
svn path=/trunk/; revision=53918
2013-10-29Pass T.38 data to subdissectors directly instead of using pinfo->private_data.Michael Mann1-22/+23
svn path=/trunk/; revision=52964
2013-09-30Convert some proto_tree_add_string_format calls to something more appropriate.Michael Mann1-4/+4
There seem to be several cases of proto_tree_add_string_format where a "string" value/filter doesn't really make sense because it's always empty, and is just being used as a "filterable subtree header (placeholder)". They appear to be more for "presense" than "value" and should probably be FT_NONE, although I'd almost argue for removing the filter in favor of proto_tree_add_text. svn path=/trunk/; revision=52296
2013-09-12Convert from emem to wmem.Jörg Mayer1-3/+3
Trivial whitespace fix in packet-tftp.c while at it. svn path=/trunk/; revision=51970
2013-07-03expert_add_info_format_text + proto_tree_add_text = ↵Michael Mann1-24/+12
proto_tree_add_expert_format, where applicable. svn path=/trunk/; revision=50377
2013-06-12Batch of filterable expert infos with some minor cleanup I noticed while ↵Michael Mann1-154/+151
doing the filter conversions. svn path=/trunk/; revision=49893
2013-03-19From beroset:Anders Broman1-4/+4
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48430
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-08-10Use val_to_str_const() where appropriate;Bill Meier1-1/+1
Also (for a few files): - create/use some extended value strings; - remove unneeded #include files; - remove unneeded variable initialization; - re-order fcns slightly so prefs_reg_handoff...() at end, etc svn path=/trunk/; revision=44438
2012-07-28Add a comment that VS Code Analyzer makes a very good point here -Martin Mathieson1-1/+5
masking the m.s.b. of the command code does mean that several of them won't ever get detected. I couldn't readily see from the spec what the right think to do is. svn path=/trunk/; revision=44098
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-03-05Trust but verify that there's no g_snprintf() buffer overflow.Bill Meier1-0/+1
svn path=/trunk/; revision=41346
2012-01-23Fix some duplicate display filter names.Chris Maynard1-1/+1
svn path=/trunk/; revision=40672
2011-11-16Cleanup & reformatting: whitespace & long-lines.Bill Meier1-135/+168
svn path=/trunk/; revision=39874
2011-10-03Thou shalt not use g_sprintf() lest thou overflow a buffer. (Yes, evenGuy Harris1-2/+3
if you know it's safe. Sorry.) svn path=/trunk/; revision=39242
2011-10-03%hhu = %u in printf-like functions, as "char", "signed char", andGuy Harris1-1/+1
"unsigned char" get upsized to "int" and "unsigned int" when passed to varargs functions. svn path=/trunk/; revision=39241
2011-10-03Cast away a warning - if that buffer has more than 2^31-1 characters inGuy Harris1-1/+1
it, we have a real problem. svn path=/trunk/; revision=39239
2011-10-03From Jakob Hirsch:Anders Broman1-0/+54
Parse T.30 PPR (partial page request) and show requested frames. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6326 svn path=/trunk/; revision=39235
2010-04-03Remove unneeded #include <stdio.h>Bill Meier1-1/+0
svn path=/trunk/; revision=32367
2009-09-24* Prefer col_append_str instead of col_append_fstr for constant stringsKovarththanan Rajaratnam1-16/+8
* Remove check_col guards svn path=/trunk/; revision=30127
2009-07-07Changed flags_set_truth -> tfs_set_notsetStig Bjørlykke1-76/+76
svn path=/trunk/; revision=28989
2009-06-18From Kovarththanan Rajaratnam via bug 3548:Stig Bjørlykke1-2/+2
(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-03-29Define certain fcns as static (if not used externally).Bill Meier1-125/+126
Also: whiule we're at it: - fix hf[] blurbs as appropriate to use NULL; - fix some indentation svn path=/trunk/; revision=27890
2008-08-25#include <prefs.h> not req'dBill Meier1-1/+0
svn path=/trunk/; revision=26089
2007-07-19Change "lenght" to "length" and "decypt" to "decrypt"Jeff Morriss1-44/+44
svn path=/trunk/; revision=22356
2007-05-04generate T.38 dissector from ASN.1 sourceTomas Kukosa1-0/+2
svn path=/trunk/; revision=21676