[PATCH 4/4] idl: add generated code

Matthieu Patou mat at matws.net
Thu Dec 10 05:14:19 MST 2009


---
 librpc/gen_ndr/cli_trans.c | 1237 +++++++++++++++++++++++++++++++++
 librpc/gen_ndr/cli_trans.h |   90 +++
 librpc/gen_ndr/ndr_trans.c | 1630 ++++++++++++++++++++++++++++++++++++++++++++
 librpc/gen_ndr/ndr_trans.h |   58 ++
 librpc/gen_ndr/srv_trans.c |  770 +++++++++++++++++++++
 librpc/gen_ndr/srv_trans.h |   25 +
 librpc/gen_ndr/trans.h     |  192 ++++++
 7 files changed, 4002 insertions(+), 0 deletions(-)
 create mode 100644 librpc/gen_ndr/cli_trans.c
 create mode 100644 librpc/gen_ndr/cli_trans.h
 create mode 100644 librpc/gen_ndr/ndr_trans.c
 create mode 100644 librpc/gen_ndr/ndr_trans.h
 create mode 100644 librpc/gen_ndr/srv_trans.c
 create mode 100644 librpc/gen_ndr/srv_trans.h
 create mode 100644 librpc/gen_ndr/trans.h

diff --git a/librpc/gen_ndr/cli_trans.c b/librpc/gen_ndr/cli_trans.c
new file mode 100644
index 0000000..5821d72
--- /dev/null
+++ b/librpc/gen_ndr/cli_trans.c
@@ -0,0 +1,1237 @@
+/*
+ * Unix SMB/CIFS implementation.
+ * client auto-generated by pidl. DO NOT MODIFY!
+ */
+
+#include "includes.h"
+#include "../librpc/gen_ndr/cli_trans.h"
+
+struct rpccli_trans2_QueryFileInformation_state {
+	struct trans2_QueryFileInformation orig;
+	struct trans2_QueryFileInformation tmp;
+	TALLOC_CTX *out_mem_ctx;
+	NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
+};
+
+static void rpccli_trans2_QueryFileInformation_done(struct tevent_req *subreq);
+
+struct tevent_req *rpccli_trans2_QueryFileInformation_send(TALLOC_CTX *mem_ctx,
+							   struct tevent_context *ev,
+							   struct rpc_pipe_client *cli)
+{
+	struct tevent_req *req;
+	struct rpccli_trans2_QueryFileInformation_state *state;
+	struct tevent_req *subreq;
+
+	req = tevent_req_create(mem_ctx, &state,
+				struct rpccli_trans2_QueryFileInformation_state);
+	if (req == NULL) {
+		return NULL;
+	}
+	state->out_mem_ctx = NULL;
+	state->dispatch_recv = cli->dispatch_recv;
+
+	/* In parameters */
+
+	/* Out parameters */
+
+	/* Result */
+	ZERO_STRUCT(state->orig.out.result);
+
+	/* make a temporary copy, that we pass to the dispatch function */
+	state->tmp = state->orig;
+
+	subreq = cli->dispatch_send(state, ev, cli,
+				    &ndr_table_trans2,
+				    NDR_TRANS2_QUERYFILEINFORMATION,
+				    &state->tmp);
+	if (tevent_req_nomem(subreq, req)) {
+		return tevent_req_post(req, ev);
+	}
+	tevent_req_set_callback(subreq, rpccli_trans2_QueryFileInformation_done, req);
+	return req;
+}
+
+static void rpccli_trans2_QueryFileInformation_done(struct tevent_req *subreq)
+{
+	struct tevent_req *req = tevent_req_callback_data(
+		subreq, struct tevent_req);
+	struct rpccli_trans2_QueryFileInformation_state *state = tevent_req_data(
+		req, struct rpccli_trans2_QueryFileInformation_state);
+	NTSTATUS status;
+	TALLOC_CTX *mem_ctx;
+
+	if (state->out_mem_ctx) {
+		mem_ctx = state->out_mem_ctx;
+	} else {
+		mem_ctx = state;
+	}
+
+	status = state->dispatch_recv(subreq, mem_ctx);
+	TALLOC_FREE(subreq);
+	if (!NT_STATUS_IS_OK(status)) {
+		tevent_req_nterror(req, status);
+		return;
+	}
+
+	/* Copy out parameters */
+
+	/* Copy result */
+	state->orig.out.result = state->tmp.out.result;
+
+	/* Reset temporary structure */
+	ZERO_STRUCT(state->tmp);
+
+	tevent_req_done(req);
+}
+
+NTSTATUS rpccli_trans2_QueryFileInformation_recv(struct tevent_req *req,
+						 TALLOC_CTX *mem_ctx,
+						 WERROR *result)
+{
+	struct rpccli_trans2_QueryFileInformation_state *state = tevent_req_data(
+		req, struct rpccli_trans2_QueryFileInformation_state);
+	NTSTATUS status;
+
+	if (tevent_req_is_nterror(req, &status)) {
+		tevent_req_received(req);
+		return status;
+	}
+
+	/* Steal possbile out parameters to the callers context */
+	talloc_steal(mem_ctx, state->out_mem_ctx);
+
+	/* Return result */
+	*result = state->orig.out.result;
+
+	tevent_req_received(req);
+	return NT_STATUS_OK;
+}
+
+NTSTATUS rpccli_trans2_QueryFileInformation(struct rpc_pipe_client *cli,
+					    TALLOC_CTX *mem_ctx,
+					    WERROR *werror)
+{
+	struct trans2_QueryFileInformation r;
+	NTSTATUS status;
+
+	/* In parameters */
+
+	status = cli->dispatch(cli,
+				mem_ctx,
+				&ndr_table_trans2,
+				NDR_TRANS2_QUERYFILEINFORMATION,
+				&r);
+
+	if (!NT_STATUS_IS_OK(status)) {
+		return status;
+	}
+
+	if (NT_STATUS_IS_ERR(status)) {
+		return status;
+	}
+
+	/* Return variables */
+
+	/* Return result */
+	if (werror) {
+		*werror = r.out.result;
+	}
+
+	return werror_to_ntstatus(r.out.result);
+}
+
+struct rpccli_trans2_QueryPathInformation_state {
+	struct trans2_QueryPathInformation orig;
+	struct trans2_QueryPathInformation tmp;
+	TALLOC_CTX *out_mem_ctx;
+	NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
+};
+
+static void rpccli_trans2_QueryPathInformation_done(struct tevent_req *subreq);
+
+struct tevent_req *rpccli_trans2_QueryPathInformation_send(TALLOC_CTX *mem_ctx,
+							   struct tevent_context *ev,
+							   struct rpc_pipe_client *cli)
+{
+	struct tevent_req *req;
+	struct rpccli_trans2_QueryPathInformation_state *state;
+	struct tevent_req *subreq;
+
+	req = tevent_req_create(mem_ctx, &state,
+				struct rpccli_trans2_QueryPathInformation_state);
+	if (req == NULL) {
+		return NULL;
+	}
+	state->out_mem_ctx = NULL;
+	state->dispatch_recv = cli->dispatch_recv;
+
+	/* In parameters */
+
+	/* Out parameters */
+
+	/* Result */
+	ZERO_STRUCT(state->orig.out.result);
+
+	/* make a temporary copy, that we pass to the dispatch function */
+	state->tmp = state->orig;
+
+	subreq = cli->dispatch_send(state, ev, cli,
+				    &ndr_table_trans2,
+				    NDR_TRANS2_QUERYPATHINFORMATION,
+				    &state->tmp);
+	if (tevent_req_nomem(subreq, req)) {
+		return tevent_req_post(req, ev);
+	}
+	tevent_req_set_callback(subreq, rpccli_trans2_QueryPathInformation_done, req);
+	return req;
+}
+
+static void rpccli_trans2_QueryPathInformation_done(struct tevent_req *subreq)
+{
+	struct tevent_req *req = tevent_req_callback_data(
+		subreq, struct tevent_req);
+	struct rpccli_trans2_QueryPathInformation_state *state = tevent_req_data(
+		req, struct rpccli_trans2_QueryPathInformation_state);
+	NTSTATUS status;
+	TALLOC_CTX *mem_ctx;
+
+	if (state->out_mem_ctx) {
+		mem_ctx = state->out_mem_ctx;
+	} else {
+		mem_ctx = state;
+	}
+
+	status = state->dispatch_recv(subreq, mem_ctx);
+	TALLOC_FREE(subreq);
+	if (!NT_STATUS_IS_OK(status)) {
+		tevent_req_nterror(req, status);
+		return;
+	}
+
+	/* Copy out parameters */
+
+	/* Copy result */
+	state->orig.out.result = state->tmp.out.result;
+
+	/* Reset temporary structure */
+	ZERO_STRUCT(state->tmp);
+
+	tevent_req_done(req);
+}
+
+NTSTATUS rpccli_trans2_QueryPathInformation_recv(struct tevent_req *req,
+						 TALLOC_CTX *mem_ctx,
+						 WERROR *result)
+{
+	struct rpccli_trans2_QueryPathInformation_state *state = tevent_req_data(
+		req, struct rpccli_trans2_QueryPathInformation_state);
+	NTSTATUS status;
+
+	if (tevent_req_is_nterror(req, &status)) {
+		tevent_req_received(req);
+		return status;
+	}
+
+	/* Steal possbile out parameters to the callers context */
+	talloc_steal(mem_ctx, state->out_mem_ctx);
+
+	/* Return result */
+	*result = state->orig.out.result;
+
+	tevent_req_received(req);
+	return NT_STATUS_OK;
+}
+
+NTSTATUS rpccli_trans2_QueryPathInformation(struct rpc_pipe_client *cli,
+					    TALLOC_CTX *mem_ctx,
+					    WERROR *werror)
+{
+	struct trans2_QueryPathInformation r;
+	NTSTATUS status;
+
+	/* In parameters */
+
+	status = cli->dispatch(cli,
+				mem_ctx,
+				&ndr_table_trans2,
+				NDR_TRANS2_QUERYPATHINFORMATION,
+				&r);
+
+	if (!NT_STATUS_IS_OK(status)) {
+		return status;
+	}
+
+	if (NT_STATUS_IS_ERR(status)) {
+		return status;
+	}
+
+	/* Return variables */
+
+	/* Return result */
+	if (werror) {
+		*werror = r.out.result;
+	}
+
+	return werror_to_ntstatus(r.out.result);
+}
+
+struct rpccli_trans2_SetFileInformation_state {
+	struct trans2_SetFileInformation orig;
+	struct trans2_SetFileInformation tmp;
+	TALLOC_CTX *out_mem_ctx;
+	NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
+};
+
+static void rpccli_trans2_SetFileInformation_done(struct tevent_req *subreq);
+
+struct tevent_req *rpccli_trans2_SetFileInformation_send(TALLOC_CTX *mem_ctx,
+							 struct tevent_context *ev,
+							 struct rpc_pipe_client *cli)
+{
+	struct tevent_req *req;
+	struct rpccli_trans2_SetFileInformation_state *state;
+	struct tevent_req *subreq;
+
+	req = tevent_req_create(mem_ctx, &state,
+				struct rpccli_trans2_SetFileInformation_state);
+	if (req == NULL) {
+		return NULL;
+	}
+	state->out_mem_ctx = NULL;
+	state->dispatch_recv = cli->dispatch_recv;
+
+	/* In parameters */
+
+	/* Out parameters */
+
+	/* Result */
+	ZERO_STRUCT(state->orig.out.result);
+
+	/* make a temporary copy, that we pass to the dispatch function */
+	state->tmp = state->orig;
+
+	subreq = cli->dispatch_send(state, ev, cli,
+				    &ndr_table_trans2,
+				    NDR_TRANS2_SETFILEINFORMATION,
+				    &state->tmp);
+	if (tevent_req_nomem(subreq, req)) {
+		return tevent_req_post(req, ev);
+	}
+	tevent_req_set_callback(subreq, rpccli_trans2_SetFileInformation_done, req);
+	return req;
+}
+
+static void rpccli_trans2_SetFileInformation_done(struct tevent_req *subreq)
+{
+	struct tevent_req *req = tevent_req_callback_data(
+		subreq, struct tevent_req);
+	struct rpccli_trans2_SetFileInformation_state *state = tevent_req_data(
+		req, struct rpccli_trans2_SetFileInformation_state);
+	NTSTATUS status;
+	TALLOC_CTX *mem_ctx;
+
+	if (state->out_mem_ctx) {
+		mem_ctx = state->out_mem_ctx;
+	} else {
+		mem_ctx = state;
+	}
+
+	status = state->dispatch_recv(subreq, mem_ctx);
+	TALLOC_FREE(subreq);
+	if (!NT_STATUS_IS_OK(status)) {
+		tevent_req_nterror(req, status);
+		return;
+	}
+
+	/* Copy out parameters */
+
+	/* Copy result */
+	state->orig.out.result = state->tmp.out.result;
+
+	/* Reset temporary structure */
+	ZERO_STRUCT(state->tmp);
+
+	tevent_req_done(req);
+}
+
+NTSTATUS rpccli_trans2_SetFileInformation_recv(struct tevent_req *req,
+					       TALLOC_CTX *mem_ctx,
+					       WERROR *result)
+{
+	struct rpccli_trans2_SetFileInformation_state *state = tevent_req_data(
+		req, struct rpccli_trans2_SetFileInformation_state);
+	NTSTATUS status;
+
+	if (tevent_req_is_nterror(req, &status)) {
+		tevent_req_received(req);
+		return status;
+	}
+
+	/* Steal possbile out parameters to the callers context */
+	talloc_steal(mem_ctx, state->out_mem_ctx);
+
+	/* Return result */
+	*result = state->orig.out.result;
+
+	tevent_req_received(req);
+	return NT_STATUS_OK;
+}
+
+NTSTATUS rpccli_trans2_SetFileInformation(struct rpc_pipe_client *cli,
+					  TALLOC_CTX *mem_ctx,
+					  WERROR *werror)
+{
+	struct trans2_SetFileInformation r;
+	NTSTATUS status;
+
+	/* In parameters */
+
+	status = cli->dispatch(cli,
+				mem_ctx,
+				&ndr_table_trans2,
+				NDR_TRANS2_SETFILEINFORMATION,
+				&r);
+
+	if (!NT_STATUS_IS_OK(status)) {
+		return status;
+	}
+
+	if (NT_STATUS_IS_ERR(status)) {
+		return status;
+	}
+
+	/* Return variables */
+
+	/* Return result */
+	if (werror) {
+		*werror = r.out.result;
+	}
+
+	return werror_to_ntstatus(r.out.result);
+}
+
+struct rpccli_trans2_SetPathInformation_state {
+	struct trans2_SetPathInformation orig;
+	struct trans2_SetPathInformation tmp;
+	TALLOC_CTX *out_mem_ctx;
+	NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
+};
+
+static void rpccli_trans2_SetPathInformation_done(struct tevent_req *subreq);
+
+struct tevent_req *rpccli_trans2_SetPathInformation_send(TALLOC_CTX *mem_ctx,
+							 struct tevent_context *ev,
+							 struct rpc_pipe_client *cli)
+{
+	struct tevent_req *req;
+	struct rpccli_trans2_SetPathInformation_state *state;
+	struct tevent_req *subreq;
+
+	req = tevent_req_create(mem_ctx, &state,
+				struct rpccli_trans2_SetPathInformation_state);
+	if (req == NULL) {
+		return NULL;
+	}
+	state->out_mem_ctx = NULL;
+	state->dispatch_recv = cli->dispatch_recv;
+
+	/* In parameters */
+
+	/* Out parameters */
+
+	/* Result */
+	ZERO_STRUCT(state->orig.out.result);
+
+	/* make a temporary copy, that we pass to the dispatch function */
+	state->tmp = state->orig;
+
+	subreq = cli->dispatch_send(state, ev, cli,
+				    &ndr_table_trans2,
+				    NDR_TRANS2_SETPATHINFORMATION,
+				    &state->tmp);
+	if (tevent_req_nomem(subreq, req)) {
+		return tevent_req_post(req, ev);
+	}
+	tevent_req_set_callback(subreq, rpccli_trans2_SetPathInformation_done, req);
+	return req;
+}
+
+static void rpccli_trans2_SetPathInformation_done(struct tevent_req *subreq)
+{
+	struct tevent_req *req = tevent_req_callback_data(
+		subreq, struct tevent_req);
+	struct rpccli_trans2_SetPathInformation_state *state = tevent_req_data(
+		req, struct rpccli_trans2_SetPathInformation_state);
+	NTSTATUS status;
+	TALLOC_CTX *mem_ctx;
+
+	if (state->out_mem_ctx) {
+		mem_ctx = state->out_mem_ctx;
+	} else {
+		mem_ctx = state;
+	}
+
+	status = state->dispatch_recv(subreq, mem_ctx);
+	TALLOC_FREE(subreq);
+	if (!NT_STATUS_IS_OK(status)) {
+		tevent_req_nterror(req, status);
+		return;
+	}
+
+	/* Copy out parameters */
+
+	/* Copy result */
+	state->orig.out.result = state->tmp.out.result;
+
+	/* Reset temporary structure */
+	ZERO_STRUCT(state->tmp);
+
+	tevent_req_done(req);
+}
+
+NTSTATUS rpccli_trans2_SetPathInformation_recv(struct tevent_req *req,
+					       TALLOC_CTX *mem_ctx,
+					       WERROR *result)
+{
+	struct rpccli_trans2_SetPathInformation_state *state = tevent_req_data(
+		req, struct rpccli_trans2_SetPathInformation_state);
+	NTSTATUS status;
+
+	if (tevent_req_is_nterror(req, &status)) {
+		tevent_req_received(req);
+		return status;
+	}
+
+	/* Steal possbile out parameters to the callers context */
+	talloc_steal(mem_ctx, state->out_mem_ctx);
+
+	/* Return result */
+	*result = state->orig.out.result;
+
+	tevent_req_received(req);
+	return NT_STATUS_OK;
+}
+
+NTSTATUS rpccli_trans2_SetPathInformation(struct rpc_pipe_client *cli,
+					  TALLOC_CTX *mem_ctx,
+					  WERROR *werror)
+{
+	struct trans2_SetPathInformation r;
+	NTSTATUS status;
+
+	/* In parameters */
+
+	status = cli->dispatch(cli,
+				mem_ctx,
+				&ndr_table_trans2,
+				NDR_TRANS2_SETPATHINFORMATION,
+				&r);
+
+	if (!NT_STATUS_IS_OK(status)) {
+		return status;
+	}
+
+	if (NT_STATUS_IS_ERR(status)) {
+		return status;
+	}
+
+	/* Return variables */
+
+	/* Return result */
+	if (werror) {
+		*werror = r.out.result;
+	}
+
+	return werror_to_ntstatus(r.out.result);
+}
+
+struct rpccli_trans2_QueryFsInformation_state {
+	struct trans2_QueryFsInformation orig;
+	struct trans2_QueryFsInformation tmp;
+	TALLOC_CTX *out_mem_ctx;
+	NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
+};
+
+static void rpccli_trans2_QueryFsInformation_done(struct tevent_req *subreq);
+
+struct tevent_req *rpccli_trans2_QueryFsInformation_send(TALLOC_CTX *mem_ctx,
+							 struct tevent_context *ev,
+							 struct rpc_pipe_client *cli)
+{
+	struct tevent_req *req;
+	struct rpccli_trans2_QueryFsInformation_state *state;
+	struct tevent_req *subreq;
+
+	req = tevent_req_create(mem_ctx, &state,
+				struct rpccli_trans2_QueryFsInformation_state);
+	if (req == NULL) {
+		return NULL;
+	}
+	state->out_mem_ctx = NULL;
+	state->dispatch_recv = cli->dispatch_recv;
+
+	/* In parameters */
+
+	/* Out parameters */
+
+	/* Result */
+	ZERO_STRUCT(state->orig.out.result);
+
+	/* make a temporary copy, that we pass to the dispatch function */
+	state->tmp = state->orig;
+
+	subreq = cli->dispatch_send(state, ev, cli,
+				    &ndr_table_trans2,
+				    NDR_TRANS2_QUERYFSINFORMATION,
+				    &state->tmp);
+	if (tevent_req_nomem(subreq, req)) {
+		return tevent_req_post(req, ev);
+	}
+	tevent_req_set_callback(subreq, rpccli_trans2_QueryFsInformation_done, req);
+	return req;
+}
+
+static void rpccli_trans2_QueryFsInformation_done(struct tevent_req *subreq)
+{
+	struct tevent_req *req = tevent_req_callback_data(
+		subreq, struct tevent_req);
+	struct rpccli_trans2_QueryFsInformation_state *state = tevent_req_data(
+		req, struct rpccli_trans2_QueryFsInformation_state);
+	NTSTATUS status;
+	TALLOC_CTX *mem_ctx;
+
+	if (state->out_mem_ctx) {
+		mem_ctx = state->out_mem_ctx;
+	} else {
+		mem_ctx = state;
+	}
+
+	status = state->dispatch_recv(subreq, mem_ctx);
+	TALLOC_FREE(subreq);
+	if (!NT_STATUS_IS_OK(status)) {
+		tevent_req_nterror(req, status);
+		return;
+	}
+
+	/* Copy out parameters */
+
+	/* Copy result */
+	state->orig.out.result = state->tmp.out.result;
+
+	/* Reset temporary structure */
+	ZERO_STRUCT(state->tmp);
+
+	tevent_req_done(req);
+}
+
+NTSTATUS rpccli_trans2_QueryFsInformation_recv(struct tevent_req *req,
+					       TALLOC_CTX *mem_ctx,
+					       WERROR *result)
+{
+	struct rpccli_trans2_QueryFsInformation_state *state = tevent_req_data(
+		req, struct rpccli_trans2_QueryFsInformation_state);
+	NTSTATUS status;
+
+	if (tevent_req_is_nterror(req, &status)) {
+		tevent_req_received(req);
+		return status;
+	}
+
+	/* Steal possbile out parameters to the callers context */
+	talloc_steal(mem_ctx, state->out_mem_ctx);
+
+	/* Return result */
+	*result = state->orig.out.result;
+
+	tevent_req_received(req);
+	return NT_STATUS_OK;
+}
+
+NTSTATUS rpccli_trans2_QueryFsInformation(struct rpc_pipe_client *cli,
+					  TALLOC_CTX *mem_ctx,
+					  WERROR *werror)
+{
+	struct trans2_QueryFsInformation r;
+	NTSTATUS status;
+
+	/* In parameters */
+
+	status = cli->dispatch(cli,
+				mem_ctx,
+				&ndr_table_trans2,
+				NDR_TRANS2_QUERYFSINFORMATION,
+				&r);
+
+	if (!NT_STATUS_IS_OK(status)) {
+		return status;
+	}
+
+	if (NT_STATUS_IS_ERR(status)) {
+		return status;
+	}
+
+	/* Return variables */
+
+	/* Return result */
+	if (werror) {
+		*werror = r.out.result;
+	}
+
+	return werror_to_ntstatus(r.out.result);
+}
+
+struct rpccli_trans2_SetFsInformation_state {
+	struct trans2_SetFsInformation orig;
+	struct trans2_SetFsInformation tmp;
+	TALLOC_CTX *out_mem_ctx;
+	NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
+};
+
+static void rpccli_trans2_SetFsInformation_done(struct tevent_req *subreq);
+
+struct tevent_req *rpccli_trans2_SetFsInformation_send(TALLOC_CTX *mem_ctx,
+						       struct tevent_context *ev,
+						       struct rpc_pipe_client *cli)
+{
+	struct tevent_req *req;
+	struct rpccli_trans2_SetFsInformation_state *state;
+	struct tevent_req *subreq;
+
+	req = tevent_req_create(mem_ctx, &state,
+				struct rpccli_trans2_SetFsInformation_state);
+	if (req == NULL) {
+		return NULL;
+	}
+	state->out_mem_ctx = NULL;
+	state->dispatch_recv = cli->dispatch_recv;
+
+	/* In parameters */
+
+	/* Out parameters */
+
+	/* Result */
+	ZERO_STRUCT(state->orig.out.result);
+
+	/* make a temporary copy, that we pass to the dispatch function */
+	state->tmp = state->orig;
+
+	subreq = cli->dispatch_send(state, ev, cli,
+				    &ndr_table_trans2,
+				    NDR_TRANS2_SETFSINFORMATION,
+				    &state->tmp);
+	if (tevent_req_nomem(subreq, req)) {
+		return tevent_req_post(req, ev);
+	}
+	tevent_req_set_callback(subreq, rpccli_trans2_SetFsInformation_done, req);
+	return req;
+}
+
+static void rpccli_trans2_SetFsInformation_done(struct tevent_req *subreq)
+{
+	struct tevent_req *req = tevent_req_callback_data(
+		subreq, struct tevent_req);
+	struct rpccli_trans2_SetFsInformation_state *state = tevent_req_data(
+		req, struct rpccli_trans2_SetFsInformation_state);
+	NTSTATUS status;
+	TALLOC_CTX *mem_ctx;
+
+	if (state->out_mem_ctx) {
+		mem_ctx = state->out_mem_ctx;
+	} else {
+		mem_ctx = state;
+	}
+
+	status = state->dispatch_recv(subreq, mem_ctx);
+	TALLOC_FREE(subreq);
+	if (!NT_STATUS_IS_OK(status)) {
+		tevent_req_nterror(req, status);
+		return;
+	}
+
+	/* Copy out parameters */
+
+	/* Copy result */
+	state->orig.out.result = state->tmp.out.result;
+
+	/* Reset temporary structure */
+	ZERO_STRUCT(state->tmp);
+
+	tevent_req_done(req);
+}
+
+NTSTATUS rpccli_trans2_SetFsInformation_recv(struct tevent_req *req,
+					     TALLOC_CTX *mem_ctx,
+					     WERROR *result)
+{
+	struct rpccli_trans2_SetFsInformation_state *state = tevent_req_data(
+		req, struct rpccli_trans2_SetFsInformation_state);
+	NTSTATUS status;
+
+	if (tevent_req_is_nterror(req, &status)) {
+		tevent_req_received(req);
+		return status;
+	}
+
+	/* Steal possbile out parameters to the callers context */
+	talloc_steal(mem_ctx, state->out_mem_ctx);
+
+	/* Return result */
+	*result = state->orig.out.result;
+
+	tevent_req_received(req);
+	return NT_STATUS_OK;
+}
+
+NTSTATUS rpccli_trans2_SetFsInformation(struct rpc_pipe_client *cli,
+					TALLOC_CTX *mem_ctx,
+					WERROR *werror)
+{
+	struct trans2_SetFsInformation r;
+	NTSTATUS status;
+
+	/* In parameters */
+
+	status = cli->dispatch(cli,
+				mem_ctx,
+				&ndr_table_trans2,
+				NDR_TRANS2_SETFSINFORMATION,
+				&r);
+
+	if (!NT_STATUS_IS_OK(status)) {
+		return status;
+	}
+
+	if (NT_STATUS_IS_ERR(status)) {
+		return status;
+	}
+
+	/* Return variables */
+
+	/* Return result */
+	if (werror) {
+		*werror = r.out.result;
+	}
+
+	return werror_to_ntstatus(r.out.result);
+}
+
+struct rpccli_trans2_FindFirst2Information_state {
+	struct trans2_FindFirst2Information orig;
+	struct trans2_FindFirst2Information tmp;
+	TALLOC_CTX *out_mem_ctx;
+	NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
+};
+
+static void rpccli_trans2_FindFirst2Information_done(struct tevent_req *subreq);
+
+struct tevent_req *rpccli_trans2_FindFirst2Information_send(TALLOC_CTX *mem_ctx,
+							    struct tevent_context *ev,
+							    struct rpc_pipe_client *cli)
+{
+	struct tevent_req *req;
+	struct rpccli_trans2_FindFirst2Information_state *state;
+	struct tevent_req *subreq;
+
+	req = tevent_req_create(mem_ctx, &state,
+				struct rpccli_trans2_FindFirst2Information_state);
+	if (req == NULL) {
+		return NULL;
+	}
+	state->out_mem_ctx = NULL;
+	state->dispatch_recv = cli->dispatch_recv;
+
+	/* In parameters */
+
+	/* Out parameters */
+
+	/* Result */
+	ZERO_STRUCT(state->orig.out.result);
+
+	/* make a temporary copy, that we pass to the dispatch function */
+	state->tmp = state->orig;
+
+	subreq = cli->dispatch_send(state, ev, cli,
+				    &ndr_table_trans2,
+				    NDR_TRANS2_FINDFIRST2INFORMATION,
+				    &state->tmp);
+	if (tevent_req_nomem(subreq, req)) {
+		return tevent_req_post(req, ev);
+	}
+	tevent_req_set_callback(subreq, rpccli_trans2_FindFirst2Information_done, req);
+	return req;
+}
+
+static void rpccli_trans2_FindFirst2Information_done(struct tevent_req *subreq)
+{
+	struct tevent_req *req = tevent_req_callback_data(
+		subreq, struct tevent_req);
+	struct rpccli_trans2_FindFirst2Information_state *state = tevent_req_data(
+		req, struct rpccli_trans2_FindFirst2Information_state);
+	NTSTATUS status;
+	TALLOC_CTX *mem_ctx;
+
+	if (state->out_mem_ctx) {
+		mem_ctx = state->out_mem_ctx;
+	} else {
+		mem_ctx = state;
+	}
+
+	status = state->dispatch_recv(subreq, mem_ctx);
+	TALLOC_FREE(subreq);
+	if (!NT_STATUS_IS_OK(status)) {
+		tevent_req_nterror(req, status);
+		return;
+	}
+
+	/* Copy out parameters */
+
+	/* Copy result */
+	state->orig.out.result = state->tmp.out.result;
+
+	/* Reset temporary structure */
+	ZERO_STRUCT(state->tmp);
+
+	tevent_req_done(req);
+}
+
+NTSTATUS rpccli_trans2_FindFirst2Information_recv(struct tevent_req *req,
+						  TALLOC_CTX *mem_ctx,
+						  WERROR *result)
+{
+	struct rpccli_trans2_FindFirst2Information_state *state = tevent_req_data(
+		req, struct rpccli_trans2_FindFirst2Information_state);
+	NTSTATUS status;
+
+	if (tevent_req_is_nterror(req, &status)) {
+		tevent_req_received(req);
+		return status;
+	}
+
+	/* Steal possbile out parameters to the callers context */
+	talloc_steal(mem_ctx, state->out_mem_ctx);
+
+	/* Return result */
+	*result = state->orig.out.result;
+
+	tevent_req_received(req);
+	return NT_STATUS_OK;
+}
+
+NTSTATUS rpccli_trans2_FindFirst2Information(struct rpc_pipe_client *cli,
+					     TALLOC_CTX *mem_ctx,
+					     WERROR *werror)
+{
+	struct trans2_FindFirst2Information r;
+	NTSTATUS status;
+
+	/* In parameters */
+
+	status = cli->dispatch(cli,
+				mem_ctx,
+				&ndr_table_trans2,
+				NDR_TRANS2_FINDFIRST2INFORMATION,
+				&r);
+
+	if (!NT_STATUS_IS_OK(status)) {
+		return status;
+	}
+
+	if (NT_STATUS_IS_ERR(status)) {
+		return status;
+	}
+
+	/* Return variables */
+
+	/* Return result */
+	if (werror) {
+		*werror = r.out.result;
+	}
+
+	return werror_to_ntstatus(r.out.result);
+}
+
+struct rpccli_trans2_FindNext2Information_state {
+	struct trans2_FindNext2Information orig;
+	struct trans2_FindNext2Information tmp;
+	TALLOC_CTX *out_mem_ctx;
+	NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
+};
+
+static void rpccli_trans2_FindNext2Information_done(struct tevent_req *subreq);
+
+struct tevent_req *rpccli_trans2_FindNext2Information_send(TALLOC_CTX *mem_ctx,
+							   struct tevent_context *ev,
+							   struct rpc_pipe_client *cli)
+{
+	struct tevent_req *req;
+	struct rpccli_trans2_FindNext2Information_state *state;
+	struct tevent_req *subreq;
+
+	req = tevent_req_create(mem_ctx, &state,
+				struct rpccli_trans2_FindNext2Information_state);
+	if (req == NULL) {
+		return NULL;
+	}
+	state->out_mem_ctx = NULL;
+	state->dispatch_recv = cli->dispatch_recv;
+
+	/* In parameters */
+
+	/* Out parameters */
+
+	/* Result */
+	ZERO_STRUCT(state->orig.out.result);
+
+	/* make a temporary copy, that we pass to the dispatch function */
+	state->tmp = state->orig;
+
+	subreq = cli->dispatch_send(state, ev, cli,
+				    &ndr_table_trans2,
+				    NDR_TRANS2_FINDNEXT2INFORMATION,
+				    &state->tmp);
+	if (tevent_req_nomem(subreq, req)) {
+		return tevent_req_post(req, ev);
+	}
+	tevent_req_set_callback(subreq, rpccli_trans2_FindNext2Information_done, req);
+	return req;
+}
+
+static void rpccli_trans2_FindNext2Information_done(struct tevent_req *subreq)
+{
+	struct tevent_req *req = tevent_req_callback_data(
+		subreq, struct tevent_req);
+	struct rpccli_trans2_FindNext2Information_state *state = tevent_req_data(
+		req, struct rpccli_trans2_FindNext2Information_state);
+	NTSTATUS status;
+	TALLOC_CTX *mem_ctx;
+
+	if (state->out_mem_ctx) {
+		mem_ctx = state->out_mem_ctx;
+	} else {
+		mem_ctx = state;
+	}
+
+	status = state->dispatch_recv(subreq, mem_ctx);
+	TALLOC_FREE(subreq);
+	if (!NT_STATUS_IS_OK(status)) {
+		tevent_req_nterror(req, status);
+		return;
+	}
+
+	/* Copy out parameters */
+
+	/* Copy result */
+	state->orig.out.result = state->tmp.out.result;
+
+	/* Reset temporary structure */
+	ZERO_STRUCT(state->tmp);
+
+	tevent_req_done(req);
+}
+
+NTSTATUS rpccli_trans2_FindNext2Information_recv(struct tevent_req *req,
+						 TALLOC_CTX *mem_ctx,
+						 WERROR *result)
+{
+	struct rpccli_trans2_FindNext2Information_state *state = tevent_req_data(
+		req, struct rpccli_trans2_FindNext2Information_state);
+	NTSTATUS status;
+
+	if (tevent_req_is_nterror(req, &status)) {
+		tevent_req_received(req);
+		return status;
+	}
+
+	/* Steal possbile out parameters to the callers context */
+	talloc_steal(mem_ctx, state->out_mem_ctx);
+
+	/* Return result */
+	*result = state->orig.out.result;
+
+	tevent_req_received(req);
+	return NT_STATUS_OK;
+}
+
+NTSTATUS rpccli_trans2_FindNext2Information(struct rpc_pipe_client *cli,
+					    TALLOC_CTX *mem_ctx,
+					    WERROR *werror)
+{
+	struct trans2_FindNext2Information r;
+	NTSTATUS status;
+
+	/* In parameters */
+
+	status = cli->dispatch(cli,
+				mem_ctx,
+				&ndr_table_trans2,
+				NDR_TRANS2_FINDNEXT2INFORMATION,
+				&r);
+
+	if (!NT_STATUS_IS_OK(status)) {
+		return status;
+	}
+
+	if (NT_STATUS_IS_ERR(status)) {
+		return status;
+	}
+
+	/* Return variables */
+
+	/* Return result */
+	if (werror) {
+		*werror = r.out.result;
+	}
+
+	return werror_to_ntstatus(r.out.result);
+}
+
+struct rpccli_trans2_GetDFSReferral_state {
+	struct trans2_GetDFSReferral orig;
+	struct trans2_GetDFSReferral tmp;
+	TALLOC_CTX *out_mem_ctx;
+	NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
+};
+
+static void rpccli_trans2_GetDFSReferral_done(struct tevent_req *subreq);
+
+struct tevent_req *rpccli_trans2_GetDFSReferral_send(TALLOC_CTX *mem_ctx,
+						     struct tevent_context *ev,
+						     struct rpc_pipe_client *cli,
+						     uint16_t _max_referral_level /* [in]  */,
+						     const char * _servername /* [in] [flag(LIBNDR_FLAG_STR_NULLTERM)] */,
+						     struct trans2_dfs_referral_resp *_resp /* [out] [ref] */)
+{
+	struct tevent_req *req;
+	struct rpccli_trans2_GetDFSReferral_state *state;
+	struct tevent_req *subreq;
+
+	req = tevent_req_create(mem_ctx, &state,
+				struct rpccli_trans2_GetDFSReferral_state);
+	if (req == NULL) {
+		return NULL;
+	}
+	state->out_mem_ctx = NULL;
+	state->dispatch_recv = cli->dispatch_recv;
+
+	/* In parameters */
+	state->orig.in.max_referral_level = _max_referral_level;
+	state->orig.in.servername = _servername;
+
+	/* Out parameters */
+	state->orig.out.resp = _resp;
+
+	/* Result */
+	ZERO_STRUCT(state->orig.out.result);
+
+	state->out_mem_ctx = talloc_named_const(state, 0,
+			     "rpccli_trans2_GetDFSReferral_out_memory");
+	if (tevent_req_nomem(state->out_mem_ctx, req)) {
+		return tevent_req_post(req, ev);
+	}
+
+	/* make a temporary copy, that we pass to the dispatch function */
+	state->tmp = state->orig;
+
+	subreq = cli->dispatch_send(state, ev, cli,
+				    &ndr_table_trans2,
+				    NDR_TRANS2_GETDFSREFERRAL,
+				    &state->tmp);
+	if (tevent_req_nomem(subreq, req)) {
+		return tevent_req_post(req, ev);
+	}
+	tevent_req_set_callback(subreq, rpccli_trans2_GetDFSReferral_done, req);
+	return req;
+}
+
+static void rpccli_trans2_GetDFSReferral_done(struct tevent_req *subreq)
+{
+	struct tevent_req *req = tevent_req_callback_data(
+		subreq, struct tevent_req);
+	struct rpccli_trans2_GetDFSReferral_state *state = tevent_req_data(
+		req, struct rpccli_trans2_GetDFSReferral_state);
+	NTSTATUS status;
+	TALLOC_CTX *mem_ctx;
+
+	if (state->out_mem_ctx) {
+		mem_ctx = state->out_mem_ctx;
+	} else {
+		mem_ctx = state;
+	}
+
+	status = state->dispatch_recv(subreq, mem_ctx);
+	TALLOC_FREE(subreq);
+	if (!NT_STATUS_IS_OK(status)) {
+		tevent_req_nterror(req, status);
+		return;
+	}
+
+	/* Copy out parameters */
+	*state->orig.out.resp = *state->tmp.out.resp;
+
+	/* Copy result */
+	state->orig.out.result = state->tmp.out.result;
+
+	/* Reset temporary structure */
+	ZERO_STRUCT(state->tmp);
+
+	tevent_req_done(req);
+}
+
+NTSTATUS rpccli_trans2_GetDFSReferral_recv(struct tevent_req *req,
+					   TALLOC_CTX *mem_ctx,
+					   NTSTATUS *result)
+{
+	struct rpccli_trans2_GetDFSReferral_state *state = tevent_req_data(
+		req, struct rpccli_trans2_GetDFSReferral_state);
+	NTSTATUS status;
+
+	if (tevent_req_is_nterror(req, &status)) {
+		tevent_req_received(req);
+		return status;
+	}
+
+	/* Steal possbile out parameters to the callers context */
+	talloc_steal(mem_ctx, state->out_mem_ctx);
+
+	/* Return result */
+	*result = state->orig.out.result;
+
+	tevent_req_received(req);
+	return NT_STATUS_OK;
+}
+
+NTSTATUS rpccli_trans2_GetDFSReferral(struct rpc_pipe_client *cli,
+				      TALLOC_CTX *mem_ctx,
+				      uint16_t max_referral_level /* [in]  */,
+				      const char * servername /* [in] [flag(LIBNDR_FLAG_STR_NULLTERM)] */,
+				      struct trans2_dfs_referral_resp *resp /* [out] [ref] */)
+{
+	struct trans2_GetDFSReferral r;
+	NTSTATUS status;
+
+	/* In parameters */
+	r.in.max_referral_level = max_referral_level;
+	r.in.servername = servername;
+
+	status = cli->dispatch(cli,
+				mem_ctx,
+				&ndr_table_trans2,
+				NDR_TRANS2_GETDFSREFERRAL,
+				&r);
+
+	if (!NT_STATUS_IS_OK(status)) {
+		return status;
+	}
+
+	if (NT_STATUS_IS_ERR(status)) {
+		return status;
+	}
+
+	/* Return variables */
+	*resp = *r.out.resp;
+
+	/* Return result */
+	return r.out.result;
+}
+
diff --git a/librpc/gen_ndr/cli_trans.h b/librpc/gen_ndr/cli_trans.h
new file mode 100644
index 0000000..9a0a00b
--- /dev/null
+++ b/librpc/gen_ndr/cli_trans.h
@@ -0,0 +1,90 @@
+#include "../librpc/gen_ndr/ndr_trans.h"
+#ifndef __CLI_TRANS2__
+#define __CLI_TRANS2__
+struct tevent_req *rpccli_trans2_QueryFileInformation_send(TALLOC_CTX *mem_ctx,
+							   struct tevent_context *ev,
+							   struct rpc_pipe_client *cli);
+NTSTATUS rpccli_trans2_QueryFileInformation_recv(struct tevent_req *req,
+						 TALLOC_CTX *mem_ctx,
+						 WERROR *result);
+NTSTATUS rpccli_trans2_QueryFileInformation(struct rpc_pipe_client *cli,
+					    TALLOC_CTX *mem_ctx,
+					    WERROR *werror);
+struct tevent_req *rpccli_trans2_QueryPathInformation_send(TALLOC_CTX *mem_ctx,
+							   struct tevent_context *ev,
+							   struct rpc_pipe_client *cli);
+NTSTATUS rpccli_trans2_QueryPathInformation_recv(struct tevent_req *req,
+						 TALLOC_CTX *mem_ctx,
+						 WERROR *result);
+NTSTATUS rpccli_trans2_QueryPathInformation(struct rpc_pipe_client *cli,
+					    TALLOC_CTX *mem_ctx,
+					    WERROR *werror);
+struct tevent_req *rpccli_trans2_SetFileInformation_send(TALLOC_CTX *mem_ctx,
+							 struct tevent_context *ev,
+							 struct rpc_pipe_client *cli);
+NTSTATUS rpccli_trans2_SetFileInformation_recv(struct tevent_req *req,
+					       TALLOC_CTX *mem_ctx,
+					       WERROR *result);
+NTSTATUS rpccli_trans2_SetFileInformation(struct rpc_pipe_client *cli,
+					  TALLOC_CTX *mem_ctx,
+					  WERROR *werror);
+struct tevent_req *rpccli_trans2_SetPathInformation_send(TALLOC_CTX *mem_ctx,
+							 struct tevent_context *ev,
+							 struct rpc_pipe_client *cli);
+NTSTATUS rpccli_trans2_SetPathInformation_recv(struct tevent_req *req,
+					       TALLOC_CTX *mem_ctx,
+					       WERROR *result);
+NTSTATUS rpccli_trans2_SetPathInformation(struct rpc_pipe_client *cli,
+					  TALLOC_CTX *mem_ctx,
+					  WERROR *werror);
+struct tevent_req *rpccli_trans2_QueryFsInformation_send(TALLOC_CTX *mem_ctx,
+							 struct tevent_context *ev,
+							 struct rpc_pipe_client *cli);
+NTSTATUS rpccli_trans2_QueryFsInformation_recv(struct tevent_req *req,
+					       TALLOC_CTX *mem_ctx,
+					       WERROR *result);
+NTSTATUS rpccli_trans2_QueryFsInformation(struct rpc_pipe_client *cli,
+					  TALLOC_CTX *mem_ctx,
+					  WERROR *werror);
+struct tevent_req *rpccli_trans2_SetFsInformation_send(TALLOC_CTX *mem_ctx,
+						       struct tevent_context *ev,
+						       struct rpc_pipe_client *cli);
+NTSTATUS rpccli_trans2_SetFsInformation_recv(struct tevent_req *req,
+					     TALLOC_CTX *mem_ctx,
+					     WERROR *result);
+NTSTATUS rpccli_trans2_SetFsInformation(struct rpc_pipe_client *cli,
+					TALLOC_CTX *mem_ctx,
+					WERROR *werror);
+struct tevent_req *rpccli_trans2_FindFirst2Information_send(TALLOC_CTX *mem_ctx,
+							    struct tevent_context *ev,
+							    struct rpc_pipe_client *cli);
+NTSTATUS rpccli_trans2_FindFirst2Information_recv(struct tevent_req *req,
+						  TALLOC_CTX *mem_ctx,
+						  WERROR *result);
+NTSTATUS rpccli_trans2_FindFirst2Information(struct rpc_pipe_client *cli,
+					     TALLOC_CTX *mem_ctx,
+					     WERROR *werror);
+struct tevent_req *rpccli_trans2_FindNext2Information_send(TALLOC_CTX *mem_ctx,
+							   struct tevent_context *ev,
+							   struct rpc_pipe_client *cli);
+NTSTATUS rpccli_trans2_FindNext2Information_recv(struct tevent_req *req,
+						 TALLOC_CTX *mem_ctx,
+						 WERROR *result);
+NTSTATUS rpccli_trans2_FindNext2Information(struct rpc_pipe_client *cli,
+					    TALLOC_CTX *mem_ctx,
+					    WERROR *werror);
+struct tevent_req *rpccli_trans2_GetDFSReferral_send(TALLOC_CTX *mem_ctx,
+						     struct tevent_context *ev,
+						     struct rpc_pipe_client *cli,
+						     uint16_t _max_referral_level /* [in]  */,
+						     const char * _servername /* [in] [flag(LIBNDR_FLAG_STR_NULLTERM)] */,
+						     struct trans2_dfs_referral_resp *_resp /* [out] [ref] */);
+NTSTATUS rpccli_trans2_GetDFSReferral_recv(struct tevent_req *req,
+					   TALLOC_CTX *mem_ctx,
+					   NTSTATUS *result);
+NTSTATUS rpccli_trans2_GetDFSReferral(struct rpc_pipe_client *cli,
+				      TALLOC_CTX *mem_ctx,
+				      uint16_t max_referral_level /* [in]  */,
+				      const char * servername /* [in] [flag(LIBNDR_FLAG_STR_NULLTERM)] */,
+				      struct trans2_dfs_referral_resp *resp /* [out] [ref] */);
+#endif /* __CLI_TRANS2__ */
diff --git a/librpc/gen_ndr/ndr_trans.c b/librpc/gen_ndr/ndr_trans.c
new file mode 100644
index 0000000..49c9637
--- /dev/null
+++ b/librpc/gen_ndr/ndr_trans.c
@@ -0,0 +1,1630 @@
+/* parser auto-generated by pidl */
+
+#include "includes.h"
+#include "../librpc/gen_ndr/ndr_trans.h"
+
+#include "librpc/gen_ndr/ndr_misc.h"
+static enum ndr_err_code ndr_push_TRANS_SERVER_TYPE(struct ndr_push *ndr, int ndr_flags, enum TRANS_SERVER_TYPE r)
+{
+	NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
+	return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_TRANS_SERVER_TYPE(struct ndr_pull *ndr, int ndr_flags, enum TRANS_SERVER_TYPE *r)
+{
+	uint16_t v;
+	NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
+	*r = v;
+	return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_TRANS_SERVER_TYPE(struct ndr_print *ndr, const char *name, enum TRANS_SERVER_TYPE r)
+{
+	const char *val = NULL;
+
+	switch (r) {
+		case TRANS_SERVER_NON_ROOT: val = "TRANS_SERVER_NON_ROOT"; break;
+		case TRANS_SERVER_ROOT: val = "TRANS_SERVER_ROOT"; break;
+	}
+	ndr_print_enum(ndr, name, "ENUM", val, r);
+}
+
+static enum ndr_err_code ndr_push_TRANS_FLAGS_REFERRAL(struct ndr_push *ndr, int ndr_flags, enum TRANS_FLAGS_REFERRAL r)
+{
+	NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
+	return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_TRANS_FLAGS_REFERRAL(struct ndr_pull *ndr, int ndr_flags, enum TRANS_FLAGS_REFERRAL *r)
+{
+	uint16_t v;
+	NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
+	*r = v;
+	return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_TRANS_FLAGS_REFERRAL(struct ndr_print *ndr, const char *name, enum TRANS_FLAGS_REFERRAL r)
+{
+	const char *val = NULL;
+
+	switch (r) {
+		case TRANS_FLAG_REFERRAL_DOMAIN_RESP: val = "TRANS_FLAG_REFERRAL_DOMAIN_RESP"; break;
+		case TRANS_FLAG_REFERRAL_FIRST_TARGET_SET: val = "TRANS_FLAG_REFERRAL_FIRST_TARGET_SET"; break;
+	}
+	ndr_print_enum(ndr, name, "ENUM", val, r);
+}
+
+static enum ndr_err_code ndr_push_trans2_dfs_referral_v1(struct ndr_push *ndr, int ndr_flags, const struct trans2_dfs_referral_v1 *r)
+{
+	if (ndr_flags & NDR_SCALARS) {
+		NDR_CHECK(ndr_push_align(ndr, 5));
+		NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->size));
+		NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->server_type));
+		NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->entry_flags));
+		{
+			uint32_t _flags_save_string = ndr->flags;
+			ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+			NDR_CHECK(ndr_push_unique_ptr(ndr, r->share_name));
+			ndr->flags = _flags_save_string;
+		}
+		NDR_CHECK(ndr_push_trailer_align(ndr, 5));
+	}
+	if (ndr_flags & NDR_BUFFERS) {
+		{
+			uint32_t _flags_save_string = ndr->flags;
+			ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+			if (r->share_name) {
+				NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->share_name));
+			}
+			ndr->flags = _flags_save_string;
+		}
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_trans2_dfs_referral_v1(struct ndr_pull *ndr, int ndr_flags, struct trans2_dfs_referral_v1 *r)
+{
+	uint32_t _ptr_share_name;
+	TALLOC_CTX *_mem_save_share_name_0;
+	if (ndr_flags & NDR_SCALARS) {
+		NDR_CHECK(ndr_pull_align(ndr, 5));
+		NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
+		NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->server_type));
+		NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->entry_flags));
+		{
+			uint32_t _flags_save_string = ndr->flags;
+			ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+			NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share_name));
+			if (_ptr_share_name) {
+				NDR_PULL_ALLOC(ndr, r->share_name);
+			} else {
+				r->share_name = NULL;
+			}
+			ndr->flags = _flags_save_string;
+		}
+		NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
+	}
+	if (ndr_flags & NDR_BUFFERS) {
+		{
+			uint32_t _flags_save_string = ndr->flags;
+			ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+			if (r->share_name) {
+				_mem_save_share_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+				NDR_PULL_SET_MEM_CTX(ndr, r->share_name, 0);
+				NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->share_name));
+				NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_name_0, 0);
+			}
+			ndr->flags = _flags_save_string;
+		}
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_trans2_dfs_referral_v1(struct ndr_print *ndr, const char *name, const struct trans2_dfs_referral_v1 *r)
+{
+	ndr_print_struct(ndr, name, "trans2_dfs_referral_v1");
+	ndr->depth++;
+	ndr_print_uint16(ndr, "size", r->size);
+	ndr_print_uint16(ndr, "server_type", r->server_type);
+	ndr_print_uint16(ndr, "entry_flags", r->entry_flags);
+	ndr_print_ptr(ndr, "share_name", r->share_name);
+	ndr->depth++;
+	if (r->share_name) {
+		ndr_print_string(ndr, "share_name", r->share_name);
+	}
+	ndr->depth--;
+	ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_trans2_dfs_referral_v2(struct ndr_push *ndr, int ndr_flags, const struct trans2_dfs_referral_v2 *r)
+{
+	if (ndr_flags & NDR_SCALARS) {
+		NDR_CHECK(ndr_push_align(ndr, 5));
+		NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->size));
+		NDR_CHECK(ndr_push_TRANS_SERVER_TYPE(ndr, NDR_SCALARS, r->server_type));
+		NDR_CHECK(ndr_push_TRANS_FLAGS_REFERRAL(ndr, NDR_SCALARS, r->entry_flags));
+		NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->proximity));
+		NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ttl));
+		{
+			uint32_t _flags_save_string = ndr->flags;
+			ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+			NDR_CHECK(ndr_push_short_relative_ptr1(ndr, r->DFS_path));
+			ndr->flags = _flags_save_string;
+		}
+		{
+			uint32_t _flags_save_string = ndr->flags;
+			ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+			NDR_CHECK(ndr_push_short_relative_ptr1(ndr, r->DFS_alt_path));
+			ndr->flags = _flags_save_string;
+		}
+		{
+			uint32_t _flags_save_string = ndr->flags;
+			ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+			NDR_CHECK(ndr_push_short_relative_ptr1(ndr, r->netw_address));
+			ndr->flags = _flags_save_string;
+		}
+		NDR_CHECK(ndr_push_trailer_align(ndr, 5));
+	}
+	if (ndr_flags & NDR_BUFFERS) {
+		{
+			uint32_t _flags_save_string = ndr->flags;
+			ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+			if (r->DFS_path) {
+				NDR_CHECK(ndr_push_short_relative_ptr2(ndr, r->DFS_path));
+				NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->DFS_path));
+			}
+			ndr->flags = _flags_save_string;
+		}
+		{
+			uint32_t _flags_save_string = ndr->flags;
+			ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+			if (r->DFS_alt_path) {
+				NDR_CHECK(ndr_push_short_relative_ptr2(ndr, r->DFS_alt_path));
+				NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->DFS_alt_path));
+			}
+			ndr->flags = _flags_save_string;
+		}
+		{
+			uint32_t _flags_save_string = ndr->flags;
+			ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+			if (r->netw_address) {
+				NDR_CHECK(ndr_push_short_relative_ptr2(ndr, r->netw_address));
+				NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->netw_address));
+			}
+			ndr->flags = _flags_save_string;
+		}
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_trans2_dfs_referral_v2(struct ndr_pull *ndr, int ndr_flags, struct trans2_dfs_referral_v2 *r)
+{
+	uint16_t _ptr_DFS_path;
+	TALLOC_CTX *_mem_save_DFS_path_0;
+	uint16_t _ptr_DFS_alt_path;
+	TALLOC_CTX *_mem_save_DFS_alt_path_0;
+	uint16_t _ptr_netw_address;
+	TALLOC_CTX *_mem_save_netw_address_0;
+	if (ndr_flags & NDR_SCALARS) {
+		NDR_CHECK(ndr_pull_align(ndr, 5));
+		NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
+		NDR_CHECK(ndr_pull_TRANS_SERVER_TYPE(ndr, NDR_SCALARS, &r->server_type));
+		NDR_CHECK(ndr_pull_TRANS_FLAGS_REFERRAL(ndr, NDR_SCALARS, &r->entry_flags));
+		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->proximity));
+		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ttl));
+		{
+			uint32_t _flags_save_string = ndr->flags;
+			ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+			NDR_CHECK(ndr_pull_relative_ptr_short(ndr, &_ptr_DFS_path));
+			if (_ptr_DFS_path) {
+				NDR_PULL_ALLOC(ndr, r->DFS_path);
+				NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->DFS_path, _ptr_DFS_path));
+			} else {
+				r->DFS_path = NULL;
+			}
+			ndr->flags = _flags_save_string;
+		}
+		{
+			uint32_t _flags_save_string = ndr->flags;
+			ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+			NDR_CHECK(ndr_pull_relative_ptr_short(ndr, &_ptr_DFS_alt_path));
+			if (_ptr_DFS_alt_path) {
+				NDR_PULL_ALLOC(ndr, r->DFS_alt_path);
+				NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->DFS_alt_path, _ptr_DFS_alt_path));
+			} else {
+				r->DFS_alt_path = NULL;
+			}
+			ndr->flags = _flags_save_string;
+		}
+		{
+			uint32_t _flags_save_string = ndr->flags;
+			ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+			NDR_CHECK(ndr_pull_relative_ptr_short(ndr, &_ptr_netw_address));
+			if (_ptr_netw_address) {
+				NDR_PULL_ALLOC(ndr, r->netw_address);
+				NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->netw_address, _ptr_netw_address));
+			} else {
+				r->netw_address = NULL;
+			}
+			ndr->flags = _flags_save_string;
+		}
+		NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
+	}
+	if (ndr_flags & NDR_BUFFERS) {
+		{
+			uint32_t _flags_save_string = ndr->flags;
+			ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+			if (r->DFS_path) {
+				uint32_t _relative_save_offset;
+				_relative_save_offset = ndr->offset;
+				NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->DFS_path));
+				_mem_save_DFS_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
+				NDR_PULL_SET_MEM_CTX(ndr, r->DFS_path, 0);
+				NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->DFS_path));
+				NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DFS_path_0, 0);
+			}
+			ndr->flags = _flags_save_string;
+		}
+		{
+			uint32_t _flags_save_string = ndr->flags;
+			ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+			if (r->DFS_alt_path) {
+				uint32_t _relative_save_offset;
+				_relative_save_offset = ndr->offset;
+				NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->DFS_alt_path));
+				_mem_save_DFS_alt_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
+				NDR_PULL_SET_MEM_CTX(ndr, r->DFS_alt_path, 0);
+				NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->DFS_alt_path));
+				NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DFS_alt_path_0, 0);
+			}
+			ndr->flags = _flags_save_string;
+		}
+		{
+			uint32_t _flags_save_string = ndr->flags;
+			ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+			if (r->netw_address) {
+				uint32_t _relative_save_offset;
+				_relative_save_offset = ndr->offset;
+				NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->netw_address));
+				_mem_save_netw_address_0 = NDR_PULL_GET_MEM_CTX(ndr);
+				NDR_PULL_SET_MEM_CTX(ndr, r->netw_address, 0);
+				NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->netw_address));
+				NDR_PULL_SET_MEM_CTX(ndr, _mem_save_netw_address_0, 0);
+			}
+			ndr->flags = _flags_save_string;
+		}
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_trans2_dfs_referral_v2(struct ndr_print *ndr, const char *name, const struct trans2_dfs_referral_v2 *r)
+{
+	ndr_print_struct(ndr, name, "trans2_dfs_referral_v2");
+	ndr->depth++;
+	ndr_print_uint16(ndr, "size", r->size);
+	ndr_print_TRANS_SERVER_TYPE(ndr, "server_type", r->server_type);
+	ndr_print_TRANS_FLAGS_REFERRAL(ndr, "entry_flags", r->entry_flags);
+	ndr_print_uint32(ndr, "proximity", r->proximity);
+	ndr_print_uint32(ndr, "ttl", r->ttl);
+	ndr_print_ptr(ndr, "DFS_path", r->DFS_path);
+	ndr->depth++;
+	if (r->DFS_path) {
+		ndr_print_string(ndr, "DFS_path", r->DFS_path);
+	}
+	ndr->depth--;
+	ndr_print_ptr(ndr, "DFS_alt_path", r->DFS_alt_path);
+	ndr->depth++;
+	if (r->DFS_alt_path) {
+		ndr_print_string(ndr, "DFS_alt_path", r->DFS_alt_path);
+	}
+	ndr->depth--;
+	ndr_print_ptr(ndr, "netw_address", r->netw_address);
+	ndr->depth++;
+	if (r->netw_address) {
+		ndr_print_string(ndr, "netw_address", r->netw_address);
+	}
+	ndr->depth--;
+	ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_trans_normal_referral(struct ndr_push *ndr, int ndr_flags, const struct trans_normal_referral *r)
+{
+	if (ndr_flags & NDR_SCALARS) {
+		NDR_CHECK(ndr_push_align(ndr, 5));
+		{
+			uint32_t _flags_save_string = ndr->flags;
+			ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+			NDR_CHECK(ndr_push_short_relative_ptr1(ndr, r->DFS_path));
+			ndr->flags = _flags_save_string;
+		}
+		{
+			uint32_t _flags_save_string = ndr->flags;
+			ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+			NDR_CHECK(ndr_push_short_relative_ptr1(ndr, r->DFS_alt_path));
+			ndr->flags = _flags_save_string;
+		}
+		{
+			uint32_t _flags_save_string = ndr->flags;
+			ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+			NDR_CHECK(ndr_push_short_relative_ptr1(ndr, r->netw_address));
+			ndr->flags = _flags_save_string;
+		}
+		NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->service_site_guid, 16));
+		NDR_CHECK(ndr_push_trailer_align(ndr, 5));
+	}
+	if (ndr_flags & NDR_BUFFERS) {
+		{
+			uint32_t _flags_save_string = ndr->flags;
+			ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+			if (r->DFS_path) {
+				NDR_CHECK(ndr_push_short_relative_ptr2(ndr, r->DFS_path));
+				NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->DFS_path));
+			}
+			ndr->flags = _flags_save_string;
+		}
+		{
+			uint32_t _flags_save_string = ndr->flags;
+			ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+			if (r->DFS_alt_path) {
+				NDR_CHECK(ndr_push_short_relative_ptr2(ndr, r->DFS_alt_path));
+				NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->DFS_alt_path));
+			}
+			ndr->flags = _flags_save_string;
+		}
+		{
+			uint32_t _flags_save_string = ndr->flags;
+			ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+			if (r->netw_address) {
+				NDR_CHECK(ndr_push_short_relative_ptr2(ndr, r->netw_address));
+				NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->netw_address));
+			}
+			ndr->flags = _flags_save_string;
+		}
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_trans_normal_referral(struct ndr_pull *ndr, int ndr_flags, struct trans_normal_referral *r)
+{
+	uint16_t _ptr_DFS_path;
+	TALLOC_CTX *_mem_save_DFS_path_0;
+	uint16_t _ptr_DFS_alt_path;
+	TALLOC_CTX *_mem_save_DFS_alt_path_0;
+	uint16_t _ptr_netw_address;
+	TALLOC_CTX *_mem_save_netw_address_0;
+	if (ndr_flags & NDR_SCALARS) {
+		NDR_CHECK(ndr_pull_align(ndr, 5));
+		{
+			uint32_t _flags_save_string = ndr->flags;
+			ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+			NDR_CHECK(ndr_pull_relative_ptr_short(ndr, &_ptr_DFS_path));
+			if (_ptr_DFS_path) {
+				NDR_PULL_ALLOC(ndr, r->DFS_path);
+				NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->DFS_path, _ptr_DFS_path));
+			} else {
+				r->DFS_path = NULL;
+			}
+			ndr->flags = _flags_save_string;
+		}
+		{
+			uint32_t _flags_save_string = ndr->flags;
+			ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+			NDR_CHECK(ndr_pull_relative_ptr_short(ndr, &_ptr_DFS_alt_path));
+			if (_ptr_DFS_alt_path) {
+				NDR_PULL_ALLOC(ndr, r->DFS_alt_path);
+				NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->DFS_alt_path, _ptr_DFS_alt_path));
+			} else {
+				r->DFS_alt_path = NULL;
+			}
+			ndr->flags = _flags_save_string;
+		}
+		{
+			uint32_t _flags_save_string = ndr->flags;
+			ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+			NDR_CHECK(ndr_pull_relative_ptr_short(ndr, &_ptr_netw_address));
+			if (_ptr_netw_address) {
+				NDR_PULL_ALLOC(ndr, r->netw_address);
+				NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->netw_address, _ptr_netw_address));
+			} else {
+				r->netw_address = NULL;
+			}
+			ndr->flags = _flags_save_string;
+		}
+		NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->service_site_guid, 16));
+		NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
+	}
+	if (ndr_flags & NDR_BUFFERS) {
+		{
+			uint32_t _flags_save_string = ndr->flags;
+			ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+			if (r->DFS_path) {
+				uint32_t _relative_save_offset;
+				_relative_save_offset = ndr->offset;
+				NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->DFS_path));
+				_mem_save_DFS_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
+				NDR_PULL_SET_MEM_CTX(ndr, r->DFS_path, 0);
+				NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->DFS_path));
+				NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DFS_path_0, 0);
+			}
+			ndr->flags = _flags_save_string;
+		}
+		{
+			uint32_t _flags_save_string = ndr->flags;
+			ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+			if (r->DFS_alt_path) {
+				uint32_t _relative_save_offset;
+				_relative_save_offset = ndr->offset;
+				NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->DFS_alt_path));
+				_mem_save_DFS_alt_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
+				NDR_PULL_SET_MEM_CTX(ndr, r->DFS_alt_path, 0);
+				NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->DFS_alt_path));
+				NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DFS_alt_path_0, 0);
+			}
+			ndr->flags = _flags_save_string;
+		}
+		{
+			uint32_t _flags_save_string = ndr->flags;
+			ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+			if (r->netw_address) {
+				uint32_t _relative_save_offset;
+				_relative_save_offset = ndr->offset;
+				NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->netw_address));
+				_mem_save_netw_address_0 = NDR_PULL_GET_MEM_CTX(ndr);
+				NDR_PULL_SET_MEM_CTX(ndr, r->netw_address, 0);
+				NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->netw_address));
+				NDR_PULL_SET_MEM_CTX(ndr, _mem_save_netw_address_0, 0);
+			}
+			ndr->flags = _flags_save_string;
+		}
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_trans_normal_referral(struct ndr_print *ndr, const char *name, const struct trans_normal_referral *r)
+{
+	ndr_print_struct(ndr, name, "trans_normal_referral");
+	ndr->depth++;
+	ndr_print_ptr(ndr, "DFS_path", r->DFS_path);
+	ndr->depth++;
+	if (r->DFS_path) {
+		ndr_print_string(ndr, "DFS_path", r->DFS_path);
+	}
+	ndr->depth--;
+	ndr_print_ptr(ndr, "DFS_alt_path", r->DFS_alt_path);
+	ndr->depth++;
+	if (r->DFS_alt_path) {
+		ndr_print_string(ndr, "DFS_alt_path", r->DFS_alt_path);
+	}
+	ndr->depth--;
+	ndr_print_ptr(ndr, "netw_address", r->netw_address);
+	ndr->depth++;
+	if (r->netw_address) {
+		ndr_print_string(ndr, "netw_address", r->netw_address);
+	}
+	ndr->depth--;
+	ndr_print_array_uint8(ndr, "service_site_guid", r->service_site_guid, 16);
+	ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_trans_domain_referral(struct ndr_push *ndr, int ndr_flags, const struct trans_domain_referral *r)
+{
+	if (ndr_flags & NDR_SCALARS) {
+		NDR_CHECK(ndr_push_align(ndr, 5));
+		{
+			uint32_t _flags_save_string = ndr->flags;
+			ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+			NDR_CHECK(ndr_push_short_relative_ptr1(ndr, r->special_name));
+			ndr->flags = _flags_save_string;
+		}
+		NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->nb_expanded_names));
+		{
+			uint32_t _flags_save_string_array = ndr->flags;
+			ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
+			NDR_CHECK(ndr_push_short_relative_ptr1(ndr, r->expanded_names));
+			ndr->flags = _flags_save_string_array;
+		}
+		NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->service_site_guid, 16));
+		NDR_CHECK(ndr_push_trailer_align(ndr, 5));
+	}
+	if (ndr_flags & NDR_BUFFERS) {
+		{
+			uint32_t _flags_save_string = ndr->flags;
+			ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+			if (r->special_name) {
+				NDR_CHECK(ndr_push_short_relative_ptr2(ndr, r->special_name));
+				NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->special_name));
+			}
+			ndr->flags = _flags_save_string;
+		}
+		{
+			uint32_t _flags_save_string_array = ndr->flags;
+			ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
+			if (r->expanded_names) {
+				NDR_CHECK(ndr_push_short_relative_ptr2(ndr, r->expanded_names));
+				NDR_CHECK(ndr_push_string_array(ndr, NDR_SCALARS, r->expanded_names));
+			}
+			ndr->flags = _flags_save_string_array;
+		}
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_trans_domain_referral(struct ndr_pull *ndr, int ndr_flags, struct trans_domain_referral *r)
+{
+	uint16_t _ptr_special_name;
+	TALLOC_CTX *_mem_save_special_name_0;
+	uint16_t _ptr_expanded_names;
+	TALLOC_CTX *_mem_save_expanded_names_0;
+	if (ndr_flags & NDR_SCALARS) {
+		NDR_CHECK(ndr_pull_align(ndr, 5));
+		{
+			uint32_t _flags_save_string = ndr->flags;
+			ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+			NDR_CHECK(ndr_pull_relative_ptr_short(ndr, &_ptr_special_name));
+			if (_ptr_special_name) {
+				NDR_PULL_ALLOC(ndr, r->special_name);
+				NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->special_name, _ptr_special_name));
+			} else {
+				r->special_name = NULL;
+			}
+			ndr->flags = _flags_save_string;
+		}
+		NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->nb_expanded_names));
+		{
+			uint32_t _flags_save_string_array = ndr->flags;
+			ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
+			NDR_CHECK(ndr_pull_relative_ptr_short(ndr, &_ptr_expanded_names));
+			if (_ptr_expanded_names) {
+				NDR_PULL_ALLOC(ndr, r->expanded_names);
+				NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->expanded_names, _ptr_expanded_names));
+			} else {
+				r->expanded_names = NULL;
+			}
+			ndr->flags = _flags_save_string_array;
+		}
+		NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->service_site_guid, 16));
+		NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
+	}
+	if (ndr_flags & NDR_BUFFERS) {
+		{
+			uint32_t _flags_save_string = ndr->flags;
+			ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+			if (r->special_name) {
+				uint32_t _relative_save_offset;
+				_relative_save_offset = ndr->offset;
+				NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->special_name));
+				_mem_save_special_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+				NDR_PULL_SET_MEM_CTX(ndr, r->special_name, 0);
+				NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->special_name));
+				NDR_PULL_SET_MEM_CTX(ndr, _mem_save_special_name_0, 0);
+			}
+			ndr->flags = _flags_save_string;
+		}
+		{
+			uint32_t _flags_save_string_array = ndr->flags;
+			ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
+			if (r->expanded_names) {
+				uint32_t _relative_save_offset;
+				_relative_save_offset = ndr->offset;
+				NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->expanded_names));
+				_mem_save_expanded_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
+				NDR_PULL_SET_MEM_CTX(ndr, r->expanded_names, 0);
+				NDR_CHECK(ndr_pull_string_array(ndr, NDR_SCALARS, &r->expanded_names));
+				NDR_PULL_SET_MEM_CTX(ndr, _mem_save_expanded_names_0, 0);
+			}
+			ndr->flags = _flags_save_string_array;
+		}
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_trans_domain_referral(struct ndr_print *ndr, const char *name, const struct trans_domain_referral *r)
+{
+	ndr_print_struct(ndr, name, "trans_domain_referral");
+	ndr->depth++;
+	ndr_print_ptr(ndr, "special_name", r->special_name);
+	ndr->depth++;
+	if (r->special_name) {
+		ndr_print_string(ndr, "special_name", r->special_name);
+	}
+	ndr->depth--;
+	ndr_print_uint16(ndr, "nb_expanded_names", r->nb_expanded_names);
+	ndr_print_ptr(ndr, "expanded_names", r->expanded_names);
+	ndr->depth++;
+	if (r->expanded_names) {
+		ndr_print_string_array(ndr, "expanded_names", r->expanded_names);
+	}
+	ndr->depth--;
+	ndr_print_array_uint8(ndr, "service_site_guid", r->service_site_guid, 16);
+	ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_trans_referral(struct ndr_push *ndr, int ndr_flags, const union trans_referral *r)
+{
+	if (ndr_flags & NDR_SCALARS) {
+		int level = ndr_push_get_switch_value(ndr, r);
+		NDR_CHECK(ndr_push_union_align(ndr, 5));
+		switch (level) {
+			case 0: {
+				NDR_CHECK(ndr_push_trans_normal_referral(ndr, NDR_SCALARS, &r->r1));
+			break; }
+
+			case 2: {
+				NDR_CHECK(ndr_push_trans_domain_referral(ndr, NDR_SCALARS, &r->r2));
+			break; }
+
+			default: {
+			break; }
+
+		}
+	}
+	if (ndr_flags & NDR_BUFFERS) {
+		int level = ndr_push_get_switch_value(ndr, r);
+		switch (level) {
+			case 0:
+				NDR_CHECK(ndr_push_trans_normal_referral(ndr, NDR_BUFFERS, &r->r1));
+			break;
+
+			case 2:
+				NDR_CHECK(ndr_push_trans_domain_referral(ndr, NDR_BUFFERS, &r->r2));
+			break;
+
+			default:
+			break;
+
+		}
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_trans_referral(struct ndr_pull *ndr, int ndr_flags, union trans_referral *r)
+{
+	int level;
+	level = ndr_pull_get_switch_value(ndr, r);
+	if (ndr_flags & NDR_SCALARS) {
+		NDR_CHECK(ndr_pull_union_align(ndr, 5));
+		switch (level) {
+			case 0: {
+				NDR_CHECK(ndr_pull_trans_normal_referral(ndr, NDR_SCALARS, &r->r1));
+			break; }
+
+			case 2: {
+				NDR_CHECK(ndr_pull_trans_domain_referral(ndr, NDR_SCALARS, &r->r2));
+			break; }
+
+			default: {
+			break; }
+
+		}
+	}
+	if (ndr_flags & NDR_BUFFERS) {
+		switch (level) {
+			case 0:
+				NDR_CHECK(ndr_pull_trans_normal_referral(ndr, NDR_BUFFERS, &r->r1));
+			break;
+
+			case 2:
+				NDR_CHECK(ndr_pull_trans_domain_referral(ndr, NDR_BUFFERS, &r->r2));
+			break;
+
+			default:
+			break;
+
+		}
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_trans_referral(struct ndr_print *ndr, const char *name, const union trans_referral *r)
+{
+	int level;
+	level = ndr_print_get_switch_value(ndr, r);
+	ndr_print_union(ndr, name, level, "trans_referral");
+	switch (level) {
+		case 0:
+			ndr_print_trans_normal_referral(ndr, "r1", &r->r1);
+		break;
+
+		case 2:
+			ndr_print_trans_domain_referral(ndr, "r2", &r->r2);
+		break;
+
+		default:
+		break;
+
+	}
+}
+
+static enum ndr_err_code ndr_push_trans2_dfs_referral_v3(struct ndr_push *ndr, int ndr_flags, const struct trans2_dfs_referral_v3 *r)
+{
+	{
+		uint32_t _flags_save_STRUCT = ndr->flags;
+		ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
+		if (ndr_flags & NDR_SCALARS) {
+			NDR_CHECK(ndr_push_align(ndr, 5));
+			NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->size));
+			NDR_CHECK(ndr_push_TRANS_SERVER_TYPE(ndr, NDR_SCALARS, r->server_type));
+			NDR_CHECK(ndr_push_TRANS_FLAGS_REFERRAL(ndr, NDR_SCALARS, r->entry_flags));
+			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ttl));
+			NDR_CHECK(ndr_push_set_switch_value(ndr, &r->referrals, r->entry_flags & TRANS_FLAG_REFERRAL_DOMAIN_RESP));
+			NDR_CHECK(ndr_push_trans_referral(ndr, NDR_SCALARS, &r->referrals));
+			NDR_CHECK(ndr_push_trailer_align(ndr, 5));
+		}
+		if (ndr_flags & NDR_BUFFERS) {
+			NDR_CHECK(ndr_push_trans_referral(ndr, NDR_BUFFERS, &r->referrals));
+		}
+		ndr->flags = _flags_save_STRUCT;
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_trans2_dfs_referral_v3(struct ndr_pull *ndr, int ndr_flags, struct trans2_dfs_referral_v3 *r)
+{
+	{
+		uint32_t _flags_save_STRUCT = ndr->flags;
+		ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
+		if (ndr_flags & NDR_SCALARS) {
+			NDR_CHECK(ndr_pull_align(ndr, 5));
+			NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
+			NDR_CHECK(ndr_pull_TRANS_SERVER_TYPE(ndr, NDR_SCALARS, &r->server_type));
+			NDR_CHECK(ndr_pull_TRANS_FLAGS_REFERRAL(ndr, NDR_SCALARS, &r->entry_flags));
+			NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ttl));
+			NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->referrals, r->entry_flags & TRANS_FLAG_REFERRAL_DOMAIN_RESP));
+			NDR_CHECK(ndr_pull_trans_referral(ndr, NDR_SCALARS, &r->referrals));
+			NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
+		}
+		if (ndr_flags & NDR_BUFFERS) {
+			NDR_CHECK(ndr_pull_trans_referral(ndr, NDR_BUFFERS, &r->referrals));
+		}
+		ndr->flags = _flags_save_STRUCT;
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_trans2_dfs_referral_v3(struct ndr_print *ndr, const char *name, const struct trans2_dfs_referral_v3 *r)
+{
+	ndr_print_struct(ndr, name, "trans2_dfs_referral_v3");
+	{
+		uint32_t _flags_save_STRUCT = ndr->flags;
+		ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
+		ndr->depth++;
+		ndr_print_uint16(ndr, "size", r->size);
+		ndr_print_TRANS_SERVER_TYPE(ndr, "server_type", r->server_type);
+		ndr_print_TRANS_FLAGS_REFERRAL(ndr, "entry_flags", r->entry_flags);
+		ndr_print_uint32(ndr, "ttl", r->ttl);
+		ndr_print_set_switch_value(ndr, &r->referrals, r->entry_flags & TRANS_FLAG_REFERRAL_DOMAIN_RESP);
+		ndr_print_trans_referral(ndr, "referrals", &r->referrals);
+		ndr->depth--;
+		ndr->flags = _flags_save_STRUCT;
+	}
+}
+
+static enum ndr_err_code ndr_push_trans2_dfs_referral_v4(struct ndr_push *ndr, int ndr_flags, const struct trans2_dfs_referral_v4 *r)
+{
+	if (ndr_flags & NDR_SCALARS) {
+		NDR_CHECK(ndr_push_align(ndr, 5));
+		NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->size));
+		NDR_CHECK(ndr_push_TRANS_SERVER_TYPE(ndr, NDR_SCALARS, r->server_type));
+		NDR_CHECK(ndr_push_TRANS_FLAGS_REFERRAL(ndr, NDR_SCALARS, r->entry_flags));
+		NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ttl));
+		NDR_CHECK(ndr_push_trans_normal_referral(ndr, NDR_SCALARS, &r->referrals));
+		NDR_CHECK(ndr_push_trailer_align(ndr, 5));
+	}
+	if (ndr_flags & NDR_BUFFERS) {
+		NDR_CHECK(ndr_push_trans_normal_referral(ndr, NDR_BUFFERS, &r->referrals));
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_trans2_dfs_referral_v4(struct ndr_pull *ndr, int ndr_flags, struct trans2_dfs_referral_v4 *r)
+{
+	if (ndr_flags & NDR_SCALARS) {
+		NDR_CHECK(ndr_pull_align(ndr, 5));
+		NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
+		NDR_CHECK(ndr_pull_TRANS_SERVER_TYPE(ndr, NDR_SCALARS, &r->server_type));
+		NDR_CHECK(ndr_pull_TRANS_FLAGS_REFERRAL(ndr, NDR_SCALARS, &r->entry_flags));
+		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ttl));
+		NDR_CHECK(ndr_pull_trans_normal_referral(ndr, NDR_SCALARS, &r->referrals));
+		NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
+	}
+	if (ndr_flags & NDR_BUFFERS) {
+		NDR_CHECK(ndr_pull_trans_normal_referral(ndr, NDR_BUFFERS, &r->referrals));
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_trans2_dfs_referral_v4(struct ndr_print *ndr, const char *name, const struct trans2_dfs_referral_v4 *r)
+{
+	ndr_print_struct(ndr, name, "trans2_dfs_referral_v4");
+	ndr->depth++;
+	ndr_print_uint16(ndr, "size", r->size);
+	ndr_print_TRANS_SERVER_TYPE(ndr, "server_type", r->server_type);
+	ndr_print_TRANS_FLAGS_REFERRAL(ndr, "entry_flags", r->entry_flags);
+	ndr_print_uint32(ndr, "ttl", r->ttl);
+	ndr_print_trans_normal_referral(ndr, "referrals", &r->referrals);
+	ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_trans2_dfs_referral(struct ndr_push *ndr, int ndr_flags, const union trans2_dfs_referral *r)
+{
+	if (ndr_flags & NDR_SCALARS) {
+		int level = ndr_push_get_switch_value(ndr, r);
+		NDR_CHECK(ndr_push_union_align(ndr, 5));
+		switch (level) {
+			case 1: {
+				NDR_CHECK(ndr_push_trans2_dfs_referral_v1(ndr, NDR_SCALARS, &r->v1));
+			break; }
+
+			case 2: {
+				NDR_CHECK(ndr_push_trans2_dfs_referral_v2(ndr, NDR_SCALARS, &r->v2));
+			break; }
+
+			case 3: {
+				NDR_CHECK(ndr_push_trans2_dfs_referral_v3(ndr, NDR_SCALARS, &r->v3));
+			break; }
+
+			case 4: {
+				NDR_CHECK(ndr_push_trans2_dfs_referral_v4(ndr, NDR_SCALARS, &r->v4));
+			break; }
+
+			default: {
+			break; }
+
+		}
+	}
+	if (ndr_flags & NDR_BUFFERS) {
+		int level = ndr_push_get_switch_value(ndr, r);
+		switch (level) {
+			case 1:
+				NDR_CHECK(ndr_push_trans2_dfs_referral_v1(ndr, NDR_BUFFERS, &r->v1));
+			break;
+
+			case 2:
+				NDR_CHECK(ndr_push_trans2_dfs_referral_v2(ndr, NDR_BUFFERS, &r->v2));
+			break;
+
+			case 3:
+				NDR_CHECK(ndr_push_trans2_dfs_referral_v3(ndr, NDR_BUFFERS, &r->v3));
+			break;
+
+			case 4:
+				NDR_CHECK(ndr_push_trans2_dfs_referral_v4(ndr, NDR_BUFFERS, &r->v4));
+			break;
+
+			default:
+			break;
+
+		}
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_trans2_dfs_referral(struct ndr_pull *ndr, int ndr_flags, union trans2_dfs_referral *r)
+{
+	int level;
+	level = ndr_pull_get_switch_value(ndr, r);
+	if (ndr_flags & NDR_SCALARS) {
+		NDR_CHECK(ndr_pull_union_align(ndr, 5));
+		switch (level) {
+			case 1: {
+				NDR_CHECK(ndr_pull_trans2_dfs_referral_v1(ndr, NDR_SCALARS, &r->v1));
+			break; }
+
+			case 2: {
+				NDR_CHECK(ndr_pull_trans2_dfs_referral_v2(ndr, NDR_SCALARS, &r->v2));
+			break; }
+
+			case 3: {
+				NDR_CHECK(ndr_pull_trans2_dfs_referral_v3(ndr, NDR_SCALARS, &r->v3));
+			break; }
+
+			case 4: {
+				NDR_CHECK(ndr_pull_trans2_dfs_referral_v4(ndr, NDR_SCALARS, &r->v4));
+			break; }
+
+			default: {
+			break; }
+
+		}
+	}
+	if (ndr_flags & NDR_BUFFERS) {
+		switch (level) {
+			case 1:
+				NDR_CHECK(ndr_pull_trans2_dfs_referral_v1(ndr, NDR_BUFFERS, &r->v1));
+			break;
+
+			case 2:
+				NDR_CHECK(ndr_pull_trans2_dfs_referral_v2(ndr, NDR_BUFFERS, &r->v2));
+			break;
+
+			case 3:
+				NDR_CHECK(ndr_pull_trans2_dfs_referral_v3(ndr, NDR_BUFFERS, &r->v3));
+			break;
+
+			case 4:
+				NDR_CHECK(ndr_pull_trans2_dfs_referral_v4(ndr, NDR_BUFFERS, &r->v4));
+			break;
+
+			default:
+			break;
+
+		}
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_trans2_dfs_referral(struct ndr_print *ndr, const char *name, const union trans2_dfs_referral *r)
+{
+	int level;
+	level = ndr_print_get_switch_value(ndr, r);
+	ndr_print_union(ndr, name, level, "trans2_dfs_referral");
+	switch (level) {
+		case 1:
+			ndr_print_trans2_dfs_referral_v1(ndr, "v1", &r->v1);
+		break;
+
+		case 2:
+			ndr_print_trans2_dfs_referral_v2(ndr, "v2", &r->v2);
+		break;
+
+		case 3:
+			ndr_print_trans2_dfs_referral_v3(ndr, "v3", &r->v3);
+		break;
+
+		case 4:
+			ndr_print_trans2_dfs_referral_v4(ndr, "v4", &r->v4);
+		break;
+
+		default:
+		break;
+
+	}
+}
+
+static enum ndr_err_code ndr_push_trans2_dfs_referral_type(struct ndr_push *ndr, int ndr_flags, const struct trans2_dfs_referral_type *r)
+{
+	uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr);
+	{
+		uint32_t _flags_save_STRUCT = ndr->flags;
+		ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
+		if (ndr_flags & NDR_SCALARS) {
+			NDR_CHECK(ndr_push_align(ndr, 5));
+			NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
+			NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->version));
+			NDR_CHECK(ndr_push_set_switch_value(ndr, &r->referral, r->version));
+			NDR_CHECK(ndr_push_trans2_dfs_referral(ndr, NDR_SCALARS, &r->referral));
+			NDR_CHECK(ndr_push_trailer_align(ndr, 5));
+		}
+		if (ndr_flags & NDR_BUFFERS) {
+			NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr, r));
+			NDR_CHECK(ndr_push_trans2_dfs_referral(ndr, NDR_BUFFERS, &r->referral));
+		}
+		ndr->flags = _flags_save_STRUCT;
+	}
+	ndr_push_restore_relative_base_offset(ndr, _save_relative_base_offset);
+	return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_trans2_dfs_referral_type(struct ndr_pull *ndr, int ndr_flags, struct trans2_dfs_referral_type *r)
+{
+	uint32_t _save_relative_base_offset = ndr_pull_get_relative_base_offset(ndr);
+	{
+		uint32_t _flags_save_STRUCT = ndr->flags;
+		ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
+		if (ndr_flags & NDR_SCALARS) {
+			NDR_CHECK(ndr_pull_align(ndr, 5));
+			NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
+			NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->version));
+			NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->referral, r->version));
+			NDR_CHECK(ndr_pull_trans2_dfs_referral(ndr, NDR_SCALARS, &r->referral));
+			NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
+		}
+		if (ndr_flags & NDR_BUFFERS) {
+			NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
+			NDR_CHECK(ndr_pull_trans2_dfs_referral(ndr, NDR_BUFFERS, &r->referral));
+		}
+		ndr->flags = _flags_save_STRUCT;
+	}
+	ndr_pull_restore_relative_base_offset(ndr, _save_relative_base_offset);
+	return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_trans2_dfs_referral_type(struct ndr_print *ndr, const char *name, const struct trans2_dfs_referral_type *r)
+{
+	ndr_print_struct(ndr, name, "trans2_dfs_referral_type");
+	{
+		uint32_t _flags_save_STRUCT = ndr->flags;
+		ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
+		ndr->depth++;
+		ndr_print_uint16(ndr, "version", r->version);
+		ndr_print_set_switch_value(ndr, &r->referral, r->version);
+		ndr_print_trans2_dfs_referral(ndr, "referral", &r->referral);
+		ndr->depth--;
+		ndr->flags = _flags_save_STRUCT;
+	}
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_trans2_dfs_referral_resp(struct ndr_push *ndr, int ndr_flags, const struct trans2_dfs_referral_resp *r)
+{
+	uint32_t cntr_referral_entries_0;
+	if (ndr_flags & NDR_SCALARS) {
+		NDR_CHECK(ndr_push_align(ndr, 5));
+		NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->path_consumed));
+		NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->nb_referrals));
+		NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->header_flags));
+		for (cntr_referral_entries_0 = 0; cntr_referral_entries_0 < r->nb_referrals; cntr_referral_entries_0++) {
+			NDR_CHECK(ndr_push_trans2_dfs_referral_type(ndr, NDR_SCALARS, &r->referral_entries[cntr_referral_entries_0]));
+		}
+		NDR_CHECK(ndr_push_trailer_align(ndr, 5));
+	}
+	if (ndr_flags & NDR_BUFFERS) {
+		for (cntr_referral_entries_0 = 0; cntr_referral_entries_0 < r->nb_referrals; cntr_referral_entries_0++) {
+			NDR_CHECK(ndr_push_trans2_dfs_referral_type(ndr, NDR_BUFFERS, &r->referral_entries[cntr_referral_entries_0]));
+		}
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_trans2_dfs_referral_resp(struct ndr_pull *ndr, int ndr_flags, struct trans2_dfs_referral_resp *r)
+{
+	uint32_t cntr_referral_entries_0;
+	TALLOC_CTX *_mem_save_referral_entries_0;
+	if (ndr_flags & NDR_SCALARS) {
+		NDR_CHECK(ndr_pull_align(ndr, 5));
+		NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->path_consumed));
+		NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->nb_referrals));
+		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->header_flags));
+		NDR_PULL_ALLOC_N(ndr, r->referral_entries, r->nb_referrals);
+		_mem_save_referral_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
+		NDR_PULL_SET_MEM_CTX(ndr, r->referral_entries, 0);
+		for (cntr_referral_entries_0 = 0; cntr_referral_entries_0 < r->nb_referrals; cntr_referral_entries_0++) {
+			NDR_CHECK(ndr_pull_trans2_dfs_referral_type(ndr, NDR_SCALARS, &r->referral_entries[cntr_referral_entries_0]));
+		}
+		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_referral_entries_0, 0);
+		NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
+	}
+	if (ndr_flags & NDR_BUFFERS) {
+		_mem_save_referral_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
+		NDR_PULL_SET_MEM_CTX(ndr, r->referral_entries, 0);
+		for (cntr_referral_entries_0 = 0; cntr_referral_entries_0 < r->nb_referrals; cntr_referral_entries_0++) {
+			NDR_CHECK(ndr_pull_trans2_dfs_referral_type(ndr, NDR_BUFFERS, &r->referral_entries[cntr_referral_entries_0]));
+		}
+		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_referral_entries_0, 0);
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_trans2_dfs_referral_resp(struct ndr_print *ndr, const char *name, const struct trans2_dfs_referral_resp *r)
+{
+	uint32_t cntr_referral_entries_0;
+	ndr_print_struct(ndr, name, "trans2_dfs_referral_resp");
+	ndr->depth++;
+	ndr_print_uint16(ndr, "path_consumed", r->path_consumed);
+	ndr_print_uint16(ndr, "nb_referrals", r->nb_referrals);
+	ndr_print_uint32(ndr, "header_flags", r->header_flags);
+	ndr->print(ndr, "%s: ARRAY(%d)", "referral_entries", (int)r->nb_referrals);
+	ndr->depth++;
+	for (cntr_referral_entries_0=0;cntr_referral_entries_0<r->nb_referrals;cntr_referral_entries_0++) {
+		char *idx_0=NULL;
+		if (asprintf(&idx_0, "[%d]", cntr_referral_entries_0) != -1) {
+			ndr_print_trans2_dfs_referral_type(ndr, "referral_entries", &r->referral_entries[cntr_referral_entries_0]);
+			free(idx_0);
+		}
+	}
+	ndr->depth--;
+	ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_trans2_QueryFileInformation(struct ndr_push *ndr, int flags, const struct trans2_QueryFileInformation *r)
+{
+	if (flags & NDR_IN) {
+	}
+	if (flags & NDR_OUT) {
+		NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_trans2_QueryFileInformation(struct ndr_pull *ndr, int flags, struct trans2_QueryFileInformation *r)
+{
+	if (flags & NDR_IN) {
+	}
+	if (flags & NDR_OUT) {
+		NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_trans2_QueryFileInformation(struct ndr_print *ndr, const char *name, int flags, const struct trans2_QueryFileInformation *r)
+{
+	ndr_print_struct(ndr, name, "trans2_QueryFileInformation");
+	ndr->depth++;
+	if (flags & NDR_SET_VALUES) {
+		ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+	}
+	if (flags & NDR_IN) {
+		ndr_print_struct(ndr, "in", "trans2_QueryFileInformation");
+		ndr->depth++;
+		ndr->depth--;
+	}
+	if (flags & NDR_OUT) {
+		ndr_print_struct(ndr, "out", "trans2_QueryFileInformation");
+		ndr->depth++;
+		ndr_print_WERROR(ndr, "result", r->out.result);
+		ndr->depth--;
+	}
+	ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_trans2_QueryPathInformation(struct ndr_push *ndr, int flags, const struct trans2_QueryPathInformation *r)
+{
+	if (flags & NDR_IN) {
+	}
+	if (flags & NDR_OUT) {
+		NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_trans2_QueryPathInformation(struct ndr_pull *ndr, int flags, struct trans2_QueryPathInformation *r)
+{
+	if (flags & NDR_IN) {
+	}
+	if (flags & NDR_OUT) {
+		NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_trans2_QueryPathInformation(struct ndr_print *ndr, const char *name, int flags, const struct trans2_QueryPathInformation *r)
+{
+	ndr_print_struct(ndr, name, "trans2_QueryPathInformation");
+	ndr->depth++;
+	if (flags & NDR_SET_VALUES) {
+		ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+	}
+	if (flags & NDR_IN) {
+		ndr_print_struct(ndr, "in", "trans2_QueryPathInformation");
+		ndr->depth++;
+		ndr->depth--;
+	}
+	if (flags & NDR_OUT) {
+		ndr_print_struct(ndr, "out", "trans2_QueryPathInformation");
+		ndr->depth++;
+		ndr_print_WERROR(ndr, "result", r->out.result);
+		ndr->depth--;
+	}
+	ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_trans2_SetFileInformation(struct ndr_push *ndr, int flags, const struct trans2_SetFileInformation *r)
+{
+	if (flags & NDR_IN) {
+	}
+	if (flags & NDR_OUT) {
+		NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_trans2_SetFileInformation(struct ndr_pull *ndr, int flags, struct trans2_SetFileInformation *r)
+{
+	if (flags & NDR_IN) {
+	}
+	if (flags & NDR_OUT) {
+		NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_trans2_SetFileInformation(struct ndr_print *ndr, const char *name, int flags, const struct trans2_SetFileInformation *r)
+{
+	ndr_print_struct(ndr, name, "trans2_SetFileInformation");
+	ndr->depth++;
+	if (flags & NDR_SET_VALUES) {
+		ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+	}
+	if (flags & NDR_IN) {
+		ndr_print_struct(ndr, "in", "trans2_SetFileInformation");
+		ndr->depth++;
+		ndr->depth--;
+	}
+	if (flags & NDR_OUT) {
+		ndr_print_struct(ndr, "out", "trans2_SetFileInformation");
+		ndr->depth++;
+		ndr_print_WERROR(ndr, "result", r->out.result);
+		ndr->depth--;
+	}
+	ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_trans2_SetPathInformation(struct ndr_push *ndr, int flags, const struct trans2_SetPathInformation *r)
+{
+	if (flags & NDR_IN) {
+	}
+	if (flags & NDR_OUT) {
+		NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_trans2_SetPathInformation(struct ndr_pull *ndr, int flags, struct trans2_SetPathInformation *r)
+{
+	if (flags & NDR_IN) {
+	}
+	if (flags & NDR_OUT) {
+		NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_trans2_SetPathInformation(struct ndr_print *ndr, const char *name, int flags, const struct trans2_SetPathInformation *r)
+{
+	ndr_print_struct(ndr, name, "trans2_SetPathInformation");
+	ndr->depth++;
+	if (flags & NDR_SET_VALUES) {
+		ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+	}
+	if (flags & NDR_IN) {
+		ndr_print_struct(ndr, "in", "trans2_SetPathInformation");
+		ndr->depth++;
+		ndr->depth--;
+	}
+	if (flags & NDR_OUT) {
+		ndr_print_struct(ndr, "out", "trans2_SetPathInformation");
+		ndr->depth++;
+		ndr_print_WERROR(ndr, "result", r->out.result);
+		ndr->depth--;
+	}
+	ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_trans2_QueryFsInformation(struct ndr_push *ndr, int flags, const struct trans2_QueryFsInformation *r)
+{
+	if (flags & NDR_IN) {
+	}
+	if (flags & NDR_OUT) {
+		NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_trans2_QueryFsInformation(struct ndr_pull *ndr, int flags, struct trans2_QueryFsInformation *r)
+{
+	if (flags & NDR_IN) {
+	}
+	if (flags & NDR_OUT) {
+		NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_trans2_QueryFsInformation(struct ndr_print *ndr, const char *name, int flags, const struct trans2_QueryFsInformation *r)
+{
+	ndr_print_struct(ndr, name, "trans2_QueryFsInformation");
+	ndr->depth++;
+	if (flags & NDR_SET_VALUES) {
+		ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+	}
+	if (flags & NDR_IN) {
+		ndr_print_struct(ndr, "in", "trans2_QueryFsInformation");
+		ndr->depth++;
+		ndr->depth--;
+	}
+	if (flags & NDR_OUT) {
+		ndr_print_struct(ndr, "out", "trans2_QueryFsInformation");
+		ndr->depth++;
+		ndr_print_WERROR(ndr, "result", r->out.result);
+		ndr->depth--;
+	}
+	ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_trans2_SetFsInformation(struct ndr_push *ndr, int flags, const struct trans2_SetFsInformation *r)
+{
+	if (flags & NDR_IN) {
+	}
+	if (flags & NDR_OUT) {
+		NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_trans2_SetFsInformation(struct ndr_pull *ndr, int flags, struct trans2_SetFsInformation *r)
+{
+	if (flags & NDR_IN) {
+	}
+	if (flags & NDR_OUT) {
+		NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_trans2_SetFsInformation(struct ndr_print *ndr, const char *name, int flags, const struct trans2_SetFsInformation *r)
+{
+	ndr_print_struct(ndr, name, "trans2_SetFsInformation");
+	ndr->depth++;
+	if (flags & NDR_SET_VALUES) {
+		ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+	}
+	if (flags & NDR_IN) {
+		ndr_print_struct(ndr, "in", "trans2_SetFsInformation");
+		ndr->depth++;
+		ndr->depth--;
+	}
+	if (flags & NDR_OUT) {
+		ndr_print_struct(ndr, "out", "trans2_SetFsInformation");
+		ndr->depth++;
+		ndr_print_WERROR(ndr, "result", r->out.result);
+		ndr->depth--;
+	}
+	ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_trans2_FindFirst2Information(struct ndr_push *ndr, int flags, const struct trans2_FindFirst2Information *r)
+{
+	if (flags & NDR_IN) {
+	}
+	if (flags & NDR_OUT) {
+		NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_trans2_FindFirst2Information(struct ndr_pull *ndr, int flags, struct trans2_FindFirst2Information *r)
+{
+	if (flags & NDR_IN) {
+	}
+	if (flags & NDR_OUT) {
+		NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_trans2_FindFirst2Information(struct ndr_print *ndr, const char *name, int flags, const struct trans2_FindFirst2Information *r)
+{
+	ndr_print_struct(ndr, name, "trans2_FindFirst2Information");
+	ndr->depth++;
+	if (flags & NDR_SET_VALUES) {
+		ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+	}
+	if (flags & NDR_IN) {
+		ndr_print_struct(ndr, "in", "trans2_FindFirst2Information");
+		ndr->depth++;
+		ndr->depth--;
+	}
+	if (flags & NDR_OUT) {
+		ndr_print_struct(ndr, "out", "trans2_FindFirst2Information");
+		ndr->depth++;
+		ndr_print_WERROR(ndr, "result", r->out.result);
+		ndr->depth--;
+	}
+	ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_trans2_FindNext2Information(struct ndr_push *ndr, int flags, const struct trans2_FindNext2Information *r)
+{
+	if (flags & NDR_IN) {
+	}
+	if (flags & NDR_OUT) {
+		NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_trans2_FindNext2Information(struct ndr_pull *ndr, int flags, struct trans2_FindNext2Information *r)
+{
+	if (flags & NDR_IN) {
+	}
+	if (flags & NDR_OUT) {
+		NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_trans2_FindNext2Information(struct ndr_print *ndr, const char *name, int flags, const struct trans2_FindNext2Information *r)
+{
+	ndr_print_struct(ndr, name, "trans2_FindNext2Information");
+	ndr->depth++;
+	if (flags & NDR_SET_VALUES) {
+		ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+	}
+	if (flags & NDR_IN) {
+		ndr_print_struct(ndr, "in", "trans2_FindNext2Information");
+		ndr->depth++;
+		ndr->depth--;
+	}
+	if (flags & NDR_OUT) {
+		ndr_print_struct(ndr, "out", "trans2_FindNext2Information");
+		ndr->depth++;
+		ndr_print_WERROR(ndr, "result", r->out.result);
+		ndr->depth--;
+	}
+	ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_trans2_GetDFSReferral(struct ndr_push *ndr, int flags, const struct trans2_GetDFSReferral *r)
+{
+	if (flags & NDR_IN) {
+		NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.max_referral_level));
+		{
+			uint32_t _flags_save_string = ndr->flags;
+			ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+			NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->in.servername));
+			ndr->flags = _flags_save_string;
+		}
+	}
+	if (flags & NDR_OUT) {
+		if (r->out.resp == NULL) {
+			return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+		}
+		NDR_CHECK(ndr_push_trans2_dfs_referral_resp(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.resp));
+		NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_trans2_GetDFSReferral(struct ndr_pull *ndr, int flags, struct trans2_GetDFSReferral *r)
+{
+	TALLOC_CTX *_mem_save_resp_0;
+	if (flags & NDR_IN) {
+		ZERO_STRUCT(r->out);
+
+		NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.max_referral_level));
+		{
+			uint32_t _flags_save_string = ndr->flags;
+			ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+			NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->in.servername));
+			ndr->flags = _flags_save_string;
+		}
+		NDR_PULL_ALLOC(ndr, r->out.resp);
+		ZERO_STRUCTP(r->out.resp);
+	}
+	if (flags & NDR_OUT) {
+		if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+			NDR_PULL_ALLOC(ndr, r->out.resp);
+		}
+		_mem_save_resp_0 = NDR_PULL_GET_MEM_CTX(ndr);
+		NDR_PULL_SET_MEM_CTX(ndr, r->out.resp, LIBNDR_FLAG_REF_ALLOC);
+		NDR_CHECK(ndr_pull_trans2_dfs_referral_resp(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.resp));
+		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resp_0, LIBNDR_FLAG_REF_ALLOC);
+		NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+	}
+	return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_trans2_GetDFSReferral(struct ndr_print *ndr, const char *name, int flags, const struct trans2_GetDFSReferral *r)
+{
+	ndr_print_struct(ndr, name, "trans2_GetDFSReferral");
+	ndr->depth++;
+	if (flags & NDR_SET_VALUES) {
+		ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+	}
+	if (flags & NDR_IN) {
+		ndr_print_struct(ndr, "in", "trans2_GetDFSReferral");
+		ndr->depth++;
+		ndr_print_uint16(ndr, "max_referral_level", r->in.max_referral_level);
+		ndr_print_string(ndr, "servername", r->in.servername);
+		ndr->depth--;
+	}
+	if (flags & NDR_OUT) {
+		ndr_print_struct(ndr, "out", "trans2_GetDFSReferral");
+		ndr->depth++;
+		ndr_print_ptr(ndr, "resp", r->out.resp);
+		ndr->depth++;
+		ndr_print_trans2_dfs_referral_resp(ndr, "resp", r->out.resp);
+		ndr->depth--;
+		ndr_print_NTSTATUS(ndr, "result", r->out.result);
+		ndr->depth--;
+	}
+	ndr->depth--;
+}
+
+static const struct ndr_interface_call trans2_calls[] = {
+	{
+		"trans2_QueryFileInformation",
+		sizeof(struct trans2_QueryFileInformation),
+		(ndr_push_flags_fn_t) ndr_push_trans2_QueryFileInformation,
+		(ndr_pull_flags_fn_t) ndr_pull_trans2_QueryFileInformation,
+		(ndr_print_function_t) ndr_print_trans2_QueryFileInformation,
+		false,
+	},
+	{
+		"trans2_QueryPathInformation",
+		sizeof(struct trans2_QueryPathInformation),
+		(ndr_push_flags_fn_t) ndr_push_trans2_QueryPathInformation,
+		(ndr_pull_flags_fn_t) ndr_pull_trans2_QueryPathInformation,
+		(ndr_print_function_t) ndr_print_trans2_QueryPathInformation,
+		false,
+	},
+	{
+		"trans2_SetFileInformation",
+		sizeof(struct trans2_SetFileInformation),
+		(ndr_push_flags_fn_t) ndr_push_trans2_SetFileInformation,
+		(ndr_pull_flags_fn_t) ndr_pull_trans2_SetFileInformation,
+		(ndr_print_function_t) ndr_print_trans2_SetFileInformation,
+		false,
+	},
+	{
+		"trans2_SetPathInformation",
+		sizeof(struct trans2_SetPathInformation),
+		(ndr_push_flags_fn_t) ndr_push_trans2_SetPathInformation,
+		(ndr_pull_flags_fn_t) ndr_pull_trans2_SetPathInformation,
+		(ndr_print_function_t) ndr_print_trans2_SetPathInformation,
+		false,
+	},
+	{
+		"trans2_QueryFsInformation",
+		sizeof(struct trans2_QueryFsInformation),
+		(ndr_push_flags_fn_t) ndr_push_trans2_QueryFsInformation,
+		(ndr_pull_flags_fn_t) ndr_pull_trans2_QueryFsInformation,
+		(ndr_print_function_t) ndr_print_trans2_QueryFsInformation,
+		false,
+	},
+	{
+		"trans2_SetFsInformation",
+		sizeof(struct trans2_SetFsInformation),
+		(ndr_push_flags_fn_t) ndr_push_trans2_SetFsInformation,
+		(ndr_pull_flags_fn_t) ndr_pull_trans2_SetFsInformation,
+		(ndr_print_function_t) ndr_print_trans2_SetFsInformation,
+		false,
+	},
+	{
+		"trans2_FindFirst2Information",
+		sizeof(struct trans2_FindFirst2Information),
+		(ndr_push_flags_fn_t) ndr_push_trans2_FindFirst2Information,
+		(ndr_pull_flags_fn_t) ndr_pull_trans2_FindFirst2Information,
+		(ndr_print_function_t) ndr_print_trans2_FindFirst2Information,
+		false,
+	},
+	{
+		"trans2_FindNext2Information",
+		sizeof(struct trans2_FindNext2Information),
+		(ndr_push_flags_fn_t) ndr_push_trans2_FindNext2Information,
+		(ndr_pull_flags_fn_t) ndr_pull_trans2_FindNext2Information,
+		(ndr_print_function_t) ndr_print_trans2_FindNext2Information,
+		false,
+	},
+	{
+		"trans2_GetDFSReferral",
+		sizeof(struct trans2_GetDFSReferral),
+		(ndr_push_flags_fn_t) ndr_push_trans2_GetDFSReferral,
+		(ndr_pull_flags_fn_t) ndr_pull_trans2_GetDFSReferral,
+		(ndr_print_function_t) ndr_print_trans2_GetDFSReferral,
+		false,
+	},
+	{ NULL, 0, NULL, NULL, NULL, false }
+};
+
+static const char * const trans2_endpoint_strings[] = {
+	"ncacn_np:[\\pipe\\trans2]", 
+};
+
+static const struct ndr_interface_string_array trans2_endpoints = {
+	.count	= 1,
+	.names	= trans2_endpoint_strings
+};
+
+static const char * const trans2_authservice_strings[] = {
+	"host", 
+};
+
+static const struct ndr_interface_string_array trans2_authservices = {
+	.count	= 1,
+	.names	= trans2_authservice_strings
+};
+
+
+const struct ndr_interface_table ndr_table_trans2 = {
+	.name		= "trans2",
+	.syntax_id	= {
+		{0x7e746c6d,0x7373,0x700a,{0x00,0x00},{0x00,0x00,0x00,0x00}},
+		NDR_TRANS2_VERSION
+	},
+	.helpstring	= NDR_TRANS2_HELPSTRING,
+	.num_calls	= 9,
+	.calls		= trans2_calls,
+	.endpoints	= &trans2_endpoints,
+	.authservices	= &trans2_authservices
+};
+
diff --git a/librpc/gen_ndr/ndr_trans.h b/librpc/gen_ndr/ndr_trans.h
new file mode 100644
index 0000000..e64dbf8
--- /dev/null
+++ b/librpc/gen_ndr/ndr_trans.h
@@ -0,0 +1,58 @@
+/* header auto-generated by pidl */
+
+#include "librpc/ndr/libndr.h"
+#include "../librpc/gen_ndr/trans.h"
+
+#ifndef _HEADER_NDR_trans2
+#define _HEADER_NDR_trans2
+
+#define NDR_TRANS2_UUID "7e746c6d-7373-700a-0000-00000000"
+#define NDR_TRANS2_VERSION 0.0
+#define NDR_TRANS2_NAME "trans2"
+#define NDR_TRANS2_HELPSTRING "TRANS2 messages"
+extern const struct ndr_interface_table ndr_table_trans2;
+#define NDR_TRANS2_QUERYFILEINFORMATION (0x00)
+
+#define NDR_TRANS2_QUERYPATHINFORMATION (0x01)
+
+#define NDR_TRANS2_SETFILEINFORMATION (0x02)
+
+#define NDR_TRANS2_SETPATHINFORMATION (0x03)
+
+#define NDR_TRANS2_QUERYFSINFORMATION (0x04)
+
+#define NDR_TRANS2_SETFSINFORMATION (0x05)
+
+#define NDR_TRANS2_FINDFIRST2INFORMATION (0x06)
+
+#define NDR_TRANS2_FINDNEXT2INFORMATION (0x07)
+
+#define NDR_TRANS2_GETDFSREFERRAL (0x08)
+
+#define NDR_TRANS2_CALL_COUNT (9)
+void ndr_print_TRANS_SERVER_TYPE(struct ndr_print *ndr, const char *name, enum TRANS_SERVER_TYPE r);
+void ndr_print_TRANS_FLAGS_REFERRAL(struct ndr_print *ndr, const char *name, enum TRANS_FLAGS_REFERRAL r);
+void ndr_print_trans2_dfs_referral_v1(struct ndr_print *ndr, const char *name, const struct trans2_dfs_referral_v1 *r);
+void ndr_print_trans2_dfs_referral_v2(struct ndr_print *ndr, const char *name, const struct trans2_dfs_referral_v2 *r);
+void ndr_print_trans_normal_referral(struct ndr_print *ndr, const char *name, const struct trans_normal_referral *r);
+void ndr_print_trans_domain_referral(struct ndr_print *ndr, const char *name, const struct trans_domain_referral *r);
+void ndr_print_trans_referral(struct ndr_print *ndr, const char *name, const union trans_referral *r);
+void ndr_print_trans2_dfs_referral_v3(struct ndr_print *ndr, const char *name, const struct trans2_dfs_referral_v3 *r);
+void ndr_print_trans2_dfs_referral_v4(struct ndr_print *ndr, const char *name, const struct trans2_dfs_referral_v4 *r);
+void ndr_print_trans2_dfs_referral(struct ndr_print *ndr, const char *name, const union trans2_dfs_referral *r);
+void ndr_print_trans2_dfs_referral_type(struct ndr_print *ndr, const char *name, const struct trans2_dfs_referral_type *r);
+enum ndr_err_code ndr_push_trans2_dfs_referral_resp(struct ndr_push *ndr, int ndr_flags, const struct trans2_dfs_referral_resp *r);
+enum ndr_err_code ndr_pull_trans2_dfs_referral_resp(struct ndr_pull *ndr, int ndr_flags, struct trans2_dfs_referral_resp *r);
+void ndr_print_trans2_dfs_referral_resp(struct ndr_print *ndr, const char *name, const struct trans2_dfs_referral_resp *r);
+void ndr_print_trans2_QueryFileInformation(struct ndr_print *ndr, const char *name, int flags, const struct trans2_QueryFileInformation *r);
+void ndr_print_trans2_QueryPathInformation(struct ndr_print *ndr, const char *name, int flags, const struct trans2_QueryPathInformation *r);
+void ndr_print_trans2_SetFileInformation(struct ndr_print *ndr, const char *name, int flags, const struct trans2_SetFileInformation *r);
+void ndr_print_trans2_SetPathInformation(struct ndr_print *ndr, const char *name, int flags, const struct trans2_SetPathInformation *r);
+void ndr_print_trans2_QueryFsInformation(struct ndr_print *ndr, const char *name, int flags, const struct trans2_QueryFsInformation *r);
+void ndr_print_trans2_SetFsInformation(struct ndr_print *ndr, const char *name, int flags, const struct trans2_SetFsInformation *r);
+void ndr_print_trans2_FindFirst2Information(struct ndr_print *ndr, const char *name, int flags, const struct trans2_FindFirst2Information *r);
+void ndr_print_trans2_FindNext2Information(struct ndr_print *ndr, const char *name, int flags, const struct trans2_FindNext2Information *r);
+enum ndr_err_code ndr_push_trans2_GetDFSReferral(struct ndr_push *ndr, int flags, const struct trans2_GetDFSReferral *r);
+enum ndr_err_code ndr_pull_trans2_GetDFSReferral(struct ndr_pull *ndr, int flags, struct trans2_GetDFSReferral *r);
+void ndr_print_trans2_GetDFSReferral(struct ndr_print *ndr, const char *name, int flags, const struct trans2_GetDFSReferral *r);
+#endif /* _HEADER_NDR_trans2 */
diff --git a/librpc/gen_ndr/srv_trans.c b/librpc/gen_ndr/srv_trans.c
new file mode 100644
index 0000000..fdd6dcc
--- /dev/null
+++ b/librpc/gen_ndr/srv_trans.c
@@ -0,0 +1,770 @@
+/*
+ * Unix SMB/CIFS implementation.
+ * server auto-generated by pidl. DO NOT MODIFY!
+ */
+
+#include "includes.h"
+#include "../librpc/gen_ndr/srv_trans.h"
+
+static bool api_trans2_QueryFileInformation(pipes_struct *p)
+{
+	const struct ndr_interface_call *call;
+	struct ndr_pull *pull;
+	struct ndr_push *push;
+	enum ndr_err_code ndr_err;
+	DATA_BLOB blob;
+	struct trans2_QueryFileInformation *r;
+
+	call = &ndr_table_trans2.calls[NDR_TRANS2_QUERYFILEINFORMATION];
+
+	r = talloc(talloc_tos(), struct trans2_QueryFileInformation);
+	if (r == NULL) {
+		return false;
+	}
+
+	if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+		talloc_free(r);
+		return false;
+	}
+
+	pull = ndr_pull_init_blob(&blob, r, NULL);
+	if (pull == NULL) {
+		talloc_free(r);
+		return false;
+	}
+
+	pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+	ndr_err = call->ndr_pull(pull, NDR_IN, r);
+	if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+		talloc_free(r);
+		return false;
+	}
+
+	if (DEBUGLEVEL >= 10) {
+		NDR_PRINT_IN_DEBUG(trans2_QueryFileInformation, r);
+	}
+
+	r->out.result = _trans2_QueryFileInformation(p, r);
+
+	if (p->rng_fault_state) {
+		talloc_free(r);
+		/* Return true here, srv_pipe_hnd.c will take care */
+		return true;
+	}
+
+	if (DEBUGLEVEL >= 10) {
+		NDR_PRINT_OUT_DEBUG(trans2_QueryFileInformation, r);
+	}
+
+	push = ndr_push_init_ctx(r, NULL);
+	if (push == NULL) {
+		talloc_free(r);
+		return false;
+	}
+
+	ndr_err = call->ndr_push(push, NDR_OUT, r);
+	if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+		talloc_free(r);
+		return false;
+	}
+
+	blob = ndr_push_blob(push);
+	if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+		talloc_free(r);
+		return false;
+	}
+
+	talloc_free(r);
+
+	return true;
+}
+
+static bool api_trans2_QueryPathInformation(pipes_struct *p)
+{
+	const struct ndr_interface_call *call;
+	struct ndr_pull *pull;
+	struct ndr_push *push;
+	enum ndr_err_code ndr_err;
+	DATA_BLOB blob;
+	struct trans2_QueryPathInformation *r;
+
+	call = &ndr_table_trans2.calls[NDR_TRANS2_QUERYPATHINFORMATION];
+
+	r = talloc(talloc_tos(), struct trans2_QueryPathInformation);
+	if (r == NULL) {
+		return false;
+	}
+
+	if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+		talloc_free(r);
+		return false;
+	}
+
+	pull = ndr_pull_init_blob(&blob, r, NULL);
+	if (pull == NULL) {
+		talloc_free(r);
+		return false;
+	}
+
+	pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+	ndr_err = call->ndr_pull(pull, NDR_IN, r);
+	if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+		talloc_free(r);
+		return false;
+	}
+
+	if (DEBUGLEVEL >= 10) {
+		NDR_PRINT_IN_DEBUG(trans2_QueryPathInformation, r);
+	}
+
+	r->out.result = _trans2_QueryPathInformation(p, r);
+
+	if (p->rng_fault_state) {
+		talloc_free(r);
+		/* Return true here, srv_pipe_hnd.c will take care */
+		return true;
+	}
+
+	if (DEBUGLEVEL >= 10) {
+		NDR_PRINT_OUT_DEBUG(trans2_QueryPathInformation, r);
+	}
+
+	push = ndr_push_init_ctx(r, NULL);
+	if (push == NULL) {
+		talloc_free(r);
+		return false;
+	}
+
+	ndr_err = call->ndr_push(push, NDR_OUT, r);
+	if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+		talloc_free(r);
+		return false;
+	}
+
+	blob = ndr_push_blob(push);
+	if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+		talloc_free(r);
+		return false;
+	}
+
+	talloc_free(r);
+
+	return true;
+}
+
+static bool api_trans2_SetFileInformation(pipes_struct *p)
+{
+	const struct ndr_interface_call *call;
+	struct ndr_pull *pull;
+	struct ndr_push *push;
+	enum ndr_err_code ndr_err;
+	DATA_BLOB blob;
+	struct trans2_SetFileInformation *r;
+
+	call = &ndr_table_trans2.calls[NDR_TRANS2_SETFILEINFORMATION];
+
+	r = talloc(talloc_tos(), struct trans2_SetFileInformation);
+	if (r == NULL) {
+		return false;
+	}
+
+	if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+		talloc_free(r);
+		return false;
+	}
+
+	pull = ndr_pull_init_blob(&blob, r, NULL);
+	if (pull == NULL) {
+		talloc_free(r);
+		return false;
+	}
+
+	pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+	ndr_err = call->ndr_pull(pull, NDR_IN, r);
+	if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+		talloc_free(r);
+		return false;
+	}
+
+	if (DEBUGLEVEL >= 10) {
+		NDR_PRINT_IN_DEBUG(trans2_SetFileInformation, r);
+	}
+
+	r->out.result = _trans2_SetFileInformation(p, r);
+
+	if (p->rng_fault_state) {
+		talloc_free(r);
+		/* Return true here, srv_pipe_hnd.c will take care */
+		return true;
+	}
+
+	if (DEBUGLEVEL >= 10) {
+		NDR_PRINT_OUT_DEBUG(trans2_SetFileInformation, r);
+	}
+
+	push = ndr_push_init_ctx(r, NULL);
+	if (push == NULL) {
+		talloc_free(r);
+		return false;
+	}
+
+	ndr_err = call->ndr_push(push, NDR_OUT, r);
+	if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+		talloc_free(r);
+		return false;
+	}
+
+	blob = ndr_push_blob(push);
+	if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+		talloc_free(r);
+		return false;
+	}
+
+	talloc_free(r);
+
+	return true;
+}
+
+static bool api_trans2_SetPathInformation(pipes_struct *p)
+{
+	const struct ndr_interface_call *call;
+	struct ndr_pull *pull;
+	struct ndr_push *push;
+	enum ndr_err_code ndr_err;
+	DATA_BLOB blob;
+	struct trans2_SetPathInformation *r;
+
+	call = &ndr_table_trans2.calls[NDR_TRANS2_SETPATHINFORMATION];
+
+	r = talloc(talloc_tos(), struct trans2_SetPathInformation);
+	if (r == NULL) {
+		return false;
+	}
+
+	if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+		talloc_free(r);
+		return false;
+	}
+
+	pull = ndr_pull_init_blob(&blob, r, NULL);
+	if (pull == NULL) {
+		talloc_free(r);
+		return false;
+	}
+
+	pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+	ndr_err = call->ndr_pull(pull, NDR_IN, r);
+	if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+		talloc_free(r);
+		return false;
+	}
+
+	if (DEBUGLEVEL >= 10) {
+		NDR_PRINT_IN_DEBUG(trans2_SetPathInformation, r);
+	}
+
+	r->out.result = _trans2_SetPathInformation(p, r);
+
+	if (p->rng_fault_state) {
+		talloc_free(r);
+		/* Return true here, srv_pipe_hnd.c will take care */
+		return true;
+	}
+
+	if (DEBUGLEVEL >= 10) {
+		NDR_PRINT_OUT_DEBUG(trans2_SetPathInformation, r);
+	}
+
+	push = ndr_push_init_ctx(r, NULL);
+	if (push == NULL) {
+		talloc_free(r);
+		return false;
+	}
+
+	ndr_err = call->ndr_push(push, NDR_OUT, r);
+	if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+		talloc_free(r);
+		return false;
+	}
+
+	blob = ndr_push_blob(push);
+	if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+		talloc_free(r);
+		return false;
+	}
+
+	talloc_free(r);
+
+	return true;
+}
+
+static bool api_trans2_QueryFsInformation(pipes_struct *p)
+{
+	const struct ndr_interface_call *call;
+	struct ndr_pull *pull;
+	struct ndr_push *push;
+	enum ndr_err_code ndr_err;
+	DATA_BLOB blob;
+	struct trans2_QueryFsInformation *r;
+
+	call = &ndr_table_trans2.calls[NDR_TRANS2_QUERYFSINFORMATION];
+
+	r = talloc(talloc_tos(), struct trans2_QueryFsInformation);
+	if (r == NULL) {
+		return false;
+	}
+
+	if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+		talloc_free(r);
+		return false;
+	}
+
+	pull = ndr_pull_init_blob(&blob, r, NULL);
+	if (pull == NULL) {
+		talloc_free(r);
+		return false;
+	}
+
+	pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+	ndr_err = call->ndr_pull(pull, NDR_IN, r);
+	if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+		talloc_free(r);
+		return false;
+	}
+
+	if (DEBUGLEVEL >= 10) {
+		NDR_PRINT_IN_DEBUG(trans2_QueryFsInformation, r);
+	}
+
+	r->out.result = _trans2_QueryFsInformation(p, r);
+
+	if (p->rng_fault_state) {
+		talloc_free(r);
+		/* Return true here, srv_pipe_hnd.c will take care */
+		return true;
+	}
+
+	if (DEBUGLEVEL >= 10) {
+		NDR_PRINT_OUT_DEBUG(trans2_QueryFsInformation, r);
+	}
+
+	push = ndr_push_init_ctx(r, NULL);
+	if (push == NULL) {
+		talloc_free(r);
+		return false;
+	}
+
+	ndr_err = call->ndr_push(push, NDR_OUT, r);
+	if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+		talloc_free(r);
+		return false;
+	}
+
+	blob = ndr_push_blob(push);
+	if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+		talloc_free(r);
+		return false;
+	}
+
+	talloc_free(r);
+
+	return true;
+}
+
+static bool api_trans2_SetFsInformation(pipes_struct *p)
+{
+	const struct ndr_interface_call *call;
+	struct ndr_pull *pull;
+	struct ndr_push *push;
+	enum ndr_err_code ndr_err;
+	DATA_BLOB blob;
+	struct trans2_SetFsInformation *r;
+
+	call = &ndr_table_trans2.calls[NDR_TRANS2_SETFSINFORMATION];
+
+	r = talloc(talloc_tos(), struct trans2_SetFsInformation);
+	if (r == NULL) {
+		return false;
+	}
+
+	if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+		talloc_free(r);
+		return false;
+	}
+
+	pull = ndr_pull_init_blob(&blob, r, NULL);
+	if (pull == NULL) {
+		talloc_free(r);
+		return false;
+	}
+
+	pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+	ndr_err = call->ndr_pull(pull, NDR_IN, r);
+	if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+		talloc_free(r);
+		return false;
+	}
+
+	if (DEBUGLEVEL >= 10) {
+		NDR_PRINT_IN_DEBUG(trans2_SetFsInformation, r);
+	}
+
+	r->out.result = _trans2_SetFsInformation(p, r);
+
+	if (p->rng_fault_state) {
+		talloc_free(r);
+		/* Return true here, srv_pipe_hnd.c will take care */
+		return true;
+	}
+
+	if (DEBUGLEVEL >= 10) {
+		NDR_PRINT_OUT_DEBUG(trans2_SetFsInformation, r);
+	}
+
+	push = ndr_push_init_ctx(r, NULL);
+	if (push == NULL) {
+		talloc_free(r);
+		return false;
+	}
+
+	ndr_err = call->ndr_push(push, NDR_OUT, r);
+	if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+		talloc_free(r);
+		return false;
+	}
+
+	blob = ndr_push_blob(push);
+	if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+		talloc_free(r);
+		return false;
+	}
+
+	talloc_free(r);
+
+	return true;
+}
+
+static bool api_trans2_FindFirst2Information(pipes_struct *p)
+{
+	const struct ndr_interface_call *call;
+	struct ndr_pull *pull;
+	struct ndr_push *push;
+	enum ndr_err_code ndr_err;
+	DATA_BLOB blob;
+	struct trans2_FindFirst2Information *r;
+
+	call = &ndr_table_trans2.calls[NDR_TRANS2_FINDFIRST2INFORMATION];
+
+	r = talloc(talloc_tos(), struct trans2_FindFirst2Information);
+	if (r == NULL) {
+		return false;
+	}
+
+	if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+		talloc_free(r);
+		return false;
+	}
+
+	pull = ndr_pull_init_blob(&blob, r, NULL);
+	if (pull == NULL) {
+		talloc_free(r);
+		return false;
+	}
+
+	pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+	ndr_err = call->ndr_pull(pull, NDR_IN, r);
+	if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+		talloc_free(r);
+		return false;
+	}
+
+	if (DEBUGLEVEL >= 10) {
+		NDR_PRINT_IN_DEBUG(trans2_FindFirst2Information, r);
+	}
+
+	r->out.result = _trans2_FindFirst2Information(p, r);
+
+	if (p->rng_fault_state) {
+		talloc_free(r);
+		/* Return true here, srv_pipe_hnd.c will take care */
+		return true;
+	}
+
+	if (DEBUGLEVEL >= 10) {
+		NDR_PRINT_OUT_DEBUG(trans2_FindFirst2Information, r);
+	}
+
+	push = ndr_push_init_ctx(r, NULL);
+	if (push == NULL) {
+		talloc_free(r);
+		return false;
+	}
+
+	ndr_err = call->ndr_push(push, NDR_OUT, r);
+	if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+		talloc_free(r);
+		return false;
+	}
+
+	blob = ndr_push_blob(push);
+	if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+		talloc_free(r);
+		return false;
+	}
+
+	talloc_free(r);
+
+	return true;
+}
+
+static bool api_trans2_FindNext2Information(pipes_struct *p)
+{
+	const struct ndr_interface_call *call;
+	struct ndr_pull *pull;
+	struct ndr_push *push;
+	enum ndr_err_code ndr_err;
+	DATA_BLOB blob;
+	struct trans2_FindNext2Information *r;
+
+	call = &ndr_table_trans2.calls[NDR_TRANS2_FINDNEXT2INFORMATION];
+
+	r = talloc(talloc_tos(), struct trans2_FindNext2Information);
+	if (r == NULL) {
+		return false;
+	}
+
+	if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+		talloc_free(r);
+		return false;
+	}
+
+	pull = ndr_pull_init_blob(&blob, r, NULL);
+	if (pull == NULL) {
+		talloc_free(r);
+		return false;
+	}
+
+	pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+	ndr_err = call->ndr_pull(pull, NDR_IN, r);
+	if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+		talloc_free(r);
+		return false;
+	}
+
+	if (DEBUGLEVEL >= 10) {
+		NDR_PRINT_IN_DEBUG(trans2_FindNext2Information, r);
+	}
+
+	r->out.result = _trans2_FindNext2Information(p, r);
+
+	if (p->rng_fault_state) {
+		talloc_free(r);
+		/* Return true here, srv_pipe_hnd.c will take care */
+		return true;
+	}
+
+	if (DEBUGLEVEL >= 10) {
+		NDR_PRINT_OUT_DEBUG(trans2_FindNext2Information, r);
+	}
+
+	push = ndr_push_init_ctx(r, NULL);
+	if (push == NULL) {
+		talloc_free(r);
+		return false;
+	}
+
+	ndr_err = call->ndr_push(push, NDR_OUT, r);
+	if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+		talloc_free(r);
+		return false;
+	}
+
+	blob = ndr_push_blob(push);
+	if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+		talloc_free(r);
+		return false;
+	}
+
+	talloc_free(r);
+
+	return true;
+}
+
+static bool api_trans2_GetDFSReferral(pipes_struct *p)
+{
+	const struct ndr_interface_call *call;
+	struct ndr_pull *pull;
+	struct ndr_push *push;
+	enum ndr_err_code ndr_err;
+	DATA_BLOB blob;
+	struct trans2_GetDFSReferral *r;
+
+	call = &ndr_table_trans2.calls[NDR_TRANS2_GETDFSREFERRAL];
+
+	r = talloc(talloc_tos(), struct trans2_GetDFSReferral);
+	if (r == NULL) {
+		return false;
+	}
+
+	if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+		talloc_free(r);
+		return false;
+	}
+
+	pull = ndr_pull_init_blob(&blob, r, NULL);
+	if (pull == NULL) {
+		talloc_free(r);
+		return false;
+	}
+
+	pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+	ndr_err = call->ndr_pull(pull, NDR_IN, r);
+	if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+		talloc_free(r);
+		return false;
+	}
+
+	if (DEBUGLEVEL >= 10) {
+		NDR_PRINT_IN_DEBUG(trans2_GetDFSReferral, r);
+	}
+
+	ZERO_STRUCT(r->out);
+	r->out.resp = talloc_zero(r, struct trans2_dfs_referral_resp);
+	if (r->out.resp == NULL) {
+		talloc_free(r);
+		return false;
+	}
+
+	r->out.result = _trans2_GetDFSReferral(p, r);
+
+	if (p->rng_fault_state) {
+		talloc_free(r);
+		/* Return true here, srv_pipe_hnd.c will take care */
+		return true;
+	}
+
+	if (DEBUGLEVEL >= 10) {
+		NDR_PRINT_OUT_DEBUG(trans2_GetDFSReferral, r);
+	}
+
+	push = ndr_push_init_ctx(r, NULL);
+	if (push == NULL) {
+		talloc_free(r);
+		return false;
+	}
+
+	ndr_err = call->ndr_push(push, NDR_OUT, r);
+	if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+		talloc_free(r);
+		return false;
+	}
+
+	blob = ndr_push_blob(push);
+	if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+		talloc_free(r);
+		return false;
+	}
+
+	talloc_free(r);
+
+	return true;
+}
+
+
+/* Tables */
+static struct api_struct api_trans2_cmds[] = 
+{
+	{"TRANS2_QUERYFILEINFORMATION", NDR_TRANS2_QUERYFILEINFORMATION, api_trans2_QueryFileInformation},
+	{"TRANS2_QUERYPATHINFORMATION", NDR_TRANS2_QUERYPATHINFORMATION, api_trans2_QueryPathInformation},
+	{"TRANS2_SETFILEINFORMATION", NDR_TRANS2_SETFILEINFORMATION, api_trans2_SetFileInformation},
+	{"TRANS2_SETPATHINFORMATION", NDR_TRANS2_SETPATHINFORMATION, api_trans2_SetPathInformation},
+	{"TRANS2_QUERYFSINFORMATION", NDR_TRANS2_QUERYFSINFORMATION, api_trans2_QueryFsInformation},
+	{"TRANS2_SETFSINFORMATION", NDR_TRANS2_SETFSINFORMATION, api_trans2_SetFsInformation},
+	{"TRANS2_FINDFIRST2INFORMATION", NDR_TRANS2_FINDFIRST2INFORMATION, api_trans2_FindFirst2Information},
+	{"TRANS2_FINDNEXT2INFORMATION", NDR_TRANS2_FINDNEXT2INFORMATION, api_trans2_FindNext2Information},
+	{"TRANS2_GETDFSREFERRAL", NDR_TRANS2_GETDFSREFERRAL, api_trans2_GetDFSReferral},
+};
+
+void trans2_get_pipe_fns(struct api_struct **fns, int *n_fns)
+{
+	*fns = api_trans2_cmds;
+	*n_fns = sizeof(api_trans2_cmds) / sizeof(struct api_struct);
+}
+
+NTSTATUS rpc_trans2_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const struct ndr_interface_table *table, uint32_t opnum, void *_r)
+{
+	if (cli->pipes_struct == NULL) {
+		return NT_STATUS_INVALID_PARAMETER;
+	}
+
+	switch (opnum)
+	{
+		case NDR_TRANS2_QUERYFILEINFORMATION: {
+			struct trans2_QueryFileInformation *r = (struct trans2_QueryFileInformation *)_r;
+			r->out.result = _trans2_QueryFileInformation(cli->pipes_struct, r);
+			return NT_STATUS_OK;
+		}
+
+		case NDR_TRANS2_QUERYPATHINFORMATION: {
+			struct trans2_QueryPathInformation *r = (struct trans2_QueryPathInformation *)_r;
+			r->out.result = _trans2_QueryPathInformation(cli->pipes_struct, r);
+			return NT_STATUS_OK;
+		}
+
+		case NDR_TRANS2_SETFILEINFORMATION: {
+			struct trans2_SetFileInformation *r = (struct trans2_SetFileInformation *)_r;
+			r->out.result = _trans2_SetFileInformation(cli->pipes_struct, r);
+			return NT_STATUS_OK;
+		}
+
+		case NDR_TRANS2_SETPATHINFORMATION: {
+			struct trans2_SetPathInformation *r = (struct trans2_SetPathInformation *)_r;
+			r->out.result = _trans2_SetPathInformation(cli->pipes_struct, r);
+			return NT_STATUS_OK;
+		}
+
+		case NDR_TRANS2_QUERYFSINFORMATION: {
+			struct trans2_QueryFsInformation *r = (struct trans2_QueryFsInformation *)_r;
+			r->out.result = _trans2_QueryFsInformation(cli->pipes_struct, r);
+			return NT_STATUS_OK;
+		}
+
+		case NDR_TRANS2_SETFSINFORMATION: {
+			struct trans2_SetFsInformation *r = (struct trans2_SetFsInformation *)_r;
+			r->out.result = _trans2_SetFsInformation(cli->pipes_struct, r);
+			return NT_STATUS_OK;
+		}
+
+		case NDR_TRANS2_FINDFIRST2INFORMATION: {
+			struct trans2_FindFirst2Information *r = (struct trans2_FindFirst2Information *)_r;
+			r->out.result = _trans2_FindFirst2Information(cli->pipes_struct, r);
+			return NT_STATUS_OK;
+		}
+
+		case NDR_TRANS2_FINDNEXT2INFORMATION: {
+			struct trans2_FindNext2Information *r = (struct trans2_FindNext2Information *)_r;
+			r->out.result = _trans2_FindNext2Information(cli->pipes_struct, r);
+			return NT_STATUS_OK;
+		}
+
+		case NDR_TRANS2_GETDFSREFERRAL: {
+			struct trans2_GetDFSReferral *r = (struct trans2_GetDFSReferral *)_r;
+			ZERO_STRUCT(r->out);
+			r->out.resp = talloc_zero(mem_ctx, struct trans2_dfs_referral_resp);
+			if (r->out.resp == NULL) {
+			return NT_STATUS_NO_MEMORY;
+			}
+
+			r->out.result = _trans2_GetDFSReferral(cli->pipes_struct, r);
+			return NT_STATUS_OK;
+		}
+
+		default:
+			return NT_STATUS_NOT_IMPLEMENTED;
+	}
+}
+
+NTSTATUS rpc_trans2_init(void)
+{
+	return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "trans2", "trans2", &ndr_table_trans2, api_trans2_cmds, sizeof(api_trans2_cmds) / sizeof(struct api_struct));
+}
diff --git a/librpc/gen_ndr/srv_trans.h b/librpc/gen_ndr/srv_trans.h
new file mode 100644
index 0000000..b8a0afc
--- /dev/null
+++ b/librpc/gen_ndr/srv_trans.h
@@ -0,0 +1,25 @@
+#include "../librpc/gen_ndr/ndr_trans.h"
+#ifndef __SRV_TRANS2__
+#define __SRV_TRANS2__
+WERROR _trans2_QueryFileInformation(pipes_struct *p, struct trans2_QueryFileInformation *r);
+WERROR _trans2_QueryPathInformation(pipes_struct *p, struct trans2_QueryPathInformation *r);
+WERROR _trans2_SetFileInformation(pipes_struct *p, struct trans2_SetFileInformation *r);
+WERROR _trans2_SetPathInformation(pipes_struct *p, struct trans2_SetPathInformation *r);
+WERROR _trans2_QueryFsInformation(pipes_struct *p, struct trans2_QueryFsInformation *r);
+WERROR _trans2_SetFsInformation(pipes_struct *p, struct trans2_SetFsInformation *r);
+WERROR _trans2_FindFirst2Information(pipes_struct *p, struct trans2_FindFirst2Information *r);
+WERROR _trans2_FindNext2Information(pipes_struct *p, struct trans2_FindNext2Information *r);
+NTSTATUS _trans2_GetDFSReferral(pipes_struct *p, struct trans2_GetDFSReferral *r);
+void trans2_get_pipe_fns(struct api_struct **fns, int *n_fns);
+NTSTATUS rpc_trans2_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const struct ndr_interface_table *table, uint32_t opnum, void *r);
+WERROR _trans2_QueryFileInformation(pipes_struct *p, struct trans2_QueryFileInformation *r);
+WERROR _trans2_QueryPathInformation(pipes_struct *p, struct trans2_QueryPathInformation *r);
+WERROR _trans2_SetFileInformation(pipes_struct *p, struct trans2_SetFileInformation *r);
+WERROR _trans2_SetPathInformation(pipes_struct *p, struct trans2_SetPathInformation *r);
+WERROR _trans2_QueryFsInformation(pipes_struct *p, struct trans2_QueryFsInformation *r);
+WERROR _trans2_SetFsInformation(pipes_struct *p, struct trans2_SetFsInformation *r);
+WERROR _trans2_FindFirst2Information(pipes_struct *p, struct trans2_FindFirst2Information *r);
+WERROR _trans2_FindNext2Information(pipes_struct *p, struct trans2_FindNext2Information *r);
+NTSTATUS _trans2_GetDFSReferral(pipes_struct *p, struct trans2_GetDFSReferral *r);
+NTSTATUS rpc_trans2_init(void);
+#endif /* __SRV_TRANS2__ */
diff --git a/librpc/gen_ndr/trans.h b/librpc/gen_ndr/trans.h
new file mode 100644
index 0000000..4f2c86a
--- /dev/null
+++ b/librpc/gen_ndr/trans.h
@@ -0,0 +1,192 @@
+/* header auto-generated by pidl */
+
+#include <stdint.h>
+
+#include "libcli/util/ntstatus.h"
+
+#include "librpc/gen_ndr/misc.h"
+#ifndef _HEADER_trans2
+#define _HEADER_trans2
+
+/* bitmap TRANS_HEADER_FLAG */
+#define TRANS_HEADER_FLAG_REFERAL_SVR ( 0x00000001 )
+#define TRANS_HEADER_FLAG_STORAGE_SVR ( 0x00000002 )
+#define TRANS_HEADER_FLAG_TARGET_BCK ( 0x00000004 )
+
+enum TRANS_SERVER_TYPE
+#ifndef USE_UINT_ENUMS
+ {
+	TRANS_SERVER_NON_ROOT=(int)(0x0000),
+	TRANS_SERVER_ROOT=(int)(0x0001)
+}
+#else
+ { __donnot_use_enum_TRANS_SERVER_TYPE=0x7FFFFFFF}
+#define TRANS_SERVER_NON_ROOT ( 0x0000 )
+#define TRANS_SERVER_ROOT ( 0x0001 )
+#endif
+;
+
+enum TRANS_FLAGS_REFERRAL
+#ifndef USE_UINT_ENUMS
+ {
+	TRANS_FLAG_REFERRAL_DOMAIN_RESP=(int)(0x0002),
+	TRANS_FLAG_REFERRAL_FIRST_TARGET_SET=(int)(0x0004)
+}
+#else
+ { __donnot_use_enum_TRANS_FLAGS_REFERRAL=0x7FFFFFFF}
+#define TRANS_FLAG_REFERRAL_DOMAIN_RESP ( 0x0002 )
+#define TRANS_FLAG_REFERRAL_FIRST_TARGET_SET ( 0x0004 )
+#endif
+;
+
+struct trans2_dfs_referral_v1 {
+	uint16_t size;
+	uint16_t server_type;
+	uint16_t entry_flags;
+	const char * share_name;/* [unique,flag(LIBNDR_FLAG_STR_NULLTERM)] */
+};
+
+struct trans2_dfs_referral_v2 {
+	uint16_t size;
+	enum TRANS_SERVER_TYPE server_type;
+	enum TRANS_FLAGS_REFERRAL entry_flags;
+	uint32_t proximity;
+	uint32_t ttl;
+	const char * DFS_path;/* [flag(LIBNDR_FLAG_STR_NULLTERM),relative_short] */
+	const char * DFS_alt_path;/* [flag(LIBNDR_FLAG_STR_NULLTERM),relative_short] */
+	const char * netw_address;/* [flag(LIBNDR_FLAG_STR_NULLTERM),relative_short] */
+};
+
+struct trans_normal_referral {
+	const char * DFS_path;/* [flag(LIBNDR_FLAG_STR_NULLTERM),relative_short] */
+	const char * DFS_alt_path;/* [flag(LIBNDR_FLAG_STR_NULLTERM),relative_short] */
+	const char * netw_address;/* [flag(LIBNDR_FLAG_STR_NULLTERM),relative_short] */
+	uint8_t service_site_guid[16];
+};
+
+struct trans_domain_referral {
+	const char * special_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM),relative_short] */
+	uint16_t nb_expanded_names;
+	const char ** expanded_names;/* [flag(LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING),relative_short] */
+	uint8_t service_site_guid[16];
+};
+
+union trans_referral {
+	struct trans_normal_referral r1;/* [case(0)] */
+	struct trans_domain_referral r2;/* [case(2)] */
+}/* [nodiscriminant] */;
+
+struct trans2_dfs_referral_v3 {
+	uint16_t size;
+	enum TRANS_SERVER_TYPE server_type;
+	enum TRANS_FLAGS_REFERRAL entry_flags;
+	uint32_t ttl;
+	union trans_referral referrals;/* [switch_is(entry_flags&TRANS_FLAG_REFERRAL_DOMAIN_RESP)] */
+}/* [flag(LIBNDR_FLAG_NOALIGN)] */;
+
+struct trans2_dfs_referral_v4 {
+	uint16_t size;
+	enum TRANS_SERVER_TYPE server_type;
+	enum TRANS_FLAGS_REFERRAL entry_flags;
+	uint32_t ttl;
+	struct trans_normal_referral referrals;
+};
+
+union trans2_dfs_referral {
+	struct trans2_dfs_referral_v1 v1;/* [case] */
+	struct trans2_dfs_referral_v2 v2;/* [case(2)] */
+	struct trans2_dfs_referral_v3 v3;/* [case(3)] */
+	struct trans2_dfs_referral_v4 v4;/* [case(4)] */
+}/* [nodiscriminant] */;
+
+struct trans2_dfs_referral_type {
+	uint16_t version;
+	union trans2_dfs_referral referral;/* [switch_is(version)] */
+}/* [relative_base,flag(LIBNDR_FLAG_NOALIGN)] */;
+
+struct trans2_dfs_referral_resp {
+	uint16_t path_consumed;
+	uint16_t nb_referrals;
+	uint32_t header_flags;
+	struct trans2_dfs_referral_type *referral_entries;
+}/* [public] */;
+
+
+struct trans2_QueryFileInformation {
+	struct {
+		WERROR result;
+	} out;
+
+};
+
+
+struct trans2_QueryPathInformation {
+	struct {
+		WERROR result;
+	} out;
+
+};
+
+
+struct trans2_SetFileInformation {
+	struct {
+		WERROR result;
+	} out;
+
+};
+
+
+struct trans2_SetPathInformation {
+	struct {
+		WERROR result;
+	} out;
+
+};
+
+
+struct trans2_QueryFsInformation {
+	struct {
+		WERROR result;
+	} out;
+
+};
+
+
+struct trans2_SetFsInformation {
+	struct {
+		WERROR result;
+	} out;
+
+};
+
+
+struct trans2_FindFirst2Information {
+	struct {
+		WERROR result;
+	} out;
+
+};
+
+
+struct trans2_FindNext2Information {
+	struct {
+		WERROR result;
+	} out;
+
+};
+
+
+struct trans2_GetDFSReferral {
+	struct {
+		uint16_t max_referral_level;
+		const char * servername;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */
+	} in;
+
+	struct {
+		struct trans2_dfs_referral_resp *resp;/* [ref] */
+		NTSTATUS result;
+	} out;
+
+};
+
+#endif /* _HEADER_trans2 */
-- 
1.6.3.3


--------------080605080406060906090704--


More information about the samba-technical mailing list