#ifndef __CONFIG_HPP__ #define __CONFIG_HPP__ #include #include #include // The per-node config struct NodeConfig { std::string name; std::string pubkey; // a 128-character hex string 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 nodes; // Which node is this one? size_t mynodenum; }; bool config_parse(Config &config, const std::string configstr, const std::string &myname); #endif