summaryrefslogtreecommitdiff
path: root/source4
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
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')
-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
-rw-r--r--source4/rpc_server/dcerpc_server.h2
-rw-r--r--source4/rpc_server/dcesrv_mgmt.c2
-rw-r--r--source4/rpc_server/epmapper/rpc_epmapper.c2
-rw-r--r--source4/torture/rpc/alter_context.c4
-rw-r--r--source4/torture/rpc/epmapper.c2
-rw-r--r--source4/torture/rpc/mgmt.c4
-rw-r--r--source4/torture/rpc/scanner.c4
16 files changed, 44 insertions, 44 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);
diff --git a/source4/rpc_server/dcerpc_server.h b/source4/rpc_server/dcerpc_server.h
index 1a003b6adf..f7b785abab 100644
--- a/source4/rpc_server/dcerpc_server.h
+++ b/source4/rpc_server/dcerpc_server.h
@@ -42,7 +42,7 @@ struct dcesrv_connection_context;
struct dcesrv_interface {
const char *name;
- struct dcerpc_syntax_id syntax_id;
+ struct ndr_syntax_id syntax_id;
/* this function is called when the client binds to this interface */
NTSTATUS (*bind)(struct dcesrv_call_state *, const struct dcesrv_interface *);
diff --git a/source4/rpc_server/dcesrv_mgmt.c b/source4/rpc_server/dcesrv_mgmt.c
index c89389b4e0..3a8f9956c2 100644
--- a/source4/rpc_server/dcesrv_mgmt.c
+++ b/source4/rpc_server/dcesrv_mgmt.c
@@ -39,7 +39,7 @@ static WERROR dcesrv_mgmt_inq_if_ids(struct dcesrv_call_state *dce_call, TALLOC_
vector->if_id = NULL;
for (l = ep->interface_list; l; l = l->next) {
vector->count++;
- vector->if_id = talloc_realloc(mem_ctx, vector->if_id, struct dcerpc_syntax_id_p, vector->count);
+ vector->if_id = talloc_realloc(mem_ctx, vector->if_id, struct ndr_syntax_id_p, vector->count);
vector->if_id[vector->count-1].id = &l->iface.syntax_id;
}
return WERR_OK;
diff --git a/source4/rpc_server/epmapper/rpc_epmapper.c b/source4/rpc_server/epmapper/rpc_epmapper.c
index b5903fd17f..5491bd242a 100644
--- a/source4/rpc_server/epmapper/rpc_epmapper.c
+++ b/source4/rpc_server/epmapper/rpc_epmapper.c
@@ -173,7 +173,7 @@ static error_status_t dcesrv_epm_Map(struct dcesrv_call_state *dce_call, TALLOC_
struct dcesrv_ep_iface *eps;
struct epm_floor *floors;
enum dcerpc_transport_t transport;
- struct dcerpc_syntax_id ndr_syntax;
+ struct ndr_syntax_id ndr_syntax;
count = build_ep_list(mem_ctx, dce_call->conn->dce_ctx->endpoint_list, &eps);
diff --git a/source4/torture/rpc/alter_context.c b/source4/torture/rpc/alter_context.c
index 097df5acb3..a78cd38893 100644
--- a/source4/torture/rpc/alter_context.c
+++ b/source4/torture/rpc/alter_context.c
@@ -34,8 +34,8 @@ BOOL torture_rpc_alter_context(struct torture_context *torture)
BOOL ret = True;
struct policy_handle *handle;
struct dcerpc_interface_table tmptbl;
- struct dcerpc_syntax_id syntax;
- struct dcerpc_syntax_id transfer_syntax;
+ struct ndr_syntax_id syntax;
+ struct ndr_syntax_id transfer_syntax;
mem_ctx = talloc_init("torture_rpc_alter_context");
diff --git a/source4/torture/rpc/epmapper.c b/source4/torture/rpc/epmapper.c
index 4d4f481433..8e953efc2c 100644
--- a/source4/torture/rpc/epmapper.c
+++ b/source4/torture/rpc/epmapper.c
@@ -47,7 +47,7 @@ static BOOL test_Map(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
struct GUID uuid;
struct policy_handle handle;
int i;
- struct dcerpc_syntax_id syntax;
+ struct ndr_syntax_id syntax;
uint32_t num_towers;
ZERO_STRUCT(uuid);
diff --git a/source4/torture/rpc/mgmt.c b/source4/torture/rpc/mgmt.c
index 2557d5827a..80388f319d 100644
--- a/source4/torture/rpc/mgmt.c
+++ b/source4/torture/rpc/mgmt.c
@@ -32,7 +32,7 @@
BOOL test_inq_if_ids(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
BOOL (*per_id_test)(const struct dcerpc_interface_table *iface,
TALLOC_CTX *mem_ctx,
- struct dcerpc_syntax_id *id),
+ struct ndr_syntax_id *id),
const void *priv)
{
NTSTATUS status;
@@ -60,7 +60,7 @@ BOOL test_inq_if_ids(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
}
for (i=0;i<vector->count;i++) {
- struct dcerpc_syntax_id *id = vector->if_id[i].id;
+ struct ndr_syntax_id *id = vector->if_id[i].id;
if (!id) continue;
printf("\tuuid %s version 0x%08x '%s'\n",
diff --git a/source4/torture/rpc/scanner.c b/source4/torture/rpc/scanner.c
index 0859ab93c2..62de0a9e63 100644
--- a/source4/torture/rpc/scanner.c
+++ b/source4/torture/rpc/scanner.c
@@ -30,7 +30,7 @@
*/
static BOOL test_num_calls(const struct dcerpc_interface_table *iface,
TALLOC_CTX *mem_ctx,
- struct dcerpc_syntax_id *id)
+ struct ndr_syntax_id *id)
{
struct dcerpc_pipe *p;
NTSTATUS status;
@@ -40,7 +40,7 @@ static BOOL test_num_calls(const struct dcerpc_interface_table *iface,
struct dcerpc_interface_table tbl;
/* FIXME: This should be fixed when torture_rpc_connection
- * takes a dcerpc_syntax_id */
+ * takes a ndr_syntax_id */
tbl.name = iface->name;
tbl.syntax_id = *id;