ztsdb
info.hpp
1 // (C) 2016 Leonardo Silvestri
2 //
3 // This file is part of ztsdb.
4 //
5 // ztsdb is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // ztsdb is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with ztsdb. If not, see <http://www.gnu.org/licenses/>.
17 
18 
19 #ifndef INFO_HPP
20 #define INFO_HPP
21 
22 
23 #include <vector>
24 #include <set>
25 
26 
27 namespace zcore {
28 
29  struct ConnectionInfo {
30  enum Direction { INCOMING, OUTGOING };
31 
32  Global::conn_id_t id;
33  std::string ipaddress;
34  int port;
35  Direction dir;
36  };
37 
38 
39  struct NetInfo {
40  std::vector<ConnectionInfo> conninfo;
41  size_t buflistSz;
42  size_t siglistSz;
43  };
44 
45 
46  struct MsgInfo {
47  std::set<Global::conn_id_t> reqContexts;
48  std::set<Global::conn_id_t> rspContexts;
49  };
50 
51 
52  struct StateInfo {
53  Global::reqid_t reqid;
54  Global::reqid_t sourceid;
55  Global::conn_id_t peerid;
56  };
57 
58  struct CtxInfo {
60  };
61 }
62 
63 
64 #endif
zcore::StateInfo
Definition: info.hpp:52
zcore::CtxInfo
Definition: info.hpp:58
zcore::ConnectionInfo
Definition: info.hpp:29
zcore::MsgInfo
Definition: info.hpp:46
state
Definition: tz.hpp:51
zcore::NetInfo
Definition: info.hpp:39