s3:rpc_client: add rpccli_is_connected()
[samba.git] / source3 / include / client.h
index 6f56468274405d87e817927dab24f48e37eee982..252d9b3ffe840b6aa3b5d66a1d3768e6cab0f16e 100644 (file)
@@ -48,14 +48,14 @@ struct print_job_info {
 
 struct cli_pipe_auth_data {
        enum pipe_auth_type auth_type; /* switch for the union below. Defined in ntdomain.h */
-       enum pipe_auth_level auth_level; /* defined in ntdomain.h */
+       enum dcerpc_AuthLevel auth_level; /* defined in ntdomain.h */
 
        char *domain;
        char *user_name;
        DATA_BLOB user_session_key;
 
        union {
-               struct schannel_auth_struct *schannel_auth;
+               struct schannel_state *schannel_auth;
                NTLMSSP_STATE *ntlmssp_state;
                struct kerberos_auth_struct *kerberos_auth;
        } a_u;
@@ -68,6 +68,8 @@ struct cli_pipe_auth_data {
 
 struct rpc_cli_transport {
 
+       enum dcerpc_transport_t transport;
+
        /**
         * Trigger an async read from the server. May return a short read.
         */
@@ -108,6 +110,9 @@ struct rpc_cli_transport {
         */
        NTSTATUS (*trans_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx,
                               uint8_t **prdata, uint32_t *prdata_len);
+
+       bool (*is_connected)(void *priv);
+
        void *priv;
 };
 
@@ -124,6 +129,17 @@ struct rpc_pipe_client {
                        const struct ndr_interface_table *table,
                        uint32_t opnum, void *r);
 
+       struct tevent_req *(*dispatch_send)(
+               TALLOC_CTX *mem_ctx,
+               struct tevent_context *ev,
+               struct rpc_pipe_client *cli,
+               const struct ndr_interface_table *table,
+               uint32_t opnum,
+               void *r);
+       NTSTATUS (*dispatch_recv)(struct tevent_req *req,
+                                 TALLOC_CTX *mem_ctx);
+
+
        char *desthost;
        char *srv_name_slash;
 
@@ -253,6 +269,7 @@ struct cli_state {
        bool use_kerberos;
        bool fallback_after_kerberos;
        bool use_spnego;
+       bool use_ccache;
        bool got_kerberos_mechanism; /* Server supports krb5 in SPNEGO. */
 
        bool use_oplocks; /* should we use oplocks? */
@@ -291,5 +308,6 @@ typedef struct file_info {
 #define CLI_FULL_CONNECTION_FALLBACK_AFTER_KERBEROS 0x0008
 #define CLI_FULL_CONNECTION_OPLOCKS 0x0010
 #define CLI_FULL_CONNECTION_LEVEL_II_OPLOCKS 0x0020
+#define CLI_FULL_CONNECTION_USE_CCACHE 0x0040
 
 #endif /* _CLIENT_H */