summaryrefslogtreecommitdiff
path: root/source4/librpc
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-08-18 06:57:49 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:02:11 -0500
commitce84ab9a83441845202e99f8ffd4512839926024 (patch)
treef77e855f39947f4078d6ab160d212db0758aba08 /source4/librpc
parentfb19fe7a512db0da16b9dfe226f51d99b86df0a6 (diff)
downloadsamba-ce84ab9a83441845202e99f8ffd4512839926024.tar.gz
samba-ce84ab9a83441845202e99f8ffd4512839926024.tar.bz2
samba-ce84ab9a83441845202e99f8ffd4512839926024.zip
r24532: rename struct dcerpc_syntax_id into struct ndr_syntax_id
and move it into misc.idl The goal is to get rid a all dcerpc specific stuff in the generated ndr layer. metze (This used to be commit 2ed014cfb894cccab1654e3f7d5876393e2b52d7)
Diffstat (limited to 'source4/librpc')
-rw-r--r--source4/librpc/idl/dcerpc.idl11
-rw-r--r--source4/librpc/idl/mgmt.idl6
-rw-r--r--source4/librpc/idl/misc.idl5
-rw-r--r--source4/librpc/ndr/libndr.h6
-rw-r--r--source4/librpc/ndr/ndr.c4
-rw-r--r--source4/librpc/rpc/dcerpc.c12
-rw-r--r--source4/librpc/rpc/dcerpc.h8
-rw-r--r--source4/librpc/rpc/dcerpc_auth.c10
-rw-r--r--source4/librpc/rpc/dcerpc_util.c6
9 files changed, 34 insertions, 34 deletions
diff --git a/source4/librpc/idl/dcerpc.idl b/source4/librpc/idl/dcerpc.idl
index 75fd051ef1..c864bd4b39 100644
--- a/source4/librpc/idl/dcerpc.idl
+++ b/source4/librpc/idl/dcerpc.idl
@@ -12,16 +12,11 @@ import "misc.idl";
interface dcerpc
{
- typedef [public] struct {
- GUID uuid;
- uint32 if_version;
- } dcerpc_syntax_id;
-
typedef struct {
uint16 context_id;
uint8 num_transfer_syntaxes;
- dcerpc_syntax_id abstract_syntax;
- dcerpc_syntax_id transfer_syntaxes[num_transfer_syntaxes];
+ ndr_syntax_id abstract_syntax;
+ ndr_syntax_id transfer_syntaxes[num_transfer_syntaxes];
} dcerpc_ctx_list;
typedef struct {
@@ -62,7 +57,7 @@ interface dcerpc
typedef struct {
uint16 result;
uint16 reason;
- dcerpc_syntax_id syntax;
+ ndr_syntax_id syntax;
} dcerpc_ack_ctx;
typedef struct {
diff --git a/source4/librpc/idl/mgmt.idl b/source4/librpc/idl/mgmt.idl
index 8aae05e953..60d1ebdc85 100644
--- a/source4/librpc/idl/mgmt.idl
+++ b/source4/librpc/idl/mgmt.idl
@@ -11,12 +11,12 @@
interface mgmt
{
typedef struct {
- dcerpc_syntax_id *id;
- } dcerpc_syntax_id_p;
+ ndr_syntax_id *id;
+ } ndr_syntax_id_p;
typedef struct {
uint32 count;
- [size_is(count)] dcerpc_syntax_id_p if_id[*];
+ [size_is(count)] ndr_syntax_id_p if_id[*];
} rpc_if_id_vector_t;
diff --git a/source4/librpc/idl/misc.idl b/source4/librpc/idl/misc.idl
index 2b099a6164..0861758187 100644
--- a/source4/librpc/idl/misc.idl
+++ b/source4/librpc/idl/misc.idl
@@ -17,6 +17,11 @@ interface misc
} GUID;
typedef [public] struct {
+ GUID uuid;
+ uint32 if_version;
+ } ndr_syntax_id;
+
+ typedef [public] struct {
uint32 handle_type;
GUID uuid;
} policy_handle;
diff --git a/source4/librpc/ndr/libndr.h b/source4/librpc/ndr/libndr.h
index 3f46788c0d..93da5b02d5 100644
--- a/source4/librpc/ndr/libndr.h
+++ b/source4/librpc/ndr/libndr.h
@@ -284,12 +284,12 @@ typedef NTSTATUS (*ndr_pull_flags_fn_t)(struct ndr_pull *, int ndr_flags, void *
typedef void (*ndr_print_fn_t)(struct ndr_print *, const char *, const void *);
typedef void (*ndr_print_function_t)(struct ndr_print *, const char *, int, const void *);
-extern const struct dcerpc_syntax_id ndr_transfer_syntax;
-extern const struct dcerpc_syntax_id ndr64_transfer_syntax;
-
#include "librpc/gen_ndr/misc.h"
#include "librpc/ndr/libndr_proto.h"
+extern const struct ndr_syntax_id ndr_transfer_syntax;
+extern const struct ndr_syntax_id ndr64_transfer_syntax;
+
/* FIXME: Use represent_as instead */
struct dom_sid;
NTSTATUS ndr_push_dom_sid2(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *sid);
diff --git a/source4/librpc/ndr/ndr.c b/source4/librpc/ndr/ndr.c
index 5db5e5d1e3..9fb39beff3 100644
--- a/source4/librpc/ndr/ndr.c
+++ b/source4/librpc/ndr/ndr.c
@@ -34,12 +34,12 @@
#define NDR_BASE_MARSHALL_SIZE 1024
/* this guid indicates NDR encoding in a protocol tower */
-const struct dcerpc_syntax_id ndr_transfer_syntax = {
+const struct ndr_syntax_id ndr_transfer_syntax = {
{ 0x8a885d04, 0x1ceb, 0x11c9, {0x9f, 0xe8}, {0x08,0x00,0x2b,0x10,0x48,0x60} },
2
};
-const struct dcerpc_syntax_id ndr64_transfer_syntax = {
+const struct ndr_syntax_id ndr64_transfer_syntax = {
{ 0x71710533, 0xbeba, 0x4937, {0x83, 0x19}, {0xb5,0xdb,0xef,0x9c,0xcc,0x36} },
1
};
diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c
index 20b4dd241b..a687df86b0 100644
--- a/source4/librpc/rpc/dcerpc.c
+++ b/source4/librpc/rpc/dcerpc.c
@@ -691,8 +691,8 @@ static void dcerpc_timeout_handler(struct event_context *ev, struct timed_event
*/
struct composite_context *dcerpc_bind_send(struct dcerpc_pipe *p,
TALLOC_CTX *mem_ctx,
- const struct dcerpc_syntax_id *syntax,
- const struct dcerpc_syntax_id *transfer_syntax)
+ const struct ndr_syntax_id *syntax,
+ const struct ndr_syntax_id *transfer_syntax)
{
struct composite_context *c;
struct ncacn_packet pkt;
@@ -1562,8 +1562,8 @@ static void dcerpc_alter_recv_handler(struct rpc_request *req,
*/
struct composite_context *dcerpc_alter_context_send(struct dcerpc_pipe *p,
TALLOC_CTX *mem_ctx,
- const struct dcerpc_syntax_id *syntax,
- const struct dcerpc_syntax_id *transfer_syntax)
+ const struct ndr_syntax_id *syntax,
+ const struct ndr_syntax_id *transfer_syntax)
{
struct composite_context *c;
struct ncacn_packet pkt;
@@ -1646,8 +1646,8 @@ NTSTATUS dcerpc_alter_context_recv(struct composite_context *ctx)
*/
NTSTATUS dcerpc_alter_context(struct dcerpc_pipe *p,
TALLOC_CTX *mem_ctx,
- const struct dcerpc_syntax_id *syntax,
- const struct dcerpc_syntax_id *transfer_syntax)
+ const struct ndr_syntax_id *syntax,
+ const struct ndr_syntax_id *transfer_syntax)
{
struct composite_context *creq;
creq = dcerpc_alter_context_send(p, mem_ctx, syntax, transfer_syntax);
diff --git a/source4/librpc/rpc/dcerpc.h b/source4/librpc/rpc/dcerpc.h
index e9e283c7c8..362c0f9c25 100644
--- a/source4/librpc/rpc/dcerpc.h
+++ b/source4/librpc/rpc/dcerpc.h
@@ -98,8 +98,8 @@ struct dcerpc_pipe {
uint32_t assoc_group_id;
- struct dcerpc_syntax_id syntax;
- struct dcerpc_syntax_id transfer_syntax;
+ struct ndr_syntax_id syntax;
+ struct ndr_syntax_id transfer_syntax;
struct dcerpc_connection *conn;
struct dcerpc_binding *binding;
@@ -182,7 +182,7 @@ struct dcerpc_authservice_list {
struct dcerpc_interface_table {
const char *name;
- struct dcerpc_syntax_id syntax_id;
+ struct ndr_syntax_id syntax_id;
const char *helpstring;
uint32_t num_calls;
const struct dcerpc_interface_call *calls;
@@ -198,7 +198,7 @@ struct dcerpc_interface_list {
/* this describes a binding to a particular transport/pipe */
struct dcerpc_binding {
enum dcerpc_transport_t transport;
- struct dcerpc_syntax_id object;
+ struct ndr_syntax_id object;
const char *host;
const char *target_hostname;
const char *endpoint;
diff --git a/source4/librpc/rpc/dcerpc_auth.c b/source4/librpc/rpc/dcerpc_auth.c
index 0caf574f86..8298b1ecbe 100644
--- a/source4/librpc/rpc/dcerpc_auth.c
+++ b/source4/librpc/rpc/dcerpc_auth.c
@@ -30,8 +30,8 @@
return the rpc syntax and transfer syntax given the pipe uuid and version
*/
static NTSTATUS dcerpc_init_syntaxes(const struct dcerpc_interface_table *table,
- struct dcerpc_syntax_id *syntax,
- struct dcerpc_syntax_id *transfer_syntax)
+ struct ndr_syntax_id *syntax,
+ struct ndr_syntax_id *transfer_syntax)
{
syntax->uuid = table->syntax_id.uuid;
syntax->if_version = table->syntax_id.if_version;
@@ -49,8 +49,8 @@ struct composite_context *dcerpc_bind_auth_none_send(TALLOC_CTX *mem_ctx,
struct dcerpc_pipe *p,
const struct dcerpc_interface_table *table)
{
- struct dcerpc_syntax_id syntax;
- struct dcerpc_syntax_id transfer_syntax;
+ struct ndr_syntax_id syntax;
+ struct ndr_syntax_id transfer_syntax;
struct composite_context *c;
@@ -218,7 +218,7 @@ struct composite_context *dcerpc_bind_auth_send(TALLOC_CTX *mem_ctx,
struct bind_auth_state *state;
struct dcerpc_security *sec;
- struct dcerpc_syntax_id syntax, transfer_syntax;
+ struct ndr_syntax_id syntax, transfer_syntax;
/* composite context allocation and setup */
c = composite_create(mem_ctx, p->conn->event_ctx);
diff --git a/source4/librpc/rpc/dcerpc_util.c b/source4/librpc/rpc/dcerpc_util.c
index 49e1516f54..3e18a66af5 100644
--- a/source4/librpc/rpc/dcerpc_util.c
+++ b/source4/librpc/rpc/dcerpc_util.c
@@ -151,7 +151,7 @@ static const struct {
const char *epm_floor_string(TALLOC_CTX *mem_ctx, struct epm_floor *epm_floor)
{
- struct dcerpc_syntax_id syntax;
+ struct ndr_syntax_id syntax;
NTSTATUS status;
switch(epm_floor->lhs.protocol) {
@@ -422,7 +422,7 @@ NTSTATUS dcerpc_parse_binding(TALLOC_CTX *mem_ctx, const char *s, struct dcerpc_
return NT_STATUS_OK;
}
-NTSTATUS dcerpc_floor_get_lhs_data(struct epm_floor *epm_floor, struct dcerpc_syntax_id *syntax)
+NTSTATUS dcerpc_floor_get_lhs_data(struct epm_floor *epm_floor, struct ndr_syntax_id *syntax)
{
TALLOC_CTX *mem_ctx = talloc_init("floor_get_lhs_data");
struct ndr_pull *ndr = ndr_pull_init_blob(&epm_floor->lhs.lhs_data, mem_ctx);
@@ -445,7 +445,7 @@ NTSTATUS dcerpc_floor_get_lhs_data(struct epm_floor *epm_floor, struct dcerpc_sy
return status;
}
-static DATA_BLOB dcerpc_floor_pack_lhs_data(TALLOC_CTX *mem_ctx, const struct dcerpc_syntax_id *syntax)
+static DATA_BLOB dcerpc_floor_pack_lhs_data(TALLOC_CTX *mem_ctx, const struct ndr_syntax_id *syntax)
{
struct ndr_push *ndr = ndr_push_init_ctx(mem_ctx);