aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-tn5250.c
AgeCommit message (Collapse)AuthorFilesLines
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
2010-05-17From Robert Hogan via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3922 :Jeff Morriss1-0/+7522
Add support for the IBM TN5250 data stream protocol. http://wiki.wireshark.org/TN5250 From me: Move most of the contents of the header file to the .c file. Replace blurbs that match the hf name with NULL. Replace empty-string blurbs with NULL. Fix some abbreviations (hf_tn5220_xxx -> tn5220.xxx). Make some functions static. Cast some offset increments to unsigned to make sure we don't go backwards (which could create a loop). This includes making most of the subdissection functions return an unsigned number. Use find_or_create_conversation(). svn path=/trunk/; revision=32838