#ifndef LLARP_SERVICE_ENDPOINT_STATE_HPP #define LLARP_SERVICE_ENDPOINT_STATE_HPP #include #include #include #include #include #include #include #include #include #include #include #include #include #include struct llarp_ev_loop; using llarp_ev_loop_ptr = std::shared_ptr; namespace llarp { // clang-format off namespace exit { struct BaseSession; } namespace path { struct Path; using Path_ptr = std::shared_ptr< Path >; } namespace routing { struct PathTransferMessage; } // clang-format on namespace service { struct IServiceLookup; struct OutboundContext; struct Endpoint; struct EndpointState { hooks::Backend_ptr m_OnUp; hooks::Backend_ptr m_OnDown; hooks::Backend_ptr m_OnReady; std::set m_SnodeBlacklist; AbstractRouter* m_Router; std::shared_ptr m_IsolatedLogic = nullptr; llarp_ev_loop_ptr m_IsolatedNetLoop = nullptr; std::string m_Keyfile; std::string m_Name; std::string m_NetNS; bool m_ExitEnabled = false; PendingTraffic m_PendingTraffic; Sessions m_RemoteSessions; Sessions m_DeadSessions; std::set m_InboundConvos; SNodeSessions m_SNodeSessions; std::unordered_multimap m_PendingServiceLookups; std::unordered_map m_LastServiceLookupTimes; std::unordered_map m_ServiceLookupFails; PendingRouters m_PendingRouters; llarp_time_t m_LastPublish = 0s; llarp_time_t m_LastPublishAttempt = 0s; /// our introset IntroSet m_IntroSet; /// pending remote service lookups by id PendingLookups m_PendingLookups; /// on initialize functions std::list> m_OnInit; /// conversations ConvoMap m_Sessions; OutboundSessions_t m_OutboundSessions; util::DecayingHashTable> nameCache; bool Configure(const NetworkConfig& conf); util::StatusObject ExtractStatus(util::StatusObject& obj) const; }; } // namespace service } // namespace llarp #endif