]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/crimson/net/ProtocolV1.h
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / crimson / net / ProtocolV1.h
index 2ebfcc9ca929046d806077da9af88ea8d6704740..ed6df895415fff08d5ac59c126d027d52015349b 100644 (file)
@@ -12,14 +12,17 @@ namespace crimson::net {
 
 class ProtocolV1 final : public Protocol {
  public:
-  ProtocolV1(Dispatcher& dispatcher,
+  ProtocolV1(ChainedDispatchers& dispatchers,
              SocketConnection& conn,
              SocketMessenger& messenger);
   ~ProtocolV1() override;
-
+  void print(std::ostream&) const final;
  private:
+  void on_closed() override;
+  bool is_connected() const override;
+
   void start_connect(const entity_addr_t& peer_addr,
-                     const entity_type_t& peer_type) override;
+                     const entity_name_t& peer_name) override;
 
   void start_accept(SocketRef&& socket,
                     const entity_addr_t& peer_addr) override;
@@ -101,6 +104,7 @@ class ProtocolV1 final : public Protocol {
   seastar::future<stop_t> handle_connect_with_existing(
       SocketConnectionRef existing, bufferlist&& authorizer_reply);
   bool require_auth_feature() const;
+  bool require_cephx_v2_feature() const;
   seastar::future<stop_t> repeat_handle_connect();
 
   // open
@@ -110,7 +114,12 @@ class ProtocolV1 final : public Protocol {
   seastar::future<> maybe_throttle();
   seastar::future<> read_message();
   seastar::future<> handle_tags();
-  void execute_open();
+
+  enum class open_t {
+    connected,
+    accepted
+  };
+  void execute_open(open_t type);
 
   // replacing
   // the number of connections initiated in this session, increment when a