From: Kevin Cox Date: Fri, 15 Aug 2014 19:27:13 +0000 (-0400) Subject: Remove Old Wireshark Dissectors X-Git-Tag: v0.85~36^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0b2761036fe918051b700687bbc78a87c31b342f;p=ceph.git Remove Old Wireshark Dissectors Remove the two old Wireshark plugins. They do not build and are superseded by the dissector which is inside Wireshark. Signed-Off-By: Kevin Cox --- diff --git a/wireshark/.gitignore b/wireshark/.gitignore deleted file mode 100644 index 69f1bf453095..000000000000 --- a/wireshark/.gitignore +++ /dev/null @@ -1 +0,0 @@ -!*.patch diff --git a/wireshark/ceph-alt/Makefile.am b/wireshark/ceph-alt/Makefile.am deleted file mode 100644 index 76b3e7a11b27..000000000000 --- a/wireshark/ceph-alt/Makefile.am +++ /dev/null @@ -1,126 +0,0 @@ -# Makefile.am -# Automake file for Cisco SS7 Session Management plugin -# Copyright 2004, Duncan Sargeant -# -# $Id: Makefile.am 24488 2008-02-27 16:18:30Z stig $ -# -# Wireshark - Network traffic analyzer -# By Gerald Combs -# Copyright 1998 Gerald Combs -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# - -INCLUDES = -I$(top_srcdir) -I$(includedir) - -include Makefile.common - - -if HAVE_WARNINGS_AS_ERRORS -AM_CFLAGS = -Werror -endif - -plugindir = @plugindir@ - -plugin_LTLIBRARIES = ceph.la -ceph_la_SOURCES = \ - plugin.c \ - moduleinfo.h \ - $(DISSECTOR_SRC) \ - $(DISSECTOR_INCLUDES) -ceph_la_LDFLAGS = -module -avoid-version -ceph_la_LIBADD = @PLUGIN_LIBS@ - -# Libs must be cleared, or else libtool won't create a shared module. -# If your module needs to be linked against any particular libraries, -# add them here. -LIBS = - -# -# Build plugin.c, which contains the plugin version[] string, a -# function plugin_register() that calls the register routines for all -# protocols, and a function plugin_reg_handoff() that calls the handoff -# registration routines for all protocols. -# -# We do this by scanning sources. If that turns out to be too slow, -# maybe we could just require every .o file to have an register routine -# of a given name (packet-aarp.o -> proto_register_aarp, etc.). -# -# Formatting conventions: The name of the proto_register_* routines an -# proto_reg_handoff_* routines must start in column zero, or must be -# preceded only by "void " starting in column zero, and must not be -# inside #if. -# -# DISSECTOR_SRC is assumed to have all the files that need to be scanned. -# -# For some unknown reason, having a big "for" loop in the Makefile -# to scan all the files doesn't work with some "make"s; they seem to -# pass only the first few names in the list to the shell, for some -# reason. -# -# Therefore, we have a script to generate the plugin.c file. -# The shell script runs slowly, as multiple greps and seds are run -# for each input file; this is especially slow on Windows. Therefore, -# if Python is present (as indicated by PYTHON being defined), we run -# a faster Python script to do that work instead. -# -# The first argument is the directory in which the source files live. -# The second argument is "plugin", to indicate that we should build -# a plugin.c file for a plugin. -# All subsequent arguments are the files to scan. -# -plugin.c: $(DISSECTOR_SRC) $(top_srcdir)/tools/make-dissector-reg \ - $(top_srcdir)/tools/make-dissector-reg.py - @if test -n "$(PYTHON)"; then \ - echo Making plugin.c with python ; \ - $(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \ - plugin $(DISSECTOR_SRC) ; \ - else \ - echo Making plugin.c with shell script ; \ - $(top_srcdir)/tools/make-dissector-reg $(srcdir) \ - $(plugin_src) plugin $(DISSECTOR_SRC) ; \ - fi - -# -# Currently plugin.c can be included in the distribution because -# we always build all protocol dissectors. We used to have to check -# whether or not to build the snmp dissector. If we again need to -# variably build something, making plugin.c non-portable, uncomment -# the dist-hook line below. -# -# Oh, yuk. We don't want to include "plugin.c" in the distribution, as -# its contents depend on the configuration, and therefore we want it -# to be built when the first "make" is done; however, Automake insists -# on putting *all* source into the distribution. -# -# We work around this by having a "dist-hook" rule that deletes -# "plugin.c", so that "dist" won't pick it up. -# -#dist-hook: -# @rm -f $(distdir)/plugin.c - -CLEANFILES = \ - ceph \ - *~ - -MAINTAINERCLEANFILES = \ - Makefile.in \ - plugin.c - -EXTRA_DIST = \ - Makefile.common \ - Makefile.nmake \ - moduleinfo.nmake \ - plugin.rc.in diff --git a/wireshark/ceph-alt/Makefile.common b/wireshark/ceph-alt/Makefile.common deleted file mode 100644 index 271b61f2e227..000000000000 --- a/wireshark/ceph-alt/Makefile.common +++ /dev/null @@ -1,31 +0,0 @@ -# Makefile.common for Cisco SS7 Session Management plugin -# Contains the stuff from Makefile.am and Makefile.nmake that is -# a) common to both files and -# b) portable between both files -# -# $Id: Makefile.common 18197 2006-05-21 05:12:17Z sahlberg $ -# -# Wireshark - Network traffic analyzer -# By Gerald Combs -# Copyright 1998 Gerald Combs -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -# the name of the plugin -PLUGIN_NAME = ceph - -# the dissector sources (without any helpers) -DISSECTOR_SRC = \ - packet-ceph.c diff --git a/wireshark/ceph-alt/Makefile.nmake b/wireshark/ceph-alt/Makefile.nmake deleted file mode 100644 index 857e4354bc39..000000000000 --- a/wireshark/ceph-alt/Makefile.nmake +++ /dev/null @@ -1,100 +0,0 @@ -# Makefile.nmake -# nmake file for Wireshark plugin -# -# $Id: Makefile.nmake 24520 2008-03-01 12:31:01Z jake $ -# - -include ..\..\config.nmake -include moduleinfo.nmake - -include Makefile.common - -CFLAGS=/WX /DHAVE_CONFIG_H /I../.. /I../../wiretap $(GLIB_CFLAGS) \ - /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS) - -.c.obj:: - $(CC) $(CFLAGS) -Fd.\ -c $< - -LDFLAGS = $(PLUGIN_LDFLAGS) - -!IFDEF ENABLE_LIBWIRESHARK -LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib -CFLAGS=/DHAVE_WIN32_LIBWIRESHARK_LIB /D_NEED_VAR_IMPORT_ $(CFLAGS) - -DISSECTOR_OBJECTS = $(DISSECTOR_SRC:.c=.obj) - -DISSECTOR_SUPPORT_OBJECTS = $(DISSECTOR_SUPPORT_SRC:.c=.obj) - -OBJECTS = $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS) plugin.obj - -RESOURCE=$(PLUGIN_NAME).res - -all: $(PLUGIN_NAME).dll - -$(PLUGIN_NAME).rc : moduleinfo.nmake - sed -e s/@PLUGIN_NAME@/$(PLUGIN_NAME)/ \ - -e s/@RC_MODULE_VERSION@/$(RC_MODULE_VERSION)/ \ - -e s/@RC_VERSION@/$(RC_VERSION)/ \ - -e s/@MODULE_VERSION@/$(MODULE_VERSION)/ \ - -e s/@PACKAGE@/$(PACKAGE)/ \ - -e s/@VERSION@/$(VERSION)/ \ - -e s/@MSVC_VARIANT@/$(MSVC_VARIANT)/ \ - < plugin.rc.in > $@ - -$(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLUGIN_WITH) $(RESOURCE) - link -dll /out:$(PLUGIN_NAME).dll $(LDFLAGS) $(OBJECTS) $(LINK_PLUGIN_WITH) \ - $(GLIB_LIBS) $(RESOURCE) - -# -# Build plugin.c, which contains the plugin version[] string, a -# function plugin_register() that calls the register routines for all -# protocols, and a function plugin_reg_handoff() that calls the handoff -# registration routines for all protocols. -# -# We do this by scanning sources. If that turns out to be too slow, -# maybe we could just require every .o file to have an register routine -# of a given name (packet-aarp.o -> proto_register_aarp, etc.). -# -# Formatting conventions: The name of the proto_register_* routines an -# proto_reg_handoff_* routines must start in column zero, or must be -# preceded only by "void " starting in column zero, and must not be -# inside #if. -# -# DISSECTOR_SRC is assumed to have all the files that need to be scanned. -# -# For some unknown reason, having a big "for" loop in the Makefile -# to scan all the files doesn't work with some "make"s; they seem to -# pass only the first few names in the list to the shell, for some -# reason. -# -# Therefore, we have a script to generate the plugin.c file. -# The shell script runs slowly, as multiple greps and seds are run -# for each input file; this is especially slow on Windows. Therefore, -# if Python is present (as indicated by PYTHON being defined), we run -# a faster Python script to do that work instead. -# -# The first argument is the directory in which the source files live. -# The second argument is "plugin", to indicate that we should build -# a plugin.c file for a plugin. -# All subsequent arguments are the files to scan. -# -!IFDEF PYTHON -plugin.c: $(DISSECTOR_SRC) moduleinfo.h ../../tools/make-dissector-reg.py - @echo Making plugin.c (using python) - @$(PYTHON) "../../tools/make-dissector-reg.py" . plugin $(DISSECTOR_SRC) -!ELSE -plugin.c: $(DISSECTOR_SRC) moduleinfo.h ../../tools/make-dissector-reg - @echo Making plugin.c (using sh) - @$(SH) ../../tools/make-dissector-reg . plugin $(DISSECTOR_SRC) -!ENDIF - -!ENDIF - -clean: - rm -f $(OBJECTS) $(RESOURCE) plugin.c *.pdb \ - $(PLUGIN_NAME).dll $(PLUGIN_NAME).dll.manifest $(PLUGIN_NAME).lib \ - $(PLUGIN_NAME).exp $(PLUGIN_NAME).rc - -distclean: clean - -maintainer-clean: distclean diff --git a/wireshark/ceph-alt/README.txt b/wireshark/ceph-alt/README.txt deleted file mode 100644 index 7e7337618fc9..000000000000 --- a/wireshark/ceph-alt/README.txt +++ /dev/null @@ -1,49 +0,0 @@ - -This is an alternative Ceph plugin for Wireshark. It's not yet as functional as -the standard plugin. However it is written to conform to the Wireshark coding -guidelines so that at some point in the future it may be possible to make -this a built-in dissector in Wireshark. - -At present the plugin can dissect handshaking and a handful of the many message -types that Ceph servers use. It is port agnostic and attempts to identify who -the sender and receivers are by looking at the messages being passed. I have -tried to make the dissecting code less dependant on the underlying transport -just in case it needs to be ported. - -There is no support for IPv6 addresses yet or CRC checking which I have -removed temporarily to simplifying things. If you look at the code you might -wonder why it does not use the Ceph headers to describe message structure, this -is to avoid the many differences you can find with struct packing that might -break dissection on other platforms supported by Wireshark. - -The plugin has been tested against Wireshark 1.10.0 on Ubuntu precise and -Windows 7 64-bit builds. - -Linux Build - -1. Copy the contents of this directory into the plugins/ceph directory in the - Wireshark source, you will need to create this. -2. From the Wireshark source directory run: - patch -p1 < plugins/ceph/ws-1.10.0.patch -3. Compile Wireshark as normal - ./autogen.sh - ./configure - make - sudo make install - -Windows 7 Build - -Building Wireshark under Windows is rather involved so ideally avoid this! - -If you can't, either patch the source on a Linux machine and copy to your -target machine then follow the standard build instructions or install cygwin -and apply the patch before following normal build instructions. - -Kevin Jones -k.j.jonez@gmail.com -Last Updated: 1st July 2013 - - - - - diff --git a/wireshark/ceph-alt/moduleinfo.h b/wireshark/ceph-alt/moduleinfo.h deleted file mode 100644 index 1218fcf6feca..000000000000 --- a/wireshark/ceph-alt/moduleinfo.h +++ /dev/null @@ -1,16 +0,0 @@ -/* Included *after* config.h, in order to re-define these macros */ - -#ifdef PACKAGE -#undef PACKAGE -#endif - -/* Name of package */ -#define PACKAGE "ceph" - - -#ifdef VERSION -#undef VERSION -#endif - -/* Version number of package */ -#define VERSION "0.0.1" diff --git a/wireshark/ceph-alt/moduleinfo.nmake b/wireshark/ceph-alt/moduleinfo.nmake deleted file mode 100644 index ff67c25b40bc..000000000000 --- a/wireshark/ceph-alt/moduleinfo.nmake +++ /dev/null @@ -1,28 +0,0 @@ -# -# $Id: moduleinfo.nmake 20158 2006-12-19 22:23:37Z jake $ -# - -# The name -PACKAGE=ceph - -# The version -MODULE_VERSION_MAJOR=0 -MODULE_VERSION_MINOR=0 -MODULE_VERSION_MICRO=1 -MODULE_VERSION_EXTRA=0 - -# -# The RC_VERSION should be comma-separated, not dot-separated, -# as per Graham Bloice's message in -# -# http://www.ethereal.com/lists/ethereal-dev/200303/msg00283.html -# -# "The RC_VERSION variable in config.nmake should be comma separated. -# This allows the resources to be built correctly and the version -# number to be correctly displayed in the explorer properties dialog -# for the executables, and XP's tooltip, rather than 0.0.0.0." -# - -MODULE_VERSION=$(MODULE_VERSION_MAJOR).$(MODULE_VERSION_MINOR).$(MODULE_VERSION_MICRO).$(MODULE_VERSION_EXTRA) -RC_MODULE_VERSION=$(MODULE_VERSION_MAJOR),$(MODULE_VERSION_MINOR),$(MODULE_VERSION_MICRO),$(MODULE_VERSION_EXTRA) - diff --git a/wireshark/ceph-alt/packet-ceph.c b/wireshark/ceph-alt/packet-ceph.c deleted file mode 100644 index 41a01fdff966..000000000000 --- a/wireshark/ceph-alt/packet-ceph.c +++ /dev/null @@ -1,2661 +0,0 @@ -/* packet-ceph.c - * Routines for Ceph Protocols - * http://www.ceph.com - * - * Copyright 2013, Kevin Jones - * - * This file contains parts of the original dissector code found in - * the CEPH source tree. The author of that code was not marked. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * $Id$ - */ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include "../../epan/packet.h" -#include "../../epan/tvbuff.h" -#include "../../epan/tvbuff-int.h" -#include "../../epan/prefs.h" -#include "../../epan/range.h" -#include "../../epan/report_err.h" -#include "../../epan/conversation.h" -#include "../../epan/expert.h" -#include "../../epan/dissectors/packet-tcp.h" - -/* Protocol name */ -#define PROTO_TAG_CEPH "CEPHalt" - -/**************************************************************************** - * Global handles - ****************************************************************************/ - -/* Wireshark ID of the CEPH protocol */ -static int g_proto_ceph = -1; - -/* The registered dissector handle */ -static dissector_handle_t g_ceph_handle; - -/* - * The following hf_* variables are used to hold the Wireshark IDs of - * our header fields; they are filled out when we call - * proto_register_field_array() in proto_register_ceph() - */ -static gint hf_header = -1; -static gint hf_banner = -1; -static gint hf_entity_addr = -1; -static gint hf_entity_type = -1; -static gint hf_entity_num = -1; -static gint hf_banner_magic = -1; -static gint hf_banner_version = -1; -static gint hf_entity_erank = -1; -static gint hf_entity_nonce = -1; -static gint hf_sockaddr_in = -1; -static gint hf_sin_family = -1; -static gint hf_sin_port = -1; -static gint hf_sin_addr = -1; -static gint hf_hdr_tag = -1; -static gint hf_hdr_seq_ack = -1; -static gint hf_hdr_seq = -1; -static gint hf_hdr_tid = -1; -static gint hf_hdr_type = -1; -static gint hf_hdr_priority = -1; -static gint hf_hdr_version = -1; -static gint hf_hdr_mon_protocol = -1; -static gint hf_hdr_osd_protocol = -1; -static gint hf_hdr_mds_protocol = -1; -static gint hf_hdr_client_protocol = -1; -static gint hf_hdr_front_len = -1; -static gint hf_hdr_middle_len = -1; -static gint hf_hdr_data_off = -1; -static gint hf_hdr_data_len = -1; -static gint hf_hdr_src = -1; -static gint hf_hdr_crc = -1; -static gint hf_footer = -1; -static gint hf_footer_front_crc = -1; -static gint hf_footer_middle_crc = -1; -static gint hf_footer_data_crc = -1; -static gint hf_footer_sig = -1; -static gint hf_footer_flags = -1; -static gint hf_paxos_version = -1; -static gint hf_featureset_mask = -1; -static gint hf_featureset_id = -1; -static gint hf_featureset_name = -1; -static gint hf_compatset_compat = -1; -static gint hf_compatset_rocompat = -1; -static gint hf_compatset_incompat = -1; - -static gint hf_connect_features = -1; -static gint hf_connect_host_type = -1; -static gint hf_connect_tag = -1; -static gint hf_connect_global_seq = -1; -static gint hf_connect_connect_seq = -1; -static gint hf_connect_protocol_version = -1; -static gint hf_connect_authorizer_protocol = -1; -static gint hf_connect_authorizer_len = -1; -static gint hf_connect_flags = -1; -static gint hf_connect_authentication_key = -1; -static gint hf_monmap = -1; -static gint hf_monmap_version = -1; -static gint hf_monmap_compat = -1; -static gint hf_monmap_epoch = -1; -static gint hf_monmap_name = -1; -static gint hf_monmap_lastchanged = -1; -static gint hf_monmap_created = -1; -static gint hf_monsubscribe = -1; -static gint hf_monsubscribe_name = -1; -static gint hf_monsubscribe_start = -1; -static gint hf_monsubscribe_flags = -1; -static gint hf_monsubscribeack = -1; -static gint hf_monsubscribeack_interval = -1; -static gint hf_mdsbeacon = -1; -static gint hf_mdsbeacon_globalid = -1; -static gint hf_mdsbeacon_state = -1; -static gint hf_mdsbeacon_seq = -1; -static gint hf_mdsbeacon_name = -1; -static gint hf_mdsbeacon_standbyforrank = -1; -static gint hf_mdsbeacon_standbyforname = -1; -static gint hf_auth = -1; -static gint hf_auth_protocol = -1; -static gint hf_auth_authlen = -1; -static gint hf_auth_authbytes = -1; -static gint hf_auth_monmapepoch = -1; -static gint hf_authreply = -1; -static gint hf_authreply_protocol = -1; -static gint hf_authreply_result = -1; -static gint hf_authreply_globalid = -1; -static gint hf_authreply_authlen = -1; -static gint hf_authreply_authbytes = -1; -static gint hf_authreply_msglen = -1; -static gint hf_authreply_msgstring = -1; - -/* These are the ids of the subtrees that we may be creating */ -static gint ett_ceph = -1; -static gint ett_header = -1; -static gint ett_banner = -1; -static gint ett_entity_addr = -1; -static gint ett_front = -1; -static gint ett_footer = -1; -static gint ett_sockaddr_in = -1; -static gint ett_entity_name = -1; -static gint ett_compat = -1; -static gint ett_rocompat = -1; -static gint ett_incompat = -1; - -/**************************************************************************** - * Conversation helper - to find exact matches only - ****************************************************************************/ -static conversation_t* -conv_find_exact(guint32 frame, const address* addr1, guint32 port1, - const address* addr2, guint32 port2) { - conversation_t* conv; - conv = find_conversation(frame, addr1, addr2,PT_TCP, port1, port2, 0); - if (conv != NULL) { - if (ADDRESSES_EQUAL(&conv->key_ptr->addr1, addr1) && - ADDRESSES_EQUAL(&conv->key_ptr->addr2, addr2) && - conv->key_ptr->port1 == port1 && - conv->key_ptr->port2 == port2) - { - return conv; - } - if (ADDRESSES_EQUAL(&conv->key_ptr->addr1, addr2) && - ADDRESSES_EQUAL(&conv->key_ptr->addr2, addr1) && - conv->key_ptr->port1 == port2 && - conv->key_ptr->port2 == port1) - { - return conv; - } - } - return NULL; -} - -/**************************************************************************** - * Entities (aka ceph service endpoints) - * These should match the CEPH_ENTITY_ macros to make conversion easy from - * on the wire formats. - ****************************************************************************/ -typedef enum _entity_type { - ENTITY_TYPE_UNKNOWN = 0x00, - ENTITY_TYPE_MON = 0x01, - ENTITY_TYPE_MDS = 0x02, - ENTITY_TYPE_OSD = 0x04, - ENTITY_TYPE_CLIENT = 0x08, - ENTITY_TYPE_AUTH = 0x20 -} entity_type; - -/* - * This is what we record (within conv state) about each known endpoint. - * Beware that conv_data maintains a pointer to these records so that should - * not be reallocated, see get_entity() for obtaining them. They are shared - * this way so conversations may pass info to each other about endpoints. - */ -typedef struct _entity_data { - entity_type type; - char* name; - address addr; - guint16 port; -} entity_data; - -/* - * Map a entity type to a display string - */ -static const char* -entityTypeDescription(entity_type type) { - switch (type) { - case ENTITY_TYPE_UNKNOWN: - return "?"; - case ENTITY_TYPE_MON: - return "mon"; - case ENTITY_TYPE_MDS: - return "mds"; - case ENTITY_TYPE_OSD: - return "osd"; - case ENTITY_TYPE_CLIENT: - return "client"; - case ENTITY_TYPE_AUTH: - return "auth"; - } - assert(FALSE); - return NULL; -} - -/* - * Test for a valid entity type - */ -static gboolean -isEntityType(guint32 type) { - switch (type) { - case ENTITY_TYPE_MON: - case ENTITY_TYPE_MDS: - case ENTITY_TYPE_OSD: - case ENTITY_TYPE_CLIENT: - case ENTITY_TYPE_AUTH: - return TRUE; - } - return FALSE; -} - -/* - * Find or create a new entity data entry from an address/port pair. - */ -static entity_data* -conv_get_entity(const address* addr, guint32 port) { - conversation_t *conv=NULL; - entity_data *edata; - - /* - * Have we seen this conversation before? We record this as a conversation - * to the same address/port. This is just to help keep the data together. - */ - conv = conv_find_exact(-1, addr, port, addr, port); - if (conv == NULL) { - edata = (entity_data*)se_alloc(sizeof(entity_data)); - edata->type = ENTITY_TYPE_UNKNOWN; - edata->name = NULL; - SE_COPY_ADDRESS(&edata->addr,addr); - edata->port = port; - conv = conversation_new(0, addr, addr, PT_TCP, port, port, 0); - conversation_add_proto_data(conv, g_proto_ceph, edata); - } else { - edata=(entity_data*)conversation_get_proto_data(conv, g_proto_ceph); - } - return edata; -} - -/**************************************************************************** - * Data for tracking messages - * This is mainly to track the startup handling which was confusing in the - * old dissector because the connect_reply would appear before its matching - * request. Here we track in finer granularity and allow for some - * interweaving of messages. Of course the code also needs to handle traces - * which have conversations already running. - ****************************************************************************/ -enum msg_type { - SERVER_BANNER =0x1, /* Server send banner to client */ - CLIENT_BANNER =0x2, /* Client responds to SERVER_BANNER */ - SERVER_ADDRESS =0x4, /* Server sends its & client addresses to client */ - CLIENT_ADDRESS =0x8, /* Client sends it own address to server */ - CONNECT_REQUEST=0x10, /* Client send connection request to server */ - CONNECT_REPLY =0x20, /* Server responds to connect request */ - CONVERSING =0x40 /* All other messages */ -}; -#define MSG_ANY 0xFF /* Accept any type of message */ - -/* - * Per message data, we record these during conversation startup - */ -typedef struct _pdu_data { - guint32 position; /* The stream position msg seen at */ - guint32 toserver; /* To/from the server */ - enum msg_type type; /* The type of this message */ - guint32 seen; /* Cumulative flags of previous messages */ -} pdu_data; - -/* - * Per conversation data, there should be one of these for every detected - * conversation between ceph entities. The to/from direction is arbitrary, - * we probably don't know who the entities are when we establish the - * conversation. - */ -typedef struct _conv_data { - emem_tree_t *pdu_table; /* Message tree, stores accumulated pdu_data */ - entity_data* to; /* Who is this to */ - entity_data* from; /* Who is this from */ - guint direction_set; /* Do we know to/from set correctly */ - char* displayT2F; /* Cached 'to' to 'from' display string */ - char* displayF2T; /* Cached 'from' to 'to' display string */ -} conv_data; - -/* - * Find/create a conversation for the given source & destination - */ -static conv_data* -conv_get(packet_info *pinfo) { - conversation_t* conv; - conv_data* cdata; - - /* Have we seen this conversation before? */ - conv = conv_find_exact(pinfo->fd->num, &pinfo->src, pinfo->srcport, - &pinfo->dst, pinfo->destport); - if (conv == NULL) { - conv = conversation_new(pinfo->fd->num, &pinfo->src, - &pinfo->dst, pinfo->ptype, - pinfo->srcport, pinfo->destport, 0); - conv = conv_find_exact(pinfo->fd->num, &pinfo->src, pinfo->srcport, - &pinfo->dst, pinfo->destport); - } - - cdata=(conv_data*)conversation_get_proto_data(conv, g_proto_ceph); - if (cdata==NULL) { - cdata = (conv_data*)se_alloc(sizeof(conv_data)); - cdata->pdu_table = se_tree_create(EMEM_TREE_TYPE_RED_BLACK, "ceph_pdu"); - cdata->to = conv_get_entity(&pinfo->dst, pinfo->destport); - cdata->from = conv_get_entity(&pinfo->src, pinfo->srcport); - cdata->direction_set = FALSE; - cdata->displayT2F=NULL; - cdata->displayF2T=NULL; - conversation_add_proto_data(conv, g_proto_ceph, cdata); - } - return cdata; -} - -/* - * Reverse to/from in a stream to correct a wrong guess - */ -static void -conv_fixup(guint clientSrc, packet_info *pinfo) { - conversation_t* conv; - conv_data* cdata; - entity_data* edata; - guint fromClient; - pdu_data* pdata; - guint position; - - conv = conv_find_exact(pinfo->fd->num, &pinfo->src, pinfo->srcport, - &pinfo->dst, pinfo->destport); - if (conv != NULL) { - /* Do we need to reverse because from & to mixup */ - cdata=(conv_data*)conversation_get_proto_data(conv, g_proto_ceph); - if (cdata->direction_set==FALSE) { - cdata->direction_set=TRUE; - fromClient = ADDRESSES_EQUAL(&pinfo->src, &cdata->from->addr) && - pinfo->srcport == cdata->from->port; - if (clientSrc != fromClient) { - edata = cdata->from; - cdata->from = cdata->to; - cdata->to = edata; - cdata->displayF2T = NULL; - cdata->displayT2F = NULL; - } - - /* & Reverse pdata as well correcting SERVER_BANNER if needed */ - position = 0xFFFFFFFF; - while ((pdata = (pdu_data*)se_tree_lookup32_le( - cdata->pdu_table, position))!=NULL) { - if (clientSrc != fromClient) - pdata->toserver = !pdata->toserver; - if (pdata->toserver && pdata->type == SERVER_BANNER) { - pdata->type = CLIENT_BANNER; - pdata->seen &= (~SERVER_BANNER); - pdata->seen |= CLIENT_BANNER; - } - position = pdata->position -1; - } - } - } -} - -/* - * Calculate the stream index for a given offset - */ -static guint32 -conv_position(packet_info *pinfo, tvbuff_t *tvb, guint32 offset) { - return pinfo->fd->cum_bytes - tvb_reported_length_remaining (tvb, offset); -} - -static guint32 -conv_expecting(packet_info *pinfo, tvbuff_t *tvb, guint32 offset) { - conv_data* cdata; - pdu_data* pdata; - guint32 allowed; - guint32 position; - - cdata = conv_get(pinfo); - - /* - * Return what should be happening next - */ - position = conv_position(pinfo, tvb, offset); - pdata = (pdu_data*)se_tree_lookup32_le(cdata->pdu_table, position); - - /* - * If new may see any message type - */ - if (pdata == 0) - return MSG_ANY; - - /* - * If exact match, return what we actually saw in previous dissect - */ - if (pdata->position == position) - return pdata->type; - - /* - * Otherwise, work out what could be next, the difficulty here is that - * the client banner may appear before or after the server sends its - * addresses and also that we me mistake a client banner for a server - * banner - */ - allowed = 0; - switch (pdata->type) { - case SERVER_BANNER: - return (CLIENT_BANNER | SERVER_ADDRESS | CLIENT_ADDRESS); - case CLIENT_BANNER: - if ((pdata->seen & SERVER_ADDRESS) == 0) - allowed = SERVER_ADDRESS; - allowed |= CLIENT_ADDRESS; - break; - case SERVER_ADDRESS: - if ((pdata->seen & CLIENT_BANNER) == 0) - allowed = CLIENT_BANNER; - allowed |= CLIENT_ADDRESS; - break; - case CLIENT_ADDRESS: - allowed = CONNECT_REQUEST; - break; - case CONNECT_REQUEST: - allowed = CONNECT_REPLY; - break; - case CONNECT_REPLY: - default: - allowed = CONVERSING; - } - return allowed; -} - -/* - * Tag a position in a conversation as a specific type - */ -static void -conv_tag(packet_info *pinfo, tvbuff_t *tvb, - guint32 offset, enum msg_type type) { - conv_data* cdata; - pdu_data* pdata; - pdu_data* previous_pdata; - guint32 position; - - /* - * Get/Create a pdu_data to describe the message - */ - cdata = conv_get(pinfo); - position = conv_position(pinfo, tvb, offset); - pdata = (pdu_data*)se_tree_lookup32(cdata->pdu_table, position); - - if (pdata == 0) { - pdata = (pdu_data*)se_alloc(sizeof(pdu_data)); - pdata->position = position; - pdata->toserver = (ADDRESSES_EQUAL(&cdata->to->addr, &pinfo->dst) && - cdata->to->port == pinfo->destport); - pdata->type = type; - pdata->seen = type; - - /* - * If new we have to carry forward previously seen to allow for - * checking on interleaving of messages, a pain I know.. - */ - previous_pdata = (pdu_data*)se_tree_lookup32_le(cdata->pdu_table, - position-1); - if (previous_pdata != 0) { - pdata->seen |= previous_pdata->seen; - } - - /* - * Insert new record - */ - se_tree_insert32(cdata->pdu_table, position, pdata); - - } else { - /* - * Just update the existing record - */ - pdata->type = type; - pdata->seen |= type; - } -} - -static void -conv_setfrom(packet_info *pinfo, entity_type type) { - conv_data* cdata; - - cdata = conv_get(pinfo); - cdata->from->type = type; - cdata->displayT2F = NULL; - cdata->displayF2T = NULL; -} - -static char* -conv_format(const entity_data* from, const entity_data* to) { - const char* from_name; - const char* to_name; - - from_name = entityTypeDescription(from->type); - if (from->name) { - from_name = se_strdup_printf("%s.%s", - entityTypeDescription(from->type), from->name); - } - - to_name = entityTypeDescription(to->type); - if (to->name) { - to_name = se_strdup_printf("%s.%s", - entityTypeDescription(to->type), to->name); - } - - return se_strdup_printf("%s -> %s", from_name, to_name); -} - -/* - * Get conversation display string - */ -static char* -conv_display(packet_info *pinfo) { - conv_data* cdata; - guint to; - - cdata = conv_get(pinfo); - to = ADDRESSES_EQUAL(&cdata->to->addr, &pinfo->dst) && - cdata->to->port == pinfo->destport; - - if (to) { - if (cdata->displayF2T == NULL) { - cdata->displayF2T = conv_format(cdata->from, cdata->to); - } - return cdata->displayF2T; - } else { - if (cdata->displayT2F == NULL) { - cdata->displayT2F = conv_format(cdata->to, cdata->from); - } - return cdata->displayT2F; - } -} - -/* - * Sockaddr details extracted from protocol - * Note: Don't map from tvb, only assign to avoid portability concerns - */ -typedef struct _sockaddr_info { - guint16 port; - guint32 addr; -} sockaddr_info; - -/* - * Entity info as extracted from protocol - * Note: Don't map from tvb, only assign to avoid portability concerns - */ -typedef struct _entity_info { - guint32 erank; - guint32 nonce; - sockaddr_info addr; -} entity_info; - -/* - * Recover conversation entity data from entity_info - */ -static entity_data* -conv_get_entity_frominfo(entity_info* info) { - address addr; - - SET_ADDRESS(&addr, AT_IPv4, sizeof(info->addr.addr), &info->addr.addr); - return conv_get_entity(&addr, info->addr.port); -} - -/* - * Set type & name for an entity - * nameOffset is offset into tvb of where to find FT_UINT_STRING - */ -static void -conv_set_entity_name(entity_data* edata, tvbuff_t *tvb, - guint32 nameOffset, entity_type type) { - guint32 len; - - if (type != ENTITY_TYPE_UNKNOWN) - edata->type = type; - - /* Same name? */ - len = tvb_get_letohl(tvb, nameOffset); - if (edata->name) { - if (strlen(edata->name) == len && - tvb_memeql(tvb, nameOffset+4, edata->name, len)) { - return; - } - } - edata->name = (char*)se_alloc(len+1); - tvb_memcpy(tvb, edata->name, nameOffset+4,len); - edata->name[len]=0; -} - -/**************************************************************************** - * INFO Column helpers - ****************************************************************************/ - -/* - * Flag for controlling formatting of INFO column handling, this needs - * a manual reset before decoding possible multiple PDUs - */ -static guint g_firstPdu; - -/* - * Helper to prepare for a PDU display by setting info column. - */ -static void -setPDUInfo(packet_info *pinfo, const char* info) { - - /* - * Reset info column, with a fence to stop being changed by other PDUs that - * might be contained in the same packet. - */ - if(check_col(pinfo->cinfo,COL_INFO)){ - if (g_firstPdu == TRUE) - col_add_fstr(pinfo->cinfo, COL_INFO, " %s", info); - else - col_add_fstr(pinfo->cinfo, COL_INFO, ", %s", info); - col_set_fence(pinfo->cinfo,COL_INFO); - } -} - - -/**************************************************************************** - * Start of dissector handlers - * NOTES: - * The coding style is odd, we avoid the normal use of structures to describe - * on the wire formats because of the difficulty of getting *all* compilers - * to handle the packing correctly. Wireshark coding style prefers direct - * decoding so that is what we do. I have included structures in comments - * just to make it easier to understand what the code is pulling apart. - * - * The dissector functions *may* check the data contents for sanity to allow - * them to be used where the content type is ambiguous. If the data provided - * can not be for that dissector the return will be 0. If there is not enough - * data then they return -1. Otherwise they return the number of bytes they - * consumed so they can be used to dissect multiple PDUs per packet. - * - ****************************************************************************/ - -/* - * Message tag types, numbers must match protocol - * There are two types of tags here, most are used with connect_reply to - * indicate status, but CLOSE, MSG, ACK & KEEPALIVE tags are used for - * standalone messages. TAG_SEQ is another oddball, it indicates the server - * is requesting an exhachange of sequence numbers following the connect_reply. - */ -enum msg_tag { - MSGR_TAG_MIN=1, - MSGR_TAG_READY=1, /* S->C: ready for messages */ - MSGR_TAG_RESETSESSION=2, /* S->C: reset, try again */ - MSGR_TAG_WAIT=3, /* S->C: wait for racing incoming connection */ - MSGR_TAG_RETRY_SESSION=4, /* S->C + cseq: try again with higher cseq */ - MSGR_TAG_RETRY_GLOBAL=5, /* S->C + gseq: try again with higher gseq */ - MSGR_TAG_CLOSE=6, /* closing pipe */ - MSGR_TAG_MSG=7, /* message */ - MSGR_TAG_ACK=8, /* message ack */ - MSGR_TAG_KEEPALIVE=9, /* just a keepalive byte! */ - MSGR_TAG_BADPROTOVER=10, /* bad protocol version */ - MSGR_TAG_BADAUTHORIZER=11, /* bad authorizer */ - MSGR_TAG_FEATURES=12, /* insufficient features */ - MSGR_TAG_SEQ=13, /* 64-bit int follows with seen seq number */ - MSGR_TAG_MAX=13 -}; - -static guint -isMsgrTag(guint tag) { - return (tag>=MSGR_TAG_MIN && tag<=MSGR_TAG_MAX); -} - -static guint -isMsgrConnectTag(guint tag) { - return isMsgrTag(tag) && - (tag != MSGR_TAG_CLOSE) && - (tag != MSGR_TAG_MSG) && - (tag != MSGR_TAG_ACK) && - (tag != MSGR_TAG_KEEPALIVE); -} - -static const char* -replyTagDescription(guint tag) { - switch (tag) { - case MSGR_TAG_READY: return "Ready"; - case MSGR_TAG_RESETSESSION: return "Reset Session"; - case MSGR_TAG_WAIT: return "Wait"; - case MSGR_TAG_RETRY_SESSION: return "Retry Session"; - case MSGR_TAG_RETRY_GLOBAL: return "Retry Global"; - case MSGR_TAG_BADPROTOVER: return "Bad Protocol"; - case MSGR_TAG_BADAUTHORIZER: return "Bad Authorizer"; - case MSGR_TAG_FEATURES: return "Missing Features"; - case MSGR_TAG_SEQ: return "Sequence"; - } - return NULL; -} - -/**************************************************************************** - * Handshake handling (Banners & Addresses) - ****************************************************************************/ - -#define CEPH_BANNER "ceph v027" -#define CEPH_BANNER_LEN (sizeof(CEPH_BANNER)-1) -#define CEPH_BANNER_MAGIC_LEN 4 - -/* - * Dissect a banner, this can be used in either direction, client to server - * or server to client. - */ -static gint -dissect_banner(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, - guint offset, guint client) -{ - proto_tree *ceph_banner_tree = NULL; - proto_item *ceph_sub_item = NULL; - - if (tvb_strneql(tvb, offset, CEPH_BANNER, CEPH_BANNER_LEN) == 0) { - - /* All OK, just show the banner */ - setPDUInfo(pinfo, client?"Client Banner":"Server Banner"); - ceph_sub_item = proto_tree_add_item( tree, hf_banner, tvb, offset, - CEPH_BANNER_LEN, TRUE ); - ceph_banner_tree = proto_item_add_subtree(ceph_sub_item, ett_banner); - proto_tree_add_item(ceph_banner_tree, hf_banner_magic, tvb, offset, - CEPH_BANNER_MAGIC_LEN, TRUE); - proto_tree_add_item(ceph_banner_tree, hf_banner_version, tvb, offset+ - CEPH_BANNER_MAGIC_LEN, CEPH_BANNER_LEN-CEPH_BANNER_MAGIC_LEN, TRUE); - - return CEPH_BANNER_LEN; - } else if (tvb_reported_length_remaining (tvb, offset) >= - (gint)CEPH_BANNER_LEN) { - /* Enough data, but not a banner */ - return 0; - } else { - /* Not enough data */ - return -1; - } -} - -/* - * Supported family types, these are defined here for portability. - */ -typedef enum _families { - CEPH_AF_INET=2, - CEPH_AF_INET6=10 -} families; - -static guint -isFamily(guint32 family) { - return ((family==CEPH_AF_INET) || (family==CEPH_AF_INET6)); -} - -static const char* -familyDescription(guint family) { - switch (family) { - case CEPH_AF_INET: return "inet V4"; - case CEPH_AF_INET6: return "inet V6"; - } - return NULL; -} - -/* - * Storage structure for addresses, can really only be AF_INET or AF_INET6 - * but this is the structure used by the protocol. - * -struct ceph_sockaddr_storage { - guint16 ss_family; - guint8 __ss_pad1[6]; - guint64 __ss_align; - guint8 __ss_pad2[112]; -} -*/ -#define SIZE_OF_SOCKADDR_STORAGE (2+6+8+112) - -/* - * Dissect a sockaddr_storage. This may be a IPv4 or IPv6 format but currently - * only IPv4 is handled. - */ -static gint -dissect_sockaddr_in(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, - guint offset, sockaddr_info* info) -{ - proto_tree *ceph_sockaddr_tree; - proto_item *ceph_sub_item = NULL; - guint16 family; - - ceph_sub_item = proto_tree_add_item( tree, hf_sockaddr_in, tvb, offset, - 16, TRUE ); - ceph_sockaddr_tree = proto_item_add_subtree(ceph_sub_item, ett_sockaddr_in); - - family = tvb_get_ntohs(tvb, offset); - if (family == CEPH_AF_INET6) { - expert_add_info_format(pinfo, ceph_sub_item, PI_UNDECODED, PI_WARN, - "Address using IPv6 addressing, dissecting is not yet supported"); - } else if (family == CEPH_AF_INET) { - proto_tree_add_uint_format_value(ceph_sockaddr_tree, hf_sin_family, tvb, - offset, 2, family, "%d (%s)", family, familyDescription(family)); - proto_tree_add_item(ceph_sockaddr_tree, hf_sin_port, tvb, offset+2, - 2, ENC_BIG_ENDIAN); - proto_tree_add_item(ceph_sockaddr_tree, hf_sin_addr, tvb, offset+4, - 4, FALSE); - if (info) { - info->port = tvb_get_ntohs(tvb, offset+2); - info->addr = tvb_get_letohl(tvb, offset+4); - } - } else { - expert_add_info_format(pinfo, ceph_sub_item, PI_UNDECODED, PI_WARN, - "Unknown family (%d) being used in address", family); - } - offset += 16; - return offset; -} - -/* - * entity_addr - endpoint details including IP address - * -struct ceph_entity_addr { - guint32 type; - guint32 nonce; // unique id for process (e.g. pid) - struct ceph_sockaddr_storage in_addr; -}; -*/ -#define SIZE_OF_ENTITY_ADDR (4+4+SIZE_OF_SOCKADDR_STORAGE) - -/* - * Dissect an entity address, just a type - */ -static gint -dissect_entity_addr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, - guint offset, entity_info* info) -{ - proto_tree *ceph_entity_tree = NULL; - proto_item *ceph_sub_item = NULL; - guint16 family; - - /* Check the sockaddr_in looks sane before full decoding */ - if (tvb_reported_length_remaining (tvb, offset) < SIZE_OF_ENTITY_ADDR) - return -1; - - /* TODO: Could really do with better sanity checking here */ - family = tvb_get_ntohs(tvb, offset+8); - if (family != CEPH_AF_INET && family!= CEPH_AF_INET6) { - return 0; - } - - /* Decode it */ - if (tree) { - ceph_sub_item = proto_tree_add_item( tree, hf_entity_addr, tvb, offset, - SIZE_OF_ENTITY_ADDR, TRUE ); - ceph_entity_tree = proto_item_add_subtree(ceph_sub_item, - ett_entity_addr); - proto_tree_add_item(ceph_entity_tree, hf_entity_erank, tvb, offset, - 4, TRUE); - proto_tree_add_item(ceph_entity_tree, hf_entity_nonce, tvb, offset+4, - 4, TRUE); - } - - dissect_sockaddr_in(tvb, pinfo, ceph_entity_tree, offset+8, - info? &info->addr:NULL); - - if (info) { - info->erank = tvb_get_letohl(tvb, offset); - info->nonce = tvb_get_letohl(tvb, offset+4); - } - - return SIZE_OF_ENTITY_ADDR; -} - -/* - * server-address - passed from server to client during handshake - * -struct ceph_server_address { - struct ceph_entity_addr server_addr; - struct ceph_entity_addr client_addr; -}; -*/ -static gint -dissect_server_address(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, - guint offset) { - gint len1; - gint len2; - - len1 = dissect_entity_addr(tvb, pinfo, tree, offset, NULL); - if (len1 > 0) { - offset += len1; - len2 = dissect_entity_addr(tvb, pinfo, tree, offset, NULL); - if (len2>0) { - setPDUInfo(pinfo, "Server Addresses"); - conv_fixup(FALSE, pinfo); - return len1+len2; - } - return len2; - } - return len1; -} - -/* - * client-address - passed from client to server during handshake - * -struct ceph_client_address { - struct ceph_entity_addr client_addr; -}; -*/ -static gint -dissect_client_address(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, - guint offset) { - gint len; - - /* To avoid identifying a server address as a client address we rely on the - * server sending its data un-fragmented after a banner, so either we have - * data for two valid addresses or this must be a client address. - */ - if (tvb_reported_length_remaining (tvb, offset) >= 2*SIZE_OF_ENTITY_ADDR) { - /* Might be a server address, peek to see */ - if (isFamily(tvb_get_ntohs(tvb, offset+8)) && - isFamily(tvb_get_ntohs(tvb, offset+SIZE_OF_ENTITY_ADDR+8))) - return 0; - } - - /* Is it just a client addr */ - len=dissect_entity_addr(tvb, pinfo, tree, offset, NULL); - if (len>0) { - setPDUInfo(pinfo,"Client Address"); - conv_fixup(TRUE, pinfo); - } - return len; -} - - -/**************************************************************************** - * Connection Request & Reply - ****************************************************************************/ - -/* - * msg_connect - Client->Server connection request - * -struct ceph_msg_connect { - guint64 features; // supported feature bits - guint32 host_type; // CEPH_ENTITY_TYPE_* - guint32 global_seq; // count connections initiated by this host - guint32 connect_seq; // count connections initiated in this session - guint32 protocol_version; - guint32 authorizer_protocol; - guint32 authorizer_len; - guint8 flags; // CEPH_MSG_CONNECT_* -} -*/ -#define SIZE_OF_MSG_CONNECT (8+4+4+4+4+4+4+1) - -#define FEATURE_UID G_GINT64_CONSTANT(1<<0) -#define FEATURE_NOSRCADDR G_GINT64_CONSTANT(1<<1) -#define FEATURE_MONCLOCKCHECK G_GINT64_CONSTANT(1<<2) -#define FEATURE_FLOCK G_GINT64_CONSTANT(1<<3) -#define FEATURE_SUBSCRIBE2 G_GINT64_CONSTANT(1<<4) -#define FEATURE_MONNAMES G_GINT64_CONSTANT(1<<5) -#define FEATURE_RECONNECT_SEQ G_GINT64_CONSTANT(1<<6) -#define FEATURE_DIRLAYOUTHASH G_GINT64_CONSTANT(1<<7) -#define FEATURE_OBJECTLOCATOR G_GINT64_CONSTANT(1<<8) -#define FEATURE_PGID64 G_GINT64_CONSTANT(1<<9) -#define FEATURE_INCSUBOSDMAP G_GINT64_CONSTANT(1<<10) -#define FEATURE_PGPOOL3 G_GINT64_CONSTANT(1<<11) -#define FEATURE_OSDREPLYMUX G_GINT64_CONSTANT(1<<12) -#define FEATURE_OSDENC G_GINT64_CONSTANT(1<<13) -#define FEATURE_OMAP G_GINT64_CONSTANT(1<<14) -#define FEATURE_MONENC G_GINT64_CONSTANT(1<<15) -#define FEATURE_QUERY_T G_GINT64_CONSTANT(1<<16) -#define FEATURE_INDEP_PG_MAP G_GINT64_CONSTANT(1<<17) -#define FEATURE_CRUSH_TUNABLES G_GINT64_CONSTANT(1<<18) -#define FEATURE_CHUNKY_SCRUB G_GINT64_CONSTANT(1<<19) -#define FEATURE_MON_NULLROUTE G_GINT64_CONSTANT(1<<20) -#define FEATURE_MON_GV G_GINT64_CONSTANT(1<<21) -#define FEATURE_BACKFILL_RESERVATION G_GINT64_CONSTANT(1<<22) -#define FEATURE_MSG_AUTH G_GINT64_CONSTANT(1<<23) -#define FEATURE_RECOVERY_RESERVATION G_GINT64_CONSTANT(1<<24) -#define FEATURE_CRUSH_TUNABLES2 G_GINT64_CONSTANT(1<<25) -#define FEATURE_CREATEPOOLID G_GINT64_CONSTANT(1<<26) -#define FEATURE_REPLY_CREATE_INODE G_GINT64_CONSTANT(1<<27) -#define FEATURE_OSD_HBMSGS G_GINT64_CONSTANT(1<<28) -#define FEATURE_MDSENC G_GINT64_CONSTANT(1<<29) -#define FEATURE_OSDHASHPSPOOL G_GINT64_CONSTANT(1<<30) -#define FEATURE_MON_SINGLE_PAXOS G_GINT64_CONSTANT(1<<31) -#define FEATURE_OSD_SNAPMAPPER G_GINT64_CONSTANT(0x100000000) - -#define FEATURES_ALL \ - (FEATURE_UID | \ - FEATURE_NOSRCADDR | \ - FEATURE_MONCLOCKCHECK | \ - FEATURE_FLOCK | \ - FEATURE_SUBSCRIBE2 | \ - FEATURE_MONNAMES | \ - FEATURE_RECONNECT_SEQ | \ - FEATURE_DIRLAYOUTHASH | \ - FEATURE_OBJECTLOCATOR | \ - FEATURE_PGID64 | \ - FEATURE_INCSUBOSDMAP | \ - FEATURE_PGPOOL3 | \ - FEATURE_OSDREPLYMUX | \ - FEATURE_OSDENC | \ - FEATURE_OMAP | \ - FEATURE_QUERY_T | \ - FEATURE_MONENC | \ - FEATURE_INDEP_PG_MAP | \ - FEATURE_CRUSH_TUNABLES | \ - FEATURE_CHUNKY_SCRUB | \ - FEATURE_MON_NULLROUTE | \ - FEATURE_MON_GV | \ - FEATURE_BACKFILL_RESERVATION | \ - FEATURE_MSG_AUTH | \ - FEATURE_RECOVERY_RESERVATION | \ - FEATURE_CRUSH_TUNABLES2 | \ - FEATURE_CREATEPOOLID | \ - FEATURE_REPLY_CREATE_INODE | \ - FEATURE_OSD_HBMSGS | \ - FEATURE_MDSENC | \ - FEATURE_OSDHASHPSPOOL | \ - FEATURE_MON_SINGLE_PAXOS | \ - FEATURE_OSD_SNAPMAPPER) - -struct feature_description { - guint64 feature; - const char* description; -}; - -struct feature_description fdesc[] = { - {FEATURE_UID, "uid"}, - {FEATURE_NOSRCADDR, "nosrcaddr"}, - {FEATURE_MONCLOCKCHECK, "monclockcheck"}, - {FEATURE_FLOCK, "flock"}, - {FEATURE_SUBSCRIBE2, "subscribe2"}, - {FEATURE_MONNAMES, "monnames"}, - {FEATURE_RECONNECT_SEQ, "reconnect_seq"}, - {FEATURE_DIRLAYOUTHASH, "dirlayouthash"}, - {FEATURE_OBJECTLOCATOR, "objectlocator"}, - {FEATURE_PGID64, "pgid64"}, - {FEATURE_INCSUBOSDMAP, "incsubosdmap"}, - {FEATURE_PGPOOL3, "pgpool3"}, - {FEATURE_OSDREPLYMUX, "osdreplymux"}, - {FEATURE_OSDENC, "osdenc"}, - {FEATURE_OMAP, "omap"}, - {FEATURE_QUERY_T, "query_t"}, - {FEATURE_MONENC, "monenc"}, - {FEATURE_INDEP_PG_MAP, "indep_pg_map"}, - {FEATURE_CRUSH_TUNABLES, "crush_tunables"}, - {FEATURE_CHUNKY_SCRUB, "chunk_scrub"}, - {FEATURE_MON_NULLROUTE, "mon_nullroute"}, - {FEATURE_MON_GV, " mon_gv"}, - {FEATURE_BACKFILL_RESERVATION, "backfill_reservation"}, - {FEATURE_MSG_AUTH, "msg_auth"}, - {FEATURE_RECOVERY_RESERVATION, "recovery_reservation"}, - {FEATURE_CRUSH_TUNABLES2, "crush_tunables2"}, - {FEATURE_CREATEPOOLID, "createpoolid"}, - {FEATURE_REPLY_CREATE_INODE, "reply_create_inode"}, - {FEATURE_OSD_HBMSGS, "osd_hbmsgs"}, - {FEATURE_MDSENC, "mdsenc"}, - {FEATURE_OSDHASHPSPOOL, "osdhashpspool"}, - {FEATURE_MON_SINGLE_PAXOS, "mon_single_paxos"}, - {FEATURE_OSD_SNAPMAPPER, "osd_snapmapper"} -}; -#define FEATURE_COUNT (sizeof(fdesc)/sizeof(struct feature_description)) - -static char* featureDescription(guint64 features) { - guint i; - char *desc; - char *next; - - if (features == (guint64)FEATURES_ALL) { - return g_strdup("All features"); - } else { - desc=g_strdup(""); - for (i=0; i< FEATURE_COUNT; i++) { - if (features & fdesc[i].feature) { - next = g_strconcat(desc, fdesc[i].description, " ", NULL); - g_free(desc); - desc = next; - } - } - return desc; - } -} - -/* - * Connect message flags, numbers must match protocol - * There is only a lossy flag, maybe more will be added later - */ -typedef enum _connect_flags { - MSG_CONNECT_MIN=1, - MSG_CONNECT_LOSSY=1, - MSG_CONNECT_MAX=1 -} connect_flags; - -static const char* -connectFlagDescription(guint flag) { - switch (flag) { - case MSG_CONNECT_LOSSY: return "Lossy"; - } - return "No Flags"; -} - -static void -format_connect_features(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, - guint offset) { - proto_item* item; - guint64 features; - char* desc; - char linebuf[201]; - guint len, start, end; - - features = tvb_get_letoh64(tvb, offset); - desc = featureDescription(features); - len = strlen(desc); - if (len < 150) { - /* Short description on one line */ - item = proto_tree_add_uint64_format_value(tree, hf_connect_features, - tvb, offset, 8, features, "0x%" G_GINT64_MODIFIER "x (%s)", - features, desc); - } else { - - /* Format as multi-line entry */ - item = proto_tree_add_uint64_format_value(tree, hf_connect_features, - tvb, offset, 8, features, "0x%" G_GINT64_MODIFIER "x", features); - - start = 0; - while (start < len) { - end = start + (strlen(&desc[start])>200 ? 200 : - strlen(&desc[start])); - while (end>len || desc[end-1] != ' ') - end--; - strncpy(linebuf, &desc[start], end-start); - linebuf[end-start]=0; - proto_tree_add_uint64_format_value(tree, hf_connect_features, tvb, - offset, 8, features, "%s", linebuf); - start = end; - } - } - g_free(desc); - - if ((features & (~FEATURES_ALL)) != 0) { - expert_add_info_format(pinfo, item, PI_UNDECODED, PI_WARN, - "Unexpected feature flags seen, dissector may need updating"); - } -} - -static gint -dissect_connect_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, - guint offset) { - - gint auth_len; - entity_type host_type; - guint flags; - - if (tvb_reported_length_remaining (tvb, offset) < SIZE_OF_MSG_CONNECT) - return -1; - - host_type = (entity_type)tvb_get_letohl(tvb, offset+8); - if (!isEntityType(host_type)) - return 0; - - auth_len = tvb_get_letohl(tvb, offset+28); - if (tvb_reported_length_remaining (tvb, offset) < - SIZE_OF_MSG_CONNECT+auth_len) - return -1; - - /* All here, just decode */ - setPDUInfo(pinfo, "Connect Request"); - format_connect_features(tvb, pinfo, tree, offset); - proto_tree_add_uint_format_value(tree, hf_connect_host_type, tvb, offset+8, - 4, host_type, "%d (%s)", host_type, entityTypeDescription(host_type)); - proto_tree_add_item(tree, hf_connect_global_seq, tvb, offset+12, 4, TRUE); - proto_tree_add_item(tree, hf_connect_connect_seq, tvb, offset+16, 4, TRUE); - proto_tree_add_item(tree, hf_connect_protocol_version, tvb, offset+20, - 4, TRUE); - proto_tree_add_item(tree, hf_connect_authorizer_protocol, tvb, offset+24, - 4, TRUE); - proto_tree_add_item(tree, hf_connect_authorizer_len, tvb, offset+28, - 4, TRUE); - flags = tvb_get_guint8(tvb, offset+32); - proto_tree_add_uint_format_value(tree, hf_connect_flags, tvb, offset+32, 1, - flags, "%d (%s)", flags, connectFlagDescription(flags)); - - if (auth_len >0) - proto_tree_add_item(tree, hf_connect_authentication_key, tvb, offset+33, - auth_len, TRUE); - - /* Tag it in conv */ - conv_fixup(TRUE, pinfo); - conv_tag(pinfo, tvb, offset, CONNECT_REQUEST); - conv_setfrom(pinfo, (entity_type)tvb_get_letohl(tvb, offset+8)); - - return SIZE_OF_MSG_CONNECT+auth_len; -} - -/* - * msg_connect_reply - Server->Client connection reply following a request - * - struct ceph_msg_connect_reply { - guint8 tag; - guint64 features; - guint32 global_seq; - guint32 connect_seq; - guint32 protocol_version; - guint32 authorizer_len; - guint8 flags; -} -*/ -#define SIZE_OF_MSG_CONNECT_REPLY (1+8+4+4+4+4+1) - -static gint -dissect_connect_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, - guint offset) { - - gint auth_len; - guint tag; - guint flags; - - /* Test we have enough data including auth */ - if (tvb_reported_length_remaining (tvb, offset) < SIZE_OF_MSG_CONNECT_REPLY) - return -1; - - /* TODO: This isn't an ideal test but we need something :-( */ - tag = tvb_get_guint8(tvb, offset); - if (!isMsgrConnectTag(tag)) - return 0; - - auth_len = tvb_get_letohl(tvb, offset+21); - if (tvb_reported_length_remaining (tvb, offset) < - SIZE_OF_MSG_CONNECT_REPLY+auth_len) - return -1; - - setPDUInfo(pinfo, "Connect Reply"); - proto_tree_add_uint_format_value(tree, hf_connect_tag, tvb, offset, 1, - tag, "%d (%s)", tag, replyTagDescription(tag)); - format_connect_features(tvb, pinfo, tree, offset+1); - proto_tree_add_item(tree, hf_connect_global_seq, tvb, offset+9, 4, TRUE); - proto_tree_add_item(tree, hf_connect_connect_seq, tvb, offset+13, 4, TRUE); - proto_tree_add_item(tree, hf_connect_protocol_version, tvb, offset+17, - 4, TRUE); - proto_tree_add_item(tree, hf_connect_authorizer_len, tvb, offset+21, - 4, TRUE); - flags = tvb_get_guint8(tvb, offset+25); - proto_tree_add_uint_format_value(tree, hf_connect_flags, tvb, offset+25, 1, - flags, "%d (%s)", flags, connectFlagDescription(flags)); - - /* Tag it in conversation */ - conv_fixup(FALSE, pinfo); - conv_tag(pinfo, tvb, offset, CONNECT_REPLY); - return SIZE_OF_MSG_CONNECT_REPLY+auth_len; -} - -/* - * msg_ack - Simple ack of previous messages - * - struct ceph_msg_ack { - guint8 tag; - guint64 seq; -} -*/ -#define SIZE_OF_MSG_ACK (1+8) - -static guint -dissect_ack(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) -{ - if (tvb_reported_length_remaining (tvb, offset) < SIZE_OF_MSG_ACK) - return -1; - - if (tree) { - setPDUInfo(pinfo, "Ack"); - proto_tree_add_item(tree, hf_hdr_tag, tvb, offset, 1, TRUE); - proto_tree_add_item(tree, hf_hdr_seq_ack, tvb, offset+1, 8, TRUE); - } - return SIZE_OF_MSG_ACK; -} - -/* - * entity_name - * -struct ceph_entity_name { - guint8 type; // - guint64 num; -} -*/ -#define SIZE_OF_ENTITY_NAME (1+8) - -static guint -dissect_entity_name(tvbuff_t *tvb, proto_tree *tree, gint hf, int offset) { - proto_item *entity_name_item; - proto_tree *entity_name_tree; - - if (tvb_reported_length_remaining (tvb, offset) < SIZE_OF_ENTITY_NAME) - return -1; - - if (tree) { - entity_name_item = proto_tree_add_item( tree, hf, tvb, offset, - SIZE_OF_ENTITY_NAME, TRUE ); - entity_name_tree = proto_item_add_subtree(entity_name_item, - ett_entity_name); - - proto_tree_add_item(entity_name_tree, hf_entity_type, tvb, offset, - 1, TRUE); - proto_tree_add_item(entity_name_tree, hf_entity_num, tvb, offset+1, - 8, TRUE); - } - return SIZE_OF_ENTITY_NAME; -} - -/* - * msg_header - * - struct ceph_msg_header { - guint64 seq; // message seq# for this session - guint64 tid; // transaction id - guint16 type; // message type - guint16 priority; // priority. higher value == higher priority - guint16 version; // version of message encoding - - guint32 front_len; // bytes in main payload - guint32 middle_len; // bytes in middle payload - guint32 data_len; // bytes of data payload - guint16 data_off; // sender: include full offset; - // receiver: mask against ~PAGE_MASK - - struct ceph_entity_name src; - guint32 reserved; - guint32 crc; // header crc32c -} -*/ -#define SIZE_OF_MSG_HEADER (8+8+2+2+2 +4+4+4+2 +SIZE_OF_ENTITY_NAME+4+4) -#define HEADER_TYPE_OFFSET (8+8) -#define HEADER_ETYPE_OFFSET (8+8+2+2+2 +4+4+4+2) -#define HEADER_CRC_OFFSET (SIZE_OF_MSG_HEADER-4) - -typedef struct _header_info { - guint32 type; - guint32 front_len; - guint32 middle_len; - guint32 data_len; -} header_info; - -static gint -dissect_msg_header(tvbuff_t *tvb, proto_tree *tree, int offset, - header_info* info) { - proto_item *header_item; - proto_tree *header_tree; - - if (tvb_reported_length_remaining (tvb, offset) < SIZE_OF_MSG_HEADER) - return -1; - - if (info) { - info->type = tvb_get_letohs(tvb, offset+16); - info->front_len = tvb_get_letohl(tvb, offset+22); - info->middle_len = tvb_get_letohl(tvb, offset+26); - info->data_len = tvb_get_letohl(tvb, offset+30); - } - - if (tree) { - header_item = proto_tree_add_item( tree, hf_header, tvb, offset, - SIZE_OF_MSG_HEADER, TRUE ); - header_tree = proto_item_add_subtree(header_item, ett_header); - - proto_tree_add_item(header_tree, hf_hdr_seq, tvb, offset+0, 8, TRUE); - proto_tree_add_item(header_tree, hf_hdr_tid, tvb, offset+8, 8, TRUE); - proto_tree_add_item(header_tree, hf_hdr_type, tvb, offset+16, 2, TRUE); - proto_tree_add_item(header_tree, hf_hdr_priority, tvb, offset+18, - 2, TRUE); - proto_tree_add_item(header_tree, hf_hdr_version, tvb, offset+20, - 2, TRUE); - - proto_tree_add_item(header_tree, hf_hdr_front_len, tvb, offset+22, - 4, TRUE); - proto_tree_add_item(header_tree, hf_hdr_middle_len, tvb, offset+26, - 4, TRUE); - proto_tree_add_item(header_tree, hf_hdr_data_len, tvb, offset+30, - 4, TRUE); - proto_tree_add_item(header_tree, hf_hdr_data_off, tvb, offset+34, - 2, TRUE); - - dissect_entity_name(tvb, header_tree, hf_hdr_src, offset+36); - - proto_tree_add_item(header_tree, hf_hdr_crc, tvb, - offset+36+4+SIZE_OF_ENTITY_NAME, 4, TRUE); - } - return SIZE_OF_MSG_HEADER; -} - -/* - * msg_footer - * - struct ceph_msg_footer { - guint32 front_crc; - guint32 middle_crc; - guint32 data_crc; - guint64 sig; - guint8 flags; -} -*/ -#define SIZE_OF_MSG_FOOTER (4+4+4+8+1) - -static guint32 -dissect_footer(tvbuff_t *tvb, proto_tree *tree, guint32 offset) -{ - proto_item *footer_item; - proto_tree *footer_tree; - - if (tvb_reported_length_remaining (tvb, offset) < SIZE_OF_MSG_FOOTER) - return -1; - - if (tree) { - footer_item = proto_tree_add_item( tree, hf_footer, tvb, offset, - SIZE_OF_MSG_FOOTER, TRUE ); - footer_tree = proto_item_add_subtree(footer_item, ett_footer); - - proto_tree_add_item(footer_tree, hf_footer_front_crc, tvb, offset, - 4, TRUE); - proto_tree_add_item(footer_tree, hf_footer_middle_crc, tvb, offset+4, - 4, TRUE); - proto_tree_add_item(footer_tree, hf_footer_data_crc, tvb, offset+8, - 4, TRUE); - proto_tree_add_item(footer_tree, hf_footer_sig, tvb, offset+12, - 8, TRUE); - proto_tree_add_item(footer_tree, hf_footer_flags, tvb, offset+20, - 1, TRUE); - } - - return SIZE_OF_MSG_FOOTER; -} - -static guint32 -dissect_fsid(tvbuff_t *tvb, proto_tree *tree, guint32 offset) -{ - guint32 fsid[4]; - - tvb_memcpy(tvb, &fsid, offset, sizeof(fsid)); - proto_tree_add_text(tree, tvb, offset, sizeof(fsid), "fsid: %x-%x-%x-%x", - g_ntohl(fsid[0]), g_ntohl(fsid[1]), g_ntohl(fsid[2]), g_ntohl(fsid[3])); - return sizeof(fsid); -} - -/* - * Message types - * There is no order to these as yet, maybe better split by source->target type? - */ -typedef enum _msg_ctype { - MSG_SHUTDOWN=1, - MSG_PING=2, - MSG_MON_MAP=4, - MSG_MON_GET_MAP=5, - MSG_STATFS=13, - MSG_STATFS_REPLY=14, - MSG_MON_SUBSCRIBE=15, - MSG_MON_SUBSCRIBE_ACK=16, - MSG_AUTH=17, - MSG_AUTH_REPLY=18, - MSG_MON_GET_VERSION=19, - MSG_MON_GET_VERSION_REPLY=20, - MSG_MDS_MAP=21, - MSG_CLIENT_SESSION=22, - MSG_CLIENT_RECONNECT=23, - MSG_CLIENT_REQUEST=24, - MSG_CLIENT_REQUEST_FORWARD=25, - MSG_CLIENT_REPLY=26, - MSG_CLIENT_CAPS=0x310, - MSG_CLIENT_LEASE=0x311, - MSG_CLIENT_SNAP=0x312, - MSG_CLIENT_CAPRELEASE=0x313, - MSG_POOLOP_REPLY=48, - MSG_POOLOP=49, - MSG_OSD_MAP=41, - MSG_OSD_OP=42, - MSG_OSD_OPREPLY=43, - MSG_WATCH_NOTIFY=44, - MSG_MON_ELECTION=65, - MSG_MON_PAXOS=66, - MSG_MON_PROBE=67, - MSG_MON_JOIN=68, - MSG_MON_SYNC=69, - MSG_MON_COMMAND=50, - MSG_MON_COMMAND_ACK=51, - MSG_LOG=52, - MSG_LOGACK=53, - MSG_CLASS=56, - MSG_CLASS_ACK=57, - MSG_GETPOOLSTATS=58, - MSG_GETPOOLSTATSREPLY=59, - MSG_MON_GLOBAL_ID=60, - MSG_ROUTE=47, - MSG_FORWARD=46, - MSG_PAXOS=40, - MSG_OSD_PING=70, - MSG_OSD_BOOT=71, - MSG_OSD_FAILURE=72, - MSG_OSD_ALIVE=73, - MSG_OSD_MARK_ME_DOWN=74, - MSG_OSD_SUBOP=76, - MSG_OSD_SUBOPREPLY=77, - MSG_OSD_PGTEMP=78, - MSG_OSD_PG_NOTIFY=80, - MSG_OSD_PG_QUERY=81, - MSG_OSD_PG_SUMMARY=82, - MSG_OSD_PG_LOG=83, - MSG_OSD_PG_REMOVE=84, - MSG_OSD_PG_INFO=85, - MSG_OSD_PG_TRIM=86, - MSG_PGSTATS=87, - MSG_PGSTATSACK=88, - MSG_OSD_PG_CREATE=89, - MSG_REMOVE_SNAPS=90, - MSG_OSD_SCRUB=91, - MSG_OSD_PG_MISSING=92, - MSG_OSD_REP_SCRUB=93, - MSG_OSD_PG_SCAN=94, - MSG_OSD_PG_BACKFILL=95, - MSG_COMMAND=97, - MSG_COMMAND_REPLY=98, - MSG_OSD_BACKFILL_RESERVE=99, - MSG_OSD_RECOVERY_RESERVE=150, - MSG_MDS_BEACON=100, - MSG_MDS_SLAVE_REQUEST=101, - MSG_MDS_TABLE_REQUEST=102, - MSG_MDS_RESOLVE=0x200, - MSG_MDS_RESOLVEACK=0x201, - MSG_MDS_CACHEREJOIN=0x202, - MSG_MDS_DISCOVER=0x203, - MSG_MDS_DISCOVERREPLY=0x204, - MSG_MDS_INODEUPDATE=0x205, - MSG_MDS_DIRUPDATE=0x206, - MSG_MDS_CACHEEXPIRE=0x207, - MSG_MDS_DENTRYUNLINK=0x208, - MSG_MDS_FRAGMENTNOTIFY=0x209, - MSG_MDS_OFFLOAD_TARGETS=0x20a, - MSG_MDS_DENTRYLINK=0x20c, - MSG_MDS_FINDINO=0x20d, - MSG_MDS_FINDINOREPLY=0x20e, - MSG_MDS_OPENINO=0x20f, - MSG_MDS_OPENINOREPLY=0x210, - MSG_MDS_LOCK=0x300, - MSG_MDS_INODEFILECAPS=0x301, - MSG_MDS_EXPORTDIRDISCOVER=0x449, - MSG_MDS_EXPORTDIRDISCOVERACK=0x450, - MSG_MDS_EXPORTDIRCANCEL=0x451, - MSG_MDS_EXPORTDIRPREP=0x452, - MSG_MDS_EXPORTDIRPREPACK=0x453, - MSG_MDS_EXPORTDIRWARNING=0x454, - MSG_MDS_EXPORTDIRWARNINGACK=0x455, - MSG_MDS_EXPORTDIR=0x456, - MSG_MDS_EXPORTDIRACK=0x457, - MSG_MDS_EXPORTDIRNOTIFY=0x458, - MSG_MDS_EXPORTDIRNOTIFYACK=0x459, - MSG_MDS_EXPORTDIRFINISH=0x460, - MSG_MDS_EXPORTCAPS=0x470, - MSG_MDS_EXPORTCAPSACK=0x471, - MSG_MDS_HEARTBEAT=0x500, - MSG_TIMECHECK=0x600, - MSG_MON_HEALTH=0x601 -} msg_ctype; - -static value_string msg_ctype_values[]={ - {MSG_SHUTDOWN, "Shutdown"}, - {MSG_PING, "Ping"}, - {MSG_MON_MAP, "MON Map"}, - {MSG_MON_GET_MAP, "MON Get Map"}, - {MSG_STATFS, "Stat FS"}, - {MSG_STATFS_REPLY, "Stat FS Reply"}, - {MSG_MON_SUBSCRIBE, "MON Subscribe"}, - {MSG_MON_SUBSCRIBE_ACK, "MON Subscribe Ack"}, - {MSG_AUTH, "Auth"}, - {MSG_AUTH_REPLY, "Auth Reply"}, - {MSG_MON_GET_VERSION, "MON Get Version"}, - {MSG_MON_GET_VERSION_REPLY, "MON Get Version Reply"}, - {MSG_MDS_MAP, "MDS Map"}, - {MSG_CLIENT_SESSION, "Client Session"}, - {MSG_CLIENT_RECONNECT, "Client Reconnect"}, - {MSG_CLIENT_REQUEST, "Client Request"}, - {MSG_CLIENT_REQUEST_FORWARD, "Client Request Forward"}, - {MSG_CLIENT_REPLY, "Client Reply"}, - {MSG_PAXOS, "Paxos"}, - {MSG_OSD_MAP, "OSD Map"}, - {MSG_OSD_OP, "OSD Op"}, - {MSG_OSD_OPREPLY, "OSD Op Reply"}, - {MSG_WATCH_NOTIFY, "Watch Notify"}, - {MSG_FORWARD, "Forward"}, - {MSG_ROUTE, "Route"}, - {MSG_POOLOP_REPLY, "Pool Op Reply"}, - {MSG_POOLOP, "Pool Op"}, - {MSG_MON_COMMAND, "MON Command"}, - {MSG_MON_COMMAND_ACK, "MON Command Ack"}, - {MSG_LOG, "Log"}, - {MSG_LOGACK, "Log Ack"}, - {MSG_CLASS, "Class"}, - {MSG_CLASS_ACK, "Class Ack"}, - {MSG_GETPOOLSTATS, "Get Pool Stats"}, - {MSG_GETPOOLSTATSREPLY, "Get Pools Stats Reply"}, - {MSG_MON_GLOBAL_ID, "MON Global Id"}, - {MSG_MON_ELECTION, "MON Election"}, - {MSG_MON_PAXOS, "MON Paxos"}, - {MSG_MON_PROBE, "MON Probe"}, - {MSG_MON_JOIN, "MON Join"}, - {MSG_MON_SYNC, "MON Sync"}, - {MSG_OSD_PING, "OSD Ping"}, - {MSG_OSD_BOOT, "OSD Boot"}, - {MSG_OSD_FAILURE, "OSD Failure"}, - {MSG_OSD_ALIVE, "OSD Alive"}, - {MSG_OSD_MARK_ME_DOWN, "OSD Mark Me Down"}, - {MSG_OSD_SUBOP, "OSD Subop"}, - {MSG_OSD_SUBOPREPLY, "OSD Subop Reply"}, - {MSG_OSD_PGTEMP, "OSD PG Temp"}, - {MSG_OSD_PG_NOTIFY, "OSD PG Notify"}, - {MSG_OSD_PG_QUERY, "OSD PG Query"}, - {MSG_OSD_PG_SUMMARY, "OSD PG Summary"}, - {MSG_OSD_PG_LOG, "OSD PG Log"}, - {MSG_OSD_PG_REMOVE, "OSD PG Remove"}, - {MSG_OSD_PG_INFO, "OSD PG Info"}, - {MSG_OSD_PG_TRIM, "OSD PG Trim"}, - {MSG_PGSTATS, "MPN PG Stats"}, - {MSG_PGSTATSACK, "MON PG Stats Ack"}, - {MSG_OSD_PG_CREATE, "OSD PG Create"}, - {MSG_REMOVE_SNAPS, "Remove Snaps"}, - {MSG_OSD_SCRUB, "OSD Scrub"}, - {MSG_OSD_PG_MISSING, "OSD PG Missing"}, - {MSG_OSD_REP_SCRUB, "OSD REP Scrub"}, - {MSG_OSD_PG_SCAN, "OSD PG Scan"}, - {MSG_OSD_PG_BACKFILL, "OSD PG Backfill"}, - {MSG_COMMAND, "Command"}, - {MSG_COMMAND_REPLY, "Command Reply"}, - {MSG_OSD_BACKFILL_RESERVE, "OSD Backfill Reserve"}, - {MSG_MDS_BEACON, "MDS Beacon"}, - {MSG_MDS_SLAVE_REQUEST, "MDS Slave Request"}, - {MSG_MDS_TABLE_REQUEST, "MDS Table Request"}, - {MSG_OSD_RECOVERY_RESERVE, "OSD Recovery Reserve"}, - {MSG_MDS_RESOLVE, "MDS Resolve"}, - {MSG_MDS_RESOLVEACK, "MDS Resolve Ack"}, - {MSG_MDS_CACHEREJOIN, "MDS Cache Rejoin"}, - {MSG_MDS_DISCOVER, "MDS Discover"}, - {MSG_MDS_DISCOVERREPLY, "MDS Discover Reply"}, - {MSG_MDS_INODEUPDATE, "MDS INode Update"}, - {MSG_MDS_DIRUPDATE, "MDS Dir Update"}, - {MSG_MDS_CACHEEXPIRE, "MDS Cache Expire"}, - {MSG_MDS_DENTRYUNLINK, "MDS DEntry Unlink"}, - {MSG_MDS_FRAGMENTNOTIFY, "MDS Fragment Notify"}, - {MSG_MDS_OFFLOAD_TARGETS, "MDS Offload Targets"}, - {MSG_MDS_DENTRYLINK, "MDS DEntry Link"}, - {MSG_MDS_FINDINO, "MDS Find INO"}, - {MSG_MDS_FINDINOREPLY, "MDS Find INO Reply"}, - {MSG_MDS_OPENINO, "MDS Open INO"}, - {MSG_MDS_OPENINOREPLY, "MDS Open INO Reply"}, - {MSG_MDS_LOCK, "MDS Lock"}, - {MSG_MDS_INODEFILECAPS, "MDS INODE File Caps"}, - {MSG_CLIENT_CAPS, "Client Caps"}, - {MSG_CLIENT_LEASE, "Client Lease"}, - {MSG_CLIENT_SNAP, "Client Snap"}, - {MSG_CLIENT_CAPRELEASE, "Client Cap Release"}, - {MSG_MDS_EXPORTDIRDISCOVER, "MDS Export DIR Discover"}, - {MSG_MDS_EXPORTDIRDISCOVERACK, "MDS Export DIR Discover Ack"}, - {MSG_MDS_EXPORTDIRCANCEL, "MDS Export DIR Cancel"}, - {MSG_MDS_EXPORTDIRPREP, "MDS Export DIR Prep"}, - {MSG_MDS_EXPORTDIRPREPACK, "MDS Export DIR Prepack"}, - {MSG_MDS_EXPORTDIRWARNING, "MDS Export DIR Warning"}, - {MSG_MDS_EXPORTDIRWARNINGACK, "MDS Export DIR Warning Ack"}, - {MSG_MDS_EXPORTDIR, "MDS Export DIR"}, - {MSG_MDS_EXPORTDIRACK, "MDS Export DIR Ack"}, - {MSG_MDS_EXPORTDIRNOTIFY, "MDS Export DIR Notify"}, - {MSG_MDS_EXPORTDIRNOTIFYACK, "MDS Export DIR Notify Ack"}, - {MSG_MDS_EXPORTDIRFINISH, "MDS Export DIR Finish"}, - {MSG_MDS_EXPORTCAPS, "MDS Export Caps"}, - {MSG_MDS_EXPORTCAPSACK, "MDS Export Caps Ack"}, - {MSG_MDS_HEARTBEAT, "MDS Heartbeat"}, - {MSG_TIMECHECK, "Timecheck"}, - {MSG_MON_HEALTH, "MON Health"} -}; - -static gboolean -isMsgCType(guint32 type) { - return (try_val_to_str(type, msg_ctype_values)!=NULL); -} - -static const char* -msgCTypeDescription(msg_ctype type) { - return val_to_str(type, msg_ctype_values, "Unknown Message Type: %d"); -} - -/* - * PaxosServiceMessage - * -struct { - guint64 version; - gint16 deprecated_session_mon; - guint64 deprecated_session_mon_tid; -} -*/ -#define SIZE_OF_PAXOS (8+2+8) - -static guint32 -dissect_paxos(tvbuff_t *tvb, proto_tree *tree, guint32 offset){ - - proto_tree_add_item(tree, hf_paxos_version, tvb, offset, 8, TRUE); - return SIZE_OF_PAXOS; -} - -/* - * feature_set - * -struct { - uint64_t mask; - map names; -} -*/ -static guint32 -dissect_featureset(tvbuff_t *tvb, proto_tree *tree, guint32 offset, int hinfo, - gint ett) { - proto_item *litem; - proto_tree *ltree; - guint32 i, items; - guint32 at; - - litem = proto_tree_add_item( tree, hinfo, tvb, offset, 1, TRUE ); - ltree = proto_item_add_subtree(litem, ett); - - at = offset; - proto_tree_add_item(ltree, hf_featureset_mask, tvb, at, 8, TRUE); at += 8; - items = tvb_get_letohl(tvb, at); at+=4; - for (i=0; i mon_addr - guint64 last_changed - guint64 created -} -*/ - -static guint32 -dissect_mon_map(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, - guint32 offset) { - proto_item *litem = NULL; - proto_tree *ltree = NULL; - guint32 i, at, name_at; - guint32 map_len, addr_len, entries_len; - entity_info einfo; - - map_len = tvb_get_letohl(tvb, offset)+sizeof(map_len); - - litem = proto_tree_add_item( tree, hf_monmap, tvb, offset, map_len, TRUE ); - ltree = proto_item_add_subtree(litem, ett_front); - - proto_tree_add_item(ltree, hf_monmap_version, tvb, offset+4, 1, TRUE); - proto_tree_add_item(ltree, hf_monmap_compat, tvb, offset+5, 1, TRUE); - - entries_len = tvb_get_letohl(tvb, offset+6); - offset += 10; - while (entries_len>0) { - at = offset; - at += dissect_fsid(tvb, ltree, at); - proto_tree_add_item(ltree, hf_monmap_epoch, tvb, at, 4, TRUE); at+=4; - - addr_len = tvb_get_letohl(tvb, at); at+=4; - for (i=0; i< addr_len; i++) { - name_at = at; - proto_tree_add_item(ltree, hf_monmap_name, tvb, at, 4, TRUE); - at += tvb_get_letohl(tvb, at)+ 4; - at += dissect_entity_addr(tvb, pinfo, ltree, at, &einfo); - conv_set_entity_name(conv_get_entity_frominfo(&einfo), - tvb, name_at, ENTITY_TYPE_MON); - } - - proto_tree_add_item(ltree, hf_monmap_lastchanged, tvb, at, 8, TRUE); - at+=8; - proto_tree_add_item(ltree, hf_monmap_created, tvb, at, 8, TRUE); - at+=8; - - entries_len -= (at-offset); - offset = at; - } - if (entries_len !=0 ) - expert_add_info_format(pinfo, tree, PI_UNDECODED, PI_WARN, - "Length mismatch in decoding mon map entries"); - - return map_len; -} - -/* - * msg_mon_subscribe - * -struct ceph_mon_subscribe_item { - guint64 start; - guint8 flags; -}; - -struct ceph_msg_monsubscribe { - map what -}; -*/ -static guint32 -dissect_mon_subscribe(tvbuff_t *tvb, proto_tree *tree, guint32 offset, - guint32 length) { - proto_item *litem = NULL; - proto_tree *ltree = NULL; - guint32 i, items; - guint32 at; - - litem = proto_tree_add_item( tree, hf_monsubscribe, tvb, offset, - length, TRUE ); - ltree = proto_item_add_subtree(litem, ett_front); - - items = tvb_get_letohl(tvb, offset); - at = offset +4; - for (i=0; i< items; i++) { - proto_tree_add_item(ltree, hf_monsubscribe_name, tvb, at, 4, TRUE); - at += tvb_get_letohl(tvb, at)+ 4; - - proto_tree_add_item(ltree, hf_monsubscribe_start, tvb, at, 8, TRUE); - at += 8; - proto_tree_add_item(ltree, hf_monsubscribe_flags, tvb, at, 1, TRUE); - at += 1; - } - - return (at-offset); -} - -/* - * msg_mon_subscribeack - * -struct ceph_msg_mon_subscribeack { - guint32 interval; - guint8 fsid[16]; -}; -*/ -static guint32 -dissect_mon_subscribeack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, - guint32 length) { - proto_item *litem = NULL; - proto_tree *ltree = NULL; - - litem = proto_tree_add_item( tree, hf_monsubscribeack, tvb, offset, - length, TRUE ); - ltree = proto_item_add_subtree(litem, ett_front); - - proto_tree_add_item(ltree, hf_monsubscribeack_interval, tvb, offset, - 4, TRUE); - dissect_fsid(tvb, ltree, offset+4); - return 20; -} - -/* - * mds_beacon - * -struct mds_beacon { - paxos - guint8[16] fsid; - guint64 global_id; - guint32 state; - guint64 seq; - string name; - gint32 standby_for_rank; - string standby_for_name; - CompatSet compat; -}; -*/ -static guint32 -dissect_mdsbeacon(tvbuff_t *tvb, proto_tree *tree, - guint32 offset, guint32 length) { - proto_item *litem = NULL; - proto_tree *ltree = NULL; - guint32 at; - - litem = proto_tree_add_item( tree, hf_mdsbeacon, tvb, offset, length, TRUE); - ltree = proto_item_add_subtree(litem, ett_front); - - at = offset; - at += dissect_paxos(tvb, ltree, at); - at += dissect_fsid(tvb, ltree, at); - proto_tree_add_item(ltree, hf_mdsbeacon_globalid, tvb, at, 8, TRUE); at+=8; - proto_tree_add_item(ltree, hf_mdsbeacon_state, tvb, at, 4, TRUE); at+=4; - proto_tree_add_item(ltree, hf_mdsbeacon_seq, tvb, at, 8, TRUE); at+=8; - proto_tree_add_item(ltree, hf_mdsbeacon_name, tvb, at, 4, TRUE); - at += tvb_get_letohl(tvb, at)+ 4; - proto_tree_add_item(ltree, hf_mdsbeacon_standbyforrank, tvb, at, 4, TRUE); - at+=4; - proto_tree_add_item(ltree, hf_mdsbeacon_standbyforname, tvb, at, 4, TRUE); - at += tvb_get_letohl(tvb, at)+ 4; - at += dissect_compatset(tvb, ltree, at); - - return (at-offset); -} - -/* - * Pull apart a contained message. - * Dissectors called from here don't need to length check just return how - * many bytes they actually consumed. - */ -static guint -dissect_msg_ctype(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, - int offset, msg_ctype type, guint32 length) -{ - tvbuff_t* ltvb; - guint32 len=0; - - /* Create a subset to isolate the dissectors - so they don't really need to length check */ - - ltvb = tvb_new_subset_length(tvb, offset, length); - - switch (type) { - case MSG_MON_MAP: - len = dissect_mon_map(ltvb, pinfo, tree, 0); - break; - case MSG_AUTH: - len = dissect_auth(ltvb, tree, 0); - break; - case MSG_AUTH_REPLY: - len = dissect_auth_reply(ltvb, tree, 0); - break; - case MSG_MON_SUBSCRIBE: - len = dissect_mon_subscribe(ltvb, tree, 0, length); - break; - case MSG_MON_SUBSCRIBE_ACK: - len = dissect_mon_subscribeack(ltvb, tree, 0, length); - break; - case MSG_MDS_BEACON: - len = dissect_mdsbeacon(ltvb, tree, 0, length); - break; - default: - break; - } - return len; -} - -static guint -dissect_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) { - guint start; - gint len=0; - header_info info; - - start = offset; - len = dissect_msg_header(tvb, tree, offset, &info); - if (len <0 ) return len; - offset += len; - - if (info.front_len) { - if ((guint)tvb_reported_length_remaining (tvb, offset) < info.front_len) - return -1; - - len = dissect_msg_ctype(tvb, pinfo, tree, offset, - (msg_ctype)info.type, info.front_len); - if (len <0 ) return len; - else if (len == 0) - expert_add_info_format(pinfo, tree, PI_UNDECODED, PI_WARN, - "Undecoded: %s", msgCTypeDescription((msg_ctype)info.type)); - else if ((guint32)len != info.front_len) - expert_add_info_format(pinfo, tree, PI_UNDECODED, PI_WARN, - "Header front length (%u) does not match message length (%u)", - info.front_len, len); - offset += info.front_len; - } - - offset += info.middle_len; - offset += info.data_len; - len = dissect_footer(tvb, tree, offset); - if (len <0 ) return len; - - offset += len; - setPDUInfo(pinfo, msgCTypeDescription((msg_ctype)info.type)); - return (offset-start); -} - -/* - * Create an expert warning that part of the packet could not be decoded. - */ -static void -undecodedWarning(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, - guint32 offset, guint32 expecting) { - - /* - * Post warning message - */ - setPDUInfo(pinfo, "Undecoded data"); - if ((expecting & SERVER_BANNER) != 0) - expert_add_info_format(pinfo, tree, PI_UNDECODED, PI_WARN, - "Expected server to send banner, ignoring packet"); - if ((expecting & CLIENT_BANNER) != 0) - expert_add_info_format(pinfo, tree, PI_UNDECODED, PI_WARN, - "Expected client to send banner, ignoring packet"); - if ((expecting & SERVER_ADDRESS) != 0) - expert_add_info_format(pinfo, tree, PI_UNDECODED, PI_WARN, - "Expected server to send addresses, ignoring packet"); - if ((expecting & CLIENT_ADDRESS) != 0) - expert_add_info_format(pinfo, tree, PI_UNDECODED, PI_WARN, - "Expected client to send addresses, ignoring packet"); - if ((expecting & CONNECT_REQUEST) != 0) - expert_add_info_format(pinfo, tree, PI_UNDECODED, PI_WARN, - "Expected client to send connection request, ignoring packet"); - if ((expecting & CONNECT_REPLY) != 0) - expert_add_info_format(pinfo, tree, PI_UNDECODED, PI_WARN, - "Expected server to send connection reply, ignoring packet"); - - /* - * Assume we jumped into middle of conversation - */ - conv_tag(pinfo, tvb, offset, CONVERSING); -} - -static void dissect_ceph(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree){ - - proto_item *ceph_item = NULL; - proto_tree *ceph_tree = NULL; - guint pduNum; - guint offset; - gint32 len; - guint32 expecting; - guint32 needMore; - guint8 type; - - /* Tag as CEPH & prep info */ - if (check_col(pinfo->cinfo, COL_PROTOCOL)) - col_set_str(pinfo->cinfo, COL_PROTOCOL, PROTO_TAG_CEPH); - if(check_col(pinfo->cinfo,COL_INFO)){ - col_clear(pinfo->cinfo,COL_INFO); - col_add_fstr(pinfo->cinfo, COL_INFO, "[%s]",conv_display(pinfo)); - col_set_fence(pinfo->cinfo,COL_INFO); - } - - /* - * Loop reading PDUs - */ - needMore = FALSE; - offset=0; - pduNum=0; - while (tvb_reported_length_remaining (tvb, offset) != 0) { - - /* Flag if this is first PDU in packet, helps formating info */ - g_firstPdu = (pduNum++ == 0); - - /* Create a new tree for it */ - if (tree) { - ceph_item = proto_tree_add_item(tree, g_proto_ceph, tvb, 0, - -1, TRUE); - ceph_tree = proto_item_add_subtree(ceph_item, ett_ceph); - } else { - ceph_tree = NULL; - } - - /* - * Recover what type of message we are expecting to see both for - * error checking and guiding the dissector to do the right thing - */ - expecting = conv_expecting(pinfo, tvb, offset); - - /* - * Try decode something - */ - if ((expecting & SERVER_BANNER) != 0) { - len = dissect_banner(tvb, pinfo, ceph_tree, offset, FALSE); - if (len == -1) needMore = TRUE; - else if (len>0) { - conv_tag(pinfo, tvb, offset, SERVER_BANNER); - offset += len; - continue; - } - } - - if ((expecting & CLIENT_BANNER) != 0) { - len = dissect_banner(tvb, pinfo, ceph_tree, offset, TRUE); - if (len == -1) needMore = TRUE; - else if (len>0) { - conv_tag(pinfo, tvb, offset, CLIENT_BANNER); - offset += len; - continue; - } - } - - if ((expecting & CLIENT_ADDRESS) != 0) { - len = dissect_client_address(tvb, pinfo, ceph_tree, offset); - if (len == -1) needMore = TRUE; - else if (len>0) { - conv_tag(pinfo, tvb, offset, CLIENT_ADDRESS); - offset += len; - continue; - } - } - - if ((expecting & SERVER_ADDRESS) != 0) { - len = dissect_server_address(tvb, pinfo, ceph_tree, offset); - if (len == -1) needMore = TRUE; - else if (len>0) { - conv_tag(pinfo, tvb, offset, SERVER_ADDRESS); - offset += len; - continue; - } - } - - if ((expecting & CONNECT_REQUEST) != 0) { - len = dissect_connect_request(tvb, pinfo, ceph_tree, offset); - if (len == -1) needMore = TRUE; - else if (len>0) { - conv_tag(pinfo, tvb, offset, CONNECT_REQUEST); - offset += len; - continue; - } - } - - if ((expecting & CONNECT_REPLY) != 0) { - len = dissect_connect_reply(tvb, pinfo, ceph_tree, offset); - if (len == -1) needMore = TRUE; - else if (len>0) { - conv_tag(pinfo, tvb, offset, CONNECT_REPLY); - offset += len; - continue; - } - } - - if ((expecting & CONVERSING) != 0) { - type = tvb_get_guint8(tvb, offset); - - if(type == MSGR_TAG_CLOSE){ - setPDUInfo(pinfo, "Close"); - conv_tag(pinfo, tvb, offset, CONVERSING); - offset++; - } - else if (type == MSGR_TAG_KEEPALIVE){ - setPDUInfo(pinfo, "Keep Alive"); - conv_tag(pinfo, tvb, offset, CONVERSING); - offset++; - } - else if (type == MSGR_TAG_ACK) { - len = dissect_ack(tvb, pinfo, ceph_tree, offset); - if (len == -1) needMore = TRUE; - if (len>0) { - conv_tag(pinfo, tvb, offset, CONVERSING); - offset += len; - continue; - } - } - else if (type == MSGR_TAG_MSG) { - len = dissect_msg(tvb, pinfo, ceph_tree, offset+1); - if (len == -1) needMore = TRUE; - if (len>0) { - conv_tag(pinfo, tvb, offset+1, CONVERSING); - offset += (1+len); - continue; - } - } - } - - /* We have fallen through without decoding something */ - if (needMore) { - /* One of decoders wants to see more data, so request it */ - pinfo->desegment_offset = offset; - pinfo->desegment_len=DESEGMENT_ONE_MORE_SEGMENT; - } else { - /* Throw data away, we don't know what it is */ - undecodedWarning(tvb, pinfo, ceph_tree, offset, expecting); - } - return; - } -} - -/**************************************************************************** - * Initialisation code - ****************************************************************************/ - -static gboolean -dissect_ceph_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, - void *data) { - - conversation_t* conversation; - (void)data; /* unused but required */ - - if (tvb_memeql(tvb,0, "ceph",4)!=0) { - if (tvb_reported_length_remaining (tvb, 0) >= 1+SIZE_OF_MSG_HEADER) { - if (!isMsgrTag(tvb_get_guint8(tvb, 0))) - return FALSE; - - if (!isEntityType(tvb_get_guint8(tvb, 1+HEADER_ETYPE_OFFSET))) - return FALSE; - - if (!isMsgCType(tvb_get_letohs(tvb, 1+HEADER_TYPE_OFFSET))) - return FALSE; - - - } else { - return FALSE; - } - } - - /* This is for us */ - conversation = find_or_create_conversation(pinfo); - conversation_set_dissector(conversation, g_ceph_handle); - dissect_ceph(tvb, pinfo, tree); - return TRUE; -} - -/* - * Create the dissector, this is called once after proto_register_ceph - * has been invoked. - * Note. the dissector is only valid on a range of ports, you can - * get around this by writing a 'heuristic' detector but that is - * rather more complex to do. - */ -void proto_reg_handoff_ceph(void) -{ - g_ceph_handle = create_dissector_handle(dissect_ceph, g_proto_ceph); - heur_dissector_add("tcp", dissect_ceph_heur, g_proto_ceph); -} - -/* - * This is the first part of the two-part registration for the plugin, - * see proto_reg_handoff_ceph() for part 2. - */ -void proto_register_ceph (void) -{ - /* A header field is something you can search/filter on. - * - * We create a structure to register our fields. It consists of an - * array of hf_register_info structures, each of which are of the format - * {&(field id), {name, abbrev, type, display, strings, bitmask, blurb, HFILL}}. - */ - static hf_register_info hf[] = { - { &hf_paxos_version, - { "version", "ceph.paxosservicemessage.version", FT_UINT64 , - BASE_HEX, NULL, 0, NULL, HFILL }}, - { &hf_featureset_mask, - { "mask", "ceph.featureset.mask", FT_UINT64 , - BASE_HEX, NULL, 0, NULL, HFILL }}, - { &hf_featureset_id, - { "id", "ceph.featureset.id", FT_UINT64 , - BASE_HEX, NULL, 0, NULL, HFILL }}, - { &hf_featureset_name, - { "name", "ceph.featureset.name", FT_UINT_STRING , - BASE_NONE, NULL, 0, NULL, HFILL }}, - { &hf_compatset_compat, - { "Compat", "ceph.compat", FT_NONE , - BASE_NONE, NULL, 0, NULL, HFILL }}, - { &hf_compatset_rocompat, - { "RO Compat", "ceph.rocompat", FT_NONE , - BASE_NONE, NULL, 0, NULL, HFILL }}, - { &hf_compatset_incompat, - { "Incompat", "ceph.incompat", FT_NONE , - BASE_NONE, NULL, 0, NULL, HFILL }}, - { &hf_monmap, - { "MON map", "ceph.monmap", FT_NONE , - BASE_NONE, NULL, 0, NULL, HFILL }}, - { &hf_monmap_version, - { "version", "ceph.monmap.version", FT_UINT8 , - BASE_DEC, NULL, 0, NULL, HFILL }}, - { &hf_monmap_compat, - { "compat", "ceph.monmap.compat", FT_UINT8 , - BASE_DEC, NULL, 0, NULL, HFILL }}, - { &hf_monmap_epoch, - { "epoch", "ceph.monmap.epoch", FT_UINT32 , - BASE_DEC, NULL, 0, NULL, HFILL }}, - { &hf_monmap_name, - { "name", "ceph.monmap.name", FT_UINT_STRING , - BASE_NONE, NULL, 0, NULL, HFILL }}, - { &hf_monmap_lastchanged, - { "last changed", "ceph.monmap.lastchanged", FT_UINT64 , - BASE_HEX, NULL, 0, NULL, HFILL }}, - { &hf_monmap_created, - { "created", "ceph.monmap.created", FT_UINT64 , - BASE_HEX, NULL, 0, NULL, HFILL }}, - { &hf_monsubscribe, - { "MON subscribe", "ceph.monsubscribe", FT_NONE , - BASE_NONE, NULL, 0, NULL, HFILL }}, - { &hf_monsubscribe_name, - { "name", "ceph.monsubscribe.name", FT_UINT_STRING , - BASE_NONE, NULL, 0, NULL, HFILL }}, - { &hf_monsubscribe_start, - { "start", "ceph.monsubscribe.start", FT_UINT64 , - BASE_HEX, NULL, 0, NULL, HFILL }}, - { &hf_monsubscribe_flags, - { "flags", "ceph.monsubscribe.flags", FT_UINT8 , - BASE_HEX, NULL, 0, NULL, HFILL }}, - { &hf_monsubscribeack, - { "MON subscribe ack", "ceph.monsubscribeack", FT_NONE , - BASE_NONE, NULL, 0, NULL, HFILL }}, - { &hf_monsubscribeack_interval, - { "interval", "ceph.monsubscribeack.interval", FT_UINT32 , - BASE_DEC, NULL, 0, NULL, HFILL }}, - { &hf_mdsbeacon, - { "MDS Beacon", "ceph.mdsbeacon", FT_NONE , - BASE_NONE, NULL, 0, NULL, HFILL }}, - { &hf_mdsbeacon_globalid, - { "global_id", "ceph.mdsbeason.globalid", FT_UINT64 , - BASE_HEX, NULL, 0, NULL, HFILL }}, - { &hf_mdsbeacon_state, - { "state", "ceph.mdsbeason.state", FT_UINT32 , - BASE_HEX, NULL, 0, NULL, HFILL }}, - { &hf_mdsbeacon_seq, - { "seq", "ceph.mdsbeason.seq", FT_UINT64 , - BASE_DEC, NULL, 0, NULL, HFILL }}, - { &hf_mdsbeacon_name, - { "name", "ceph.mdsbeason.name", FT_UINT_STRING , - BASE_NONE, NULL, 0, NULL, HFILL }}, - { &hf_mdsbeacon_standbyforrank, - { "standby for rank", "ceph.mdsbeason.standbyforrank", FT_INT32 , - BASE_DEC, NULL, 0, NULL, HFILL }}, - { &hf_mdsbeacon_standbyforname, - { "standby for name", "ceph.mdsbeason.standbyforname", FT_UINT_STRING , - BASE_NONE, NULL, 0, NULL, HFILL }}, - { &hf_auth, - { "Authentication Request", "ceph.auth.request", FT_NONE , - BASE_NONE, NULL, 0, NULL, HFILL }}, - { &hf_auth_protocol, - { "protocol", "ceph.auth.protocol", FT_UINT32, - BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_auth_authlen, - { "auth len", "ceph.auth.authlen", FT_UINT32, - BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_auth_authbytes, - { "auth bytes", "ceph.auth.authbytes", FT_BYTES, - BASE_NONE, NULL, 0x0, NULL, HFILL }}, - { &hf_auth_monmapepoch, - { "monmap epoch", "ceph.auth.monmapepoch", FT_UINT32, - BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_authreply, - { "Authentication reply", "ceph.auth.reply", FT_NONE , - BASE_NONE, NULL, 0, NULL, HFILL }}, - { &hf_authreply_protocol, - { "protocol", "ceph.authreply.protocol", FT_UINT32 , - BASE_DEC, NULL, 0, NULL, HFILL }}, - { &hf_authreply_result, - { "result", "ceph.authreply.result", FT_INT32 , - BASE_DEC, NULL, 0, NULL, HFILL }}, - { &hf_authreply_globalid, - { "global_id", "ceph.authreply.global_id", FT_UINT64 , - BASE_HEX, NULL, 0, NULL, HFILL }}, - { &hf_authreply_authlen, - { "auth len", "ceph.authreply.authlen", FT_UINT32, - BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_authreply_authbytes, - { "auth bytes", "ceph.authreply.authbytes", FT_BYTES, - BASE_NONE, NULL, 0x0, NULL, HFILL }}, - { &hf_authreply_msglen, - { "msg len", "ceph.authreply.msglen", FT_UINT32, - BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_authreply_msgstring, - { "msg bytes", "ceph.authreply.msgbytes", FT_STRINGZ, - BASE_NONE, NULL, 0x0, NULL, HFILL }}, - { &hf_header, - { "Header", "ceph.header", FT_NONE, - BASE_NONE, NULL, 0x0, NULL, HFILL }}, - { &hf_banner, - { "Banner", "ceph.connect.banner", FT_STRING, - BASE_NONE, NULL, 0x0, NULL, HFILL }}, - { &hf_entity_type, - { "entity type", "ceph.entity.type", FT_UINT32, - BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_entity_num, - { "entity num", "ceph.entity.num", FT_UINT64, - BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_entity_addr, - { "Entity Addr", "ceph.entity.addr", FT_NONE, - BASE_NONE, NULL, 0x0, NULL, HFILL }}, - { &hf_banner_magic, - { "Banner Magic", "ceph.connect.banner.magic", FT_STRING, - BASE_NONE, NULL, 0x0, NULL, HFILL }}, - { &hf_banner_version, - { "Banner Version", "ceph.connect.banner.ver", FT_STRING, - BASE_NONE, NULL, 0x0, NULL, HFILL }}, - { &hf_entity_erank, - { "erank", "ceph.entity.erank", FT_UINT32, - BASE_HEX, NULL, 0x0, NULL, HFILL }}, - { &hf_entity_nonce, - { "nonce", "ceph.entity.nonce", FT_UINT32, - BASE_HEX, NULL, 0x0, NULL, HFILL }}, - { &hf_sockaddr_in, - { "sockaddr_in", "ceph.sockaddr_in", FT_NONE, - BASE_NONE, NULL, 0x0, NULL, HFILL }}, - { &hf_sin_family, - { "sin_family", "ceph.sin_family", FT_UINT16, - BASE_HEX, NULL, 0x0, NULL, HFILL }}, - { &hf_sin_port, - { "sin_port", "ceph.sin_port", FT_UINT16, - BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_sin_addr, - { "ip addr", "ceph.addr", FT_IPv4, - BASE_NONE, NULL, 0x0, NULL, HFILL }}, - { &hf_connect_features, - { "features", "ceph.connect.features", FT_UINT64, - BASE_HEX, NULL, 0x0, NULL, HFILL }}, - { &hf_connect_host_type, - { "host_type", "ceph.connect.host_type", FT_UINT32, - BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_connect_tag, - { "tag", "ceph.connect.tag", FT_UINT8, - BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_connect_global_seq, - { "global_seq", "ceph.connect.global_seq", FT_UINT32, - BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_connect_connect_seq, - { "connect_seq", "ceph.connect.connect_seq", FT_UINT32, - BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_connect_protocol_version, - { "protocol_version", "ceph.connect.protocol_version", FT_UINT32, - BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_connect_authorizer_protocol, - { "authorizer_protocol", "ceph.connect.authorizer_protocol", FT_UINT32, - BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_connect_authorizer_len, - { "authorizer_len", "ceph.connect.authorizer_len", FT_UINT32, - BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_connect_flags, - { "flags", "ceph.connect.flags", FT_UINT8, - BASE_HEX, NULL, 0x0, NULL, HFILL }}, - { &hf_connect_authentication_key, - { "authentication_key", "ceph.connect.authentication_key", FT_BYTES, - BASE_NONE, NULL, 0x0, NULL, HFILL }}, - { &hf_hdr_tag, - { "tag", "ceph.tag", FT_UINT8, - BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_hdr_seq_ack, - { "ack seq", "ceph.ack.seq", FT_UINT64, - BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_hdr_seq, - { "seq", "ceph.seq", FT_UINT64, - BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_hdr_tid, - { "tid", "ceph.tid", FT_UINT64, - BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_hdr_type, - { "type", "ceph.type", FT_UINT16, - BASE_HEX, NULL, 0x0, NULL, HFILL }}, - { &hf_hdr_priority, - { "priority", "ceph.priority", FT_UINT16, - BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_hdr_version, - { "version", "ceph.version", FT_UINT16, - BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_hdr_mon_protocol, - { "mon_protocol", "ceph.mon_protocol", FT_UINT16, - BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_hdr_osd_protocol, - { "osd_protocol", "ceph.osd_protocol", FT_UINT16, - BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_hdr_mds_protocol, - { "mds_protocol", "ceph.mds_protocol", FT_UINT16, - BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_hdr_client_protocol, - { "client_protocol", "ceph.client_protocol", FT_UINT16, - BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_hdr_front_len, - { "front_len", "ceph.front_len", FT_UINT32, - BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_hdr_middle_len, - { "middle_len", "ceph.middle_len", FT_UINT32, - BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_hdr_data_off, - { "data_off", "ceph.data_off", FT_UINT32, - BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_hdr_data_len, - { "data_len", "ceph.data_len", FT_UINT32, - BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_hdr_src, - { "src entity name", "ceph.src", FT_NONE, - BASE_NONE, NULL, 0x0, NULL, HFILL }}, - { &hf_hdr_crc, - { "crc", "ceph.crc", FT_UINT32, - BASE_HEX, NULL, 0x0, NULL, HFILL }}, - { &hf_footer, - { "Footer", "ceph.footer", FT_NONE, - BASE_NONE, NULL, 0x0, NULL, HFILL }}, - { &hf_footer_front_crc, - { "front_crc", "ceph.footer.front_crc", FT_UINT32, - BASE_HEX, NULL, 0x0, NULL, HFILL }}, - { &hf_footer_middle_crc, - { "middle_crc", "ceph.footer.middle_crc", FT_UINT32, - BASE_HEX, NULL, 0x0, NULL, HFILL }}, - { &hf_footer_data_crc, - { "data_crc", "ceph.footer.data_crc", FT_UINT32, - BASE_HEX, NULL, 0x0, NULL, HFILL }}, - { &hf_footer_sig, - { "sig", "ceph.footer.sig", FT_UINT64, - BASE_HEX, NULL, 0x0, NULL, HFILL }}, - { &hf_footer_flags, - { "flags", "ceph.footer.flags", FT_UINT8, - BASE_HEX, NULL, 0x0, NULL, HFILL }}, - }; - static gint *ett[] = { - &ett_ceph, - &ett_header, - &ett_banner, - &ett_entity_addr, - &ett_front, - &ett_footer, - &ett_sockaddr_in, - &ett_entity_name, - &ett_compat, - &ett_rocompat, - &ett_incompat, - }; - - /* - * Register the CEPH protocol - */ - g_proto_ceph = proto_register_protocol ("CEPH Protocol", "CEPH", "ceph"); - proto_register_field_array (g_proto_ceph, hf, array_length (hf)); - proto_register_subtree_array (ett, array_length (ett)); - register_dissector("ceph", dissect_ceph, g_proto_ceph); -} - - diff --git a/wireshark/ceph-alt/plugin.c b/wireshark/ceph-alt/plugin.c deleted file mode 100644 index 3c5ff04c0dfe..000000000000 --- a/wireshark/ceph-alt/plugin.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Do not modify this file. Changes will be overwritten. - * - * Generated automatically from ../../tools/make-dissector-reg.py. - */ - -#include "config.h" - -#include - -#include "moduleinfo.h" - -/* plugins are DLLs */ -#define WS_BUILD_DLL -#include "ws_symbol_export.h" - -#ifndef ENABLE_STATIC -WS_DLL_PUBLIC_NOEXTERN const gchar version[] = VERSION; - -/* Start the functions we need for the plugin stuff */ - -WS_DLL_PUBLIC_NOEXTERN void -plugin_register (void) -{ - {extern void proto_register_ceph (void); proto_register_ceph ();} -} - -WS_DLL_PUBLIC_NOEXTERN void -plugin_reg_handoff(void) -{ - {extern void proto_reg_handoff_ceph (void); proto_reg_handoff_ceph ();} -} -#endif diff --git a/wireshark/ceph-alt/plugin.rc.in b/wireshark/ceph-alt/plugin.rc.in deleted file mode 100644 index b1e22ef37323..000000000000 --- a/wireshark/ceph-alt/plugin.rc.in +++ /dev/null @@ -1,34 +0,0 @@ -#include "winver.h" - -VS_VERSION_INFO VERSIONINFO - FILEVERSION @RC_MODULE_VERSION@ - PRODUCTVERSION @RC_VERSION@ - FILEFLAGSMASK 0x0L -#ifdef _DEBUG - FILEFLAGS VS_FF_PRERELEASE+VS_FF_DEBUG -#else - FILEFLAGS VS_FF_PRERELEASE -#endif - FILEOS VOS_NT_WINDOWS32 - FILETYPE VFT_DLL -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "CompanyName", "The Wireshark developer community, http://www.wireshark.org/\0" - VALUE "FileDescription", "@PACKAGE@ dissector\0" - VALUE "FileVersion", "@MODULE_VERSION@\0" - VALUE "InternalName", "@PACKAGE@ @MODULE_VERSION@\0" - VALUE "LegalCopyright", "Copyright © 1998 Gerald Combs , Gilbert Ramirez and others\0" - VALUE "OriginalFilename", "@PLUGIN_NAME@.dll\0" - VALUE "ProductName", "Wireshark\0" - VALUE "ProductVersion", "@VERSION@\0" - VALUE "Comments", "Build with @MSVC_VARIANT@\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END diff --git a/wireshark/ceph-alt/ws-1.10.0.patch b/wireshark/ceph-alt/ws-1.10.0.patch deleted file mode 100644 index 5b1be8fdd7e8..000000000000 --- a/wireshark/ceph-alt/ws-1.10.0.patch +++ /dev/null @@ -1,95 +0,0 @@ -diff -rupN wireshark-1.10.0.orig/configure wireshark-1.10.0.new/configure ---- wireshark-1.10.0.orig/configure 2013-06-05 18:27:58.000000000 +0100 -+++ wireshark-1.10.0.new/configure 2013-07-01 18:24:23.711203830 +0100 -@@ -33865,7 +33865,7 @@ rm -f confcache - - ac_config_headers="$ac_config_headers config.h" - --ac_config_files="$ac_config_files Makefile doxygen.cfg asn1/Makefile asn1/acp133/Makefile asn1/acse/Makefile asn1/ansi_map/Makefile asn1/ansi_tcap/Makefile asn1/c1222/Makefile asn1/camel/Makefile asn1/cdt/Makefile asn1/charging_ase/Makefile asn1/cmip/Makefile asn1/cmp/Makefile asn1/crmf/Makefile asn1/cms/Makefile asn1/credssp/Makefile asn1/dap/Makefile asn1/disp/Makefile asn1/dop/Makefile asn1/dsp/Makefile asn1/ess/Makefile asn1/ftam/Makefile asn1/gnm/Makefile asn1/goose/Makefile asn1/gprscdr/Makefile asn1/gsm_map/Makefile asn1/h225/Makefile asn1/h235/Makefile asn1/h245/Makefile asn1/h248/Makefile asn1/h282/Makefile asn1/h283/Makefile asn1/h323/Makefile asn1/h450/Makefile asn1/h450-ros/Makefile asn1/h460/Makefile asn1/h501/Makefile asn1/HI2Operations/Makefile asn1/hnbap/Makefile asn1/idmp/Makefile asn1/inap/Makefile asn1/isdn-sup/Makefile asn1/kerberos/Makefile asn1/lcsap/Makefile asn1/ldap/Makefile asn1/logotypecertextn/Makefile asn1/lpp/Makefile asn1/lppa/Makefile asn1/lppe/Makefile asn1/lte-rrc/Makefile asn1/m3ap/Makefile asn1/mms/Makefile asn1/mpeg-audio/Makefile asn1/mpeg-pes/Makefile asn1/nbap/Makefile asn1/ns_cert_exts/Makefile asn1/ocsp/Makefile asn1/p1/Makefile asn1/p22/Makefile asn1/p7/Makefile asn1/p772/Makefile asn1/pcap/Makefile asn1/pkcs1/Makefile asn1/pkcs12/Makefile asn1/pkinit/Makefile asn1/pkixac/Makefile asn1/pkix1explicit/Makefile asn1/pkix1implicit/Makefile asn1/pkixproxy/Makefile asn1/pkixqualified/Makefile asn1/pkixtsp/Makefile asn1/pres/Makefile asn1/q932/Makefile asn1/q932-ros/Makefile asn1/qsig/Makefile asn1/ranap/Makefile asn1/rnsap/Makefile asn1/ros/Makefile asn1/rrc/Makefile asn1/rrlp/Makefile asn1/rtse/Makefile asn1/rua/Makefile asn1/s1ap/Makefile asn1/sabp/Makefile asn1/sbc-ap/Makefile asn1/smrse/Makefile asn1/snmp/Makefile asn1/spnego/Makefile asn1/sv/Makefile asn1/t124/Makefile asn1/t125/Makefile asn1/t38/Makefile asn1/tcap/Makefile asn1/tetra/Makefile asn1/ulp/Makefile asn1/wlancertextn/Makefile asn1/x2ap/Makefile asn1/x509af/Makefile asn1/x509ce/Makefile asn1/x509if/Makefile asn1/x509sat/Makefile asn1/x721/Makefile doc/Makefile docbook/Makefile epan/Makefile epan/crypt/Makefile epan/doxygen.cfg epan/dfilter/Makefile epan/dissectors/Makefile epan/dissectors/dcerpc/Makefile epan/dissectors/pidl/Makefile epan/ftypes/Makefile epan/wmem/Makefile epan/wslua/Makefile epan/wspython/Makefile codecs/Makefile ui/Makefile ui/doxygen.cfg ui/gtk/Makefile ui/gtk/doxygen.cfg ui/cli/Makefile ui/qt/Makefile ui/qt/doxygen.cfg help/Makefile packaging/Makefile packaging/macosx/Info.plist packaging/macosx/Makefile packaging/macosx/osx-dmg.sh packaging/nsis/Makefile packaging/rpm/Makefile packaging/rpm/SPECS/Makefile packaging/rpm/SPECS/wireshark.spec packaging/svr4/Makefile packaging/svr4/checkinstall packaging/svr4/pkginfo plugins/Makefile plugins/asn1/Makefile plugins/docsis/Makefile plugins/ethercat/Makefile plugins/gryphon/Makefile plugins/irda/Makefile plugins/m2m/Makefile plugins/mate/Makefile plugins/opcua/Makefile plugins/profinet/Makefile plugins/stats_tree/Makefile plugins/unistim/Makefile plugins/wimax/Makefile plugins/wimaxasncp/Makefile plugins/wimaxmacphy/Makefile tools/Makefile tools/lemon/Makefile wiretap/Makefile wsutil/Makefile" -+ac_config_files="$ac_config_files Makefile doxygen.cfg asn1/Makefile asn1/acp133/Makefile asn1/acse/Makefile asn1/ansi_map/Makefile asn1/ansi_tcap/Makefile asn1/c1222/Makefile asn1/camel/Makefile asn1/cdt/Makefile asn1/charging_ase/Makefile asn1/cmip/Makefile asn1/cmp/Makefile asn1/crmf/Makefile asn1/cms/Makefile asn1/credssp/Makefile asn1/dap/Makefile asn1/disp/Makefile asn1/dop/Makefile asn1/dsp/Makefile asn1/ess/Makefile asn1/ftam/Makefile asn1/gnm/Makefile asn1/goose/Makefile asn1/gprscdr/Makefile asn1/gsm_map/Makefile asn1/h225/Makefile asn1/h235/Makefile asn1/h245/Makefile asn1/h248/Makefile asn1/h282/Makefile asn1/h283/Makefile asn1/h323/Makefile asn1/h450/Makefile asn1/h450-ros/Makefile asn1/h460/Makefile asn1/h501/Makefile asn1/HI2Operations/Makefile asn1/hnbap/Makefile asn1/idmp/Makefile asn1/inap/Makefile asn1/isdn-sup/Makefile asn1/kerberos/Makefile asn1/lcsap/Makefile asn1/ldap/Makefile asn1/logotypecertextn/Makefile asn1/lpp/Makefile asn1/lppa/Makefile asn1/lppe/Makefile asn1/lte-rrc/Makefile asn1/m3ap/Makefile asn1/mms/Makefile asn1/mpeg-audio/Makefile asn1/mpeg-pes/Makefile asn1/nbap/Makefile asn1/ns_cert_exts/Makefile asn1/ocsp/Makefile asn1/p1/Makefile asn1/p22/Makefile asn1/p7/Makefile asn1/p772/Makefile asn1/pcap/Makefile asn1/pkcs1/Makefile asn1/pkcs12/Makefile asn1/pkinit/Makefile asn1/pkixac/Makefile asn1/pkix1explicit/Makefile asn1/pkix1implicit/Makefile asn1/pkixproxy/Makefile asn1/pkixqualified/Makefile asn1/pkixtsp/Makefile asn1/pres/Makefile asn1/q932/Makefile asn1/q932-ros/Makefile asn1/qsig/Makefile asn1/ranap/Makefile asn1/rnsap/Makefile asn1/ros/Makefile asn1/rrc/Makefile asn1/rrlp/Makefile asn1/rtse/Makefile asn1/rua/Makefile asn1/s1ap/Makefile asn1/sabp/Makefile asn1/sbc-ap/Makefile asn1/smrse/Makefile asn1/snmp/Makefile asn1/spnego/Makefile asn1/sv/Makefile asn1/t124/Makefile asn1/t125/Makefile asn1/t38/Makefile asn1/tcap/Makefile asn1/tetra/Makefile asn1/ulp/Makefile asn1/wlancertextn/Makefile asn1/x2ap/Makefile asn1/x509af/Makefile asn1/x509ce/Makefile asn1/x509if/Makefile asn1/x509sat/Makefile asn1/x721/Makefile doc/Makefile docbook/Makefile epan/Makefile epan/crypt/Makefile epan/doxygen.cfg epan/dfilter/Makefile epan/dissectors/Makefile epan/dissectors/dcerpc/Makefile epan/dissectors/pidl/Makefile epan/ftypes/Makefile epan/wmem/Makefile epan/wslua/Makefile epan/wspython/Makefile codecs/Makefile ui/Makefile ui/doxygen.cfg ui/gtk/Makefile ui/gtk/doxygen.cfg ui/cli/Makefile ui/qt/Makefile ui/qt/doxygen.cfg help/Makefile packaging/Makefile packaging/macosx/Info.plist packaging/macosx/Makefile packaging/macosx/osx-dmg.sh packaging/nsis/Makefile packaging/rpm/Makefile packaging/rpm/SPECS/Makefile packaging/rpm/SPECS/wireshark.spec packaging/svr4/Makefile packaging/svr4/checkinstall packaging/svr4/pkginfo plugins/Makefile plugins/asn1/Makefile plugins/ceph plugins/docsis/Makefile plugins/ethercat/Makefile plugins/gryphon/Makefile plugins/irda/Makefile plugins/m2m/Makefile plugins/mate/Makefile plugins/opcua/Makefile plugins/profinet/Makefile plugins/stats_tree/Makefile plugins/unistim/Makefile plugins/wimax/Makefile plugins/wimaxasncp/Makefile plugins/wimaxmacphy/Makefile tools/Makefile tools/lemon/Makefile wiretap/Makefile wsutil/Makefile" - - cat >confcache <<\_ACEOF - # This file is a shell script that caches the results of configure -@@ -35221,6 +35221,7 @@ do - "packaging/svr4/pkginfo") CONFIG_FILES="$CONFIG_FILES packaging/svr4/pkginfo" ;; - "plugins/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/Makefile" ;; - "plugins/asn1/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/asn1/Makefile" ;; -+ "plugins/ceph/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/ceph/Makefile" ;; - "plugins/docsis/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/docsis/Makefile" ;; - "plugins/ethercat/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/ethercat/Makefile" ;; - "plugins/gryphon/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/gryphon/Makefile" ;; -diff -rupN wireshark-1.10.0.orig/configure.ac wireshark-1.10.0.new/configure.ac ---- wireshark-1.10.0.orig/configure.ac 2013-06-05 18:27:26.000000000 +0100 -+++ wireshark-1.10.0.new/configure.ac 2013-07-01 18:24:42.191203182 +0100 -@@ -2449,6 +2449,7 @@ AC_OUTPUT( - packaging/svr4/pkginfo - plugins/Makefile - plugins/asn1/Makefile -+ plugins/ceph/Makefile - plugins/docsis/Makefile - plugins/ethercat/Makefile - plugins/gryphon/Makefile -diff -rupN wireshark-1.10.0.orig/epan/Makefile.am wireshark-1.10.0.new/epan/Makefile.am ---- wireshark-1.10.0.orig/epan/Makefile.am 2013-06-04 00:37:27.000000000 +0100 -+++ wireshark-1.10.0.new/epan/Makefile.am 2013-07-01 18:27:34.099197136 +0100 -@@ -197,6 +197,7 @@ if ENABLE_STATIC - -include ../plugins/Custom.make - plugin_src = \ - ../plugins/asn1/packet-asn1.c \ -+ ../plugins/ceph/packet-ceph.c \ - ../plugins/docsis/packet-bintrngreq.c \ - ../plugins/docsis/packet-bpkmattr.c \ - ../plugins/docsis/packet-bpkmreq.c \ -diff -rupN wireshark-1.10.0.orig/packaging/nsis/Makefile.nmake wireshark-1.10.0.new/packaging/nsis/Makefile.nmake ---- wireshark-1.10.0.orig/packaging/nsis/Makefile.nmake 2013-04-23 18:42:17.000000000 +0100 -+++ wireshark-1.10.0.new/packaging/nsis/Makefile.nmake 2013-07-01 18:25:49.039200833 +0100 -@@ -46,6 +46,7 @@ HELP=$(STAGING_DIR)/help/capture_filters - - PLUGINS= \ - ../../plugins/asn1/asn1.dll \ -+ ../../plugins/asn1/ceph.dll \ - ../../plugins/docsis/docsis.dll \ - ../../plugins/ethercat/ethercat.dll \ - ../../plugins/gryphon/gryphon.dll \ -diff -rupN wireshark-1.10.0.orig/packaging/nsis/wireshark.nsi wireshark-1.10.0.new/packaging/nsis/wireshark.nsi ---- wireshark-1.10.0.orig/packaging/nsis/wireshark.nsi 2013-05-07 00:45:35.000000000 +0100 -+++ wireshark-1.10.0.new/packaging/nsis/wireshark.nsi 2013-07-01 18:26:27.067199497 +0100 -@@ -844,6 +844,7 @@ Section "Dissector Plugins" SecPlugins - ;------------------------------------------- - SetOutPath '$INSTDIR\plugins\${VERSION}' - File "${STAGING_DIR}\plugins\${VERSION}\asn1.dll" -+File "${STAGING_DIR}\plugins\${VERSION}\ceph.dll" - File "${STAGING_DIR}\plugins\${VERSION}\docsis.dll" - File "${STAGING_DIR}\plugins\${VERSION}\ethercat.dll" - File "${STAGING_DIR}\plugins\${VERSION}\gryphon.dll" -diff -rupN wireshark-1.10.0.orig/plugins/Makefile.am wireshark-1.10.0.new/plugins/Makefile.am ---- wireshark-1.10.0.orig/plugins/Makefile.am 2013-04-22 19:04:14.000000000 +0100 -+++ wireshark-1.10.0.new/plugins/Makefile.am 2013-07-01 18:21:48.731209276 +0100 -@@ -25,6 +25,7 @@ - - SUBDIRS = $(_CUSTOM_SUBDIRS_) \ - asn1 \ -+ ceph \ - docsis \ - ethercat \ - gryphon \ -diff -rupN wireshark-1.10.0.orig/plugins/Makefile.nmake wireshark-1.10.0.new/plugins/Makefile.nmake ---- wireshark-1.10.0.orig/plugins/Makefile.nmake 2013-04-22 19:04:14.000000000 +0100 -+++ wireshark-1.10.0.new/plugins/Makefile.nmake 2013-07-01 18:22:08.647208577 +0100 -@@ -8,6 +8,7 @@ include ..\config.nmake - - PLUGIN_LIST = \ - asn1 \ -+ ceph \ - docsis \ - ethercat \ - gryphon \ -@@ -20,7 +21,7 @@ PLUGIN_LIST = \ - unistim \ - wimax \ - wimaxasncp \ -- wimaxmacphy -+ wimaxmacphy - - - all: diff --git a/wireshark/ceph/Makefile.am b/wireshark/ceph/Makefile.am deleted file mode 100644 index 76b3e7a11b27..000000000000 --- a/wireshark/ceph/Makefile.am +++ /dev/null @@ -1,126 +0,0 @@ -# Makefile.am -# Automake file for Cisco SS7 Session Management plugin -# Copyright 2004, Duncan Sargeant -# -# $Id: Makefile.am 24488 2008-02-27 16:18:30Z stig $ -# -# Wireshark - Network traffic analyzer -# By Gerald Combs -# Copyright 1998 Gerald Combs -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# - -INCLUDES = -I$(top_srcdir) -I$(includedir) - -include Makefile.common - - -if HAVE_WARNINGS_AS_ERRORS -AM_CFLAGS = -Werror -endif - -plugindir = @plugindir@ - -plugin_LTLIBRARIES = ceph.la -ceph_la_SOURCES = \ - plugin.c \ - moduleinfo.h \ - $(DISSECTOR_SRC) \ - $(DISSECTOR_INCLUDES) -ceph_la_LDFLAGS = -module -avoid-version -ceph_la_LIBADD = @PLUGIN_LIBS@ - -# Libs must be cleared, or else libtool won't create a shared module. -# If your module needs to be linked against any particular libraries, -# add them here. -LIBS = - -# -# Build plugin.c, which contains the plugin version[] string, a -# function plugin_register() that calls the register routines for all -# protocols, and a function plugin_reg_handoff() that calls the handoff -# registration routines for all protocols. -# -# We do this by scanning sources. If that turns out to be too slow, -# maybe we could just require every .o file to have an register routine -# of a given name (packet-aarp.o -> proto_register_aarp, etc.). -# -# Formatting conventions: The name of the proto_register_* routines an -# proto_reg_handoff_* routines must start in column zero, or must be -# preceded only by "void " starting in column zero, and must not be -# inside #if. -# -# DISSECTOR_SRC is assumed to have all the files that need to be scanned. -# -# For some unknown reason, having a big "for" loop in the Makefile -# to scan all the files doesn't work with some "make"s; they seem to -# pass only the first few names in the list to the shell, for some -# reason. -# -# Therefore, we have a script to generate the plugin.c file. -# The shell script runs slowly, as multiple greps and seds are run -# for each input file; this is especially slow on Windows. Therefore, -# if Python is present (as indicated by PYTHON being defined), we run -# a faster Python script to do that work instead. -# -# The first argument is the directory in which the source files live. -# The second argument is "plugin", to indicate that we should build -# a plugin.c file for a plugin. -# All subsequent arguments are the files to scan. -# -plugin.c: $(DISSECTOR_SRC) $(top_srcdir)/tools/make-dissector-reg \ - $(top_srcdir)/tools/make-dissector-reg.py - @if test -n "$(PYTHON)"; then \ - echo Making plugin.c with python ; \ - $(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \ - plugin $(DISSECTOR_SRC) ; \ - else \ - echo Making plugin.c with shell script ; \ - $(top_srcdir)/tools/make-dissector-reg $(srcdir) \ - $(plugin_src) plugin $(DISSECTOR_SRC) ; \ - fi - -# -# Currently plugin.c can be included in the distribution because -# we always build all protocol dissectors. We used to have to check -# whether or not to build the snmp dissector. If we again need to -# variably build something, making plugin.c non-portable, uncomment -# the dist-hook line below. -# -# Oh, yuk. We don't want to include "plugin.c" in the distribution, as -# its contents depend on the configuration, and therefore we want it -# to be built when the first "make" is done; however, Automake insists -# on putting *all* source into the distribution. -# -# We work around this by having a "dist-hook" rule that deletes -# "plugin.c", so that "dist" won't pick it up. -# -#dist-hook: -# @rm -f $(distdir)/plugin.c - -CLEANFILES = \ - ceph \ - *~ - -MAINTAINERCLEANFILES = \ - Makefile.in \ - plugin.c - -EXTRA_DIST = \ - Makefile.common \ - Makefile.nmake \ - moduleinfo.nmake \ - plugin.rc.in diff --git a/wireshark/ceph/Makefile.common b/wireshark/ceph/Makefile.common deleted file mode 100644 index b8a8f155314e..000000000000 --- a/wireshark/ceph/Makefile.common +++ /dev/null @@ -1,32 +0,0 @@ -# Makefile.common for Cisco SS7 Session Management plugin -# Contains the stuff from Makefile.am and Makefile.nmake that is -# a) common to both files and -# b) portable between both files -# -# $Id: Makefile.common 18197 2006-05-21 05:12:17Z sahlberg $ -# -# Wireshark - Network traffic analyzer -# By Gerald Combs -# Copyright 1998 Gerald Combs -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -# the name of the plugin -PLUGIN_NAME = ceph - -# the dissector sources (without any helpers) -DISSECTOR_SRC = \ - sctp_crc32.c \ - packet-ceph.c diff --git a/wireshark/ceph/Makefile.nmake b/wireshark/ceph/Makefile.nmake deleted file mode 100644 index 857e4354bc39..000000000000 --- a/wireshark/ceph/Makefile.nmake +++ /dev/null @@ -1,100 +0,0 @@ -# Makefile.nmake -# nmake file for Wireshark plugin -# -# $Id: Makefile.nmake 24520 2008-03-01 12:31:01Z jake $ -# - -include ..\..\config.nmake -include moduleinfo.nmake - -include Makefile.common - -CFLAGS=/WX /DHAVE_CONFIG_H /I../.. /I../../wiretap $(GLIB_CFLAGS) \ - /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS) - -.c.obj:: - $(CC) $(CFLAGS) -Fd.\ -c $< - -LDFLAGS = $(PLUGIN_LDFLAGS) - -!IFDEF ENABLE_LIBWIRESHARK -LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib -CFLAGS=/DHAVE_WIN32_LIBWIRESHARK_LIB /D_NEED_VAR_IMPORT_ $(CFLAGS) - -DISSECTOR_OBJECTS = $(DISSECTOR_SRC:.c=.obj) - -DISSECTOR_SUPPORT_OBJECTS = $(DISSECTOR_SUPPORT_SRC:.c=.obj) - -OBJECTS = $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS) plugin.obj - -RESOURCE=$(PLUGIN_NAME).res - -all: $(PLUGIN_NAME).dll - -$(PLUGIN_NAME).rc : moduleinfo.nmake - sed -e s/@PLUGIN_NAME@/$(PLUGIN_NAME)/ \ - -e s/@RC_MODULE_VERSION@/$(RC_MODULE_VERSION)/ \ - -e s/@RC_VERSION@/$(RC_VERSION)/ \ - -e s/@MODULE_VERSION@/$(MODULE_VERSION)/ \ - -e s/@PACKAGE@/$(PACKAGE)/ \ - -e s/@VERSION@/$(VERSION)/ \ - -e s/@MSVC_VARIANT@/$(MSVC_VARIANT)/ \ - < plugin.rc.in > $@ - -$(PLUGIN_NAME).dll $(PLUGIN_NAME).exp $(PLUGIN_NAME).lib : $(OBJECTS) $(LINK_PLUGIN_WITH) $(RESOURCE) - link -dll /out:$(PLUGIN_NAME).dll $(LDFLAGS) $(OBJECTS) $(LINK_PLUGIN_WITH) \ - $(GLIB_LIBS) $(RESOURCE) - -# -# Build plugin.c, which contains the plugin version[] string, a -# function plugin_register() that calls the register routines for all -# protocols, and a function plugin_reg_handoff() that calls the handoff -# registration routines for all protocols. -# -# We do this by scanning sources. If that turns out to be too slow, -# maybe we could just require every .o file to have an register routine -# of a given name (packet-aarp.o -> proto_register_aarp, etc.). -# -# Formatting conventions: The name of the proto_register_* routines an -# proto_reg_handoff_* routines must start in column zero, or must be -# preceded only by "void " starting in column zero, and must not be -# inside #if. -# -# DISSECTOR_SRC is assumed to have all the files that need to be scanned. -# -# For some unknown reason, having a big "for" loop in the Makefile -# to scan all the files doesn't work with some "make"s; they seem to -# pass only the first few names in the list to the shell, for some -# reason. -# -# Therefore, we have a script to generate the plugin.c file. -# The shell script runs slowly, as multiple greps and seds are run -# for each input file; this is especially slow on Windows. Therefore, -# if Python is present (as indicated by PYTHON being defined), we run -# a faster Python script to do that work instead. -# -# The first argument is the directory in which the source files live. -# The second argument is "plugin", to indicate that we should build -# a plugin.c file for a plugin. -# All subsequent arguments are the files to scan. -# -!IFDEF PYTHON -plugin.c: $(DISSECTOR_SRC) moduleinfo.h ../../tools/make-dissector-reg.py - @echo Making plugin.c (using python) - @$(PYTHON) "../../tools/make-dissector-reg.py" . plugin $(DISSECTOR_SRC) -!ELSE -plugin.c: $(DISSECTOR_SRC) moduleinfo.h ../../tools/make-dissector-reg - @echo Making plugin.c (using sh) - @$(SH) ../../tools/make-dissector-reg . plugin $(DISSECTOR_SRC) -!ENDIF - -!ENDIF - -clean: - rm -f $(OBJECTS) $(RESOURCE) plugin.c *.pdb \ - $(PLUGIN_NAME).dll $(PLUGIN_NAME).dll.manifest $(PLUGIN_NAME).lib \ - $(PLUGIN_NAME).exp $(PLUGIN_NAME).rc - -distclean: clean - -maintainer-clean: distclean diff --git a/wireshark/ceph/ceph_fs.h b/wireshark/ceph/ceph_fs.h deleted file mode 100644 index 674226b1e20b..000000000000 --- a/wireshark/ceph/ceph_fs.h +++ /dev/null @@ -1,752 +0,0 @@ -/* - * ceph_fs.h - Ceph constants and data types to share between kernel and - * user space. - * - * Most types in this file are defined as little-endian, and are - * primarily intended to describe data structures that pass over the - * wire or that are stored on disk. - * - * LGPL2 - */ - -#ifndef CEPH_FS_H -#define CEPH_FS_H - -#include "msgr.h" -#include "rados.h" - -/* - * subprotocol versions. when specific messages types or high-level - * protocols change, bump the affected components. we keep rev - * internal cluster protocols separately from the public, - * client-facing protocol. - */ -#define CEPH_OSD_PROTOCOL 8 /* cluster internal */ -#define CEPH_MDS_PROTOCOL 12 /* cluster internal */ -#define CEPH_MON_PROTOCOL 5 /* cluster internal */ -#define CEPH_OSDC_PROTOCOL 24 /* server/client */ -#define CEPH_MDSC_PROTOCOL 32 /* server/client */ -#define CEPH_MONC_PROTOCOL 15 /* server/client */ - - -#define CEPH_INO_ROOT 1 -#define CEPH_INO_CEPH 2 /* hidden .ceph dir */ - -/* arbitrary limit on max # of monitors (cluster of 3 is typical) */ -#define CEPH_MAX_MON 31 - - -/* - * feature bits - */ -#define CEPH_FEATURE_UID (1<<0) -#define CEPH_FEATURE_NOSRCADDR (1<<1) -#define CEPH_FEATURE_MONCLOCKCHECK (1<<2) -#define CEPH_FEATURE_FLOCK (1<<3) -#define CEPH_FEATURE_SUBSCRIBE2 (1<<4) -#define CEPH_FEATURE_MONNAMES (1<<5) -#define CEPH_FEATURE_RECONNECT_SEQ (1<<6) -#define CEPH_FEATURE_DIRLAYOUTHASH (1<<7) - - -/* - * ceph_file_layout - describe data layout for a file/inode - */ -struct ceph_file_layout { - /* file -> object mapping */ - __le32 fl_stripe_unit; /* stripe unit, in bytes. must be multiple - of page size. */ - __le32 fl_stripe_count; /* over this many objects */ - __le32 fl_object_size; /* until objects are this big, then move to - new objects */ - __le32 fl_cas_hash; /* UNUSED. 0 = none; 1 = sha256 */ - - /* pg -> disk layout */ - __le32 fl_object_stripe_unit; /* UNUSED. for per-object parity, if any */ - - /* object -> pg layout */ - __le32 fl_pg_preferred; /* preferred primary for pg (-1 for none) */ - __le32 fl_pg_pool; /* namespace, crush ruleset, rep level */ -} __attribute__ ((packed)); - -#define CEPH_MIN_STRIPE_UNIT 65536 - -int ceph_file_layout_is_valid(const struct ceph_file_layout *layout); - -struct ceph_dir_layout { - __u8 dl_dir_hash; /* see ceph_hash.h for ids */ - __u8 dl_unused1; - __u16 dl_unused2; - __u32 dl_unused3; -} __attribute__ ((packed)); - -/* crypto algorithms */ -#define CEPH_CRYPTO_NONE 0x0 -#define CEPH_CRYPTO_AES 0x1 - -#define CEPH_AES_IV "cephsageyudagreg" - -/* security/authentication protocols */ -#define CEPH_AUTH_UNKNOWN 0x0 -#define CEPH_AUTH_NONE 0x1 -#define CEPH_AUTH_CEPHX 0x2 - -#define CEPH_AUTH_UID_DEFAULT ((__u64) -1) - - -/********************************************* - * message layer - */ - -/* - * message types - */ - -/* misc */ -#define CEPH_MSG_SHUTDOWN 1 -#define CEPH_MSG_PING 2 - -/* client <-> monitor */ -#define CEPH_MSG_MON_MAP 4 -#define CEPH_MSG_MON_GET_MAP 5 -#define CEPH_MSG_STATFS 13 -#define CEPH_MSG_STATFS_REPLY 14 -#define CEPH_MSG_MON_SUBSCRIBE 15 -#define CEPH_MSG_MON_SUBSCRIBE_ACK 16 -#define CEPH_MSG_AUTH 17 -#define CEPH_MSG_AUTH_REPLY 18 - -/* client <-> mds */ -#define CEPH_MSG_MDS_MAP 21 - -#define CEPH_MSG_CLIENT_SESSION 22 -#define CEPH_MSG_CLIENT_RECONNECT 23 - -#define CEPH_MSG_CLIENT_REQUEST 24 -#define CEPH_MSG_CLIENT_REQUEST_FORWARD 25 -#define CEPH_MSG_CLIENT_REPLY 26 -#define CEPH_MSG_CLIENT_CAPS 0x310 -#define CEPH_MSG_CLIENT_LEASE 0x311 -#define CEPH_MSG_CLIENT_SNAP 0x312 -#define CEPH_MSG_CLIENT_CAPRELEASE 0x313 - -/* pool ops */ -#define CEPH_MSG_POOLOP_REPLY 48 -#define CEPH_MSG_POOLOP 49 - - -/* osd */ -#define CEPH_MSG_OSD_MAP 41 -#define CEPH_MSG_OSD_OP 42 -#define CEPH_MSG_OSD_OPREPLY 43 -#define CEPH_MSG_WATCH_NOTIFY 44 - - -/* watch-notify operations */ -enum { - WATCH_NOTIFY = 1, /* notifying watcher */ - WATCH_NOTIFY_COMPLETE = 2, /* notifier notified when done */ -}; - - -/* pool operations */ -enum { - POOL_OP_CREATE = 0x01, - POOL_OP_DELETE = 0x02, - POOL_OP_AUID_CHANGE = 0x03, - POOL_OP_CREATE_SNAP = 0x11, - POOL_OP_DELETE_SNAP = 0x12, - POOL_OP_CREATE_UNMANAGED_SNAP = 0x21, - POOL_OP_DELETE_UNMANAGED_SNAP = 0x22, -}; - -struct ceph_mon_request_header { - __le64 have_version; - __le16 session_mon; - __le64 session_mon_tid; -} __attribute__ ((packed)); - -struct ceph_mon_statfs { - struct ceph_mon_request_header monhdr; - struct ceph_fsid fsid; -} __attribute__ ((packed)); - -struct ceph_statfs { - __le64 kb, kb_used, kb_avail; - __le64 num_objects; -} __attribute__ ((packed)); - -struct ceph_mon_statfs_reply { - struct ceph_fsid fsid; - __le64 version; - struct ceph_statfs st; -} __attribute__ ((packed)); - -const char *ceph_pool_op_name(int op); - -struct ceph_mon_poolop { - struct ceph_mon_request_header monhdr; - struct ceph_fsid fsid; - __le32 pool; - __le32 op; - __le64 auid; - __le64 snapid; - __le32 name_len; -} __attribute__ ((packed)); - -struct ceph_mon_poolop_reply { - struct ceph_mon_request_header monhdr; - struct ceph_fsid fsid; - __le32 reply_code; - __le32 epoch; - char has_data; - char data[0]; -} __attribute__ ((packed)); - -struct ceph_mon_unmanaged_snap { - __le64 snapid; -} __attribute__ ((packed)); - -struct ceph_osd_getmap { - struct ceph_mon_request_header monhdr; - struct ceph_fsid fsid; - __le32 start; -} __attribute__ ((packed)); - -struct ceph_mds_getmap { - struct ceph_mon_request_header monhdr; - struct ceph_fsid fsid; -} __attribute__ ((packed)); - -struct ceph_client_mount { - struct ceph_mon_request_header monhdr; -} __attribute__ ((packed)); - -#define CEPH_SUBSCRIBE_ONETIME 1 /* i want only 1 update after have */ - -struct ceph_mon_subscribe_item { - __le64 have_version; __le64 have; - __u8 onetime; -} __attribute__ ((packed)); - -struct ceph_mon_subscribe_ack { - __le32 duration; /* seconds */ - struct ceph_fsid fsid; -} __attribute__ ((packed)); - -/* - * mds states - * > 0 -> in - * <= 0 -> out - */ -#define CEPH_MDS_STATE_DNE 0 /* down, does not exist. */ -#define CEPH_MDS_STATE_STOPPED -1 /* down, once existed, but no subtrees. - empty log. */ -#define CEPH_MDS_STATE_BOOT -4 /* up, boot announcement. */ -#define CEPH_MDS_STATE_STANDBY -5 /* up, idle. waiting for assignment. */ -#define CEPH_MDS_STATE_CREATING -6 /* up, creating MDS instance. */ -#define CEPH_MDS_STATE_STARTING -7 /* up, starting previously stopped mds */ -#define CEPH_MDS_STATE_STANDBY_REPLAY -8 /* up, tailing active node's journal */ - -#define CEPH_MDS_STATE_REPLAY 8 /* up, replaying journal. */ -#define CEPH_MDS_STATE_RESOLVE 9 /* up, disambiguating distributed - operations (import, rename, etc.) */ -#define CEPH_MDS_STATE_RECONNECT 10 /* up, reconnect to clients */ -#define CEPH_MDS_STATE_REJOIN 11 /* up, rejoining distributed cache */ -#define CEPH_MDS_STATE_CLIENTREPLAY 12 /* up, replaying client operations */ -#define CEPH_MDS_STATE_ACTIVE 13 /* up, active */ -#define CEPH_MDS_STATE_STOPPING 14 /* up, but exporting metadata */ - -extern const char *ceph_mds_state_name(int s); - - -/* - * metadata lock types. - * - these are bitmasks.. we can compose them - * - they also define the lock ordering by the MDS - * - a few of these are internal to the mds - */ -#define CEPH_LOCK_DVERSION 1 -#define CEPH_LOCK_DN 2 -#define CEPH_LOCK_ISNAP 16 -#define CEPH_LOCK_IVERSION 32 /* mds internal */ -#define CEPH_LOCK_IFILE 64 -#define CEPH_LOCK_IAUTH 128 -#define CEPH_LOCK_ILINK 256 -#define CEPH_LOCK_IDFT 512 /* dir frag tree */ -#define CEPH_LOCK_INEST 1024 /* mds internal */ -#define CEPH_LOCK_IXATTR 2048 -#define CEPH_LOCK_IFLOCK 4096 /* advisory file locks */ -#define CEPH_LOCK_INO 8192 /* immutable inode bits; not a lock */ - -/* client_session ops */ -enum { - CEPH_SESSION_REQUEST_OPEN, - CEPH_SESSION_OPEN, - CEPH_SESSION_REQUEST_CLOSE, - CEPH_SESSION_CLOSE, - CEPH_SESSION_REQUEST_RENEWCAPS, - CEPH_SESSION_RENEWCAPS, - CEPH_SESSION_STALE, - CEPH_SESSION_RECALL_STATE, -}; - -extern const char *ceph_session_op_name(int op); - -struct ceph_mds_session_head { - __le32 op; - __le64 seq; - struct ceph_timespec stamp; - __le32 max_caps, max_leases; -} __attribute__ ((packed)); - -/* client_request */ -/* - * metadata ops. - * & 0x001000 -> write op - * & 0x010000 -> follow symlink (e.g. stat(), not lstat()). - & & 0x100000 -> use weird ino/path trace - */ -#define CEPH_MDS_OP_WRITE 0x001000 -enum { - CEPH_MDS_OP_LOOKUP = 0x00100, - CEPH_MDS_OP_GETATTR = 0x00101, - CEPH_MDS_OP_LOOKUPHASH = 0x00102, - CEPH_MDS_OP_LOOKUPPARENT = 0x00103, - CEPH_MDS_OP_LOOKUPINO = 0x00104, - CEPH_MDS_OP_LOOKUPNAME = 0x00105, - - CEPH_MDS_OP_SETXATTR = 0x01105, - CEPH_MDS_OP_RMXATTR = 0x01106, - CEPH_MDS_OP_SETLAYOUT = 0x01107, - CEPH_MDS_OP_SETATTR = 0x01108, - CEPH_MDS_OP_SETFILELOCK= 0x01109, - CEPH_MDS_OP_GETFILELOCK= 0x00110, - CEPH_MDS_OP_SETDIRLAYOUT=0x0110a, - - CEPH_MDS_OP_MKNOD = 0x01201, - CEPH_MDS_OP_LINK = 0x01202, - CEPH_MDS_OP_UNLINK = 0x01203, - CEPH_MDS_OP_RENAME = 0x01204, - CEPH_MDS_OP_MKDIR = 0x01220, - CEPH_MDS_OP_RMDIR = 0x01221, - CEPH_MDS_OP_SYMLINK = 0x01222, - - CEPH_MDS_OP_CREATE = 0x01301, - CEPH_MDS_OP_OPEN = 0x00302, - CEPH_MDS_OP_READDIR = 0x00305, - - CEPH_MDS_OP_LOOKUPSNAP = 0x00400, - CEPH_MDS_OP_MKSNAP = 0x01400, - CEPH_MDS_OP_RMSNAP = 0x01401, - CEPH_MDS_OP_LSSNAP = 0x00402, -}; - -extern const char *ceph_mds_op_name(int op); - - -#define CEPH_SETATTR_MODE 1 -#define CEPH_SETATTR_UID 2 -#define CEPH_SETATTR_GID 4 -#define CEPH_SETATTR_MTIME 8 -#define CEPH_SETATTR_ATIME 16 -#define CEPH_SETATTR_SIZE 32 -#define CEPH_SETATTR_CTIME 64 - -union ceph_mds_request_args { - struct { - __le32 mask; /* CEPH_CAP_* */ - } __attribute__ ((packed)) getattr; - struct { - __le32 mode; - __le32 uid; - __le32 gid; - struct ceph_timespec mtime; - struct ceph_timespec atime; - __le64 size, old_size; /* old_size needed by truncate */ - __le32 mask; /* CEPH_SETATTR_* */ - } __attribute__ ((packed)) setattr; - struct { - __le32 frag; /* which dir fragment */ - __le32 max_entries; /* how many dentries to grab */ - __le32 max_bytes; - } __attribute__ ((packed)) readdir; - struct { - __le32 mode; - __le32 rdev; - } __attribute__ ((packed)) mknod; - struct { - __le32 mode; - } __attribute__ ((packed)) mkdir; - struct { - __le32 flags; - __le32 mode; - __le32 stripe_unit; /* layout for newly created file */ - __le32 stripe_count; /* ... */ - __le32 object_size; - __le32 file_replication; - __le32 preferred; - } __attribute__ ((packed)) open; - struct { - __le32 flags; - } __attribute__ ((packed)) setxattr; - struct { - struct ceph_file_layout layout; - } __attribute__ ((packed)) setlayout; - struct { - __u8 rule; /* currently fcntl or flock */ - __u8 type; /* shared, exclusive, remove*/ - __le64 owner; /* who requests/holds the lock */ - __le64 pid; /* process id requesting the lock */ - __le64 start; /* initial location to lock */ - __le64 length; /* num bytes to lock from start */ - __u8 wait; /* will caller wait for lock to become available? */ - } __attribute__ ((packed)) filelock_change; -} __attribute__ ((packed)); - -#define CEPH_MDS_FLAG_REPLAY 1 /* this is a replayed op */ -#define CEPH_MDS_FLAG_WANT_DENTRY 2 /* want dentry in reply */ - -struct ceph_mds_request_head { - __le64 oldest_client_tid; - __le32 mdsmap_epoch; /* on client */ - __le32 flags; /* CEPH_MDS_FLAG_* */ - __u8 num_retry, num_fwd; /* count retry, fwd attempts */ - __le16 num_releases; /* # include cap/lease release records */ - __le32 op; /* mds op code */ - __le32 caller_uid, caller_gid; - __le64 ino; /* use this ino for openc, mkdir, mknod, - etc. (if replaying) */ - union ceph_mds_request_args args; -} __attribute__ ((packed)); - -/* cap/lease release record */ -struct ceph_mds_request_release { - __le64 ino, cap_id; /* ino and unique cap id */ - __le32 caps, wanted; /* new issued, wanted */ - __le32 seq, issue_seq, mseq; - __le32 dname_seq; /* if releasing a dentry lease, a */ - __le32 dname_len; /* string follows. */ -} __attribute__ ((packed)); - -/* client reply */ -struct ceph_mds_reply_head { - __le32 op; - __le32 result; - __le32 mdsmap_epoch; - __u8 safe; /* true if committed to disk */ - __u8 is_dentry, is_target; /* true if dentry, target inode records - are included with reply */ -} __attribute__ ((packed)); - -/* one for each node split */ -struct ceph_frag_tree_split { - __le32 frag; /* this frag splits... */ - __le32 by; /* ...by this many bits */ -} __attribute__ ((packed)); - -struct ceph_frag_tree_head { - __le32 nsplits; /* num ceph_frag_tree_split records */ - struct ceph_frag_tree_split splits[]; -} __attribute__ ((packed)); - -/* capability issue, for bundling with mds reply */ -struct ceph_mds_reply_cap { - __le32 caps, wanted; /* caps issued, wanted */ - __le64 cap_id; - __le32 seq, mseq; - __le64 realm; /* snap realm */ - __u8 flags; /* CEPH_CAP_FLAG_* */ -} __attribute__ ((packed)); - -#define CEPH_CAP_FLAG_AUTH 1 /* cap is issued by auth mds */ - -/* inode record, for bundling with mds reply */ -struct ceph_mds_reply_inode { - __le64 ino; - __le64 snapid; - __le32 rdev; - __le64 version; /* inode version */ - __le64 xattr_version; /* version for xattr blob */ - struct ceph_mds_reply_cap cap; /* caps issued for this inode */ - struct ceph_file_layout layout; - struct ceph_timespec ctime, mtime, atime; - __le32 time_warp_seq; - __le64 size, max_size, truncate_size; - __le32 truncate_seq; - __le32 mode, uid, gid; - __le32 nlink; - __le64 files, subdirs, rbytes, rfiles, rsubdirs; /* dir stats */ - struct ceph_timespec rctime; - struct ceph_frag_tree_head fragtree; /* (must be at end of struct) */ -} __attribute__ ((packed)); -/* followed by frag array, symlink string, dir layout, xattr blob */ - -/* reply_lease follows dname, and reply_inode */ -struct ceph_mds_reply_lease { - __le16 mask; /* lease type(s) */ - __le32 duration_ms; /* lease duration */ - __le32 seq; -} __attribute__ ((packed)); - -struct ceph_mds_reply_dirfrag { - __le32 frag; /* fragment */ - __le32 auth; /* auth mds, if this is a delegation point */ - __le32 ndist; /* number of mds' this is replicated on */ - __le32 dist[]; -} __attribute__ ((packed)); - -#define CEPH_LOCK_FCNTL 1 -#define CEPH_LOCK_FLOCK 2 - -#define CEPH_LOCK_SHARED 1 -#define CEPH_LOCK_EXCL 2 -#define CEPH_LOCK_UNLOCK 4 - -struct ceph_filelock { - __le64 start;/* file offset to start lock at */ - __le64 length; /* num bytes to lock; 0 for all following start */ - __le64 client; /* which client holds the lock */ - __le64 owner; /* who requests/holds the lock */ - __le64 pid; /* process id holding the lock on the client */ - __u8 type; /* shared lock, exclusive lock, or unlock */ -} __attribute__ ((packed)); - - -/* file access modes */ -#define CEPH_FILE_MODE_PIN 0 -#define CEPH_FILE_MODE_RD 1 -#define CEPH_FILE_MODE_WR 2 -#define CEPH_FILE_MODE_RDWR 3 /* RD | WR */ -#define CEPH_FILE_MODE_LAZY 4 /* lazy io */ -#define CEPH_FILE_MODE_NUM 8 /* bc these are bit fields.. mostly */ - -int ceph_flags_to_mode(int flags); - - -/* capability bits */ -#define CEPH_CAP_PIN 1 /* no specific capabilities beyond the pin */ - -/* generic cap bits */ -#define CEPH_CAP_GSHARED 1 /* client can reads */ -#define CEPH_CAP_GEXCL 2 /* client can read and update */ -#define CEPH_CAP_GCACHE 4 /* (file) client can cache reads */ -#define CEPH_CAP_GRD 8 /* (file) client can read */ -#define CEPH_CAP_GWR 16 /* (file) client can write */ -#define CEPH_CAP_GBUFFER 32 /* (file) client can buffer writes */ -#define CEPH_CAP_GWREXTEND 64 /* (file) client can extend EOF */ -#define CEPH_CAP_GLAZYIO 128 /* (file) client can perform lazy io */ - -/* per-lock shift */ -#define CEPH_CAP_SAUTH 2 -#define CEPH_CAP_SLINK 4 -#define CEPH_CAP_SXATTR 6 -#define CEPH_CAP_SFILE 8 -#define CEPH_CAP_SFLOCK 20 - -#define CEPH_CAP_BITS 22 - -/* composed values */ -#define CEPH_CAP_AUTH_SHARED (CEPH_CAP_GSHARED << CEPH_CAP_SAUTH) -#define CEPH_CAP_AUTH_EXCL (CEPH_CAP_GEXCL << CEPH_CAP_SAUTH) -#define CEPH_CAP_LINK_SHARED (CEPH_CAP_GSHARED << CEPH_CAP_SLINK) -#define CEPH_CAP_LINK_EXCL (CEPH_CAP_GEXCL << CEPH_CAP_SLINK) -#define CEPH_CAP_XATTR_SHARED (CEPH_CAP_GSHARED << CEPH_CAP_SXATTR) -#define CEPH_CAP_XATTR_EXCL (CEPH_CAP_GEXCL << CEPH_CAP_SXATTR) -#define CEPH_CAP_FILE(x) (x << CEPH_CAP_SFILE) -#define CEPH_CAP_FILE_SHARED (CEPH_CAP_GSHARED << CEPH_CAP_SFILE) -#define CEPH_CAP_FILE_EXCL (CEPH_CAP_GEXCL << CEPH_CAP_SFILE) -#define CEPH_CAP_FILE_CACHE (CEPH_CAP_GCACHE << CEPH_CAP_SFILE) -#define CEPH_CAP_FILE_RD (CEPH_CAP_GRD << CEPH_CAP_SFILE) -#define CEPH_CAP_FILE_WR (CEPH_CAP_GWR << CEPH_CAP_SFILE) -#define CEPH_CAP_FILE_BUFFER (CEPH_CAP_GBUFFER << CEPH_CAP_SFILE) -#define CEPH_CAP_FILE_WREXTEND (CEPH_CAP_GWREXTEND << CEPH_CAP_SFILE) -#define CEPH_CAP_FILE_LAZYIO (CEPH_CAP_GLAZYIO << CEPH_CAP_SFILE) -#define CEPH_CAP_FLOCK_SHARED (CEPH_CAP_GSHARED << CEPH_CAP_SFLOCK) -#define CEPH_CAP_FLOCK_EXCL (CEPH_CAP_GEXCL << CEPH_CAP_SFLOCK) - - -/* cap masks (for getattr) */ -#define CEPH_STAT_CAP_INODE CEPH_CAP_PIN -#define CEPH_STAT_CAP_TYPE CEPH_CAP_PIN /* mode >> 12 */ -#define CEPH_STAT_CAP_SYMLINK CEPH_CAP_PIN -#define CEPH_STAT_CAP_UID CEPH_CAP_AUTH_SHARED -#define CEPH_STAT_CAP_GID CEPH_CAP_AUTH_SHARED -#define CEPH_STAT_CAP_MODE CEPH_CAP_AUTH_SHARED -#define CEPH_STAT_CAP_NLINK CEPH_CAP_LINK_SHARED -#define CEPH_STAT_CAP_LAYOUT CEPH_CAP_FILE_SHARED -#define CEPH_STAT_CAP_MTIME CEPH_CAP_FILE_SHARED -#define CEPH_STAT_CAP_SIZE CEPH_CAP_FILE_SHARED -#define CEPH_STAT_CAP_ATIME CEPH_CAP_FILE_SHARED /* fixme */ -#define CEPH_STAT_CAP_XATTR CEPH_CAP_XATTR_SHARED -#define CEPH_STAT_CAP_INODE_ALL (CEPH_CAP_PIN | \ - CEPH_CAP_AUTH_SHARED | \ - CEPH_CAP_LINK_SHARED | \ - CEPH_CAP_FILE_SHARED | \ - CEPH_CAP_XATTR_SHARED) - -#define CEPH_CAP_ANY_SHARED (CEPH_CAP_AUTH_SHARED | \ - CEPH_CAP_LINK_SHARED | \ - CEPH_CAP_XATTR_SHARED | \ - CEPH_CAP_FILE_SHARED) -#define CEPH_CAP_ANY_RD (CEPH_CAP_ANY_SHARED | CEPH_CAP_FILE_RD | \ - CEPH_CAP_FILE_CACHE) - -#define CEPH_CAP_ANY_EXCL (CEPH_CAP_AUTH_EXCL | \ - CEPH_CAP_LINK_EXCL | \ - CEPH_CAP_XATTR_EXCL | \ - CEPH_CAP_FILE_EXCL) -#define CEPH_CAP_ANY_FILE_WR (CEPH_CAP_FILE_WR | CEPH_CAP_FILE_BUFFER | \ - CEPH_CAP_FILE_EXCL) -#define CEPH_CAP_ANY_WR (CEPH_CAP_ANY_EXCL | CEPH_CAP_ANY_FILE_WR) -#define CEPH_CAP_ANY (CEPH_CAP_ANY_RD | CEPH_CAP_ANY_EXCL | \ - CEPH_CAP_ANY_FILE_WR | CEPH_CAP_FILE_LAZYIO | \ - CEPH_CAP_PIN) - -#define CEPH_CAP_LOCKS (CEPH_LOCK_IFILE | CEPH_LOCK_IAUTH | CEPH_LOCK_ILINK | \ - CEPH_LOCK_IXATTR) - -int ceph_caps_for_mode(int mode); - -enum { - CEPH_CAP_OP_GRANT, /* mds->client grant */ - CEPH_CAP_OP_REVOKE, /* mds->client revoke */ - CEPH_CAP_OP_TRUNC, /* mds->client trunc notify */ - CEPH_CAP_OP_EXPORT, /* mds has exported the cap */ - CEPH_CAP_OP_IMPORT, /* mds has imported the cap */ - CEPH_CAP_OP_UPDATE, /* client->mds update */ - CEPH_CAP_OP_DROP, /* client->mds drop cap bits */ - CEPH_CAP_OP_FLUSH, /* client->mds cap writeback */ - CEPH_CAP_OP_FLUSH_ACK, /* mds->client flushed */ - CEPH_CAP_OP_FLUSHSNAP, /* client->mds flush snapped metadata */ - CEPH_CAP_OP_FLUSHSNAP_ACK, /* mds->client flushed snapped metadata */ - CEPH_CAP_OP_RELEASE, /* client->mds release (clean) cap */ - CEPH_CAP_OP_RENEW, /* client->mds renewal request */ -}; - -extern const char *ceph_cap_op_name(int op); - -/* - * caps message, used for capability callbacks, acks, requests, etc. - */ -struct ceph_mds_caps { - __le32 op; /* CEPH_CAP_OP_* */ - __le64 ino, realm; - __le64 cap_id; - __le32 seq, issue_seq; - __le32 caps, wanted, dirty; /* latest issued/wanted/dirty */ - __le32 migrate_seq; - __le64 snap_follows; - __le32 snap_trace_len; - - /* authlock */ - __le32 uid, gid, mode; - - /* linklock */ - __le32 nlink; - - /* xattrlock */ - __le32 xattr_len; - __le64 xattr_version; - - /* filelock */ - __le64 size, max_size, truncate_size; - __le32 truncate_seq; - struct ceph_timespec mtime, atime, ctime; - struct ceph_file_layout layout; - __le32 time_warp_seq; -} __attribute__ ((packed)); - -/* cap release msg head */ -struct ceph_mds_cap_release { - __le32 num; /* number of cap_items that follow */ -} __attribute__ ((packed)); - -struct ceph_mds_cap_item { - __le64 ino; - __le64 cap_id; - __le32 migrate_seq, seq; -} __attribute__ ((packed)); - -#define CEPH_MDS_LEASE_REVOKE 1 /* mds -> client */ -#define CEPH_MDS_LEASE_RELEASE 2 /* client -> mds */ -#define CEPH_MDS_LEASE_RENEW 3 /* client <-> mds */ -#define CEPH_MDS_LEASE_REVOKE_ACK 4 /* client -> mds */ - -extern const char *ceph_lease_op_name(int o); - -/* lease msg header */ -struct ceph_mds_lease { - __u8 action; /* CEPH_MDS_LEASE_* */ - __le16 mask; /* which lease */ - __le64 ino; - __le64 first, last; /* snap range */ - __le32 seq; - __le32 duration_ms; /* duration of renewal */ -} __attribute__ ((packed)); -/* followed by a __le32+string for dname */ - -/* client reconnect */ -struct ceph_mds_cap_reconnect { - __le64 cap_id; - __le32 wanted; - __le32 issued; - __le64 snaprealm; - __le64 pathbase; /* base ino for our path to this ino */ - __le32 flock_len; /* size of flock state blob, if any */ -} __attribute__ ((packed)); -/* followed by flock blob */ - -struct ceph_mds_cap_reconnect_v1 { - __le64 cap_id; - __le32 wanted; - __le32 issued; - __le64 size; - struct ceph_timespec mtime, atime; - __le64 snaprealm; - __le64 pathbase; /* base ino for our path to this ino */ -} __attribute__ ((packed)); - -struct ceph_mds_snaprealm_reconnect { - __le64 ino; /* snap realm base */ - __le64 seq; /* snap seq for this snap realm */ - __le64 parent; /* parent realm */ -} __attribute__ ((packed)); - -/* - * snaps - */ -enum { - CEPH_SNAP_OP_UPDATE, /* CREATE or DESTROY */ - CEPH_SNAP_OP_CREATE, - CEPH_SNAP_OP_DESTROY, - CEPH_SNAP_OP_SPLIT, -}; - -extern const char *ceph_snap_op_name(int o); - -/* snap msg header */ -struct ceph_mds_snap_head { - __le32 op; /* CEPH_SNAP_OP_* */ - __le64 split; /* ino to split off, if any */ - __le32 num_split_inos; /* # inos belonging to new child realm */ - __le32 num_split_realms; /* # child realms udner new child realm */ - __le32 trace_len; /* size of snap trace blob */ -} __attribute__ ((packed)); -/* followed by split ino list, then split realms, then the trace blob */ - -/* - * encode info about a snaprealm, as viewed by a client - */ -struct ceph_mds_snap_realm { - __le64 ino; /* ino */ - __le64 created; /* snap: when created */ - __le64 parent; /* ino: parent realm */ - __le64 parent_since; /* snap: same parent since */ - __le64 seq; /* snap: version */ - __le32 num_snaps; - __le32 num_prior_parent_snaps; -} __attribute__ ((packed)); -/* followed by my snap list, then prior parent snap list */ - -#endif diff --git a/wireshark/ceph/crc32c.h b/wireshark/ceph/crc32c.h deleted file mode 100644 index e3cf8ff27046..000000000000 --- a/wireshark/ceph/crc32c.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef CEPH_CRC32C_H -#define CEPH_CRC32C_H - -#ifdef __cplusplus -extern "C" { -#endif - -uint32_t ceph_crc32c_le(uint32_t crc, unsigned char const *data, unsigned length); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/wireshark/ceph/moduleinfo.h b/wireshark/ceph/moduleinfo.h deleted file mode 100644 index 1218fcf6feca..000000000000 --- a/wireshark/ceph/moduleinfo.h +++ /dev/null @@ -1,16 +0,0 @@ -/* Included *after* config.h, in order to re-define these macros */ - -#ifdef PACKAGE -#undef PACKAGE -#endif - -/* Name of package */ -#define PACKAGE "ceph" - - -#ifdef VERSION -#undef VERSION -#endif - -/* Version number of package */ -#define VERSION "0.0.1" diff --git a/wireshark/ceph/moduleinfo.nmake b/wireshark/ceph/moduleinfo.nmake deleted file mode 100644 index ff67c25b40bc..000000000000 --- a/wireshark/ceph/moduleinfo.nmake +++ /dev/null @@ -1,28 +0,0 @@ -# -# $Id: moduleinfo.nmake 20158 2006-12-19 22:23:37Z jake $ -# - -# The name -PACKAGE=ceph - -# The version -MODULE_VERSION_MAJOR=0 -MODULE_VERSION_MINOR=0 -MODULE_VERSION_MICRO=1 -MODULE_VERSION_EXTRA=0 - -# -# The RC_VERSION should be comma-separated, not dot-separated, -# as per Graham Bloice's message in -# -# http://www.ethereal.com/lists/ethereal-dev/200303/msg00283.html -# -# "The RC_VERSION variable in config.nmake should be comma separated. -# This allows the resources to be built correctly and the version -# number to be correctly displayed in the explorer properties dialog -# for the executables, and XP's tooltip, rather than 0.0.0.0." -# - -MODULE_VERSION=$(MODULE_VERSION_MAJOR).$(MODULE_VERSION_MINOR).$(MODULE_VERSION_MICRO).$(MODULE_VERSION_EXTRA) -RC_MODULE_VERSION=$(MODULE_VERSION_MAJOR),$(MODULE_VERSION_MINOR),$(MODULE_VERSION_MICRO),$(MODULE_VERSION_EXTRA) - diff --git a/wireshark/ceph/msgr.h b/wireshark/ceph/msgr.h deleted file mode 100644 index 2604e1a0cae0..000000000000 --- a/wireshark/ceph/msgr.h +++ /dev/null @@ -1,182 +0,0 @@ -#ifndef CEPH_MSGR_H -#define CEPH_MSGR_H - -#ifdef __cplusplus -#include // for struct sockaddr_storage -#endif - -/* - * Data types for message passing layer used by Ceph. - */ - -#define CEPH_MON_PORT 6789 /* default monitor port */ - -/* - * client-side processes will try to bind to ports in this - * range, simply for the benefit of tools like nmap or wireshark - * that would like to identify the protocol. - */ -#define CEPH_PORT_FIRST 6789 -#define CEPH_PORT_START 6800 /* non-monitors start here */ -#define CEPH_PORT_LAST 6900 - -/* - * tcp connection banner. include a protocol version. and adjust - * whenever the wire protocol changes. try to keep this string length - * constant. - */ -#define CEPH_BANNER "ceph v027" -#define CEPH_BANNER_MAX_LEN 30 - - -/* - * Rollover-safe type and comparator for 32-bit sequence numbers. - * Comparator returns -1, 0, or 1. - */ -typedef __u32 ceph_seq_t; - -static inline __s32 ceph_seq_cmp(__u32 a, __u32 b) -{ - return (__s32)a - (__s32)b; -} - - -/* - * entity_name -- logical name for a process participating in the - * network, e.g. 'mds0' or 'osd3'. - */ -struct ceph_entity_name { - __u8 type; /* CEPH_ENTITY_TYPE_* */ - __le64 num; -} __attribute__ ((packed)); - -#define CEPH_ENTITY_TYPE_MON 0x01 -#define CEPH_ENTITY_TYPE_MDS 0x02 -#define CEPH_ENTITY_TYPE_OSD 0x04 -#define CEPH_ENTITY_TYPE_CLIENT 0x08 -#define CEPH_ENTITY_TYPE_AUTH 0x20 - -#define CEPH_ENTITY_TYPE_ANY 0xFF - -extern const char *ceph_entity_type_name(int type); - -/* - * entity_addr -- network address - */ -struct ceph_entity_addr { - __le32 type; - __le32 nonce; /* unique id for process (e.g. pid) */ - struct sockaddr_storage in_addr; -} __attribute__ ((packed)); - -struct ceph_entity_inst { - struct ceph_entity_name name; - struct ceph_entity_addr addr; -} __attribute__ ((packed)); - - -/* used by message exchange protocol */ -#define CEPH_MSGR_TAG_READY 1 /* server->client: ready for messages */ -#define CEPH_MSGR_TAG_RESETSESSION 2 /* server->client: reset, try again */ -#define CEPH_MSGR_TAG_WAIT 3 /* server->client: wait for racing - incoming connection */ -#define CEPH_MSGR_TAG_RETRY_SESSION 4 /* server->client + cseq: try again - with higher cseq */ -#define CEPH_MSGR_TAG_RETRY_GLOBAL 5 /* server->client + gseq: try again - with higher gseq */ -#define CEPH_MSGR_TAG_CLOSE 6 /* closing pipe */ -#define CEPH_MSGR_TAG_MSG 7 /* message */ -#define CEPH_MSGR_TAG_ACK 8 /* message ack */ -#define CEPH_MSGR_TAG_KEEPALIVE 9 /* just a keepalive byte! */ -#define CEPH_MSGR_TAG_BADPROTOVER 10 /* bad protocol version */ -#define CEPH_MSGR_TAG_BADAUTHORIZER 11 /* bad authorizer */ -#define CEPH_MSGR_TAG_FEATURES 12 /* insufficient features */ -#define CEPH_MSGR_TAG_SEQ 13 /* 64-bit int follows with seen seq number */ - - -/* - * connection negotiation - */ -struct ceph_msg_connect { - __le64 features; /* supported feature bits */ - __le32 host_type; /* CEPH_ENTITY_TYPE_* */ - __le32 global_seq; /* count connections initiated by this host */ - __le32 connect_seq; /* count connections initiated in this session */ - __le32 protocol_version; - __le32 authorizer_protocol; - __le32 authorizer_len; - __u8 flags; /* CEPH_MSG_CONNECT_* */ -} __attribute__ ((packed)); - -struct ceph_msg_connect_reply { - __u8 tag; - __le64 features; /* feature bits for this session */ - __le32 global_seq; - __le32 connect_seq; - __le32 protocol_version; - __le32 authorizer_len; - __u8 flags; -} __attribute__ ((packed)); - -#define CEPH_MSG_CONNECT_LOSSY 1 /* messages i send may be safely dropped */ - - -/* - * message header - */ -struct ceph_msg_header_old { - __le64 seq; /* message seq# for this session */ - __le64 tid; /* transaction id */ - __le16 type; /* message type */ - __le16 priority; /* priority. higher value == higher priority */ - __le16 version; /* version of message encoding */ - - __le32 front_len; /* bytes in main payload */ - __le32 middle_len;/* bytes in middle payload */ - __le32 data_len; /* bytes of data payload */ - __le16 data_off; /* sender: include full offset; - receiver: mask against ~PAGE_MASK */ - - struct ceph_entity_inst src, orig_src; - __le32 reserved; - __le32 crc; /* header crc32c */ -} __attribute__ ((packed)); - - -struct ceph_msg_header { - __le64 seq; /* message seq# for this session */ - __le64 tid; /* transaction id */ - __le16 type; /* message type */ - __le16 priority; /* priority. higher value == higher priority */ - __le16 version; /* version of message encoding */ - - __le32 front_len; /* bytes in main payload */ - __le32 middle_len;/* bytes in middle payload */ - __le32 data_len; /* bytes of data payload */ - __le16 data_off; /* sender: include full offset; - receiver: mask against ~PAGE_MASK */ - - struct ceph_entity_name src; - __le32 reserved; - __le32 crc; /* header crc32c */ -} __attribute__ ((packed)); - - -#define CEPH_MSG_PRIO_LOW 64 -#define CEPH_MSG_PRIO_DEFAULT 127 -#define CEPH_MSG_PRIO_HIGH 196 -#define CEPH_MSG_PRIO_HIGHEST 255 - -/* - * follows data payload - */ -struct ceph_msg_footer { - __le32 front_crc, middle_crc, data_crc; - __u8 flags; -} __attribute__ ((packed)); - -#define CEPH_MSG_FOOTER_COMPLETE (1<<0) /* msg wasn't aborted */ -#define CEPH_MSG_FOOTER_NOCRC (1<<1) /* no data crc */ - - -#endif diff --git a/wireshark/ceph/packet-ceph.c b/wireshark/ceph/packet-ceph.c deleted file mode 100644 index 408f015d7c6f..000000000000 --- a/wireshark/ceph/packet-ceph.c +++ /dev/null @@ -1,1442 +0,0 @@ -/* packet-ceph.c -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - - -#include -#include -#include -#include -#include - -#include - -#include "types.h" -#include "crc32c.h" -#include - -#define PROTO_TAG_CEPH "CEPH" -#define AUTH_LEN 174 - -/* Wireshark ID of the CEPH protocol */ -static int proto_ceph = -1; - - - -/* These are the handles of our subdissectors */ -static dissector_handle_t data_handle=NULL; - -static dissector_handle_t ceph_handle; -static void dissect_ceph(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); - -static guint32 global_ceph_min_port = 6789; -static guint32 global_ceph_max_port = 6810; - -static guint32 global_ceph_min_mon_port = 6789; -static guint32 global_ceph_max_mon_port = 6799; - -#define DEST_PORT_CEPH ((pinfo->destport >= global_ceph_min_port) && (pinfo->destport <= global_ceph_max_port)) - -#define PORT_IS_MON(port) ((port >= global_ceph_min_mon_port) && (port <= global_ceph_max_mon_port)) -#define PORT_IS_MDS(port) ((port >= global_ceph_min_mds_port) && (port <= global_ceph_max_mds_port)) -#define PORT_IS_OSD(port) ((port >= global_ceph_min_osd_port) && (port <= global_ceph_max_osd_port)) - -#define IS_ENTITY(cmp, port1, port2) (cmp(port1) || cmp(port2)) - -#define IS_MON(pinfo) IS_ENTITY(PORT_IS_MON, pinfo->srcport, pinfo->destport) -#define IS_MDS(pinfo) IS_ENTITY(PORT_IS_MDS, pinfo->srcport, pinfo->destport) -#define IS_OSD(pinfo) IS_ENTITY(PORT_IS_OSD, pinfo->srcport, pinfo->destport) - -#define MON_STR "mon" -#define MDS_STR "mds" -#define OSD_STR "osd" - -#define FMT_INO "0x%.16llx" - -#define PROTO_ADD_TEXT(type, s, field, modifier)\ - proto_tree_add_text(tree, tvb, offset + offsetof(type, field), sizeof(s->field), "" #field ": " modifier, s->field); - -#define PROTO_ADD_SIMPLE_TEXT(tree,getter,format,var)\ - do { \ - var = getter(tvb,offset); \ - proto_tree_add_text(tree, tvb, offset, sizeof(var), format, var);\ - offset += sizeof(var); \ - } while(0) - - -#define PROTO_ADD_ITEM(tree, type, hf, s, field) \ - proto_tree_add_item(tree, hf, tvb, offset + offsetof(type, field), sizeof(s->field), TRUE); - -#define CTIME_BUF_LEN 128 - -#define PROTO_ADD_TIME(tvb, tree, type, offset, head, field, name) \ - do { \ - time_t time; \ - time = head->field.tv_sec; \ - proto_tree_add_text(tree, tvb, offset + offsetof(type, field), \ - sizeof(head->field), "" #name ": %s (%d ns)", ctime(&time), head->field.tv_nsec); \ - } while (0) - -static const value_string packettypenames[] = { - { 1, "Shutdown" }, - { 2, "Ping" }, - { 4, "Mon Map" }, - { 5, "Mon Get Map" }, - { 10, "Client Mount" }, - { 11, "Client Mount Ack" }, - { 12, "Client Unmount" }, - { 13, "Statfs" }, - { 14, "Statfs Reply" }, - { 15, "Mon Subscribe" }, - { 16, "Mon Subscribe Ack" }, - { 17, "Authentication" }, - { 18, "Authentication reply" }, - { 20, "MDS Get Map" }, - { 21, "MDS Map" }, - { 22, "Client Session" }, - { 23, "Client Reconnect" }, - { 24, "Client Request" }, - { 25, "Client Request Forward" }, - { 26, "Client Reply" }, - { 0x310, "Client Caps" }, - { 0x311, "Client Lease" }, - { 0x312, "Client Snap" }, - { 0x313, "Client Cap Release" }, - { 40, "OSD Get Map" }, - { 41, "OSD Map" }, - { 42, "OSD Op" }, - { 43, "OSD Op Reply" }, - { 44, "Watch Notify" }, - { 48, "Poolop Reply" }, - { 49, "Poolop" }, - { 0, NULL } -}; - -#define ACK_MSG_SIZE 9 -#define TVB_MSG_HEADER_POS(x) (1 + offsetof(struct ceph_msg_header, x)) -#define TVB_IS_ACK(ofs) (tvb_get_guint8(tvb, ofs) == CEPH_MSGR_TAG_ACK) -#define TVB_MSG_FIELD(func, tvb, ofs, field) func(tvb, ofs + (TVB_IS_ACK(ofs) ? ACK_MSG_SIZE : 0) + TVB_MSG_HEADER_POS(field)) - -/* The following hf_* variables are used to hold the Wireshark IDs of -* our header fields; they are filled out when we call -* proto_register_field_array() in proto_register_ceph() -*/ -/** Kts attempt at defining the protocol */ -static gint hf_ceph = -1; -static gint hf_ceph_mds_op = -1; -static gint hf_ceph_header = -1; -static gint hf_ceph_banner = -1; -static gint hf_ceph_entity_addr = -1; -static gint hf_ceph_entity_type = -1; -static gint hf_ceph_entity_num = -1; -static gint hf_ceph_fsid = -1; -static gint hf_ceph_banner_magic = -1; -static gint hf_ceph_banner_version = -1; -static gint hf_ceph_connect_erank = -1; -static gint hf_ceph_connect_nonce = -1; -static gint hf_ceph_sockaddr_in = -1; -static gint hf_ceph_connect_host_type = -1; -static gint hf_ceph_connect_tag = -1; -static gint hf_ceph_connect_global_seq = -1; -static gint hf_ceph_connect_connect_seq = -1; -static gint hf_ceph_connect_flags = -1; -static gint hf_ceph_length = -1; -static gint hf_ceph_type = -1; -static gint hf_ceph_text = -1; -static gint hf_ceph_path = -1; -static gint hf_sin_family = -1; -static gint hf_sin_port = -1; -static gint hf_sin_addr = -1; -static gint hf_ceph_hdr_tag = -1; -static gint hf_ceph_hdr_seq_ack = -1; -static gint hf_ceph_hdr_seq = -1; -static gint hf_ceph_hdr_type = -1; -static gint hf_ceph_hdr_priority = -1; -static gint hf_ceph_hdr_version = -1; -static gint hf_ceph_hdr_mon_protocol = -1; -static gint hf_ceph_hdr_osd_protocol = -1; -static gint hf_ceph_hdr_mds_protocol = -1; -static gint hf_ceph_hdr_client_protocol = -1; -static gint hf_ceph_hdr_front_len = -1; -static gint hf_ceph_hdr_middle_len = -1; -static gint hf_ceph_hdr_data_off = -1; -static gint hf_ceph_hdr_data_len = -1; -static gint hf_ceph_data = -1; -static gint hf_ceph_front = -1; -static gint hf_ceph_hdr_src = -1; -static gint hf_ceph_hdr_orig_src = -1; -static gint hf_ceph_hdr_dst = -1; -static gint hf_ceph_hdr_crc = -1; -static gint hf_ceph_footer = -1; -static gint hf_ceph_footer_flags = -1; -static gint hf_ceph_footer_front_crc = -1; -static gint hf_ceph_footer_middle_crc = -1; -static gint hf_ceph_footer_data_crc = -1; -static gint hf_ceph_monmap = -1; -static gint hf_ceph_mdsmap = -1; -static gint hf_ceph_mdsnode = -1; -static gint hf_ceph_auth_reply = -1; -static gint hf_ceph_pgpools = -1; - -/* These are the ids of the subtrees that we may be creating */ -static gint ett_ceph = -1; -static gint ett_ceph_header = -1; -static gint ett_ceph_banner = -1; -static gint ett_ceph_entity_addr = -1; -static gint ett_ceph_length = -1; -static gint ett_ceph_type = -1; -static gint ett_ceph_text = -1; -static gint ett_ceph_front = -1; -static gint ett_ceph_data = -1; -static gint ett_ceph_footer = -1; - - -const char *ceph_cap_op_name(int op) -{ - char* plop; - - switch (op) { - case CEPH_CAP_OP_GRANT: return "grant"; - case CEPH_CAP_OP_REVOKE: return "revoke"; - case CEPH_CAP_OP_TRUNC: return "trunc"; - case CEPH_CAP_OP_EXPORT: return "export"; - case CEPH_CAP_OP_IMPORT: return "import"; - case CEPH_CAP_OP_UPDATE: return "update"; - case CEPH_CAP_OP_DROP: return "drop"; - case CEPH_CAP_OP_FLUSH: return "flush"; - case CEPH_CAP_OP_FLUSH_ACK: return "flush_ack"; - case CEPH_CAP_OP_FLUSHSNAP: return "flushsnap"; - case CEPH_CAP_OP_FLUSHSNAP_ACK: return "flushsnap_ack"; - case CEPH_CAP_OP_RELEASE: return "release"; - case CEPH_CAP_OP_RENEW: return "renew"; - } - - plop = malloc(16*sizeof(char)); - sprintf(plop,"%i",op); - - return plop; -} - -const char *ceph_mds_op_name(int op) -{ - char* plop; - - switch (op) { - case CEPH_MDS_OP_LOOKUP: return "lookup"; - case CEPH_MDS_OP_LOOKUPHASH: return "lookuphash"; - case CEPH_MDS_OP_LOOKUPPARENT: return "lookupparent"; - case CEPH_MDS_OP_LOOKUPINO: return "lookupino"; - case CEPH_MDS_OP_LOOKUPNAME: return "lookupname"; - case CEPH_MDS_OP_GETATTR: return "getattr"; - case CEPH_MDS_OP_SETXATTR: return "setxattr"; - case CEPH_MDS_OP_SETATTR: return "setattr"; - case CEPH_MDS_OP_RMXATTR: return "rmxattr"; - case CEPH_MDS_OP_SETLAYOUT: return "setlayou"; - case CEPH_MDS_OP_SETDIRLAYOUT: return "setdirlayout"; - case CEPH_MDS_OP_READDIR: return "readdir"; - case CEPH_MDS_OP_MKNOD: return "mknod"; - case CEPH_MDS_OP_LINK: return "link"; - case CEPH_MDS_OP_UNLINK: return "unlink"; - case CEPH_MDS_OP_RENAME: return "rename"; - case CEPH_MDS_OP_MKDIR: return "mkdir"; - case CEPH_MDS_OP_RMDIR: return "rmdir"; - case CEPH_MDS_OP_SYMLINK: return "symlink"; - case CEPH_MDS_OP_CREATE: return "create"; - case CEPH_MDS_OP_OPEN: return "open"; - case CEPH_MDS_OP_LOOKUPSNAP: return "lookupsnap"; - case CEPH_MDS_OP_LSSNAP: return "lssnap"; - case CEPH_MDS_OP_MKSNAP: return "mksnap"; - case CEPH_MDS_OP_RMSNAP: return "rmsnap"; - case CEPH_MDS_OP_SETFILELOCK: return "setfilelock"; - case CEPH_MDS_OP_GETFILELOCK: return "getfilelock"; - } - - plop = malloc(16*sizeof(char)); - printf(plop,"%i",op); - - return plop; -} - - - -void proto_reg_handoff_ceph(void) -{ - static gboolean initialized=FALSE; - static guint32 port; - - if (!initialized) { - data_handle = find_dissector("data"); - ceph_handle = create_dissector_handle(dissect_ceph, proto_ceph); - for (port = global_ceph_min_port; port <= global_ceph_max_port; port++) - dissector_add("tcp.port", port, ceph_handle); - } - -} - -void proto_register_ceph (void) -{ - /* A header field is something you can search/filter on. - * - * We create a structure to register our fields. It consists of an - * array of hf_register_info structures, each of which are of the format - * {&(field id), {name, abbrev, type, display, strings, bitmask, blurb, HFILL}}. - */ - static hf_register_info hf[] = { - { &hf_ceph, - { "Data", "ceph.data", FT_NONE , BASE_NONE, NULL, 0, - "CEPH PDU", HFILL }}, - { &hf_ceph_pgpools, - { "pgpools", "ceph.pgpools", FT_NONE , BASE_NONE, NULL, 0, - "CEPH PG Pools", HFILL }}, - { &hf_ceph_monmap, - { "MON map", "ceph.monmap", FT_NONE , BASE_NONE, NULL, 0, - "CEPH MON map", HFILL }}, - { &hf_ceph_mdsmap, - { "MDS map", "ceph.mdsmap", FT_NONE , BASE_NONE, NULL, 0, - "CEPH MDS map", HFILL }}, - { &hf_ceph_mdsnode, - { "MDS node", "ceph.mdsnode", FT_NONE , BASE_NONE, NULL, 0, - "CEPH MDS node", HFILL }}, - { &hf_ceph_auth_reply, - { "Authentication reply", "ceph.auth.reply", FT_NONE , BASE_NONE, NULL, 0, - "CEPH Authentication reply", HFILL }}, - { &hf_ceph_header, - { "Header", "ceph.header", FT_NONE, BASE_NONE, NULL, 0x0, - "CEPH Header", HFILL }}, - { &hf_ceph_banner, - { "Ceph Banner", "ceph.connect.banner", FT_STRING, BASE_NONE, NULL, 0x0, - "Ceph Banner", HFILL }}, - { &hf_ceph_entity_type, - { "Ceph Entity Type", "ceph.entity.type", FT_UINT32, BASE_DEC, NULL, 0x0, - "Ceph Entity Type", HFILL }}, - { &hf_ceph_entity_num, - { "Ceph Entity Num", "ceph.entity.num", FT_UINT64, BASE_DEC, NULL, 0x0, - "Ceph Entity Num", HFILL }}, - { &hf_ceph_entity_addr, - { "Ceph Entity Addr", "ceph.entity.addr", FT_NONE, BASE_NONE, NULL, 0x0, - "Ceph Entity Addr", HFILL }}, - { &hf_ceph_fsid, - { "Ceph FSID", "ceph.fsid", FT_NONE, BASE_NONE, NULL, 0x0, - "Ceph FSID", HFILL }}, - { &hf_ceph_banner_magic, - { "Ceph Banner Magic", "ceph.connect.banner.magic", FT_STRING, BASE_NONE, NULL, 0x0, - "Ceph Banner Magic", HFILL }}, - { &hf_ceph_banner_version, - { "Ceph Banner Version", "ceph.connect.banner.ver", FT_STRING, BASE_NONE, NULL, 0x0, - "Ceph Banner", HFILL }}, - { &hf_ceph_connect_erank, - { "erank", "ceph.connect.erank", FT_UINT32, BASE_HEX, NULL, 0x0, - "connect: erank", HFILL }}, - { &hf_ceph_connect_nonce, - { "nonce", "ceph.connect.nonce", FT_UINT32, BASE_HEX, NULL, 0x0, - "connect: nonce", HFILL }}, - { &hf_ceph_sockaddr_in, - { "sockaddr_in", "ceph.sockaddr_in", FT_NONE, BASE_NONE, NULL, 0x0, - "sockaddr_in", HFILL }}, - { &hf_sin_family, - { "sin_family", "ceph.sin_family", FT_UINT16, BASE_HEX, NULL, 0x0, - "sockaddr_in: sin_family", HFILL }}, - { &hf_sin_port, - { "sin_port", "ceph.sin_port", FT_UINT16, BASE_DEC, NULL, 0x0, - "sockaddr_in: sin_port", HFILL }}, - { &hf_sin_addr, - { "ip addr", "ceph.addr", FT_IPv4, BASE_NONE, NULL, 0x0, - "sockaddr_in: ip addr", HFILL }}, - { &hf_ceph_connect_host_type, - { "host_type", "ceph.connect.host_type", FT_UINT32, BASE_DEC, NULL, 0x0, - "connect: host_type", HFILL }}, - { &hf_ceph_connect_tag, - { "tag", "ceph.connect.tag", FT_UINT8, BASE_DEC, NULL, 0x0, - "connect: tag", HFILL }}, - { &hf_ceph_mds_op, - { "mds op", "ceph.mds.op", FT_UINT32, BASE_HEX, NULL, 0x0, - "ceph: mds op", HFILL }}, - { &hf_ceph_connect_global_seq, - { "global_seq", "ceph.connect.global_seq", FT_UINT32, BASE_DEC, NULL, 0x0, - "connect: global_seq", HFILL }}, - { &hf_ceph_connect_connect_seq, - { "connect_seq", "ceph.connect.connect_seq", FT_UINT32, BASE_DEC, NULL, 0x0, - "connect: connect_seq", HFILL }}, - { &hf_ceph_connect_flags, - { "flags", "ceph.connect.flags", FT_UINT8, BASE_HEX, NULL, 0x0, - "connect: flags", HFILL }}, - { &hf_ceph_length, - { "Package Length", "ceph.len", FT_UINT32, BASE_DEC, NULL, 0x0, - "Package Length", HFILL }}, - { &hf_ceph_type, - { "Type", "ceph.type", FT_UINT8, BASE_DEC, VALS(packettypenames), 0x0, - "Package Type", HFILL }}, - { &hf_ceph_text, - { "Text", "ceph.text", FT_STRING, BASE_NONE, NULL, 0x0, - "Text", HFILL }}, - { &hf_ceph_path, - { "path", "ceph.path", FT_STRING, BASE_NONE, NULL, 0x0, - "path", HFILL }}, - { &hf_ceph_hdr_tag, - { "tag", "ceph.tag", FT_UINT8, BASE_DEC, NULL, 0x0, - "hdr: tag", HFILL }}, - { &hf_ceph_hdr_seq_ack, - { "ack seq", "ceph.ack.seq", FT_UINT64, BASE_DEC, NULL, 0x0, - "ack: seq", HFILL }}, - { &hf_ceph_hdr_seq, - { "seq", "ceph.seq", FT_UINT64, BASE_DEC, NULL, 0x0, - "hdr: seq", HFILL }}, - { &hf_ceph_hdr_type, - { "type", "ceph.type", FT_UINT16, BASE_HEX, NULL, 0x0, - "hdr: type", HFILL }}, - { &hf_ceph_hdr_priority, - { "priority", "ceph.priority", FT_UINT16, BASE_DEC, NULL, 0x0, - "hdr: priority", HFILL }}, - { &hf_ceph_hdr_version, - { "version", "ceph.version", FT_UINT16, BASE_DEC, NULL, 0x0, - "hdr: version", HFILL }}, - { &hf_ceph_hdr_mon_protocol, - { "mon_protocol", "ceph.mon_protocol", FT_UINT16, BASE_DEC, NULL, 0x0, - "hdr: mon_protocol", HFILL }}, - { &hf_ceph_hdr_osd_protocol, - { "osd_protocol", "ceph.osd_protocol", FT_UINT16, BASE_DEC, NULL, 0x0, - "hdr: osd_protocol", HFILL }}, - { &hf_ceph_hdr_mds_protocol, - { "mds_protocol", "ceph.mds_protocol", FT_UINT16, BASE_DEC, NULL, 0x0, - "hdr: mds_protocol", HFILL }}, - { &hf_ceph_hdr_client_protocol, - { "client_protocol", "ceph.client_protocol", FT_UINT16, BASE_DEC, NULL, 0x0, - "hdr: client_protocol", HFILL }}, - { &hf_ceph_hdr_front_len, - { "front_len", "ceph.front_len", FT_UINT32, BASE_DEC, NULL, 0x0, - "hdr: front_len", HFILL }}, - { &hf_ceph_hdr_middle_len, - { "middle_len", "ceph.middle_len", FT_UINT32, BASE_DEC, NULL, 0x0, - "hdr: middle_len", HFILL }}, - { &hf_ceph_hdr_data_off, - { "data_off", "ceph.data_off", FT_UINT32, BASE_DEC, NULL, 0x0, - "hdr: data_off", HFILL }}, - { &hf_ceph_hdr_data_len, - { "data_len", "ceph.data_len", FT_UINT32, BASE_DEC, NULL, 0x0, - "hdr: data_len", HFILL }}, - { &hf_ceph_hdr_src, - { "src", "ceph.src", FT_NONE, BASE_NONE, NULL, 0x0, - "hdr: src", HFILL }}, - { &hf_ceph_hdr_orig_src, - { "orig_src", "ceph.orig_src", FT_NONE, BASE_NONE, NULL, 0x0, - "hdr: orig_src", HFILL }}, - { &hf_ceph_hdr_dst, - { "dst", "ceph.dst", FT_NONE, BASE_NONE, NULL, 0x0, - "hdr: dst", HFILL }}, - { &hf_ceph_hdr_crc, - { "crc", "ceph.crc", FT_UINT32, BASE_HEX, NULL, 0x0, - "hdr: crc", HFILL }}, - { &hf_ceph_front, - { "Front", "ceph.front", FT_NONE, BASE_NONE, NULL, 0x0, - "Ceph Front", HFILL }}, - { &hf_ceph_data, - { "Data", "ceph.data", FT_NONE, BASE_NONE, NULL, 0x0, - "Ceph Data", HFILL }}, - { &hf_ceph_footer, - { "Footer", "ceph.footer", FT_NONE, BASE_NONE, NULL, 0x0, - "Ceph Footer", HFILL }}, - { &hf_ceph_footer_flags, - { "flags", "ceph.footer.flags", FT_UINT32, BASE_HEX, NULL, 0x0, - "footer: flags", HFILL }}, - { &hf_ceph_footer_front_crc, - { "front_crc", "ceph.footer.front_crc", FT_UINT32, BASE_HEX, NULL, 0x0, - "footer: front_crc", HFILL }}, - { &hf_ceph_footer_middle_crc, - { "middle_crc", "ceph.footer.middle_crc", FT_UINT32, BASE_HEX, NULL, 0x0, - "footer: middle_crc", HFILL }}, - { &hf_ceph_footer_data_crc, - { "data_crc", "ceph.footer.data_crc", FT_UINT32, BASE_HEX, NULL, 0x0, - "footer: data_crc", HFILL }}, - }; - static gint *ett[] = { - &ett_ceph, - &ett_ceph_header, - &ett_ceph_banner, - &ett_ceph_length, - &ett_ceph_entity_addr, - &ett_ceph_type, - &ett_ceph_text, - &ett_ceph_data, - &ett_ceph_front, - &ett_ceph_footer, - }; - //if (proto_ceph == -1) { /* execute protocol initialization only once */ - proto_ceph = proto_register_protocol ("CEPH Protocol", "CEPH", "ceph"); - - proto_register_field_array (proto_ceph, hf, array_length (hf)); - proto_register_subtree_array (ett, array_length (ett)); - register_dissector("ceph", dissect_ceph, proto_ceph); - //} -} - -static guint32 dissect_sockaddr_in(tvbuff_t *tvb, proto_tree *tree, guint32 offset) -{ - proto_tree *ceph_sockaddr_tree; - proto_item *ceph_sub_item = NULL; - proto_item *ceph_item = proto_tree_get_parent(tree); - - ceph_sockaddr_tree = proto_item_add_subtree(ceph_item, ett_ceph); - - ceph_sub_item = proto_tree_add_item( tree, hf_ceph_sockaddr_in, tvb, offset, 16, TRUE ); - ceph_sockaddr_tree = proto_item_add_subtree(ceph_sub_item, ett_ceph); - - proto_tree_add_item(ceph_sockaddr_tree, hf_sin_family, tvb, offset, 2, TRUE); - proto_tree_add_item(ceph_sockaddr_tree, hf_sin_port, tvb, offset+2, 2, TRUE); - proto_tree_add_item(ceph_sockaddr_tree, hf_sin_addr, tvb, offset+4, 4, FALSE); - offset += 16; - return offset; -} - -static guint32 dissect_ceph_banner(tvbuff_t *tvb, proto_tree *tree, guint32 offset) -{ - proto_tree *ceph_banner_tree = NULL; - proto_item *ceph_sub_item = NULL; - - ceph_sub_item = proto_tree_add_item( tree, hf_ceph_banner, tvb, offset, 9, TRUE ); - ceph_banner_tree = proto_item_add_subtree(ceph_sub_item, ett_ceph); - - proto_tree_add_item(ceph_banner_tree, hf_ceph_banner_magic, tvb, offset, 4, TRUE); - proto_tree_add_item(ceph_banner_tree, hf_ceph_banner_version, tvb, offset+5, 4, TRUE); - - return offset+9; -} - -static guint32 dissect_ceph_entity_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset) -{ - proto_tree *ceph_entity_tree = NULL; - proto_item *ceph_sub_item = NULL; - - ceph_sub_item = proto_tree_add_item( tree, hf_ceph_entity_addr, tvb, offset, sizeof(struct ceph_entity_addr), TRUE ); - ceph_entity_tree = proto_item_add_subtree(ceph_sub_item, ett_ceph); - proto_tree_add_item(ceph_entity_tree, hf_ceph_connect_erank, tvb, offset, 4, TRUE); - proto_tree_add_item(ceph_entity_tree, hf_ceph_connect_nonce, tvb, offset+4, 4, TRUE); - dissect_sockaddr_in(tvb, ceph_entity_tree, offset+8); -#if 0 - proto_tree_add_item(ceph_entity_tree, hf_ceph_connect_host_type, tvb, offset, 4, TRUE); - offset += 4; -#endif - - return offset + sizeof(struct ceph_entity_addr); -} - -static guint32 dissect_ceph_fsid(tvbuff_t *tvb, proto_tree *tree, guint32 offset) -{ - struct ceph_fsid fsid; - guint32 * fsid_dec = NULL; - fsid_dec = malloc(4*sizeof(guint32)); - fsid = *(struct ceph_fsid *)tvb_get_ptr(tvb, offset, sizeof(struct ceph_fsid)); - memcpy(fsid_dec,fsid.fsid,4*sizeof(guint32)); - proto_tree_add_text(tree, tvb, offset, sizeof(struct ceph_fsid), "fsid: %x-%x-%x-%x", - ntohl(fsid_dec[0]), - ntohl(fsid_dec[1]), - ntohl(fsid_dec[2]), - ntohl(fsid_dec[3]) - ); - offset += sizeof(struct ceph_fsid); - free (fsid_dec); - return offset; -} - -guint32 dissect_ceph_entity_name(tvbuff_t *tvb, proto_tree *tree, guint32 offset) -{ - proto_tree_add_item(tree, hf_ceph_entity_type, tvb, offset, 1, TRUE); - proto_tree_add_item(tree, hf_ceph_entity_num, tvb, offset+1, 8, TRUE); - offset += sizeof(struct ceph_entity_name); - return offset; -} - - -static guint32 dissect_ceph_footer(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint32 data_crc) -{ - proto_tree *ceph_footer_tree = NULL; - proto_item *ceph_sub_item = NULL; - proto_item *data_crc_item = NULL; - - ceph_sub_item = proto_tree_add_item( tree, hf_ceph_footer, tvb, offset, sizeof(struct ceph_msg_footer), TRUE ); - ceph_footer_tree = proto_item_add_subtree(ceph_sub_item, ett_ceph); - proto_tree_add_item(ceph_footer_tree, hf_ceph_footer_front_crc, tvb, offset, 4, TRUE); - proto_tree_add_item(ceph_footer_tree, hf_ceph_footer_middle_crc, tvb, offset+4, 4, TRUE); - data_crc_item = proto_tree_add_item(ceph_footer_tree, hf_ceph_footer_data_crc, tvb, offset+8, 4, TRUE); - proto_item_append_text(data_crc_item, " (calculated %x)", data_crc); - proto_tree_add_item(ceph_footer_tree, hf_ceph_footer_flags, tvb, offset+12, 1, TRUE); - - offset += 13; - return offset; -} - -static guint32 dissect_ceph_client_connect(tvbuff_t *tvb, proto_tree *tree, guint32 offset) -{ - proto_tree *ceph_header_tree; - proto_item *ceph_sub_item = NULL; - proto_item *ceph_item = proto_tree_get_parent(tree); - struct ceph_msg_connect *msg; - guint32 auth_len; - - offset = dissect_ceph_banner(tvb, tree, offset); - - ceph_header_tree = proto_item_add_subtree(ceph_item, ett_ceph); - - ceph_sub_item = proto_tree_add_item( tree, hf_ceph_header, tvb, offset, -1, TRUE ); - ceph_header_tree = proto_item_add_subtree(ceph_sub_item, ett_ceph); - - offset = dissect_ceph_entity_addr(tvb, ceph_header_tree, offset); -#if 0 - proto_tree_add_item(ceph_header_tree, hf_ceph_connect_host_type, tvb, offset, 4, TRUE); - offset += 4; - proto_tree_add_item(ceph_header_tree, hf_ceph_connect_global_seq, tvb, offset, 4, TRUE); - proto_tree_add_item(ceph_header_tree, hf_ceph_connect_connect_seq, tvb, offset+4, 4, TRUE); - proto_tree_add_item(ceph_header_tree, hf_ceph_connect_flags, tvb, offset+8, 1, TRUE); - offset += 8; -#endif - - msg = (struct ceph_msg_connect *)tvb_get_ptr(tvb, offset, sizeof(struct ceph_msg_connect)); - PROTO_ADD_TEXT(struct ceph_msg_connect, msg, features, "%lld"); - PROTO_ADD_TEXT(struct ceph_msg_connect, msg, host_type, "%d"); - PROTO_ADD_TEXT(struct ceph_msg_connect, msg, connect_seq, "%d"); - PROTO_ADD_TEXT(struct ceph_msg_connect, msg, global_seq, "%d"); - PROTO_ADD_TEXT(struct ceph_msg_connect, msg, protocol_version, "%d"); - PROTO_ADD_TEXT(struct ceph_msg_connect, msg, flags, "%x"); - PROTO_ADD_TEXT(struct ceph_msg_connect, msg, authorizer_protocol, "%d"); - PROTO_ADD_TEXT(struct ceph_msg_connect, msg, authorizer_len, "%d"); - offset += sizeof(struct ceph_msg_connect); - auth_len = msg->authorizer_len; - auth_len = 174; - proto_tree_add_text(tree,tvb, offset, auth_len, "Authentication key"); - offset += auth_len; - return offset; -} - -static guint32 dissect_ceph_server_connect(tvbuff_t *tvb, proto_tree *tree, guint32 offset) -{ - proto_tree *ceph_header_tree; - proto_item *ceph_sub_item = NULL; - proto_item *ceph_item = proto_tree_get_parent(tree); - struct ceph_msg_connect_reply *msg; - - offset = dissect_ceph_banner(tvb, tree, offset); - - ceph_header_tree = proto_item_add_subtree(ceph_item, ett_ceph); - - ceph_sub_item = proto_tree_add_item( tree, hf_ceph_header, tvb, offset, -1, TRUE ); - ceph_header_tree = proto_item_add_subtree(ceph_sub_item, ett_ceph); - - offset = dissect_ceph_entity_addr(tvb, ceph_header_tree, offset); - offset = dissect_ceph_entity_addr(tvb, ceph_header_tree, offset); - msg = (struct ceph_msg_connect_reply *)tvb_get_ptr(tvb, offset, sizeof(struct ceph_msg_connect_reply)); - PROTO_ADD_TEXT(struct ceph_msg_connect_reply, msg, tag, "%d"); - PROTO_ADD_TEXT(struct ceph_msg_connect_reply, msg, features, "%lld"); - PROTO_ADD_TEXT(struct ceph_msg_connect_reply, msg, global_seq, "%d"); - PROTO_ADD_TEXT(struct ceph_msg_connect_reply, msg, connect_seq, "%d"); - PROTO_ADD_TEXT(struct ceph_msg_connect_reply, msg, protocol_version, "%d"); - PROTO_ADD_TEXT(struct ceph_msg_connect_reply, msg, authorizer_len, "%d"); - PROTO_ADD_TEXT(struct ceph_msg_connect_reply, msg, flags, "%x"); - - return offset; -} - -static guint32 dissect_ceph_file_layout(tvbuff_t *tvb, proto_tree *tree, guint32 offset) -{ - guint32 orig_ofs = offset; - struct ceph_file_layout *lo; - - lo = (struct ceph_file_layout *)tvb_get_ptr(tvb, offset, sizeof(struct ceph_file_layout)); - - PROTO_ADD_TEXT(struct ceph_file_layout, lo, fl_stripe_unit, "%d"); - PROTO_ADD_TEXT(struct ceph_file_layout, lo, fl_stripe_count, "%d"); - PROTO_ADD_TEXT(struct ceph_file_layout, lo, fl_object_size, "%d"); - PROTO_ADD_TEXT(struct ceph_file_layout, lo, fl_cas_hash, "%d"); - PROTO_ADD_TEXT(struct ceph_file_layout, lo, fl_object_stripe_unit, "%d"); - PROTO_ADD_TEXT(struct ceph_file_layout, lo, fl_pg_preferred, "%d"); - PROTO_ADD_TEXT(struct ceph_file_layout, lo, fl_pg_pool, "%u"); - - return orig_ofs + sizeof(struct ceph_mds_reply_head); -} -#if 0 -static int dissect_ceph_filepath(tvbuff_t *tvb, proto_tree *tree, guint32 offset, char **path, guint64 *ino) -{ - guint32 len; - const char *p = NULL; - - *ino = tvb_get_letoh64(tvb, offset); - proto_tree_add_text(tree, tvb, offset, sizeof(*ino), "inode: " FMT_INO, *ino); - offset += sizeof(*ino); - len = tvb_get_letohl(tvb, offset); - proto_tree_add_text(tree, tvb, offset, sizeof(len), "len: %d", len); - offset += sizeof(len); - - if (len) { - p = tvb_get_ptr(tvb, offset, len); - *path = malloc(len+1); - if (*path) { - memcpy(*path, p, len); - (*path)[len] = '\0'; - proto_tree_add_item(tree, hf_ceph_path, tvb, offset, len, TRUE); - } - } - - offset += len; - - return offset; -} -#endif -static guint32 dissect_ceph_mon_statfs(tvbuff_t *tvb, proto_tree *tree, guint32 offset) -{ - struct ceph_mon_statfs *req; - - req = (struct ceph_mon_statfs *)tvb_get_ptr(tvb, offset, sizeof(struct ceph_mon_statfs)); - - dissect_ceph_fsid(tvb, tree, offset + offsetof(struct ceph_mon_statfs, fsid)); - PROTO_ADD_TEXT(struct ceph_mon_statfs, req, monhdr.session_mon_tid, "%lld"); - - return offset + sizeof(struct ceph_mon_statfs); -} - -static guint32 dissect_ceph_mon_statfs_reply(tvbuff_t *tvb, proto_tree *tree, guint32 offset) -{ - struct ceph_mon_statfs_reply *req; - - req = (struct ceph_mon_statfs_reply *)tvb_get_ptr(tvb, offset, sizeof(struct ceph_mon_statfs_reply)); - - dissect_ceph_fsid(tvb, tree, offset + offsetof(struct ceph_mon_statfs_reply, fsid)); - PROTO_ADD_TEXT(struct ceph_mon_statfs_reply, req, version, "%lld"); - - PROTO_ADD_TEXT(struct ceph_mon_statfs_reply, req, st.kb, "%lld"); - PROTO_ADD_TEXT(struct ceph_mon_statfs_reply, req, st.kb_used, "%lld"); - PROTO_ADD_TEXT(struct ceph_mon_statfs_reply, req, st.kb_avail, "%lld"); - PROTO_ADD_TEXT(struct ceph_mon_statfs_reply, req, st.num_objects, "%lld"); - - return offset + sizeof(struct ceph_mon_statfs_reply); -} -#if 0 -static guint32 dissect_ceph_client_osd_getmap(tvbuff_t *tvb, proto_tree *tree, guint32 offset) -{ - struct ceph_osd_getmap *req; - - req = (struct ceph_osd_getmap *)tvb_get_ptr(tvb, offset, sizeof(struct ceph_osd_getmap)); - - dissect_ceph_fsid(tvb, tree, offset + offsetof(struct ceph_osd_getmap, fsid)); - PROTO_ADD_TEXT(struct ceph_osd_getmap, req, start, "%d"); - - return offset + sizeof(struct ceph_osd_getmap); -} - -static guint32 dissect_ceph_client_mds_getmap(tvbuff_t *tvb, proto_tree *tree, guint32 offset) -{ - struct ceph_mds_getmap *req; - - req = (struct ceph_mds_getmap *)tvb_get_ptr(tvb, offset, sizeof(struct ceph_mds_getmap)); - - PROTO_ADD_TEXT(struct ceph_mds_getmap, req, monhdr.have_version, "%lld"); - dissect_ceph_fsid(tvb, tree, offset + offsetof(struct ceph_mds_getmap, fsid)); - - return offset + sizeof(struct ceph_mds_getmap); -} -#endif -static guint32 dissect_ceph_client_mds_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset) -{ - struct ceph_mds_request_head *head; - proto_item *item; - - head = (struct ceph_mds_request_head *)tvb_get_ptr(tvb, offset, sizeof(struct ceph_mds_request_head)); - - //PROTO_ADD_TEXT(struct ceph_mds_request_head, head, tid, "%lld"); - PROTO_ADD_TEXT(struct ceph_mds_request_head, head, oldest_client_tid, "%lld"); - PROTO_ADD_TEXT(struct ceph_mds_request_head, head, mdsmap_epoch, "%d"); - PROTO_ADD_TEXT(struct ceph_mds_request_head, head, num_retry, "%d"); - PROTO_ADD_TEXT(struct ceph_mds_request_head, head, num_fwd, "%d"); - PROTO_ADD_TEXT(struct ceph_mds_request_head, head, num_releases, "%d"); - - item = proto_tree_add_item(tree, hf_ceph_mds_op, tvb, offset+offsetof(struct ceph_mds_request_head, op), sizeof(head->op), TRUE); - proto_item_append_text(item, " (%s)", ceph_mds_op_name(head->op)); - - PROTO_ADD_TEXT(struct ceph_mds_request_head, head, caller_uid, "%d"); - PROTO_ADD_TEXT(struct ceph_mds_request_head, head, caller_gid, "%d"); - - if (check_col(pinfo->cinfo, COL_INFO)) { - col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)", ceph_mds_op_name(head->op)); - } - - /* FIXME */ - switch (head->op) { - case CEPH_MDS_OP_LOOKUP: -// PROTO_ADD_TEXT(struct ceph_mds_request_head, head, args.lookup.mask, "0x%.4x"); - break; - case CEPH_MDS_OP_SETXATTR: - break; - case CEPH_MDS_OP_SETLAYOUT: - dissect_ceph_file_layout(tvb, tree, offset + offsetof(struct ceph_mds_request_head, args.setlayout.layout)); - break; - case CEPH_MDS_OP_SETATTR: - break; - case CEPH_MDS_OP_MKNOD: - PROTO_ADD_TEXT(struct ceph_mds_request_head, head, args.mknod.mode, "0%.5o"); - PROTO_ADD_TEXT(struct ceph_mds_request_head, head, args.mknod.rdev, "%d"); - break; - case CEPH_MDS_OP_OPEN: - PROTO_ADD_TEXT(struct ceph_mds_request_head, head, args.open.flags, "%x"); - PROTO_ADD_TEXT(struct ceph_mds_request_head, head, args.open.mode, "0%.5o"); - break; - case CEPH_MDS_OP_MKDIR: - PROTO_ADD_TEXT(struct ceph_mds_request_head, head, args.mkdir.mode, "0%.5o"); - break; - case CEPH_MDS_OP_RMXATTR: - case CEPH_MDS_OP_LINK: - case CEPH_MDS_OP_UNLINK: - case CEPH_MDS_OP_RENAME: - case CEPH_MDS_OP_RMDIR: - case CEPH_MDS_OP_SYMLINK: - case CEPH_MDS_OP_LSSNAP: - case CEPH_MDS_OP_MKSNAP: - case CEPH_MDS_OP_RMSNAP: - case CEPH_MDS_OP_CREATE: - break; - } - - offset += sizeof(struct ceph_mds_request_head); -#if 0 - if (head->op == CEPH_MDS_OP_FINDINODE) { - - } else { - guint64 ino1, ino2; - char *s1 = NULL, *s2 = NULL; - - offset = dissect_ceph_filepath(tvb, tree, offset, &s1, &ino1); - offset = dissect_ceph_filepath(tvb, tree, offset, &s2, &ino2); - - if (check_col(pinfo->cinfo, COL_INFO)) { - if (s1) - col_append_fstr(pinfo->cinfo, COL_INFO, " %s", s1); - if (s2) - col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", s2); - } - - - - } -#endif - return offset; -} - -static guint32 dissect_ceph_client_mds_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset) -{ - guint32 orig_ofs = offset; - struct ceph_mds_reply_head *head; - - head = (struct ceph_mds_reply_head *)tvb_get_ptr(tvb, offset, sizeof(struct ceph_mds_reply_head)); - - //PROTO_ADD_TEXT(struct ceph_mds_reply_head, head, tid, "%lld"); - - proto_tree_add_text(tree, tvb, offsetof(struct ceph_mds_reply_head, op), - sizeof(head->op), "op: %d (%s)", head->op, ceph_mds_op_name(head->op)); - - PROTO_ADD_TEXT(struct ceph_mds_reply_head, head, result, "%d"); - PROTO_ADD_TEXT(struct ceph_mds_reply_head, head, mdsmap_epoch, "%d"); - - - if (check_col(pinfo->cinfo, COL_INFO)) { - col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)", ceph_mds_op_name(head->op)); - } - - return orig_ofs + sizeof(struct ceph_mds_reply_head); -} - -static guint32 dissect_ceph_client_mds_lease_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset) -{ - guint32 orig_ofs = offset; - struct ceph_mds_lease *head; - static char *lease_action[] = { "", "revoke", "release", "renew" }; - - head = (struct ceph_mds_lease *)tvb_get_ptr(tvb, offset, sizeof(struct ceph_mds_lease)); - - PROTO_ADD_TEXT(struct ceph_mds_lease, head, action, "%d"); - PROTO_ADD_TEXT(struct ceph_mds_lease, head, mask, "%.4x"); - PROTO_ADD_TEXT(struct ceph_mds_lease, head, ino, FMT_INO); - PROTO_ADD_TEXT(struct ceph_mds_lease, head, first, "%lld"); - PROTO_ADD_TEXT(struct ceph_mds_lease, head, last, "%lld"); - - if (check_col(pinfo->cinfo, COL_INFO)) { - if (head->action < 4) { - col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)", lease_action[head->action]); - } - } - - return orig_ofs + sizeof(struct ceph_mds_lease); -} - -static guint32 dissect_ceph_client_mds_caps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset) -{ - guint32 orig_ofs = offset; - struct ceph_mds_caps *head; - - head = (struct ceph_mds_caps *)tvb_get_ptr(tvb, offset, sizeof(struct ceph_mds_caps)); - - PROTO_ADD_TEXT(struct ceph_mds_caps, head, op, "%d"); - PROTO_ADD_TEXT(struct ceph_mds_caps, head, ino, FMT_INO); - PROTO_ADD_TEXT(struct ceph_mds_caps, head, seq, "%d"); - PROTO_ADD_TEXT(struct ceph_mds_caps, head, caps, "%d"); - PROTO_ADD_TEXT(struct ceph_mds_caps, head, wanted, "%d"); - PROTO_ADD_TEXT(struct ceph_mds_caps, head, size, "%llu"); - PROTO_ADD_TEXT(struct ceph_mds_caps, head, max_size, "%llu"); - PROTO_ADD_TEXT(struct ceph_mds_caps, head, truncate_seq, "%d"); - PROTO_ADD_TEXT(struct ceph_mds_caps, head, migrate_seq, "%d"); - PROTO_ADD_TEXT(struct ceph_mds_caps, head, time_warp_seq, "%u"); - PROTO_ADD_TEXT(struct ceph_mds_caps, head, snap_follows, "%llu"); - PROTO_ADD_TEXT(struct ceph_mds_caps, head, snap_trace_len, "%d"); - -#define CAPS_REQ_ADD_TIME(field) PROTO_ADD_TIME(tvb, tree, struct ceph_mds_caps, offset, head, field, field) - CAPS_REQ_ADD_TIME(mtime); - CAPS_REQ_ADD_TIME(atime); - CAPS_REQ_ADD_TIME(ctime); - - if (check_col(pinfo->cinfo, COL_INFO)) { - col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)", ceph_cap_op_name(head->op)); - } - - return orig_ofs + sizeof(struct ceph_mds_caps); -} - -static guint32 dissect_ceph_auth_reply(tvbuff_t *tvb, proto_tree *tree, guint32 offset){ - guint32 protocol, result, payload_len,str_len; - guint64 global_id; - proto_item *ceph_sub_item = NULL; - proto_item *ceph_item = proto_tree_get_parent(tree); - proto_tree *ceph_auth_reply_tree; - - ceph_auth_reply_tree = proto_item_add_subtree(ceph_item, ett_ceph); - ceph_sub_item = proto_tree_add_item( tree, hf_ceph_auth_reply, tvb, offset, 16, TRUE ); - ceph_auth_reply_tree = proto_item_add_subtree(ceph_sub_item, ett_ceph); - - PROTO_ADD_SIMPLE_TEXT(ceph_auth_reply_tree,tvb_get_letohl,"protocol: %d",protocol); - PROTO_ADD_SIMPLE_TEXT(ceph_auth_reply_tree,tvb_get_letohl,"result: %d",result); - PROTO_ADD_SIMPLE_TEXT(ceph_auth_reply_tree,tvb_get_letoh64,"global_id: %" G_GUINT64_FORMAT, global_id); - PROTO_ADD_SIMPLE_TEXT(ceph_auth_reply_tree,tvb_get_letohl,"payload_len: %d",payload_len); - - str_len = tvb_get_letohl(tvb,offset+payload_len); - proto_tree_add_text(ceph_auth_reply_tree, tvb, offset+payload_len, str_len,"%s",tvb_get_const_stringz(tvb,offset,&str_len)); - return offset; -} - -static guint32 dissect_ceph_pgpools(tvbuff_t *tvb, proto_tree *tree, guint32 offset){ - guint32 n, i, pool; - proto_item *ceph_item = proto_tree_get_parent(tree); - proto_tree *ceph_pgpools_tree; - proto_item *ceph_sub_item = NULL; - ceph_pgpools_tree = proto_item_add_subtree(ceph_item, ett_ceph); - ceph_sub_item = proto_tree_add_item(tree, hf_ceph_pgpools, tvb, offset, -1, TRUE ); - ceph_pgpools_tree = proto_item_add_subtree(ceph_sub_item, ett_ceph); - PROTO_ADD_SIMPLE_TEXT(ceph_pgpools_tree,tvb_get_letohl," %d pool(s)",n); - for ( i = 0; itv_sec; - proto_tree_add_text(ceph_mdsnode_tree, tvb, offset, sizeof(time), "Time: %s (%d ns)", ctime(&time), cephtime->tv_nsec); - offset += sizeof(struct ceph_timespec); - offset += sizeof(guint32); - offset += tvb_get_letohl(tvb,offset); - offset += sizeof(guint32); - //offset ++; - if (infoversion >= 2 ){ - PROTO_ADD_SIMPLE_TEXT(ceph_mdsnode_tree,tvb_get_letohl,"num_export_targets: %d",num_export_targets); - } - else{ - num_export_targets = 0; - } - for ( i = 0; i < num_export_targets ; i++){ - PROTO_ADD_SIMPLE_TEXT(ceph_mdsnode_tree,tvb_get_letohl,"export_target: %d",field); - } - - return offset; -} - -static guint32 dissect_ceph_mon_map(tvbuff_t *tvb, proto_tree *tree, guint32 offset) -{ - guint32 epoch, num_mon, len, i; - guint16 version; - proto_item *ceph_item = proto_tree_get_parent(tree); - proto_tree *ceph_monmap_tree; - proto_item *ceph_sub_item = NULL; - ceph_monmap_tree = proto_item_add_subtree(ceph_item, ett_ceph); - len = tvb_get_letohl(tvb,offset); - ceph_sub_item = proto_tree_add_item(tree, hf_ceph_monmap, tvb, offset, len, TRUE ); - ceph_monmap_tree = proto_item_add_subtree(ceph_sub_item, ett_ceph); - - PROTO_ADD_SIMPLE_TEXT(ceph_monmap_tree,tvb_get_letohl,"length: %i",len); - PROTO_ADD_SIMPLE_TEXT(ceph_monmap_tree,tvb_get_letohs,"version: %i",version); - offset = dissect_ceph_fsid(tvb, ceph_monmap_tree, offset); - PROTO_ADD_SIMPLE_TEXT(ceph_monmap_tree,tvb_get_letohl,"epoch: %i",epoch); - PROTO_ADD_SIMPLE_TEXT(ceph_monmap_tree,tvb_get_letohl,"%i monitor",num_mon); - for (i = 0; i < num_mon; i++) - offset = dissect_ceph_entity_name(tvb, ceph_monmap_tree, offset); - offset = dissect_ceph_entity_addr(tvb, ceph_monmap_tree, offset); - - return offset; -} - -static guint32 dissect_ceph_mds_map(tvbuff_t *tvb, proto_tree *tree, guint32 offset) -{ - guint16 version; - guint32 epoch, map_len, len, plop, i; - guint64 max_filesize; - proto_item *ceph_item = proto_tree_get_parent(tree); - proto_tree *ceph_mdsmap_tree; - proto_item *ceph_sub_item = NULL; - ceph_mdsmap_tree = proto_item_add_subtree(ceph_item, ett_ceph); - len = tvb_get_letohl(tvb,offset); - ceph_sub_item = proto_tree_add_item(tree, hf_ceph_mdsmap, tvb, offset, len, TRUE ); - ceph_mdsmap_tree = proto_item_add_subtree(ceph_sub_item, ett_ceph); - offset = dissect_ceph_fsid(tvb, ceph_mdsmap_tree, offset); - PROTO_ADD_SIMPLE_TEXT(ceph_mdsmap_tree,tvb_get_letohl,"epoch: %i",epoch); - PROTO_ADD_SIMPLE_TEXT(ceph_mdsmap_tree,tvb_get_letohl,"map length: %i",map_len); - - PROTO_ADD_SIMPLE_TEXT(ceph_mdsmap_tree,tvb_get_letohl,"version: %i",version); - PROTO_ADD_SIMPLE_TEXT(ceph_mdsmap_tree,tvb_get_letohl,"m_epoch: %i",plop); - PROTO_ADD_SIMPLE_TEXT(ceph_mdsmap_tree,tvb_get_letohl,"m_client_epoch: %i",plop); - PROTO_ADD_SIMPLE_TEXT(ceph_mdsmap_tree,tvb_get_letohl,"m_last_failure: %i",plop); - PROTO_ADD_SIMPLE_TEXT(ceph_mdsmap_tree,tvb_get_letohl,"m_root: %i",plop); - PROTO_ADD_SIMPLE_TEXT(ceph_mdsmap_tree,tvb_get_letohl,"m_session_timeout: %i",plop); - PROTO_ADD_SIMPLE_TEXT(ceph_mdsmap_tree,tvb_get_letohl,"m_session_autoclose: %i",plop); - PROTO_ADD_SIMPLE_TEXT(ceph_mdsmap_tree,tvb_get_letoh64,"m_maxfile_size: %" G_GUINT64_FORMAT, max_filesize); - PROTO_ADD_SIMPLE_TEXT(ceph_mdsmap_tree,tvb_get_letohl,"m_max_mds: %i",plop); - PROTO_ADD_SIMPLE_TEXT(ceph_mdsmap_tree,tvb_get_letohl,"n: %i",len); - - - for (i = 0; i < len; i++){ - offset = dissect_ceph_mdsmap_node(tvb, ceph_mdsmap_tree, offset); - } - offset = dissect_ceph_pgpools(tvb, ceph_mdsmap_tree, offset); - return offset; -} - -static guint32 dissect_ceph_front(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset, guint16 type) -{ - switch (type) { -/* case CEPH_MSG_AUTH: - offset = dissect_ceph_auth(); - break;*/ - case CEPH_MSG_AUTH_REPLY: - offset = dissect_ceph_auth_reply(tvb, tree, offset); - break; - case CEPH_MSG_MON_MAP: - offset = dissect_ceph_mon_map(tvb, tree, offset); - break; - case CEPH_MSG_MDS_MAP: - offset = dissect_ceph_mds_map(tvb, tree, offset); - break; - case CEPH_MSG_STATFS: - offset = dissect_ceph_mon_statfs(tvb, tree, offset); - break; - case CEPH_MSG_STATFS_REPLY: - offset = dissect_ceph_mon_statfs_reply(tvb, tree, offset); - break; - case CEPH_MSG_CLIENT_REQUEST: /* mds request */ - offset = dissect_ceph_client_mds_request(tvb, pinfo, tree, offset); - break; - case CEPH_MSG_CLIENT_REPLY: - offset = dissect_ceph_client_mds_reply(tvb, pinfo, tree, offset); - break; - case CEPH_MSG_CLIENT_LEASE: - offset = dissect_ceph_client_mds_lease_request(tvb, pinfo, tree, offset); - break; - case CEPH_MSG_CLIENT_CAPS: - offset = dissect_ceph_client_mds_caps_request(tvb, pinfo, tree, offset); - break; - default: - break; - } - return offset; -} - -static guint32 dissect_ceph_generic(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset) -{ - proto_tree *ceph_header_tree; - proto_item *ceph_sub_item = NULL; - proto_item *ceph_item = proto_tree_get_parent(tree); - guint32 front_len, middle_len, data_len; - guint8 tag; - guint32 hlen; - guint32 orig_ofs = offset; - guint16 type; - guint64 seq; - struct ceph_msg_header *header; - unsigned int data_crc = 0; - - tag = tvb_get_guint8(tvb, offset); - hlen = ( tag == CEPH_MSGR_TAG_ACK ) ? ACK_MSG_SIZE:0; - hlen += sizeof(struct ceph_msg_header); - hlen++; - - ceph_header_tree = proto_item_add_subtree(ceph_item, ett_ceph); - - ceph_sub_item = proto_tree_add_item( tree, hf_ceph_header, tvb, offset, hlen, TRUE ); - ceph_header_tree = proto_item_add_subtree(ceph_sub_item, ett_ceph); - - - if (tag == CEPH_MSGR_TAG_ACK) { - proto_tree_add_item(ceph_header_tree, hf_ceph_hdr_tag, tvb, offset, 1, TRUE); - proto_tree_add_item(ceph_header_tree, hf_ceph_hdr_seq_ack, tvb, offset+1, 8, TRUE); - offset += ACK_MSG_SIZE; - } - - proto_tree_add_item(ceph_header_tree, hf_ceph_hdr_tag, tvb, offset, 1, TRUE); - offset++; - - header = (struct ceph_msg_header *)tvb_get_ptr(tvb, offset, sizeof(struct ceph_msg_header)); - - PROTO_ADD_ITEM(ceph_header_tree, struct ceph_msg_header, hf_ceph_hdr_seq, header, seq); - PROTO_ADD_ITEM(ceph_header_tree, struct ceph_msg_header, hf_ceph_hdr_type, header, type); - PROTO_ADD_ITEM(ceph_header_tree, struct ceph_msg_header, hf_ceph_hdr_priority, header, priority); - PROTO_ADD_ITEM(ceph_header_tree, struct ceph_msg_header, hf_ceph_hdr_version, header, version); - PROTO_ADD_ITEM(ceph_header_tree, struct ceph_msg_header, hf_ceph_hdr_front_len, header, front_len); - PROTO_ADD_ITEM(ceph_header_tree, struct ceph_msg_header, hf_ceph_hdr_middle_len, header, middle_len); - PROTO_ADD_ITEM(ceph_header_tree, struct ceph_msg_header, hf_ceph_hdr_data_off, header, data_off); - PROTO_ADD_ITEM(ceph_header_tree, struct ceph_msg_header, hf_ceph_hdr_data_len, header, data_len); - PROTO_ADD_ITEM(ceph_header_tree, struct ceph_msg_header, hf_ceph_hdr_crc, header, crc); - - // Bad location - dissect_ceph_entity_name(tvb, ceph_header_tree, offset + offsetof(struct ceph_msg_header, src)); - //dissect_ceph_entity_inst(tvb, ceph_header_tree, offset + offsetof(struct ceph_msg_header, orig_src)); - - type = TVB_MSG_FIELD(tvb_get_letohl, tvb, orig_ofs, type); - seq = TVB_MSG_FIELD(tvb_get_letoh64, tvb, orig_ofs, seq); - front_len = TVB_MSG_FIELD(tvb_get_letohs, tvb, orig_ofs, front_len); - middle_len = TVB_MSG_FIELD(tvb_get_letohs, tvb, orig_ofs, middle_len); - data_len = TVB_MSG_FIELD(tvb_get_letohl, tvb, orig_ofs, data_len); - - offset += sizeof(struct ceph_msg_header); - - if (front_len) { - dissect_ceph_front(tvb, pinfo, tree, offset, type); - offset += front_len; - } - - if (middle_len) { - offset += middle_len; - } - - if (data_len) { - char *data; - ceph_sub_item = proto_tree_add_item( tree, hf_ceph_data, tvb, offset, data_len, TRUE ); - data = (char *)tvb_get_ptr(tvb, offset, data_len); - data_crc = ceph_crc32c_le(0, data, data_len); - offset += data_len; - } - offset = dissect_ceph_footer(tvb, tree, offset, data_crc); - return offset; -} - - -static const char *ceph_protocol_to_text(guint32 proto){ - if ( proto == CEPH_OSD_PROTOCOL ) - return "osd"; - if ( proto == CEPH_MDS_PROTOCOL ) - return "mds"; - if ( proto == CEPH_MON_PROTOCOL ) - return "mon"; - if ( proto == CEPH_OSDC_PROTOCOL ) - return "osd"; - if ( proto == CEPH_MDSC_PROTOCOL ) - return "mds"; - if ( proto == CEPH_MONC_PROTOCOL ) - return "mon"; - else{ - return "???"; - } -} - -static const char *entity_name_by_type(int type) -{ - if (type < 4) - return "???"; - - if (type < 20) - return "mon"; - - if (type < 30) - return "mds"; - - if (type < 50) - return "osd"; - - if (type < 0x300) - return "???"; - - if (type < 0x400) - return "mds"; - - return "???"; -} - -static void -dissect_ceph_client(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) -{ - - proto_item *ceph_item = NULL; - proto_tree *ceph_tree = NULL; - guint16 type = 0; - guint32 proto = 0; - const guchar *ptr; - guint32 pos = 0; - int have_banner = 0; - - if (check_col(pinfo->cinfo, COL_PROTOCOL)) - col_set_str(pinfo->cinfo, COL_PROTOCOL, PROTO_TAG_CEPH); - /* Clear out stuff in the info column */ - if(check_col(pinfo->cinfo,COL_INFO)){ - col_clear(pinfo->cinfo,COL_INFO); - } - - ptr = tvb_get_ptr(tvb, pos, 9); - if (ptr && memcmp(ptr, "ceph", 4) == 0) { - have_banner = 1; - pos += 9; - } - - // This is not a good way of dissecting packets. The tvb length should - // be sanity checked so we aren't going past the actual size of the buffer. - type = tvb_get_guint8(tvb,4); // Get the type byte - - - if (check_col(pinfo->cinfo, COL_INFO)) { - const char *entity_str = NULL; - - if (have_banner) { - if (IS_MON(pinfo)) - entity_str = MON_STR; - else{ - // Guess communication type from "struct ceph_msg_connect" - proto = tvb_get_letohl(tvb,9 + sizeof(struct ceph_entity_addr) + 20); - entity_str = ceph_protocol_to_text(proto); - } - col_add_fstr(pinfo->cinfo, COL_INFO, "[%s] Connect Request", entity_str); - } else { - type = TVB_MSG_FIELD(tvb_get_letohl, tvb, 0, type); - entity_str = entity_name_by_type(type); - col_add_fstr(pinfo->cinfo, COL_INFO, "[%s] %s", - entity_str, - val_to_str(type, packettypenames, "Unknown Type:0x%02x")); - } - } - - if (tree) { /* we are being asked for details */ - guint32 offset = 0; - - ceph_item = proto_tree_add_item(tree, proto_ceph, tvb, 0, -1, TRUE); - ceph_tree = proto_item_add_subtree(ceph_item, ett_ceph); - if (have_banner) { /* this is a connect message */ - offset = dissect_ceph_client_connect(tvb, ceph_tree, offset); - } else { - offset = dissect_ceph_generic(tvb, pinfo, ceph_tree, offset); - } - } -} - -static void -dissect_ceph_server(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) -{ - - proto_item *ceph_item = NULL; - proto_tree *ceph_tree = NULL; - guint16 type = 0; - const guchar *ptr; - guint32 pos = 0; - int have_banner = 0; - - if (check_col(pinfo->cinfo, COL_PROTOCOL)) - col_set_str(pinfo->cinfo, COL_PROTOCOL, PROTO_TAG_CEPH); - /* Clear out stuff in the info column */ - if(check_col(pinfo->cinfo,COL_INFO)){ - col_clear(pinfo->cinfo,COL_INFO); - } - - ptr = tvb_get_ptr(tvb, pos, 9); - if (ptr && memcmp(ptr, "ceph", 4) == 0) { - have_banner = 1; - pos += 9; - } - - // This is not a good way of dissecting packets. The tvb length should - // be sanity checked so we aren't going past the actual size of the buffer. - type = tvb_get_guint8( tvb, 4 ); // Get the type byte - - if (check_col(pinfo->cinfo, COL_INFO)) { - const char *entity_str; - if (IS_MON(pinfo)) - entity_str = MON_STR; - else{ - entity_str = "???"; - } - if (have_banner) { - col_add_fstr(pinfo->cinfo, COL_INFO, "[%s] Connect Response", entity_str); - } else { - type = TVB_MSG_FIELD(tvb_get_letohl, tvb, 0, type); - entity_str = entity_name_by_type(type); - col_add_fstr(pinfo->cinfo, COL_INFO, "[%s] %s", - entity_str, - val_to_str(type, packettypenames, "Unknown Type:0x%02x")); - } - } - - if (tree) { /* we are being asked for details */ - guint32 offset = 0; - - ceph_item = proto_tree_add_item(tree, proto_ceph, tvb, 0, -1, TRUE); - ceph_tree = proto_item_add_subtree(ceph_item, ett_ceph); - - if (have_banner) { - offset = dissect_ceph_server_connect(tvb, ceph_tree, offset); - } else { - offset = dissect_ceph_generic(tvb, pinfo, ceph_tree, offset); - } - } -} - -static void -dissect_ceph_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) -{ - if (DEST_PORT_CEPH) - dissect_ceph_client(tvb, pinfo, tree); - else - dissect_ceph_server(tvb, pinfo, tree); -} - -static guint dissect_ceph_acks(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) -{ - guint32 offset = 0; - - if (check_col(pinfo->cinfo, COL_PROTOCOL)) - col_set_str(pinfo->cinfo, COL_PROTOCOL, PROTO_TAG_CEPH); - /* Clear out stuff in the info column */ - if(check_col(pinfo->cinfo,COL_INFO)){ - col_clear(pinfo->cinfo,COL_INFO); - col_add_fstr(pinfo->cinfo, COL_INFO, "Ack"); - } - if (tree) { - proto_tree_add_item(tree, proto_ceph, tvb, 0, 5, TRUE); - proto_tree_add_item(tree, hf_ceph_hdr_tag, tvb, offset, 1, TRUE); - proto_tree_add_item(tree, hf_ceph_hdr_seq_ack, tvb, offset+1, 8, TRUE); - offset += 9; - } - - return offset; -} - -/* determine PDU length of protocol ceph */ -static guint get_ceph_message_len(packet_info *pinfo, tvbuff_t *tvb, int offset) -{ - const char *ptr; - guint32 len; - guint32 pos = 0; - guint32 tlen = (int) tvb->length; - ptr = tvb_get_ptr(tvb, offset, tlen - offset); - //ptr = tvb_get_ptr(tvb, offset, /* sizeof(CEPH_BANNER) */ (tvb->length)-offset); - if (ptr && memcmp(ptr, "ceph", 4) == 0) { - if (DEST_PORT_CEPH) { - len = sizeof(CEPH_BANNER) - 1 + - sizeof(struct ceph_entity_addr) + - sizeof(struct ceph_msg_connect) + AUTH_LEN; - } else - len = sizeof(CEPH_BANNER) - 1 + - sizeof(struct ceph_entity_addr) + - sizeof(struct ceph_entity_addr) + - sizeof(struct ceph_msg_connect_reply); - return len; - } - - if (*ptr == CEPH_MSGR_TAG_ACK) - pos = ACK_MSG_SIZE; - - len = pos + (guint)1 + sizeof(struct ceph_msg_header) + - TVB_MSG_FIELD(tvb_get_letohl, tvb, offset, front_len) + - TVB_MSG_FIELD(tvb_get_letohl, tvb, offset, data_len) + - sizeof(struct ceph_msg_footer); - - if (!*ptr) - return 0; - return len; -} - - -static void dissect_ceph(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree){ - const char *ptr; - ptr = tvb_get_ptr(tvb, 0, 6); - if(*ptr == CEPH_MSGR_TAG_RESETSESSION){ - col_set_str(pinfo->cinfo, COL_PROTOCOL, PROTO_TAG_CEPH); - col_add_fstr(pinfo->cinfo, COL_INFO, "Ceph reset session"); - } - else if(*ptr == CEPH_MSGR_TAG_WAIT){ - col_set_str(pinfo->cinfo, COL_PROTOCOL, PROTO_TAG_CEPH); - col_add_fstr(pinfo->cinfo, COL_INFO, "Ceph I am waiting"); - } - else if(*ptr == CEPH_MSGR_TAG_RETRY_SESSION){ - col_set_str(pinfo->cinfo, COL_PROTOCOL, PROTO_TAG_CEPH); - col_add_fstr(pinfo->cinfo, COL_INFO, "Ceph retry session"); - } - else if(*ptr == CEPH_MSGR_TAG_RETRY_GLOBAL){ - col_set_str(pinfo->cinfo, COL_PROTOCOL, PROTO_TAG_CEPH); - col_add_fstr(pinfo->cinfo, COL_INFO, "Ceph retry global"); - } - else if(*ptr == CEPH_MSGR_TAG_CLOSE){ - col_set_str(pinfo->cinfo, COL_PROTOCOL, PROTO_TAG_CEPH); - col_add_fstr(pinfo->cinfo, COL_INFO, "Ceph close"); - } - else if(*ptr == CEPH_MSGR_TAG_KEEPALIVE){ - col_set_str(pinfo->cinfo, COL_PROTOCOL, PROTO_TAG_CEPH); - col_add_fstr(pinfo->cinfo, COL_INFO, "Ceph keep alive"); - } - else if ((*ptr == CEPH_MSGR_TAG_MSG) || - (memcmp(ptr, CEPH_BANNER, 4) == 0) || - ((ptr[0] == CEPH_MSGR_TAG_ACK) && (ptr[9] == CEPH_MSGR_TAG_MSG)) - ){ - tcp_dissect_pdus(tvb, pinfo, tree, TRUE, TVB_MSG_HEADER_POS(src), - get_ceph_message_len, dissect_ceph_message); - } else { - dissect_ceph_acks(tvb, pinfo, tree); - } -} - diff --git a/wireshark/ceph/plugin.c b/wireshark/ceph/plugin.c deleted file mode 100644 index 254febabc240..000000000000 --- a/wireshark/ceph/plugin.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Do not modify this file. - * - * It is created automatically by Makefile or Makefile.nmake. - */ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include - -#include "moduleinfo.h" - -#ifndef ENABLE_STATIC -G_MODULE_EXPORT const gchar version[] = VERSION; - -/* Start the functions we need for the plugin stuff */ - -G_MODULE_EXPORT void -plugin_register (void) -{ - {extern void proto_register_ceph (void); proto_register_ceph ();} -} - -G_MODULE_EXPORT void -plugin_reg_handoff(void) -{ - {extern void proto_reg_handoff_ceph (void); proto_reg_handoff_ceph ();} -} -#endif diff --git a/wireshark/ceph/plugin.rc.in b/wireshark/ceph/plugin.rc.in deleted file mode 100644 index b1e22ef37323..000000000000 --- a/wireshark/ceph/plugin.rc.in +++ /dev/null @@ -1,34 +0,0 @@ -#include "winver.h" - -VS_VERSION_INFO VERSIONINFO - FILEVERSION @RC_MODULE_VERSION@ - PRODUCTVERSION @RC_VERSION@ - FILEFLAGSMASK 0x0L -#ifdef _DEBUG - FILEFLAGS VS_FF_PRERELEASE+VS_FF_DEBUG -#else - FILEFLAGS VS_FF_PRERELEASE -#endif - FILEOS VOS_NT_WINDOWS32 - FILETYPE VFT_DLL -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "CompanyName", "The Wireshark developer community, http://www.wireshark.org/\0" - VALUE "FileDescription", "@PACKAGE@ dissector\0" - VALUE "FileVersion", "@MODULE_VERSION@\0" - VALUE "InternalName", "@PACKAGE@ @MODULE_VERSION@\0" - VALUE "LegalCopyright", "Copyright © 1998 Gerald Combs , Gilbert Ramirez and others\0" - VALUE "OriginalFilename", "@PLUGIN_NAME@.dll\0" - VALUE "ProductName", "Wireshark\0" - VALUE "ProductVersion", "@VERSION@\0" - VALUE "Comments", "Build with @MSVC_VARIANT@\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END diff --git a/wireshark/ceph/rados.h b/wireshark/ceph/rados.h deleted file mode 100644 index 7e7fc9234b5d..000000000000 --- a/wireshark/ceph/rados.h +++ /dev/null @@ -1,425 +0,0 @@ -#ifndef CEPH_RADOS_H -#define CEPH_RADOS_H - -/* - * Data types for the Ceph distributed object storage layer RADOS - * (Reliable Autonomic Distributed Object Store). - */ - -#include "msgr.h" - -/* - * osdmap encoding versions - */ -#define CEPH_OSDMAP_INC_VERSION 5 -#define CEPH_OSDMAP_INC_VERSION_EXT 6 -#define CEPH_OSDMAP_VERSION 5 -#define CEPH_OSDMAP_VERSION_EXT 6 - -/* - * fs id - */ -struct ceph_fsid { - unsigned char fsid[16]; -}; - -static inline int ceph_fsid_compare(const struct ceph_fsid *a, - const struct ceph_fsid *b) -{ - return memcmp(a, b, sizeof(*a)); -} - -/* - * ino, object, etc. - */ -typedef __le64 ceph_snapid_t; -#define CEPH_SNAPDIR ((__u64)(-1)) /* reserved for hidden .snap dir */ -#define CEPH_NOSNAP ((__u64)(-2)) /* "head", "live" revision */ -#define CEPH_MAXSNAP ((__u64)(-3)) /* largest valid snapid */ - -struct ceph_timespec { - __le32 tv_sec; - __le32 tv_nsec; -} __attribute__ ((packed)); - - -/* - * object layout - how objects are mapped into PGs - */ -#define CEPH_OBJECT_LAYOUT_HASH 1 -#define CEPH_OBJECT_LAYOUT_LINEAR 2 -#define CEPH_OBJECT_LAYOUT_HASHINO 3 - -/* - * pg layout -- how PGs are mapped onto (sets of) OSDs - */ -#define CEPH_PG_LAYOUT_CRUSH 0 -#define CEPH_PG_LAYOUT_HASH 1 -#define CEPH_PG_LAYOUT_LINEAR 2 -#define CEPH_PG_LAYOUT_HYBRID 3 - -#define CEPH_PG_MAX_SIZE 16 /* max # osds in a single pg */ - -/* - * placement group. - * we encode this into one __le64. - */ -struct ceph_pg { - __le16 preferred; /* preferred primary osd */ - __le16 ps; /* placement seed */ - __le32 pool; /* object pool */ -} __attribute__ ((packed)); - -/* - * pg_pool is a set of pgs storing a pool of objects - * - * pg_num -- base number of pseudorandomly placed pgs - * - * pgp_num -- effective number when calculating pg placement. this - * is used for pg_num increases. new pgs result in data being "split" - * into new pgs. for this to proceed smoothly, new pgs are intiially - * colocated with their parents; that is, pgp_num doesn't increase - * until the new pgs have successfully split. only _then_ are the new - * pgs placed independently. - * - * lpg_num -- localized pg count (per device). replicas are randomly - * selected. - * - * lpgp_num -- as above. - */ -#define CEPH_PG_TYPE_REP 1 -#define CEPH_PG_TYPE_RAID4 2 -#define CEPH_PG_POOL_VERSION 2 -struct ceph_pg_pool { - __u8 type; /* CEPH_PG_TYPE_* */ - __u8 size; /* number of osds in each pg */ - __u8 crush_ruleset; /* crush placement rule */ - __u8 object_hash; /* hash mapping object name to ps */ - __le32 pg_num, pgp_num; /* number of pg's */ - __le32 lpg_num, lpgp_num; /* number of localized pg's */ - __le32 last_change; /* most recent epoch changed */ - __le64 snap_seq; /* seq for per-pool snapshot */ - __le32 snap_epoch; /* epoch of last snap */ - __le32 num_snaps; - __le32 num_removed_snap_intervals; /* if non-empty, NO per-pool snaps */ - __le64 auid; /* who owns the pg */ -} __attribute__ ((packed)); - -/* - * stable_mod func is used to control number of placement groups. - * similar to straight-up modulo, but produces a stable mapping as b - * increases over time. b is the number of bins, and bmask is the - * containing power of 2 minus 1. - * - * b <= bmask and bmask=(2**n)-1 - * e.g., b=12 -> bmask=15, b=123 -> bmask=127 - */ -static inline int ceph_stable_mod(int x, int b, int bmask) -{ - if ((x & bmask) < b) - return x & bmask; - else - return x & (bmask >> 1); -} - -/* - * object layout - how a given object should be stored. - */ -struct ceph_object_layout { - struct ceph_pg ol_pgid; /* raw pg, with _full_ ps precision. */ - __le32 ol_stripe_unit; /* for per-object parity, if any */ -} __attribute__ ((packed)); - -/* - * compound epoch+version, used by storage layer to serialize mutations - */ -struct ceph_eversion { - __le32 epoch; - __le64 version; -} __attribute__ ((packed)); - -/* - * osd map bits - */ - -/* status bits */ -#define CEPH_OSD_EXISTS 1 -#define CEPH_OSD_UP 2 - -/* osd weights. fixed point value: 0x10000 == 1.0 ("in"), 0 == "out" */ -#define CEPH_OSD_IN 0x10000 -#define CEPH_OSD_OUT 0 - - -/* - * osd map flag bits - */ -#define CEPH_OSDMAP_NEARFULL (1<<0) /* sync writes (near ENOSPC) */ -#define CEPH_OSDMAP_FULL (1<<1) /* no data writes (ENOSPC) */ -#define CEPH_OSDMAP_PAUSERD (1<<2) /* pause all reads */ -#define CEPH_OSDMAP_PAUSEWR (1<<3) /* pause all writes */ -#define CEPH_OSDMAP_PAUSEREC (1<<4) /* pause recovery */ - -/* - * osd ops - */ -#define CEPH_OSD_OP_MODE 0xf000 -#define CEPH_OSD_OP_MODE_RD 0x1000 -#define CEPH_OSD_OP_MODE_WR 0x2000 -#define CEPH_OSD_OP_MODE_RMW 0x3000 -#define CEPH_OSD_OP_MODE_SUB 0x4000 - -#define CEPH_OSD_OP_TYPE 0x0f00 -#define CEPH_OSD_OP_TYPE_LOCK 0x0100 -#define CEPH_OSD_OP_TYPE_DATA 0x0200 -#define CEPH_OSD_OP_TYPE_ATTR 0x0300 -#define CEPH_OSD_OP_TYPE_EXEC 0x0400 -#define CEPH_OSD_OP_TYPE_PG 0x0500 - -enum { - /** data **/ - /* read */ - CEPH_OSD_OP_READ = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 1, - CEPH_OSD_OP_STAT = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 2, - CEPH_OSD_OP_MAPEXT = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 3, - - /* fancy read */ - CEPH_OSD_OP_MASKTRUNC = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 4, - CEPH_OSD_OP_SPARSE_READ = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 5, - - CEPH_OSD_OP_NOTIFY = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 6, - CEPH_OSD_OP_NOTIFY_ACK = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 7, - - /* versioning */ - CEPH_OSD_OP_ASSERT_VER = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 8, - - /* write */ - CEPH_OSD_OP_WRITE = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_DATA | 1, - CEPH_OSD_OP_WRITEFULL = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_DATA | 2, - CEPH_OSD_OP_TRUNCATE = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_DATA | 3, - CEPH_OSD_OP_ZERO = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_DATA | 4, - CEPH_OSD_OP_DELETE = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_DATA | 5, - - /* fancy write */ - CEPH_OSD_OP_APPEND = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_DATA | 6, - CEPH_OSD_OP_STARTSYNC = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_DATA | 7, - CEPH_OSD_OP_SETTRUNC = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_DATA | 8, - CEPH_OSD_OP_TRIMTRUNC = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_DATA | 9, - - CEPH_OSD_OP_TMAPUP = CEPH_OSD_OP_MODE_RMW | CEPH_OSD_OP_TYPE_DATA | 10, - CEPH_OSD_OP_TMAPPUT = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_DATA | 11, - CEPH_OSD_OP_TMAPGET = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 12, - - CEPH_OSD_OP_CREATE = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_DATA | 13, - CEPH_OSD_OP_ROLLBACK= CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_DATA | 14, - - CEPH_OSD_OP_WATCH = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_DATA | 15, - - /** attrs **/ - /* read */ - CEPH_OSD_OP_GETXATTR = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_ATTR | 1, - CEPH_OSD_OP_GETXATTRS = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_ATTR | 2, - CEPH_OSD_OP_CMPXATTR = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_ATTR | 3, - - /* write */ - CEPH_OSD_OP_SETXATTR = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_ATTR | 1, - CEPH_OSD_OP_SETXATTRS = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_ATTR | 2, - CEPH_OSD_OP_RESETXATTRS = CEPH_OSD_OP_MODE_WR|CEPH_OSD_OP_TYPE_ATTR | 3, - CEPH_OSD_OP_RMXATTR = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_ATTR | 4, - - /** subop **/ - CEPH_OSD_OP_PULL = CEPH_OSD_OP_MODE_SUB | 1, - CEPH_OSD_OP_PUSH = CEPH_OSD_OP_MODE_SUB | 2, - CEPH_OSD_OP_BALANCEREADS = CEPH_OSD_OP_MODE_SUB | 3, - CEPH_OSD_OP_UNBALANCEREADS = CEPH_OSD_OP_MODE_SUB | 4, - CEPH_OSD_OP_SCRUB = CEPH_OSD_OP_MODE_SUB | 5, - CEPH_OSD_OP_SCRUB_RESERVE = CEPH_OSD_OP_MODE_SUB | 6, - CEPH_OSD_OP_SCRUB_UNRESERVE = CEPH_OSD_OP_MODE_SUB | 7, - CEPH_OSD_OP_SCRUB_STOP = CEPH_OSD_OP_MODE_SUB | 8, - - /** lock **/ - CEPH_OSD_OP_WRLOCK = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_LOCK | 1, - CEPH_OSD_OP_WRUNLOCK = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_LOCK | 2, - CEPH_OSD_OP_RDLOCK = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_LOCK | 3, - CEPH_OSD_OP_RDUNLOCK = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_LOCK | 4, - CEPH_OSD_OP_UPLOCK = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_LOCK | 5, - CEPH_OSD_OP_DNLOCK = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_LOCK | 6, - - /** exec **/ - CEPH_OSD_OP_CALL = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_EXEC | 1, - - /** pg **/ - CEPH_OSD_OP_PGLS = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_PG | 1, -}; - -static inline int ceph_osd_op_type_lock(int op) -{ - return (op & CEPH_OSD_OP_TYPE) == CEPH_OSD_OP_TYPE_LOCK; -} -static inline int ceph_osd_op_type_data(int op) -{ - return (op & CEPH_OSD_OP_TYPE) == CEPH_OSD_OP_TYPE_DATA; -} -static inline int ceph_osd_op_type_attr(int op) -{ - return (op & CEPH_OSD_OP_TYPE) == CEPH_OSD_OP_TYPE_ATTR; -} -static inline int ceph_osd_op_type_exec(int op) -{ - return (op & CEPH_OSD_OP_TYPE) == CEPH_OSD_OP_TYPE_EXEC; -} -static inline int ceph_osd_op_type_pg(int op) -{ - return (op & CEPH_OSD_OP_TYPE) == CEPH_OSD_OP_TYPE_PG; -} - -static inline int ceph_osd_op_mode_subop(int op) -{ - return (op & CEPH_OSD_OP_MODE) == CEPH_OSD_OP_MODE_SUB; -} -static inline int ceph_osd_op_mode_read(int op) -{ - return (op & CEPH_OSD_OP_MODE) == CEPH_OSD_OP_MODE_RD; -} -static inline int ceph_osd_op_mode_modify(int op) -{ - return (op & CEPH_OSD_OP_MODE) == CEPH_OSD_OP_MODE_WR; -} - -/* - * note that the following tmap stuff is also defined in the ceph librados.h - * any modification here needs to be updated there - */ -#define CEPH_OSD_TMAP_HDR 'h' -#define CEPH_OSD_TMAP_SET 's' -#define CEPH_OSD_TMAP_RM 'r' - -extern const char *ceph_osd_op_name(int op); - - -/* - * osd op flags - * - * An op may be READ, WRITE, or READ|WRITE. - */ -enum { - CEPH_OSD_FLAG_ACK = 1, /* want (or is) "ack" ack */ - CEPH_OSD_FLAG_ONNVRAM = 2, /* want (or is) "onnvram" ack */ - CEPH_OSD_FLAG_ONDISK = 4, /* want (or is) "ondisk" ack */ - CEPH_OSD_FLAG_RETRY = 8, /* resend attempt */ - CEPH_OSD_FLAG_READ = 16, /* op may read */ - CEPH_OSD_FLAG_WRITE = 32, /* op may write */ - CEPH_OSD_FLAG_ORDERSNAP = 64, /* EOLDSNAP if snapc is out of order */ - CEPH_OSD_FLAG_PEERSTAT = 128, /* msg includes osd_peer_stat */ - CEPH_OSD_FLAG_BALANCE_READS = 256, - CEPH_OSD_FLAG_PARALLELEXEC = 512, /* execute op in parallel */ - CEPH_OSD_FLAG_PGOP = 1024, /* pg op, no object */ - CEPH_OSD_FLAG_EXEC = 2048, /* op may exec */ - CEPH_OSD_FLAG_EXEC_PUBLIC = 4096, /* op may exec (public) */ -}; - -enum { - CEPH_OSD_OP_FLAG_EXCL = 1, /* EXCL object create */ -}; - -#define EOLDSNAPC ERESTART /* ORDERSNAP flag set; writer has old snapc*/ -#define EBLACKLISTED ESHUTDOWN /* blacklisted */ - -/* xattr comparison */ -enum { - CEPH_OSD_CMPXATTR_OP_EQ = 1, - CEPH_OSD_CMPXATTR_OP_NE = 2, - CEPH_OSD_CMPXATTR_OP_GT = 3, - CEPH_OSD_CMPXATTR_OP_GTE = 4, - CEPH_OSD_CMPXATTR_OP_LT = 5, - CEPH_OSD_CMPXATTR_OP_LTE = 6 -}; - -enum { - CEPH_OSD_CMPXATTR_MODE_STRING = 1, - CEPH_OSD_CMPXATTR_MODE_U64 = 2 -}; - -#define RADOS_NOTIFY_VER 1 - -/* - * an individual object operation. each may be accompanied by some data - * payload - */ -struct ceph_osd_op { - __le16 op; /* CEPH_OSD_OP_* */ - __le32 flags; /* CEPH_OSD_FLAG_* */ - union { - struct { - __le64 offset, length; - __le64 truncate_size; - __le32 truncate_seq; - } __attribute__ ((packed)) extent; - struct { - __le32 name_len; - __le32 value_len; - __u8 cmp_op; /* CEPH_OSD_CMPXATTR_OP_* */ - __u8 cmp_mode; /* CEPH_OSD_CMPXATTR_MODE_* */ - } __attribute__ ((packed)) xattr; - struct { - __u8 class_len; - __u8 method_len; - __u8 argc; - __le32 indata_len; - } __attribute__ ((packed)) cls; - struct { - __le64 cookie, count; - } __attribute__ ((packed)) pgls; - struct { - __le64 snapid; - } __attribute__ ((packed)) snap; - struct { - __le64 cookie; - __le64 ver; - __u8 flag; /* 0 = unwatch, 1 = watch */ - } __attribute__ ((packed)) watch; -}; - __le32 payload_len; -} __attribute__ ((packed)); - -/* - * osd request message header. each request may include multiple - * ceph_osd_op object operations. - */ -struct ceph_osd_request_head { - __le32 client_inc; /* client incarnation */ - struct ceph_object_layout layout; /* pgid */ - __le32 osdmap_epoch; /* client's osdmap epoch */ - - __le32 flags; - - struct ceph_timespec mtime; /* for mutations only */ - struct ceph_eversion reassert_version; /* if we are replaying op */ - - __le32 object_len; /* length of object name */ - - __le64 snapid; /* snapid to read */ - __le64 snap_seq; /* writer's snap context */ - __le32 num_snaps; - - __le16 num_ops; - struct ceph_osd_op ops[]; /* followed by ops[], obj, ticket, snaps */ -} __attribute__ ((packed)); - -struct ceph_osd_reply_head { - __le32 client_inc; /* client incarnation */ - __le32 flags; - struct ceph_object_layout layout; - __le32 osdmap_epoch; - struct ceph_eversion reassert_version; /* for replaying uncommitted */ - - __le32 result; /* result code */ - - __le32 object_len; /* length of object name */ - __le32 num_ops; - struct ceph_osd_op ops[0]; /* ops[], object */ -} __attribute__ ((packed)); - - - -#endif diff --git a/wireshark/ceph/sctp_crc32.c b/wireshark/ceph/sctp_crc32.c deleted file mode 100644 index 1385834fdff3..000000000000 --- a/wireshark/ceph/sctp_crc32.c +++ /dev/null @@ -1,737 +0,0 @@ -/*- - * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * a) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * b) Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the distribution. - * - * c) Neither the name of Cisco Systems, Inc. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* $KAME: sctp_crc32.c,v 1.12 2005/03/06 16:04:17 itojun Exp $ */ - - -#include -#if 0 -__FBSDID("$FreeBSD: src/sys/netinet/sctp_crc32.c,v 1.8 2007/05/08 17:01:10 rrs Exp $"); - - -#include -#include -#endif - -#include - -#if defined(__FreeBSD__) -#include -#else -#include -#endif - -#ifndef SCTP_USE_ADLER32 - - -/** - * - * Routine Description: - * - * Computes the CRC32c checksum for the specified buffer using the slicing by 8 - * algorithm over 64 bit quantities. - * - * Arguments: - * - * p_running_crc - pointer to the initial or final remainder value - * used in CRC computations. It should be set to - * non-NULL if the mode argument is equal to CONT or END - * p_buf - the packet buffer where crc computations are being performed - * length - the length of p_buf in bytes - * init_bytes - the number of initial bytes that need to be procesed before - * aligning p_buf to multiples of 4 bytes - * mode - can be any of the following: BEGIN, CONT, END, BODY, ALIGN - * - * Return value: - * - * The computed CRC32c value - */ - - -/* - * Copyright (c) 2004-2006 Intel Corporation - All Rights Reserved - * - * - * This software program is licensed subject to the BSD License, available at - * http://www.opensource.org/licenses/bsd-license.html. - * - * Abstract: - * - * Tables for software CRC generation - */ - -/* - * The following CRC lookup table was generated automagically using the - * following model parameters: - * - * Generator Polynomial = ................. 0x1EDC6F41 Generator Polynomial - * Length = .......... 32 bits Reflected Bits = ....................... TRUE - * Table Generation Offset = .............. 32 bits Number of Slices = - * ..................... 8 slices Slice Lengths = ........................ 8 - * 8 8 8 8 8 8 8 Directory Name = ....................... .\ File Name = - * ............................ 8x256_tables.c - */ - -uint32_t sctp_crc_tableil8_o32[256] = -{ - 0x00000000, 0xF26B8303, 0xE13B70F7, 0x1350F3F4, 0xC79A971F, 0x35F1141C, 0x26A1E7E8, 0xD4CA64EB, - 0x8AD958CF, 0x78B2DBCC, 0x6BE22838, 0x9989AB3B, 0x4D43CFD0, 0xBF284CD3, 0xAC78BF27, 0x5E133C24, - 0x105EC76F, 0xE235446C, 0xF165B798, 0x030E349B, 0xD7C45070, 0x25AFD373, 0x36FF2087, 0xC494A384, - 0x9A879FA0, 0x68EC1CA3, 0x7BBCEF57, 0x89D76C54, 0x5D1D08BF, 0xAF768BBC, 0xBC267848, 0x4E4DFB4B, - 0x20BD8EDE, 0xD2D60DDD, 0xC186FE29, 0x33ED7D2A, 0xE72719C1, 0x154C9AC2, 0x061C6936, 0xF477EA35, - 0xAA64D611, 0x580F5512, 0x4B5FA6E6, 0xB93425E5, 0x6DFE410E, 0x9F95C20D, 0x8CC531F9, 0x7EAEB2FA, - 0x30E349B1, 0xC288CAB2, 0xD1D83946, 0x23B3BA45, 0xF779DEAE, 0x05125DAD, 0x1642AE59, 0xE4292D5A, - 0xBA3A117E, 0x4851927D, 0x5B016189, 0xA96AE28A, 0x7DA08661, 0x8FCB0562, 0x9C9BF696, 0x6EF07595, - 0x417B1DBC, 0xB3109EBF, 0xA0406D4B, 0x522BEE48, 0x86E18AA3, 0x748A09A0, 0x67DAFA54, 0x95B17957, - 0xCBA24573, 0x39C9C670, 0x2A993584, 0xD8F2B687, 0x0C38D26C, 0xFE53516F, 0xED03A29B, 0x1F682198, - 0x5125DAD3, 0xA34E59D0, 0xB01EAA24, 0x42752927, 0x96BF4DCC, 0x64D4CECF, 0x77843D3B, 0x85EFBE38, - 0xDBFC821C, 0x2997011F, 0x3AC7F2EB, 0xC8AC71E8, 0x1C661503, 0xEE0D9600, 0xFD5D65F4, 0x0F36E6F7, - 0x61C69362, 0x93AD1061, 0x80FDE395, 0x72966096, 0xA65C047D, 0x5437877E, 0x4767748A, 0xB50CF789, - 0xEB1FCBAD, 0x197448AE, 0x0A24BB5A, 0xF84F3859, 0x2C855CB2, 0xDEEEDFB1, 0xCDBE2C45, 0x3FD5AF46, - 0x7198540D, 0x83F3D70E, 0x90A324FA, 0x62C8A7F9, 0xB602C312, 0x44694011, 0x5739B3E5, 0xA55230E6, - 0xFB410CC2, 0x092A8FC1, 0x1A7A7C35, 0xE811FF36, 0x3CDB9BDD, 0xCEB018DE, 0xDDE0EB2A, 0x2F8B6829, - 0x82F63B78, 0x709DB87B, 0x63CD4B8F, 0x91A6C88C, 0x456CAC67, 0xB7072F64, 0xA457DC90, 0x563C5F93, - 0x082F63B7, 0xFA44E0B4, 0xE9141340, 0x1B7F9043, 0xCFB5F4A8, 0x3DDE77AB, 0x2E8E845F, 0xDCE5075C, - 0x92A8FC17, 0x60C37F14, 0x73938CE0, 0x81F80FE3, 0x55326B08, 0xA759E80B, 0xB4091BFF, 0x466298FC, - 0x1871A4D8, 0xEA1A27DB, 0xF94AD42F, 0x0B21572C, 0xDFEB33C7, 0x2D80B0C4, 0x3ED04330, 0xCCBBC033, - 0xA24BB5A6, 0x502036A5, 0x4370C551, 0xB11B4652, 0x65D122B9, 0x97BAA1BA, 0x84EA524E, 0x7681D14D, - 0x2892ED69, 0xDAF96E6A, 0xC9A99D9E, 0x3BC21E9D, 0xEF087A76, 0x1D63F975, 0x0E330A81, 0xFC588982, - 0xB21572C9, 0x407EF1CA, 0x532E023E, 0xA145813D, 0x758FE5D6, 0x87E466D5, 0x94B49521, 0x66DF1622, - 0x38CC2A06, 0xCAA7A905, 0xD9F75AF1, 0x2B9CD9F2, 0xFF56BD19, 0x0D3D3E1A, 0x1E6DCDEE, 0xEC064EED, - 0xC38D26C4, 0x31E6A5C7, 0x22B65633, 0xD0DDD530, 0x0417B1DB, 0xF67C32D8, 0xE52CC12C, 0x1747422F, - 0x49547E0B, 0xBB3FFD08, 0xA86F0EFC, 0x5A048DFF, 0x8ECEE914, 0x7CA56A17, 0x6FF599E3, 0x9D9E1AE0, - 0xD3D3E1AB, 0x21B862A8, 0x32E8915C, 0xC083125F, 0x144976B4, 0xE622F5B7, 0xF5720643, 0x07198540, - 0x590AB964, 0xAB613A67, 0xB831C993, 0x4A5A4A90, 0x9E902E7B, 0x6CFBAD78, 0x7FAB5E8C, 0x8DC0DD8F, - 0xE330A81A, 0x115B2B19, 0x020BD8ED, 0xF0605BEE, 0x24AA3F05, 0xD6C1BC06, 0xC5914FF2, 0x37FACCF1, - 0x69E9F0D5, 0x9B8273D6, 0x88D28022, 0x7AB90321, 0xAE7367CA, 0x5C18E4C9, 0x4F48173D, 0xBD23943E, - 0xF36E6F75, 0x0105EC76, 0x12551F82, 0xE03E9C81, 0x34F4F86A, 0xC69F7B69, 0xD5CF889D, 0x27A40B9E, - 0x79B737BA, 0x8BDCB4B9, 0x988C474D, 0x6AE7C44E, 0xBE2DA0A5, 0x4C4623A6, 0x5F16D052, 0xAD7D5351 -}; - -/* - * end of the CRC lookup table crc_tableil8_o32 - */ - - - -/* - * The following CRC lookup table was generated automagically using the - * following model parameters: - * - * Generator Polynomial = ................. 0x1EDC6F41 Generator Polynomial - * Length = .......... 32 bits Reflected Bits = ....................... TRUE - * Table Generation Offset = .............. 32 bits Number of Slices = - * ..................... 8 slices Slice Lengths = ........................ 8 - * 8 8 8 8 8 8 8 Directory Name = ....................... .\ File Name = - * ............................ 8x256_tables.c - */ - -uint32_t sctp_crc_tableil8_o40[256] = -{ - 0x00000000, 0x13A29877, 0x274530EE, 0x34E7A899, 0x4E8A61DC, 0x5D28F9AB, 0x69CF5132, 0x7A6DC945, - 0x9D14C3B8, 0x8EB65BCF, 0xBA51F356, 0xA9F36B21, 0xD39EA264, 0xC03C3A13, 0xF4DB928A, 0xE7790AFD, - 0x3FC5F181, 0x2C6769F6, 0x1880C16F, 0x0B225918, 0x714F905D, 0x62ED082A, 0x560AA0B3, 0x45A838C4, - 0xA2D13239, 0xB173AA4E, 0x859402D7, 0x96369AA0, 0xEC5B53E5, 0xFFF9CB92, 0xCB1E630B, 0xD8BCFB7C, - 0x7F8BE302, 0x6C297B75, 0x58CED3EC, 0x4B6C4B9B, 0x310182DE, 0x22A31AA9, 0x1644B230, 0x05E62A47, - 0xE29F20BA, 0xF13DB8CD, 0xC5DA1054, 0xD6788823, 0xAC154166, 0xBFB7D911, 0x8B507188, 0x98F2E9FF, - 0x404E1283, 0x53EC8AF4, 0x670B226D, 0x74A9BA1A, 0x0EC4735F, 0x1D66EB28, 0x298143B1, 0x3A23DBC6, - 0xDD5AD13B, 0xCEF8494C, 0xFA1FE1D5, 0xE9BD79A2, 0x93D0B0E7, 0x80722890, 0xB4958009, 0xA737187E, - 0xFF17C604, 0xECB55E73, 0xD852F6EA, 0xCBF06E9D, 0xB19DA7D8, 0xA23F3FAF, 0x96D89736, 0x857A0F41, - 0x620305BC, 0x71A19DCB, 0x45463552, 0x56E4AD25, 0x2C896460, 0x3F2BFC17, 0x0BCC548E, 0x186ECCF9, - 0xC0D23785, 0xD370AFF2, 0xE797076B, 0xF4359F1C, 0x8E585659, 0x9DFACE2E, 0xA91D66B7, 0xBABFFEC0, - 0x5DC6F43D, 0x4E646C4A, 0x7A83C4D3, 0x69215CA4, 0x134C95E1, 0x00EE0D96, 0x3409A50F, 0x27AB3D78, - 0x809C2506, 0x933EBD71, 0xA7D915E8, 0xB47B8D9F, 0xCE1644DA, 0xDDB4DCAD, 0xE9537434, 0xFAF1EC43, - 0x1D88E6BE, 0x0E2A7EC9, 0x3ACDD650, 0x296F4E27, 0x53028762, 0x40A01F15, 0x7447B78C, 0x67E52FFB, - 0xBF59D487, 0xACFB4CF0, 0x981CE469, 0x8BBE7C1E, 0xF1D3B55B, 0xE2712D2C, 0xD69685B5, 0xC5341DC2, - 0x224D173F, 0x31EF8F48, 0x050827D1, 0x16AABFA6, 0x6CC776E3, 0x7F65EE94, 0x4B82460D, 0x5820DE7A, - 0xFBC3FAF9, 0xE861628E, 0xDC86CA17, 0xCF245260, 0xB5499B25, 0xA6EB0352, 0x920CABCB, 0x81AE33BC, - 0x66D73941, 0x7575A136, 0x419209AF, 0x523091D8, 0x285D589D, 0x3BFFC0EA, 0x0F186873, 0x1CBAF004, - 0xC4060B78, 0xD7A4930F, 0xE3433B96, 0xF0E1A3E1, 0x8A8C6AA4, 0x992EF2D3, 0xADC95A4A, 0xBE6BC23D, - 0x5912C8C0, 0x4AB050B7, 0x7E57F82E, 0x6DF56059, 0x1798A91C, 0x043A316B, 0x30DD99F2, 0x237F0185, - 0x844819FB, 0x97EA818C, 0xA30D2915, 0xB0AFB162, 0xCAC27827, 0xD960E050, 0xED8748C9, 0xFE25D0BE, - 0x195CDA43, 0x0AFE4234, 0x3E19EAAD, 0x2DBB72DA, 0x57D6BB9F, 0x447423E8, 0x70938B71, 0x63311306, - 0xBB8DE87A, 0xA82F700D, 0x9CC8D894, 0x8F6A40E3, 0xF50789A6, 0xE6A511D1, 0xD242B948, 0xC1E0213F, - 0x26992BC2, 0x353BB3B5, 0x01DC1B2C, 0x127E835B, 0x68134A1E, 0x7BB1D269, 0x4F567AF0, 0x5CF4E287, - 0x04D43CFD, 0x1776A48A, 0x23910C13, 0x30339464, 0x4A5E5D21, 0x59FCC556, 0x6D1B6DCF, 0x7EB9F5B8, - 0x99C0FF45, 0x8A626732, 0xBE85CFAB, 0xAD2757DC, 0xD74A9E99, 0xC4E806EE, 0xF00FAE77, 0xE3AD3600, - 0x3B11CD7C, 0x28B3550B, 0x1C54FD92, 0x0FF665E5, 0x759BACA0, 0x663934D7, 0x52DE9C4E, 0x417C0439, - 0xA6050EC4, 0xB5A796B3, 0x81403E2A, 0x92E2A65D, 0xE88F6F18, 0xFB2DF76F, 0xCFCA5FF6, 0xDC68C781, - 0x7B5FDFFF, 0x68FD4788, 0x5C1AEF11, 0x4FB87766, 0x35D5BE23, 0x26772654, 0x12908ECD, 0x013216BA, - 0xE64B1C47, 0xF5E98430, 0xC10E2CA9, 0xD2ACB4DE, 0xA8C17D9B, 0xBB63E5EC, 0x8F844D75, 0x9C26D502, - 0x449A2E7E, 0x5738B609, 0x63DF1E90, 0x707D86E7, 0x0A104FA2, 0x19B2D7D5, 0x2D557F4C, 0x3EF7E73B, - 0xD98EEDC6, 0xCA2C75B1, 0xFECBDD28, 0xED69455F, 0x97048C1A, 0x84A6146D, 0xB041BCF4, 0xA3E32483 -}; - -/* - * end of the CRC lookup table crc_tableil8_o40 - */ - - - -/* - * The following CRC lookup table was generated automagically using the - * following model parameters: - * - * Generator Polynomial = ................. 0x1EDC6F41 Generator Polynomial - * Length = .......... 32 bits Reflected Bits = ....................... TRUE - * Table Generation Offset = .............. 32 bits Number of Slices = - * ..................... 8 slices Slice Lengths = ........................ 8 - * 8 8 8 8 8 8 8 Directory Name = ....................... .\ File Name = - * ............................ 8x256_tables.c - */ - -uint32_t sctp_crc_tableil8_o48[256] = -{ - 0x00000000, 0xA541927E, 0x4F6F520D, 0xEA2EC073, 0x9EDEA41A, 0x3B9F3664, 0xD1B1F617, 0x74F06469, - 0x38513EC5, 0x9D10ACBB, 0x773E6CC8, 0xD27FFEB6, 0xA68F9ADF, 0x03CE08A1, 0xE9E0C8D2, 0x4CA15AAC, - 0x70A27D8A, 0xD5E3EFF4, 0x3FCD2F87, 0x9A8CBDF9, 0xEE7CD990, 0x4B3D4BEE, 0xA1138B9D, 0x045219E3, - 0x48F3434F, 0xEDB2D131, 0x079C1142, 0xA2DD833C, 0xD62DE755, 0x736C752B, 0x9942B558, 0x3C032726, - 0xE144FB14, 0x4405696A, 0xAE2BA919, 0x0B6A3B67, 0x7F9A5F0E, 0xDADBCD70, 0x30F50D03, 0x95B49F7D, - 0xD915C5D1, 0x7C5457AF, 0x967A97DC, 0x333B05A2, 0x47CB61CB, 0xE28AF3B5, 0x08A433C6, 0xADE5A1B8, - 0x91E6869E, 0x34A714E0, 0xDE89D493, 0x7BC846ED, 0x0F382284, 0xAA79B0FA, 0x40577089, 0xE516E2F7, - 0xA9B7B85B, 0x0CF62A25, 0xE6D8EA56, 0x43997828, 0x37691C41, 0x92288E3F, 0x78064E4C, 0xDD47DC32, - 0xC76580D9, 0x622412A7, 0x880AD2D4, 0x2D4B40AA, 0x59BB24C3, 0xFCFAB6BD, 0x16D476CE, 0xB395E4B0, - 0xFF34BE1C, 0x5A752C62, 0xB05BEC11, 0x151A7E6F, 0x61EA1A06, 0xC4AB8878, 0x2E85480B, 0x8BC4DA75, - 0xB7C7FD53, 0x12866F2D, 0xF8A8AF5E, 0x5DE93D20, 0x29195949, 0x8C58CB37, 0x66760B44, 0xC337993A, - 0x8F96C396, 0x2AD751E8, 0xC0F9919B, 0x65B803E5, 0x1148678C, 0xB409F5F2, 0x5E273581, 0xFB66A7FF, - 0x26217BCD, 0x8360E9B3, 0x694E29C0, 0xCC0FBBBE, 0xB8FFDFD7, 0x1DBE4DA9, 0xF7908DDA, 0x52D11FA4, - 0x1E704508, 0xBB31D776, 0x511F1705, 0xF45E857B, 0x80AEE112, 0x25EF736C, 0xCFC1B31F, 0x6A802161, - 0x56830647, 0xF3C29439, 0x19EC544A, 0xBCADC634, 0xC85DA25D, 0x6D1C3023, 0x8732F050, 0x2273622E, - 0x6ED23882, 0xCB93AAFC, 0x21BD6A8F, 0x84FCF8F1, 0xF00C9C98, 0x554D0EE6, 0xBF63CE95, 0x1A225CEB, - 0x8B277743, 0x2E66E53D, 0xC448254E, 0x6109B730, 0x15F9D359, 0xB0B84127, 0x5A968154, 0xFFD7132A, - 0xB3764986, 0x1637DBF8, 0xFC191B8B, 0x595889F5, 0x2DA8ED9C, 0x88E97FE2, 0x62C7BF91, 0xC7862DEF, - 0xFB850AC9, 0x5EC498B7, 0xB4EA58C4, 0x11ABCABA, 0x655BAED3, 0xC01A3CAD, 0x2A34FCDE, 0x8F756EA0, - 0xC3D4340C, 0x6695A672, 0x8CBB6601, 0x29FAF47F, 0x5D0A9016, 0xF84B0268, 0x1265C21B, 0xB7245065, - 0x6A638C57, 0xCF221E29, 0x250CDE5A, 0x804D4C24, 0xF4BD284D, 0x51FCBA33, 0xBBD27A40, 0x1E93E83E, - 0x5232B292, 0xF77320EC, 0x1D5DE09F, 0xB81C72E1, 0xCCEC1688, 0x69AD84F6, 0x83834485, 0x26C2D6FB, - 0x1AC1F1DD, 0xBF8063A3, 0x55AEA3D0, 0xF0EF31AE, 0x841F55C7, 0x215EC7B9, 0xCB7007CA, 0x6E3195B4, - 0x2290CF18, 0x87D15D66, 0x6DFF9D15, 0xC8BE0F6B, 0xBC4E6B02, 0x190FF97C, 0xF321390F, 0x5660AB71, - 0x4C42F79A, 0xE90365E4, 0x032DA597, 0xA66C37E9, 0xD29C5380, 0x77DDC1FE, 0x9DF3018D, 0x38B293F3, - 0x7413C95F, 0xD1525B21, 0x3B7C9B52, 0x9E3D092C, 0xEACD6D45, 0x4F8CFF3B, 0xA5A23F48, 0x00E3AD36, - 0x3CE08A10, 0x99A1186E, 0x738FD81D, 0xD6CE4A63, 0xA23E2E0A, 0x077FBC74, 0xED517C07, 0x4810EE79, - 0x04B1B4D5, 0xA1F026AB, 0x4BDEE6D8, 0xEE9F74A6, 0x9A6F10CF, 0x3F2E82B1, 0xD50042C2, 0x7041D0BC, - 0xAD060C8E, 0x08479EF0, 0xE2695E83, 0x4728CCFD, 0x33D8A894, 0x96993AEA, 0x7CB7FA99, 0xD9F668E7, - 0x9557324B, 0x3016A035, 0xDA386046, 0x7F79F238, 0x0B899651, 0xAEC8042F, 0x44E6C45C, 0xE1A75622, - 0xDDA47104, 0x78E5E37A, 0x92CB2309, 0x378AB177, 0x437AD51E, 0xE63B4760, 0x0C158713, 0xA954156D, - 0xE5F54FC1, 0x40B4DDBF, 0xAA9A1DCC, 0x0FDB8FB2, 0x7B2BEBDB, 0xDE6A79A5, 0x3444B9D6, 0x91052BA8 -}; - -/* - * end of the CRC lookup table crc_tableil8_o48 - */ - - - -/* - * The following CRC lookup table was generated automagically using the - * following model parameters: - * - * Generator Polynomial = ................. 0x1EDC6F41 Generator Polynomial - * Length = .......... 32 bits Reflected Bits = ....................... TRUE - * Table Generation Offset = .............. 32 bits Number of Slices = - * ..................... 8 slices Slice Lengths = ........................ 8 - * 8 8 8 8 8 8 8 Directory Name = ....................... .\ File Name = - * ............................ 8x256_tables.c - */ - -uint32_t sctp_crc_tableil8_o56[256] = -{ - 0x00000000, 0xDD45AAB8, 0xBF672381, 0x62228939, 0x7B2231F3, 0xA6679B4B, 0xC4451272, 0x1900B8CA, - 0xF64463E6, 0x2B01C95E, 0x49234067, 0x9466EADF, 0x8D665215, 0x5023F8AD, 0x32017194, 0xEF44DB2C, - 0xE964B13D, 0x34211B85, 0x560392BC, 0x8B463804, 0x924680CE, 0x4F032A76, 0x2D21A34F, 0xF06409F7, - 0x1F20D2DB, 0xC2657863, 0xA047F15A, 0x7D025BE2, 0x6402E328, 0xB9474990, 0xDB65C0A9, 0x06206A11, - 0xD725148B, 0x0A60BE33, 0x6842370A, 0xB5079DB2, 0xAC072578, 0x71428FC0, 0x136006F9, 0xCE25AC41, - 0x2161776D, 0xFC24DDD5, 0x9E0654EC, 0x4343FE54, 0x5A43469E, 0x8706EC26, 0xE524651F, 0x3861CFA7, - 0x3E41A5B6, 0xE3040F0E, 0x81268637, 0x5C632C8F, 0x45639445, 0x98263EFD, 0xFA04B7C4, 0x27411D7C, - 0xC805C650, 0x15406CE8, 0x7762E5D1, 0xAA274F69, 0xB327F7A3, 0x6E625D1B, 0x0C40D422, 0xD1057E9A, - 0xABA65FE7, 0x76E3F55F, 0x14C17C66, 0xC984D6DE, 0xD0846E14, 0x0DC1C4AC, 0x6FE34D95, 0xB2A6E72D, - 0x5DE23C01, 0x80A796B9, 0xE2851F80, 0x3FC0B538, 0x26C00DF2, 0xFB85A74A, 0x99A72E73, 0x44E284CB, - 0x42C2EEDA, 0x9F874462, 0xFDA5CD5B, 0x20E067E3, 0x39E0DF29, 0xE4A57591, 0x8687FCA8, 0x5BC25610, - 0xB4868D3C, 0x69C32784, 0x0BE1AEBD, 0xD6A40405, 0xCFA4BCCF, 0x12E11677, 0x70C39F4E, 0xAD8635F6, - 0x7C834B6C, 0xA1C6E1D4, 0xC3E468ED, 0x1EA1C255, 0x07A17A9F, 0xDAE4D027, 0xB8C6591E, 0x6583F3A6, - 0x8AC7288A, 0x57828232, 0x35A00B0B, 0xE8E5A1B3, 0xF1E51979, 0x2CA0B3C1, 0x4E823AF8, 0x93C79040, - 0x95E7FA51, 0x48A250E9, 0x2A80D9D0, 0xF7C57368, 0xEEC5CBA2, 0x3380611A, 0x51A2E823, 0x8CE7429B, - 0x63A399B7, 0xBEE6330F, 0xDCC4BA36, 0x0181108E, 0x1881A844, 0xC5C402FC, 0xA7E68BC5, 0x7AA3217D, - 0x52A0C93F, 0x8FE56387, 0xEDC7EABE, 0x30824006, 0x2982F8CC, 0xF4C75274, 0x96E5DB4D, 0x4BA071F5, - 0xA4E4AAD9, 0x79A10061, 0x1B838958, 0xC6C623E0, 0xDFC69B2A, 0x02833192, 0x60A1B8AB, 0xBDE41213, - 0xBBC47802, 0x6681D2BA, 0x04A35B83, 0xD9E6F13B, 0xC0E649F1, 0x1DA3E349, 0x7F816A70, 0xA2C4C0C8, - 0x4D801BE4, 0x90C5B15C, 0xF2E73865, 0x2FA292DD, 0x36A22A17, 0xEBE780AF, 0x89C50996, 0x5480A32E, - 0x8585DDB4, 0x58C0770C, 0x3AE2FE35, 0xE7A7548D, 0xFEA7EC47, 0x23E246FF, 0x41C0CFC6, 0x9C85657E, - 0x73C1BE52, 0xAE8414EA, 0xCCA69DD3, 0x11E3376B, 0x08E38FA1, 0xD5A62519, 0xB784AC20, 0x6AC10698, - 0x6CE16C89, 0xB1A4C631, 0xD3864F08, 0x0EC3E5B0, 0x17C35D7A, 0xCA86F7C2, 0xA8A47EFB, 0x75E1D443, - 0x9AA50F6F, 0x47E0A5D7, 0x25C22CEE, 0xF8878656, 0xE1873E9C, 0x3CC29424, 0x5EE01D1D, 0x83A5B7A5, - 0xF90696D8, 0x24433C60, 0x4661B559, 0x9B241FE1, 0x8224A72B, 0x5F610D93, 0x3D4384AA, 0xE0062E12, - 0x0F42F53E, 0xD2075F86, 0xB025D6BF, 0x6D607C07, 0x7460C4CD, 0xA9256E75, 0xCB07E74C, 0x16424DF4, - 0x106227E5, 0xCD278D5D, 0xAF050464, 0x7240AEDC, 0x6B401616, 0xB605BCAE, 0xD4273597, 0x09629F2F, - 0xE6264403, 0x3B63EEBB, 0x59416782, 0x8404CD3A, 0x9D0475F0, 0x4041DF48, 0x22635671, 0xFF26FCC9, - 0x2E238253, 0xF36628EB, 0x9144A1D2, 0x4C010B6A, 0x5501B3A0, 0x88441918, 0xEA669021, 0x37233A99, - 0xD867E1B5, 0x05224B0D, 0x6700C234, 0xBA45688C, 0xA345D046, 0x7E007AFE, 0x1C22F3C7, 0xC167597F, - 0xC747336E, 0x1A0299D6, 0x782010EF, 0xA565BA57, 0xBC65029D, 0x6120A825, 0x0302211C, 0xDE478BA4, - 0x31035088, 0xEC46FA30, 0x8E647309, 0x5321D9B1, 0x4A21617B, 0x9764CBC3, 0xF54642FA, 0x2803E842 -}; - -/* - * end of the CRC lookup table crc_tableil8_o56 - */ - - - -/* - * The following CRC lookup table was generated automagically using the - * following model parameters: - * - * Generator Polynomial = ................. 0x1EDC6F41 Generator Polynomial - * Length = .......... 32 bits Reflected Bits = ....................... TRUE - * Table Generation Offset = .............. 32 bits Number of Slices = - * ..................... 8 slices Slice Lengths = ........................ 8 - * 8 8 8 8 8 8 8 Directory Name = ....................... .\ File Name = - * ............................ 8x256_tables.c - */ - -uint32_t sctp_crc_tableil8_o64[256] = -{ - 0x00000000, 0x38116FAC, 0x7022DF58, 0x4833B0F4, 0xE045BEB0, 0xD854D11C, 0x906761E8, 0xA8760E44, - 0xC5670B91, 0xFD76643D, 0xB545D4C9, 0x8D54BB65, 0x2522B521, 0x1D33DA8D, 0x55006A79, 0x6D1105D5, - 0x8F2261D3, 0xB7330E7F, 0xFF00BE8B, 0xC711D127, 0x6F67DF63, 0x5776B0CF, 0x1F45003B, 0x27546F97, - 0x4A456A42, 0x725405EE, 0x3A67B51A, 0x0276DAB6, 0xAA00D4F2, 0x9211BB5E, 0xDA220BAA, 0xE2336406, - 0x1BA8B557, 0x23B9DAFB, 0x6B8A6A0F, 0x539B05A3, 0xFBED0BE7, 0xC3FC644B, 0x8BCFD4BF, 0xB3DEBB13, - 0xDECFBEC6, 0xE6DED16A, 0xAEED619E, 0x96FC0E32, 0x3E8A0076, 0x069B6FDA, 0x4EA8DF2E, 0x76B9B082, - 0x948AD484, 0xAC9BBB28, 0xE4A80BDC, 0xDCB96470, 0x74CF6A34, 0x4CDE0598, 0x04EDB56C, 0x3CFCDAC0, - 0x51EDDF15, 0x69FCB0B9, 0x21CF004D, 0x19DE6FE1, 0xB1A861A5, 0x89B90E09, 0xC18ABEFD, 0xF99BD151, - 0x37516AAE, 0x0F400502, 0x4773B5F6, 0x7F62DA5A, 0xD714D41E, 0xEF05BBB2, 0xA7360B46, 0x9F2764EA, - 0xF236613F, 0xCA270E93, 0x8214BE67, 0xBA05D1CB, 0x1273DF8F, 0x2A62B023, 0x625100D7, 0x5A406F7B, - 0xB8730B7D, 0x806264D1, 0xC851D425, 0xF040BB89, 0x5836B5CD, 0x6027DA61, 0x28146A95, 0x10050539, - 0x7D1400EC, 0x45056F40, 0x0D36DFB4, 0x3527B018, 0x9D51BE5C, 0xA540D1F0, 0xED736104, 0xD5620EA8, - 0x2CF9DFF9, 0x14E8B055, 0x5CDB00A1, 0x64CA6F0D, 0xCCBC6149, 0xF4AD0EE5, 0xBC9EBE11, 0x848FD1BD, - 0xE99ED468, 0xD18FBBC4, 0x99BC0B30, 0xA1AD649C, 0x09DB6AD8, 0x31CA0574, 0x79F9B580, 0x41E8DA2C, - 0xA3DBBE2A, 0x9BCAD186, 0xD3F96172, 0xEBE80EDE, 0x439E009A, 0x7B8F6F36, 0x33BCDFC2, 0x0BADB06E, - 0x66BCB5BB, 0x5EADDA17, 0x169E6AE3, 0x2E8F054F, 0x86F90B0B, 0xBEE864A7, 0xF6DBD453, 0xCECABBFF, - 0x6EA2D55C, 0x56B3BAF0, 0x1E800A04, 0x269165A8, 0x8EE76BEC, 0xB6F60440, 0xFEC5B4B4, 0xC6D4DB18, - 0xABC5DECD, 0x93D4B161, 0xDBE70195, 0xE3F66E39, 0x4B80607D, 0x73910FD1, 0x3BA2BF25, 0x03B3D089, - 0xE180B48F, 0xD991DB23, 0x91A26BD7, 0xA9B3047B, 0x01C50A3F, 0x39D46593, 0x71E7D567, 0x49F6BACB, - 0x24E7BF1E, 0x1CF6D0B2, 0x54C56046, 0x6CD40FEA, 0xC4A201AE, 0xFCB36E02, 0xB480DEF6, 0x8C91B15A, - 0x750A600B, 0x4D1B0FA7, 0x0528BF53, 0x3D39D0FF, 0x954FDEBB, 0xAD5EB117, 0xE56D01E3, 0xDD7C6E4F, - 0xB06D6B9A, 0x887C0436, 0xC04FB4C2, 0xF85EDB6E, 0x5028D52A, 0x6839BA86, 0x200A0A72, 0x181B65DE, - 0xFA2801D8, 0xC2396E74, 0x8A0ADE80, 0xB21BB12C, 0x1A6DBF68, 0x227CD0C4, 0x6A4F6030, 0x525E0F9C, - 0x3F4F0A49, 0x075E65E5, 0x4F6DD511, 0x777CBABD, 0xDF0AB4F9, 0xE71BDB55, 0xAF286BA1, 0x9739040D, - 0x59F3BFF2, 0x61E2D05E, 0x29D160AA, 0x11C00F06, 0xB9B60142, 0x81A76EEE, 0xC994DE1A, 0xF185B1B6, - 0x9C94B463, 0xA485DBCF, 0xECB66B3B, 0xD4A70497, 0x7CD10AD3, 0x44C0657F, 0x0CF3D58B, 0x34E2BA27, - 0xD6D1DE21, 0xEEC0B18D, 0xA6F30179, 0x9EE26ED5, 0x36946091, 0x0E850F3D, 0x46B6BFC9, 0x7EA7D065, - 0x13B6D5B0, 0x2BA7BA1C, 0x63940AE8, 0x5B856544, 0xF3F36B00, 0xCBE204AC, 0x83D1B458, 0xBBC0DBF4, - 0x425B0AA5, 0x7A4A6509, 0x3279D5FD, 0x0A68BA51, 0xA21EB415, 0x9A0FDBB9, 0xD23C6B4D, 0xEA2D04E1, - 0x873C0134, 0xBF2D6E98, 0xF71EDE6C, 0xCF0FB1C0, 0x6779BF84, 0x5F68D028, 0x175B60DC, 0x2F4A0F70, - 0xCD796B76, 0xF56804DA, 0xBD5BB42E, 0x854ADB82, 0x2D3CD5C6, 0x152DBA6A, 0x5D1E0A9E, 0x650F6532, - 0x081E60E7, 0x300F0F4B, 0x783CBFBF, 0x402DD013, 0xE85BDE57, 0xD04AB1FB, 0x9879010F, 0xA0686EA3 -}; - -/* - * end of the CRC lookup table crc_tableil8_o64 - */ - - - -/* - * The following CRC lookup table was generated automagically using the - * following model parameters: - * - * Generator Polynomial = ................. 0x1EDC6F41 Generator Polynomial - * Length = .......... 32 bits Reflected Bits = ....................... TRUE - * Table Generation Offset = .............. 32 bits Number of Slices = - * ..................... 8 slices Slice Lengths = ........................ 8 - * 8 8 8 8 8 8 8 Directory Name = ....................... .\ File Name = - * ............................ 8x256_tables.c - */ - -uint32_t sctp_crc_tableil8_o72[256] = -{ - 0x00000000, 0xEF306B19, 0xDB8CA0C3, 0x34BCCBDA, 0xB2F53777, 0x5DC55C6E, 0x697997B4, 0x8649FCAD, - 0x6006181F, 0x8F367306, 0xBB8AB8DC, 0x54BAD3C5, 0xD2F32F68, 0x3DC34471, 0x097F8FAB, 0xE64FE4B2, - 0xC00C303E, 0x2F3C5B27, 0x1B8090FD, 0xF4B0FBE4, 0x72F90749, 0x9DC96C50, 0xA975A78A, 0x4645CC93, - 0xA00A2821, 0x4F3A4338, 0x7B8688E2, 0x94B6E3FB, 0x12FF1F56, 0xFDCF744F, 0xC973BF95, 0x2643D48C, - 0x85F4168D, 0x6AC47D94, 0x5E78B64E, 0xB148DD57, 0x370121FA, 0xD8314AE3, 0xEC8D8139, 0x03BDEA20, - 0xE5F20E92, 0x0AC2658B, 0x3E7EAE51, 0xD14EC548, 0x570739E5, 0xB83752FC, 0x8C8B9926, 0x63BBF23F, - 0x45F826B3, 0xAAC84DAA, 0x9E748670, 0x7144ED69, 0xF70D11C4, 0x183D7ADD, 0x2C81B107, 0xC3B1DA1E, - 0x25FE3EAC, 0xCACE55B5, 0xFE729E6F, 0x1142F576, 0x970B09DB, 0x783B62C2, 0x4C87A918, 0xA3B7C201, - 0x0E045BEB, 0xE13430F2, 0xD588FB28, 0x3AB89031, 0xBCF16C9C, 0x53C10785, 0x677DCC5F, 0x884DA746, - 0x6E0243F4, 0x813228ED, 0xB58EE337, 0x5ABE882E, 0xDCF77483, 0x33C71F9A, 0x077BD440, 0xE84BBF59, - 0xCE086BD5, 0x213800CC, 0x1584CB16, 0xFAB4A00F, 0x7CFD5CA2, 0x93CD37BB, 0xA771FC61, 0x48419778, - 0xAE0E73CA, 0x413E18D3, 0x7582D309, 0x9AB2B810, 0x1CFB44BD, 0xF3CB2FA4, 0xC777E47E, 0x28478F67, - 0x8BF04D66, 0x64C0267F, 0x507CEDA5, 0xBF4C86BC, 0x39057A11, 0xD6351108, 0xE289DAD2, 0x0DB9B1CB, - 0xEBF65579, 0x04C63E60, 0x307AF5BA, 0xDF4A9EA3, 0x5903620E, 0xB6330917, 0x828FC2CD, 0x6DBFA9D4, - 0x4BFC7D58, 0xA4CC1641, 0x9070DD9B, 0x7F40B682, 0xF9094A2F, 0x16392136, 0x2285EAEC, 0xCDB581F5, - 0x2BFA6547, 0xC4CA0E5E, 0xF076C584, 0x1F46AE9D, 0x990F5230, 0x763F3929, 0x4283F2F3, 0xADB399EA, - 0x1C08B7D6, 0xF338DCCF, 0xC7841715, 0x28B47C0C, 0xAEFD80A1, 0x41CDEBB8, 0x75712062, 0x9A414B7B, - 0x7C0EAFC9, 0x933EC4D0, 0xA7820F0A, 0x48B26413, 0xCEFB98BE, 0x21CBF3A7, 0x1577387D, 0xFA475364, - 0xDC0487E8, 0x3334ECF1, 0x0788272B, 0xE8B84C32, 0x6EF1B09F, 0x81C1DB86, 0xB57D105C, 0x5A4D7B45, - 0xBC029FF7, 0x5332F4EE, 0x678E3F34, 0x88BE542D, 0x0EF7A880, 0xE1C7C399, 0xD57B0843, 0x3A4B635A, - 0x99FCA15B, 0x76CCCA42, 0x42700198, 0xAD406A81, 0x2B09962C, 0xC439FD35, 0xF08536EF, 0x1FB55DF6, - 0xF9FAB944, 0x16CAD25D, 0x22761987, 0xCD46729E, 0x4B0F8E33, 0xA43FE52A, 0x90832EF0, 0x7FB345E9, - 0x59F09165, 0xB6C0FA7C, 0x827C31A6, 0x6D4C5ABF, 0xEB05A612, 0x0435CD0B, 0x308906D1, 0xDFB96DC8, - 0x39F6897A, 0xD6C6E263, 0xE27A29B9, 0x0D4A42A0, 0x8B03BE0D, 0x6433D514, 0x508F1ECE, 0xBFBF75D7, - 0x120CEC3D, 0xFD3C8724, 0xC9804CFE, 0x26B027E7, 0xA0F9DB4A, 0x4FC9B053, 0x7B757B89, 0x94451090, - 0x720AF422, 0x9D3A9F3B, 0xA98654E1, 0x46B63FF8, 0xC0FFC355, 0x2FCFA84C, 0x1B736396, 0xF443088F, - 0xD200DC03, 0x3D30B71A, 0x098C7CC0, 0xE6BC17D9, 0x60F5EB74, 0x8FC5806D, 0xBB794BB7, 0x544920AE, - 0xB206C41C, 0x5D36AF05, 0x698A64DF, 0x86BA0FC6, 0x00F3F36B, 0xEFC39872, 0xDB7F53A8, 0x344F38B1, - 0x97F8FAB0, 0x78C891A9, 0x4C745A73, 0xA344316A, 0x250DCDC7, 0xCA3DA6DE, 0xFE816D04, 0x11B1061D, - 0xF7FEE2AF, 0x18CE89B6, 0x2C72426C, 0xC3422975, 0x450BD5D8, 0xAA3BBEC1, 0x9E87751B, 0x71B71E02, - 0x57F4CA8E, 0xB8C4A197, 0x8C786A4D, 0x63480154, 0xE501FDF9, 0x0A3196E0, 0x3E8D5D3A, 0xD1BD3623, - 0x37F2D291, 0xD8C2B988, 0xEC7E7252, 0x034E194B, 0x8507E5E6, 0x6A378EFF, 0x5E8B4525, 0xB1BB2E3C -}; - -/* - * end of the CRC lookup table crc_tableil8_o72 - */ - - - -/* - * The following CRC lookup table was generated automagically using the - * following model parameters: - * - * Generator Polynomial = ................. 0x1EDC6F41 Generator Polynomial - * Length = .......... 32 bits Reflected Bits = ....................... TRUE - * Table Generation Offset = .............. 32 bits Number of Slices = - * ..................... 8 slices Slice Lengths = ........................ 8 - * 8 8 8 8 8 8 8 Directory Name = ....................... .\ File Name = - * ............................ 8x256_tables.c - */ - -uint32_t sctp_crc_tableil8_o80[256] = -{ - 0x00000000, 0x68032CC8, 0xD0065990, 0xB8057558, 0xA5E0C5D1, 0xCDE3E919, 0x75E69C41, 0x1DE5B089, - 0x4E2DFD53, 0x262ED19B, 0x9E2BA4C3, 0xF628880B, 0xEBCD3882, 0x83CE144A, 0x3BCB6112, 0x53C84DDA, - 0x9C5BFAA6, 0xF458D66E, 0x4C5DA336, 0x245E8FFE, 0x39BB3F77, 0x51B813BF, 0xE9BD66E7, 0x81BE4A2F, - 0xD27607F5, 0xBA752B3D, 0x02705E65, 0x6A7372AD, 0x7796C224, 0x1F95EEEC, 0xA7909BB4, 0xCF93B77C, - 0x3D5B83BD, 0x5558AF75, 0xED5DDA2D, 0x855EF6E5, 0x98BB466C, 0xF0B86AA4, 0x48BD1FFC, 0x20BE3334, - 0x73767EEE, 0x1B755226, 0xA370277E, 0xCB730BB6, 0xD696BB3F, 0xBE9597F7, 0x0690E2AF, 0x6E93CE67, - 0xA100791B, 0xC90355D3, 0x7106208B, 0x19050C43, 0x04E0BCCA, 0x6CE39002, 0xD4E6E55A, 0xBCE5C992, - 0xEF2D8448, 0x872EA880, 0x3F2BDDD8, 0x5728F110, 0x4ACD4199, 0x22CE6D51, 0x9ACB1809, 0xF2C834C1, - 0x7AB7077A, 0x12B42BB2, 0xAAB15EEA, 0xC2B27222, 0xDF57C2AB, 0xB754EE63, 0x0F519B3B, 0x6752B7F3, - 0x349AFA29, 0x5C99D6E1, 0xE49CA3B9, 0x8C9F8F71, 0x917A3FF8, 0xF9791330, 0x417C6668, 0x297F4AA0, - 0xE6ECFDDC, 0x8EEFD114, 0x36EAA44C, 0x5EE98884, 0x430C380D, 0x2B0F14C5, 0x930A619D, 0xFB094D55, - 0xA8C1008F, 0xC0C22C47, 0x78C7591F, 0x10C475D7, 0x0D21C55E, 0x6522E996, 0xDD279CCE, 0xB524B006, - 0x47EC84C7, 0x2FEFA80F, 0x97EADD57, 0xFFE9F19F, 0xE20C4116, 0x8A0F6DDE, 0x320A1886, 0x5A09344E, - 0x09C17994, 0x61C2555C, 0xD9C72004, 0xB1C40CCC, 0xAC21BC45, 0xC422908D, 0x7C27E5D5, 0x1424C91D, - 0xDBB77E61, 0xB3B452A9, 0x0BB127F1, 0x63B20B39, 0x7E57BBB0, 0x16549778, 0xAE51E220, 0xC652CEE8, - 0x959A8332, 0xFD99AFFA, 0x459CDAA2, 0x2D9FF66A, 0x307A46E3, 0x58796A2B, 0xE07C1F73, 0x887F33BB, - 0xF56E0EF4, 0x9D6D223C, 0x25685764, 0x4D6B7BAC, 0x508ECB25, 0x388DE7ED, 0x808892B5, 0xE88BBE7D, - 0xBB43F3A7, 0xD340DF6F, 0x6B45AA37, 0x034686FF, 0x1EA33676, 0x76A01ABE, 0xCEA56FE6, 0xA6A6432E, - 0x6935F452, 0x0136D89A, 0xB933ADC2, 0xD130810A, 0xCCD53183, 0xA4D61D4B, 0x1CD36813, 0x74D044DB, - 0x27180901, 0x4F1B25C9, 0xF71E5091, 0x9F1D7C59, 0x82F8CCD0, 0xEAFBE018, 0x52FE9540, 0x3AFDB988, - 0xC8358D49, 0xA036A181, 0x1833D4D9, 0x7030F811, 0x6DD54898, 0x05D66450, 0xBDD31108, 0xD5D03DC0, - 0x8618701A, 0xEE1B5CD2, 0x561E298A, 0x3E1D0542, 0x23F8B5CB, 0x4BFB9903, 0xF3FEEC5B, 0x9BFDC093, - 0x546E77EF, 0x3C6D5B27, 0x84682E7F, 0xEC6B02B7, 0xF18EB23E, 0x998D9EF6, 0x2188EBAE, 0x498BC766, - 0x1A438ABC, 0x7240A674, 0xCA45D32C, 0xA246FFE4, 0xBFA34F6D, 0xD7A063A5, 0x6FA516FD, 0x07A63A35, - 0x8FD9098E, 0xE7DA2546, 0x5FDF501E, 0x37DC7CD6, 0x2A39CC5F, 0x423AE097, 0xFA3F95CF, 0x923CB907, - 0xC1F4F4DD, 0xA9F7D815, 0x11F2AD4D, 0x79F18185, 0x6414310C, 0x0C171DC4, 0xB412689C, 0xDC114454, - 0x1382F328, 0x7B81DFE0, 0xC384AAB8, 0xAB878670, 0xB66236F9, 0xDE611A31, 0x66646F69, 0x0E6743A1, - 0x5DAF0E7B, 0x35AC22B3, 0x8DA957EB, 0xE5AA7B23, 0xF84FCBAA, 0x904CE762, 0x2849923A, 0x404ABEF2, - 0xB2828A33, 0xDA81A6FB, 0x6284D3A3, 0x0A87FF6B, 0x17624FE2, 0x7F61632A, 0xC7641672, 0xAF673ABA, - 0xFCAF7760, 0x94AC5BA8, 0x2CA92EF0, 0x44AA0238, 0x594FB2B1, 0x314C9E79, 0x8949EB21, 0xE14AC7E9, - 0x2ED97095, 0x46DA5C5D, 0xFEDF2905, 0x96DC05CD, 0x8B39B544, 0xE33A998C, 0x5B3FECD4, 0x333CC01C, - 0x60F48DC6, 0x08F7A10E, 0xB0F2D456, 0xD8F1F89E, 0xC5144817, 0xAD1764DF, 0x15121187, 0x7D113D4F -}; - -/* - * end of the CRC lookup table crc_tableil8_o80 - */ - - - -/* - * The following CRC lookup table was generated automagically using the - * following model parameters: - * - * Generator Polynomial = ................. 0x1EDC6F41 Generator Polynomial - * Length = .......... 32 bits Reflected Bits = ....................... TRUE - * Table Generation Offset = .............. 32 bits Number of Slices = - * ..................... 8 slices Slice Lengths = ........................ 8 - * 8 8 8 8 8 8 8 Directory Name = ....................... .\ File Name = - * ............................ 8x256_tables.c - */ - -uint32_t sctp_crc_tableil8_o88[256] = -{ - 0x00000000, 0x493C7D27, 0x9278FA4E, 0xDB448769, 0x211D826D, 0x6821FF4A, 0xB3657823, 0xFA590504, - 0x423B04DA, 0x0B0779FD, 0xD043FE94, 0x997F83B3, 0x632686B7, 0x2A1AFB90, 0xF15E7CF9, 0xB86201DE, - 0x847609B4, 0xCD4A7493, 0x160EF3FA, 0x5F328EDD, 0xA56B8BD9, 0xEC57F6FE, 0x37137197, 0x7E2F0CB0, - 0xC64D0D6E, 0x8F717049, 0x5435F720, 0x1D098A07, 0xE7508F03, 0xAE6CF224, 0x7528754D, 0x3C14086A, - 0x0D006599, 0x443C18BE, 0x9F789FD7, 0xD644E2F0, 0x2C1DE7F4, 0x65219AD3, 0xBE651DBA, 0xF759609D, - 0x4F3B6143, 0x06071C64, 0xDD439B0D, 0x947FE62A, 0x6E26E32E, 0x271A9E09, 0xFC5E1960, 0xB5626447, - 0x89766C2D, 0xC04A110A, 0x1B0E9663, 0x5232EB44, 0xA86BEE40, 0xE1579367, 0x3A13140E, 0x732F6929, - 0xCB4D68F7, 0x827115D0, 0x593592B9, 0x1009EF9E, 0xEA50EA9A, 0xA36C97BD, 0x782810D4, 0x31146DF3, - 0x1A00CB32, 0x533CB615, 0x8878317C, 0xC1444C5B, 0x3B1D495F, 0x72213478, 0xA965B311, 0xE059CE36, - 0x583BCFE8, 0x1107B2CF, 0xCA4335A6, 0x837F4881, 0x79264D85, 0x301A30A2, 0xEB5EB7CB, 0xA262CAEC, - 0x9E76C286, 0xD74ABFA1, 0x0C0E38C8, 0x453245EF, 0xBF6B40EB, 0xF6573DCC, 0x2D13BAA5, 0x642FC782, - 0xDC4DC65C, 0x9571BB7B, 0x4E353C12, 0x07094135, 0xFD504431, 0xB46C3916, 0x6F28BE7F, 0x2614C358, - 0x1700AEAB, 0x5E3CD38C, 0x857854E5, 0xCC4429C2, 0x361D2CC6, 0x7F2151E1, 0xA465D688, 0xED59ABAF, - 0x553BAA71, 0x1C07D756, 0xC743503F, 0x8E7F2D18, 0x7426281C, 0x3D1A553B, 0xE65ED252, 0xAF62AF75, - 0x9376A71F, 0xDA4ADA38, 0x010E5D51, 0x48322076, 0xB26B2572, 0xFB575855, 0x2013DF3C, 0x692FA21B, - 0xD14DA3C5, 0x9871DEE2, 0x4335598B, 0x0A0924AC, 0xF05021A8, 0xB96C5C8F, 0x6228DBE6, 0x2B14A6C1, - 0x34019664, 0x7D3DEB43, 0xA6796C2A, 0xEF45110D, 0x151C1409, 0x5C20692E, 0x8764EE47, 0xCE589360, - 0x763A92BE, 0x3F06EF99, 0xE44268F0, 0xAD7E15D7, 0x572710D3, 0x1E1B6DF4, 0xC55FEA9D, 0x8C6397BA, - 0xB0779FD0, 0xF94BE2F7, 0x220F659E, 0x6B3318B9, 0x916A1DBD, 0xD856609A, 0x0312E7F3, 0x4A2E9AD4, - 0xF24C9B0A, 0xBB70E62D, 0x60346144, 0x29081C63, 0xD3511967, 0x9A6D6440, 0x4129E329, 0x08159E0E, - 0x3901F3FD, 0x703D8EDA, 0xAB7909B3, 0xE2457494, 0x181C7190, 0x51200CB7, 0x8A648BDE, 0xC358F6F9, - 0x7B3AF727, 0x32068A00, 0xE9420D69, 0xA07E704E, 0x5A27754A, 0x131B086D, 0xC85F8F04, 0x8163F223, - 0xBD77FA49, 0xF44B876E, 0x2F0F0007, 0x66337D20, 0x9C6A7824, 0xD5560503, 0x0E12826A, 0x472EFF4D, - 0xFF4CFE93, 0xB67083B4, 0x6D3404DD, 0x240879FA, 0xDE517CFE, 0x976D01D9, 0x4C2986B0, 0x0515FB97, - 0x2E015D56, 0x673D2071, 0xBC79A718, 0xF545DA3F, 0x0F1CDF3B, 0x4620A21C, 0x9D642575, 0xD4585852, - 0x6C3A598C, 0x250624AB, 0xFE42A3C2, 0xB77EDEE5, 0x4D27DBE1, 0x041BA6C6, 0xDF5F21AF, 0x96635C88, - 0xAA7754E2, 0xE34B29C5, 0x380FAEAC, 0x7133D38B, 0x8B6AD68F, 0xC256ABA8, 0x19122CC1, 0x502E51E6, - 0xE84C5038, 0xA1702D1F, 0x7A34AA76, 0x3308D751, 0xC951D255, 0x806DAF72, 0x5B29281B, 0x1215553C, - 0x230138CF, 0x6A3D45E8, 0xB179C281, 0xF845BFA6, 0x021CBAA2, 0x4B20C785, 0x906440EC, 0xD9583DCB, - 0x613A3C15, 0x28064132, 0xF342C65B, 0xBA7EBB7C, 0x4027BE78, 0x091BC35F, 0xD25F4436, 0x9B633911, - 0xA777317B, 0xEE4B4C5C, 0x350FCB35, 0x7C33B612, 0x866AB316, 0xCF56CE31, 0x14124958, 0x5D2E347F, - 0xE54C35A1, 0xAC704886, 0x7734CFEF, 0x3E08B2C8, 0xC451B7CC, 0x8D6DCAEB, 0x56294D82, 0x1F1530A5 -}; - -/* - * end of the CRC lookup table crc_tableil8_o88 - */ - -static uint32_t -sctp_crc32c_sb8_64_bit(uint32_t crc, - unsigned char const *p_buf, - uint32_t length, - uint32_t offset) -{ - uint32_t li; - uint32_t term1, term2; - uint32_t running_length; - uint32_t end_bytes; - uint32_t init_bytes; - - init_bytes = (4-offset) & 0x3; - - if (init_bytes > length) - init_bytes = length; - - running_length = ((length - init_bytes) / 8) * 8; - end_bytes = length - init_bytes - running_length; - - for (li = 0; li < init_bytes; li++) - crc = sctp_crc_tableil8_o32[(crc ^ *p_buf++) & 0x000000FF] ^ - (crc >> 8); - for (li = 0; li < running_length / 8; li++) { -#if BYTE_ORDER == BIG_ENDIAN - crc ^= *p_buf++; - crc ^= (*p_buf++) << 8; - crc ^= (*p_buf++) << 16; - crc ^= (*p_buf++) << 24; -#else - crc ^= *(uint32_t *) p_buf; - p_buf += 4; -#endif - term1 = sctp_crc_tableil8_o88[crc & 0x000000FF] ^ - sctp_crc_tableil8_o80[(crc >> 8) & 0x000000FF]; - term2 = crc >> 16; - crc = term1 ^ - sctp_crc_tableil8_o72[term2 & 0x000000FF] ^ - sctp_crc_tableil8_o64[(term2 >> 8) & 0x000000FF]; - -#if BYTE_ORDER == BIG_ENDIAN - crc ^= sctp_crc_tableil8_o56[*p_buf++]; - crc ^= sctp_crc_tableil8_o48[*p_buf++]; - crc ^= sctp_crc_tableil8_o40[*p_buf++]; - crc ^= sctp_crc_tableil8_o32[*p_buf++]; -#else - term1 = sctp_crc_tableil8_o56[(*(uint32_t *) p_buf) & 0x000000FF] ^ - sctp_crc_tableil8_o48[((*(uint32_t *) p_buf) >> 8) & 0x000000FF]; - - term2 = (*(uint32_t *) p_buf) >> 16; - crc = crc ^ - term1 ^ - sctp_crc_tableil8_o40[term2 & 0x000000FF] ^ - sctp_crc_tableil8_o32[(term2 >> 8) & 0x000000FF]; - p_buf += 4; -#endif - } - for (li = 0; li < end_bytes; li++) - crc = sctp_crc_tableil8_o32[(crc ^ *p_buf++) & 0x000000FF] ^ - (crc >> 8); - return crc; -} - - -/** - * - * Routine Description: - * - * warms the tables - * - * Arguments: - * - * none - * - * Return value: - * - * none - */ -static uint32_t -update_crc32(uint32_t crc32c, - unsigned char const *buffer, - unsigned int length) -{ - uint32_t offset; - - if (length == 0) { - return (crc32c); - } - offset = ((uintptr_t) buffer) & 0x3; - return (sctp_crc32c_sb8_64_bit(crc32c, buffer, length, offset)); -} - -uint32_t sctp_crc_c[256] = { - 0x00000000, 0xF26B8303, 0xE13B70F7, 0x1350F3F4, - 0xC79A971F, 0x35F1141C, 0x26A1E7E8, 0xD4CA64EB, - 0x8AD958CF, 0x78B2DBCC, 0x6BE22838, 0x9989AB3B, - 0x4D43CFD0, 0xBF284CD3, 0xAC78BF27, 0x5E133C24, - 0x105EC76F, 0xE235446C, 0xF165B798, 0x030E349B, - 0xD7C45070, 0x25AFD373, 0x36FF2087, 0xC494A384, - 0x9A879FA0, 0x68EC1CA3, 0x7BBCEF57, 0x89D76C54, - 0x5D1D08BF, 0xAF768BBC, 0xBC267848, 0x4E4DFB4B, - 0x20BD8EDE, 0xD2D60DDD, 0xC186FE29, 0x33ED7D2A, - 0xE72719C1, 0x154C9AC2, 0x061C6936, 0xF477EA35, - 0xAA64D611, 0x580F5512, 0x4B5FA6E6, 0xB93425E5, - 0x6DFE410E, 0x9F95C20D, 0x8CC531F9, 0x7EAEB2FA, - 0x30E349B1, 0xC288CAB2, 0xD1D83946, 0x23B3BA45, - 0xF779DEAE, 0x05125DAD, 0x1642AE59, 0xE4292D5A, - 0xBA3A117E, 0x4851927D, 0x5B016189, 0xA96AE28A, - 0x7DA08661, 0x8FCB0562, 0x9C9BF696, 0x6EF07595, - 0x417B1DBC, 0xB3109EBF, 0xA0406D4B, 0x522BEE48, - 0x86E18AA3, 0x748A09A0, 0x67DAFA54, 0x95B17957, - 0xCBA24573, 0x39C9C670, 0x2A993584, 0xD8F2B687, - 0x0C38D26C, 0xFE53516F, 0xED03A29B, 0x1F682198, - 0x5125DAD3, 0xA34E59D0, 0xB01EAA24, 0x42752927, - 0x96BF4DCC, 0x64D4CECF, 0x77843D3B, 0x85EFBE38, - 0xDBFC821C, 0x2997011F, 0x3AC7F2EB, 0xC8AC71E8, - 0x1C661503, 0xEE0D9600, 0xFD5D65F4, 0x0F36E6F7, - 0x61C69362, 0x93AD1061, 0x80FDE395, 0x72966096, - 0xA65C047D, 0x5437877E, 0x4767748A, 0xB50CF789, - 0xEB1FCBAD, 0x197448AE, 0x0A24BB5A, 0xF84F3859, - 0x2C855CB2, 0xDEEEDFB1, 0xCDBE2C45, 0x3FD5AF46, - 0x7198540D, 0x83F3D70E, 0x90A324FA, 0x62C8A7F9, - 0xB602C312, 0x44694011, 0x5739B3E5, 0xA55230E6, - 0xFB410CC2, 0x092A8FC1, 0x1A7A7C35, 0xE811FF36, - 0x3CDB9BDD, 0xCEB018DE, 0xDDE0EB2A, 0x2F8B6829, - 0x82F63B78, 0x709DB87B, 0x63CD4B8F, 0x91A6C88C, - 0x456CAC67, 0xB7072F64, 0xA457DC90, 0x563C5F93, - 0x082F63B7, 0xFA44E0B4, 0xE9141340, 0x1B7F9043, - 0xCFB5F4A8, 0x3DDE77AB, 0x2E8E845F, 0xDCE5075C, - 0x92A8FC17, 0x60C37F14, 0x73938CE0, 0x81F80FE3, - 0x55326B08, 0xA759E80B, 0xB4091BFF, 0x466298FC, - 0x1871A4D8, 0xEA1A27DB, 0xF94AD42F, 0x0B21572C, - 0xDFEB33C7, 0x2D80B0C4, 0x3ED04330, 0xCCBBC033, - 0xA24BB5A6, 0x502036A5, 0x4370C551, 0xB11B4652, - 0x65D122B9, 0x97BAA1BA, 0x84EA524E, 0x7681D14D, - 0x2892ED69, 0xDAF96E6A, 0xC9A99D9E, 0x3BC21E9D, - 0xEF087A76, 0x1D63F975, 0x0E330A81, 0xFC588982, - 0xB21572C9, 0x407EF1CA, 0x532E023E, 0xA145813D, - 0x758FE5D6, 0x87E466D5, 0x94B49521, 0x66DF1622, - 0x38CC2A06, 0xCAA7A905, 0xD9F75AF1, 0x2B9CD9F2, - 0xFF56BD19, 0x0D3D3E1A, 0x1E6DCDEE, 0xEC064EED, - 0xC38D26C4, 0x31E6A5C7, 0x22B65633, 0xD0DDD530, - 0x0417B1DB, 0xF67C32D8, 0xE52CC12C, 0x1747422F, - 0x49547E0B, 0xBB3FFD08, 0xA86F0EFC, 0x5A048DFF, - 0x8ECEE914, 0x7CA56A17, 0x6FF599E3, 0x9D9E1AE0, - 0xD3D3E1AB, 0x21B862A8, 0x32E8915C, 0xC083125F, - 0x144976B4, 0xE622F5B7, 0xF5720643, 0x07198540, - 0x590AB964, 0xAB613A67, 0xB831C993, 0x4A5A4A90, - 0x9E902E7B, 0x6CFBAD78, 0x7FAB5E8C, 0x8DC0DD8F, - 0xE330A81A, 0x115B2B19, 0x020BD8ED, 0xF0605BEE, - 0x24AA3F05, 0xD6C1BC06, 0xC5914FF2, 0x37FACCF1, - 0x69E9F0D5, 0x9B8273D6, 0x88D28022, 0x7AB90321, - 0xAE7367CA, 0x5C18E4C9, 0x4F48173D, 0xBD23943E, - 0xF36E6F75, 0x0105EC76, 0x12551F82, 0xE03E9C81, - 0x34F4F86A, 0xC69F7B69, 0xD5CF889D, 0x27A40B9E, - 0x79B737BA, 0x8BDCB4B9, 0x988C474D, 0x6AE7C44E, - 0xBE2DA0A5, 0x4C4623A6, 0x5F16D052, 0xAD7D5351, -}; - - -#define SCTP_CRC32C(c,d) (c=(c>>8)^sctp_crc_c[(c^(d))&0xFF]) - -#if 0 -static uint32_t -old_update_crc32(uint32_t crc32c, - unsigned char const *buffer, - unsigned int length) -{ - unsigned int i; - - for (i = 0; i < length; i++) { - SCTP_CRC32C(crc32c, buffer[i]); - } - return (crc32c); -} - - -static uint32_t -sctp_csum_finalize(uint32_t crc32c) -{ - uint32_t result; - -#if BYTE_ORDER == BIG_ENDIAN - uint8_t byte0, byte1, byte2, byte3; - -#endif - /* Complement the result */ - result = ~crc32c; -#if BYTE_ORDER == BIG_ENDIAN - /* - * For BIG-ENDIAN.. aka Motorola byte order the result is in - * little-endian form. So we must manually swap the bytes. Then we - * can call htonl() which does nothing... - */ - byte0 = result & 0x000000ff; - byte1 = (result >> 8) & 0x000000ff; - byte2 = (result >> 16) & 0x000000ff; - byte3 = (result >> 24) & 0x000000ff; - crc32c = ((byte0 << 24) | (byte1 << 16) | (byte2 << 8) | byte3); -#else - /* - * For INTEL platforms the result comes out in network order. No - * htonl is required or the swap above. So we optimize out both the - * htonl and the manual swap above. - */ - crc32c = result; -#endif - return (crc32c); -} -#endif - -uint32_t ceph_crc32c_le(uint32_t crc, unsigned char const *data, unsigned length) -{ - return update_crc32(crc, data, length); -} - - -#endif diff --git a/wireshark/ceph/types.h b/wireshark/ceph/types.h deleted file mode 100644 index 1bcc48dc5772..000000000000 --- a/wireshark/ceph/types.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef CEPH_WS_TYPES_H -#define CEPH_WS_TYPES_H - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include - -// this is needed for ceph_fs to compile in userland -#ifdef _MSC_VER -typedef char __s8; -typedef short __s16; -typedef int __s32; -typedef __int64 __s64; -typedef unsigned char __u8; -typedef unsigned short __u16; -typedef unsigned int __u32; -typedef unsigned __int64 __u64; -typedef __u16 __le16; -typedef __u32 __le32; -typedef __u64 __le64; -#define __attribute__(x) -#define O_ACCMODE (O_RDONLY | O_RDWR | O_WRONLY) -#include -#else -#include -#include -#endif -typedef int bool; - -#define le16_to_cpu(x) (x) -#define le32_to_cpu(x) (x) -#define le64_to_cpu(x) (x) - - -typedef guint32 uint32_t; - -#include -#include - -#ifdef _MSC_VER -#pragma pack(1) -#endif -#include "ceph_fs.h" -#ifdef _MSC_VER -#pragma pack() -#endif - - - -#endif diff --git a/wireshark/wireshark.patch b/wireshark/wireshark.patch deleted file mode 100644 index cca5947b985d..000000000000 --- a/wireshark/wireshark.patch +++ /dev/null @@ -1,84 +0,0 @@ -Index: plugins/Makefile.nmake -=================================================================== ---- plugins/Makefile.nmake (revision 43768) -+++ plugins/Makefile.nmake (working copy) -@@ -8,6 +8,7 @@ - - PLUGIN_LIST = \ - asn1 \ -+ ceph \ - docsis \ - ethercat \ - gryphon \ -Index: plugins/Makefile.am -=================================================================== ---- plugins/Makefile.am (revision 43768) -+++ plugins/Makefile.am (working copy) -@@ -24,6 +24,7 @@ - -include Custom.make - SUBDIRS = $(_CUSTOM_SUBDIRS_) \ - asn1 \ -+ ceph \ - docsis \ - ethercat \ - gryphon \ -Index: configure.in -=================================================================== ---- configure.in (revision 43768) -+++ configure.in (working copy) -@@ -2150,6 +2150,7 @@ - packaging/svr4/pkginfo - plugins/Makefile - plugins/asn1/Makefile -+ plugins/ceph/Makefile - plugins/docsis/Makefile - plugins/ethercat/Makefile - plugins/gryphon/Makefile -Index: Makefile.am -=================================================================== ---- Makefile.am (revision 43768) -+++ Makefile.am (working copy) -@@ -273,6 +273,7 @@ - -include plugins/Custom.make - plugin_ldadd = $(_CUSTOM_plugin_ldadd_) \ - -dlopen plugins/asn1/asn1.la \ -+ -dlopen plugins/ceph/ceph.la \ - -dlopen plugins/docsis/docsis.la \ - -dlopen plugins/ethercat/ethercat.la \ - -dlopen plugins/gryphon/gryphon.la \ -Index: packaging/nsis/Makefile.nmake -=================================================================== ---- packaging/nsis/Makefile.nmake (revision 43768) -+++ packaging/nsis/Makefile.nmake (working copy) -@@ -46,6 +46,7 @@ - - PLUGINS= \ - ../../plugins/asn1/asn1.dll \ -+ ../../plugins/ceph/ceph.dll \ - ../../plugins/docsis/docsis.dll \ - ../../plugins/ethercat/ethercat.dll \ - ../../plugins/gryphon/gryphon.dll \ -Index: packaging/nsis/wireshark.nsi -=================================================================== ---- packaging/nsis/wireshark.nsi (revision 43768) -+++ packaging/nsis/wireshark.nsi (working copy) -@@ -806,6 +806,7 @@ - ;------------------------------------------- - SetOutPath '$INSTDIR\plugins\${VERSION}' - File "${STAGING_DIR}\plugins\${VERSION}\asn1.dll" -+File "${STAGING_DIR}\plugins\${VERSION}\ceph.dll" - File "${STAGING_DIR}\plugins\${VERSION}\docsis.dll" - File "${STAGING_DIR}\plugins\${VERSION}\ethercat.dll" - File "${STAGING_DIR}\plugins\${VERSION}\gryphon.dll" -Index: epan/Makefile.am -=================================================================== ---- epan/Makefile.am (revision 43768) -+++ epan/Makefile.am (working copy) -@@ -209,6 +209,7 @@ - -include ../plugins/Custom.make - plugin_src = \ - ../plugins/asn1/packet-asn1.c \ -+ ../plugins/ceph/packet-ceph.c \ - ../plugins/docsis/packet-bintrngreq.c \ - ../plugins/docsis/packet-bpkmattr.c \ - ../plugins/docsis/packet-bpkmreq.c \