Commit Graph

196 Commits

Author SHA1 Message Date
Anders Broman dfdff5a70c Improve some debug messages.
svn path=/trunk/; revision=13980
2005-03-30 19:09:48 +00:00
Ronnie Sahlberg 95d12a0bc6 From Tim
small bugfix for packet-ber.c if packet is malformed, prevent dereferenceing a null pointer


svn path=/trunk/; revision=13976
2005-03-30 09:18:25 +00:00
Anders Broman 6211456ece From Jacques Olivier:
Here is a patch that:
* packet-ber.c:
- Fixes handling tags longer than one octet (in
"packet-ber.c:get_ber_identifier") which consists of replacing "if (t &
0x80) break;" by "if (!(t & 0x80)) break;"
- Add debug info on the identifier when debug is enabled (I don't know if we want to keep this, but I find it useful)
- printf's a warning when packet-ber hits a constructed type (to remind that we eventually have to handle this)
- Add the display of unknown BER octet strings (this one was already submitted along with the initial Camel dissector but didn't got
included)

svn path=/trunk/; revision=13895
2005-03-24 14:21:30 +00:00
Ronnie Sahlberg fbf762bda5 update asn2eth and all generated dissectors to new dissect_ber_boolean that takes a implicit_tag parameter
svn path=/trunk/; revision=13479
2005-02-23 08:57:47 +00:00
Anders Broman a4db2eb570 In case of "faulty" BER tag:s return tvb = NULL
svn path=/trunk/; revision=13208
2005-01-30 17:48:18 +00:00
Ronnie Sahlberg d5ed983336 change the incorrect BER_UNI_TAG_TeletextString into BER_UNI_TAG_TeletexString
svn path=/trunk/; revision=12743
2004-12-13 11:59:48 +00:00
Ronnie Sahlberg 8afae320de update of the asn2eth compiler to use the types ber_[choice|sequence]_t instead of ber_[choice|sequence]
regenerated all dissectors


fixed the choice/sequence struct to use unsigned entities for class and tag
(to reduce some compiler warning and because it should be signed quantities)



svn path=/trunk/; revision=12740
2004-12-13 08:15:34 +00:00
Ronnie Sahlberg 97f465c157 make the unknown_ber helper try to dissect NumericString and ENUMERATED when it encounters them
svn path=/trunk/; revision=12733
2004-12-12 22:59:43 +00:00
Ronnie Sahlberg 896737c467 update the helper for BER GeneralizedTime to handle implicit tag and update all dissectors using GeneralizedTime
svn path=/trunk/; revision=12732
2004-12-12 22:47:24 +00:00
Ronnie Sahlberg 4490217530 update to the ber CHOICE helper to make it handle (i hope) a CHOICE inside a CHOICE properly.
svn path=/trunk/; revision=12731
2004-12-12 22:19:00 +00:00
Ronnie Sahlberg 0e528dc7a1 updates from tomas and anders
create some missing makefiles for autogenerated dissectors

finish the transition to the new ber integer dissetor helper signature
and regenerate all ber dissectors



svn path=/trunk/; revision=12724
2004-12-12 01:14:03 +00:00
Ronnie Sahlberg dab0fabcad remove the function with the old signature for ber integer dissection
svn path=/trunk/; revision=12723
2004-12-12 00:24:21 +00:00
Ronnie Sahlberg f07b25895b when creating a new subset tvb for a field for further dissection by child dissectors, then if the original tvb is short and doesnt contain enough data, try to create a new subset tvb with as much data we do have instead of just bailing out.
svn path=/trunk/; revision=12623
2004-11-30 03:39:34 +00:00
Ronnie Sahlberg 222ba89923 update dissection of unknown blobs to try to dissect even more stuff.
svn path=/trunk/; revision=12605
2004-11-25 22:27:52 +00:00
Ronnie Sahlberg 43045f122d updates to prettify a bit when attempting to dissect an unknown blob
svn path=/trunk/; revision=12604
2004-11-25 21:30:38 +00:00
Guy Harris 6ec445bfe4 Set the length of the tvbuff to be handed to the subdissector
appropriately (minimum of reported length and length of data left
in the parent).

svn path=/trunk/; revision=12569
2004-11-21 23:02:36 +00:00
Ronnie Sahlberg c47d1f0aa6 with the autogenerated export conformance files we need a small change to packet-ber.c
asn2eth  generates exports for CHOICE as of BER_CLASS_UNI  while the handgenerated ones specified the calss as BER_CLASS_ANY.

make dissect_ber_sequence()  look at the tag as well and if -1 its a wildcard and anything goes.



svn path=/trunk/; revision=12559
2004-11-21 10:34:08 +00:00
Ronnie Sahlberg 2ba488f839 When we have a BER blob but we dont have the dissector for that oid implemented in ethereal (yet),
call a new function to start dissecting what unknown fields we can dissect.

Currently only PrintableString and INTEGER implemented but it will be easy to add other BER Universal types as needed later



svn path=/trunk/; revision=12544
2004-11-18 10:46:27 +00:00
Ronnie Sahlberg 27df480915 make SEQUENCE OF understand a sequence of ANY
svn path=/trunk/; revision=12526
2004-11-14 09:45:04 +00:00
Ronnie Sahlberg 20697638ac make octet string also allow for utf8strings
svn path=/trunk/; revision=12524
2004-11-14 08:50:37 +00:00
Ronnie Sahlberg bb0cf08d8c Major update of the ber helpers to fix a lot of bugs and make the handling of implicit_tags more sane.
It worked reasonably well   mainly, I suspect, due to implicit tags are reasonably uncommon in the dissectors we have already implemented and that the bugs were masking eachothers.


my regression tests (limited test samples though) decodes this new one exactly the same as the old one.


As a bonus by not changing anythiong in the decode  is that now it is possible to get dissection of implice items to work properly,  hence CMIP
(and also x509 Extensions work now)


make heaps of dissector helpers implicit_tag  aware.

change asn2eth to generate code to call the implicit_tag aware integer dissector helper.


svn path=/trunk/; revision=12520
2004-11-14 05:10:44 +00:00
Ronnie Sahlberg 2e13664c4b add new integer dissector helper that is aware of implicit tags
svn path=/trunk/; revision=12519
2004-11-13 14:16:06 +00:00
Ronnie Sahlberg a638e3681b fix bug in handling an optional item
svn path=/trunk/; revision=12518
2004-11-13 10:06:15 +00:00
Anders Broman f1b5065273 Make it possible to print name of OID strings for PER coded OID:s as well.
svn path=/trunk/; revision=12496
2004-11-09 06:49:35 +00:00
Ronnie Sahlberg ee310edcda fix call_ber_iod_callback() to move offset past the end of the current blob.
svn path=/trunk/; revision=12436
2004-10-30 01:54:40 +00:00
Ronnie Sahlberg bef8e01fcd fix small bug that gets offset confused for CHOICE { } OPTIONAL if there were no arms that matched
svn path=/trunk/; revision=12425
2004-10-28 11:35:43 +00:00
Anders Broman 0510221c29 Make it possible to register a string for an OID in the hash table.
svn path=/trunk/; revision=12412
2004-10-27 19:59:44 +00:00
Ronnie Sahlberg 97a6dc74e7 make SEQUENCE OF and CHOICE handle indefinite length encodings
svn path=/trunk/; revision=12382
2004-10-24 03:51:27 +00:00
Ronnie Sahlberg de1bcd5d88 make the SEQUENCE dissection helper understand and handle Indefinite Length
svn path=/trunk/; revision=12319
2004-10-16 12:53:09 +00:00
Guy Harris 518f7926b7 Constify more pointer arguments.
svn path=/trunk/; revision=12265
2004-10-11 18:34:54 +00:00
Guy Harris 3acb84d24a Make the "asn_namedbit *" argument to "dissect_ber_bitstring()" a
"const" pointer.

svn path=/trunk/; revision=12247
2004-10-08 21:14:33 +00:00
Guy Harris c5c8453097 "dissect_ber_sequence()" doesn't modify the "ber_sequence" structure
passed to it; make that argument a const pointer.

svn path=/trunk/; revision=12244
2004-10-08 20:24:23 +00:00
Guy Harris bbe7f89742 Move prefs.c and prefs.h into the epan subdirectory.
svn path=/trunk/; revision=12115
2004-09-27 22:55:15 +00:00
Ronnie Sahlberg 53912ffc47 fix bug in handling of offset for integers longer than 4 bytes
svn path=/trunk/; revision=12092
2004-09-25 02:44:45 +00:00
Guy Harris c68f62210f Add "tvb_get_ntoh64()" and "tvb_get_letoh64()" routines to fetch 64-bit
integers.

Make FT_INT64 and FT_UINT64 add numerical values, rather than byte-array
values, to the protocol tree, and add routines to add specified 64-bit
integer values to the protocol tree.

Use those routines in the RSVP dissector.

svn path=/trunk/; revision=11796
2004-08-22 00:31:58 +00:00
Ronnie Sahlberg ce6804616e add some algorithm oid's to x509af(for the time being)
(only those that take no parameters for the time being)

create a dummy ber oid callback for callbacks that are NULL


svn path=/trunk/; revision=11565
2004-07-29 09:52:14 +00:00
Ronnie Sahlberg 70d7bbebd0 prettify the oid printing of ber oid's
svn path=/trunk/; revision=11564
2004-07-29 09:32:13 +00:00
Ronnie Sahlberg 34b6e90f3e for very large integers, print them in hex thats better than nothing
but we can not filter on them anymore


svn path=/trunk/; revision=11563
2004-07-29 08:41:51 +00:00
Ronnie Sahlberg e7172b423b add nice text item for the case when we could not find the dissector for a specific OID/attribute to make it easier to see where we have missed implementing something.
svn path=/trunk/; revision=11491
2004-07-23 23:12:31 +00:00
Ronnie Sahlberg 52d5646696 inside dissect_ber_sequence() we know the expected length of the field that follows.
use this and create a new tvbsubset so that
1, reading too much data is flagged as MALFORMED PACKET indicating a bug in the dissector (or a packet that IS malformed)
2, this also implicitely passes the length of the data through the ber.oid dissector handle in case we want to pick it up later.



svn path=/trunk/; revision=11490
2004-07-23 23:06:38 +00:00
Ronnie Sahlberg 73f560c866 register ber oid functions through a special function in packet-ber.c which also takes (still unused) the name of the oid
so that sometime later it will be easy to add code to add the name of the oid to the dissection.



svn path=/trunk/; revision=11478
2004-07-23 07:08:14 +00:00
Ronnie Sahlberg 283807bf4b dissect the x509if/Name all the way down to the AttributeTypeAndDistinguishedValue structure but not the structure itself.
we are getting there, slow but steady


svn path=/trunk/; revision=11468
2004-07-22 10:05:59 +00:00
Ronnie Sahlberg dcea6b49c6 get rid of the nasty ber specific oid->callback table and reimplement the functionality using a dissector table instead i.e. the proper way.
svn path=/trunk/; revision=11457
2004-07-21 11:13:03 +00:00
Ronnie Sahlberg a9c3e27415 Small update to AlgorithmIdentifier.
Allow the TYPE field to match ANY type of BER construct.


svn path=/trunk/; revision=11441
2004-07-20 10:45:11 +00:00
Ronnie Sahlberg 723d3dbe44 Add the new protocols CMS, X509AF, X509IF, X509CE and X509SAT
to the ethereal build.

The dissections are semi-useful  but incomplete.
The big problem still remaining is the x509if  Name object not being 
dissected properly   thus causing the dissection to get out of sync/fail
halfway through the certificate structure.


work in progress but already semi-useful.


svn path=/trunk/; revision=11440
2004-07-20 09:11:40 +00:00
Gilbert Ramirez 669db206cb Move dissectors to epan/dissectors directory.
Also move ncp222.py, x11-fields, process-x11-fields.pl,
make-reg-dotc, and make-reg-dotc.py.

Adjust #include lines in files that include packet-*.h
files.

svn path=/trunk/; revision=11410
2004-07-18 18:06:47 +00:00