Commit Graph

39 Commits

Author SHA1 Message Date
Bill Meier 3f7e7672c9 Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings.
svn path=/trunk/; revision=38095
2011-07-18 19:11:32 +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 e1420c0799 Fix a few usages of "" in the hfp] array 'blurb' field.
svn path=/trunk/; revision=32811
2010-05-14 18:56:28 +00:00
Balint Reczey 02c98c4517 Decode Circuit ID and Remote ID DSL Forum TR-101 PPPoE tags.
Based on patch from Stefan Puiu <stefan.puiu@gmail.com>.
This fixes bug 3113.

svn path=/trunk/; revision=30908
2009-11-09 15:55:01 +00:00
Balint Reczey 460e086f9e Decode DSL Forum TR-101 PPPoE tags.
This fixes bug 3113.

svn path=/trunk/; revision=30697
2009-10-25 20:11:47 +00:00
Jaap Keuter 8809953430 From Kip McAtee:
Suppress spurious packet length error message for LCP or IPCP in PPPoE. 

svn path=/trunk/; revision=30594
2009-10-18 13:36:01 +00:00
Guy Harris c6893212f1 For TLV items that are a single integral value and thus must have a
certain length:

	attach the expert item to the length field if we're showing it,
	otherwise put in a text item for the malformed TLV and attach
	the expert item to that;

	don't give up, as we'll just skip the bad item and move on to
	the next item.

svn path=/trunk/; revision=29373
2009-08-10 22:15:22 +00:00
Bill Meier a8533d84e5 Initialize a variable to keep GCC happy ....
svn path=/trunk/; revision=29372
2009-08-10 21:46:30 +00:00
Bill Meier d7ecb89489 Validate two tag field lengths before attempting to do proto_tree_add_item();
Fixes bug #3841.

svn path=/trunk/; revision=29371
2009-08-10 21:07:15 +00:00
Kovarththanan Rajaratnam ac463d2697 Don't guard col_clear with col_check
svn path=/trunk/; revision=29346
2009-08-09 08:14:59 +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 85c8e31574 From Kovarththanan Rajaratnam via bug 3548:
More header_field_info cleanup.

From me:
Don't fix the empty name for hf_nisplus_dummy.

svn path=/trunk/; revision=28792
2009-06-21 18:45:56 +00:00
Stig Bjørlykke 9391dce6b2 From Kovarththanan Rajaratnam via bug 3548:
More header_field_info cleanup.

svn path=/trunk/; revision=28772
2009-06-19 02:09:52 +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
Jaap Keuter 179974cccf From Reinhard Speyerer:
This patch fixes several misspellings/typos in Wireshark SVN revision 28201.

svn path=/trunk/; revision=28220
2009-05-01 07:17:10 +00:00
Guy Harris 260f06a9df Put in a comment discussing ways of better handling the FCS in various
protocols.

Clean up white space.

svn path=/trunk/; revision=27542
2009-02-25 11:25:12 +00:00
Stig Bjørlykke 60fd0aaf0b From Kip McAtee (bug 3274):
Don't indicate incorrect Payload Length when having trailing FCS.

svn path=/trunk/; revision=27528
2009-02-23 20:44:11 +00:00
Bill Meier b52d95d591 #include <emem.h> not req'd
svn path=/trunk/; revision=26091
2008-08-26 01:28:50 +00:00
Jaap Keuter 90a37dc34c From Edward J. Paradise:
rfc4938 defines two credit granting mechanisms, out-of-band and inband.  The
current decoding mechanism in packet-pppoe.c only decodes out-of-band credit
grants.  This patches addresses decoding of inband credit as well.  In
addition, I added filters for these tags in the pppoes packets.  Previously,
the common pppoe filters were under the pppoed filter registration, but now
since there are pppoed and pppoes filters, I moved them out on their own.

svn path=/trunk/; revision=26009
2008-08-13 21:32:09 +00:00
Jeff Morriss 1ddf33b720 From Edward J. Paradise via
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2693 :

The rfc4938bis draft extends the Point-to-Point over Ethernet (PPPoE) protocol
with an optional credit-based flow control mechanism and an optional Link
Quality Metric report.  These optional extensions improve the performance of
PPPoE over media with variable bandwidth and limited buffering, such as mobile
point-to-point radio links.

Support for rfc4938 already exists in wireshark, but rfc4938bis specifies a new
credit scale factor TLV and the use of the reserved field of the PADQ to
specify max and current data-rate scaling.

svn path=/trunk/; revision=25768
2008-07-19 15:04:20 +00:00
Jaap Keuter d463253cc2 From Edward J. Paradise:
The #defines for PADG, PADC, and PADQ are incorrect and these packets are
showing up as unknown.
I would be happy to fix this bug as I would like to enhance the current support
for rfc4938 and rfc4938bis to include filtering and inband credit grant decoding.

svn path=/trunk/; revision=25766
2008-07-18 19:31:01 +00:00
Jeff Morriss 1c4a7f8f30 Remove (no longer needed) forward declaration of handoff function
svn path=/trunk/; revision=25079
2008-04-16 14:15:04 +00:00
Jaap Keuter 10a55966b2 Fix for bug 2458:
Adding dissection for more recent PPPoE tags.

svn path=/trunk/; revision=25031
2008-04-14 22:32:17 +00:00
Sake Blok 0446fc0d94 Fix for bug 2202, when an ethernet frame with padding is encountered, the
reported length is 46, so there was a one-off error in the code.


svn path=/trunk/; revision=24244
2008-02-02 09:21:09 +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
Guy Harris 522053f04b tvb_reported_length() returns a gint, so assign its value to a gint.
svn path=/trunk/; revision=22773
2007-09-02 23:51:51 +00:00
Guy Harris 6b45c4179d The actual length of the PPPoE payload is returned by
tvb_reported_length_remaining(), not by tvb_length_remaining() -
tvb_length_remaining() shows only the amount of *captured* data
remaining, but the capture might have been done with a snapshot length
that cut the packet data short.

The payload length from the PPPoE header could legitimately be different
from the actual length of the PPPoE payload if there's not enough PPPoE
payload to avoid padding at the E(thernet) level.  Only complain if
there shouldn't have been any padding.

Report an "expert" warning if the payload length looks wrong.

Update a comment to reflect current reality (as of many many years ago,
when we went all-tvbuff).

svn path=/trunk/; revision=22770
2007-09-02 22:49:56 +00:00
Jeff Morriss 3dec62b85c - s/ntohs/g_ntohs
- s/ntohl/g_ntohl
- s/free/g_free
- Change some tvb_get_string()+g_free()'s into tvb_get_ephemeral_string()
- Change some tvb_fake_unicode()+g_free()'s into tvb_get_ephemeral_faked_unicode()
- Change some tvb_get_string() calls that were clearly memory leaks (like
  atoi(tvb_get_string(...))) into tvb_get_ephemeral_string()

svn path=/trunk/; revision=22515
2007-08-15 22:27:52 +00:00
Stephen Fisher 3700141ae2 Report inaccurate PPPoE Session payload length when detected to aid in the
troubleshooting of malformed packets.


svn path=/trunk/; revision=20203
2006-12-22 22:15:38 +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 a9a437d64a From Martin M various updates and fixes
Hi, Some tiddly changes: pppoe- don't create an empty discovery tags tree when the payload length is 0 chap- make chap.value work as a filterable field rtcp- append the packet type to the protocol tree name 


svn path=/trunk/; revision=16712
2005-12-07 00:35:16 +00:00
Guy Harris a195a01dab Don't show the tag twice.
svn path=/trunk/; revision=16612
2005-11-28 00:48:17 +00:00
Guy Harris 96c2884641 Host-Uniq is binary, not text.
FT_BYTES items don't have a base - the bytes are always dumped in hex -
so use BASE_NONE with them.

svn path=/trunk/; revision=16611
2005-11-28 00:41:01 +00:00
Anders Broman b0e921a5e0 From Martin Mathieson:
Here is a patch to the PPPoED and PPPoES dissectors.
- All fields are now filterable
- General prettification
- I've added a preference to PPoED to set whether or not tag values and data lengths should be shown in the tree (default is OFF)

svn path=/trunk/; revision=16582
2005-11-25 06:23:04 +00:00
Guy Harris f6ef22c553 Have show_exception() take a "const char *" as its exception message,
and not free the string to which it points.  Pass to
REPORT_DISSECTOR_BUG() strings allocated with ep_strdup_printf(), so
that they're freed automatically.

svn path=/trunk/; revision=16039
2005-09-28 16:16:37 +00:00
Guy Harris b7b80d94be Move a pile of protocol-related headers from the top-level source
directory to the epan directory.  Some of them should perhaps ultimately
be moved to epan/dissectors, if they pertain only to stuff exported by a
particular dissector.

Fix Gerald's e-mail address in files we're moving.

svn path=/trunk/; revision=15844
2005-09-17 00:02:31 +00:00
Guy Harris ab797734dd Get rid of the private "my_match_strval()" routine in many dissectors;
add a "match_strval_idx()" routine that does the same thing, and have
"match_strval()" call it.

Make those routines, and "val_to_str()", return a "const" pointer. 
Update dissectors as necessary to squelch compiler warnings produced by
that.

Use "val_to_str()" rather than using "match_strval()" and then, if the
result is null, substituting a specific string.  Clean up some other
"match_strval()"/"val_to_str()" usages.

Add a null pointer check in the NDPS dissector's "attribute_value()"
routine, as it's not clear that "global_attribute_name" won't be null at
that point.

Make some global variables in the AFS4INT dissector local.

Make some routines not used outside the module they're in static.

Make some tables "static const".

Clean up white space.

Fix Gerald's address in some files.

svn path=/trunk/; revision=14786
2005-06-26 19:56:52 +00:00
Ulf Lamping fdb5b1af02 just to get things straight: a dissector should *never* do any g_assert() calls!
in a simple approach, I've replaced all g_assert() and g_assert_not_reached() calls by their exception throwing counterparts DISSECTOR_ASSERT() and DISSECTOR_ASSERT_NOT_REACHED()

this will replace application crash by showing a dissector bug, which is the desired behaviour

there were some g_assert calls in the protocol registering functions, which might not be acting as expected now, but to be able to simply search for g_assert in the future I've replaced that calls too

one g_assert remained, the one when someone throws an unknown exception "into" packet_frame.c, but IMHO this one should remain.

svn path=/trunk/; revision=14608
2005-06-10 18:28:22 +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