summaryrefslogtreecommitdiff
path: root/source4/libcli/ndr
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli/ndr')
-rw-r--r--source4/libcli/ndr/ndr_echo.c42
-rw-r--r--source4/libcli/ndr/ndr_echo.h19
2 files changed, 61 insertions, 0 deletions
diff --git a/source4/libcli/ndr/ndr_echo.c b/source4/libcli/ndr/ndr_echo.c
index 456b254f3a..a085a6534d 100644
--- a/source4/libcli/ndr/ndr_echo.c
+++ b/source4/libcli/ndr/ndr_echo.c
@@ -68,3 +68,45 @@ NTSTATUS ndr_push_rpcecho_echodata(struct ndr_push *ndr,
NDR_CHECK(ndr_push_bytes(ndr, r->in.data, r->in.len));
return NT_STATUS_OK;
}
+
+/*
+ parse a sinkdata
+*/
+NTSTATUS ndr_pull_rpcecho_sinkdata(struct ndr_pull *ndr,
+ struct rpcecho_sinkdata *r)
+{
+ return NT_STATUS_OK;
+}
+
+/*
+ push a sinkdata
+*/
+NTSTATUS ndr_push_rpcecho_sinkdata(struct ndr_push *ndr,
+ struct rpcecho_sinkdata *r)
+{
+ NDR_CHECK(ndr_push_u32(ndr, r->in.len));
+ NDR_CHECK(ndr_push_u32(ndr, r->in.len));
+ NDR_CHECK(ndr_push_bytes(ndr, r->in.data, r->in.len));
+ return NT_STATUS_OK;
+}
+
+/*
+ parse a sourcedata
+*/
+NTSTATUS ndr_pull_rpcecho_sourcedata(struct ndr_pull *ndr,
+ struct rpcecho_sourcedata *r)
+{
+ NDR_CHECK(ndr_pull_u32(ndr, &r->out.len));
+ NDR_CHECK(ndr_pull_bytes(ndr, &r->out.data, r->out.len));
+ return NT_STATUS_OK;
+}
+
+/*
+ push a sourcedata
+*/
+NTSTATUS ndr_push_rpcecho_sourcedata(struct ndr_push *ndr,
+ struct rpcecho_sourcedata *r)
+{
+ NDR_CHECK(ndr_push_u32(ndr, r->in.len));
+ return NT_STATUS_OK;
+}
diff --git a/source4/libcli/ndr/ndr_echo.h b/source4/libcli/ndr/ndr_echo.h
index 4a8a4f5ab5..aecf68c4c0 100644
--- a/source4/libcli/ndr/ndr_echo.h
+++ b/source4/libcli/ndr/ndr_echo.h
@@ -47,6 +47,25 @@ struct rpcecho_echodata {
} out;
};
+/* SinkData interface */
+struct rpcecho_sinkdata {
+ struct {
+ int len;
+ char *data;
+ } in;
+};
+
+/* SourceData interface */
+struct rpcecho_sourcedata {
+ struct {
+ int len;
+ } in;
+ struct {
+ int len;
+ char *data;
+ } out;
+};
+
/* define the command codes */
enum {
RPCECHO_CALL_ADDONE=0,