aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ceph.c
AgeCommit message (Collapse)AuthorFilesLines
2015-05-25ceph: remove an unnecessary DISSECTOR_ASSERTEvan Huus1-1/+0
coverity picked up on this being effectively dead code, and it's trivial to prove it will never trigger Change-Id: I5a2893671a764914f483d4ff6bcc835c9b0d3b28 Reviewed-on: https://code.wireshark.org/review/8615 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-04-30Fix some cases where we're shifting a signed 1 left.Guy Harris1-50/+50
Shift 1U instead, to make sure it's unsigned; the result of, for example, the result of shifting a signed value left is undefined if the value times 2^{shift count} doesn't fit in the *signed* type of the shifted value. That means, in particular, that the result of shifting 1 left by {number of bits in an int - 1} is undefined. (In *practice*, it'll probably be -2^32, with the bit you want set, but that's not guaranteed, and GCC 5.1 seems not to like it.) Change-Id: I0d27565c382a04ceda9eec65f45a430ceb74cf53 Reviewed-on: https://code.wireshark.org/review/8255 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-24ftsanity.py: make it work with modern tsharkPeter Wu1-1/+1
Broken since 4ac2441d7c7371249a3422fc2e67b8ad98aa6631 ("Coalesce "-G fields2" and "-G fields3" into "-G fields"). This patch fixes Python3 compatibility, fixes handling of the changed output and option and prints the faulting line on assertion error. It also updates two dissectors which had tabs in their description, breaking the output. Tested with Python 2.5.6, 2.6.6, 2.7.9, 3.2.6, 3.4.3. Change-Id: Ifcd0d0eb092b357eca357cd53f2e1348ebf8885c Reviewed-on: https://code.wireshark.org/review/7791 Reviewed-by: Gilbert Ramirez <gram@alumni.rice.edu> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-16SE_COPY_ADDRESS -> WMEM_COPY_ADDRESSMichael Mann1-2/+2
Copy addresses with wmem-scope instead of (forced) seasonal scope. All existing instances were converted to wmem_file_scope, but the flexibility is there for other scopes. Change-Id: I8e58837b9ef574ec7dd87e278470d7063ae8c1c2 Reviewed-on: https://code.wireshark.org/review/6564 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-08guid_to_ep_str -> guid_to_strMichael Mann1-1/+1
guid_to_str now uses wmem allocation. Change-Id: I8e48d1a720942fbefbaa6227ae0929cb9f856359 Reviewed-on: https://code.wireshark.org/review/6391 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-07tvb_bytes_to_ep_str -> tvb_bytes_to_strMichael Mann1-1/+1
Change-Id: I79c613cbdd8dc939dd4c29ebc477fb6eefd5bfc4 Reviewed-on: https://code.wireshark.org/review/6371 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-22Fix unknown command tag name [-Wdocumentation-unknown-command]Alexis La Goutte1-1/+1
Change-Id: I6c2564a86e13d9321001856ba1f51681a9f20976 Reviewed-on: https://code.wireshark.org/review/5979 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-2/+0
Specifically: - Set packet.h to be the first wireshark #include after config.h and "system" #includes. packet.h added as an #include in some cases when missing. - Remove some #includes included (directly/indirectly) in packet.h. E.g., glib.h. (Done only for those files including packet.h). - As needed, move "system" #includes to be after config.h and before wireshark #includes. - Rework various #include file specifications for consistency. - Misc. Change-Id: Ifaa1a14b50b69fbad38ea4838a49dfe595c54c95 Reviewed-on: https://code.wireshark.org/review/5923 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-11-29Rename some hf[] display filter names to fix dups.Bill Meier1-8/+8
Change-Id: Ibe932bc37e03194f1801ec4eed4da1ff31370de3 Reviewed-on: https://code.wireshark.org/review/5535 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-06Adjust indentation to match editor modelines; Do other minor whitespace changes.Bill Meier1-1887/+1887
Change-Id: Ic020b2c92db5d14a2be9dc4d35aef4514b8b0353 Reviewed-on: https://code.wireshark.org/review/4502 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-04CEPH: Fix comma at end of enumerator list [-Wpedantic]Alexis La Goutte1-1/+1
Change-Id: I0c04a3d217e75986878b276a1ac82b427de38384 Reviewed-on: https://code.wireshark.org/review/4454 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-09-19Do encoding-arg changes (all benign)Bill Meier1-1/+1
For: - FT_BYTES: Always use just ENC_NA - integral/floating (other than FT_[U]INT8): Do ENC_NA --> ENC_BIG_ENDIAN Also: - FT_UINT... --> FT_UINT8 in a few cases (to match proto_tree_add_item...) - Change one case of incorrect '||' to '|' Change-Id: I427e0e61618ff8faf55691c8a695930f67d455b0 Reviewed-on: https://code.wireshark.org/review/4184 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-08-20proto.h; (try to) fix bug in DISSECTOR_ASSERT_CMP... macros;Bill Meier1-4/+4
Also: re-enable use of DISSECTOR_ASSERT_CMP... macros in packet-ceph.c Change-Id: Icee80381f5c8feb14cfc7e4033bdeb893018ce95 Reviewed-on: https://code.wireshark.org/review/3749 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-08-20packet-ceph.c: Temporarily comment out the use of DISSECTOR_ASSERT_CMP... ↵Bill Meier1-4/+4
macros since they have a bug. Change-Id: I007931980644a9283083052f8c27d553f052470a Reviewed-on: https://code.wireshark.org/review/3743 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-08-20Add more messages for the Ceph protocol.Kevin Cox1-114/+2105
New messages: - Mon Paxos. - Mon Global ID. - Mon Get Version - OSD Ping - Ping - OSD Boot - OSD PG Create. - PG Stats. Other updates: - Documentation for modifying the dissector. - Update assertions to show values. - Replace proto_tree_add_text()/expert_add_info...() by proto_tree_add_expert...(). - Fix a bug: misplaced break. - Do some minor whitespace & other cosmetic changes. Change-Id: Ib19ce509b67fb5e6fb31e82b5a551a9e952a9c6d Reviewed-on: https://code.wireshark.org/review/3623 Petri-Dish: Bill Meier <wmeier@newsguy.com> Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-08-19Fix Ceph packet length determination.Kevin Cox1-12/+18
The authentication string was not being factored in on the length reply. Also there was an issue with different banners. Now the banner length must match what we expect or the packet is rejected. If the banner length changes the protocol is different and we won't be able to parse it anyways. Change-Id: I0c1a7379edaa203042486a0e6f9ce3642427da99 Reviewed-on: https://code.wireshark.org/review/3710 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-08-19ceph: use col_add_str instead of col_set_strEvan Huus1-1/+1
The argument is no longer guaranteed to be a const that hangs around. Bug: 10395 Change-Id: I3c658f6db5927e09a9a38f9ec0fbce153b3e1bc2 Reviewed-on: https://code.wireshark.org/review/3709 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-08-16Fix ISO C does not allow extra ';' outside of a function [-Wpedantic]Alexis La Goutte1-2/+2
Change-Id: Ia956c108d3493e54578247f08ac7b167d8b71f0f Reviewed-on: https://code.wireshark.org/review/3643 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-16Fix comma at end of enumerator list [-Wpedantic]Alexis La Goutte1-4/+4
Change-Id: If8b817e8276bb065a257f209bf5b0f566d9f7907 Reviewed-on: https://code.wireshark.org/review/3641 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-15Remove unneeded #include <epan/prefs.h>; As needed: Add editor-modelines & ↵Bill Meier1-1/+0
adjust whitespaxcce. Change-Id: I6f79357e0f3906f6ccc5b68eb451b69b68636335 Reviewed-on: https://code.wireshark.org/review/3613 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-08-04Initial Ceph Dissector.Kevin Cox1-0/+8539
This is the first version of a Ceph dissector. It is not complete but is far enough along to be helpful to many people working with Ceph. Currently the dissector can fully dissect the Ceph protocol and has support for full dissection of most common messages. For the other messages for which full dissection is not available their metadata is parsed and shown along with the raw data of the different message sections. Change-Id: Ic7917a3d01148c6fe2f9ea2c13ecd09ecc06c2d7 Reviewed-on: https://code.wireshark.org/review/1889 Reviewed-by: Bill Meier <wmeier@newsguy.com>