aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-sflow.c
AgeCommit message (Collapse)AuthorFilesLines
2014-11-26Remove the use of pinfo->private_data from dissectors that just save it to ↵Michael Mann1-7/+0
restore it. Change-Id: I13197cc48068bb35ee12a7023cfe5f76bbc4e264 Reviewed-on: https://code.wireshark.org/review/5486 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-11-13Add dissector table for sFlow header dissection.Michael Mann1-161/+9
Change-Id: I189a5b2d5f769395fa5e387f8be49b81903fb252 Reviewed-on: https://code.wireshark.org/review/5262 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-10-06Adjust editor modelines to match actual format of the file; Adjust some ↵Bill Meier1-4/+3
whiotespace. Change-Id: If930f2c266b61c9348063eab0189af2582b0a331 Reviewed-on: https://code.wireshark.org/review/4500 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-08-18Don't use -1 as the length of an integer.Guy Harris1-3/+6
That's not supported. Put the unknown enterprise number in a a 4-byte value, as that's what it is, and then just skip to the end of the packet. Change-Id: I2cce84bfbb46a114d4809dbc61a021d497eb87a8 Reviewed-on: https://code.wireshark.org/review/3708 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-09convert to proto_tree_add_subtree[_format]Michael Mann1-20/+12
Change-Id: I8d66b1bc7dbdfee3d4bf6fd3b3c21c6323b66f44 Reviewed-on: https://code.wireshark.org/review/2946 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-20Cleanup display filters reported by checkfiltername.plMichael Mann1-1/+1
Also ensured some files have their correct names at the top so they are more easily grepped Change-Id: Ib0f5ddf14eb1616a93dee496107dc0eb09048825 Reviewed-on: https://code.wireshark.org/review/2452 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-1/+1
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html This reverts commit 246fe2ca4c67d8c98caa84e2f57694f6322e2f96. Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f Reviewed-on: https://code.wireshark.org/review/2430 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-18Fixup: tvb_* -> tvb_capturedDario Lombardo1-1/+1
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-29Introduce 802.11 dissectors with wired-in "FCS present" indications.Guy Harris1-1/+1
For a number of protocols that encapsulate 802.11 frames inside packets, whether the frame includes an FCS or not is specified by the protocol, not by whether the link-layer frame carrying the packets *itself* includes an FCS. As we've done with Ethernet, add "_withfcs" and "_withoutfcs" dissectors, which *don't* check the pseudo-header FCS length indication, and call those, rather than dissectors that check the pseudo-header length indication, from the dissectors for those protocols. Change-Id: Ib8c8ecdd872e1782fdfc66e7573415d91911a62e Reviewed-on: https://code.wireshark.org/review/1866 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2013-12-21Add missing includesJakub Zawadzki1-0/+1
svn path=/trunk/; revision=54332
2013-12-12Create/use two extended value-strings;Bill Meier1-198/+602
Reformat some hf[] entries; Reformat a long line; tabs --> spaces 9to match editor-modelines); Rework/Add whitespace. svn path=/trunk/; revision=53993
2013-12-12Try to fix "initializer element is not computable at load time"Anders Broman1-7/+22
svn path=/trunk/; revision=53962
2013-12-11Trivial: tabs -> spaces.Chris Maynard1-1/+1
svn path=/trunk/; revision=53949
2013-12-11- Make local functions static.Anders Broman1-0/+2
- Forward declaration of register functions. svn path=/trunk/; revision=53941
2013-11-10Add missing includes in order to remove exceptions.h from proto.h (next commit).Jakub Zawadzki1-0/+1
svn path=/trunk/; revision=53230
2013-10-13whitespace fixes; mostly: remove trailing blanksBill Meier1-1/+1
svn path=/trunk/; revision=52591
2013-08-27Use dissector_delete_uint_range/dissector_add_uint_rangeAnders Broman1-17/+3
svn path=/trunk/; revision=51540
2013-08-16Add one 'volatile' keyword to fix a -Wclobbered and change the tree used in oneEvan Huus1-2/+2
proto_tree call to fix a -Wunused-but-set-variable, both of which show up in GCC 4.8. svn path=/trunk/; revision=51386
2013-08-16Use convert_proto_tree_add_text.pl to make many filterable items.Michael Mann1-788/+558
Also some cleanup since the filterable items remove the need for tvb_memcpy of static structures. svn path=/trunk/; revision=51385
2013-07-03expert_add_info + proto_tree_add_text = proto_tree_add_expert, where applicableMichael Mann1-3/+2
svn path=/trunk/; revision=50337
2013-05-27Batch of filterable expert infosMichael Mann1-1/+11
svn path=/trunk/; revision=49600
2013-03-17Fix some Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-2/+0
svn path=/trunk/; revision=48379
2013-02-27Move show_exception() and show_reported_bounds_error() toGuy Harris1-1/+1
epan/show_exception.c, as it's used outside epan/dissectors/packet-frame.c. Update their callers to include <epan/show_exception.h> to get their declaration. Add a CATCH_NONFATAL_ERRORS macro that catches all exceptions that, if there's more stuff in the packet to dissect after the dissector call that threw the exception, doesn't mean you shouldn't go ahead and dissect that stuff. Use it in all those cases, including ones where BoundsError was inappropriately being caught (you want those passed up to the top level, so that the packet is reported as having been cut short in the capture process). Add a CATCH_BOUNDS_ERRORS macro that catches all exceptions that correspond to running past the end of the data for a tvbuff; use it rather than explicitly catching those exceptions individually, and rather than just catching all exceptions (the only place that DissectorError should be caught, for example, is at the top level, so dissector bugs show up in the protocol tree). Don't catch and then immediately rethrow exceptions without doing anything else; just let the exceptions go up to the final catcher. Use show_exception() to report non-fatal errors, rather than doing it yourself. If a dissector is called from Lua, catch all non-fatal errors and use show_exception() to report them rather than catching only ReportedBoundsError and adding a proto_malformed item. Don't catch exceptions when constructing a trailer tvbuff in packet-ieee8023.c - just construct it after the payload has been dissected, and let whatever exceptions that throws be handled at the top level. Avoid some TRY/CATCH/ENDTRY cases by using checks such as tvb_bytes_exist() before even looking in the tvbuff. svn path=/trunk/; revision=47924
2013-01-31Use '#if 0 ... #endif' rather than /** ... **/ to comment outBill Meier1-12/+12
unused hf[] entries (which I should have done in the first place). svn path=/trunk/; revision=47390
2013-01-26Comment out cases of unused hf array entries found by checkhf.Bill Meier1-6/+18
svn path=/trunk/; revision=47302
2012-12-26Fix a bunch of warnings.Guy Harris1-6/+6
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of sizeof. Cast away some implicit 64-bit-to-32-bit conversion errors due to use of strtol() and strtoul(). Change some data types to avoid those implicit conversion warnings. When assigning a constant to a float, make sure the constant isn't a double, by appending "f" to the constant. Constify a bunch of variables, parameters, and return values to eliminate warnings due to strings being given const qualifiers. Cast away those warnings in some cases where an API we don't control forces us to do so. Enable a bunch of additional warnings by default. Note why at least some of the other warnings aren't enabled. randpkt.c and text2pcap.c are used to build programs, so they don't need to be in EXTRA_DIST. If the user specifies --enable-warnings-as-errors, add -Werror *even if the user specified --enable-extra-gcc-flags; assume they know what they're doing and are willing to have the compile fail due to the extra GCC warnings being treated as errors. svn path=/trunk/; revision=46748
2012-10-05The sFlow specification says there's an address type "unknown", with anGuy Harris1-10/+41
address type value of 0, and with zero bytes of address; handle it explicitly, and don't treat it as an error. In the sFlow dissectors, do all the checks for "is this an sFlow packet?" *before* we do anything to the columns and the protocol tree. svn path=/trunk/; revision=45329
2012-10-04fix fuzz test failures in sflowMartin Kaiser1-26/+26
in dissect_sflow_245_address_type(), don't reset the offset to 0 when the address family is unkown bring up an expert info instead and increment offset by the number of bytes processed svn path=/trunk/; revision=45324
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-2/+0
svn path=/trunk/; revision=45017
2012-09-10Initial commit to support yet another method of passing data between dissectors.Jakub Zawadzki1-2/+2
Add new parameter 'data' to heur_dissector_t and new_dissector_t, for now it's always NULL svn path=/trunk/; revision=44860
2012-08-10Use val_to_str_const() where appropriate;Bill Meier1-10/+10
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-06-28Update FSF address - part II.Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=43538
2012-03-21'tab-width/tabstop/tabSize' in editor modelines should really always be 8;Bill Meier1-39/+39
Also: In some cases do some whitespace cleanup and some minor reformatting. svn path=/trunk/; revision=41724
2011-11-08packet_info's in_error_pkt is now a bitfield like in_gre_pkt.Chris Maynard1-3/+3
svn path=/trunk/; revision=39764
2011-10-27Fix proto_tree_add_item( encoding args;Bill Meier1-2/+2
Do whitespace cleanup (for a few files). svn path=/trunk/; revision=39640
2011-10-21For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.Bill Meier1-2/+2
Also: remove trailing whitespace for a number of files. svn path=/trunk/; revision=39503
2011-10-16Do some conversions of proto_tree_add_item() 'encoding' arg.Bill Meier1-3/+3
(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-10 Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-4/+4
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-06Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-132/+132
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-04Use ENC_NA as encoding for proto_tree_add_item() calls which directly ↵Bill Meier1-1/+1
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-08-08From Andrew Feren via bug 6219: Offset calculated incorrectly for sFlow ↵Chris Maynard1-3/+3
extended data. svn path=/trunk/; revision=38419
2011-03-12Improve r36177 per Guy's suggestion at bug #5746 to always call theStephen Fisher1-7/+1
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-12Handle PPP in HDLC framing. Fixes bug 5746.Chris Maynard1-1/+7
svn path=/trunk/; revision=36177
2010-12-20Rename the routines that handle dissector tables with unsigned integerGuy Harris1-2/+2
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-06Fix various typos and spelling errors.Bill Meier1-2/+2
svn path=/trunk/; revision=35126
2010-11-12Getting wrong addr_type from the packet is not a dissector bug.Stig Bjørlykke1-2/+0
svn path=/trunk/; revision=34847
2010-11-11From Andrew Feren:Anders Broman1-143/+131
sflow decode error for some extended formats. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5379 svn path=/trunk/; revision=34840
2010-10-08Restore pinfo->private_data after an exception was thrown by a subdissector.Jeff Morriss1-22/+21
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-09-24(Refining the regexp...) Replace blurbs that match the name (case ↵Jeff Morriss1-2/+2
insensitive) with NULL. svn path=/trunk/; revision=34230