Commit Graph

46 Commits

Author SHA1 Message Date
Martin Kaiser 8b4c5a53e0 remove some more if (tree) checks
svn path=/trunk/; revision=52381
2013-10-05 18:57:15 +00:00
Martin Kaiser 21b5802fc8 add editor modelines
svn path=/trunk/; revision=52380
2013-10-05 18:42:54 +00:00
Martin Kaiser 71a4ec8801 remove some unnecessary if (tree) checks
svn path=/trunk/; revision=52379
2013-10-05 18:38:25 +00:00
Martin Kaiser a15760bd63 From Jacob Erlbeck
Fix GPRS-NS protocol dissector for STATUS PDU
    
When a NS-STATUS message contains a PDU, the packet description
refers to the contained PDU and the offset is wrong, thus finding
information elements that are not present.
    
This fixes the implementation by checking, whether the PDU dissector
has been called recursively and by updating the offset correctly.

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

(from me: use gboolean, separate variable declaration and initialization)

svn path=/trunk/; revision=52378
2013-10-05 18:29:17 +00:00
Michael Mann 346f803d42 Convert proto_tree_add_uint_format to proto_tree_add_uint_format_value if hf_ field name is the first part of the formatted string. This was all manual inspection and most cases were either:
1. Case sensitivity differences between hf_ field name and formatted string.
2. Unnecessary whitespace between hf_ field name and colon in formatted string

There are cases where the hf_ field name doesn't quite match the proto_tree_add_uint_format, but it's close enough that one of them should be "right", I'm just not sure which is, I just know the string in proto_tree_add_uint_format is the one displayed.

svn path=/trunk/; revision=52098
2013-09-16 10:39:06 +00:00
Michael Mann b38ee917b1 Convert proto_tree_add_uint_format to proto_tree_add_uint_format_value if hf_ field name is the first part of the formatted string. This was done with a perl script on the dissectors directory (packet-*.c), followed by manual inspection of the output. The manual inspection yielded a few cases that really should have been proto_tree_add_uint or proto_tree_add_item, so I updated them accordingly.
The script didn't catch as many as I would have liked, but it's a start.

The most common (ab)use of proto_tree_add_uint_format was for appending strings to CRC/checksum values to note good or bad CRC/checksum.

svn path=/trunk/; revision=52045
2013-09-15 01:48:30 +00:00
Anders Broman 7e3922cf43 Use dissector_delete_uint_range/dissector_add_uint_range
svn path=/trunk/; revision=51540
2013-08-27 19:21:20 +00:00
Michael Mann de68fd6eea Removed check_col() and the occasional tree.
svn path=/trunk/; revision=49938
2013-06-14 17:49:53 +00:00
Bill Meier d3a7f4b817 Use '#if 0 ... #endif' rather than /** ... **/ to comment out
unused hf[] entries (which I should have done in the first place).

svn path=/trunk/; revision=47390
2013-01-31 18:31:28 +00:00
Bill Meier 0960e508e4 Comment out cases of unused hf array entries found by checkhf.
svn path=/trunk/; revision=47302
2013-01-26 18:54:53 +00:00
Pascal Quantin d6f2abcbfd Revert r46595
svn path=/trunk/; revision=46643
2012-12-20 21:17:23 +00:00
Pascal Quantin 8cbbff352e Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8095 :
Add dissection of GPRS-NS protocol inside MPLS

svn path=/trunk/; revision=46595
2012-12-18 20:36:21 +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
Bill Meier 638d74d43f Use val_to_str_const() where appropriate;
Also (for a few files):
- create/use some extended value strings;
- remove unneeded #include files;
- remove unneeded variable initialization;
- re-order fcns slightly so prefs_reg_handoff...() at end, etc

svn path=/trunk/; revision=44438
2012-08-10 22:55:02 +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 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 d2170c5b99 Use ENC_... instead of locally defined NSIP_LITTLE_ENDIAN for proto_tree_add_item() encoding arg.
svn path=/trunk/; revision=39476
2011-10-19 20:58:36 +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
Bill Meier f3432a973c Don't assign to a proto_item* if the value won't be used:
Fixes Coverity 903,935,968,985,997,999,1024,1025,1134;
Remove unneeded #includes;
Do whitespace cleanup.

svn path=/trunk/; revision=37331
2011-05-20 15:44:25 +00:00
Anders Broman b4941ca580 Prepare to remove old bssgp code by changing exports.
svn path=/trunk/; revision=36142
2011-03-06 09:42:41 +00:00
Bill Meier 121c65c613 Remove unneeded #includes (stdio.h,stdlib.h);
Whitespace cleanup: trailing, indentation, "4-space tabs"

svn path=/trunk/; revision=35850
2011-02-07 18:49:29 +00:00
Sake Blok 6e74ad9097 Adress => Address corrections (also in comments).
(see bug 5600)


svn path=/trunk/; revision=35600
2011-01-21 00:19:03 +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
Bill Meier 055dd62063 #include <string.h> not needed.
svn path=/trunk/; revision=32410
2010-04-06 21:14:01 +00:00
Bill Meier 09764dd969 Remove unneeded #include <stdio.h>
svn path=/trunk/; revision=32367
2010-04-03 21:55:23 +00:00
Anders Broman 058274f711 From Mike Morrin:
There were 2 dissectors for GPRS-NS (GSM 48.016) protocol, packet-gprs-ns.c and
packet-gprs-ns.c.  packet-nsip.c seemed to be the more complete, and has a
cleaner output.

I have polished up nsip.c and changed it so that it identifies itself as the
dissector for gprs-ns.

packet-gprs-ns.c can be deleted.
(Removed from the makefile for now).

svn path=/trunk/; revision=32295
2010-03-26 20:31:47 +00:00
Bill Meier 9b568ea691 Fix gcc -Wshadow warnings
svn path=/trunk/; revision=31561
2010-01-19 00:37:39 +00:00
Stig Bjørlykke aff9e3efe9 Use different abbrev for IPv4 and IPv6 address.
svn path=/trunk/; revision=31430
2010-01-03 15:08:50 +00:00
Kovarththanan Rajaratnam 8b515e9340 Switch a bunch of dissectors over to using tvb_new_subset_remaining()
svn path=/trunk/; revision=29446
2009-08-16 12:36:22 +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
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
Bill Meier 6f92b028aa Use some default true_false_string's.
svn path=/trunk/; revision=27983
2009-04-07 12:20:41 +00:00
Bill Meier 6aa5f8aa6a Minor cleanup related to proto_reg_handoff
svn path=/trunk/; revision=26246
2008-09-22 16:26:41 +00:00
Jaap Keuter b6b59d1f99 From Neil Piercy:
The IP Address IE did not decode correctly - the address fetch did not skip the
Address Type field.

svn path=/trunk/; revision=26164
2008-09-08 06:02:35 +00:00
Jeff Morriss 1790075951 As requested by Juan Wortley on -users: instead of allowing only 2 UDP ports to be dissected as NSIP, allow a range. Obsolete the old preferences.
svn path=/trunk/; revision=22998
2007-09-27 14:11:57 +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
Anders Broman f0c117048d Handle two octet lengths correctly and remove optional decoding of sns_config, as I read the standard there is no difference.
svn path=/trunk/; revision=17696
2006-03-22 17:11:31 +00:00
Guy Harris 25c4bc9379 Replace tvb_memcpy() calls that extract IPv4 addresses into a guint32,
and that extract IPv6 addresses into a "struct e_in6_addr", with
tvb_get_ipv4() and tvb_get_ipv6() calls - except for some that we
remove, by using proto_tree_add_item(), rather than replacing.

Have epan/tvbuff.h include epan/ipv6-utils.h, to define "struct
e_in6_addr" (not necessary to declare the tvbuff routines, but including
it there means "struct e_in6_addr" is guaranteed to be defined before
those declarations, so we don't get compiler complaints if we define it
*after* those declarations).

svn path=/trunk/; revision=15758
2005-09-11 21:25:37 +00:00
Guy Harris 9cb86fda9c Squelch various signed vs. unsigned warnings by:
making pointers to byte data be "guint8 *" rather than "char *",
	and making buffers holding byte data arrays of "guint8" rather
	than arrays of "char";

	making pointers to text strings "char *" rather than "guchar *";

	appropriately casting pointers (cast to "guint8 *" when passing
	to routines expecting "guint8 *" or when assigning to "guint8
	*");

	making port-number preferences "guint";

	making enum preferences "gint";

	making hf_ variables "int".

Clean up white space.

svn path=/trunk/; revision=14884
2005-07-09 00:53:17 +00:00
Anders Broman 35be3172ce From : Susanne Edlund
patch for NSIP to fix a bug in packet SNS_DELETE.

svn path=/trunk/; revision=13350
2005-02-08 18:50:05 +00:00
Guy Harris 9fd1400dee Updates from Susanne Edlund.
Remove bogus boilerplate from introductory comment.

svn path=/trunk/; revision=13018
2005-01-13 09:21:04 +00:00
Guy Harris 0e6504201f From Albert Chin: get rid of C99/GCCisms (initializing automatic
structures with non-constant values).

svn path=/trunk/; revision=12861
2004-12-29 22:17:04 +00:00
Anders Broman e29f2ac105 Make the Ericsson internal decode of IP addresses a preference instead of IF DEFS, default off.
svn path=/trunk/; revision=12648
2004-12-01 21:59:03 +00:00
Anders Broman 20404ffaa4 Fix port preference handling.
svn path=/trunk/; revision=12628
2004-11-30 22:11:56 +00:00
Anders Broman 196f22e273 New dissector for NSIP from Susanne Edlund, default port2 changed to unallocated port 19999
svn path=/trunk/; revision=12626
2004-11-30 21:19:25 +00:00