Commit Graph

135 Commits

Author SHA1 Message Date
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 dee4443809 Add data parameter to dissector_try_heuristic
svn path=/trunk/; revision=44871
2012-09-11 08:26:48 +00:00
Jeff Morriss aa5d9d78dd From Robert Bullen via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7683 :
The reassembled fragments tree in the Packet Details view is awesome, but it
lacks one thing: a field that exposes the reassembled data.

tcp.data already exists for exposing a single TCP segment's payload as a byte
array. It would be handy to have something similar for a single application
layer PDU when TCP segment reassembly is involved. I propose
tcp.reassembled.data, named and placed after the already existing field
tcp.reassembled.length.

My primary use case for this feature is outputting tcp.reassembled.data with
tshark for further processing with a script.

The attached patch implements this very feature. Because the reassembled
fragment tree code is general purpose, i.e. not specific to just TCP, any
dissector that relies upon it can add a similar field very cheaply. In that
vein I've also implemented ip.reassembled.data and ipv6.reassembled.data, which
expose reassembled fragment data as a single byte stream for IPv4 and IPv6,
respectively. All other protocols that use the reassembly code have been left
alone, other than inserting NULL into their initializer lists for the newly
introduced struct field reassemble.h:fragment_items.hf_reassembled_data.

svn path=/trunk/; revision=44802
2012-09-07 02:09:59 +00:00
Jakub Zawadzki 5ad3e5331e MT: move global frame_end_routines to packet_info.
svn path=/trunk/; revision=44748
2012-09-03 12:00:40 +00:00
Guy Harris 659cf0527a UATs could be put into "categories". The categories were defined only
implicitly by the #define name and string they were defined to; not all
UATs neatly fit into any of the categories, so some of them were put
into categories that weren't obviously correct for them, and one - the
display filter macro UAT - wasn't put into any category at all (which
caused crashes when editing them, as the GUI code that handled UAT
changes from a dialog assumed the category field was non-null).

The category was, in practice, used only to decide, in the
aforementioned GUI code, whether the packet summary pane needed to be
updated or not.  It also offered no option of "don't update the packet
summary pane *and* don't redissect anything", which is what would be
appropriate for the display filter macro UAT.

Replace the category with a set of fields indicating what the UAT
affects; we currently offer "dissection", which applies to most UATs
(any UAT in libwireshark presumably affects dissection at a minimum) and
"the set of named fields that exist".  Changing any UAT that affects
dissection requires a redissection; changing any UAT that affects the
set of named fields that exist requires a redissection *and* rebuilding
the packet summary pane.

Perhaps we also need "filtering", so that if you change a display filter
macro, we re-filter, in case the display is currently filtered with a
display filter that uses a macro that changed.

svn path=/trunk/; revision=43603
2012-07-08 01:00:46 +00:00
Jeff Morriss dd105b80d8 Display (and allow filtering on) the "reserved for national use" bit in the AI.
(This bit is already decoded as the "national indicator" bit in ANSI.)

svn path=/trunk/; revision=43590
2012-07-06 21:25:47 +00:00
Jakub Zawadzki b18e880040 Update FSF address - part II.
svn path=/trunk/; revision=43538
2012-06-28 23:18:38 +00:00
Bill Meier 5d1d282213 General cleanup including:
- remove unneeded #include <stdlib.h>
- rework some "function-like" macros to use
  'do {...} while (0)' construct;
- reformat hf[] entries;
- indentation/whitespace/long-lines/parentheses.

svn path=/trunk/; revision=42509
2012-05-08 15:16:55 +00:00
Jeff Morriss 2d3220dcb5 Heuristic standard detection:
- Grab optional parameters for LUDT/LUDTS
 - Fix processing of the 2-octet pointers

svn path=/trunk/; revision=40923
2012-02-08 03:18:04 +00:00
Jeff Morriss 183f0e934c Create a list of MTP Service Indicator macros and use them.
svn path=/trunk/; revision=40828
2012-02-03 18:26:37 +00:00
Jeff Morriss f2539534a3 Finish the heuristic standard detection logic by adding support (untested)
for LUDT and LUDTS messages.

svn path=/trunk/; revision=40824
2012-02-03 16:55:27 +00:00
Jeff Morriss 73ce69dcd4 Improve heuristic standard detection:
- Fix various bugs.
 - Add some optional debug.
 - Enable checking of the Calling address.
 - Check that the Called/Calling address has at least a minimum number of
   octets.
 - Handle XUDTS.
 - Reject messages whose mandatory variable pointers are 0 (meaning not
   present).
 - Reject Class-2 messages whose Class-spare bits are non-zero.
 - For (Class-2) messages that have no variable parameters but an optional
   pointer, only accept messages whose optional pointer is 0 (no optional
   parameters) or 1 (optional parameter immediately follows the pointer).
 - (For some of those Class-2 messages) if there are no optional parameters,
   reject messages if we didn't reach the end of the message.

svn path=/trunk/; revision=40819
2012-02-03 04:09:10 +00:00
Jörg Mayer 0d827a2cce Fix warning: pci set but not used warning
svn path=/trunk/; revision=40789
2012-02-01 10:02:01 +00:00
Guy Harris afdf8061a1 Let's make all offsets within the packet guints. (In most of the API,
they're signed, but that's only to handle "offset from the end" - we
should probably get rid of that and make them unsigned.)

svn path=/trunk/; revision=40785
2012-01-31 23:36:52 +00:00
Jeff Morriss 0db7fc9dfc Heuristic standard tuning:
- Handle ERR and IT messages.
 - When checking variable parameter lengths, check that we have enough data
   remaining (by adding the current offset to the retrieved length).
 - Check the lengths of several more messages.
 - When checking the length, add up the values of the parameter length macros
   to make it obvious how we came to use that value.

svn path=/trunk/; revision=40784
2012-01-31 23:06:27 +00:00
Jeff Morriss 9e9553003d Use PINFO_FD_NUM and PINFO_FD_VISITED
svn path=/trunk/; revision=40783
2012-01-31 20:40:29 +00:00
Jeff Morriss b0ab8e5df4 Improve heuristic standard detection:
- Make sccp_called_calling_looks_valid() static.
 - Reject GT-routed Class-2 (it's not used).
 - Handle UDTS.
 - Handle optional pointer on several messages.

svn path=/trunk/; revision=40782
2012-01-31 04:02:08 +00:00
Jeff Morriss a3de46bf3e Heuristic standard tuning:
- Reject all Class-3 messages (it's never used)
 - Group Class-2 and Class-1 messages closer together
 - Some code cleanup (use macros where we have them)

svn path=/trunk/; revision=40780
2012-01-30 23:15:07 +00:00
Anders Broman 80c5205b8e Reformat a section.
svn path=/trunk/; revision=40777
2012-01-30 19:54:39 +00:00
Anders Broman ed5c6cfd71 Try to determine MTP3 Standard heuristically, original code
from Jeff Morris refactored a bit by me.

svn path=/trunk/; revision=40776
2012-01-30 19:47:35 +00:00
Chris Maynard 647c5c0b27 packet_info's in_error_pkt is now a bitfield like in_gre_pkt.
svn path=/trunk/; revision=39764
2011-11-08 18:39:11 +00:00
Bill Meier 794757ae8f For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.
Also: remove trailing whitespace for a number of files.

svn path=/trunk/; revision=39503
2011-10-21 02:10:19 +00:00
Anders Broman 14fbabcb26 Get rid of check_col() and use ENC.
svn path=/trunk/; revision=39153
2011-09-26 17:50:54 +00:00
Jeff Morriss 5262c3f4b0 Update my email address (the old one still works but I don't use it for Wireshark related stuff).
svn path=/trunk/; revision=38841
2011-09-01 14:30:16 +00:00
Jeff Morriss 8ce306faa0 Inspired by one of the changes from r37406 and bug 2794: detect hf abbreviations
with two or more periods in a row.  Fix one case of that.

svn path=/trunk/; revision=37407
2011-05-26 13:32:04 +00:00
Anders Broman 6a4ed4f4c3 From Michael Mann.
Part of "display filters with redundancies of PROTABBREV in them."
The ones left outs should be fixed differently I think.
Rename som ndps hf variables while at it.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2794

svn path=/trunk/; revision=37406
2011-05-26 06:32:51 +00:00
Jeff Morriss db372d0ad2 Add some expert infos for unusual messages:
- routing on SSN but the SSN is not present or is unspecified (zero)
 - message handling has an unexpected value
 - message class is incorrect for the message type

Also clean up some indentation and other white space.

svn path=/trunk/; revision=37400
2011-05-25 21:47:35 +00:00
Guy Harris ff389e5a18 Squelch a narrowing warning.
svn path=/trunk/; revision=37228
2011-05-17 23:39:06 +00:00
Jeff Morriss 747a964aef Always add the parameter length field to the tree; only make it visible
if the preference is set.

Add %d to the "not found" string in val_to_str() calls.

Upgrade the "ITU address format seen in ANSI" expert info from NOTE to WARN.

svn path=/trunk/; revision=37218
2011-05-17 22:21:25 +00:00
Jeff Morriss 82a8d6b153 Add a filterable item for the length of the GT digits in a subtree under the
digits.

Since we now have a subtree from which to hang things, make the generic (called
or calling) digits fields visible under this new subtree (one less hidden item).

Don't use add_string_format() to add the GT digits, let epan format it for us.
Use more descriptive field descriptions for these entries.

svn path=/trunk/; revision=37214
2011-05-17 21:59:58 +00:00
Jeff Morriss 664c69dbaa Use proto_tree_add_item() when it saves us from having to retrieve the value
and without causing us to potentially run into bug 3834.

Add a couple hf entries for things that had been added with add_text().

svn path=/trunk/; revision=36946
2011-04-29 02:16:13 +00:00
Jeff Morriss 6b13963a63 If we're in a message return (UDTS or XUDTS), set pinfo->in_error_pkt to help
make it obvious to the user that this is an error message.

Fix up some indentation.

svn path=/trunk/; revision=36945
2011-04-29 01:45:34 +00:00
Stig Bjørlykke 84bc28bd6a Introduce "Fragment count" filter element for all protocols doing reassembly.
svn path=/trunk/; revision=35705
2011-01-30 21:01:07 +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 2b77738b11 From Neil Piercy via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3301 :
The information which is used to determine which sub-dissector to use for the
various Data messages within an SCCP connection is only present within the
initial Connection Request, so even with connection tracking on, unless the
trace contains the Connection Request no sub-dissector is called. It is common
for traces to only contain a single carried protocol anyway - e.g. RANAP.

The supplied patch adds a user preference for a "default payload"
sub-dissector, which is called in preference to the Data dissector if nothing
else has claimed the packet first.

svn path=/trunk/; revision=35098
2010-12-01 23:26:07 +00:00
Jeff Morriss 7967c282c0 From Neil Piercy via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3301 :
The packet-sccp.c has a bug in the declared valid ranges of the SSN and DPC
values in the user table used to match to a subdissector. The SSN range is 16
bits rather than 8 (not really an issue) but the DPC range is 16 bits rather
than 24 - so many traces cannot be matched by this table.

svn path=/trunk/; revision=35097
2010-12-01 23:12:46 +00:00
Stig Bjørlykke f7c394dfd0 Initialize no_assoc.app_info=0.
svn path=/trunk/; revision=35011
2010-11-22 21:05:49 +00:00
Guy Harris 17d4d51b7d Make the third argument to a UAT copy callback a size_t (not that any of
the callbacks we have use that argument - is it really needed?).

svn path=/trunk/; revision=34694
2010-10-29 21:11:33 +00:00
Jeff Morriss 074e49fd41 hf variables can be copied/passed by value, not by reference.
svn path=/trunk/; revision=34467
2010-10-11 01:52:41 +00:00
Jeff Morriss 3be92af2d9 Add a preference that allows the user to decide if they want the calling and
called GTs (if RI=GT) put in the (pinfo) source and destination (and thus into
the source and destination columns).

This may help (if the PCs change but the GT does not) or hurt (if the GT or RI
change but the PCs do not) TCAP's ability to identify which messages belong to
which TCAP "session."

svn path=/trunk/; revision=33097
2010-06-04 20:52:02 +00:00
Jeff Morriss 99aa11c6ed Reindent a bit
svn path=/trunk/; revision=32794
2010-05-13 20:31:53 +00:00
Bill Meier 09764dd969 Remove unneeded #include <stdio.h>
svn path=/trunk/; revision=32367
2010-04-03 21:55:23 +00:00
Stig Bjørlykke 2f8830b4d0 From LEGO via bug 3459:
Add a callback to UAT to be called after the table has being updated,
use it to renew the snmp_ue_cache.

svn path=/trunk/; revision=32112
2010-03-04 12:50:18 +00:00
Stig Bjørlykke 539b558f8c Renamed some reassembled data texts.
Removed some check_col().

svn path=/trunk/; revision=31809
2010-02-06 18:20:21 +00:00
Gerasimos Dimitriadis 214148c7c6 Fix the MNC decoding when Global Title is built
according to E.212

svn path=/trunk/; revision=31802
2010-02-05 20:54:13 +00:00
Stig Bjørlykke 88b72356ad Introduce "Reassembled length" filter element for all protocols doing
reassembly.

svn path=/trunk/; revision=31767
2010-02-02 16:01:52 +00:00
Anders Broman 6343ffb68e Try to fix indentation sligtly.
svn path=/trunk/; revision=31518
2010-01-13 20:26:17 +00:00
Jeff Morriss 6d11b171d6 Add support for LUDT/LUDTS in ANSI (ANSI added them in 2000/2001).
svn path=/trunk/; revision=31268
2009-12-14 20:08:11 +00:00
Gerasimos Dimitriadis b7261fe2e4 Expert info when E.212 MCC/MNC contain non-decimal digits
svn path=/trunk/; revision=31102
2009-11-27 22:57:50 +00:00
Kovarththanan Rajaratnam 00810ff199 * Prefer col_append_str instead of col_append_fstr for constant strings
* Remove check_col guards

svn path=/trunk/; revision=30127
2009-09-24 20:21:23 +00:00