Add context for libcli_resolve.
[samba-svnmirror.git] / source / librpc / rpc / dcerpc.h
index 362c0f9c251b02fe6dccbbefa57b3f0cbd63e9ef..9936ebe0018be74002649071915b5540e398bb3f 100644 (file)
 #ifndef __DCERPC_H__
 #define __DCERPC_H__
 
-#include "core.h"
+#include "lib/util/data_blob.h"
 #include "librpc/gen_ndr/dcerpc.h"
 #include "librpc/ndr/libndr.h"
 
 enum dcerpc_transport_t {
-       NCACN_NP, NCACN_IP_TCP, NCACN_IP_UDP, NCACN_VNS_IPC, NCACN_VNS_SPP
-       NCACN_AT_DSP, NCADG_AT_DDP, NCALRPC, NCACN_UNIX_STREAM, NCADG_UNIX_DGRAM,
-       NCACN_HTTP, NCADG_IPX, NCACN_SPX };
+       NCA_UNKNOWN, NCACN_NP, NCACN_IP_TCP, NCACN_IP_UDP, NCACN_VNS_IPC
+       NCACN_VNS_SPP, NCACN_AT_DSP, NCADG_AT_DDP, NCALRPC, NCACN_UNIX_STREAM, 
+       NCADG_UNIX_DGRAM, NCACN_HTTP, NCADG_IPX, NCACN_SPX };
 
 /*
   this defines a generic security context for signed/sealed dcerpc pipes.
@@ -70,7 +70,7 @@ struct dcerpc_connection {
                const char *(*target_hostname)(struct dcerpc_connection *);
 
                /* send a request to the server */
-               NTSTATUS (*send_request)(struct dcerpc_connection *, DATA_BLOB *, BOOL trigger_read);
+               NTSTATUS (*send_request)(struct dcerpc_connection *, DATA_BLOB *, bool trigger_read);
 
                /* send a read request to the server */
                NTSTATUS (*send_read)(struct dcerpc_connection *);
@@ -158,43 +158,6 @@ struct dcerpc_pipe {
 /* this triggers the DCERPC_PFC_FLAG_CONC_MPX flag in the bind request */
 #define DCERPC_CONCURRENT_MULTIPLEX     (1<<19)
 
-/*
-  this is used to find pointers to calls
-*/
-struct dcerpc_interface_call {
-       const char *name;
-       size_t struct_size;
-       ndr_push_flags_fn_t ndr_push;
-       ndr_pull_flags_fn_t ndr_pull;
-       ndr_print_function_t ndr_print;
-       BOOL async;
-};
-
-struct dcerpc_endpoint_list {
-       uint32_t count;
-       const char * const *names;
-};
-
-struct dcerpc_authservice_list {
-       uint32_t count;
-       const char * const *names;
-};
-
-struct dcerpc_interface_table {
-       const char *name;
-       struct ndr_syntax_id syntax_id;
-       const char *helpstring;
-       uint32_t num_calls;
-       const struct dcerpc_interface_call *calls;
-       const struct dcerpc_endpoint_list *endpoints;
-       const struct dcerpc_authservice_list *authservices;
-};
-
-struct dcerpc_interface_list {
-       struct dcerpc_interface_list *prev, *next;
-       const struct dcerpc_interface_table *table;
-};
-
 /* this describes a binding to a particular transport/pipe */
 struct dcerpc_binding {
        enum dcerpc_transport_t transport;
@@ -212,8 +175,9 @@ struct dcerpc_pipe_connect {
        struct dcerpc_pipe *pipe;
        struct dcerpc_binding *binding;
        const char *pipe_name;
-       const struct dcerpc_interface_table *interface;
+       const struct ndr_interface_table *interface;
        struct cli_credentials *creds;
+       struct resolve_context *resolve_ctx;
 };
 
 
@@ -244,12 +208,12 @@ struct rpc_request {
        const struct GUID *object;
        uint16_t opnum;
        DATA_BLOB request_data;
-       BOOL async_call;
-       BOOL ignore_timeout;
+       bool async_call;
+       bool ignore_timeout;
 
        /* use by the ndr level async recv call */
        struct {
-               const struct dcerpc_interface_table *table;
+               const struct ndr_interface_table *table;
                uint32_t opnum;
                void *struct_ptr;
                TALLOC_CTX *mem_ctx;