Gerald Combs
7c5083489f
In dissect_ber_bitstring32(), make sure tmp_tvb is properly initialized.
...
Fixes bug 32.
svn path=/trunk/; revision=14092
2005-04-15 14:18:08 +00:00
Gerald Combs
adbc8b86b5
In dissect_ber_integer(), generate a warning if the integer length is
...
invalid instead of throwing an assertion. Fixes bug 25.
svn path=/trunk/; revision=14080
2005-04-14 20:16:35 +00:00
Gerald Combs
3008014ed7
Add another passel of tvb_ensure_bytes_exist()s. Fixes bug 24.
...
svn path=/trunk/; revision=14079
2005-04-14 20:01:14 +00:00
Gerald Combs
a6b24ceaaa
Add a tvb_ensure_bytes_exist() to dissect_ber_octet_string(). Fixes bug
...
23.
svn path=/trunk/; revision=14078
2005-04-14 19:53:27 +00:00
Gerald Combs
d357c745a6
In dissect_ber_octet_string_wcb(), make sure out_tvb is non-NULL before
...
trying to use it so that we don't throw an assertion. Fixes bug 22.
Do the same thing in dissect_ber_GeneralString().
svn path=/trunk/; revision=14065
2005-04-13 21:20:23 +00:00
Gerald Combs
e3bd36c2d5
Add a couple of tvb_ensure_bytes_exist() calls to fix bug 12.
...
svn path=/trunk/; revision=14064
2005-04-13 20:59:39 +00:00
Guy Harris
93692fa5aa
Fix a couple of "proto_tree_add_text()" calls to pass the right arguments.
...
svn path=/trunk/; revision=13989
2005-03-31 23:48:08 +00:00
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