28 #ifndef HYPERSPACE_PROTOCOL_H
29 #define HYPERSPACE_PROTOCOL_H
55 Attribute(
const char *n,
const void *v, uint32_t vl)
80 std::set<uint64_t> &delivered_events,
bool destroy_session=
false);
96 const std::string &attr,
const void *value,
size_t value_len);
99 const std::vector<Attribute> &attrs);
140 const std::string &attr);
159 const std::string &attr);
164 const std::string &attr,
bool include_sub_entries);
166 const std::string &attr);
175 const void *value,
size_t value_len);
224 gid += (uint32_t)
'/';
225 for (ptr=path.c_str(); *ptr; ++ptr)
226 gid += (uint32_t)*ptr;
229 gid -= (uint32_t)
'/';
238 #endif // HYPERSPACE_PROTOCOL_H
static CommBuf * create_lock_request(uint64_t handle, uint32_t mode, bool try_lock)
static CommBuf * create_attr_exists_request(uint64_t handle, const std::string &attr)
Creates attr_exists request message.
static CommBuf * create_handshake_request(uint64_t session_id, const std::string &name)
static CommBuf * create_server_keepalive_request(uint64_t session_id, int error)
static const uint64_t COMMAND_HANDSHAKE
std::shared_ptr< SessionData > SessionDataPtr
static const uint64_t COMMAND_REDIRECT
static CommBuf * create_readdir_request(uint64_t handle)
static const uint64_t COMMAND_STAT
static CommBuf * create_attr_list_request(uint64_t handle)
static CommBuf * create_attr_set_request(uint64_t handle, const std::string *name, uint32_t oflags, const std::string &attr, const void *value, size_t value_len)
Attribute(const char *n, const void *v, uint32_t vl)
Constructor.
static CommBuf * create_readdir_attr_request(uint64_t handle, const std::string *name, const std::string &attr, bool include_sub_entries)
static CommBuf * create_shutdown_request()
static CommBuf * create_close_request(uint64_t handle)
virtual const char * command_text(uint64_t command)=0
Returns the string representation of a command code.
const char * name
Name of extended attribute.
static CommBuf * create_mkdir_request(const std::string &name, bool create_intermediate, const std::vector< Attribute > *init_attrs)
static CommBuf * create_attr_incr_request(uint64_t handle, const std::string *name, const std::string &attr)
static const char * command_strs[COMMAND_MAX]
static CommBuf * create_delete_request(const std::string &name)
static CommBuf * create_readpath_attr_request(uint64_t handle, const std::string *name, const std::string &attr)
static CommBuf * create_attrs_get_request(uint64_t handle, const std::string *name, const std::vector< std::string > &attrs)
static const uint64_t COMMAND_CHECKSEQUENCER
std::shared_ptr< HandleCallback > HandleCallbackPtr
static CommBuf * create_attr_get_request(uint64_t handle, const std::string *name, const std::string &attr)
static CommBuf * create_status_request()
static CommBuf * create_client_keepalive_request(uint64_t session_id, std::set< uint64_t > &delivered_events, bool destroy_session=false)
Declarations for CommBuf.
Declarations for Protocol.
Abstract base class for server protocol drivers.
static CommBuf * create_server_redirect_request(const std::string &host)
const void * value
Pointer to attribute value.
static const uint64_t COMMAND_CANCEL
Message buffer for holding data to be transmitted over a network.
Holds extended attribute and value.
static CommBuf * create_event_notification(uint64_t handle, const std::string &name, const void *value, size_t value_len)
static CommBuf * create_release_request(uint64_t handle)
uint32_t value_len
Length of attribute value.
static uint32_t filename_to_group(const std::string &path)
Generates Comm header gid for pathname.
static CommBuf * create_exists_request(const std::string &name)
static const uint64_t COMMAND_POISON
static const uint64_t COMMAND_KEEPALIVE
static CommBuf * create_attr_del_request(uint64_t handle, const std::string &name)
Creates attr_del request message.
static CommBuf * create_open_request(const std::string &name, uint32_t flags, HandleCallbackPtr &callback, const std::vector< Attribute > &init_attrs)