#include <stdlib.h>
#include <string.h>
+#include "common/Formatter.h"
+
+void entity_name_t::dump(Formatter *f) const
+{
+ f->dump_string("type", type_str());
+ f->dump_unsigned("num", num());
+}
+
+
+void entity_addr_t::dump(Formatter *f) const
+{
+ f->dump_unsigned("nonce", nonce);
+ f->dump_stream("addr") << addr;
+}
+
+
bool entity_addr_t::parse(const char *s, const char **end)
{
memset(this, 0, sizeof(*this));
#include "tcp.h"
#include "include/encoding.h"
+namespace ceph {
+ class Formatter;
+}
extern ostream& operator<<(ostream& out, const sockaddr_storage &ss);
-
class entity_name_t {
public:
__u8 _type;
::decode(_type, bl);
::decode(_num, bl);
}
+ void dump(Formatter *f) const;
};
WRITE_CLASS_ENCODER(entity_name_t)
::decode(nonce, bl);
::decode(addr, bl);
}
+
+ void dump(Formatter *f) const;
+
};
WRITE_CLASS_ENCODER(entity_addr_t)