#define ndr_pull_restore(a,b)
#define ndr_token_retrieve_cmp_fn(a,b,c,d,e) NDR_ERR_FOOBAR
-#define ndr_push_bytes(a,b,c) NDR_ERR_FOOBAR
#define ndr_pull_bytes(a,b,c) NDR_ERR_FOOBAR
#define ndr_push_struct_blob(a,b,c,d) NDR_ERR_FOOBAR
#define ndr_pull_struct_blob(a,b,c,d) NDR_ERR_FOOBAR
#define ndr_pull_setup_relative_base_offset2(a,b) NDR_ERR_FOOBAR
#define ndr_pull_restore_relative_base_offset(a,b)
-#define ndr_push_init_ctx(a) NULL
-#define ndr_push_blob(a) data_blob_const(NULL,0)
#define ndr_pull_init_blob(a,b) NULL
-#define ndr_push_zero(a,b) NDR_ERR_FOOBAR
-#define ndr_push_align(a,b) NDR_ERR_FOOBAR
#define ndr_push_ref_ptr(a) NDR_ERR_FOOBAR
#define ndr_push_full_ptr(a,b) NDR_ERR_FOOBAR
#define ndr_push_unique_ptr(a,b) NDR_ERR_FOOBAR
--- /dev/null
+/*
+ NDR library used by pidl bindings
+
+ Copyright (C) Stefan Metzmacher 2007
+
+ ** NOTE! The following LGPL license applies to the ndr
+ ** library. This does NOT imply that all of Samba is released
+ ** under the LGPL
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 3 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "includes.h" /* TODO: remove this! */
+
+#include "libndr.h"
+
+struct ndr_push *ndr_push_init_ctx(TALLOC_CTX *mem_ctx)
+{
+ return talloc_zero(mem_ctx, struct ndr_push);
+}
+
+DATA_BLOB ndr_push_blob(struct ndr_push *push)
+{
+ return data_blob_const(push->data, push->offset);
+}
+
+enum ndr_err_code ndr_push_zero(struct ndr_push *push, size_t len)
+{
+ return NDR_ERR_FOOBAR;
+}
+
+enum ndr_err_code ndr_push_align(struct ndr_push *push, size_t len)
+{
+ return NDR_ERR_FOOBAR;
+}
+
+enum ndr_err_code ndr_push_bytes(struct ndr_push *push, const uint8_t *data, size_t len)
+{
+ return NDR_ERR_FOOBAR;
+}