summaryrefslogtreecommitdiff
path: root/source4/librpc
diff options
context:
space:
mode:
Diffstat (limited to 'source4/librpc')
-rw-r--r--source4/librpc/idl/atsvc.idl65
-rw-r--r--source4/librpc/ndr/libndr.h1
-rw-r--r--source4/librpc/ndr/ndr_atsvc.c429
-rw-r--r--source4/librpc/ndr/ndr_atsvc.h90
-rw-r--r--source4/librpc/rpc/rpc_atsvc.c88
5 files changed, 673 insertions, 0 deletions
diff --git a/source4/librpc/idl/atsvc.idl b/source4/librpc/idl/atsvc.idl
new file mode 100644
index 0000000000..81394c747b
--- /dev/null
+++ b/source4/librpc/idl/atsvc.idl
@@ -0,0 +1,65 @@
+/*
+ atsvc interface definition
+*/
+
+[ uuid(1ff70682-0a51-30e8-076d-740be8cee98b),
+ version(1.0),
+ pointer_default(unique)
+] interface atsvc
+{
+ typedef struct {
+ uint32 job_time;
+ uint32 days_of_month;
+ uint8 days_of_week;
+ uint8 flags;
+ unistr *command;
+ } atsvc_JobInfo;
+
+ /******************/
+ /* Function: 0x00 */
+ NTSTATUS atsvc_JobAdd(
+ [in] unistr *servername,
+ [in,ref] atsvc_JobInfo *job_info,
+ [out] uint32 job_id
+ );
+
+ /******************/
+ /* Function: 0x01 */
+ NTSTATUS atsvc_JobDel(
+ [in] unistr *servername,
+ [in] uint32 min_job_id,
+ [in] uint32 max_job_id
+ );
+
+ typedef struct {
+ uint32 job_id;
+ uint32 job_time;
+ uint32 days_of_month;
+ uint8 days_of_week;
+ uint8 flags;
+ unistr *command;
+ } atsvc_JobEnumInfo;
+
+ typedef struct {
+ uint32 entries_read;
+ [size_is(entries_read)] atsvc_JobEnumInfo *first_entry;
+ } atsvc_enum_ctr;
+
+ /******************/
+ /* Function: 0x02 */
+ NTSTATUS atsvc_JobEnum(
+ [in] unistr *servername,
+ [in,out,ref] atsvc_enum_ctr *ctr,
+ [in] uint32 preferred_max_len,
+ [out] uint32 total_entries,
+ [in,out] uint32 *resume_handle
+ );
+
+ /******************/
+ /* Function: 0x03 */
+ NTSTATUS atsvc_JobGetInfo(
+ [in] unistr *servername,
+ [in] uint32 job_id,
+ [out] atsvc_JobInfo *job_info
+ );
+}
diff --git a/source4/librpc/ndr/libndr.h b/source4/librpc/ndr/libndr.h
index df058abc68..8975874c90 100644
--- a/source4/librpc/ndr/libndr.h
+++ b/source4/librpc/ndr/libndr.h
@@ -200,3 +200,4 @@ typedef void (*ndr_print_union_fn_t)(struct ndr_print *, const char *, uint32, v
#include "librpc/ndr/ndr_samr.h"
#include "librpc/ndr/ndr_wkssvc.h"
#include "librpc/ndr/ndr_srvsvc.h"
+#include "librpc/ndr/ndr_atsvc.h"
diff --git a/source4/librpc/ndr/ndr_atsvc.c b/source4/librpc/ndr/ndr_atsvc.c
new file mode 100644
index 0000000000..76255b44d7
--- /dev/null
+++ b/source4/librpc/ndr/ndr_atsvc.c
@@ -0,0 +1,429 @@
+/* parser auto-generated by pidl */
+
+#include "includes.h"
+
+NTSTATUS ndr_push_atsvc_JobInfo(struct ndr_push *ndr, int ndr_flags, struct atsvc_JobInfo *r)
+{
+ if (!(ndr_flags & NDR_SCALARS)) goto buffers;
+ NDR_CHECK(ndr_push_struct_start(ndr));
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, r->job_time));
+ NDR_CHECK(ndr_push_uint32(ndr, r->days_of_month));
+ NDR_CHECK(ndr_push_uint8(ndr, r->days_of_week));
+ NDR_CHECK(ndr_push_uint8(ndr, r->flags));
+ NDR_CHECK(ndr_push_ptr(ndr, r->command));
+ ndr_push_struct_end(ndr);
+buffers:
+ if (!(ndr_flags & NDR_BUFFERS)) goto done;
+ if (r->command) {
+ NDR_CHECK(ndr_push_unistr(ndr, r->command));
+ }
+done:
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_push_atsvc_JobAdd(struct ndr_push *ndr, struct atsvc_JobAdd *r)
+{
+ NDR_CHECK(ndr_push_ptr(ndr, r->in.servername));
+ if (r->in.servername) {
+ NDR_CHECK(ndr_push_unistr(ndr, r->in.servername));
+ }
+ NDR_CHECK(ndr_push_atsvc_JobInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.job_info));
+
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_push_atsvc_JobDel(struct ndr_push *ndr, struct atsvc_JobDel *r)
+{
+ NDR_CHECK(ndr_push_ptr(ndr, r->in.servername));
+ if (r->in.servername) {
+ NDR_CHECK(ndr_push_unistr(ndr, r->in.servername));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, r->in.min_job_id));
+ NDR_CHECK(ndr_push_uint32(ndr, r->in.max_job_id));
+
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_push_atsvc_JobEnumInfo(struct ndr_push *ndr, int ndr_flags, struct atsvc_JobEnumInfo *r)
+{
+ if (!(ndr_flags & NDR_SCALARS)) goto buffers;
+ NDR_CHECK(ndr_push_struct_start(ndr));
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, r->job_id));
+ NDR_CHECK(ndr_push_uint32(ndr, r->job_time));
+ NDR_CHECK(ndr_push_uint32(ndr, r->days_of_month));
+ NDR_CHECK(ndr_push_uint8(ndr, r->days_of_week));
+ NDR_CHECK(ndr_push_uint8(ndr, r->flags));
+ NDR_CHECK(ndr_push_ptr(ndr, r->command));
+ ndr_push_struct_end(ndr);
+buffers:
+ if (!(ndr_flags & NDR_BUFFERS)) goto done;
+ if (r->command) {
+ NDR_CHECK(ndr_push_unistr(ndr, r->command));
+ }
+done:
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_push_atsvc_enum_ctr(struct ndr_push *ndr, int ndr_flags, struct atsvc_enum_ctr *r)
+{
+ if (!(ndr_flags & NDR_SCALARS)) goto buffers;
+ NDR_CHECK(ndr_push_struct_start(ndr));
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, r->entries_read));
+ NDR_CHECK(ndr_push_ptr(ndr, r->first_entry));
+ ndr_push_struct_end(ndr);
+buffers:
+ if (!(ndr_flags & NDR_BUFFERS)) goto done;
+ if (r->first_entry) {
+ NDR_CHECK(ndr_push_uint32(ndr, r->entries_read));
+ NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->first_entry, sizeof(r->first_entry[0]), r->entries_read, (ndr_push_flags_fn_t)ndr_push_atsvc_JobEnumInfo));
+ }
+done:
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_push_atsvc_JobEnum(struct ndr_push *ndr, struct atsvc_JobEnum *r)
+{
+ NDR_CHECK(ndr_push_ptr(ndr, r->in.servername));
+ if (r->in.servername) {
+ NDR_CHECK(ndr_push_unistr(ndr, r->in.servername));
+ }
+ NDR_CHECK(ndr_push_atsvc_enum_ctr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
+ NDR_CHECK(ndr_push_uint32(ndr, r->in.preferred_max_len));
+ NDR_CHECK(ndr_push_ptr(ndr, r->in.resume_handle));
+ if (r->in.resume_handle) {
+ NDR_CHECK(ndr_push_uint32(ndr, *r->in.resume_handle));
+ }
+
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_push_atsvc_JobGetInfo(struct ndr_push *ndr, struct atsvc_JobGetInfo *r)
+{
+ NDR_CHECK(ndr_push_ptr(ndr, r->in.servername));
+ if (r->in.servername) {
+ NDR_CHECK(ndr_push_unistr(ndr, r->in.servername));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, r->in.job_id));
+
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_atsvc_JobInfo(struct ndr_pull *ndr, int ndr_flags, struct atsvc_JobInfo *r)
+{
+ uint32 _ptr_command;
+ NDR_CHECK(ndr_pull_struct_start(ndr));
+ if (!(ndr_flags & NDR_SCALARS)) goto buffers;
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, &r->job_time));
+ NDR_CHECK(ndr_pull_uint32(ndr, &r->days_of_month));
+ NDR_CHECK(ndr_pull_uint8(ndr, &r->days_of_week));
+ NDR_CHECK(ndr_pull_uint8(ndr, &r->flags));
+ NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_command));
+ if (_ptr_command) {
+ NDR_ALLOC(ndr, r->command);
+ } else {
+ r->command = NULL;
+ }
+ ndr_pull_struct_end(ndr);
+buffers:
+ if (!(ndr_flags & NDR_BUFFERS)) goto done;
+ if (r->command) {
+ NDR_CHECK(ndr_pull_unistr(ndr, &r->command));
+ }
+done:
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_atsvc_JobAdd(struct ndr_pull *ndr, struct atsvc_JobAdd *r)
+{
+ NDR_CHECK(ndr_pull_uint32(ndr, &r->out.job_id));
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
+
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_atsvc_JobDel(struct ndr_pull *ndr, struct atsvc_JobDel *r)
+{
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
+
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_atsvc_JobEnumInfo(struct ndr_pull *ndr, int ndr_flags, struct atsvc_JobEnumInfo *r)
+{
+ uint32 _ptr_command;
+ NDR_CHECK(ndr_pull_struct_start(ndr));
+ if (!(ndr_flags & NDR_SCALARS)) goto buffers;
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, &r->job_id));
+ NDR_CHECK(ndr_pull_uint32(ndr, &r->job_time));
+ NDR_CHECK(ndr_pull_uint32(ndr, &r->days_of_month));
+ NDR_CHECK(ndr_pull_uint8(ndr, &r->days_of_week));
+ NDR_CHECK(ndr_pull_uint8(ndr, &r->flags));
+ NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_command));
+ if (_ptr_command) {
+ NDR_ALLOC(ndr, r->command);
+ } else {
+ r->command = NULL;
+ }
+ ndr_pull_struct_end(ndr);
+buffers:
+ if (!(ndr_flags & NDR_BUFFERS)) goto done;
+ if (r->command) {
+ NDR_CHECK(ndr_pull_unistr(ndr, &r->command));
+ }
+done:
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_atsvc_enum_ctr(struct ndr_pull *ndr, int ndr_flags, struct atsvc_enum_ctr *r)
+{
+ uint32 _ptr_first_entry;
+ NDR_CHECK(ndr_pull_struct_start(ndr));
+ if (!(ndr_flags & NDR_SCALARS)) goto buffers;
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, &r->entries_read));
+ NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_first_entry));
+ if (_ptr_first_entry) {
+ NDR_ALLOC(ndr, r->first_entry);
+ } else {
+ r->first_entry = NULL;
+ }
+ ndr_pull_struct_end(ndr);
+buffers:
+ if (!(ndr_flags & NDR_BUFFERS)) goto done;
+ if (r->first_entry) {
+ {
+ uint32 _array_size;
+ NDR_CHECK(ndr_pull_uint32(ndr, &_array_size));
+ if (r->entries_read > _array_size) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->entries_read);
+ }
+ }
+ NDR_ALLOC_N_SIZE(ndr, r->first_entry, r->entries_read, sizeof(r->first_entry[0]));
+ NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->first_entry, sizeof(r->first_entry[0]), r->entries_read, (ndr_pull_flags_fn_t)ndr_pull_atsvc_JobEnumInfo));
+ }
+done:
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_atsvc_JobEnum(struct ndr_pull *ndr, struct atsvc_JobEnum *r)
+{
+ uint32 _ptr_resume_handle;
+ NDR_CHECK(ndr_pull_atsvc_enum_ctr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
+ NDR_CHECK(ndr_pull_uint32(ndr, &r->out.total_entries));
+ NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_resume_handle));
+ if (_ptr_resume_handle) {
+ NDR_ALLOC(ndr, r->out.resume_handle);
+ } else {
+ r->out.resume_handle = NULL;
+ }
+ if (r->out.resume_handle) {
+ NDR_CHECK(ndr_pull_uint32(ndr, r->out.resume_handle));
+ }
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
+
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_atsvc_JobGetInfo(struct ndr_pull *ndr, struct atsvc_JobGetInfo *r)
+{
+ uint32 _ptr_job_info;
+ NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_job_info));
+ if (_ptr_job_info) {
+ NDR_ALLOC(ndr, r->out.job_info);
+ } else {
+ r->out.job_info = NULL;
+ }
+ if (r->out.job_info) {
+ NDR_CHECK(ndr_pull_atsvc_JobInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.job_info));
+ }
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
+
+ return NT_STATUS_OK;
+}
+
+void ndr_print_atsvc_JobInfo(struct ndr_print *ndr, const char *name, struct atsvc_JobInfo *r)
+{
+ ndr_print_struct(ndr, name, "atsvc_JobInfo");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "job_time", r->job_time);
+ ndr_print_uint32(ndr, "days_of_month", r->days_of_month);
+ ndr_print_uint8(ndr, "days_of_week", r->days_of_week);
+ ndr_print_uint8(ndr, "flags", r->flags);
+ ndr_print_ptr(ndr, "command", r->command);
+ ndr->depth++;
+ if (r->command) {
+ ndr_print_unistr(ndr, "command", r->command);
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+void ndr_print_atsvc_JobAdd(struct ndr_print *ndr, const char *name, int flags, struct atsvc_JobAdd *r)
+{
+ ndr_print_struct(ndr, name, "atsvc_JobAdd");
+ ndr->depth++;
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "atsvc_JobAdd");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "servername", r->in.servername);
+ ndr->depth++;
+ if (r->in.servername) {
+ ndr_print_unistr(ndr, "servername", r->in.servername);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "job_info", r->in.job_info);
+ ndr->depth++;
+ ndr_print_atsvc_JobInfo(ndr, "job_info", r->in.job_info);
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "atsvc_JobAdd");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "job_id", r->out.job_id);
+ ndr_print_NTSTATUS(ndr, "result", &r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+void ndr_print_atsvc_JobDel(struct ndr_print *ndr, const char *name, int flags, struct atsvc_JobDel *r)
+{
+ ndr_print_struct(ndr, name, "atsvc_JobDel");
+ ndr->depth++;
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "atsvc_JobDel");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "servername", r->in.servername);
+ ndr->depth++;
+ if (r->in.servername) {
+ ndr_print_unistr(ndr, "servername", r->in.servername);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "min_job_id", r->in.min_job_id);
+ ndr_print_uint32(ndr, "max_job_id", r->in.max_job_id);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "atsvc_JobDel");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", &r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+void ndr_print_atsvc_JobEnumInfo(struct ndr_print *ndr, const char *name, struct atsvc_JobEnumInfo *r)
+{
+ ndr_print_struct(ndr, name, "atsvc_JobEnumInfo");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "job_id", r->job_id);
+ ndr_print_uint32(ndr, "job_time", r->job_time);
+ ndr_print_uint32(ndr, "days_of_month", r->days_of_month);
+ ndr_print_uint8(ndr, "days_of_week", r->days_of_week);
+ ndr_print_uint8(ndr, "flags", r->flags);
+ ndr_print_ptr(ndr, "command", r->command);
+ ndr->depth++;
+ if (r->command) {
+ ndr_print_unistr(ndr, "command", r->command);
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+void ndr_print_atsvc_enum_ctr(struct ndr_print *ndr, const char *name, struct atsvc_enum_ctr *r)
+{
+ ndr_print_struct(ndr, name, "atsvc_enum_ctr");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "entries_read", r->entries_read);
+ ndr_print_ptr(ndr, "first_entry", r->first_entry);
+ ndr->depth++;
+ if (r->first_entry) {
+ ndr_print_array(ndr, "first_entry", r->first_entry, sizeof(r->first_entry[0]), r->entries_read, (ndr_print_fn_t)ndr_print_atsvc_JobEnumInfo);
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+void ndr_print_atsvc_JobEnum(struct ndr_print *ndr, const char *name, int flags, struct atsvc_JobEnum *r)
+{
+ ndr_print_struct(ndr, name, "atsvc_JobEnum");
+ ndr->depth++;
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "atsvc_JobEnum");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "servername", r->in.servername);
+ ndr->depth++;
+ if (r->in.servername) {
+ ndr_print_unistr(ndr, "servername", r->in.servername);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "ctr", r->in.ctr);
+ ndr->depth++;
+ ndr_print_atsvc_enum_ctr(ndr, "ctr", r->in.ctr);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "preferred_max_len", r->in.preferred_max_len);
+ ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
+ ndr->depth++;
+ if (r->in.resume_handle) {
+ ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "atsvc_JobEnum");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "ctr", r->out.ctr);
+ ndr->depth++;
+ ndr_print_atsvc_enum_ctr(ndr, "ctr", r->out.ctr);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "total_entries", r->out.total_entries);
+ ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
+ ndr->depth++;
+ if (r->out.resume_handle) {
+ ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
+ }
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", &r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+void ndr_print_atsvc_JobGetInfo(struct ndr_print *ndr, const char *name, int flags, struct atsvc_JobGetInfo *r)
+{
+ ndr_print_struct(ndr, name, "atsvc_JobGetInfo");
+ ndr->depth++;
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "atsvc_JobGetInfo");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "servername", r->in.servername);
+ ndr->depth++;
+ if (r->in.servername) {
+ ndr_print_unistr(ndr, "servername", r->in.servername);
+ }
+ ndr->depth--;
+ ndr_print_uint32(ndr, "job_id", r->in.job_id);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "atsvc_JobGetInfo");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "job_info", r->out.job_info);
+ ndr->depth++;
+ if (r->out.job_info) {
+ ndr_print_atsvc_JobInfo(ndr, "job_info", r->out.job_info);
+ }
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", &r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
diff --git a/source4/librpc/ndr/ndr_atsvc.h b/source4/librpc/ndr/ndr_atsvc.h
new file mode 100644
index 0000000000..e8e7276de2
--- /dev/null
+++ b/source4/librpc/ndr/ndr_atsvc.h
@@ -0,0 +1,90 @@
+/* header auto-generated by pidl */
+
+#define DCERPC_ATSVC_UUID "1ff70682-0a51-30e8-076d-740be8cee98b"
+#define DCERPC_ATSVC_VERSION 1.0
+#define DCERPC_ATSVC_NAME "atsvc"
+
+#define DCERPC_ATSVC_JOBADD 0
+#define DCERPC_ATSVC_JOBDEL 1
+#define DCERPC_ATSVC_JOBENUM 2
+#define DCERPC_ATSVC_JOBGETINFO 3
+
+
+struct atsvc_JobInfo {
+ uint32 job_time;
+ uint32 days_of_month;
+ uint8 days_of_week;
+ uint8 flags;
+ const char *command;
+};
+
+struct atsvc_JobAdd {
+ struct {
+ const char *servername;
+ struct atsvc_JobInfo *job_info;
+ } in;
+
+ struct {
+ uint32 job_id;
+ NTSTATUS result;
+ } out;
+
+};
+
+struct atsvc_JobDel {
+ struct {
+ const char *servername;
+ uint32 min_job_id;
+ uint32 max_job_id;
+ } in;
+
+ struct {
+ NTSTATUS result;
+ } out;
+
+};
+
+struct atsvc_JobEnumInfo {
+ uint32 job_id;
+ uint32 job_time;
+ uint32 days_of_month;
+ uint8 days_of_week;
+ uint8 flags;
+ const char *command;
+};
+
+struct atsvc_enum_ctr {
+ uint32 entries_read;
+ struct atsvc_JobEnumInfo *first_entry;
+};
+
+struct atsvc_JobEnum {
+ struct {
+ const char *servername;
+ struct atsvc_enum_ctr *ctr;
+ uint32 preferred_max_len;
+ uint32 *resume_handle;
+ } in;
+
+ struct {
+ struct atsvc_enum_ctr *ctr;
+ uint32 total_entries;
+ uint32 *resume_handle;
+ NTSTATUS result;
+ } out;
+
+};
+
+struct atsvc_JobGetInfo {
+ struct {
+ const char *servername;
+ uint32 job_id;
+ } in;
+
+ struct {
+ struct atsvc_JobInfo *job_info;
+ NTSTATUS result;
+ } out;
+
+};
+
diff --git a/source4/librpc/rpc/rpc_atsvc.c b/source4/librpc/rpc/rpc_atsvc.c
new file mode 100644
index 0000000000..1bc81b5a68
--- /dev/null
+++ b/source4/librpc/rpc/rpc_atsvc.c
@@ -0,0 +1,88 @@
+/* dcerpc client calls generated by pidl */
+
+#include "includes.h"
+
+
+NTSTATUS dcerpc_atsvc_JobAdd(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct atsvc_JobAdd *r)
+{
+ NTSTATUS status;
+
+ if (p->flags & DCERPC_DEBUG_PRINT_IN) {
+ NDR_PRINT_IN_DEBUG(atsvc_JobAdd, r);
+ }
+
+ status = dcerpc_ndr_request(p, DCERPC_ATSVC_JOBADD, mem_ctx,
+ (ndr_push_fn_t) ndr_push_atsvc_JobAdd,
+ (ndr_pull_fn_t) ndr_pull_atsvc_JobAdd,
+ r);
+
+ if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) {
+ NDR_PRINT_OUT_DEBUG(atsvc_JobAdd, r);
+ }
+ if (NT_STATUS_IS_OK(status)) status = r->out.result;
+
+ return status;
+}
+
+NTSTATUS dcerpc_atsvc_JobDel(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct atsvc_JobDel *r)
+{
+ NTSTATUS status;
+
+ if (p->flags & DCERPC_DEBUG_PRINT_IN) {
+ NDR_PRINT_IN_DEBUG(atsvc_JobDel, r);
+ }
+
+ status = dcerpc_ndr_request(p, DCERPC_ATSVC_JOBDEL, mem_ctx,
+ (ndr_push_fn_t) ndr_push_atsvc_JobDel,
+ (ndr_pull_fn_t) ndr_pull_atsvc_JobDel,
+ r);
+
+ if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) {
+ NDR_PRINT_OUT_DEBUG(atsvc_JobDel, r);
+ }
+ if (NT_STATUS_IS_OK(status)) status = r->out.result;
+
+ return status;
+}
+
+NTSTATUS dcerpc_atsvc_JobEnum(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct atsvc_JobEnum *r)
+{
+ NTSTATUS status;
+
+ if (p->flags & DCERPC_DEBUG_PRINT_IN) {
+ NDR_PRINT_IN_DEBUG(atsvc_JobEnum, r);
+ }
+
+ status = dcerpc_ndr_request(p, DCERPC_ATSVC_JOBENUM, mem_ctx,
+ (ndr_push_fn_t) ndr_push_atsvc_JobEnum,
+ (ndr_pull_fn_t) ndr_pull_atsvc_JobEnum,
+ r);
+
+ if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) {
+ NDR_PRINT_OUT_DEBUG(atsvc_JobEnum, r);
+ }
+ if (NT_STATUS_IS_OK(status)) status = r->out.result;
+
+ return status;
+}
+
+NTSTATUS dcerpc_atsvc_JobGetInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct atsvc_JobGetInfo *r)
+{
+ NTSTATUS status;
+
+ if (p->flags & DCERPC_DEBUG_PRINT_IN) {
+ NDR_PRINT_IN_DEBUG(atsvc_JobGetInfo, r);
+ }
+
+ status = dcerpc_ndr_request(p, DCERPC_ATSVC_JOBGETINFO, mem_ctx,
+ (ndr_push_fn_t) ndr_push_atsvc_JobGetInfo,
+ (ndr_pull_fn_t) ndr_pull_atsvc_JobGetInfo,
+ r);
+
+ if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) {
+ NDR_PRINT_OUT_DEBUG(atsvc_JobGetInfo, r);
+ }
+ if (NT_STATUS_IS_OK(status)) status = r->out.result;
+
+ return status;
+}