libndr: Avoid assigning duplicate versions to symbols
[amitay/samba.git] / source3 / rpc_server / rpc_pipes.h
index 9df438d33a5259cc5394585191f7ab968f733194..1d59d2dd82037ada8cb01f42dbeec71abc67ef82 100644 (file)
 
 struct dcesrv_ep_entry_list;
 struct tsocket_address;
-struct handle_list;
 struct pipes_struct;
-
-struct pipe_rpc_fns {
-
-       struct pipe_rpc_fns *next, *prev;
-
-       /* RPC function table associated with the current rpc_bind (associated by context) */
-
-       uint32_t context_id;
-       struct ndr_syntax_id syntax;
-
-       /*
-        * shall we allow "connect" auth level for this interface ?
-        */
-       bool allow_connect;
-
-       /*
-        * minimal required auth level
-        */
-       enum dcerpc_AuthLevel min_auth_level;
-};
+struct dcesrv_context;
 
 /*
  * DCE/RPC-specific samba-internal-specific handling of data on
@@ -68,11 +48,6 @@ struct pipes_struct {
 
        struct dcesrv_ep_entry_list *ep_entries;
 
-       /* linked list of rpc dispatch tables associated 
-          with the open rpc contexts */
-
-       struct pipe_rpc_fns *contexts;
-
        struct pipe_auth_data auth;
 
        /*
@@ -85,17 +60,12 @@ struct pipes_struct {
         */
        int fault_state;
 
-       /*
-        * Set to RPC_BIG_ENDIAN when dealing with big-endian PDU's
-        */
-       bool endian;
-
        /* This context is used for PDU data and is freed between each pdu.
                Don't use for pipe state storage. */
        TALLOC_CTX *mem_ctx;
 
        /* handle database to use on this pipe. */
-       struct handle_list *pipe_handles;
+       struct dcesrv_call_state *dce_call;
 
        /* call id retrieved from the pdu header */
        uint32_t call_id;
@@ -112,23 +82,25 @@ int make_base_pipes_struct(TALLOC_CTX *mem_ctx,
                           struct messaging_context *msg_ctx,
                           const char *pipe_name,
                           enum dcerpc_transport_t transport,
-                          bool endian,
                           const struct tsocket_address *remote_address,
                           const struct tsocket_address *local_address,
                           struct pipes_struct **_p);
+
 bool check_open_pipes(void);
-int close_internal_rpc_pipe_hnd(struct pipes_struct *p);
+size_t num_pipe_handles(void);
 
-size_t num_pipe_handles(struct pipes_struct *p);
-bool init_pipe_handles(struct pipes_struct *p, const struct ndr_syntax_id *syntax);
 bool create_policy_hnd(struct pipes_struct *p,
                        struct policy_handle *hnd,
                        uint8_t handle_type,
                        void *data_ptr);
-bool find_policy_by_hnd(struct pipes_struct *p,
-                       const struct policy_handle *hnd,
-                       uint8_t handle_type,
-                       void **data_p);
+
+void *_find_policy_by_hnd(struct pipes_struct *p,
+                         const struct policy_handle *hnd,
+                         uint8_t handle_type,
+                         NTSTATUS *pstatus);
+#define find_policy_by_hnd(_p, _hnd, _hnd_type, _type, _pstatus) \
+       (_type *)_find_policy_by_hnd((_p), (_hnd), (_hnd_type), (_pstatus));
+
 bool close_policy_hnd(struct pipes_struct *p, struct policy_handle *hnd);
 void close_policy_by_pipe(struct pipes_struct *p);
 bool pipe_access_check(struct pipes_struct *p);