12345678910111213141516171819202122232425262728 |
- #ifndef __STORAGE_HPP__
- #define __STORAGE_HPP__
- #include <cstdint>
- #include "route.hpp"
- // route_init will call this function; no one else should call it
- // explicitly. The parameter is the number of messages that can fit in
- // the storage-side MsgBuffer. Returns true on success, false on
- // failure.
- bool storage_init(uint32_t max_users, uint32_t msg_buf_size);
- // Call when shutting system down to deallocate routing state. route_close()
- // will call this function if the node has a storage role.
- void storage_close();
- // Handle the messages received by a storage node. Pass a _locked_
- // MsgBuffer. This function will itself reset and unlock it when it's
- // done with it.
- void storage_received(MsgBuffer &storage_buf);
- bool storage_generateClientKeys(uint32_t num_clients, uint32_t my_stg_no);
- bool ecall_authenticate(clientid_t cid, unsigned char *auth_message);
- #endif
|