Commit Graph

167 Commits

Author SHA1 Message Date
Graham Bloice 8e86e3dbbf Removed redundant comparison that caused compilation failure on OSX
svn path=/trunk/; revision=35536
2011-01-14 14:39:40 +00:00
Graham Bloice 1be12860e6 Updated dissector:
Additional function codes: Disable unsolicited messages, Open\Close\Delete file
Additional data objects: Analog output events, File objects and Octet string events.
Improved Info column display for reassembled fragments.
Changed all event timestamps to be UTC as per protocol spec.

svn path=/trunk/; revision=35533
2011-01-14 12:15:10 +00:00
Jaap Keuter 720f40cd30 From Rob Casey:
Patch to add support for DNP3 protocol Binary Output Change object type.

svn path=/trunk/; revision=35227
2010-12-20 07:57:52 +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
Anders Broman ef35235e5a From Rob Casey:
Addition of support for DNP3 Analog Input Deadband object type
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5471

svn path=/trunk/; revision=35171
2010-12-10 15:32:47 +00:00
Anders Broman e1b1ef192c "Fill" value_strings.
svn path=/trunk/; revision=34888
2010-11-15 21:32:27 +00:00
Bill Meier c17c9fff87 Use value_string_ext fcns to access certain value_string arrays;
Sort a few value_string arrays to be in ascending order by value;
Do minor reformatting and whitespace cleanup.

svn path=/trunk/; revision=34813
2010-11-08 21:59:39 +00:00
Guy Harris 927b7da346 Have abs_time_to_str() and abs_time_to_str_secs() take an additional
argument indicating whether to include the time zone in the string.  If
we're constructing a display filter, don't include the time zone,
otherwise do.  Fixes bug 4756.

svn path=/trunk/; revision=32913
2010-05-21 06:33:25 +00:00
Jeff Morriss 729de1a635 As suggested in http://www.wireshark.org/lists/wireshark-dev/200809/msg00075.html
(as referenced in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2907 ) and
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3411 :

Write a new convenience routine for finding a conversation and, if it is not
found, create it.  The frame number and addresses are taken from pinfo (as is
the common case).

Use this function in a bunch of dissectors.

svn path=/trunk/; revision=32790
2010-05-13 18:28:34 +00:00
Bill Meier 09764dd969 Remove unneeded #include <stdio.h>
svn path=/trunk/; revision=32367
2010-04-03 21:55:23 +00:00
Guy Harris 500eb99cd9 Add a third date format, ABSOLUTE_TIME_DOY_UTC, to show UTC with the
date as YYYY/DDD, where DDD is a 1-origin day of year.  Move the formats
to a "time_fmt.h" file, included by the headers that use it.  Have
abs_time_to_str() and abs_time_secs_to_str() take the date format value,
rather than a Boolean "show this as UTC" flag, as an argument.  Document
the ABSOLUTE_TIME_ formats a bit better.  Use that format in the CCSDS
and VCDU dissectors, rather than having those dissectors do the
formatting themselves.

svn path=/trunk/; revision=32034
2010-02-27 19:01:27 +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
Stig Bjørlykke 47e732e29e Changed "reassembled_length" -> "reassembled.length".
svn path=/trunk/; revision=31776
2010-02-03 08:47:15 +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
Guy Harris 8e236e55de For fields of type FT_ABSOLUTE_TIME, have the "display" value be one of
ABSOLUTE_TIME_LOCAL or ABSOLUTE_TIME_UTC, indicating whether to display
the date/time in local time or UTC. (int)ABSOLUTE_TIME_LOCAL ==
(int)BASE_NONE, so there's no source or binary compatiblity issue,
although we might want to eliminate BASE_NONE at some point and have the
BASE_ values used with integral types start at 0, so that you can't
specify BASE_NONE for an integral field.

svn path=/trunk/; revision=31319
2009-12-19 03:17:44 +00:00
Guy Harris 4fde145bd2 Add an argument to abs_time_to_str() and abs_time_secs_to_str()
indicating whether the time should be shown as local time or UTC.  For
now, always pass FALSE, meaning "show as local time".

Clean up some stuff in the SNMP dissector, use abs_time_secs_to_str()
for times with one-second resolution, and update a comment in various
macros in the WSP dissector, while we're at it.

svn path=/trunk/; revision=31227
2009-12-10 22:19:29 +00:00
Bill Meier e2379fb4a1 Fix memory leak; init fragment_table & reassembled_table in registered init fcn;
(Tables were being initted only at Wireshark startup in proto_register)

svn path=/trunk/; revision=30578
2009-10-16 21:35:39 +00:00
Anders Broman bc9a809b65 From Didier Gautheron:
ep memory can't be used for tvbs defined as data_source.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4054

svn path=/trunk/; revision=30376
2009-10-06 19:15:58 +00:00
Stig Bjørlykke 448523881e Removed 'l' modifier for %g, as it will be ignored.
svn path=/trunk/; revision=30222
2009-09-30 19:48:10 +00:00
Kovarththanan Rajaratnam 124faf721c Use col_set_str instead of col_add_fstr/col_add_str when adding constant strings to COL_INFO
svn path=/trunk/; revision=30089
2009-09-23 14:52:01 +00:00
Anders Broman 8341ccabc6 From Xavier Laxa:
UNS bit not correctly parsed in DNP APP Layer.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3318

svn path=/trunk/; revision=29807
2009-09-08 19:38:42 +00:00
Kovarththanan Rajaratnam 0a5b014cec Don't guard col_clear with col_check
svn path=/trunk/; revision=29344
2009-08-09 07:36:13 +00:00
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
Guy Harris 241aa76fc9 Saved by removing the bell.
svn path=/trunk/; revision=29181
2009-07-23 18:36:25 +00:00
Bill Meier 65faee6470 Set editor modelines to be consistent between emacs and vi/ex;
Indentation and whitespace cleanup;

svn path=/trunk/; revision=29180
2009-07-23 17:46:09 +00:00
Stig Bjørlykke 0437f102c3 From Kovarththanan Rajaratnam:
More FT_XXX cleanup.

svn path=/trunk/; revision=28971
2009-07-07 09:02:59 +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
Bill Meier 636147e417 FT_BOOLEAN fields with bitmask: Display is 'parent bitfield width' not BASE...
Also: Use global tfs_yes_no TFS structure in two cases (packet-ipv6.c)

svn path=/trunk/; revision=28311
2009-05-08 18:39:17 +00:00
Gerald Combs 2c74073079 Add a couple of size_t casts to packet-dnp.c.
Make the length arguments of format_text() and format_text_wsp()
size_t's, since it's natural to use strlen() for that.

svn path=/trunk/; revision=27891
2009-03-30 03:40:12 +00:00
Jaap Keuter 286e4ccd12 From Roy M. Silvernail:
Several command codes were missing, causing the dissector to abort decoding
on valid packets.  Those commands have been added in the attached patch.
The semantics of Variation 0 have been cleaned up.

svn path=/trunk/; revision=27162
2009-01-06 07:03:43 +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 d0e33bc3c5 Fix some "format not a string literal and no format arguments" warnings.
svn path=/trunk/; revision=26646
2008-10-31 14:07:23 +00:00
Bill Meier afd857957a Fix a few Emacs "file variables" to have "safe" values.
That is: indent-tabs-mode: tabs --> indent-tabs-mode: t
Also: fix a typo: set-tabs-mode --> indent-tabs-mode

svn path=/trunk/; revision=26113
2008-09-02 11:17:03 +00:00
Martin Mathieson b48ef500ee Squash uninitialised use warning.
svn path=/trunk/; revision=25434
2008-06-05 21:39:06 +00:00
Graham Bloice 814535f788 Added decoding of object 110 (Octet string), fixed reassembly if transport frame doesn't start with 0.
svn path=/trunk/; revision=25431
2008-06-05 10:32:51 +00:00
Bill Meier 44af6ef887 Fix some of the Errors/warnings detected by checkapi.
svn path=/trunk/; revision=25290
2008-05-14 01:47:41 +00:00
Graham Bloice be9061324c Corrected assumption that offset is always > start_offset. If the first object in the response is a packed bit type, then offset won't be moved until at least 8 bits have been processed.
svn path=/trunk/; revision=24897
2008-04-11 17:11:48 +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
Gerald Combs 3120e42f6e Fix problems found by Beyond Security:
Instead of overflowing an unsigned int when determining the number of
items in a range, use a signed int and check for a negative value.  Make
sure our offset increments as we step through each item.  This should 
avoid large/inifinite loops.

Fix the size of hf_dnp3_al_range_stop32.

svn path=/trunk/; revision=22811
2007-09-06 18:26:04 +00:00
Guy Harris 81f968f748 Show unsigned quantities with %u, not %d.
svn path=/trunk/; revision=22764
2007-08-31 23:56:07 +00:00
Graham Bloice 2c86c37628 Large update with improvements in objects dissected, fragment reassembly, info column details and filter field names
svn path=/trunk/; revision=22600
2007-08-23 09:28:03 +00:00
Graham Bloice 3ade8e7d43 Fixed crash with missing conversation fragment, improved presentation, minor typos corrected
svn path=/trunk/; revision=22089
2007-06-13 10:15:31 +00:00
Graham Bloice 009c784fb6 Corrected dissection of read requests when no object indexes are supplied, i.e. index field is 0
svn path=/trunk/; revision=21909
2007-05-23 16:35:42 +00:00
Guy Harris 59d2c52ac3 With at least some compilers, "enum QUALITY_TYPE" is unsigned, and the
compiler warns about checking whether it's >= 0, as it always is.

Don't do that check - we don't use "type" until the switch statement,
and GCC should issue a warning if not all valid "enum QUALITY_TYPE"
values are handled in the switch statement.

Sort the items in the switch statement in the order in which they appear
in the enum definition, so it's clearer that it covers all values.

svn path=/trunk/; revision=21890
2007-05-22 17:32:39 +00:00
Graham Bloice 574eb87d18 Code cleanups, some parsing errors fixed, added more object types
svn path=/trunk/; revision=21887
2007-05-22 16:01:25 +00:00
Sebastien Tandel 68ad2f4b9b fix MacOSX gcc-3.3 warnings about unused tfs/value_string variables
most have been tagged unused (few have been deleted if dissector has not been
modified since a long time)

move packet-ssl-utils.c to DISSECTOR_SRC


svn path=/trunk/; revision=21431
2007-04-14 14:01:53 +00:00
Graham Bloice 0e59733dac Corrected dissection when reading binary inputs that have per point indexes, found by Steven J. Schaeffer
svn path=/trunk/; revision=21035
2007-03-16 11:39:19 +00:00
Guy Harris 219a24a642 The type argument to dnp3_al_obj_quality() isn't taken from the packet,
so invalid type arguments are programming errors; check for them with
DISSECTOR_ASSERT().

Fix a call to use the right value from the packet.

The dissector is a new-style dissector, so register it as such.

svn path=/trunk/; revision=20930
2007-02-25 21:57:23 +00:00
Bill Meier 103bf29730 Continuing the tradition: squelch some compiler warnings ....
svn path=/trunk/; revision=20866
2007-02-19 22:29:23 +00:00
Graham Bloice 9cc5985cec Corrected handling of udp messages, don't call tcp_dissect_pdus for udp fragments
svn path=/trunk/; revision=20683
2007-02-02 10:21:43 +00:00
Graham Bloice 773a04c9e4 Major upgrades to dissector: Added defragmentation of tcp pdus, fixed defragmention of application layer fragments, many more object types decoded thanks to Chris Bontje
svn path=/trunk/; revision=20651
2007-01-31 13:58:55 +00:00
Ronnie Sahlberg feab79e328 change a whole bunch of ethereal into wireshark
svn path=/trunk/; revision=18196
2006-05-21 04:49:01 +00:00
Ronnie Sahlberg 92cddab07a swap Trip/Close as per bug 579
svn path=/trunk/; revision=16774
2005-12-13 06:36:30 +00:00
Ulf Lamping 0dc9fb3d4a various code cleanup:
-use g_snprintf instead of sprintf and snprintf
-use g_strdup_printf where appropriate
-remove #include "snprintf.h" (as only g_snprintf should be used)
-replace some more alloc/realloc/calloc/free with their glib pendants

svn path=/trunk/; revision=15264
2005-08-08 18:50:39 +00:00
Jörg Mayer 5602f5bb83 Make some funtions static. More char -> const char warning fixes
svn path=/trunk/; revision=15146
2005-07-30 01:01:02 +00:00
Jörg Mayer 7949c7f31c char -> const char warning fixes
svn path=/trunk/; revision=15079
2005-07-26 08:01:16 +00:00
Anders Broman 418092ce05 From Graham Bloice
updates.

svn path=/trunk/; revision=14992
2005-07-22 15:20:57 +00:00
Ulf Lamping 2c30357c48 checksum messages: use "[correct]" instead of "(correct)" and other "alike" messages
svn path=/trunk/; revision=14880
2005-07-08 22:11:13 +00:00
Ronnie Sahlberg b913b8f3bf From Chris Bontje
DNP3 Application Layer Object dissection


svn path=/trunk/; revision=14794
2005-06-27 08:12:55 +00:00
Ulf Lamping 56a9fe6d2a add a generated toplevel line between the connectionless DCE/RPC protocol and the defragmented DCE/RPC content, to better understand what's going on if defragmentation is done.
svn path=/trunk/; revision=14531
2005-06-02 20:55:58 +00:00
Lars Roland ec9ca01616 Move the following files from /trunk to /trunk/epan:
asn1.[ch]
follow.[ch]
ptvcursor.[ch]
reassemble.[ch]
xmlstub.[ch]

fix #include statements accordingly.

svn path=/trunk/; revision=13366
2005-02-09 23:38:00 +00:00
Guy Harris b6f0632323 Free the chunk of reassembled DNP data iff there was a CRC error;
otherwise, we're using it in a tvbuff and shouldn't free it (even if the
next level of reassembly isn't complete, so that al_tvb is ultimately
null).

svn path=/trunk/; revision=13134
2005-01-20 09:44:29 +00:00
Guy Harris 6d5fa89996 When assembling application layer chunks, don't include the transport
layer byte in the reassembled data - including it means we have to pass
to "tvb_new_real_data()" a pointer to the *second* byte of a mallocated
chunk of data, but that would require us to have the free routine for
the new tvbuff back that pointer up before freeing it (we aren't doing
that currently, which means that "free()" either complains bitterly or,
potentially, corrupts the arena, causing crashes later).

Put in some XXX comments about some issues seen when looking at the
code.

svn path=/trunk/; revision=13083
2005-01-17 03:39:58 +00:00
Guy Harris 6270a8e27b Fix one comment, and put in another one giving a note about where you
can get the protocol specs.

svn path=/trunk/; revision=12807
2004-12-21 23:26:01 +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
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