mirror of
https://github.com/ceph/ceph
synced 2025-01-08 20:21:33 +00:00
0d081ba016
git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1107 29311d96-e01e-0410-9327-a35deaab8ce9
47 lines
962 B
C++
47 lines
962 B
C++
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
|
|
/*
|
|
* 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 __MNSLOOKUP_H
|
|
#define __MNSLOOKUP_H
|
|
|
|
#include "msg/Message.h"
|
|
|
|
class MNSLookup : public Message {
|
|
entity_name_t entity;
|
|
|
|
public:
|
|
MNSLookup() {}
|
|
MNSLookup(entity_name_t e) :
|
|
Message(MSG_NS_LOOKUP) {
|
|
entity = e;
|
|
}
|
|
|
|
char *get_type_name() { return "NSLook"; }
|
|
|
|
entity_name_t get_entity() { return entity; }
|
|
|
|
void encode_payload() {
|
|
payload.append((char*)&entity, sizeof(entity));
|
|
}
|
|
void decode_payload() {
|
|
int off = 0;
|
|
payload.copy(off, sizeof(entity), (char*)&entity);
|
|
off += sizeof(entity);
|
|
}
|
|
};
|
|
|
|
|
|
#endif
|
|
|