Remove "typedef struct ndr_syntax_id RPC_IFACE;"
authorVolker Lendecke <vl@samba.org>
Sun, 5 Jul 2009 08:13:03 +0000 (10:13 +0200)
committerVolker Lendecke <vl@samba.org>
Sun, 5 Jul 2009 21:50:12 +0000 (23:50 +0200)
source3/include/proto.h
source3/include/rpc_dce.h
source3/rpc_client/cli_pipe.c
source3/rpc_parse/parse_rpc.c
source3/rpc_server/srv_pipe.c

index 73ecbfa2bd8a122e7a32cf77d2e631f84f685c12..40f0a1bbdc51d8d70a3be10a36a489f3e20d406a 100644 (file)
@@ -5693,7 +5693,8 @@ void init_rpc_hdr(RPC_HDR *hdr, enum RPC_PKT_TYPE pkt_type, uint8 flags,
                                uint32 call_id, int data_len, int auth_len);
 bool smb_io_rpc_hdr(const char *desc,  RPC_HDR *rpc, prs_struct *ps, int depth);
 void init_rpc_context(RPC_CONTEXT *rpc_ctx, uint16 context_id,
-                     const RPC_IFACE *abstract, const RPC_IFACE *transfer);
+                     const struct ndr_syntax_id *abstract,
+                     const struct ndr_syntax_id *transfer);
 void init_rpc_hdr_rb(RPC_HDR_RB *rpc, 
                                uint16 max_tsize, uint16 max_rsize, uint32 assoc_gid,
                                RPC_CONTEXT *context);
@@ -5703,7 +5704,7 @@ void init_rpc_hdr_ba(RPC_HDR_BA *rpc,
                                uint16 max_tsize, uint16 max_rsize, uint32 assoc_gid,
                                const char *pipe_addr,
                                uint8 num_results, uint16 result, uint16 reason,
-                               RPC_IFACE *transfer);
+                               struct ndr_syntax_id *transfer);
 bool smb_io_rpc_hdr_ba(const char *desc, RPC_HDR_BA *rpc, prs_struct *ps, int depth);
 void init_rpc_hdr_req(RPC_HDR_REQ *hdr, uint32 alloc_hint, uint16 opnum);
 bool smb_io_rpc_hdr_req(const char *desc, RPC_HDR_REQ *rpc, prs_struct *ps, int depth);
index 8780169c75e40278072661c7bd401b0c06468cd3..50ca9800d184da0379b9a984859614f19ffd4a24 100644 (file)
@@ -101,9 +101,6 @@ enum schannel_direction {
 /* #define MAX_PDU_FRAG_LEN 0x1630             this is what wnt sets */
 #define RPC_MAX_PDU_FRAG_LEN 0x10b8                    /* this is what w2k sets */
 
-/* RPC_IFACE */
-typedef struct ndr_syntax_id RPC_IFACE;
-
 #define RPC_IFACE_LEN (UUID_SIZE + 4)
 
 /* RPC_HDR - dce rpc header */
@@ -202,8 +199,8 @@ typedef struct rpc_auth_schannel_chk_info {
 typedef struct rpc_context {
        uint16 context_id;              /* presentation context identifier. */
        uint8 num_transfer_syntaxes;    /* the number of syntaxes */
-       RPC_IFACE abstract;             /* num and vers. of interface client is using */
-       RPC_IFACE *transfer;            /* Array of transfer interfaces. */
+       struct ndr_syntax_id abstract;  /* num and vers. of interface client is using */
+       struct ndr_syntax_id *transfer; /* Array of transfer interfaces. */
 } RPC_CONTEXT;
 
 /* RPC_BIND_REQ - ms req bind */
@@ -241,7 +238,7 @@ typedef struct rpc_hdr_ba_info {
 
        RPC_ADDR_STR addr    ;  /* the secondary address string, as described earlier */
        RPC_RESULTS  res     ; /* results and reasons */
-       RPC_IFACE    transfer; /* the transfer syntax from the request */
+       struct ndr_syntax_id transfer; /* the transfer syntax from the request */
 } RPC_HDR_BA;
 
 /* RPC_AUTH_VERIFIER */
index 7d059e41c96416b50b09ede37d8768b5dd033fb4..70660da8b205e0e62c40fd0e589ee496e5d99f8d 100644 (file)
@@ -56,7 +56,7 @@ static const struct pipe_id_info {
        /* the names appear not to matter: the syntaxes _do_ matter */
 
        const char *client_pipe;
-       const RPC_IFACE *abstr_syntax; /* this one is the abstract syntax id */
+       const struct ndr_syntax_id *abstr_syntax; /* this one is the abstract syntax id */
 } pipe_names [] =
 {
        { PIPE_LSARPC,          &ndr_table_lsarpc.syntax_id },
@@ -1649,8 +1649,8 @@ static NTSTATUS create_schannel_auth_rpc_bind_req( struct rpc_pipe_client *cli,
 static NTSTATUS create_bind_or_alt_ctx_internal(enum RPC_PKT_TYPE pkt_type,
                                                prs_struct *rpc_out, 
                                                uint32 rpc_call_id,
-                                               const RPC_IFACE *abstract,
-                                               const RPC_IFACE *transfer,
+                                               const struct ndr_syntax_id *abstract,
+                                               const struct ndr_syntax_id *transfer,
                                                RPC_HDR_AUTH *phdr_auth,
                                                prs_struct *pauth_info)
 {
@@ -1731,8 +1731,8 @@ static NTSTATUS create_bind_or_alt_ctx_internal(enum RPC_PKT_TYPE pkt_type,
 static NTSTATUS create_rpc_bind_req(struct rpc_pipe_client *cli,
                                prs_struct *rpc_out, 
                                uint32 rpc_call_id,
-                               const RPC_IFACE *abstract,
-                               const RPC_IFACE *transfer,
+                               const struct ndr_syntax_id *abstract,
+                               const struct ndr_syntax_id *transfer,
                                enum pipe_auth_type auth_type,
                                enum pipe_auth_level auth_level)
 {
@@ -2368,7 +2368,8 @@ static bool rpc_pipe_set_hnd_state(struct rpc_pipe_client *cli,
  Check the rpc bind acknowledge response.
 ****************************************************************************/
 
-static bool check_bind_response(RPC_HDR_BA *hdr_ba, const RPC_IFACE *transfer)
+static bool check_bind_response(RPC_HDR_BA *hdr_ba,
+                               const struct ndr_syntax_id *transfer)
 {
        if ( hdr_ba->addr.len == 0) {
                DEBUG(4,("Ignoring length check -- ASU bug (server didn't fill in the pipe name correctly)"));
@@ -2458,8 +2459,8 @@ static NTSTATUS create_rpc_bind_auth3(struct rpc_pipe_client *cli,
  ********************************************************************/
 
 static NTSTATUS create_rpc_alter_context(uint32 rpc_call_id,
-                                       const RPC_IFACE *abstract,
-                                       const RPC_IFACE *transfer,
+                                       const struct ndr_syntax_id *abstract,
+                                       const struct ndr_syntax_id *transfer,
                                        enum pipe_auth_level auth_level,
                                        const DATA_BLOB *pauth_blob, /* spnego auth blob already created. */
                                        prs_struct *rpc_out)
index 14a4effbf036c2856c82ed7ca680093b967bde0f..6942bf9060aac91642f7ceb14dbe628963dc8d64 100644 (file)
@@ -100,10 +100,11 @@ bool smb_io_rpc_hdr(const char *desc,  RPC_HDR *rpc, prs_struct *ps, int depth)
 }
 
 /*******************************************************************
- Reads or writes an RPC_IFACE structure.
+ Reads or writes an struct ndr_syntax_id structure.
 ********************************************************************/
 
-static bool smb_io_rpc_iface(const char *desc, RPC_IFACE *ifc, prs_struct *ps, int depth)
+static bool smb_io_rpc_iface(const char *desc, struct ndr_syntax_id *ifc,
+                            prs_struct *ps, int depth)
 {
        if (ifc == NULL)
                return False;
@@ -192,7 +193,8 @@ static bool smb_io_rpc_hdr_bba(const char *desc,  RPC_HDR_BBA *rpc, prs_struct *
 ********************************************************************/
 
 void init_rpc_context(RPC_CONTEXT *rpc_ctx, uint16 context_id,
-                     const RPC_IFACE *abstract, const RPC_IFACE *transfer)
+                     const struct ndr_syntax_id *abstract,
+                     const struct ndr_syntax_id *transfer)
 {
        rpc_ctx->context_id   = context_id   ; /* presentation context identifier (0x0) */
        rpc_ctx->num_transfer_syntaxes = 1 ; /* the number of syntaxes (has always been 1?)(0x1) */
@@ -201,7 +203,7 @@ void init_rpc_context(RPC_CONTEXT *rpc_ctx, uint16 context_id,
        rpc_ctx->abstract = *abstract;
 
        /* vers. of interface to use for replies */
-       rpc_ctx->transfer = CONST_DISCARD(RPC_IFACE *, transfer);
+       rpc_ctx->transfer = CONST_DISCARD(struct ndr_syntax_id *, transfer);
 }
 
 /*******************************************************************
@@ -245,7 +247,7 @@ bool smb_io_rpc_context(const char *desc, RPC_CONTEXT *rpc_ctx, prs_struct *ps,
                return False;
 
        if (UNMARSHALLING(ps)) {
-               if (!(rpc_ctx->transfer = PRS_ALLOC_MEM(ps, RPC_IFACE, rpc_ctx->num_transfer_syntaxes))) {
+               if (!(rpc_ctx->transfer = PRS_ALLOC_MEM(ps, struct ndr_syntax_id, rpc_ctx->num_transfer_syntaxes))) {
                        return False;
                }
        }
@@ -352,7 +354,7 @@ void init_rpc_hdr_ba(RPC_HDR_BA *rpc,
                                uint16 max_tsize, uint16 max_rsize, uint32 assoc_gid,
                                const char *pipe_addr,
                                uint8 num_results, uint16 result, uint16 reason,
-                               RPC_IFACE *transfer)
+                               struct ndr_syntax_id *transfer)
 {
        init_rpc_hdr_bba (&rpc->bba, max_tsize, max_rsize, assoc_gid);
        init_rpc_addr_str(&rpc->addr, pipe_addr);
index 73c95ebaa3f74dc05249e95a4c86c88760ed732d..c94e59422e50e2230ed25dc7d59e9d74b373457c 100644 (file)
@@ -950,8 +950,10 @@ bool setup_cancel_ack_reply(pipes_struct *p, prs_struct *rpc_in_p)
  Used to reject unknown binds from Win2k.
 *******************************************************************/
 
-static bool check_bind_req(struct pipes_struct *p, RPC_IFACE* abstract,
-                          RPC_IFACE* transfer, uint32 context_id)
+static bool check_bind_req(struct pipes_struct *p,
+                          struct ndr_syntax_id* abstract,
+                          struct ndr_syntax_id* transfer,
+                          uint32 context_id)
 {
        int i=0;
        struct pipe_rpc_fns *context_fns;
@@ -1718,7 +1720,7 @@ bool api_pipe_bind_req(pipes_struct *p, prs_struct *rpc_in_p)
                        0x1, 0x0, 0x0,
                        &hdr_rb.rpc_context[0].transfer[0]);
        } else {
-               RPC_IFACE null_interface;
+               struct ndr_syntax_id null_interface;
                ZERO_STRUCT(null_interface);
                /* Rejection reason: abstract syntax not supported */
                init_rpc_hdr_ba(&hdr_ba, RPC_MAX_PDU_FRAG_LEN,
@@ -1908,7 +1910,7 @@ bool api_pipe_alter_context(pipes_struct *p, prs_struct *rpc_in_p)
                        0x1, 0x0, 0x0,
                        &hdr_rb.rpc_context[0].transfer[0]);
        } else {
-               RPC_IFACE null_interface;
+               struct ndr_syntax_id null_interface;
                ZERO_STRUCT(null_interface);
                /* Rejection reason: abstract syntax not supported */
                init_rpc_hdr_ba(&hdr_ba, RPC_MAX_PDU_FRAG_LEN,