12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- #ifndef __CONFIG_HPP__
- #define __CONFIG_HPP__
- #include <vector>
- #include "enclave_api.h"
- // startweight is the running total of all the weight entries of nodes
- // lower numbered than this one. E.g., if the weights of nodes 0, 1,
- // ..., etc. are [1, 2, 4, 1, 2, ...], the startweight values will be
- // [0, 1, 3, 7, 8, ...].
- struct NodeWeight {
- uint16_t startweight;
- uint8_t weight;
- };
- struct Config {
- threadid_t nthreads;
- nodenum_t num_nodes;
- nodenum_t num_ingestion_nodes;
- nodenum_t num_routing_nodes;
- nodenum_t num_storage_nodes;
- nodenum_t my_node_num;
- uint32_t user_count;
- uint16_t msg_size;
- uint16_t tot_weight;
- uint8_t m_priv_out;
- uint8_t m_priv_in;
- uint8_t m_pub_out;
- uint8_t m_pub_in;
- uint8_t my_weight;
- bool private_routing;
- std::vector<uint8_t> roles;
- std::vector<NodeWeight> weights;
- std::vector<nodenum_t> ingestion_nodes;
- std::vector<nodenum_t> routing_nodes;
- std::vector<nodenum_t> storage_nodes;
- sgx_aes_gcm_128bit_key_t master_secret;
- // storage_map[i] is the node number of the storage node responsible
- // for the destination adddresses with storage node field i.
- std::vector<nodenum_t> storage_map;
- sgx_aes_gcm_128bit_key_t ESK;
- sgx_aes_gcm_128bit_key_t TSK;
- };
- extern Config g_teems_config;
- extern unsigned long ingestion_epoch;
- extern unsigned long storage_epoch;
- #endif
|