Commit Graph

34 Commits

Author SHA1 Message Date
Bill Meier a25e421a10 Fix some [-Wunused-but-set-variable] warnings
(in some cases by changing proto_tree_add_item() to use
  what appears to be the correct 'tree' arg);
Do whitespace cleanup.

svn path=/trunk/; revision=39772
2011-11-09 02:48:51 +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
Bill Meier 126aa85393 Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, FT_STRINGZ, FT_UINT_STRING as follows:
1. If there's no character encoding (ENC_ASCII, ...) specified
    then use ENC_ASCII.
 2. For all but FT_UINT_STRING, always use ENC_NA
    (replacing any existing True/1/FALSE/0
    /ENC_BIG_ENDIAN/ENC_LITTLE_ENDIAN).



svn path=/trunk/; revision=39426
2011-10-15 18:46:26 +00:00
Bill Meier 4e57694d4a Convert 'encoding' parameter of certain proto_tree_add_item() calls in non-autogenerated epan/dissectors:
Specifically:  Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as
 the encoding parameter for proto_tree_add_item() calls which directly reference
 an item in hf[] which has a type of:
    FT_UINT8
    FT_UINT16
    FT_UINT24
    FT_UINT32
    FT_UINT64
    FT_INT8
    FT_INT16
    FT_INT24
    FT_INT32
    FT_INT64
    FT_FLOAT
    FT_DOUBLE


svn path=/trunk/; revision=39288
2011-10-06 03:35:44 +00:00
Anders Broman 6c987f0b0c From Michael Mann:
Extend 64-bit SDNV decoding to Administrative Records.

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

svn path=/trunk/; revision=38967
2011-09-11 19:54:11 +00:00
Jeff Morriss f3039a3a97 From Johannes via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5440 :
Metadata Blocks in the bundle protocol (DTN) can contain EID references. These
are not considered by the current implementation and following blocks are
parsed wrong. The attached patch solves this bug and increment the offset as
much as needed to skip the EID references.

svn path=/trunk/; revision=38448
2011-08-10 15:52:52 +00:00
Bill Meier f3af25f270 Don't assign to a proto_item* if the value won't be used: Coverity 885-889
Also: Significant code rework including:
  - Fix bug wherein a timestamp was incorrectly reported as being an Error;
  - Replace many proto_tree_add_text()/proto_item_set_text() sequences each by a
    single proto_tree_add_text().
  - remove unneeded #include <string.h>
  - Whitespace clanup including replacing mixed space/tab indentation by spaces.


svn path=/trunk/; revision=36437
2011-04-03 15:39:01 +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
Stig Bjørlykke f7ac7ef37e Switched to bitwise | instead of logical || in bit operations.
This bug was found by clang.

svn path=/trunk/; revision=35209
2010-12-17 13:01:12 +00:00
Stig Bjørlykke 4a69d9203d Corrected pointer types to avoid warnings from clang.
svn path=/trunk/; revision=34773
2010-11-04 11:25:40 +00:00
Bill Meier 7b85f43d0e Do some constifying [or other] based upon gcc -Wwrite-strings warnings.
svn path=/trunk/; revision=33198
2010-06-09 18:12:17 +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
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
Anders Broman 85b2749d36 From Mithun Roy:
DTN Dissector Bugs.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4500

svn path=/trunk/; revision=31929
2010-02-20 11:06:16 +00:00
Anders Broman 48746a9fe7 Add a protocol reference.
svn path=/trunk/; revision=31914
2010-02-18 06:32:23 +00:00
Bill Meier a2a0eb4767 (Trivial changes):
#include <stdio.h> not req'd; 
  localize two variables; 
  remove two unneeded forward reference declarations.

svn path=/trunk/; revision=31829
2010-02-08 18:32:20 +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 88b72356ad Introduce "Reassembled length" filter element for all protocols doing
reassembly.

svn path=/trunk/; revision=31767
2010-02-02 16:01:52 +00:00
Bill Meier de4c6ff515 Fix a number of gcc _Wshadow warnings
svn path=/trunk/; revision=31557
2010-01-18 21:49:47 +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
Anders Broman 62c3372576 From Jakub Zawadzki:
ctime() is not thread safe and it's obsolete.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4302

svn path=/trunk/; revision=31200
2009-12-08 07:41:43 +00:00
Gerald Combs 2ebdf97ca3 Add an item length check to the DTN dissector. Fixes bugs 4277
and 4278.  Add a couple of expert items.

svn path=/trunk/; revision=31133
2009-11-30 18:10:46 +00:00
Jaap Keuter c795dd1af5 From Mithun Roy:
This is a patch for a new dissector that decodes LTP (Licklider Transmission
Protocol) data according to RFC 5326.

svn path=/trunk/; revision=31120
2009-11-29 19:11:55 +00:00
Anders Broman 88bb44a51e From Jakub Zawadzki:
Cleanup dissector code - use proper memory functions.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4164

svn path=/trunk/; revision=30691
2009-10-25 11:43:30 +00:00
Jaap Keuter d90cb60f61 From Mithun Roy:
The primary header in bundle protocol contains some offset values(destination
scheme offset, destination ssp offset, source scheme offset, source ssp offset,
etc). These are the offsets within the dictionary if the length of the
dictionary length is greater than 0. But if the dictionary length is 0, then
these offset refer to node number and service number respectively(according to
compressed bundle header encoding). For example if destination scheme offset is
2 and the destination ssp offset is 1, then the destination
EID(<node_number>.<service_number>) is 2.1. 

Currently the dtn dissector will consider these offsets to be actual offsets in
the dictionary even if the dictionary length is 0. So the values for the
EID's(destination, source, report, custodian) and their schemes are junk
values. For example if the destination scheme offset is 2 and the destination
ssp offset is 1 and the dictionary length is 0(which means the dictionary is
empty), then the destination scheme is 2 bytes after the beginning of the
metadata block(field after dictionary) and destination is 1 byte after the
beginning of the metadata block.

svn path=/trunk/; revision=30682
2009-10-24 11:19:23 +00:00
Jeff Morriss 350729607a dissect_udp_bundle(): check if dissect_payload_header() or
display_metadata_block() return 0 (meaning they failed to decode something and
the offset was not incremented) rather than checking if the resulting offset
is 0.

This fixes the infinite loop reported in:

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

svn path=/trunk/; revision=30672
2009-10-23 15:55:39 +00:00
Kovarththanan Rajaratnam cf8138e195 Remove check_col() guard
svn path=/trunk/; revision=30124
2009-09-24 19:50:43 +00:00
Kovarththanan Rajaratnam c28bafe341 Use col_set_str instead of col_add_fstr when adding constant strings to COL_INFO
svn path=/trunk/; revision=30082
2009-09-22 21:18:11 +00:00
Jeff Morriss 2eea452ccb From Don Chirieleison via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3914 :
SDNVs are theoretically unlimited in size.  The value of most SDNVs in the
Bundle Protocol is practically limited to far less than a 32 bit number. The
initial dissector included only 1 SDNV evaluation routine which returned a 32
bit number. SDNV fields that evaluated to greater than a 32 bit number were
considered in error. One BP implementation chose to add some syntax to one of
the SDNV fields that extends it to more than 32 bits. The patch included here
adds an evaluation routine that will return a 64 bit number. That routine is
called to evaluate the field where it makes sense to have a value in excess of
32 bits.

svn path=/trunk/; revision=29954
2009-09-17 01:49:55 +00:00
Jaap Keuter 863057ff9c Address the size_t vs. gint issue.
svn path=/trunk/; revision=29027
2009-07-08 17:46:37 +00:00
Bill Meier b60ff9f677 Do defragment inits via registered init routine
instead of once-only in proto_reg_handoff;
Also: localize handles to proto_reg_handoff;
      Fix a typo;

svn path=/trunk/; revision=29018
2009-07-08 12:50:09 +00:00
Guy Harris b0f37069b7 "uint" isn't a standard type, and isn't a type defined by GLib; use
guint, as defined by GLib, instead.

svn path=/trunk/; revision=29011
2009-07-08 06:40:17 +00:00
Jaap Keuter 437318216b From Don Chirieleison:
Within the attached diff file are two source files, packet-dtn.h and
packet-dtn.c. Their function is to decode Bundle Protocol PDUs sent using the
UDP or TCP Convergence Layers. These protocols have been released by the
Internet Research Task Force and are described in RFC 4838 and RFC 5050.
Detailed information on DTN can be obtained at www.dtnrg.org.

svn path=/trunk/; revision=29010
2009-07-08 06:07:21 +00:00