Commit Graph

75 Commits

Author SHA1 Message Date
Guy Harris ab784d60b3 Rename new_dissector_t to dissector_t.
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-14 01:03:10 +00:00
Michael Mann a33209d69e Convert ASN.1 dissectors to remove "new" from "new-style" dissector function names that were generated from asn2wrs.py
This includes:
1. new_create_dissector_handle -> create_dissector_handle
2. new_register_dissector -> register_dissector
3. new_register_ber_oid_dissector -> register_ber_oid_dissector
4. new_register_ber_syntax_dissector -> register_ber_syntax_dissector

Also remove PDU_NEW, SYNTAX_NEW and REGISTER_NEW as there is no need for the distinction anymore.

Change-Id: I82c7de7c8ffeeab3259d1b55bb4afc5f6a1e0329
Reviewed-on: https://code.wireshark.org/review/12491
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-10 17:06:02 +00:00
Michael Mann 0cd1a85064 Require BER dissector (OID) registration to be "new style".
Both old and new style API existed, just remove the "old" one.

Change-Id: If725e778a0ecad5a431d634ed5c4856b4a281013
Reviewed-on: https://code.wireshark.org/review/12107
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-25 19:21:14 +00:00
Michael Mann d1d5bf121e Replace proto_tree_add_text in dissector header files where it was used in a 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>
2015-01-02 22:11:34 +00:00
Maarten Bezemer 08c0247b78 Support dissecting REAL (BER) data values
Both exponent and 'integer N' values are limited:
 * max exponent is 3 octets/24-bits
 * max integer N is 8 octets/64-bit

Tested with zero value/length, integers, doubles, positive and negative numbers all using the Basic Encoding Rules (BER)

Change-Id: If92e1b3e209c42909b8cb76e6f50b8e6cd1da0da
Reviewed-on: https://code.wireshark.org/review/5527
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: Anders Broman <a.broman58@gmail.com>
2014-12-03 09:02:05 +00:00
Stig Bjørlykke d89cc1cf9a ASN1: Added support for using #.REGISTER_NEW
This will register BER PDU-dissectors as "new".
Return number of bytes dissected from dissector_try_* functions.
Return number of bytes dissected in DissectorTable:try()

This will make it possible to get dissected length when using
dissector_try_*() and dissected ASN.1 length in Lua when using
DissectorTable:try() (as we already have for Dissector:call).

Change-Id: Iee17a68dc214fa0fb50b25fc927026ad7c1cbce4
Reviewed-on: https://code.wireshark.org/review/4531
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Stig Bjørlykke <stig@bjorlykke.org>
2014-10-07 20:27:35 +00:00
Gerald Combs 9033f137a9 Revert "ASN1: Added support for using #.REGISTER_NEW"
This temporarily reverts commit
acc09c2aa2.

Change-Id: I7a55c8c2da3f65e914b90648ee92c84efd57f1a0
Reviewed-on: https://code.wireshark.org/review/4525
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-10-07 16:34:18 +00:00
Stig Bjørlykke acc09c2aa2 ASN1: Added support for using #.REGISTER_NEW
This will register BER PDU-dissectors as "new".
Return number of bytes dissected from dissector_try_* functions.
Return number of bytes dissected in DissectorTable:try()

This will make it possible to get dissected length when using
dissector_try_*() and dissected ASN.1 length in Lua when using
DissectorTable:try() (as we already have for Dissector:call).

Change-Id: I8802a812bd484c1e8794c618b87e676003aea94a
Reviewed-on: https://code.wireshark.org/review/4493
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Stig Bjørlykke <stig@bjorlykke.org>
2014-10-07 16:23:55 +00:00
Bill Meier b14bf98c06 Fix spelling: cant-->can't, wont-->won't, etc
Change-Id: I4497f1b8b6eab0e576d9dd31b732965f9a6679c6
Reviewed-on: https://code.wireshark.org/review/4124
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-16 13:51:51 +00:00
Stig Bjørlykke 79b401b7f4 Remove all old BER functions.
This should complete the transition to the "New" type.

Change-Id: I882b088206c6e6d0592159451c943caeaf5b90ec
Reviewed-on: https://code.wireshark.org/review/1202
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-18 21:44:28 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(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-03-04 14:27:33 +00:00
Michael Mann c0fcebb07a Add a data parameter to call_ber_oid_callback to be able to pass data to subdissectors found with dissector_try_string_new.
The intention is to aid in the removal of pinfo->private_data use as well as static global variables in a dissector.  For now, all calls to call_ber_oid_callback have the data parameter set to NULL.

svn path=/trunk/; revision=52994
2013-10-31 00:57:03 +00:00
Bill Meier 2ac134b3c5 whitespace fixes; mostly: remove trailing blanks
svn path=/trunk/; revision=52591
2013-10-13 19:56:52 +00:00
Michael Mann ee208c8dcc Add support for RELATIVE-OID ASN.1 type. Bug 9192 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9192)
From Ed Beroset.

svn path=/trunk/; revision=52393
2013-10-06 02:31:10 +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
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 b431591727 Get rod of " warning: identifier ‘class’ conflicts with C++ keyword"
svn path=/trunk/; revision=39945
2011-11-19 09:08:50 +00:00
Anders Broman 4b952c1324 Get rid of check_col, while at it set ENC.
svn path=/trunk/; revision=39146
2011-09-26 08:25:18 +00:00
Stig Bjørlykke 6a433058f9 Added check for SIZE constraints in bit-string.
svn path=/trunk/; revision=31447
2010-01-05 11:38:33 +00:00
Stig Bjørlykke e73a89d91a Added option (-C) to check for SIZE constraints in octet-string, integer,
enumerated, sequence-of and set-of types.

Added BER functions to check for SIZE constraints and give expert info warnings.

svn path=/trunk/; revision=31309
2009-12-18 15:18:31 +00:00
Stig Bjørlykke 76ba68775b Do not call a variable value_string as we have a struct with this name.
svn path=/trunk/; revision=26658
2008-10-31 18:42:53 +00:00
Stig Bjørlykke d255e44bfa From Martin Peylo (bug 2507):
The attached patch enables asn2wrs.py and packet-ber.c to decode UTCTime
according to the definitions in X.680.

svn path=/trunk/; revision=25897
2008-08-01 16:44:06 +00:00
Anders Broman de16039c51 Get rid of dissect_ber_boolean_value() and change the signature of
dissect_ber_boolean() to return a value and update asn2wrs to generate the new signature.
Regenerate all BER dissectors.

svn path=/trunk/; revision=24015
2008-01-04 16:21:07 +00:00
Anders Broman 73fee653de Get rid of ber_last_created_item(). (Final?)
svn path=/trunk/; revision=24010
2008-01-04 13:39:24 +00:00
Jörg Mayer b312e64f6a get_ber_length doesn't need the tree argument, get rid of it.
Rebuild asn1 dissectors.

svn path=/trunk/; revision=22627
2007-08-24 07:12:04 +00:00
Anders Broman 58f01d87cc Preparations for updated CMIP dissector:
- Export AE-title from ACSE
- Start REAL dissection(unfinished).

svn path=/trunk/; revision=22083
2007-06-12 21:29:27 +00:00
Anders Broman 4393bceae5 INAP:
- Use (some) IN CS4 asn1 files Q.1248.1 Q.1248.2 Q.1248.3

BER/asn2wrs:
-  Add basic support for EmbeddedPDVType

svn path=/trunk/; revision=22031
2007-06-03 19:58:59 +00:00
Anders Broman dca634c4de Prepare for the use of the new -X parameter for BER encoded protocols.
svn path=/trunk/; revision=21889
2007-05-22 16:17:54 +00:00
Anders Broman f08cd1e5e3 actx in the rest of dissect_ber..()l
svn path=/trunk/; revision=21773
2007-05-15 05:49:43 +00:00
Ronnie Sahlberg fc5ce01ee4 replace an incorrect '{' with ';' in the ber header file
change the signature for dissect_ber_external_type() to only provide the 
parameter actx once


svn path=/trunk/; revision=21756
2007-05-13 22:19:04 +00:00
Anders Broman 0bc558f88d actx in ber_external
svn path=/trunk/; revision=21755
2007-05-13 22:01:17 +00:00
Anders Broman c01f382974 Second step in introducing asn context to BER dissectors just like in PER.
svn path=/trunk/; revision=21753
2007-05-13 20:58:29 +00:00
Anders Broman 4c692a62b6 Start introducing actx to ber functions.
svn path=/trunk/; revision=21705
2007-05-06 22:34:05 +00:00
Anders Broman 83f17c25a7 Revert some private experiments checked in by misstake.
svn path=/trunk/; revision=21609
2007-04-28 14:47:43 +00:00
Anders Broman 2630b817b0 From Gavin Heer:
Here's a patch that decodes MMS(Manufacturing Messaging
Specification) when transported over COTP/TPKT/TCP.  Previously, MMS would only be decoded if the OSI Presentation Layers were present. Now MMS/COTP/TPKT/TCP is dissected.
With a change to use more functions from packet-ber

svn path=/trunk/; revision=21608
2007-04-28 14:38:53 +00:00
Guy Harris 1bc049906a Add some GCC warnings to the standard set, and add some others to the
--enable-extra-gcc-checks set.

If we turn on -pedantic, try turning on -Wno-long-long as well, so that
it's not *so* pedantic that it rejects the 64-bit integral data types
that we explicitly require.

Constify a bunch of stuff, and make some other changes, to get rid of
warnings.

Clean up some indentation.

svn path=/trunk/; revision=21526
2007-04-23 10:59:26 +00:00
Anders Broman 5954b97ac4 Add EXTERNAL to the value string and add comments about UNIVERSAL tags.
svn path=/trunk/; revision=21479
2007-04-20 13:54:56 +00:00
Graeme Lunt 2fd7d2c620 New "decode as ..." feature for BER-encoded files (WTAP_FILE_BER).
A BER-encoded file can be dissected as one of a number of registered syntaxes (registered using register_ber_syntax_dissector()). 
Syntaxes may also be associated with OIDs (or other strings) using register_ber_oid_syntax(). 

A default syntax with which to dissect a BER-encoded file is determined from its filename (extension). For example, ".cer" and ".crt" files will be dissected as "Certificate".


svn path=/trunk/; revision=20414
2007-01-13 12:59:27 +00:00
Graeme Lunt e15d91a592 General updates to:
*) Remove maximum LDAP PDU size check - they can get large with either large attributes (e.g. CRLs, SPIFs) or with lots of results (see http://www.wireshark.org/lists/wireshark-users/200610/msg00197.html). The max size preference is also removed.
*) Support for dissecting LDAP controls including server side sorting and paged results. A new BER function is introduced to see if there is a dissector for a given OID.
*) Remove reference to removed BER preference in the LDAP reassembly preference.
*) Mark a LDAPURL as a URL


svn path=/trunk/; revision=19792
2006-11-04 09:14:54 +00:00
Ronnie Sahlberg d0aae6dd3e from metze
prettify dissection of filters containing substring and extensiblematch



svn path=/trunk/; revision=18617
2006-06-29 21:04:37 +00:00
Tomas Kukosa 56d7db0c08 remove functions register_ber_oid_name() and get_ber_oid_name() from packet-ber.c, they were only OID but not BER related
use add_oid_str_name() and get_oid_str_name() instead of them

svn path=/trunk/; revision=18595
2006-06-28 14:19:08 +00:00
Tomas Kukosa f0f319acf1 - BER_MAX_OID_STR_LEN removed and replaced with MAX_OID_STR_LEN
- x411 and dop regenerated
- dissect_ber_tagged_type() prepared (support in asn2wrs will follow)

svn path=/trunk/; revision=18468
2006-06-15 07:46:07 +00:00
Ronnie Sahlberg feab79e328 change a whole bunch of ethereal into wireshark
svn path=/trunk/; revision=18196
2006-05-21 04:49:01 +00:00
Ronnie Sahlberg 590d27a8c0 add new dissect_ber_integer64() that can handle 8,16,24,32 and 64bit integers.
use proto_tree_add_[u]int[8,16,24,32,64]() instread of proto_tree_add_item()
since BER integers may well be encoded in less bytes than the type requires.
(i do not think the old code with proto_tree_add_item() could have handleded negative values very well    or at all.)




svn path=/trunk/; revision=17425
2006-02-28 09:39:53 +00:00
Tomas Kukosa a5bfb48c2f OBJECT IDENTIFIER name resolution moved to oid_resolv.c
svn path=/trunk/; revision=16699
2005-12-06 11:45:55 +00:00
Tomas Kukosa 3b770d5c7c - dissect_ber_object_identifier() returns value as tvb
- new dissect_ber_object_identifier_str() function
 - BER dissectors adapted and regenerated

svn path=/trunk/; revision=16501
2005-11-14 10:02:31 +00:00
Ronnie Sahlberg dc2f29288a Tim's patches for packet-ber for extra testing (works ok with my and with Anders captures)
Anders'  beginnings of a new dissect_ber_set() function

 

svn path=/trunk/; revision=15402
2005-08-18 08:37:31 +00:00
Jörg Mayer 2b2506f0f6 More char -> const char warning fixes
svn path=/trunk/; revision=15222
2005-08-05 13:10:58 +00:00
Jörg Mayer 34493e8f9e char -> const char warning fixes
svn path=/trunk/; revision=15126
2005-07-28 07:53:38 +00:00
Ronnie Sahlberg 0ca30abe65 change the symbol dissect_ber_CHOICE back into dissect_ber_choice
svn path=/trunk/; revision=14980
2005-07-21 21:12:09 +00:00