]> git.proxmox.com Git - ceph.git/blob - ceph/src/messages/MMgrOpen.h
13c67586b99f6b21e213fddd628aa1323f193f13
[ceph.git] / ceph / src / messages / MMgrOpen.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
3 /*
4 * Ceph - scalable distributed file system
5 *
6 * Copyright (C) 2016 John Spray <john.spray@redhat.com>
7 *
8 * This is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License version 2.1, as published by the Free Software
11 * Foundation. See file COPYING.
12 */
13
14
15 #ifndef CEPH_MMGROPEN_H_
16 #define CEPH_MMGROPEN_H_
17
18 #include "msg/Message.h"
19
20 class MMgrOpen : public Message
21 {
22 static const int HEAD_VERSION = 1;
23 static const int COMPAT_VERSION = 1;
24
25 public:
26
27 std::string daemon_name;
28
29 void decode_payload() override
30 {
31 bufferlist::iterator p = payload.begin();
32 ::decode(daemon_name, p);
33 }
34
35 void encode_payload(uint64_t features) override {
36 ::encode(daemon_name, payload);
37 }
38
39 const char *get_type_name() const override { return "mgropen"; }
40 void print(ostream& out) const override {
41 out << get_type_name() << "(" << daemon_name << ")";
42 }
43
44 MMgrOpen()
45 : Message(MSG_MGR_OPEN, HEAD_VERSION, COMPAT_VERSION)
46 {}
47 };
48
49 #endif
50