aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-tn5250.c
AgeCommit message (Collapse)AuthorFilesLines
2021-12-19Fix errors found by fix-encoding-args.plJoão Valverde1-17/+17
2021-08-23Remove trailing colons from item label namesMartin Mathieson1-1/+1
This is a new check added to check_typed_item_calls.py --label Ignoring cases where item type is FT_NONE, as fpr tjpse text was appended that otherwise would lack a colon.
2020-08-31More spelling fixes, last part of 2nd pass of dissectors.Martin Mathieson1-2/+2
2020-07-07tn3270: improve on some of IBM's painful prose.Guy Harris1-17/+17
The "true" string in a struct true_false_string is used only if the bit is set to 1, so "if set to logic 1" is redundant. Just have the strings say, respectively, what significance the bit being on ("set to logic 1") has and what signficance the bit being off ("set to logic 0") has. Use active voice. Change-Id: If1fe7b35a0c85dcdb40ac348ca23a0ac5e3dc1da Reviewed-on: https://code.wireshark.org/review/37753 Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl> Reviewed-by: Guy Harris <gharris@sonic.net>
2020-07-06TN5250: Fix two true_false strings so they are differentiatingJaap Keuter1-4/+4
Found by conflict check Change-Id: Ic0348945b8519bc434bc5a10b5ed5951a7cdcb21 Reviewed-on: https://code.wireshark.org/review/37746 Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl> Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-06-19Fix the type of arrays of pointers to hf_ values for bitfield routines.Guy Harris1-64/+64
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-05proto: Add a debug check to sanity-check range_stringMartin Mathieson1-1/+1
Check is enabled by #ifdef ENABLE_CHECK_FILTER Remaining issues found by this check are fixed here, along with a documentation note that the entries are checked in order and the first match is used. The only issue not yet fixed is in packet-isup.c, where the spec was not available to me. Change-Id: Ife747cda9b91a265bc2b81ce0a53f55f3389919e Reviewed-on: https://code.wireshark.org/review/36708 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2020-04-04TN5250: Fix issue with range_string entry hiding those below.Martin Mathieson1-1/+3
value_range_string error: Video/Audio Control Data (tn5250.vac_data) hidden by earlier entry (prev="Set PIP Location and Size": 0 0x0 -> 4294967295 0xffffffff) (this="Set PIP See Through On": 520093697 0x1f000001 -> 520093697 0x1f000001) value_range_string error: Video/Audio Control Data (tn5250.vac_data) hidden by earlier entry (prev="Set PIP Location and Size": 0 0x0 -> 4294967295 0xffffffff) (this="Set PIP SeeThrough Off": 520093696 0x1f000000 -> 520093696 0x1f000000) value_range_string error: Video/Audio Control Data (tn5250.vac_data) hidden by earlier entry (prev="Set PIP Location and Size": 0 0x0 -> 4294967295 0xffffffff) (this="Freeze PIP": 536870913 0x20000001 -> 536870913 0x20000001) value_range_string error: Video/Audio Control Data (tn5250.vac_data) hidden by earlier entry (prev="Set PIP Location and Size": 0 0x0 -> 4294967295 0xffffffff) (this="Resume After Freeze": 536870912 0x20000000 -> 536870912 0x20000000) value_range_string error: Video/Audio Control Data (tn5250.vac_data) hidden by earlier entry (prev="Set PIP Location and Size": 0 0x0 -> 4294967295 0xffffffff) (this="Set PC/TV Channel": 301989888 0x12000000 -> 301989988 0x12000064) value_range_string error: Video/Audio Control Data (tn5250.vac_data) hidden by earlier entry (prev="Set PIP Location and Size": 0 0x0 -> 4294967295 0xffffffff) (this="Set Antenna Tuner Source": 285212672 0x11000000 -> 285212672 0x11000000) value_range_string error: Video/Audio Control Data (tn5250.vac_data) hidden by earlier entry (prev="Set PIP Location and Size": 0 0x0 -> 4294967295 0xffffffff) (this="Set Cable Tuner Source": 285212673 0x11000001 -> 285212673 0x11000001) value_range_string error: Video/Audio Control Data (tn5250.vac_data) hidden by earlier entry (prev="Set PIP Location and Size": 0 0x0 -> 4294967295 0xffffffff) (this="Disable Internal Speaker": 553648129 0x21000001 -> 553648129 0x21000001) value_range_string error: Video/Audio Control Data (tn5250.vac_data) hidden by earlier entry (prev="Set PIP Location and Size": 0 0x0 -> 4294967295 0xffffffff) (this="Enable Internal Speaker": 553648128 0x21000000 -> 553648128 0x21000000) value_range_string error: Video/Audio Control Data (tn5250.vac_data) hidden by earlier entry (prev="Set PIP Location and Size": 0 0x0 -> 4294967295 0xffffffff) (this="Keyboard Disable": 385875969 0x17000001 -> 385875969 0x17000001) value_range_string error: Video/Audio Control Data (tn5250.vac_data) hidden by earlier entry (prev="Set PIP Location and Size": 0 0x0 -> 4294967295 0xffffffff) (this="Keyboard Enable": 385875968 0x17000000 -> 385875968 0x17000000) value_range_string error: Video/Audio Control Data (tn5250.vac_data) hidden by earlier entry (prev="Set PIP Location and Size": 0 0x0 -> 4294967295 0xffffffff) (this="Set PC/TV Brightness": 218103808 0xd000000 -> 218103908 0xd000064) value_range_string error: Video/Audio Control Data (tn5250.vac_data) hidden by earlier entry (prev="Set PIP Location and Size": 0 0x0 -> 4294967295 0xffffffff) (this="Set PC/TV Color": 251658240 0xf000000 -> 251658340 0xf000064) value_range_string error: Video/Audio Control Data (tn5250.vac_data) hidden by earlier entry (prev="Set PIP Location and Size": 0 0x0 -> 4294967295 0xffffffff) (this="Set PC/TV Contrast": 234881024 0xe000000 -> 234881124 0xe000064) value_range_string error: Video/Audio Control Data (tn5250.vac_data) hidden by earlier entry (prev="Set PIP Location and Size": 0 0x0 -> 4294967295 0xffffffff) (this="Set PC/TV Tint": 268435456 0x10000000 -> 268461156 0x10006464) value_range_string error: Data Field (tn5250.dfdpck_data_field) hidden by earlier entry (prev="Invalid Data Field Type": 0 0x0 -> 64 0x40) (this="Top Row Command Key Functions": 64 0x40 -> 64 0x40) Change-Id: I3596fa1a62c6f0e7c115551be137162ddb6679a6 Reviewed-on: https://code.wireshark.org/review/36683 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2020-04-01Check for true_false_string with identical true/false string.Martin Mathieson1-1/+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>
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-03-07Eliminate unused structure members and an unused list.Guy Harris1-10/+0
We don't use the addresses, and don't use the inbound port. We also don't need a list of tn5250_conv_info_t's - they're allocated with wmem, so they get freed when we're done with a file, and they're attached to conversations, so we don't need a list to find them. Change-Id: Id3b44fb11cf353d7d15a58938883f2460cf642a0 Reviewed-on: https://code.wireshark.org/review/26301 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-28Convert to using find_conversation_pinfo where appropriateMichael Mann1-6/+2
This makes it easier to identify the simpler/common conversations Change-Id: I7094f23e49156ee27f5f72c8e130308470f3e462 Reviewed-on: https://code.wireshark.org/review/24145 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
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-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_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-23register_dissector -> new_register_dissectorMichael Mann1-6/+7
Change-Id: Ifc8208e1b96e2a3bf297912500a5f252bfa8eed9 Reviewed-on: https://code.wireshark.org/review/12073 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-03Remaining ADDRESS macro to address function conversionsJoão Valverde1-2/+2
Change-Id: I8bc9af431e70243b05f4f0ce8c2b8ee451383788 Reviewed-on: https://code.wireshark.org/review/11463 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-01-16SE_COPY_ADDRESS -> WMEM_COPY_ADDRESSMichael Mann1-2/+2
Copy addresses with wmem-scope instead of (forced) seasonal scope. All existing instances were converted to wmem_file_scope, but the flexibility is there for other scopes. Change-Id: I8e58837b9ef574ec7dd87e278470d7063ae8c1c2 Reviewed-on: https://code.wireshark.org/review/6564 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-29TN5250: Missing break in switch (CID 280477)Alexis La Goutte1-1/+3
fix also indent typo Change-Id: I47ff84a6062a203e14b9dde420a1a2efd5b05fab Reviewed-on: https://code.wireshark.org/review/6118 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-25Deleting unnecessary #includes from dissectors.Martin Mathieson1-1/+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-2/+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-10-28TN5250: Fix Dead Store (Dead assignement/Dead increment) warning found by ClangAlexis La Goutte1-1/+0
Change-Id: Ida9f7198d6e3ef7bab5d787883116600019180ec Reviewed-on: https://code.wireshark.org/review/4963 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-10-21tn5220: prevent another potential endless loopMartin Kaiser1-1/+6
exit the loop if dissect_unknown_data() returns 0 Change-Id: I681d170d4daf8efb06231790652ff7c941b46d89 Reviewed-on: https://code.wireshark.org/review/4882 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-10-21Fix the earlier checkin.Guy Harris1-3/+3
Remove some trailing white space while we're at it. Change-Id: If399077a799e24302640776760b4388687ecad4f Reviewed-on: https://code.wireshark.org/review/4889 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-21Fix a number of what appear to be errors.Guy Harris1-8/+63
Add checks for too-short length fields. Increment the offset after some proto_tree_add_item() calls to skip past the item. Make some other length calculations use the start of the item to which the length applies, not the start of the *list* of items. Fix a double-digit field to be 2 bytes long (as the documentation says it is). Add a comment about a field that isn't always present but that's specified in a tn5250_add_hf_items() list. Fix DEFINE PITCH TABLE to match what the documentation appears to say it is. Change-Id: Ibcdc580045c68e8d0d8f35011dfe72b9c245e157 Reviewed-on: https://code.wireshark.org/review/4888 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-20tn5250: fix an endless loop, exit when offset is not incrementedMartin Kaiser1-0/+2
Bug: 10596 Change-Id: I64509aa49fce4893dee4e7a74a560e09a98830f6 Reviewed-on: https://code.wireshark.org/review/4878 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-09-29Add editor modelines; fix indentation as needed.Bill Meier1-0/+13
Change-Id: I1ad94654343e5a018a0b3159481d45ffb3a91263 Reviewed-on: https://code.wireshark.org/review/4363 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-08Eliminate proto_tree_add_text from some of the dissectors.Michael Mann1-50/+23
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-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 [-Wmissing-prototypes]Jakub Zawadzki1-0/+2
svn path=/trunk/; revision=54095
2013-12-13It should halve warnings count in tn5250 dissector.Jakub Zawadzki1-378/+378
svn path=/trunk/; revision=54079
2013-10-29From didier gautheron: remove redundant or use faster col_xxx functionsBill Meier1-1/+0
- when the text parameter is constant col_add_str() and col_set_str() are equivalent but col_set_str() is faster. - same for replace col_append_fstr and col_append_str - remove col_clear() when it's redundant: + before a col_set/col_add if the dissector can't throw an exception. - replace col_append() after a col_clear() with faster col_add... or col_set https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9344 svn path=/trunk/; revision=52948
2013-10-23#if 0 numerous "unused const variables" (mostly value-string-arrays);Bill Meier1-1/+6
Also; fix a few "set but not used" warnings. svn path=/trunk/; revision=52780
2013-10-13whitespace fixes; mostly: remove trailing blanksBill Meier1-1/+1
svn path=/trunk/; revision=52591
2013-09-12emem -> wmem ("tshark -v" tested)Jörg Mayer1-1/+2
svn path=/trunk/; revision=51979
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
2013-03-17Fix some Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-3/+3
svn path=/trunk/; revision=48366
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-23Fix some duplicate display filter names.Chris Maynard1-7/+7
svn path=/trunk/; revision=40672
2011-10-24Fix encoding arg for various fcn calls:Bill Meier1-3/+3
- proto_tree_add_bits_item - proto_tree_add_bits_ret_val - proto_tree_add_bitmask - tvb_get_bits - tvb_get_bits16 - tvb_get_bits24 - tvb_get_bits32 - tvb_get_bits64 svn path=/trunk/; revision=39539
2011-07-30Whitespace cleanup.Bill Meier1-2214/+2213
svn path=/trunk/; revision=38283
2011-07-30Remove unneeded #includesBill Meier1-5/+1
svn path=/trunk/; revision=38282
2011-07-05Add some additional routine variants that handle string encodings, andGuy Harris1-497/+500
make FT_STRING and FT_UINT_STRING handle string encodings. Get rid of FT_EBCDIC in favor of FT_STRING with ENC_EBCDIC. Add some URLs for DRDA. Clean up some stuff in TN3270 and TN5250, including using ENC_ values for proto_tree_add_item(). svn path=/trunk/; revision=37909
2011-06-19Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings.Bill Meier1-2/+0
svn path=/trunk/; revision=37716
2010-12-06Fix various typos and spelling errors.Bill Meier1-2/+2
svn path=/trunk/; revision=35126
2010-10-07Define a global variable as static.Bill Meier1-1/+1
svn path=/trunk/; revision=34409
2010-05-17Remove trailing white spaceJeff Morriss1-36/+36
svn path=/trunk/; revision=32839