Commit Graph

200 Commits

Author SHA1 Message Date
Pascal Quantin 093aebf5ee H248: fix V712 warning reported by PVS-Studio
Be advised that compiler may delete this cycle or make it infinity. Use volatile variable(s) or synchronization primitives to avoid this.

Change-Id: I39104ec09f4c12994d62ed23e7a0cc00829b1255
Reviewed-on: https://code.wireshark.org/review/8818
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-06-07 18:59:49 +00:00
Pascal Quantin 3a79d04626 H.248: fix dissection of ServiceChangeReason for version 1
My understanding of RFC 3015 is that the encoding of this field was not different in version 1 compared to newer releases

Bug: 10879
Change-Id: Iaa81679388860c0df4adc673ca6e56aff6f4591c
Reviewed-on: https://code.wireshark.org/review/7195
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-18 18:53:09 +00:00
Michael Mann 64a7bac641 tvb_bytes_to_ep_str -> tvb_bytes_to_str
Change-Id: I79c613cbdd8dc939dd4c29ebc477fb6eefd5bfc4
Reviewed-on: https://code.wireshark.org/review/6371
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-01-07 18:16:23 +00:00
Bill Meier dd859eada4 asn1 generated dissectors: cleanup #include usage
Change-Id: I36b2731d67f9345d2fd0c23800bba7d2be94c387
Reviewed-on: https://code.wireshark.org/review/6008
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-23 05:39:00 +00:00
Alexis La Goutte f4ad915be4 H248: Fix Dereference of null pointer found by Clang analyzer
Also fix some indent issue

Change-Id: I262bdddd031fec6a0f91b7172bb2d67be3c33000
Reviewed-on: https://code.wireshark.org/review/5370
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-11-17 21:21:10 +00:00
AndersBroman 065d5c8417 Don't include ctype.h and replace isascii() with _ascii_isprint().
Remove deprecated APIs while at it.

Change-Id: I002ed4a696782caaeeb70a3e4ced4ae81f3d5372
Reviewed-on: https://code.wireshark.org/review/4983
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-10-29 15:35:53 +00:00
Stig Bjørlykke 4e1b5ea866 ASN1: Register PDU-dissectors as NEW
Change-Id: I1a317b19d8076588c9305dae6287bb80cc14da64
Reviewed-on: https://code.wireshark.org/review/4494
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Stig Bjørlykke <stig@bjorlykke.org>
2014-10-13 11:24:07 +00:00
Michael Mann cd02af56a1 Eliminate (almost all) proto_tree_add_text calls from ASN.1 dissectors.
This mostly involved adding expert info capabilities to many of the dissectors so that they could correctly flag error conditions.

Only remaining proto_tree_add_text calls are in H248.cnf, which has a convoluted way of using hf_ data to make its tree.

Change-Id: I6412150c2ec1977d7fa38f3f0ed416680bdfb141
Reviewed-on: https://code.wireshark.org/review/3500
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-08-09 01:57:08 +00:00
Guy Harris 791d93a259 Add more files to the distribution.
If it's checked into asn1 or a subdirectory thereof, put it into the
distribution.  (If it's not useful, why is it in Git?)

Change-Id: I4dac8a0d19a770db1513729cf71069a37f1d83fc
Reviewed-on: https://code.wireshark.org/review/3276
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-31 04:31:10 +00:00
Guy Harris 4d90d6e38d Add some files under asn1 to the distribution.
Include CMakeLists.txt files and the gnm subdirectory, along with the
top-level Makefile.inc and Makefile.preinc files.  Don't explicitly
include Custom.make, as automake does that automatically given that it's
included by asn1/Makefile.am.

Add some files to EXTRA_DIST lists.

Move some .asn files to EXTRA_DIST; they don't need to be in SRC_FILES,
as SRC_FILES always includes EXTRA_DIST, and they *do* need to be in
EXTRA_DIST so that they're in the distribution.

Change-Id: Id91df577260fa57028d40fe098be1d79c59398e6
Reviewed-on: https://code.wireshark.org/review/3273
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-30 23:42:55 +00:00
Evan Huus 980f5f6711 batch of tvb-length conversions
Change-Id: I5e40df8af6841e3dad71c41d7e43c7971611b15f
Reviewed-on: https://code.wireshark.org/review/2473
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-20 05:33:04 +00:00
Pascal Quantin d0ac937567 Revert "Update ASN.1 source files with the API changes done in g021e7af"
This reverts commit e308e7c4de.

Change-Id: I079616d63f643f79f1bc03ef5fdf724f36df4071
Reviewed-on: https://code.wireshark.org/review/2435
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-19 18:42:28 +00:00
Pascal Quantin e308e7c4de Update ASN.1 source files with the API changes done in g021e7af
Change-Id: I52ecfccbce423206242e3cf99401a8c9e1655d88
Reviewed-on: https://code.wireshark.org/review/2385
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-18 16:15:42 +00:00
Michael Mann 73217d9f3f tvb_new_subset -> tvb_new_subset_length when length parameters are equal.
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-06-07 15:41:07 +00:00
AndersBroman 09a9c86473 Add the possibillity to add a string to the termination id.
Change-Id: I3b48b28273a8c1a1558045d2a4ab5104160840de
Reviewed-on: https://code.wireshark.org/review/1510
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-05 15:51:18 +00:00
AndersBroman 9a977fc8d0 Add dissection of 3G Interface Type package and add some comments about
the usage of variables in the h248_package_t struct.

Change-Id: Ic5419ab5c20051e56963fe8ea1728d78f95538f0
Reviewed-on: https://code.wireshark.org/review/846
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-27 16:54:05 +00:00
Bill Meier 1dff4e309d Remove trailing whitespace from asn1 .cnf & template.[hc] files. Regenerate dissectors.
Change-Id: I0e779b2ac2f608356649c5bbfca438141070dea4
Reviewed-on: https://code.wireshark.org/review/412
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Tested-by: Bill Meier <wmeier@newsguy.com>
2014-02-26 19:38:21 +00:00
Alexis La Goutte 88c34ec6c8 Fix Called function pointer is null (null dereference) found by Clang
../../asn1/h248/packet-h248-template.c:1222:31: warning: Value stored to 'prop' is never read
        if (!prop->dissector) prop = &no_param;

Change-Id: I6d380fbb5fef9dc548385b0b470aea1cb3c34df1
Reviewed-on: https://code.wireshark.org/review/301
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-22 16:43:50 +00:00
Jeff Morriss 8c608e6e82 Remove $Id$ from the ASN.1 dissectors and regenerate them.
Change-Id: Ie476c6f82f318188b41ed922b92c6fec119ea954
Reviewed-on: https://code.wireshark.org/review/244
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
Tested-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-02-18 03:05:28 +00:00
Guy Harris 0a99ee25d5 Don't make claims of constness that can't be guaranteed in terms the C
compiler can verify.

svn path=/trunk/; revision=54792
2014-01-14 17:45:03 +00:00
Evan Huus a6415ece0a Rename a couple of to_str functions to have ep_ in the name. This makes it
obvious that the returned string is ephemeral, and opens up the original names
in the API for versions that take a wmem pool (and thus can work in any scope).

svn path=/trunk/; revision=54249
2013-12-19 15:49:09 +00:00
Anders Broman e6d09c1634 Make local functions static. Include *.h when needed.
svn path=/trunk/; revision=54201
2013-12-17 22:07:32 +00:00
Michael Mann 4945174ae6 Pass "wild_card" directly to dissector instead of using private_data. "h248term" dissector is not in Wireshark source, so third-party will need to update accordingly.
svn path=/trunk/; revision=53241
2013-11-10 21:33:45 +00:00
Jakub Zawadzki ae59b09443 Add missing includes in order to remove exceptions.h from proto.h (next commit).
svn path=/trunk/; revision=53230
2013-11-10 15:59:37 +00:00
Pascal Quantin a0c53ffaa1 emem -> wmem conversion:
- 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-22 15:50:55 +00:00
Anders Broman 96d29a5d50 Get rid of a duplicated filter name.
svn path=/trunk/; revision=51792
2013-09-05 20:55:59 +00:00
Evan Huus 7dbc052d78 More dissectors to wmem. There are no more dissectors using se_tree now, just a
few other places.

svn path=/trunk/; revision=51622
2013-09-01 01:00:11 +00:00
Michael Mann af134c29ca Convert proto_item_set_expert_flags into filterable items.
svn path=/trunk/; revision=51140
2013-08-04 19:59:01 +00:00
Michael Mann 3eafc74e2b Convert proto_item_set_expert_flags to "filterable" items in alcap dissector. Unfortunately it had a few tentacles, so they needed to be brought along for the ride.
svn path=/trunk/; revision=51136
2013-08-04 13:46:25 +00:00
Evan Huus 74e1b830a9 Use epan-scoped memory for h248 packages. Fixes another ~24KB of leaks.
svn path=/trunk/; revision=50414
2013-07-06 18:14:04 +00:00
Evan Huus 8b0f1addd9 Apparently one of our major global headers must include emem.h, because I just
found a bunch more asn1 dissectors using emem without ever directly including
the header. Convert those to wmem as well, which involves add a number of
#include directives since dissectors do *not* automatically pull in the wmem
headers.

svn path=/trunk/; revision=50066
2013-06-19 23:08:58 +00:00
Michael Mann 7fe5422c4b Convert ASN.1 dissectors to use filterable expert info.
NOTE: Kerberos ASN.1 template was updated, but not generated to source.

svn path=/trunk/; revision=49707
2013-06-03 03:42:36 +00:00
Jörg Mayer 5fa9c90ffd Some more
svn path=/trunk/; revision=49203
2013-05-07 16:26:35 +00:00
Jörg Mayer 243e9c0ba5 Just whitespace changes
svn path=/trunk/; revision=49167
2013-05-05 08:49:18 +00:00
Jörg Mayer 8faa262e90 Stub cmake support for generating the asn1 dissectors.
It doesn't do anything yet, it is just to make svn status
readable again.

svn path=/trunk/; revision=49007
2013-04-23 23:05:33 +00:00
Evan Huus 37600a157b Rename value string (and similar) functions to use a consistent pattern. This
was done using textual search+replace, not anything syntax-aware, so presumably
it got most comments as well (except where there were typos).

Use a consistent coding style, and make proper use of the WS_DLL_* defines.

Group the functions appropriately in the header.

I ended up getting rid of most of the explanatory comments since many of them
duplicated what was in the value_string.c file (and were out of sync with the
recent updates I made to those in r48633). Presumably most of the comments
should be in the .h file not the .c file, but there's enough churn ahead that
it's not worth fixing yet.

Part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8467

svn path=/trunk/; revision=48634
2013-03-29 00:26:23 +00:00
Anders Broman 7c56677cf9 From beroset:
remove C++ incompatibilities 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48429
2013-03-19 21:22:31 +00:00
Balint Reczey 1ebdb2e521 Export libwireshark symbols using WS_DLL_PUBLIC define
Also remove old WS_VAR_IMPORT define and related Makefile magic
everywhere in the project.

svn path=/trunk/; revision=47992
2013-03-01 23:53:11 +00:00
Bill Meier d449c31d1d its ==> it's & it's ==> its as needed.
svn path=/trunk/; revision=47892
2013-02-26 01:22:18 +00:00
Guy Harris 021069a56b Clean up white space - get rid of 4-space tabs.
Reformat the hf[] array to be consistent, and get rid of some bogus
blurbs (probably copy-and-pasteos).

svn path=/trunk/; revision=47759
2013-02-20 01:37:08 +00:00
Bill Meier 8ef31f222e Hack: disguise '/*' in text strings to prevent checkAPIs & etc seeing 'start of comment' within a text string.
svn path=/trunk/; revision=47446
2013-02-02 14:20:15 +00:00
Evan Huus 518eee193b Use epan-scoped memory to clean up another 1Kb+ of valgrind
sorta-false-positive leaks.

svn path=/trunk/; revision=47170
2013-01-19 20:14:42 +00:00
Pascal Quantin 53edadd49b From John Batty via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8087 :
H.248 MEGACO PkgName property is poorly formatted

svn path=/trunk/; revision=46526
2012-12-13 14:24:44 +00:00
Jeff Morriss 3551a86c36 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45015
2012-09-20 01:29:52 +00:00
Anders Broman 6dfa10bc57 Revert part of revision 43107 which broke sub dissection of
Signal and events as a new tvb wasn't created. 
|BASE_EXT_STRING also removed.

svn path=/trunk/; revision=43661
2012-07-11 14:40:35 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Anders Broman 189ea54f0b from Alex Lindberg:
Update to packet-h248.c and associated h248 dissecorts.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7332

svn path=/trunk/; revision=43107
2012-06-05 10:54:21 +00:00
Guy Harris c51cadd00e Get rid of remaining Booleans-as-encoding-arguments in
proto_tree_add_item() calls.

svn path=/trunk/; revision=42488
2012-05-07 22:46:14 +00:00
Anders Broman fd19aa7c89 H.248 Annex E dissector does not properly dissect event parameters
(Update the h.248 dissector's package registration to support v1 packets.)

Applying part of the patch from Alex Lindberg in bug https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6915 by hand.
Fixes bug
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4842

svn path=/trunk/; revision=41526
2012-03-13 13:26:13 +00:00
Jeff Morriss 183f0e934c Create a list of MTP Service Indicator macros and use them.
svn path=/trunk/; revision=40828
2012-02-03 18:26:37 +00:00