aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-per.c
AgeCommit message (Collapse)AuthorFilesLines
2016-01-14Rename new_register_per_oid_dissector to register_per_oid_dissector.Guy Harris1-2/+2
There's no "old" register_per_oid_dissector, so the new_ is redundant. Change-Id: Iaf85a0bec120c5171d68ca4b12b6724a77df8305 Reviewed-on: https://code.wireshark.org/review/13274 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-14Rename new_dissector_t to dissector_t.Guy Harris1-5/+5
There are no longer any "old" dissectors, so "new_" is redundant. Change-Id: I5fee51228c2a8562166f5991e1f30c2c697e45c8 Reviewed-on: https://code.wireshark.org/review/13273 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-08Fix a lot of typos and misspellingsmoshekaplan1-2/+2
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-11-24Remove support for "old style" dissectors in PER API.Michael Mann1-40/+1
Most of it wasn't used in current Wireshark source anyway. Change-Id: If395e4e940adc76a2701d226ba4f7c9b17cb795d Reviewed-on: https://code.wireshark.org/review/12108 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-11-04Don't include "file.h" if you don't need it.Guy Harris1-0/+1
It ends up dragging in libwireshark headers, which programs not linking with libwireshark shouldn't do. In particular, including <epan/address.h> causes some functions that refer to libwireshark functions to be defined if the compiler doesn't handle "static inline" the way GCC does, and you end up requiring libwireshark even though you shouldn't require it. Move plurality() to wsutil/str_util.h, so that non-libwireshark code can get it without include epan/packet.h. Fix includes as necessary. Change-Id: Ie4819719da4c2b349f61445112aa419e99b977d3 Reviewed-on: https://code.wireshark.org/review/11545 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-10-24PER: fix ASAN runtime error: left shift of negative value -1Pascal Quantin1-1/+1
Change-Id: Ibab619ee96b0389df87021156c4bf35a3d52063c Ping-Bug: 9887 Reviewed-on: https://code.wireshark.org/review/11240 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-02PER: followup of g59453fbPascal Quantin1-15/+8
Change-Id: I45c02a249444e5f17d99eeb0ca8dea6f7a012262 Reviewed-on: https://code.wireshark.org/review/10356 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: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-09-02Eliminate proto_tree_add_text from packet-per.cMichael Mann1-9/+56
Change-Id: I67f572129821fb00e4478a30bfd4a52287b8b1a1 Reviewed-on: https://code.wireshark.org/review/10350 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-06-08PER: fix indent (use tabs)Alexis La Goutte1-33/+32
Change-Id: I123960f475550b5e3cab9e6eb7eaa6d896fae557 Reviewed-on: https://code.wireshark.org/review/8815 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-07PER: fix V593 warning reported by PVS-StudioPascal Quantin1-1/+1
Consider reviewing the expression of the 'A = B == C' kind. The expression is calculated as following: 'A = (B == C)'. Change-Id: I162a2d081a70cb39b326d3aa2dc4108f49962169 Reviewed-on: https://code.wireshark.org/review/8821 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-05-09Fix some more constants to be unsigned.Guy Harris1-6/+6
Change-Id: I714078683cff517c79a15abf29e1ae4a9a60271d Reviewed-on: https://code.wireshark.org/review/8365 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-12PER: fix dissection of known-multiplier character strings with ub less or ↵Pascal Quantin1-16/+16
equal to 2^b-1 See ITU-T X.691 chapter 30.5 for details Change-Id: I6ac31494997349c6bff19b196e72859a31634af4 Ping-Bug: 11039 Reviewed-on: https://code.wireshark.org/review/7633 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-01-19Convert OID APIs to use wmem.Michael Mann1-2/+2
There are a few oid functions that are only called in oids_test.c. I'll presume the APIs are used in proprietary dissectors rather than just remove them. Change-Id: I4595e00f93bf9ab8cf2493fe0432b91960f55a3f Reviewed-on: https://code.wireshark.org/review/6592 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Guy Harris <guy@alum.mit.edu> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-02Replace proto_tree_add_text in dissector header files where it was used in a ↵Michael Mann1-14/+24
macro that should be expert info. Change-Id: I045368a0a91586231fc4b1e2700c2275088b76af Reviewed-on: https://code.wireshark.org/review/6244 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-23Deleting unnecessary #includes from dissectors.Martin Mathieson1-3/+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-3/+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-21Add OID dissector table for PER based dissection.AndersBroman1-2/+50
Change-Id: Iaf789017e997eddf7d6dc596eb40fdef413bfd68 Reviewed-on: https://code.wireshark.org/review/4778 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-10-16Make sort_alphabet() not fail too badly with characters in [128,255].Guy Harris1-4/+8
Treat all values in the alphabet as unsigned. Change-Id: I4476c75352f32673a9cd131ea233465f3376fa25 Reviewed-on: https://code.wireshark.org/review/4747 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-06Adjust indentation to match editor modelines; Do other minor whitespace changes.Bill Meier1-291/+295
Change-Id: Ic020b2c92db5d14a2be9dc4d35aef4514b8b0353 Reviewed-on: https://code.wireshark.org/review/4502 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-16Fix spelling: cant-->can't, wont-->won't, etcBill Meier1-1/+1
Change-Id: I4497f1b8b6eab0e576d9dd31b732965f9a6679c6 Reviewed-on: https://code.wireshark.org/review/4124 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-07-05convert to proto_tree_add_subtree[_format]Michael Mann1-2/+1
Change-Id: I8df48b25de784a48a25f0e48aac1e1545ed92c35 Reviewed-on: https://code.wireshark.org/review/2865 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-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-21Don't use 'L' as a constant modifier.Bill Meier1-1/+1
svn path=/trunk/; revision=54343
2013-12-19Use proto_tree_add_item() or tvb_get_string_enc() instead ofGuy Harris1-4/+1
tvb_get_unicode_string(). If there's an indication that the encoding is UCS-2, use that, otherwise use UTF-16. (For example, "BMP" stands for "Basic Multilingual Plane", which is the part of Unicode that can be encoded in 16 bits, hence UCS-2.) In the description of the "Use Heuristics for UDP" preference for the XML dissector, note that it's not just trying to recognize XML in UCS-2, it's trying to recognize XML in *big-endian* UCS-2. svn path=/trunk/; revision=54245
2013-12-17Make local functions static. Include *.h when needed.Anders Broman1-2/+2
svn path=/trunk/; revision=54201
2013-12-14Fix [-Wmissing-prototypes]Jakub Zawadzki1-5/+1
svn path=/trunk/; revision=54095
2013-11-17Fix the number of highlighted bytes in case of unaligned PER constrained integerPascal Quantin1-1/+1
svn path=/trunk/; revision=53400
2013-11-17Add a way to retrieve a PER variable bit string lengthPascal Quantin1-4/+14
svn path=/trunk/; revision=53382
2013-11-10Add missing includes in order to remove exceptions.h from proto.h (next commit).Jakub Zawadzki1-0/+1
svn path=/trunk/; revision=53230
2013-10-13whitespace fixes; mostly: remove trailing blanksBill Meier1-1/+1
svn path=/trunk/; revision=52591
2013-10-07Update function name in debug infoPascal Quantin1-1/+1
svn path=/trunk/; revision=52434
2013-10-06Add support for relative OID to PER dissectorPascal Quantin1-4/+29
svn path=/trunk/; revision=52423
2013-09-22emem -> wmem conversion:Pascal Quantin1-1/+1
- ep_tvb_get_bits() -> wmem_packet_tvb_get_bits() - tvb_g_memdup()/ep_tvb_memdup() -> tvb_memdup() - tvb_fake_unicode()/tvb_get_ephemeral_faked_unicode() -> tvb_get_faked_unicode() - tvb_get_g_string()/tvb_get_ephemeral_string()/tvb_get_seasonal_string() -> tvb_get_string() - tvb_get_g_unicode_string()/tvb_get_ephemeral_unicode_string() -> tvb_get_unicode_string() - tvb_get_ephemeral_string_enc() -> tvb_get_string_enc() - update docs accordingly svn path=/trunk/; revision=52172
2013-09-09expert_add_info_format_text -> expert_add_info_formatMichael Mann1-6/+6
svn path=/trunk/; revision=51852
2013-09-08Slightly different fix for ↵Pascal Quantin1-10/+10
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9117 : Check that tvb returned by dissect_per_bit_string is not null before trying to use it svn path=/trunk/; revision=51846
2013-09-07Callers of tvb_per_bit_string expect that the returned value_tvb is non-NULL.Evan Huus1-0/+18
Ensure that is the case even in certain peculiar error conditions, by filling it with a 0-length subset TVB. Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9117 Also add modelines. svn path=/trunk/; revision=51821
2013-08-19Change some dissectors to use pinfo memory pool instead of malloc if it can ↵Pascal Quantin1-9/+5
trigger an exception between between buffer allocation and tvb_set_free_cb call svn path=/trunk/; revision=51427
2013-08-16Trivial. Fix warning: Value stored to 'str_index' is never read.Chris Maynard1-2/+1
svn path=/trunk/; revision=51392
2013-07-28Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8841 :Pascal Quantin1-3/+37
Fix PER normally small non-negative whole number dissection when it is greater than or equal to 64 svn path=/trunk/; revision=50969
2013-07-03expert_add_info_format_text + proto_tree_add_text = ↵Michael Mann1-4/+1
proto_tree_add_expert_format, where applicable. svn path=/trunk/; revision=50377
2013-07-03expert_add_info + proto_tree_add_text = proto_tree_add_expert, where applicableMichael Mann1-2/+3
svn path=/trunk/; revision=50337
2013-06-17Ensure that the length parameter to dissect_per_length_determinant isEvan Huus1-0/+3
initialized even in cases where we error or otherwise fail to dissect. Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8722 Thanks to Pascal for his help digging through this one. svn path=/trunk/; revision=49985
2013-06-10Batch of filterable expert infos.Michael Mann1-10/+28
svn path=/trunk/; revision=49868
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=48425
2013-03-13actx is used, remove _U_Martin Kaiser1-1/+1
svn path=/trunk/; revision=48284