diff options
author | Sage Weil <sage@newdream.net> | 2007-12-19 22:28:33 +0100 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2007-12-19 22:28:33 +0100 |
commit | c1865445c5b88cae2df499e4d2047af156225177 (patch) | |
tree | 84eea0ded894a5b4389d56679288fa96b7f07e02 /src/messages/MPing.h | |
parent | asdf (diff) | |
download | ceph-c1865445c5b88cae2df499e4d2047af156225177.tar.xz ceph-c1865445c5b88cae2df499e4d2047af156225177.zip |
reorganized source tree
Diffstat (limited to 'src/messages/MPing.h')
-rw-r--r-- | src/messages/MPing.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/messages/MPing.h b/src/messages/MPing.h new file mode 100644 index 00000000000..bb13fd493c7 --- /dev/null +++ b/src/messages/MPing.h @@ -0,0 +1,43 @@ +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// vim: ts=8 sw=2 smarttab +/* + * Ceph - scalable distributed file system + * + * Copyright (C) 2004-2006 Sage Weil <sage@newdream.net> + * + * This is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software + * Foundation. See file COPYING. + * + */ + + + +#ifndef __MPING_H +#define __MPING_H + +#include "msg/Message.h" + + +class MPing : public Message { + public: + int seq; + MPing(int s) : Message(CEPH_MSG_PING) { + seq = s; + } + MPing() : Message(CEPH_MSG_PING) {} + + virtual void decode_payload() { + int off = 0; + payload.copy(0, sizeof(seq), (char*)&seq); + off += sizeof(seq); + } + virtual void encode_payload() { + payload.append((char*)&seq, sizeof(seq)); + } + + virtual char *get_type_name() { return "ping"; } +}; + +#endif |