aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ansi_637.c
AgeCommit message (Collapse)AuthorFilesLines
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-01-31format_text_wmem -> format_textMichael Mann1-1/+1
All cases of the "original" format_text have been handled to add the proper wmem allocator scope. Remove the "original" format_text and replace it with one that has a wmem allocator as a parameter. Change-Id: I278b93bcb4a17ff396413b75cd332f5fc2666719 Reviewed-on: https://code.wireshark.org/review/19884 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-01-31Add format_text_wmem.Michael Mann1-1/+1
This allows for a wmem_allocator for users of format_text who want it (dissectors for wmem_packet_scope()). This lessens the role of current format_text functionality in hopes that it will eventually be replaced. Change-Id: I970557a65e32aa79634a3fcc654ab641b871178e Reviewed-on: https://code.wireshark.org/review/19855 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-28ANSI IS-637 A: fix decoding of IA5 SMSPascal Quantin1-1/+1
Give the right buffer to the decoding function Bug: 13065 Change-Id: I0e41e04fb68602d95ea6f060c1a37c8b8596134d Reviewed-on: https://code.wireshark.org/review/18548 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-08-31Don't do any Decode As stuff for dissector tables not used with Decode As.Guy Harris1-1/+1
Have all dissector tables have a "supports Decode As" flag, which defaults to FALSE, and which is set to TRUE if a register_decode_as() refers to it. When adding a dissector to a dissector table with a given key, only add it for Decode As if the dissector table supports it. For non-FT_STRING dissector tables, always check for multiple entries for the same protocol with different dissectors, and report an error if we found them. This means there's no need for the creator of a dissector table to specify whether duplicates of that sort should be allowed - we always do the check when registering something for "Decode As" (in a non-FT_STRING dissector table), and just don't bother registering anything for "Decode As" if the dissector table doesn't support "Decode As", so there's no check done for those dissector tables. Change-Id: I4a1fdea3bddc2af27a65cfbca23edc99b26c0eed Reviewed-on: https://code.wireshark.org/review/17402 Petri-Dish: Guy Harris <guy@alum.mit.edu> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-04-29ANSI IS-637 A: fix display of reserved bits when using 7bits GSM encodingPascal Quantin1-3/+63
Change-Id: Ida59c339d174e8f9a3b8bf108374875d12c51b21 Reviewed-on: https://code.wireshark.org/review/15153 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-03-28Fix some warnings/errors of typeJoerg Mayer1-18/+18
git/epan/dissectors/packet-a21.c:478:25: error: 'item' was marked unused but was used [-Werror,-Wused-but-marked-unused] proto_item_append_text(item, "%s", val_to_str_const(event_id, a21_event_vals, "Unknown")); ^ Added manual change id because file-jpeg.c forced the use of commit -n Change-Id: Iffff53d6253758c8454d9583f0a11f317c8390cb Fix warnings/errors of type: git/epan/dissectors/packet-ax25-kiss.c:205:52: error: 'pseudo_header' was marked unused but was used [-Werror,-Wused-but-marked-unused] return capture_ax25( pd, l_offset, len, cpinfo, pseudo_header ); Fix checkhf warnings: Unused entry: epan/dissectors/packet-artnet.c, hf_artnet_address_netswitch Unused entry: epan/dissectors/packet-artnet.c, hf_artnet_address_subswitch Unused entry: epan/dissectors/packet-artnet.c, hf_artnet_poll_reply_trailer Unused entry: epan/dissectors/packet-artnet.c, hf_artnet_rdm_universe Unused entry: epan/dissectors/packet-artnet.c, hf_artnet_tod_data_universe Change-Id: Id1fa12afb97a8e9cd4ed0ea25351c3b2639c930e Reviewed-on: https://code.wireshark.org/review/14667 Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2016-03-17Associate dissector tables and heuristic subdissector lists with a protocol.Michael Mann1-1/+1
This will make it easier to determine protocol dependencies. Some LLC OUI dissector tables didn't have an associated protocol, so they were left without one (-1 used) Change-Id: I6339f16476510ef3f393d6fb5d8946419bfb4b7d Reviewed-on: https://code.wireshark.org/review/14446 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-09new_register_dissector -> register_dissector for dissector directory.Michael Mann1-2/+2
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-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-11-13register_dissector -> new_register_dissectorMichael Mann1-10/+12
Picking off "easy" dissectors that only have one or two exit points at most. Change-Id: I3d5e576b796556ef070bb36d8b55da0b175dcba8 Reviewed-on: https://code.wireshark.org/review/11805 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-04Don't allow multiple registrations of a protocol in dissector tables.Michael Mann1-1/+1
The target here is the Decode As dialog where protocols have multiple registrations into a dissector table and that shows up as multiple entries in the Decode As dialog list with the same name so users are unsure which "dissector" they are choosing. The "default" behavior (done in this commit) is to not allow duplicates for a dissector table, whether its part of Decode As or not. It's just ENFORCED for Decode As. Bug: 3949 Change-Id: Ibe14fa61aaeca0881f9cc39b78799e314b5e8127 Reviewed-on: https://code.wireshark.org/review/11405 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-01ANSI A: fix dissection of numerous fields broken in g7298a31Pascal Quantin1-32/+22
Change-Id: I09898cfc1aedc4b8067c6d12c94effc51a5ebbc0 Reviewed-on: https://code.wireshark.org/review/10345 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-09-01Eliminate proto_tree_add_text from ANSI dissectors.Michael Mann1-112/+36
Change-Id: I22dccb2f2d71897334e11632f4060ccfbf4794ad Reviewed-on: https://code.wireshark.org/review/10334 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-16Conversion of random proto_tree_add_text calls.Michael Mann1-52/+16
Change-Id: I6505ce34de84bfe46d5bc7b4d6a3c6044f3fb4b5 Reviewed-on: https://code.wireshark.org/review/10041 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-05-29ANSI IS-637 A: fix byte highlighting of destination address when using ASCII ↵Pascal Quantin1-3/+3
encoding Change-Id: I11d5de26bd73bada742e808f582e0dd746032aa2 Reviewed-on: https://code.wireshark.org/review/8684 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-05-27ANSI IS-637 A: dump bytes when SMS encoding format is set to octetPascal Quantin1-1/+7
Change-Id: I3d8a72a9549d170e0b1d54ad930da8c9dd510134 Reviewed-on: https://code.wireshark.org/review/8663 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-03-30ANSI IS-637 A: add dissection of Multiple Encoding User Data and Service ↵Pascal Quantin1-62/+350
Category Program Data Bug: 11086 Change-Id: I36096d35038bc71191040514a38dcdf9e1373f31 Reviewed-on: https://code.wireshark.org/review/7840 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-02-26ANSI IS-637 A: ensure that num_fields is not null before calling text_decoderPascal Quantin1-4/+8
Bug: 11014 Change-Id: Id2c7913d96743424380bd75c4005ec747ee7dd50 Reviewed-on: https://code.wireshark.org/review/7412 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-01-28ANSI IS-637-A: prevent an out of bounds accessPascal Quantin1-2/+2
Bug: 10897 Change-Id: I8316ba40ec00b612e4edd490e3cd36e7277912a9 Reviewed-on: https://code.wireshark.org/review/6824 Reviewed-by: Anders Broman <a.broman58@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.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-01Eliminate proto_tree_add_text from GSM_SMS dissector.Michael Mann1-1/+1
Change-Id: Ibe189239735da2ebb1b0ce61a5af249975b38be3 Reviewed-on: https://code.wireshark.org/review/4402 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-09-26ANSI IS-637 A: remove a useless variablePascal Quantin1-5/+2
Change-Id: I50077329d6e78ca39312e72eb04b7a5db85b977b Reviewed-on: https://code.wireshark.org/review/4301 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-09-25ANSI IS-637 A: get rid of tvb_length() deprecated APIPascal Quantin1-2/+2
Change-Id: I40de03605c051024c604679a1e141afa841a77e9 Reviewed-on: https://code.wireshark.org/review/4287 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-09-25ANSI IS-637-A: fix dissection of fragmented Unicode SMSPascal Quantin1-1/+15
The computation of the number of characters available was wrong when the User Data Header is present Change-Id: I2809c1460316530654a997b26cfc33c60a32fd6f Reviewed-on: https://code.wireshark.org/review/4284 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-22convert to proto_tree_add_subtree[_format]Michael Mann1-16/+7
Change-Id: Ib60ca75b7da8cfa21cfe2999c9b9448a02c332df Reviewed-on: https://code.wireshark.org/review/2560 Tested-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-2/+2
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-2/+2
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-07tvb_new_subset -> tvb_new_subset_length when length parameters are equal.Michael Mann1-1/+1
tvb_new_subset -> tvb_new_subset_remaining it appears that's what the intention is. Change-Id: I2334bbf3f10475b3c22391392fc8b6864454de2d Reviewed-on: https://code.wireshark.org/review/1999 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-04-13Add ENC_ASCII_7BITS encodingPascal Quantin1-112/+7
Change-Id: I01ec87ff4181afb5b2de487fd5f5200f8d62f17d Reviewed-on: https://code.wireshark.org/review/1088 Reviewed-by: Pascal Quantin <pascal.quantin@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>
2014-02-26Use proto_tree_add_item() for most string encodings.Guy Harris1-15/+15
We support ISO 8859-1 and 8859-8, so use proto_tree_add_item() for them. That leaves only EUC-KR. Change-Id: Ie61f69af43be03e5abeb84b95601a407900fb79b Reviewed-on: https://code.wireshark.org/review/403 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-01-22Use tvb_get_string_enc() rather than tvb_get_string(); according toGuy Harris1-1/+1
TIA/EIA-637-A, call-back numbers are either BCD or ASCII. svn path=/trunk/; revision=54917
2014-01-14Fix dissection of 3GPP2 SMS encoded in UCS2Pascal Quantin1-0/+2
svn path=/trunk/; revision=54787
2014-01-13Fix Dead Store (Dead assignement/Dead increment) warning found by ClangAlexis La Goutte1-2/+0
svn path=/trunk/; revision=54731
2014-01-09From Michael Lum via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9472 :Pascal Quantin1-1071/+2026
ANSI IS-637 SMS enhancements for CMAS (TIA-1149) and header dissection svn path=/trunk/; revision=54684
2014-01-01Add proto_tree_add_ts_23_038_7bits_item() / tvb_get_ts_23_038_7bits_string() ↵Pascal Quantin1-7/+1
functions and update dissectors to use it. Remove gsm_sms_char_7bit_unpack() / gsm_sms_chars_to_utf8() functions. Update documentation a bit. svn path=/trunk/; revision=54534
2013-12-22We support ENC_UCS_2, so use that in proto_tree_add_item() andGuy Harris1-48/+6
tvb_get_string_enc() rather than using iconv to convert it to UTF-8. svn path=/trunk/; revision=54350
2013-12-12From Michael Lum via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9554 :Pascal Quantin1-7/+10
GSM SMS: remove some globals and expose some UDH fields through dis_field_udh() svn path=/trunk/; revision=53997
2013-12-08Use STR_UNICODE display instead of proto_tree_add_unicode_string() in the ↵Pascal Quantin1-15/+15
remaining dissectors svn path=/trunk/; revision=53867
2013-11-28Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9478 :Pascal Quantin1-7/+7
GSM SMS User Data header fill bits are wrong when using a 7 bits ASCII / IA5 encoding svn path=/trunk/; revision=53631
2013-11-14Create/use value_string_ext to reference certain value-string-arrays.Bill Meier1-7/+23
Define a char array as const. Remove an unneeded initializer. Add editor modelines. Do some minor whitespace changes. svn path=/trunk/; revision=53319
2013-11-09Include <epan/to_str.h> only when needed.Jakub Zawadzki1-0/+1
svn path=/trunk/; revision=53189
2013-11-073GPP2 SMS: add support for KSC5601 (Korean) character setPascal Quantin1-0/+37
svn path=/trunk/; revision=53139
2013-10-27Remove use of pinfo->private_data and just pass the data around through ↵Michael Mann1-64/+54
function parameters Remove g_pinfo from packet-ansi_637.c and add packet_info* as a function parameter while we're at it. svn path=/trunk/; revision=52883
2013-10-22Remove instances of unused 'data_handle' (and of one other handle).Bill Meier1-3/+0
svn path=/trunk/; revision=52767
2013-10-13Minor whitespace, formatting & etc changes.Bill Meier1-1228/+1227
svn path=/trunk/; revision=52588
2013-08-19Change some dissectors to use pinfo memory pool instead of malloc if it can ↵Pascal Quantin1-14/+8
trigger an exception between between buffer allocation and tvb_set_free_cb call svn path=/trunk/; revision=51427
2013-08-19Do not use ephemeral memory when adding a new data sourcePascal Quantin1-6/+12
svn path=/trunk/; revision=51423
2013-08-05Keep result of [new_]register_dissector in some dissectors. [2 of x]Jakub Zawadzki1-6/+5
(don't create new dissector handle if we can use already existing one) svn path=/trunk/; revision=51159