return pres;
}
+struct dcerpc_presentation *dcerpc_presentation_test_copy(
+ TALLOC_CTX *mem_ctx,
+ const struct dcerpc_presentation *pres1,
+ const uint32_t *context_id,
+ const struct ndr_interface_table *table,
+ const struct ndr_syntax_id *transfer)
+{
+ struct dcerpc_presentation *pres2;
+
+ pres2 = talloc_zero(mem_ctx, struct dcerpc_presentation);
+ if (pres2 == NULL) {
+ return NULL;
+ }
+ *pres2 = *pres1;
+
+ if (context_id != NULL) {
+ pres2->context_id = *context_id;
+ }
+ if (table != NULL) {
+ pres2->table = table;
+ }
+ if (transfer != NULL) {
+ pres2->transfer = *transfer;
+ }
+
+ pres2->negotiate.req.abstract_syntax = pres2->table->syntax_id;
+ pres2->negotiate.req.context_id = pres2->context_id;
+ pres2->negotiate.req.num_transfer_syntaxes = 1;
+ pres2->negotiate.req.transfer_syntaxes = &pres2->transfer;
+
+ pres2->negotiate.ack.result = DCERPC_BIND_ACK_RESULT_PROVIDER_REJECTION;
+ pres2->negotiate.ack.reason.value =
+ DCERPC_BIND_ACK_REASON_ABSTRACT_SYNTAX_NOT_SUPPORTED;
+
+ return pres2;
+}
+
struct dcerpc_call *dcerpc_call_allocate(TALLOC_CTX *mem_ctx,
struct dcerpc_association *assoc,
struct dcerpc_security *sec,
struct dcerpc_connection *conn,
const struct ndr_interface_table *table,
const struct ndr_syntax_id *transfer);
+struct dcerpc_presentation *dcerpc_presentation_test_copy(
+ TALLOC_CTX *mem_ctx,
+ const struct dcerpc_presentation *pres1,
+ const uint32_t *context_id,
+ const struct ndr_interface_table *table,
+ const struct ndr_syntax_id *transfer);
struct dcerpc_call *dcerpc_call_allocate(TALLOC_CTX *mem_ctx,
struct dcerpc_association *assoc,
struct dcerpc_security *sec,