mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
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 commit is contained in:
parent
3cca299c72
commit
2ed014cfb8
@ -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 {
|
||||
|
@ -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;
|
||||
|
||||
|
||||
|
@ -16,6 +16,11 @@ interface misc
|
||||
uint8 node[6];
|
||||
} GUID;
|
||||
|
||||
typedef [public] struct {
|
||||
GUID uuid;
|
||||
uint32 if_version;
|
||||
} ndr_syntax_id;
|
||||
|
||||
typedef [public] struct {
|
||||
uint32 handle_type;
|
||||
GUID uuid;
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
};
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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 *);
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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");
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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",
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user