Commit Graph

135 Commits

Author SHA1 Message Date
Peter Wu 6d7b29592a Allow use of variadic macros
Remove variadic macros restriction (c99, c++11 feature) from
README.developer. GCC, Clang, MSVC 2005 all support it.

Enable -Wno-variadic-macros in configure.ac and CMakeLists.txt when
-Wpedantic is enabled (which would enable -Wvariadic-macros).

For all files matching 'define\s*\w+[0-9]\(', replace "FOO[0-9]" by
"FOO" and adjust the macro definition accordingly. The nbap dissector
was regenerated after adjusting its template and .cnf file. The
generated code is the same since all files disabled the debug macros.

Discussed at:
https://www.wireshark.org/lists/wireshark-dev/201209/msg00142.html
https://www.wireshark.org/lists/wireshark-dev/201510/msg00012.html

Change-Id: I3b2e22487db817cbbaac774a592669a4f44314b2
Reviewed-on: https://code.wireshark.org/review/10781
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-10-05 07:57:14 +00:00
Peter Wu 3243b6f964 asn1: split off cleanup routines
General approach:

 1. Split allocation (e.g. g_hash_table_new) from deallocation
    (g_hash_table_destroy) into functions named "init" and "cleanup".
 2. Remove guards that test whether the hash tables are set as
    init is always called before cleanup.
 3. Remove setting hash tables to NULL after destruction.
 4. Copy register_init_routine function call and change init to cleanup.
 5. Add cleanup function that calls reassembly_table_destroy if there
    is a reassembly_table_init function.

Some templates were modified as follows:

 - snmp: split renew into init+cleanup, but keep renew for the uat_new
   callback.
 - ldap,ros: Rename init to cleanup as there was no initialization.
 - camel: remove init function from header, make it static. Remove debug
   print.
 - tcap: remove unused ssn_range assignment.

Files in epan/ were regenerated using cmake && make asn1

Change-Id: Idac16ebf0ec304e0c8becaab5d32904e56eb69b9
Reviewed-on: https://code.wireshark.org/review/9136
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-04 00:17:14 +00:00
AndersBroman c2a1d8feed Replace deprecated API tvb_length -> tvb_reported_length
Change-Id: I9c8bf6beec47afb901e492723b335a28a24f455e
Reviewed-on: https://code.wireshark.org/review/8004
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-04-09 12:38:04 +00:00
Michael Mann ada1eec702 SE_COPY_ADDRESS -> WMEM_COPY_ADDRESS
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>
2015-01-16 15:25:18 +00:00
Ilya Gavrilov b6f70ed3f8 NBAP: fix ddi missed for non first macdflow_id in E-DCH channel
Change-Id: Ib93cac8a4b186114f50ef4a26bdace2d72219644
Reviewed-on: https://code.wireshark.org/review/6022
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-25 00:28:50 +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
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
Bill Meier a379ac74d2 Fix spelling: cant-->can't, wont-->won't, etc
Change-Id: Ia6c3e7a25615bf8e052c3bacf096d76df775c9c2
Reviewed-on: https://code.wireshark.org/review/4126
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-16 15:31:58 +00:00
Bill Meier 93cc6f004f Fix some spelling & grammar.
Change-Id: Iedeaa411caa0823922dd79c27897a2349d4e6907
Reviewed-on: https://code.wireshark.org/review/4054
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-09 19:43:27 +00:00
Evan Huus ce99d8a205 Fix leak in nbap init function
Change-Id: I9a70d4da936ad5fd847fc1ba0b29b7220030b977
Reviewed-on: https://code.wireshark.org/review/2558
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-22 20:23:52 +00:00
Evan Huus 37b903d7ab batch of tvb-length conversions
Change-Id: I76ca4d075756e3ac691070e0c05344a410ea2498
Reviewed-on: https://code.wireshark.org/review/2507
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-21 04:01:52 +00:00
Guy Harris ce3d2ff3de Rename dissector_add_handle() to dissector_add_for_decode_as().
Hopefully that name makes it clear what the routiner's purpose is, and
will encourage people to use it rather than using dissector_add_uint()
with a bogus integer value.

Change-Id: Ic5be456d0ad40b176aab01712ab7b13aed5de2a8
Reviewed-on: https://code.wireshark.org/review/2483
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-20 16:43:56 +00:00
Michael Mann 14824e6adf Revert "Fixup: tvb_* -> tvb_captured"
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html

This reverts commit 246fe2ca4c.

Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f
Reviewed-on: https://code.wireshark.org/review/2430
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19 18:25:59 +00:00
Dario Lombardo 246fe2ca4c Fixup: tvb_* -> tvb_captured
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f
Reviewed-on: https://code.wireshark.org/review/2377
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18 14:14:58 +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
Anders Broman 5236d89e26 Dissector assert in packet-nbap.c. num_items isn't reset before calling a sequence filling the array.
Closed-bug #9726

Change-Id: Ie4bc538b0788eb32895c9eedf8e0277c6d9ed1b2
Reviewed-on: https://code.wireshark.org/review/120
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Tested-by: Anders Broman <a.broman58@gmail.com>
2014-02-05 16:03:54 +00:00
Anders Broman 0d46cdae53 - Forward declaration of register functions.
svn path=/trunk/; revision=53876
2013-12-09 06:20:42 +00:00
Evan Huus 1db1b8e2bb Convert ASN1 dissectors from ep_address_to_str to address_to_str. Clean up a bit
of ansi_tcap code while in the neighbourhood.

svn path=/trunk/; revision=53530
2013-11-23 22:37:33 +00:00
Pascal Quantin ea45be32c5 Add a way to retrieve a PER variable bit string length
svn path=/trunk/; revision=53382
2013-11-17 13:31:32 +00:00
Michael Mann 02a8391535 Require dissector_try_string to pass a data parameter to its subdissectors. There weren't that many calls, so might as well modify the function than create a need for dissector_try_string_new.
svn path=/trunk/; revision=53049
2013-11-02 15:52:25 +00:00
Anders Broman 95c5f81c83 DCH-ID can be 255
svn path=/trunk/; revision=52154
2013-09-20 14:19:31 +00:00
Jörg Mayer 65ff43fada Finish asn1 emem -> wmem conversion.
Left are snmp and those functions that don't have wmem equivalents.

svn path=/trunk/; revision=52060
2013-09-15 14:37:46 +00:00
Martin Kaiser 2f072ac53c add a range check for dch_id
this should fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9005

svn path=/trunk/; revision=51195
2013-08-07 20:18:11 +00:00
Jakub Zawadzki 518ac53e2c Make some global variables static
svn path=/trunk/; revision=51163
2013-08-05 20:15:06 +00:00
Chris Maynard 997c6c7d8e Fix Coverity CID 712348 (Unused pointer value).
svn path=/trunk/; revision=50288
2013-07-01 06:15:37 +00:00
Pascal Quantin 7a0245d747 Regenerate dissector
svn path=/trunk/; revision=50031
2013-06-19 06:23:51 +00:00
Jörg Mayer d9b5210c61 Fix CID 712341: Dereference null return value (NULL_RETURNS)
Well, not really. Just catch that case and error out.

svn path=/trunk/; revision=50029
2013-06-19 03:23:31 +00:00
Anders Broman 5e408534c8 cc1: warnings being treated as errors
../../asn1/nbap/packet-nbap-template.c: In function 'add_hsdsch_bind':
../../asn1/nbap/packet-nbap-template.c:349: warning: unused parameter 'tree'

svn path=/trunk/; revision=49708
2013-06-03 04:25:31 +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
Pascal Quantin 0ee4d0a00a Postfix FT_NONE fields with "_element" string to reduce number of incompatible filters in ASN.1 dissectors
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2402

svn path=/trunk/; revision=49599
2013-05-27 20:26:49 +00:00
Anders Broman a68080a1c6 Don't access nbap_dch_chnl_info if the index is > maxNrOfDCHs
svn path=/trunk/; revision=49418
2013-05-19 15:21:33 +00:00
Pascal Quantin a37c044203 Update the ASN.1 based dissectors following the changes done in r48812
svn path=/trunk/; revision=48820
2013-04-11 18:14:53 +00:00
Anders Broman 84241f46ad From beroset:
remove C++ incompatibilities 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48399
2013-03-18 20:44:36 +00:00
Bill Meier 96a24cc79f Fix spelling/typos found using a list of commonly misspelled words.
The misspellings were mostly in comments but some were
in text strings visible to the user.


svn path=/trunk/; revision=47899
2013-02-26 04:42:26 +00:00
Jeff Morriss 09221f45e4 When copying addresses, also copy the (new) hf field.
Use SET_ADDRESS in some dissectors that weren't using it (so that the hf field
is correctly initialized).

Introduce a COPY_ADDRESS_SHALLOW (which copies an address without copying the
contents of the data field).

svn path=/trunk/; revision=46602
2012-12-18 23:28:38 +00:00
Anders Broman be29436715 If we have an com_context_id entry reuse that.
svn path=/trunk/; revision=46036
2012-11-16 09:41:26 +00:00
Anders Broman 02287c05d6 Dissable code causing a crash. Add debug printouts and add a few more visited checks.
svn path=/trunk/; revision=46029
2012-11-14 16:46:57 +00:00
Jakub Zawadzki 7a9d27c33f Regenerate asn.1 dissectors.
svn path=/trunk/; revision=45110
2012-09-24 19:38:46 +00:00
Jeff Morriss 2552c750e5 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45017
2012-09-20 02:03:38 +00:00
Jakub Zawadzki a406bb1a50 Add data parameter to dissector_try_uint_new
svn path=/trunk/; revision=44874
2012-09-11 09:06:48 +00:00
Jakub Zawadzki 9d6e413be7 Regenerate all asn.1 dissectors.
svn path=/trunk/; revision=44861
2012-09-10 21:42:36 +00:00
Jakub Zawadzki 0176a135db Propage changes done in generated dissectors to asn1/
svn path=/trunk/; revision=44845
2012-09-10 15:24:00 +00:00
Pascal Quantin f464eb4b58 Fix missing dissection of HSDSCH-Paging-System-InformationFDD (bug introduced in r44037) and HSDSCH-MACdPDUSizeFormat (bug introduced in r44423).
While we are at it, fix a few typo errors.

svn path=/trunk/; revision=44434
2012-08-10 18:41:40 +00:00
Anders Broman 3cf2df1ef5 Try to make the buildbot happy.
svn path=/trunk/; revision=44425
2012-08-10 15:59:35 +00:00
Anders Broman 0e68cac192 From Jacob Nordgren and Rishie Sharma:
RLC: changed so reassembly fail flag is set per channel instead of globally.
RLC: added reset channel function
Added support for reconfigurin HSDSCH flows, and E-DCH flows (just needs to figure out when it should become active for 'overloaded' ports), also changed slightly how ehs headers are configured in nbap.
Removed extra (debugging)  port in nbap

This is the last patch set for a while.

svn path=/trunk/; revision=44423
2012-08-10 15:22:50 +00:00
Anders Broman a1218c94c9 From Jacob Nordgren and Rishie Sharma:
- FP: added header CRC validation, added crc11.c and crc11.h in wsutil/ for EDCH 11 bit CRC, fixed bug in RRC,
And also smaller bugfixes in umts_fp and rrc.

svn path=/trunk/; revision=44349
2012-08-08 17:24:14 +00:00
Anders Broman 704e2f524e From Jacob Nordgren and Rishie Sharma:
NBAP: fixed segfault, FP: aesthetic fix, RLC: added channel info to GUI, MAC-is: fixed case with reassembly when a middle segment arrives 

 MAC, RLC, added preferences for LI-size and TSN-size

svn path=/trunk/; revision=44205
2012-08-02 14:03:17 +00:00
Anders Broman ad95fa259b From Jacob Nordgren and Rishie Sharma:
NBAP: added preferences to change logical channel id to mac content type mapping.

svn path=/trunk/; revision=44151
2012-07-31 06:56:13 +00:00
Anders Broman ad7c4a4bba From Jacob Nordgren and Rishie Sharma:
- Added basic support for tracking flows over reconfigured transport channels + mindor bugfixes 

- small fix in rrc, and some small cleanups

svn path=/trunk/; revision=44062
2012-07-27 08:10:31 +00:00
Anders Broman aed65b0c7b From Jacob Nordgren and Rishie Sharma:
- RRC now configures logical channels in HS-DSCH hs, and some HSDSCH common support added 
- RLC: modifed memory management, MAC: dch would set the incorrect logical channel for RLC

svn path=/trunk/; revision=44027
2012-07-26 08:15:20 +00:00