|
| | peer_t (int sock) |
| |
| | ~peer_t () override |
| |
| void | dump (const string &prefix, ostream &os) const |
| |
| void | dump_all (const string &prefix, ostream &os) const override |
| |
| void | verification_completed (uint16_t rpport) override |
| |
| bool | authorize (const pub_t &p, uint16_t pin) const override |
| |
| const keys & | get_keys () const override |
| |
| | peer_t (int sock) |
| |
| | ~peer_t () override |
| |
| ko | connect (uint32_t host, uint16_t port, uint16_t pport, role_t, bool block) override |
| |
| void | disconnect (uint16_t seq, const string &reason) override |
| |
| void | dump_all (const string &prefix, ostream &os) const override |
| |
| pair< security_level_t, string > | security_level () const override |
| |
| bool | check_auth_not_granted () const |
| |
| bool | check_idle () const |
| |
| void | dump (const string &prefix, ostream &os) const |
| |
| bool | authorize (const pub_t &p, uint16_t pin) const override |
| |
| | peer_t (int sock=-1) |
| |
| void | verification_completed (uint16_t rpport) override |
| |
| virtual bool | authorize (const pub_t &p, uint16_t pin) const =0 |
| |
| void | dump (const string &prefix, ostream &os) const |
| |
| | peer_t (Socket sock) |
| |
| override void | verification_completed () |
| |
| virtual bool | authorize (byte[] pub) |
| |
| | peer_t (Socket sock) |
| |
| void | verification_completed (uint16_t rpport) |
| |
| boolean | authorize (PublicKey pub) |
| |
| | peer_t (int sock) |
| |
| ko | connect (const string &host, uint16_t port, uint16_t pport, role_t, bool block) |
| |
| virtual ko | connect (uint32_t host, uint16_t port, uint16_t pport, role_t, bool block) |
| |
| void | dump (const string &prefix, ostream &os) const |
| |
| bool | process_work (datagram *d) |
| |
| void | process_request (datagram *d, const keys &) |
| |
| void | process_peer_challenge (datagram *d, const keys &) |
| |
| void | process_challenge_response (datagram *d) |
| |
| ko | initiate_dialogue (role_t role, uint16_t pport_pin) |
| |
| bool | verification_is_fine () const |
| |
| string | short_version () const |
| |
| ko | turn_on_encryption () |
| |
| ko | wait_auth () const |
| |
| pair< ko, datagram * > | encrypt0 (datagram *) const override |
| |
| pair< ko, datagram * > | decrypt0 (datagram *) const override |
| |
| stage_t | get_stage_peer () const |
| |
| void | set_stage_peer (stage_t) |
| |
| daemon * | get_parent () |
| |
| const daemon * | get_parent () const |
| |
| bool | is_role_peer () const |
| |
| bool | is_role_sysop () const |
| |
| bool | is_role_device () const |
| |
| | peer_t (Socket sock) |
| |
| String | connect (String host, int port, char role, bool block) |
| |
| override bool | process_work (datagram d) |
| |
| void | process_request (datagram d, KeyPair mykeys) |
| |
| void | process_peer_challenge (datagram d, KeyPair mykeys) |
| |
| void | process_challenge_response (datagram d) |
| |
| void | initiate_dialogue (char role) |
| |
| bool | verification_is_fine () |
| |
| virtual KeyPair | get_keys () |
| |
| String | run_auth_responder () |
| |
| ko | connect (String host, uint16_t port, uint16_t pport_pin, role_t role, boolean block) |
| |
| ko | connect (String endpoint, uint16_t pport_pin, role_t role, boolean block) |
| |
| boolean | process_work (datagram d) |
| |
| ko | initiate_dialogue (role_t role, uint16_t pport) |
| |
| void | process_request (datagram d, KeyPair mykeys) |
| |
| void | process_peer_challenge (datagram d, KeyPair mykeys) |
| |
| void | process_challenge_response (datagram d) |
| |
| ko | turn_on_encryption () |
| |
| pair< ko, datagram > | encrypt0 (datagram d) |
| |
| pair< ko, datagram > | decrypt0 (datagram e) |
| |
| boolean | verification_is_fine () |
| |
| KeyPair | get_keys () |
| |
| ko | wait_auth () |
| |
| | peer_t () |
| |
| | peer_t (int sock) |
| |
| | peer_t (const peer_t &)=delete |
| |
| peer_t & | operator= (const peer_t &)=delete |
| |
| | ~peer_t () override |
| |
| void | dump_all (const string &prefix, ostream &os) const override |
| |
| pair< security_level_t, string > | security_level () const override |
| |
| bool | stalled_datagram () const |
| |
| bool | process_work (datagram *d) |
| |
| void | dump (const string &prefix, ostream &os) const |
| |
| virtual void | on_peer_disconnected (const string &reason) |
| |
| | peer_t () |
| |
| | peer_t (Socket sock) |
| |
| bool | is_slow () |
| |
| bool | ping () |
| |
| void | process_pong () |
| |
| | peer_t () |
| |
| void | on_peer_disconnected (String reason) |
| |
| | client () |
| |
| | client (int sock) |
| |
| virtual | ~client () |
| |
| ko | connect0 (uint32_t host, uint16_t port, bool block) |
| |
| ko | connect0 (const string &host, uint16_t port, bool block) |
| |
| bool | connected () const |
| |
| pair< uint32_t, uint16_t > | raddress () const |
| |
| virtual void | on_connect (ko) |
| |
| pair< ko, datagram * > | recv4x (datagram *d) |
| |
| pair< ko, datagram * > | recv6 () |
| |
| ko | init_sock2 (uint32_t host, uint16_t port, bool block) |
| |
| void | dump (const string &prefix, ostream &os) const |
| |
| string | refdata () const |
| |
| string | endpoint () const |
| |
| virtual ko | send1 (datagram *) |
| |
| void | prepare_worker_recv () |
| |
| void | worker_ended_recv () |
| |
| void | set_finished () |
| |
| bool | is_finished () const |
| |
| void | test_alive () |
| |
| void | ping () |
| |
| | client () |
| |
| | client (Socket sock_) |
| |
| String | connect0 (String host, int port) |
| |
| String | connect0 (String host, int port, bool block) |
| |
| void | disconnect () |
| |
| bool | connected () |
| |
| bool | IsConnected () |
| |
| String | address () |
| |
| void | ready () |
| |
| pair< String, datagram > | send_recv3 (datagram d) |
| |
| pair< String, datagram > | recv6 () |
| |
| pair< String, datagram > | recv3 () |
| |
| pair< String, datagram > | recv4 (datagram d) |
| |
| String | send3 (datagram d) |
| |
| | client () |
| |
| | client (Socket sock_) |
| |
| void | prepare_worker_recv () |
| |
| void | worker_ended_recv () |
| |
| void | on_connect (ko err) |
| |
| ko | connect0 (String host, uint16_t port) |
| |
| ko | connect0 (String host, uint16_t hport, boolean block) |
| |
| void | disconnect (uint16_t seq, String reason) |
| |
| boolean | connected () |
| |
| String | address () |
| |
| String | endpoint () |
| |
| pair< ko, datagram > | recv6 () |
| |
| pair< ko, datagram > | recv4x (datagram d) |
| |
| boolean | is_finished () |
| |
| void | dump (String prefix, PrintStream os) |
| |
| void | test_alive () |
| |
| ko | send1 (datagram d0) |
| |
|
| constexpr static array< const char *, num_stages > | stagestr ={"unknown","sysop","out","hall","node","device"} |
| |
| constexpr static array< const char *, num_stages > | stagestr ={"disconnected", "connected", "latency", "service", "disconnecting"} |
| |
| constexpr static chrono::seconds | auth_window {socket::peer_t::stall+5s} |
| |
| constexpr static uint64_t | maxidle_ms {180000} |
| |
| static const char * | finished_reason_1 |
| |
| constexpr static array< const char *, num_stages > | stagestr ={"denied","authorized"} |
| |
| static const char * | KO_6017 |
| |
| constexpr static array< const char *, num_stages > | stagestr ={"anonymous","verified","verified_fail"} |
| |
| constexpr static array< const char *, num_roles > | rolestr ={"peer","sysop","device"} |
| |
| static ko | KO_6017 =new ko("KO 6017 authentication failed.") |
| |
| static final String[] | stagestr = {"anonymous","verified","verified_fail"} |
| |
| static final ko | KO_43823 =new ko("KO 43823 Invalid endpoint") |
| |
| constexpr static chrono::seconds | stall {5s} |
| |
| static const char * | finished_reason_1 |
| |
| static const char * | finished_reason_2 |
| |
| static const char * | KO_7190 |
| |
| static const char * | KO_58961 |
| |
| static const char * | KO_60541 |
| |
| static const char * | KO_10100 |
| |
| static const char * | KO_20190 |
| |
| static const char * | KO_20191 |
| |
| static busyled_t | busyled_recv =new busyled_t() |
| |
| static struct timeval | timeout |
| |
| static final ko | KO_58961 =new ko("KO 58961 Invalid port.") |
| |
| static final ko | KO_83911 =new ko("KO 83911 IO Exception.") |
| |
| static final ko | KO_83912 =new ko("KO 83912 Exception.") |
| |
| static final ko | KO_10100 =new ko("KO 10100 Unreachable host.") |
| |
| static final ko | KO_20190 =new ko("KO 20190 Invalid endpoint port.") |
| |
| static final ko | KO_20191 =new ko("KO 20191 Invalid endpoint host.") |
| |
| static long | prev_uid =0 |
| |
|
| static string | to_string (const vector< unsigned char > &data) |
| |
| static String | get_random_message () |
| |
| static uint32_t | host2addr (const string &host) |
| |
| static string | age (uint64_t msts) |
| |
| static string | age (chrono::system_clock::time_point time) |
| |
| static string | ip4_decode (uint32_t addr) |
| |
| static uint32_t | ip4_encode (const string &addr) |
| |
| static bool | is_wan_ip (uint32_t) |
| |
| static bool | is_valid_ip (uint32_t) |
| |
| static string | endpoint (uint32_t addr, uint16_t port) |
| |
| static string | endpoint (const pair< uint32_t, uint16_t > &ip) |
| |
| static pair< ko, pair< string, uint16_t > > | parse_endpoint (const string &ipport) |
| |
| static pair< ko, pair< String, Short > > | parse_endpoint (String ipport) |
| |
| static String | ip4_decode (uint32_t addr0) |
| |
| static uint32_t | ip4_encode (String addr0) |
| |
| static String | endpoint (uint32_t a, uint16_t p) |
| |
| static String | endpoint (String a, uint16_t p) |
| |
| boolean | is_role_peer () |
| |
| boolean | is_role_sysop () |
| |
| boolean | is_role_device () |
| |
| void | set_stage_peer (stage_t s) |
| |
| stage_t | get_stage_peer () |
| |
| String | short_version () |
| |
| String | refdata () |
| |
| void | set_finished () |
| |
| uint16_t | daemon_pport =uint16_t.zero |
| |
| handshakes_t | handshakes =null |
| |
| ReentrantLock | mx_auth = new ReentrantLock() |
| |
| Condition | cv_auth =mx_auth.newCondition() |
| |
| symmetric_encryption | se =null |
| |
| pair< uint16_t, String > | finished_reason =new pair<uint16_t, String>(new uint16_t(0), "") |
| |
| AtomicBoolean | finished =new AtomicBoolean(false) |
| |
| AtomicInteger | busyrecv =new AtomicInteger(0) |
| |
| boolean | called_disconnect =false |
| |
| long | activity_recv |
| |
| long | last_test_alive |
| |
| AtomicLong | activity =new AtomicLong(0L) |
| |