s3:librpc/rpc: add DCERPC_ANON_FALLBACK flag
[samba.git] / source3 / librpc / rpc / dcerpc.h
index 319acce990d930d3e916499529fc9c66ec44aada..79e47c0ef2092d47675a51bedce9718d46cb910a 100644 (file)
  * If you remove any functions or change their signature, update 
  * the so version number. */
 
-#ifndef __DCERPC_H__
-#define __DCERPC_H__
-
-enum dcerpc_transport_t {
-       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, NCACN_INTERNAL };
-
-/** this describes a binding to a particular transport/pipe */
-struct dcerpc_binding {
-       enum dcerpc_transport_t transport;
-       struct ndr_syntax_id object;
-       const char *host;
-       const char *target_hostname;
-       const char *endpoint;
-       const char **options;
-       uint32_t flags;
-       uint32_t assoc_group_id;
-};
+#ifndef _S3_DCERPC_H__
+#define _S3_DCERPC_H__
 
+#include "../librpc/rpc/rpc_common.h"
+
+#define SMB_RPC_INTERFACE_VERSION 1
 
 /* dcerpc pipe flags */
 #define DCERPC_DEBUG_PRINT_IN          (1<<0)
@@ -62,6 +48,8 @@ struct dcerpc_binding {
 
 #define DCERPC_SCHANNEL                (1<<9)
 
+#define DCERPC_ANON_FALLBACK           (1<<10)
+
 /* use a 128 bit session key */
 #define DCERPC_SCHANNEL_128            (1<<12)
 
@@ -93,8 +81,13 @@ struct dcerpc_binding {
 /* use NDR64 transport */
 #define DCERPC_NDR64                   (1<<21)
 
+/* specify binding interface */
+#define        DCERPC_LOCALADDRESS            (1<<22)
+
 /* The following definitions come from librpc/rpc/binding.c  */
 
+struct epm_floor;
+struct epm_tower;
 const char *epm_floor_string(TALLOC_CTX *mem_ctx, struct epm_floor *epm_floor);
 _PUBLIC_ char *dcerpc_binding_string(TALLOC_CTX *mem_ctx, const struct dcerpc_binding *b);
 _PUBLIC_ NTSTATUS dcerpc_parse_binding(TALLOC_CTX *mem_ctx, const char *s, struct dcerpc_binding **b_out);
@@ -112,6 +105,7 @@ _PUBLIC_ NTSTATUS dcerpc_binding_build_tower(TALLOC_CTX *mem_ctx,
                                             struct epm_tower *tower);
 
 struct NL_AUTH_MESSAGE;
+struct pipe_auth_data;
 
 /* The following definitions come from librpc/rpc/dcerpc_helpers.c  */
 NTSTATUS dcerpc_push_ncacn_packet(TALLOC_CTX *mem_ctx,
@@ -139,7 +133,18 @@ NTSTATUS dcerpc_pull_dcerpc_auth(TALLOC_CTX *mem_ctx,
                                 const DATA_BLOB *blob,
                                 struct dcerpc_auth *r,
                                 bool bigendian);
+NTSTATUS dcerpc_guess_sizes(struct pipe_auth_data *auth,
+                           size_t header_len, size_t data_left,
+                           size_t max_xmit_frag, size_t pad_alignment,
+                           size_t *data_to_send, size_t *frag_len,
+                           size_t *auth_len, size_t *pad_len);
 NTSTATUS dcerpc_add_auth_footer(struct pipe_auth_data *auth,
                                size_t pad_len, DATA_BLOB *rpc_out);
-
-#endif /* __DCERPC_H__ */
+NTSTATUS dcerpc_check_auth(struct pipe_auth_data *auth,
+                          struct ncacn_packet *pkt,
+                          DATA_BLOB *pkt_trailer,
+                          size_t header_size,
+                          DATA_BLOB *raw_pkt,
+                          size_t *pad_len);
+
+#endif /* __S3_DCERPC_H__ */