1234567891011121314151617181920212223242526272829303132 |
- #ifndef __CONFIG_HPP__
- #define __CONFIG_HPP__
- #include <string>
- #include <vector>
- #include <cstdint>
- #include "sgx_tcrypto.h"
- #include "../Enclave/enclave_api.h"
- // The per-node config
- struct NodeConfig {
- std::string name;
- sgx_ec256_public_t pubkey;
- std::string listenhost, listenport;
- std::string clistenhost, clistenport;
- uint8_t weight;
- };
- // The global config
- struct Config {
- // global params
- uint16_t msgsize;
- // config for each node
- std::vector<NodeConfig> nodes;
- // Which node is this one?
- nodenum_t my_node_num;
- };
- bool config_parse(Config &config, const std::string configstr,
- const std::string &myname);
- #endif
|