Commit Graph

58 Commits

Author SHA1 Message Date
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 c4b63360dc Fix proto_tree_add_item( encoding args;
Do whitespace cleanup (for a few files).

svn path=/trunk/; revision=39640
2011-10-27 20:30: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 293049dfba Do some conversions of proto_tree_add_item() 'encoding' arg.
(previously missed).

    57   FT_BOOLEAN:       FALSE-->ENC_BIG_ENDIAN
    31   FT_BOOLEAN:       TRUE-->ENC_LITTLE_ENDIAN

    10   FT_BYTES:         ENC_BIG_ENDIAN-->ENC_NA
     1   FT_BYTES:         ENC_LITTLE_ENDIAN-->ENC_NA
    21   FT_BYTES:         FALSE-->ENC_NA
     2   FT_BYTES:         TRUE-->ENC_NA

     2   FT_IPXNET:        ENC_BIG_ENDIAN-->ENC_NA

     6   FT_IPv6:          ENC_BIG_ENDIAN-->ENC_NA
     1   FT_IPv6:          FALSE-->ENC_NA

     6   FT_NONE:          ENC_BIG_ENDIAN-->ENC_NA
    19   FT_NONE:          FALSE-->ENC_NA
     3   FT_NONE:          TRUE-->ENC_NA

     1   FT_STRING:        ENC_BIG_ENDIAN-->ENC_ASCII|ENC_NA
     1   FT_STRING:        ENC_LITTLE_ENDIAN-->ENC_ASCII|ENC_NA
     5   FT_STRING:        FALSE-->ENC_ASCII|ENC_NA
     1   FT_STRING:        TRUE-->ENC_ASCII|ENC_NA

     4   FT_STRINGZ:       ENC_NA-->ENC_ASCII|ENC_NA
     8   FT_STRINGZ:       FALSE-->ENC_ASCII|ENC_NA

     1   FT_INT32:         FALSE-->ENC_BIG_ENDIAN
     1   FT_INT32:         TRUE-->ENC_LITTLE_ENDIAN

    11   FT_UINT8:         0-->ENC_BIG_ENDIAN
   111   FT_UINT8:         FALSE-->ENC_BIG_ENDIAN
    17   FT_UINT8:         TRUE-->ENC_LITTLE_ENDIAN
     1   FT_UINT16:        0-->ENC_BIG_ENDIAN
    68   FT_UINT16:        FALSE-->ENC_BIG_ENDIAN
    18   FT_UINT16:        TRUE-->ENC_LITTLE_ENDIAN
     4   FT_UINT24:        FALSE-->ENC_BIG_ENDIAN
    70   FT_UINT32:        FALSE-->ENC_BIG_ENDIAN
     1   FT_UINT32:        TRUE-->ENC_LITTLE_ENDIAN
     4   FT_UINT64:        FALSE-->ENC_BIG_ENDIAN
     1   FT_UINT64:        TRUE-->ENC_LITTLE_ENDIAN

     1   FT_UINT_STRING:   FALSE-->ENC_ASCII|ENC_BIG_ENDIAN


svn path=/trunk/; revision=39442
2011-10-16 23:38:49 +00:00
Bill Meier 67ee5049d4 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_BOOLEAN
     FT_IPv4
     FT_EUI64
     FT_GUID
     FT_UINT_STRING

Also: For type FT_ITv6 use ENC_NA. (This was missed in SVN #39260)

svn path=/trunk/; revision=39328
2011-10-10 00:39:31 +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 94f36ca4ff Use ENC_NA as encoding for proto_tree_add_item() calls which directly reference an hf item (in hf[] with types:
FT_NONE
   FT_BYTES
   FT_IPV6
   FT_IPXNET
   FT_OID

Note: Encoding field set to ENC_NA only if the field was previously TRUE|FALSE|ENC_LITTLE_ENDIAN|ENC_BIG_ENDIAN

svn path=/trunk/; revision=39260
2011-10-04 22:44:31 +00:00
Chris Maynard 5d2ba02113 From Andrew Feren via bug 6219: Offset calculated incorrectly for sFlow extended data.
svn path=/trunk/; revision=38419
2011-08-08 20:34:18 +00:00
Stephen Fisher a8a7de17ea Improve r36177 per Guy's suggestion at bug #5746 to always call the
PPP-over-HDLC dissector since it will do the check for us to see if
the HDLC framing is present or not.


svn path=/trunk/; revision=36178
2011-03-12 02:06:25 +00:00
Chris Maynard ebe492525f Handle PPP in HDLC framing. Fixes bug 5746.
svn path=/trunk/; revision=36177
2011-03-12 01:32:35 +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 03b57df5a0 Fix various typos and spelling errors.
svn path=/trunk/; revision=35126
2010-12-06 01:34:58 +00:00
Stig Bjørlykke 775daf50ce Getting wrong addr_type from the packet is not a dissector bug.
svn path=/trunk/; revision=34847
2010-11-12 07:54:39 +00:00
Anders Broman ec42f515db From Andrew Feren:
sflow decode error for some extended formats.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5379

svn path=/trunk/; revision=34840
2010-11-11 07:34:07 +00:00
Jeff Morriss 33f116a46d Restore pinfo->private_data after an exception was thrown by a subdissector.
This is necessary in case a subdissector had changed it but was unable to
restore it (due to the exception).

Remove check_col().

svn path=/trunk/; revision=34436
2010-10-08 17:48:22 +00:00
Jeff Morriss cca3ba3ce2 (Refining the regexp...) Replace blurbs that match the name (case insensitive) with NULL.
svn path=/trunk/; revision=34230
2010-09-24 02:51:40 +00:00
Jeff Morriss 0ff5638f37 Replace blurbs that match the name (case insensitive) with NULL.
svn path=/trunk/; revision=34227
2010-09-23 21:46:31 +00:00
Bill Meier 5b9cba54e3 Various relatively small changes:
- #include stdio, stdlib, string not req'd.
- Use less generic macro names for a few defines.
- Fix some gcc -Wshadow warnings.
- Use the "standard idiom" for handling port preferences;
  (Doing port add/delete via a registered_init routine is not req'd).
- fix a typo.


svn path=/trunk/; revision=31900
2010-02-16 21:17:26 +00:00
Jeff Morriss 8634f52025 Add SVN Id tag
svn path=/trunk/; revision=31855
2010-02-10 16:08:16 +00:00
Guy Harris 161c33aadb Don't trust the length field in a V5 sample to be valid.
This appears to fix bug 4473.

svn path=/trunk/; revision=31846
2010-02-09 10:17:53 +00:00
Guy Harris 07922081ff Do all the missing dissectors the same way.
Oh, and there's no dissector registered as "atm" - and, if there were,
it probably wouldn't be able to handle AAL5 packets by themselves, as
you'd probably have to supply pseudo-header information (where does the
VPI/VCI come from, for example?).

This fixes bug 4471.

svn path=/trunk/; revision=31845
2010-02-09 09:52:10 +00:00
Anders Broman c2f165f2e0 Another BASE_NONE.
svn path=/trunk/; revision=31839
2010-02-09 05:55:39 +00:00
Guy Harris f329e32f09 Terminate a value_string, and get rid of a non-ASCII character.
(No ligatures, please.)

svn path=/trunk/; revision=31837
2010-02-08 22:40:27 +00:00
Ronnie Sahlberg 118377ca6b flag two unusued arguments with _U_ to prevent a compiler warning
svn path=/trunk/; revision=31836
2010-02-08 22:35:49 +00:00
Anders Broman b18d2bc900 Fix field base.
svn path=/trunk/; revision=31833
2010-02-08 21:15:54 +00:00
Anders Broman fde5ff4c56 From Yi Yu:
Enhanced sFlow dissector.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3543

svn path=/trunk/; revision=31832
2010-02-08 21:01:21 +00:00
Stig Bjørlykke 31201a01cb Use different abbrev for IPv4 and IPv6 address.
svn path=/trunk/; revision=31433
2010-01-03 15:41:29 +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
Gerald Combs 4f19e431b7 Add some length checks. Fixes bug 3567.
svn path=/trunk/; revision=28897
2009-06-30 20:59:51 +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 edb3d4cc5d From Reinhard Speyerer:
This patch fixes several misspellings/typos in Wireshark SVN revision 28201.

svn path=/trunk/; revision=28225
2009-05-01 07:19:51 +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
Stig Bjørlykke e39edbb176 From Peter (bug 3314):
Fixed some 'longjmp' issues.

svn path=/trunk/; revision=27654
2009-03-08 14:00:09 +00:00
Bill Meier 2f8bc6f65e Minor changes related to reg_handoff_ & proto_register_
svn path=/trunk/; revision=27225
2009-01-13 21:09:03 +00:00
Stig Bjørlykke 64f26048de From Jim Young (bug 3092):
The attached patch changes the label for the sflow.fs.seqno from "Sequence
number:" to "Sample sequence number:".   This change helps differentiate this
particular item from the sflow.sequence_number which also uses the label of
"Sequence number:".

svn path=/trunk/; revision=26902
2008-12-02 09:48:51 +00:00
Jörg Mayer 49026d3ec0 - Make sure we hanlde arrays with length 0 correctly.
- Trivial warning (shadowed variable) fix.

svn path=/trunk/; revision=26900
2008-12-02 08:13:20 +00:00
Stig Bjørlykke 0d51f029bf Initialize sample_enterprise.
svn path=/trunk/; revision=26895
2008-12-01 20:26:11 +00:00
Jörg Mayer 8eafdc0663 - Add some detail infos to the parent trees
- Improve decoding of the enterprise/type field
- Remove some unused code


svn path=/trunk/; revision=26894
2008-12-01 20:04:07 +00:00
Stig Bjørlykke 861a0ac58c Attempt to fix build errors.
svn path=/trunk/; revision=26892
2008-12-01 11:03:28 +00:00
Jörg Mayer 50de995bbc The good:
- Implement the beginnings of sflow5 support.
- Get rid if the inconsistencies regarding return values: Always return
  the offset.
- Make more elements filterable
- Make the naming of elements more consistent (not finished)
- To see what's missing have a look at the TODO section at the beginning
  of the file and search for XXX in the code.

The not so good:
- Only tested with a single sample trace. No extended/expanded data in
  that trace.
- This patch hopefully doesn't break sflow4 support, but I didn't have
  any traces to test with, so please test.
- The names of many filters have changed to make things more consistent.

svn path=/trunk/; revision=26891
2008-12-01 10:03:33 +00:00
Bill Meier 40bd43db83 Minor cleanup (mostly related to proto_reg_handoff...)
svn path=/trunk/; revision=26121
2008-09-02 19:08:29 +00:00
Jaap Keuter e957d8ad1a From Motonori Shindo:
Currently, sFlow dissector only recongnizes "Header" as the packet data type.
This patch enhances it to support "IPv4" and "IPv6" packet data type.

This patch seems to work well against sFlow packets exported from AlaxalA switch.

svn path=/trunk/; revision=25688
2008-07-09 18:37:50 +00:00
Sake Blok a4cec1cf5f From Andrew Ferren (big 2434):
While borrowing code from an other dissector I have worked on I realized I
previously "borrowed" a comment and typo.  Here's a fix.


svn path=/trunk/; revision=24928
2008-04-12 09:35:48 +00:00
Anders Broman 2cd5211e95 From Andrew Feren :
Decoding extended gateway information not implemented for sFlow

svn path=/trunk/; revision=24565
2008-03-05 20:33:19 +00:00
Stig Bjørlykke 28ae535b00 Removed even more "statement not reached" warnings.
svn path=/trunk/; revision=24286
2008-02-07 15:44:45 +00:00
Sake Blok fcdbdcdacb From Andrew Feren:
sFlow datagrams can contain sampled headers from conversations on the network.

Often it is convenient to have wireshark dissect these payload headers, but
doing so can also have undesirable side effects.  Dissected payload headers may
match filters looking for header fields that also happen to occur in the
payload.  This can cause surprising results.

Also TCP analysis will almost always flag errors on sampled headers.  They are,
after all, just a sample and many sequence numbers are sure to be missing.

There is probably a more general way to resolve these issues, but adding
preferences to enable/disable tcp analysis and dissection of sampled headers
will be a good start.  This will make it possible to examine the details of
sampled headers if desired or to disable dissection if the side effects of
dissecting sampled headers cause issues.

svn path=/trunk/; revision=23230
2007-10-19 09:50:29 +00:00
Stig Bjørlykke 5456642ae5 From Andrew Feren:
Add preference to allow user to configure the port(s) to use when identifying
sFlow.

svn path=/trunk/; revision=23153
2007-10-11 22:19:38 +00:00
Jaap Keuter 888cf1130b From Taisuke SASAKI:
I found a misdecoding in dissect_sflow_extended_switch() in epan/dissector/packet-sflow.c and fixed it.

svn path=/trunk/; revision=20187
2006-12-21 22:13:30 +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
Guy Harris 880ef5343a Get rid of a no-longer-used variable.
svn path=/trunk/; revision=15400
2005-08-18 06:40:10 +00:00