allow the specification of full dcerpc endpoint binding strings on the
[samba.git] / source / librpc / rpc / dcerpc.h
index ec6189302a3b7173e971067343fa1ea70573a5d7..fa2ced253713d42c73cefa56cc15928fe43ce6e9 100644 (file)
 
 struct dcerpc_pipe {
        TALLOC_CTX *mem_ctx;
-       uint16 fnum;
        int reference_count;
        uint32 call_id;
        uint32 srv_max_xmit_frag;
        uint32 srv_max_recv_frag;
-       struct cli_tree *tree;
        unsigned flags;
+       struct ntlmssp_state *ntlmssp_state;
+       struct dcerpc_auth *auth_info;
+
+       struct dcerpc_transport {
+               void *private;
+               NTSTATUS (*full_request)(struct dcerpc_pipe *, 
+                                        TALLOC_CTX *, DATA_BLOB *, DATA_BLOB *);
+               NTSTATUS (*secondary_request)(struct dcerpc_pipe *, TALLOC_CTX *, DATA_BLOB *);
+               NTSTATUS (*initial_request)(struct dcerpc_pipe *, TALLOC_CTX *, DATA_BLOB *);
+               NTSTATUS (*shutdown_pipe)(struct dcerpc_pipe *);
+               const char *(*peer_name)(struct dcerpc_pipe *);
+       } transport;
+
+       /* the last fault code from a DCERPC fault */
+       uint32 last_fault_code;
 };
 
 /* dcerpc pipe flags */
-#define DCERPC_DEBUG_PRINT_IN  1
-#define DCERPC_DEBUG_PRINT_OUT 2
+#define DCERPC_DEBUG_PRINT_IN  (1<<0)
+#define DCERPC_DEBUG_PRINT_OUT (1<<1)
 #define DCERPC_DEBUG_PRINT_BOTH (DCERPC_DEBUG_PRINT_IN | DCERPC_DEBUG_PRINT_OUT)
 
 #define DCERPC_DEBUG_VALIDATE_IN  4
 #define DCERPC_DEBUG_VALIDATE_OUT 8
 #define DCERPC_DEBUG_VALIDATE_BOTH (DCERPC_DEBUG_VALIDATE_IN | DCERPC_DEBUG_VALIDATE_OUT)
+
+#define DCERPC_SIGN            16
+#define DCERPC_SEAL            32
+
+/*
+  this is used to find pointers to calls
+*/
+struct dcerpc_interface_call {
+       const char *name;
+       size_t struct_size;
+       NTSTATUS (*ndr_push)(struct ndr_push *, int , void *);
+       NTSTATUS (*ndr_pull)(struct ndr_pull *, int , void *);
+       void (*ndr_print)(struct ndr_print *, const char *, int, void *);       
+};
+
+struct dcerpc_endpoint_list {
+       uint32 count;
+       const char **names;
+};
+
+struct dcerpc_interface_table {
+       const char *name;
+       const char *uuid;
+       uint32 if_version;
+       uint32 num_calls;
+       const struct dcerpc_interface_call *calls;
+       const struct dcerpc_endpoint_list *endpoints;
+};
+
+
+enum dcerpc_transport_t {NCACN_NP, NCACN_IP_TCP};
+
+/* this describes a binding to a particular transport/pipe */
+struct dcerpc_binding {
+       enum dcerpc_transport_t transport;
+       const char *host;
+       const char **options;
+       uint32 flags;
+};