Commit graph

231 commits

Author SHA1 Message Date
Kovarththanan Rajaratnam
e971354a54 Don't guard col_set_str (COL_PROTOCOL) with col_check
svn path=/trunk/; revision=29340
2009-08-09 06:26:46 +00:00
Stig Bjørlykke
b228488bc0 From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
    for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
    FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero

svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
Anders Broman
c91a384702 Apply some of the patches from:
http://wiki.wireshark.org/Development/Optimization

svn path=/trunk/; revision=28356
2009-05-13 19:46:11 +00:00
Guy Harris
39630a763d Squelch a warning.
svn path=/trunk/; revision=27947
2009-04-03 17:06:20 +00:00
Guy Harris
cf308a6cc0 Don't reply on an argument of -1 as the last argument of tvb_memcpy()
meaning "to the end of the tvbuff"; we'd like to get rid of the "-1
means to the end of the tvbuff" convention, as in many cases the length
comes from a 32-bit length field in the packet, and we want 0xFFFFFFFF
to be treated, even on ILP32 platforms, as meaning "2^32-1 bytes",
probably giving an exception, rather than as "to the end of the packet".

svn path=/trunk/; revision=27945
2009-04-03 16:53:40 +00:00
Tomas Kukosa
494942c9c0 Display information which OID is not implemented in expert info
svn path=/trunk/; revision=27384
2009-02-06 13:48:32 +00:00
Bill Meier
c544c20956 Fix various typos and spelling errors (mostly in text strings)
svn path=/trunk/; revision=27050
2008-12-18 19:08:49 +00:00
Stig Bjørlykke
eb204d1ecf Added a filter entry when dissector for OID not implemented.
svn path=/trunk/; revision=26874
2008-11-29 11:17:34 +00:00
Stig Bjørlykke
4528043ab6 Fixed decoding of multiple sequences in a sequence of implict sequence.
Removed attempt to fix number of items in indef sequence-of and set-of.

svn path=/trunk/; revision=26476
2008-10-16 10:50:12 +00:00
Stig Bjørlykke
c2515c5abd Count correct number of items in indef sequence-of and set-of.
svn path=/trunk/; revision=26451
2008-10-14 16:28:54 +00:00
Bill Meier
b52d95d591 #include <emem.h> not req'd
svn path=/trunk/; revision=26091
2008-08-26 01:28:50 +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
Bill Meier
7aaadd9bec Fix some warnings reported by gcc -Wshadow ...
svn path=/trunk/; revision=25616
2008-06-27 04:52:56 +00:00
Stig Bjørlykke
28ae535b00 Removed even more "statement not reached" warnings.
svn path=/trunk/; revision=24286
2008-02-07 15:44:45 +00:00
Anders Broman
14756d9e5d Let epan/asn1.c handle real type.
svn path=/trunk/; revision=24129
2008-01-18 05:55:24 +00:00
Sake Blok
6ff98095fe From Martin Peylo (bug 2184), fix for:
The current dissection of GeneralizedTime in packet-ber does not consider all
the possibilities how this field can be constructed.

According to ITU-T X.680 this field can be encoded as
YYYYMMDDhhmmss([\.,]f{1,3})?(([+-]hhmm)|Z)?
This is a regex-like expression where each letter except the literal 'Z'
represents an ASCII encoded digit.

So far only the first 14 digits are dissected and the 15th character is put
into parentheses. This may not show all available information.



svn path=/trunk/; revision=24071
2008-01-12 12:06:56 +00:00
Jeff Morriss
db8bae4fb2 When searching for EOC (because we have an indefinite length) don't stop searching just because we ran out of TVB (thus assuming that the EOC is just beyond the end of the message). Instead, try to keep going which will throw an exception (ReportedBoundsError). I had a packet which was missing the EOC (probably programmer error) and Wirshark was reporting BoundsError (Packet size limited during capture) instead of ReportedBoundsError (Malformed Packet); this patch fixes that.
svn path=/trunk/; revision=24046
2008-01-09 17:06:25 +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
Anders Broman
6f5a53b789 Add more debug info.
svn path=/trunk/; revision=23977
2007-12-30 00:03:10 +00:00
Stig Bjørlykke
5e1ffde520 Moved check for empty choice to make it work correctly.
svn path=/trunk/; revision=23548
2007-11-23 12:22:22 +00:00
Stig Bjørlykke
92682d51de Added handling of octet-aligned data according to direct_reference.
Implemented handling of ber_callback for tagged type octet-aligned
and arbitrary.  Renamed some functions.

svn path=/trunk/; revision=23539
2007-11-21 23:33:13 +00:00
Stig Bjørlykke
8fc83d2cf3 Improved "BER Error" messages to be more uniform.
svn path=/trunk/; revision=23501
2007-11-19 20:23:49 +00:00
Stig Bjørlykke
9233fa7578 Second try to not stop processing if length==0 in choice.
svn path=/trunk/; revision=23497
2007-11-19 17:46:11 +00:00
Stig Bjørlykke
77e69e06e1 Reverted r23485 and r23486, this was not a correct fix.
svn path=/trunk/; revision=23489
2007-11-19 07:25:06 +00:00
Stig Bjørlykke
c3d985077e And dump internal ber fields for empty choice field.
svn path=/trunk/; revision=23486
2007-11-18 16:40:20 +00:00
Stig Bjørlykke
ddc4d639ba As proposed by Martin Peylo:
Do not stop processing if the length of a choice has the (illegal)
value of zero.

svn path=/trunk/; revision=23485
2007-11-18 16:20:51 +00:00
Graeme Lunt
4a285928bb Changed to use the the packet-ber EXTERNAL decoding (into the ASN1 context).
Uses the ber_callback mechanism to call the rtse oid callbacks, rather than the default ber oid callback list.
A couple of fixes to packet-ber.c to mark [in]direct references as present and call the ber_callback if it has been specified.


svn path=/trunk/; revision=23450
2007-11-14 20:57:55 +00:00
Anders Broman
524db0a082 From Florent DROUIN:
Since the use of the function 'dissect_ber_tagged_type' for DialoguePortion,
the file tcap.cnf must be updated to remove the decoding of the tag and length.
This decoding is now done in the new function 'dissect_ber_tagged_type'.

The file tcap.cnf has been updated to take into account this change. 
But this leads to a change in tcap.asn too, for the definition of the
ExternalPDU.
I think this part of the ASN1 file is specific to Wireshark and can be
modified.

In the meantime, I did update the DEBUG part for packet_ber.c  for the function
(dissect_ber_tagged_type)

svn path=/trunk/; revision=23442
2007-11-13 21:59:53 +00:00
Anders Broman
dbcabb1938 Get rid of most of the legacy oid stuff.
svn path=/trunk/; revision=23333
2007-11-01 22:07:43 +00:00
Anders Broman
9492700608 Change:
get_oid_str_name() -> oid_resolved_from_string()
get_oid_name() -> oid_resolved_from_encoded()

svn path=/trunk/; revision=23331
2007-11-01 19:36:39 +00:00
Anders Broman
7329ae8ac6 Use oid_add_from_string for adding names.
fix compil of gsmmap and inap.
Note xcopy of gsmmap does not work(rename packet-gsm_map -> packet-gsmmap ?)

svn path=/trunk/; revision=23325
2007-10-31 23:11:15 +00:00
Anders Broman
1950ffc214 Apply the small performance enhancment patches for:
- if offset is 0, tvb_length is the same as tvb_length_remaining, just faster.
Replace 
- col_append_fstr() with faster  col_append_str() 
- col_add_str() with col_set_str()
when it's safe

svn path=/trunk/; revision=23252
2007-10-23 05:50:00 +00:00
Luis Ontanon
bcd55f4c8e replace oid_to_str_buf() and oid_to_str()
fix a potential buffer overflow due to a very liberal estimate by oid_repr_len()


svn path=/trunk/; revision=22659
2007-08-25 17:29:55 +00:00
Luis Ontanon
00c5e48a17 get users of oid_resolv to use the new oids, rollout packet-snmp.c
svn path=/trunk/; revision=22651
2007-08-25 01:14:24 +00:00
Jörg Mayer
93f5beda89 Warning fixes
svn path=/trunk/; revision=22629
2007-08-24 10:20:22 +00:00
Jörg Mayer
733f78043e The ber header was missing from the object, resulting in
invalid saved certificates.

svn path=/trunk/; revision=22628
2007-08-24 08:12:39 +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
Graeme Lunt
d36abc4549 Handle unknown Universal and BMP strings.
svn path=/trunk/; revision=22551
2007-08-18 17:39:44 +00:00
Stig Bjørlykke
93a9ea7879 Improved dumping of unexpected data when dissector for OID not implemented.
svn path=/trunk/; revision=22517
2007-08-15 22:34:56 +00:00
Anders Broman
57592cb2aa http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1739
Fro Stig Bjørlykke:
1. BER: Added support for empty indef SET
2. RTSE: Added fragment length in COL_INFO
3. IMF: Use correct hf_id for extension value
4. DOP: Fix typo in COL_INFO oid name

svn path=/trunk/; revision=22492
2007-08-13 16:41:16 +00:00
Tomas Kukosa
b104611590 remove unused variable
svn path=/trunk/; revision=22407
2007-07-26 14:31:38 +00:00
Tomas Kukosa
82ea2908f1 - export some ASN.1 functions from libwireshark
- fill-in actx->created_item in dissect_ber_object_identifier()

svn path=/trunk/; revision=22406
2007-07-26 14:00:48 +00:00
Tomas Kukosa
6659588f60 - get rid of anonymous unions
- move some structures from packet-per and packet-q932-ros to asn1.h

svn path=/trunk/; revision=22295
2007-07-13 11:25:53 +00:00
Anders Broman
379d320b8b From Stig Bjørlykke:
This patch adds an option to packet-ber to show unexpected tags/data as unknown BER.  It also fixes some offset/length combinations when adding the error message to the tree.

svn path=/trunk/; revision=22244
2007-07-05 13:14:25 +00:00
Anders Broman
442538ce0b Fix a typo.
svn path=/trunk/; revision=22171
2007-06-23 15:31:37 +00:00
Anders Broman
9af02b5130 Change actx->external.direct_reference to be the OID string.
Use it in BER direct reference to call the OID dissector.

svn path=/trunk/; revision=22097
2007-06-14 05:17:07 +00:00
Stephen Fisher
bcfc3b9468 Get the Unix buildbots going again
svn path=/trunk/; revision=22086
2007-06-13 06:22:43 +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
5a2fb14332 Add some opcodes and mark func as _U_ in packet-ber.c
svn path=/trunk/; revision=22032
2007-06-03 21:10:29 +00:00