Commit Graph

113 Commits

Author SHA1 Message Date
Jakub Zawadzki ae59b09443 Add missing includes in order to remove exceptions.h from proto.h (next commit).
svn path=/trunk/; revision=53230
2013-11-10 15:59:37 +00:00
Michael Mann 3b91b9586f Pass tcap_private into the dissectors that need it rather than use private_data. Not sure if value_ptr is the "proper" place to pass tcap_private "internally" within the TCAP dissector, but it gets away from (potential) private_data (ab)use.
svn path=/trunk/; revision=52916
2013-10-28 13:36:49 +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
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
Guy Harris 6b629c4d92 Move show_exception() and show_reported_bounds_error() to
epan/show_exception.c, as it's used outside
epan/dissectors/packet-frame.c.  Update their callers to include
<epan/show_exception.h> to get their declaration.

Add a CATCH_NONFATAL_ERRORS macro that catches all exceptions that, if
there's more stuff in the packet to dissect after the dissector call
that threw the exception, doesn't mean you shouldn't go ahead and
dissect that stuff.  Use it in all those cases, including ones where
BoundsError was inappropriately being caught (you want those passed up
to the top level, so that the packet is reported as having been cut
short in the capture process).

Add a CATCH_BOUNDS_ERRORS macro that catches all exceptions that
correspond to running past the end of the data for a tvbuff; use it
rather than explicitly catching those exceptions individually, and
rather than just catching all exceptions (the only place that
DissectorError should be caught, for example, is at the top level, so
dissector bugs show up in the protocol tree).

Don't catch and then immediately rethrow exceptions without doing
anything else; just let the exceptions go up to the final catcher.

Use show_exception() to report non-fatal errors, rather than doing it
yourself.
 
If a dissector is called from Lua, catch all non-fatal errors and use
show_exception() to report them rather than catching only
ReportedBoundsError and adding a proto_malformed item.

Don't catch exceptions when constructing a trailer tvbuff in
packet-ieee8023.c - just construct it after the payload has been
dissected, and let whatever exceptions that throws be handled at the top
level.

Avoid some TRY/CATCH/ENDTRY cases by using checks such as
tvb_bytes_exist() before even looking in the tvbuff.

svn path=/trunk/; revision=47924
2013-02-27 22:43:54 +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 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
Pascal Quantin 02b7064a87 Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7372 :
tcap.otid and tcap.dtid can be used as display filters

svn path=/trunk/; revision=43288
2012-06-16 19:13:48 +00:00
Anders Broman 42b44648c8 Get rid of Warnings.
svn path=/trunk/; revision=39954
2011-11-20 08:59:19 +00:00
Anders Broman 24a011d8db Let subdissectors have a stab at the packet even if it's cut short.
svn path=/trunk/; revision=39472
2011-10-19 17:59:47 +00:00
Bill Meier 24cf0aad06 Update generated ASN1 *.[hc] files after recent work done by Jeff Morriss;
The only change in each file is in a comment showing the asn2wrs cmd used to build that file.

svn path=/trunk/; revision=39427
2011-10-15 19:27:27 +00:00
Anders Broman 0f2e6c6cc5 Get rid of check_col, while at it set ENC.
svn path=/trunk/; revision=39164
2011-09-27 12:05:32 +00:00
Stig Bjørlykke a7c5d642d5 Regenerate ASN.1 dissectors to update the #line directive.
svn path=/trunk/; revision=37118
2011-05-13 08:12:27 +00:00
Guy Harris a8bc4a0d13 Rename the routines that handle dissector tables with unsigned integer
keys to have _uint in their names, to match the routines that handle
dissector tables with string keys.  (Using _port can confuse people into
thinking they're intended solely for use with TCP/UDP/etc. ports when,
in fact, they work better for things such as Ethernet types, where the
binding of particular values to particular protocols are a lot
stronger.)

svn path=/trunk/; revision=35224
2010-12-20 05:35:29 +00:00
Jeff Morriss 2efec6f8c5 tcaphash_context_t.oid is of size LENGTH_OID+1, not LENGTH_OID. Just use sizeof(tcaphash_context_t.oid) instead of LENGTH_OID so we can use that last byte. This allows us to retrieve the whole ACN when the ACN is LENGTH_OID bytes long.
svn path=/trunk/; revision=33089
2010-06-04 19:28:39 +00:00
Jeff Morriss a0c858efcd Add a little more code to avoid not-very-useful blurbs:
- Change spaces in the name to underscores before comparing it to the blurb.
  - Check if the type simply as T_ prepended to the name.
  - Don't put in a blurb of "NULL".

and regenerate the dissectors.

svn path=/trunk/; revision=32748
2010-05-11 03:53:31 +00:00
Jeff Morriss bbebafd9b4 Regenerate a few more of the ASN.1 dissectors
svn path=/trunk/; revision=32747
2010-05-11 02:58:27 +00:00
Bill Meier f8b92f8d0b #include <stdio.h> not needed.
svn path=/trunk/; revision=32405
2010-04-06 17:01:14 +00:00
Stig Bjørlykke 6d1dae6f28 Make all proto_* values static.
svn path=/trunk/; revision=30516
2009-10-11 16:24:29 +00:00
Kovarththanan Rajaratnam 9490d1b74c Regenerate asn1 dissectors (no change, only some line offset changes)
svn path=/trunk/; revision=30454
2009-10-09 21:34:49 +00:00
Kovarththanan Rajaratnam 17c9803cac Sanitize epan includes
svn path=/trunk/; revision=29499
2009-08-21 20:25:24 +00:00
Kovarththanan Rajaratnam 6110a96f68 Don't guard col_set_str (COL_INFO/COL_PROTOCOL) with col_check
svn path=/trunk/; revision=29345
2009-08-09 07:59:51 +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
Stig Bjørlykke c47e788c94 Regenerate all asn2wrs generated dissectors.
svn path=/trunk/; revision=28379
2009-05-16 22:07:03 +00:00
Stig Bjørlykke 8b156ecfc8 Removed some "statement not reached" warnings.
svn path=/trunk/; revision=27827
2009-03-23 13:03:18 +00:00
Stig Bjørlykke 783fd3b199 Corrected oid names.
svn path=/trunk/; revision=27673
2009-03-09 13:26:47 +00:00
Bill Meier ee908a7abd #include <epan/conversation.h> not req'd ...
svn path=/trunk/; revision=27392
2009-02-07 16:01:26 +00:00
Bill Meier 35e5fa9bc1 #include <epan/conversation.h> and/or #include <epan/emem.h> not req'd ...
svn path=/trunk/; revision=27390
2009-02-07 14:33:47 +00:00
Bill Meier 0817daf0c7 Do find_dissector_table("ber.oid") during startup
in proto_reg_handoff instead of during dissection.

svn path=/trunk/; revision=27008
2008-12-15 20:52:40 +00:00
Anders Broman e375c3990a Regenerate all asn2wrs generated dissectors
svn path=/trunk/; revision=26670
2008-11-01 22:30:14 +00:00
Anders Broman d7c62b2db5 Use the unmodified DialoguePDUs ASN1 file.
svn path=/trunk/; revision=26192
2008-09-14 14:42:39 +00:00
Anders Broman 14f76023b3 Remove the rest of the ANSI TCAP stuff.
svn path=/trunk/; revision=26191
2008-09-14 14:33:01 +00:00
Anders Broman eb9dc794b2 Start to get rid of the "old" ANSI TCAP stuff.
svn path=/trunk/; revision=26189
2008-09-13 16:38:21 +00:00
Anders Broman 16512c7b8c Use original UnidialoguePDUs.
svn path=/trunk/; revision=26188
2008-09-13 15:32:59 +00:00
Anders Broman 228b16850c Get rid of some unused code warnings.
svn path=/trunk/; revision=25843
2008-07-26 22:39:32 +00:00
Jeff Morriss 10a67c2028 sccp_ssn_table is not used so remove it. The handoff function does not need to be called after preference changes so stop doing that. Found this on the hunt for bug 2053's cause but it shouldn't (AFAICS) be related.
svn path=/trunk/; revision=25080
2008-04-16 14:28:22 +00:00
Stig Bjørlykke b091b8d26c Rewrote to use g_strlcpy and g_strlcat.
svn path=/trunk/; revision=24525
2008-03-01 17:23:39 +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
Tomas Kukosa 1bef58264a fix field attributes handling for tagged types
regenerate involved dissectors

svn path=/trunk/; revision=23783
2007-12-06 11:23:35 +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 079e1446f9 Update to use the -X and -T asn2wrs flags.
svn path=/trunk/; revision=23394
2007-11-07 21:22:25 +00:00
Jeff Morriss 1fb716d4ff Display TCAP parameter lengths in decimal (like packet-ber does). Fix hex-pane byte highlighting for primitive parameters with tags or lengths longer than 1 octet (contructed ones are OK). Finally, fix up the indenting in this function.
svn path=/trunk/; revision=23154
2007-10-11 22:49:52 +00:00
Anders Broman c4daf58278 Use the new ANSI TCAP dissector.
svn path=/trunk/; revision=22854
2007-09-12 16:45:53 +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 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 1518d1b07a Preparations to split the TCAP dissector into ANSI and ITU parts.
svn path=/trunk/; revision=22501
2007-08-14 22:05:36 +00:00
Jeff Morriss 7c4cca3e63 From Florent Drouin:
Correct bug in TCAP statistics when read filter is used.
Rename the TCAP decoding functions to show which are ITU vs. ANSI.
Don't unregister an ITU SSN if it's used by an ANSI subdissector.

svn path=/trunk/; revision=22421
2007-07-30 17:10:20 +00:00
Jeff Morriss 29facf8ff9 From Florent Drouin:
- add support of session management for tcap ANSI.
   (In fact, this support already exist for ANSI MAP subdissector, but as our
   simulators can reuse the tcap transaction Id, the decoding of the response
   may be wrong)
- move the code related to asn1 in tcap.cnf, and update tcap.cnf
- move the code related to the session management in tcap-persistentdata
- add a compilation option to free the entry in the hashtable for a closed
  transaction. This is used only for tshark statistics generation, with huge file.
- cleanup and add some comments

Add Id tags to epan/tcap-persistentdata.{c,h}

svn path=/trunk/; revision=22415
2007-07-27 19:24:40 +00:00
Tomas Kukosa e5922df225 - use #.FN_HDR where #.FN_BODY is not necessary
- modify subtypes for individual TCMessage/ansi... fields instead of switching based on hf_index inside common TransactionPDU type

svn path=/trunk/; revision=22411
2007-07-27 06:23:45 +00:00